Compare commits
2 Commits
4bf6d6eb20
...
08231fde30
Author | SHA1 | Date | |
---|---|---|---|
08231fde30 | |||
bb4f87e5ed |
10
README.md
10
README.md
|
@ -24,11 +24,13 @@ connect to Navpoint Desktop.
|
||||||
## Licensing
|
## Licensing
|
||||||
|
|
||||||
Navpoint Desktop is released under the [GNU General Public License
|
Navpoint Desktop is released under the [GNU General Public License
|
||||||
v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), except the file
|
v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), except the files
|
||||||
`navpoint/get_ip.py`, which is released under [Creative Commons
|
`navpoint/get_ip.py` and `navpoint.fix_path`, which are released under
|
||||||
Attribution-ShareAlike 4.0
|
[Creative Commons Attribution-ShareAlike 4.0
|
||||||
International](https://creativecommons.org/licenses/by-sa/4.0/) due to use of
|
International](https://creativecommons.org/licenses/by-sa/4.0/) due to use of
|
||||||
[code published on Stack Overflow](https://stackoverflow.com/a/28950776).
|
code published on Stack Overflow
|
||||||
|
([`get_ip.py`](https://stackoverflow.com/a/28950776) and
|
||||||
|
[`fix_path.py`](https://stackoverflow.com/a/53605128)).
|
||||||
|
|
||||||
Navpoint Mobile is released under the [GNU General Public License
|
Navpoint Mobile is released under the [GNU General Public License
|
||||||
v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
pyinstaller -w -F --hidden-import tornado.web main.py
|
pyinstaller -i=icon.ico --windowed --onefile --hidden-import tornado.web --add-data icon.ico:files --name=navpoint-windows-%PROCESSOR_ARCHITECTURE%.exe main.py
|
||||||
move dist/main.exe dist/navpoint-windows-%PROCESSOR_ARCHITECTURE%.exe
|
|
||||||
|
|
||||||
|
|
BIN
icon.ico
BIN
icon.ico
Binary file not shown.
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 30 KiB |
16
navpoint/fix_path.py
Normal file
16
navpoint/fix_path.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Copyright 2018 Stack Overflow user "Kamal"
|
||||||
|
# Copyright 2024 Samuel Sloniker
|
||||||
|
#
|
||||||
|
# https://stackoverflow.com/a/53605128
|
||||||
|
#
|
||||||
|
# Used, modified, and released under CC BY-SA 4.0:
|
||||||
|
# https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
def fix_path(path):
|
||||||
|
if getattr(sys, 'frozen', False):
|
||||||
|
return os.path.join(sys._MEIPASS, "files", path)
|
||||||
|
else:
|
||||||
|
return path
|
|
@ -1,5 +1,6 @@
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
import pyqrcode
|
import pyqrcode
|
||||||
|
import navpoint.fix_path
|
||||||
|
|
||||||
|
|
||||||
def run(link):
|
def run(link):
|
||||||
|
@ -19,8 +20,8 @@ def run(link):
|
||||||
label.config(image=image)
|
label.config(image=image)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
window.iconbitmap("icon.ico")
|
window.iconbitmap(navpoint.fix_path.fix_path("icon.ico"))
|
||||||
except tk.TclError:
|
except ImportError:#tk.TclError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user