2024-07-21 12:44:14 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-07-28 15:09:13 -07:00
|
|
|
arch=$(uname -m)
|
2024-07-28 15:19:12 -07:00
|
|
|
distDir=navpoint-linux-$arch
|
2024-07-21 12:44:14 -07:00
|
|
|
|
2024-07-28 15:19:12 -07:00
|
|
|
rm -rf dist/$distDir
|
|
|
|
mkdir -p dist/$distDir
|
2024-07-21 12:44:14 -07:00
|
|
|
|
|
|
|
pyinstaller -w -F --hidden-import tornado.web main.py
|
|
|
|
|
2024-07-28 15:19:12 -07:00
|
|
|
mv dist/main dist/$distDir/navpoint
|
|
|
|
cp icon.png dist/$distDir/navpoint.png
|
2024-07-21 12:44:14 -07:00
|
|
|
|
2024-07-28 15:19:12 -07:00
|
|
|
cat > dist/$distDir/navpoint.desktop << HERE
|
2024-07-21 12:44:14 -07:00
|
|
|
[Desktop Entry]
|
|
|
|
Type=Application
|
|
|
|
Terminal=false
|
|
|
|
Name=Navpoint
|
|
|
|
Exec=/bin/sh -c "$HOME/.local/bin/navpoint"
|
|
|
|
Icon=navpoint
|
2024-07-28 15:14:28 -07:00
|
|
|
Categories=Application;Network
|
2024-07-21 12:44:14 -07:00
|
|
|
StartupWMClass=navpoint
|
|
|
|
HERE
|
|
|
|
|
2024-07-28 15:19:12 -07:00
|
|
|
cat > dist/$distDir/install.sh << HERE
|
2024-07-21 12:44:14 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
binary_target=~/.local/bin/
|
|
|
|
desktop_target=~/.local/share/applications/
|
|
|
|
icon_target=~/.local/share/icons/
|
|
|
|
|
2024-07-28 15:11:49 -07:00
|
|
|
mkdir -p \$binary_target \$desktop_target \$icon_target
|
|
|
|
|
2024-07-21 12:44:14 -07:00
|
|
|
cp navpoint \$binary_target/navpoint
|
|
|
|
chmod +x \$binary_target/navpoint
|
|
|
|
|
|
|
|
cp navpoint.desktop \$desktop_target/navpoint.desktop
|
|
|
|
|
|
|
|
cp navpoint.png \$icon_target/navpoint.png
|
|
|
|
HERE
|
2024-07-28 15:19:12 -07:00
|
|
|
chmod +x dist/$distDir/install.sh
|
|
|
|
|
|
|
|
cd dist
|
2024-07-21 12:44:14 -07:00
|
|
|
|
|
|
|
tar -czf $distDir.tar.gz $distDir
|