mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-18 20:50:09 +08:00
ci: add debian-system-qt-x64.deb package
This commit is contained in:
parent
8003f60159
commit
5a3917a31f
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@ -102,6 +102,9 @@ jobs:
|
||||
- platform: ubuntu-22.04
|
||||
qt_version: "6.10.0"
|
||||
target: amd64
|
||||
- platform: ubuntu-22.04
|
||||
qt_version: "6.2.0"
|
||||
target: amd64
|
||||
- platform: ubuntu-24.04-arm
|
||||
qt_version: "6.10.0"
|
||||
target: arm64
|
||||
@ -187,7 +190,7 @@ jobs:
|
||||
cd build
|
||||
curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h"
|
||||
cmake -GNinja -DCMAKE_CXX_FLAGS="-static" -DOPENSSL_ROOT_DIR="$VCPKG_INSTALLATION_ROOT/installed/x64-mingw-static" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
ninja -j2
|
||||
ninja
|
||||
cd ..
|
||||
./script/deploy_windows.sh
|
||||
- name: Legacy Windows - Generate MakeFile and Build
|
||||
@ -204,7 +207,7 @@ jobs:
|
||||
cd build
|
||||
curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h"
|
||||
cmake -GNinja -DCMAKE_CXX_FLAGS="-static" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
ninja -j2
|
||||
ninja
|
||||
cd ..
|
||||
./script/deploy_windows.sh ${{ matrix.target }}
|
||||
- name: WOA - Generate MakeFile and Build
|
||||
@ -215,7 +218,7 @@ jobs:
|
||||
cd build
|
||||
curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h"
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
|
||||
ninja -j2
|
||||
ninja
|
||||
cd ..
|
||||
./script/deploy_woa.sh
|
||||
- name: Build Installer with NSIS
|
||||
@ -228,7 +231,7 @@ jobs:
|
||||
cp ThroneSetup.exe deployment/
|
||||
- name: Linux - Generate MakeFile and Build
|
||||
shell: bash
|
||||
if: contains( matrix.platform, 'ubuntu' )
|
||||
if: contains( matrix.platform, 'ubuntu' ) && matrix.qt_version != '6.2.0'
|
||||
run: |
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
mkdir build
|
||||
@ -238,6 +241,17 @@ jobs:
|
||||
ninja
|
||||
cd ..
|
||||
./script/deploy_linux64.sh
|
||||
- name: Linux Using System Qt - Generate MakeFile and Build
|
||||
shell: bash
|
||||
if: contains( matrix.platform, 'ubuntu' ) && matrix.qt_version == '6.2.0'
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h"
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" ..
|
||||
ninja
|
||||
cd ..
|
||||
./script/deploy_linux64_system_qt.sh
|
||||
- name: macOS - Generate MakeFile and Build
|
||||
shell: bash
|
||||
if: matrix.platform == 'macos-latest' && matrix.qt_version != '6.4.3'
|
||||
@ -299,6 +313,10 @@ jobs:
|
||||
mv Throne.deb $version_standalone-debian-x64.deb
|
||||
rm -rf Throne
|
||||
####
|
||||
bash ../script/pack_debian_system_qt.sh ${{ github.event.inputs.tag }}
|
||||
mv Throne.deb $version_standalone-debian-system-qt-x64.deb
|
||||
rm -rf Throne
|
||||
####
|
||||
mv linux-amd64 Throne
|
||||
zip -9 -r $version_standalone-linux-amd64.zip Throne
|
||||
rm -rf Throne
|
||||
|
||||
20
script/deploy_linux64_system_qt.sh
Executable file
20
script/deploy_linux64_system_qt.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
source script/env_deploy.sh
|
||||
DEST=$DEPLOYMENT/linux-system-qt-$ARCH
|
||||
rm -rf $DEST
|
||||
mkdir -p $DEST
|
||||
|
||||
#### copy binary ####
|
||||
cp $BUILD/Throne $DEST
|
||||
|
||||
#### copy Throne.png ####
|
||||
cp ./res/public/Throne.png $DEST
|
||||
|
||||
#### copy Core ####
|
||||
cd download-artifact
|
||||
cd *linux-$ARCH
|
||||
tar xvzf artifacts.tgz -C ../../
|
||||
cd ../..
|
||||
cp deployment/linux-$ARCH/Core $DEST
|
||||
40
script/pack_debian_system_qt.sh
Executable file
40
script/pack_debian_system_qt.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
version="$1"
|
||||
|
||||
mkdir -p Throne/DEBIAN
|
||||
mkdir -p Throne/opt
|
||||
cp -r linux-system-qt-amd64 Throne/opt
|
||||
mv Throne/opt/linux-system-qt-amd64 Throne/opt/Throne
|
||||
|
||||
# basic
|
||||
cat >Throne/DEBIAN/control <<-EOF
|
||||
Package: Throne
|
||||
Version: $version
|
||||
Architecture: amd64
|
||||
Maintainer: Mahdi Mahdi.zrei@gmail.com
|
||||
Depends: desktop-file-utils, libqt6core6, libqt6gui6, libqt6network6, libqt6widgets6, qt6-qpa-plugins, qt6-wayland, qt6-gtk-platformtheme, qt6-xdgdesktopportal-platformtheme, libxcb-cursor0, fonts-noto-color-emoji
|
||||
Description: Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||
EOF
|
||||
|
||||
cat >Throne/DEBIAN/postinst <<-EOF
|
||||
cat >/usr/share/applications/Throne.desktop<<-END
|
||||
[Desktop Entry]
|
||||
Name=Throne
|
||||
Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||
Exec=sh -c "PATH=/opt/Throne:\$PATH /opt/Throne/Throne -appdata"
|
||||
Icon=/opt/Throne/Throne.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;Application;
|
||||
END
|
||||
|
||||
update-desktop-database
|
||||
EOF
|
||||
|
||||
chmod 0755 Throne/DEBIAN/postinst
|
||||
|
||||
# desktop && PATH
|
||||
|
||||
dpkg-deb --build Throne
|
||||
Loading…
Reference in New Issue
Block a user