Compare commits

...

23 Commits

Author SHA1 Message Date
0354a73175 add ci.
Some checks failed
Deploy Applications / PullDocker (push) Successful in 10s
Deploy Applications / Build (push) Successful in 14s
Windows CI / build (push) Failing after 50s
2024-10-02 16:07:08 +08:00
8ce0097d28 add v4
Some checks failed
Deploy Applications / PullDocker (push) Failing after 0s
Deploy Applications / Build (push) Failing after 3s
Windows CI / build (push) Successful in 31s
2024-08-10 12:38:50 +08:00
d21a956d6d add qtbuild.
Some checks failed
Deploy Applications / PullDocker (push) Failing after 0s
Deploy Applications / Build (push) Failing after 7s
Windows CI / build (push) Failing after 52s
2024-08-10 12:32:28 +08:00
ba855b4c88 test windows ci,
All checks were successful
Windows CI / build (push) Successful in 24s
2024-08-08 22:36:32 +08:00
b3fb1a0e39 finished test .
All checks were successful
Deploy Release / Build (push) Successful in 7s
2024-07-02 01:19:15 +08:00
17b1b993b7 gdf
All checks were successful
Deploy Release / Build (push) Successful in 6s
2024-07-02 01:14:51 +08:00
29c04a743f gdfg
Some checks failed
Deploy Release / Build (push) Failing after 6s
2024-07-02 01:13:10 +08:00
43bd18c82b gdfg
Some checks failed
Deploy Release / Build (push) Failing after 6s
2024-07-02 01:08:09 +08:00
cd024c737f gdfg
Some checks failed
Deploy Release / Build (push) Failing after 6s
2024-07-02 01:06:42 +08:00
def33dadf7 gdfg
Some checks failed
Deploy Release / Build (push) Failing after 6s
2024-07-02 01:04:09 +08:00
cba623be25 gd
Some checks failed
Deploy Release / Build (push) Failing after 7s
2024-07-02 00:59:48 +08:00
a48aab61fa gd
All checks were successful
Deploy Release / Build (push) Successful in 7s
2024-07-02 00:57:28 +08:00
d0a3c8e88d gd
All checks were successful
Deploy Release / Build (push) Successful in 7s
2024-07-02 00:56:13 +08:00
85756c2fff gd
All checks were successful
Deploy Release / Build (push) Successful in 6s
2024-07-02 00:54:41 +08:00
70483d9267 hh
All checks were successful
Deploy Release / Build (push) Successful in 6s
2024-07-02 00:53:32 +08:00
02f224cd4c hfgh
Some checks failed
Deploy Release / PullDocker (push) Successful in 4s
Deploy Release / Build (push) Failing after 5s
2024-07-02 00:51:10 +08:00
63cb782cbd 4
All checks were successful
Deploy Release / PullDocker (push) Successful in 4s
Deploy Release / Build (push) Successful in 6s
4
4
2024-07-02 00:49:25 +08:00
0bb9104e26 hf
All checks were successful
Deploy Release / PullDocker (push) Successful in 5s
Deploy Release / Build (push) Successful in 7s
hfh
ftgh
2024-07-02 00:43:10 +08:00
fa2ff00be5 fsfs
All checks were successful
Deploy Release / PullDocker (push) Successful in 8s
Deploy Release / Build (push) Successful in 6s
fsfs
fsfsd
fff
ff
2024-07-02 00:39:37 +08:00
4de51cd56d add log. 2024-07-02 00:39:13 +08:00
61c834bc8a 22
All checks were successful
Deploy Release / PullDocker (push) Successful in 5s
Deploy Release / Build (push) Successful in 6s
22
2024-07-02 00:34:50 +08:00
732e44191c 11
All checks were successful
Deploy Release / PullDocker (push) Successful in 5s
Deploy Release / Build (push) Successful in 7s
22

