Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
0354a73175 | |||
8ce0097d28 | |||
d21a956d6d | |||
ba855b4c88 | |||
b3fb1a0e39 | |||
17b1b993b7 | |||
29c04a743f | |||
43bd18c82b | |||
cd024c737f | |||
def33dadf7 | |||
cba623be25 | |||
a48aab61fa | |||
d0a3c8e88d | |||
85756c2fff | |||
70483d9267 | |||
02f224cd4c | |||
63cb782cbd | |||
0bb9104e26 | |||
fa2ff00be5 | |||
4de51cd56d | |||
61c834bc8a | |||
732e44191c | |||
1cddc95935 | |||
7e069d1811 |
@ -5,24 +5,15 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
jobs:
|
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:
|
Build:
|
||||||
runs-on: [ubuntu-latest, ubuntu-24.04]
|
runs-on: [ubuntu-latest, ubuntu-24.04]
|
||||||
container:
|
container:
|
||||||
image: frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04
|
image: frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- run: cmake -S . -B build
|
- run: cmake -S . -B build
|
||||||
- run: cmake --build build --target all
|
- run: cmake --build build --target all
|
||||||
- run: build/Bilby
|
- run: build/Bilby
|
||||||
@ -30,11 +21,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
current_tag=$(git describe --tags --abbrev=0)
|
current_tag=$(git describe --tags --abbrev=0)
|
||||||
previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
|
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
|
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
|
- name: Upload Gitea Release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
body_path: CHANGELOG.txt
|
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
||||||
files: |-
|
files: |-
|
||||||
build/Bilby
|
build/Bilby
|
||||||
|
|
24
.gitea/workflows/windows.yaml
Normal file
24
.gitea/workflows/windows.yaml
Normal 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
42
QtDemo/CMakeLists.txt
Normal 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
8
QtDemo/Main.qml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Window {
|
||||||
|
width: 640
|
||||||
|
height: 480
|
||||||
|
visible: true
|
||||||
|
title: qsTr("Hello World")
|
||||||
|
}
|
18
QtDemo/main.cpp
Normal file
18
QtDemo/main.cpp
Normal 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();
|
||||||
|
}
|
1
main.cpp
1
main.cpp
@ -3,5 +3,6 @@
|
|||||||
int main(int argc, char const *argv[]) {
|
int main(int argc, char const *argv[]) {
|
||||||
std::cout << "hello, bilby." << std::endl;
|
std::cout << "hello, bilby." << std::endl;
|
||||||
std::cout << "add change log.." << std::endl;
|
std::cout << "add change log.." << std::endl;
|
||||||
|
std::cout << "add change log finished.." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
138
resources/build.ps1
Normal file
138
resources/build.ps1
Normal 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
26
resources/build.sh
Executable 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 $@
|
||||||
|
|
Loading…
Reference in New Issue
Block a user