Skip to content

Commit

Permalink
release: package for debian (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdjnodj authored Apr 2, 2023
1 parent 46bad85 commit 8f1ebf9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-qv2ray-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions docs/Run_Linux.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## Linux 安装

### Debian 系发行版

使用 Debian 系发行版时,推荐使用 .deb 包安装:

```shell
sudo apt install ./nekoray-*-linux64.deb
```

安装完成后,桌面快捷方式启动自带参数 `-appdata`,如果想要直接启动并使用之前的配置,注意附带本参数。

### 其他发行版

下载 .zip 文件,解压到合理的路径,开箱即用。具体使用方法见下文。

或者使用 AUR `nekoray-git`

## Linux 运行

**使用 Linux 系统相信您已具备基本的排错能力,
Expand Down
41 changes: 41 additions & 0 deletions libs/package_debian.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8f1ebf9

Please sign in to comment.