33
44
2024-07-02 00:31:58 +08:00
1cddc95935 gdfsd
All checks were successful
Deploy Release / PullDocker (push) Successful in 4s
Deploy Release / Build (push) Successful in 7s
fddf
gdfg
d
2024-07-02 00:13:27 +08:00
8 changed files with 264 additions and 15 deletions

View File

@ -5,24 +5,15 @@ on:
tags:
- 'v*'
jobs:
PullDocker:
runs-on: [ubuntu-latest, ubuntu-24.04]
steps:
- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: frp-by1.wwvvww.cn:45288
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Pull Docker image
run: docker pull frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04
Build:
runs-on: [ubuntu-latest, ubuntu-24.04]
container:
image: frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04
image: frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: cmake -S . -B build
- run: cmake --build build --target all
- run: build/Bilby
@ -30,12 +21,13 @@ jobs:
run: |
current_tag=$(git describe --tags --abbrev=0)
previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%s" | nl -w2 -s". " > CHANGELOG.txt
cat CHANGELOG.txt
echo "Commits from ${previous_tag} to ${current_tag}:"
git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%B" | nl -w2 -s". "
git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%B" | nl -w2 -s". " > ${{ github.workspace }}-CHANGELOG.txt
- name: Upload Gitea Release
uses: akkuman/gitea-release-action@v1
with:
body_path: CHANGELOG.txt
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: |-
build/Bilby

View File

@ -0,0 +1,24 @@
name: Windows CI
on: [push]
jobs:
build:
runs-on: [windows11]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate Changelog
run: |
$current_tag = git describe --tags --abbrev=0
$previous_tag = git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1)
Write-Output "Commits from $previous_tag to $current_tag:"
$log = git log $previous_tag..$current_tag --reverse --pretty=format:"%B" | Out-String
$log_lines = $log -split "`n"
$formatted_log = $log_lines | ForEach-Object { "{0:D2}. {1}" -f ($log_lines.IndexOf($_) + 1), $_ }
$formatted_log | ForEach-Object { Write-Output $_ }
$workspace = $env:GITHUB_WORKSPACE
$formatted_log | Out-File -FilePath "$workspace-CHANGELOG.txt"
- name: Run a one-line script
run: |
echo Hello, world!
resources/build.ps1 build

42
QtDemo/CMakeLists.txt Normal file
View File

