Skip to content

Commit

Permalink
use devel icon in pyinstaller and pypi builds
Browse files Browse the repository at this point in the history
  • Loading branch information
j5155 committed May 28, 2024
1 parent 756d6bf commit df5b1a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion REVHubInterface.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ from PyInstaller.utils.hooks import collect_data_files
from setuptools_scm import get_version, _cli
_cli.main(["--force-write-version-files"])

datas = [('./REVHubInterface/org.unofficialrevport.REVHubInterface.png', '.')]
datas = [('./REVHubInterface/org.unofficialrevport.REVHubInterface.png', '.'),
('./REVHubInterface/org.unofficialrevport.REVHubInterface.Devel.png', '.')]
datas += collect_data_files('sv_ttk')
binaries = []
hiddenimports = []
Expand Down
3 changes: 2 additions & 1 deletion REVHubInterface/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,8 +1202,9 @@ def initwindow():
else:
icon = PhotoImage(file=Path(__file__).with_name('org.unofficialrevport.REVHubInterface.png'))
xroot.iconphoto(False, icon)
except TclError:
except TclError as e:
print("Icon loading failed!")
print(e)

app = Application(xroot)
xroot.protocol('WM_DELETE_WINDOW', app.joinThreads)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = { file = ["requirements.txt"] }
[tool.setuptools]
packages = ["REVHubInterface"]
[tool.setuptools.package-data]
REVHubInterface = ["org.unofficialrevport.REVHubInterface.png"]
REVHubInterface = ["org.unofficialrevport.REVHubInterface.png","org.unofficialrevport.REVHubInterface.Devel.png"]
[project.gui-scripts]
revhubinterface = "REVHubInterface.__main__:initwindow"
[tool.setuptools_scm]
Expand Down

0 comments on commit df5b1a0

Please sign in to comment.