release: package for debian (#466)

This commit is contained in:
tdjnodj 2023-04-02 13:35:24 +08:00 committed by GitHub
parent 46bad85dab
commit 8f1ebf9843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 0 deletions

View File

@ -168,6 +168,10 @@ jobs:
cp -r public_res/* windows64
rm -rf public_res *.pdb
####
sudo bash ../libs/package_debian.sh ${{ github.event.inputs.tag }}
mv nekoray.deb $version_standalone-linux64.deb
sudo rm -rf nekoray
####
mv linux64 nekoray
zip -r $version_standalone-linux64.zip nekoray
rm -rf nekoray

View File

@ -1,3 +1,21 @@
## Linux 安装
### Debian 系发行版
使用 Debian 系发行版时,推荐使用 .deb 包安装:
```shell
sudo apt install ./nekoray-*-linux64.deb
```
安装完成后,桌面快捷方式启动自带参数 `-appdata`,如果想要直接启动并使用之前的配置,注意附带本参数。
### 其他发行版
下载 .zip 文件,解压到合理的路径,开箱即用。具体使用方法见下文。
或者使用 AUR `nekoray-git`
## Linux 运行
**使用 Linux 系统相信您已具备基本的排错能力,

41
libs/package_debian.sh Normal file
View File

@ -0,0 +1,41 @@
#!/bin/bash
version="$1"
mkdir -p nekoray/DEBIAN
mkdir -p nekoray/opt
cp -r linux64 nekoray/opt/
mv nekoray/opt/linux64 nekoray/opt/nekoray
rm -rf nekoray/opt/nekoray/usr
rm nekoray/opt/nekoray/launcher
# basic
cat >nekoray/DEBIAN/control <<-EOF
Package: nekoray
Version: $version
Architecture: amd64
Maintainer: MatsuriDayo nekoha_matsuri@protonmail.com
Depends: libxcb-xinerama0, libqt5core5a, libqt5gui5, libqt5network5, libqt5widgets5, libqt5svg5, libqt5x11extras5, desktop-file-utils
Description: Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box)
EOF
cat >nekoray/DEBIAN/postinst <<-EOF
cat >/usr/share/applications/nekoray.desktop<<-END
[Desktop Entry]
Name=nekoray
Version=$version
Comment=Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box)
Exec=/opt/nekoray/nekoray -appdata
Icon=/opt/nekoray/nekoray.png
Terminal=false
Type=Application
Categories=Network;Application;
END
update-desktop-database
EOF
sudo chmod 755 nekoray/DEBIAN/postinst
# desktop && PATH
sudo dpkg-deb -Zxz --build nekoray