From df5b1a047c94ef7259170e8cdb51728ec22c2c7f Mon Sep 17 00:00:00 2001 From: j5155 <54331556+j5155@users.noreply.github.com> Date: Tue, 28 May 2024 12:46:52 -0800 Subject: [PATCH] use devel icon in pyinstaller and pypi builds --- REVHubInterface.spec | 3 ++- REVHubInterface/__main__.py | 3 ++- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/REVHubInterface.spec b/REVHubInterface.spec index 01a821d..9d4c4a0 100644 --- a/REVHubInterface.spec +++ b/REVHubInterface.spec @@ -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 = [] diff --git a/REVHubInterface/__main__.py b/REVHubInterface/__main__.py index 448ce91..7e8c5a6 100644 --- a/REVHubInterface/__main__.py +++ b/REVHubInterface/__main__.py @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 55bdb8a..5504da4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]