From 0b0708f704ac5c5128354ccea537099e293bd0fe Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Sun, 28 Jul 2024 16:13:50 -0700 Subject: [PATCH] Standalone Linux build --- build-linux.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/build-linux.sh b/build-linux.sh index 6715977..d3e8701 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -1,19 +1,20 @@ #!/bin/sh arch=$(uname -m) -distDir=navpoint-linux-$arch +distName=navpoint-linux-$arch -rm -rf dist/$distDir -mkdir -p dist/$distDir +rm -rf dist/$distName-bundle +mkdir -p dist/$distName-bundle pyinstaller -w -F --hidden-import tornado.web --add-data README.md:files --add-data GPL-3.0.txt:files --add-data CC-BY-SA-4.0.txt:files main.py -mv dist/main dist/$distDir/navpoint -cp icon.png dist/$distDir/navpoint.png -cp GPL-3.0.txt CC-BY-SA-4.0.txt dist/$distDir/ -pandoc -s --metadata "title=Navpoint Desktop" README.md | grep -v 'h1 id="navpoint-desktop"' > dist/$distDir/README.html +cp dist/main dist/$distName-standalone +mv dist/main dist/$distName-bundle/navpoint +cp icon.png dist/$distName-bundle/navpoint.png +cp GPL-3.0.txt CC-BY-SA-4.0.txt dist/$distName-bundle/ +pandoc -s --metadata "title=Navpoint Desktop" README.md | grep -v 'h1 id="navpoint-desktop"' > dist/$distName-bundle/README.html -cat > dist/$distDir/navpoint.desktop << HERE +cat > dist/$distName-bundle/navpoint.desktop << HERE [Desktop Entry] Type=Application Terminal=false @@ -24,7 +25,7 @@ Categories=Application;Network StartupWMClass=navpoint HERE -cat > dist/$distDir/install.sh << HERE +cat > dist/$distName-bundle/install.sh << HERE #!/bin/sh binary_target=~/.local/bin/ @@ -40,8 +41,8 @@ cp navpoint.desktop \$desktop_target/navpoint.desktop cp navpoint.png \$icon_target/navpoint.png HERE -chmod +x dist/$distDir/install.sh +chmod +x dist/$distName-bundle/install.sh cd dist -tar -czf $distDir.tar.gz $distDir +tar -czf $distName-bundle.tar.gz $distName-bundle