Compare commits
No commits in common. "0b0708f704ac5c5128354ccea537099e293bd0fe" and "3b95d2a8fe2c6c87d27972ed9e78d8713726b653" have entirely different histories.
0b0708f704
...
3b95d2a8fe
|
@ -1,20 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
arch=$(uname -m)
|
||||
distName=navpoint-linux-$arch
|
||||
distDir=navpoint-linux-$arch
|
||||
|
||||
rm -rf dist/$distName-bundle
|
||||
mkdir -p dist/$distName-bundle
|
||||
rm -rf dist/$distDir
|
||||
mkdir -p dist/$distDir
|
||||
|
||||
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
|
||||
pyinstaller -w -F --hidden-import tornado.web main.py
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
cat > dist/$distName-bundle/navpoint.desktop << HERE
|
||||
cat > dist/$distDir/navpoint.desktop << HERE
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Terminal=false
|
||||
|
@ -25,7 +24,7 @@ Categories=Application;Network
|
|||
StartupWMClass=navpoint
|
||||
HERE
|
||||
|
||||
cat > dist/$distName-bundle/install.sh << HERE
|
||||
cat > dist/$distDir/install.sh << HERE
|
||||
#!/bin/sh
|
||||
|
||||
binary_target=~/.local/bin/
|
||||
|
@ -41,8 +40,8 @@ cp navpoint.desktop \$desktop_target/navpoint.desktop
|
|||
|
||||
cp navpoint.png \$icon_target/navpoint.png
|
||||
HERE
|
||||
chmod +x dist/$distName-bundle/install.sh
|
||||
chmod +x dist/$distDir/install.sh
|
||||
|
||||
cd dist
|
||||
|
||||
tar -czf $distName-bundle.tar.gz $distName-bundle
|
||||
tar -czf $distDir.tar.gz $distDir
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pyinstaller -i=icon.ico --windowed --onefile --hidden-import tornado.web --add-data icon.ico:files --add-data README.md:files --add-data GPL-3.0.txt:files --add-data CC-BY-SA-4.0.txt:files --name=navpoint.exe main.py
|
||||
pyinstaller -i=icon.ico --windowed --onefile --hidden-import tornado.web --add-data icon.ico:files --name=navpoint.exe main.py
|
||||
"C:\Program Files (x86)\NSIS\makensis.exe" .\windows_installer.nsi
|
||||
move "dist\navpoint.exe" "dist\navpoint-windows-%PROCESSOR_ARCHITECTURE%-portable.exe"
|
||||
move "dist\NavpointInstaller.exe" "dist\navpoint-windows-%PROCESSOR_ARCHITECTURE%-installer.exe"
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
import webbrowser
|
||||
import tempfile
|
||||
import time
|
||||
import markdown
|
||||
import navpoint.fix_path
|
||||
|
||||
|
||||
def about():
|
||||
with open(navpoint.fix_path.fix_path("README.md")) as f:
|
||||
readme = markdown.markdown(
|
||||
f.read()
|
||||
.replace("https://www.gnu.org/licenses/gpl-3.0.en.html", "#gpl")
|
||||
.replace("https://creativecommons.org/licenses/by-sa/4.0/", "#cc")
|
||||
)
|
||||
|
||||
with open(navpoint.fix_path.fix_path("GPL-3.0.txt")) as f:
|
||||
gpl = f.read()
|
||||
|
||||
with open(navpoint.fix_path.fix_path("CC-BY-SA-4.0.txt")) as f:
|
||||
cc = f.read()
|
||||
|
||||
with tempfile.NamedTemporaryFile("w+") as f:
|
||||
f.write(
|
||||
f"""\
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Navpoint Desktop</title>
|
||||
</head>
|
||||
<body>
|
||||
<a id="top"></a>{readme}
|
||||
<h3 id="gpl">GNU General Public License v3.0</h3>
|
||||
<pre>{gpl}</pre>
|
||||
<p><a href="#top">Back to top</a></p>
|
||||
<h3 id="cc">Creative Commons Attribution-ShareAlike 4.0 International</h3>
|
||||
<pre>{cc}</pre>
|
||||
<p><a href="#top">Back to top</a></p>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
)
|
||||
f.flush()
|
||||
webbrowser.open(f.name)
|
||||
time.sleep(0.5) # Give the browser time to open the file
|
|
@ -4,7 +4,6 @@ import navpoint.fix_path
|
|||
import navpoint.local_server
|
||||
import navpoint.phone_server
|
||||
import navpoint.usb
|
||||
import navpoint.about
|
||||
|
||||
|
||||
def run():
|
||||
|
@ -34,12 +33,6 @@ def run():
|
|||
window, text="Phone running Navpoint Mobile", command=_mobile_clicked
|
||||
)
|
||||
mobile_button.pack()
|
||||
ttk.Separator(window, orient="horizontal").pack()
|
||||
ttk.Label(window, text="Navpoint is free and open-source.").pack()
|
||||
about_button = ttk.Button(
|
||||
window, text="About Navpoint", command=navpoint.about.about
|
||||
)
|
||||
about_button.pack()
|
||||
|
||||
try:
|
||||
window.iconbitmap(navpoint.fix_path.fix_path("icon.ico"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user