nekoray_Mahdi-zarei/script/pack_debian.sh
Mahdi 70866e3d3c
Properly export debug info (#1060)
* enable core dump on linux

* prepare build flow for dumps

* extract debug info and strip the binary

* use msvc for windows builds

* use mingw for legacy windows

* fix cmake

* keep the pdb

* fix openssl root dir

* disable IPO

* remove debug info from qt build

* handle debug files correctly

* fix copy

* fix copy again

* clean up

* finalize
2025-12-30 02:25:26 -08:00

42 lines
918 B
Bash
Executable File

#!/bin/bash
set -e
version="$1"
mkdir -p Throne/DEBIAN
mkdir -p Throne/opt
cp -r linux-amd64 Throne/opt
mv Throne/opt/linux-amd64 Throne/opt/Throne
rm Throne/opt/Throne/Throne.debug
# basic
cat >Throne/DEBIAN/control <<-EOF
Package: Throne
Version: $version
Architecture: amd64
Maintainer: Mahdi Mahdi.zrei@gmail.com
Depends: desktop-file-utils
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
sudo chmod 0755 Throne/DEBIAN/postinst
# desktop && PATH
sudo dpkg-deb --build Throne