mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-23 01:50:17 +08:00
feat: Update linux build deps
This commit is contained in:
parent
6f2832643f
commit
5105b5ff82
7
.github/workflows/build-qv2ray-cmake.yml
vendored
7
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -70,7 +70,7 @@ jobs:
|
|||||||
- platform: windows-2022
|
- platform: windows-2022
|
||||||
arch: x64
|
arch: x64
|
||||||
qt_version: "6.7.2"
|
qt_version: "6.7.2"
|
||||||
- platform: ubuntu-20.04
|
- platform: ubuntu-22.04
|
||||||
arch: x64
|
arch: x64
|
||||||
qt_version: "6.7.2"
|
qt_version: "6.7.2"
|
||||||
- platform: macos-13
|
- platform: macos-13
|
||||||
@ -100,7 +100,7 @@ jobs:
|
|||||||
path: download-artifact
|
path: download-artifact
|
||||||
# ========================================================================================================= Qt Install
|
# ========================================================================================================= Qt Install
|
||||||
- name: Linux - Install Qt
|
- name: Linux - Install Qt
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-22.04'
|
||||||
uses: jurplel/install-qt-action@v4.0.0
|
uses: jurplel/install-qt-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.qt_version }}
|
version: ${{ matrix.qt_version }}
|
||||||
@ -152,8 +152,9 @@ jobs:
|
|||||||
./libs/deploy_windows64.sh
|
./libs/deploy_windows64.sh
|
||||||
- name: Linux - Generate MakeFile and Build
|
- name: Linux - Generate MakeFile and Build
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-22.04'
|
||||||
run: |
|
run: |
|
||||||
|
sudo apt update && sudo apt upgrade -y
|
||||||
mkdir build
|
mkdir build
|
||||||
pushd build
|
pushd build
|
||||||
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release ..
|
cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
|||||||
@ -25,6 +25,8 @@ cd ../..
|
|||||||
|
|
||||||
mv $DEPLOYMENT/public_res/* $DEST
|
mv $DEPLOYMENT/public_res/* $DEST
|
||||||
|
|
||||||
|
sudo add-apt-repository universe
|
||||||
|
sudo apt install libfuse2
|
||||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
|
||||||
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage
|
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||||
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
|
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
|
||||||
|
|||||||
@ -4,9 +4,9 @@ set -e
|
|||||||
version="$1"
|
version="$1"
|
||||||
|
|
||||||
mkdir -p nekoray/DEBIAN
|
mkdir -p nekoray/DEBIAN
|
||||||
mkdir -p nekoray/usr/share
|
mkdir -p nekoray/opt
|
||||||
cp -r linux64 nekoray/usr/share
|
cp -r linux64 nekoray/opt
|
||||||
mv nekoray/usr/share/linux64 nekoray/usr/share/nekoray
|
mv nekoray/opt/linux64 nekoray/opt/nekoray
|
||||||
|
|
||||||
# basic
|
# basic
|
||||||
cat >nekoray/DEBIAN/control <<-EOF
|
cat >nekoray/DEBIAN/control <<-EOF
|
||||||
@ -14,25 +14,23 @@ Package: nekoray
|
|||||||
Version: $version
|
Version: $version
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Maintainer: Mahdi Mahdi.zrei@gmail.com
|
Maintainer: Mahdi Mahdi.zrei@gmail.com
|
||||||
Depends: libxcb-util1, libqt6core6, libqt6dbus6, libqt6gui6, libqt6network6, libqt6widgets6, libqt6svg6, libicu-dev, libxcb-cursor0, desktop-file-utils
|
Depends: desktop-file-utils
|
||||||
Description: Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
Description: Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >nekoray/DEBIAN/postinst <<-EOF
|
cat >nekoray/DEBIAN/postinst <<-EOF
|
||||||
if [ ! -s /usr/share/applications/nekoray.desktop ]; then
|
cat >/usr/share/applications/nekoray.desktop<<-END
|
||||||
cat >/usr/share/applications/nekoray.desktop<<-END
|
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Nekoray
|
Name=nekoray
|
||||||
Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||||
Exec=sh -c "PATH=/usr/share/nekoray/launcher:\$PATH /usr/share/nekoray/nekobox -appdata"
|
Exec=sudo /opt/nekoray/launcher
|
||||||
Icon=/usr/share/nekoray/nekobox.png
|
Icon=/opt/nekoray/nekobox.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Network;Application;
|
Categories=Network;Application;
|
||||||
END
|
END
|
||||||
fi
|
|
||||||
|
|
||||||
setcap cap_sys_admin=ep /usr/share/nekoray/nekoray
|
setcap cap_sys_admin=ep /opt/nekoray/launcher
|
||||||
|
|
||||||
update-desktop-database
|
update-desktop-database
|
||||||
EOF
|
EOF
|
||||||
@ -41,4 +39,4 @@ sudo chmod 0755 nekoray/DEBIAN/postinst
|
|||||||
|
|
||||||
# desktop && PATH
|
# desktop && PATH
|
||||||
|
|
||||||
sudo dpkg-deb -Zxz --build nekoray
|
sudo dpkg-deb --build nekoray
|
||||||
Loading…
Reference in New Issue
Block a user