@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.16)
project(QtDemo VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(appQtDemo
main.cpp
)
qt_add_qml_module(appQtDemo
URI QtDemo
VERSION 1.0
QML_FILES
Main.qml
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
# If you are developing for iOS or macOS you should consider setting an
# explicit, fixed bundle identifier manually though.
set_target_properties(appQtDemo PROPERTIES
# MACOSX_BUNDLE_GUI_IDENTIFIER com.example.appQtDemo
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
target_link_libraries(appQtDemo
PRIVATE Qt6::Quick
)
include(GNUInstallDirs)
install(TARGETS appQtDemo
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

8
QtDemo/Main.qml Normal file
View File

@ -0,0 +1,8 @@
import QtQuick
Window {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
}

18
QtDemo/main.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
QObject::connect(
&engine,
&QQmlApplicationEngine::objectCreationFailed,
&app,
[]() { QCoreApplication::exit(-1); },
Qt::QueuedConnection);
engine.loadFromModule("QtDemo", "Main");
return app.exec();
}

View File

@ -3,5 +3,6 @@
int main(int argc, char const *argv[]) {
std::cout << "hello, bilby." << std::endl;
std::cout << "add change log.." << std::endl;
std::cout << "add change log finished.." << std::endl;
return 0;
}

138
resources/build.ps1 Normal file
View File

@ -0,0 +1,138 @@
param($type)
$DeployPath = "build\Younger-Release"
$PackagesPath = "resource\Installer\packages"
$QT_HOME= "D:\Qt\6.7.2\msvc2019_64"
$IfwHome = "D:\Qt\Tools\QtInstallerFramework\4.5"
$BoostRoot = "E:\Projects\Libraries\boost_1_80_0_msvc2022_64bit"
$OpenSSLRoot = "D:\Qt\Tools\OpenSSL\Win_x64"
Get-Location
$MsvcScript = 'D:\Program Files\Microsoft Visual Studio\2022\\Community\Common7\Tools\Launch-VsDevShell.ps1'
if (!(Test-Path $MsvcScript)) { $MsvcScript = 'D:\Program Files\Microsoft Visual Studio\2022\\Professional\Common7\Tools\Launch-VsDevShell.ps1' }
. $MsvcScript -SkipAutomaticLocation -Arch amd64
# $env:PATH
function Build() {
if (!(Test-Path build\QtDemo\CMakeCache.txt)) {
cmake.exe -G Ninja `
-S QtDemo -B build\QtDemo `
-DCMAKE_PREFIX_PATH=$QT_HOME `
-DQT_DIR="$QT_HOME\lib\cmake\Qt6" `
-DQt6_DIR="$QT_HOME\lib\cmake\Qt6" `
-DQt6QmlTools_DIR="$QT_HOME\lib\cmake\Qt6QmlTools" `
-DCMAKE_BUILD_TYPE=Release
}
cmake.exe --build build\QtDemo --target all
}
function Deploy() {
if (Test-Path $DeployPath) {
Remove-Item $DeployPath -Recurse
}
New-Item $DeployPath -ItemType Directory
Copy-Item .\build\Main\Younger.exe $DeployPath\Younger.exe
Copy-Item $OpenSSLRoot\bin\libssl-1_1-x64.dll $DeployPath
Copy-Item $OpenSSLRoot\bin\libcrypto-1_1-x64.dll $DeployPath
$boosts = "filesystem", "json", "log", "program_options", "thread", "locale"
foreach ($boost in $boosts) {
Copy-Item -Path $BoostRoot\lib\boost_$boost-vc143-mt-x64-1_80.dll -Destination $DeployPath
}
Copy-Item -Path .\build\Main\resource -Destination $DeployPath\resource -Recurse
Copy-Item -Path .\build\Main\lua -Destination $DeployPath\lua -Recurse
if (Test-Path .\build\Main\nes) {
Copy-Item -Path .\build\Main\nes -Destination $DeployPath\nes -Recurse
}
Copy-Item -Path .\build\Main\plugins -Destination $DeployPath\plugins -Recurse
New-Item $DeployPath\platforms -ItemType Directory
Copy-Item -Path $QtHome\plugins\platforms\qwindows.dll -Destination $DeployPath\platforms
New-Item $DeployPath\renderers -ItemType Directory
Copy-Item -Path $QtHome\plugins\renderers\openglrenderer.dll -Destination $DeployPath\renderers
New-Item $DeployPath\styles -ItemType Directory
Copy-Item -Path $QtHome\plugins\styles\qwindowsvistastyle.dll -Destination $DeployPath\styles
New-Item $DeployPath\iconengines -ItemType Directory
Copy-Item -Path $QtHome\plugins\iconengines\qsvgicon.dll -Destination $DeployPath\iconengines
New-Item $DeployPath\Qt\labs\platform -ItemType Directory
Copy-Item -Path $QtHome\qml\Qt\labs\platform\plugins.qmltypes -Destination $DeployPath\Qt\labs\platform
Copy-Item -Path $QtHome\qml\Qt\labs\platform\qmldir -Destination $DeployPath\Qt\labs\platform
Copy-Item -Path $QtHome\qml\Qt\labs\platform\qtlabsplatformplugin.dll -Destination $DeployPath\Qt\labs\platform
New-Item $DeployPath\QtCharts -ItemType Directory
Copy-Item -Path $QtHome\qml\QtCharts\plugins.qmltypes -Destination $DeployPath\QtCharts
Copy-Item -Path $QtHome\qml\QtCharts\qmldir -Destination $DeployPath\QtCharts
Copy-Item -Path $QtHome\qml\QtCharts\qtchartsqml2plugin.dll -Destination $DeployPath\QtCharts
Copy-Item -Path $QtHome\qml\Qt5Compat\GraphicalEffects $DeployPath\Qt5Compat\GraphicalEffects -Recurse
Remove-Item "$DeployPath\Qt5Compat\GraphicalEffects\*.pdb"
$modules = "Bluetooth", "Charts", "ChartsQml", "OpenGLWidgets", "Scxml", "SvgWidgets", "Test", "Widgets", "Xml"
foreach ($module in $modules) {
Copy-Item -Path $QtHome\bin\Qt6$module.dll -Destination $DeployPath
}
New-Item $DeployPath\imageformats -ItemType Directory
$formats = "qgif", "qicns", "qico", "qjpeg", "qsvg", "qtga", "qtiff", "qwbmp", "qwebp"
foreach ($format in $formats) {
Copy-Item -Path $QtHome\plugins\imageformats\$format.dll -Destination $DeployPath\imageformats
}
Invoke-Expression "$QtHome\bin\windeployqt.exe $DeployPath\Younger.exe --qmldir=$QtHome\qml --plugindir=$QtHome\plugins"
}
function Installer() {
Copy-Item -Path $DeployPath\resource -Destination $PackagesPath\Younger\data -Recurse -Force
Copy-Item -Path $DeployPath\lua -Destination $PackagesPath\Younger\data -Recurse -Force
if (Test-Path $DeployPath\nes) {
Copy-Item -Path $DeployPath\nes -Destination $PackagesPath\Younger\data -Recurse
}
Copy-Item -Path $DeployPath\Younger.exe -Destination $PackagesPath\Younger\data
Copy-Item -Path $DeployPath\*.dll -Destination $PackagesPath\Runtime\data -Force
$dirs = "iconengines", "imageformats", "platforms", "Qt", "QtCharts", "QtMultimedia", "QtQml", `
"QtQuick", "QtQuick3D", "Qt5Compat", "QtTest", "renderers", "styles", "translations"
foreach ($dir in $dirs) {
Copy-Item -Path $DeployPath\$dir -Destination $PackagesPath\Runtime\data -Recurse -Force
}
$plugins = "Bluetooth", "Calculator", "ElectronicTableCardManager", "FFmpegPlayer", "GameEmulator", "ScreenRecorder", "WebsocketAssistant"
foreach ($plugin in $plugins) {
if (!(Test-Path $PackagesPath\$plugin\data\plugins)) {
New-Item $PackagesPath\$plugin\data\plugins -ItemType Directory
}
Copy-Item -Path $DeployPath\plugins\$plugin.dll -Destination $PackagesPath\$plugin\data\plugins -Force
}
Invoke-Expression "$IfwHome\bin\repogen.exe -p resource\Installer\packages build\repository"
Invoke-Expression "$IfwHome\bin\binarycreator.exe -t $IfwHome\bin\installerbase.exe -p resource\Installer\packages -c resource\Installer\config\config.xml build\Younger_offline.exe -v"
Invoke-Expression "$IfwHome\bin\binarycreator.exe --online-only -t $IfwHome\bin\installerbase.exe -p resource\Installer\packages -c resource\Installer\config\config.xml build\YoungerInstaller.exe -v"
}
function UpdateServer(){
scp -r build\repository root@amass.fun:/root/http_server/InstallerRepository/Younger/repository
scp build\YoungerInstaller.exe root@amass.fun:/root/http_server/InstallerRepository/Younger
}
switch ($type) {
"build" {
Build
}
"deploy" {
Deploy
}
"installer" {
Installer
}
"update"{
UpdateServer
}
}

26
resources/build.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
function changelog(){
current_tag=$(git describe --tags --abbrev=0)
previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%B" | nl -w2 -s". " > CHANGELOG.txt
cat CHANGELOG.txt
}
function main() {
local cmd=$1
shift 1
case $cmd in
changelog)
changelog
;;
*)
changelog
;;
esac
}
main $@