From 393295c4b5e6c9c033bed92a292b46ba8f2ef77d Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Thu, 7 Nov 2024 16:29:58 +0100 Subject: [PATCH] fix: embedded icon into source file for wheel. --- .github/workflows/package.yml | 4 +- gamepadla_plus/gui.py | 12 +- gamepadla_plus/icon.py | 14 ++ icon/gamepadla-plus-loading.svg | 335 ++++++++++++++++++++++++++++++++ icon/gamepadla-plus.png | Bin 10900 -> 0 bytes 5 files changed, 352 insertions(+), 13 deletions(-) create mode 100644 gamepadla_plus/icon.py create mode 100644 icon/gamepadla-plus-loading.svg delete mode 100644 icon/gamepadla-plus.png diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 5b8bae5..2390b12 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -57,9 +57,7 @@ jobs: --collect-all gamepadla_plus --add-data "LICENSE.txt;." --add-data "THIRD-PARTY-LICENSES.txt;." - --add-data "icon/gamepadla-plus.ico;icon/." - --add-data "icon/gamepadla-plus.png;icon/." - --hide-console hide-late + --hide-console hide-late --noupx --icon .\icon\gamepadla-plus.ico .\gamepadla_plus\__main__.py diff --git a/gamepadla_plus/gui.py b/gamepadla_plus/gui.py index 4f7acba..250f099 100644 --- a/gamepadla_plus/gui.py +++ b/gamepadla_plus/gui.py @@ -16,15 +16,9 @@ test_execution, wrap_data_for_server, read_license, - project_root_path, ) - -def get_icon_path() -> str: - if platform == "win32": - return project_root_path() + "icon/gamepadla-plus.ico" - else: - return project_root_path() + "icon/gamepadla-plus.png" +from gamepadla_plus.icon import ICON def error_popup(msg: str): @@ -231,9 +225,7 @@ def gui(): ], ] - window = sg.Window( - "Gamepadla+", layout, finalize=True, size=(400, 560), icon=get_icon_path() - ) + window = sg.Window("Gamepadla+", layout, finalize=True, size=(400, 560), icon=ICON) def update_joysticks(): nonlocal joysticks diff --git a/gamepadla_plus/icon.py b/gamepadla_plus/icon.py new file mode 100644 index 0000000..b175d96 --- /dev/null +++ b/gamepadla_plus/icon.py @@ -0,0 +1,14 @@ +# The following the base64 encoded Icon of Gamepadla+. +# Gamepadla+ Icon © 2024 by Adam McKellar is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International. +# To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ +ICON = b""" +iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAACXBIWXMAAAdhAAAH +YQGVw7i2AAAAMFBMVEVHcEwHBwfazcWkmZHf0ccuLi3PwbeupqHn2M1dXFyHgn8f +HRtWT0vz49f+7+P//PLeA3SRAAAADXRSTlMA/fgXnPde/cb8+3k8ABcpMwAAAPZJ +REFUKM9jYBg4YAwimBH8jLsaHR0dd68YQPks797eBYJ77y5ABfL+vgMLzPrBwHAA +JKA/MRao5N7dWe8SuAVAhr0VFAcJTP0r3sAtYAAyIlAIKHC/XGnRb0FBYQYGpnu3 +9IEKHr2P/PeMWxiowvbu+//T/96bGKv09gbYjNy7d7VmrnskKP737juwLb13796a +VXcPaNC9XyAFDEAnvF/+9951vbtvQ6fKAG0FO/LuXaBzv659P4eBgQ0ocMUFCJzu +Xf1UfxUscAniK7+rn9ZBBC5DPflV/3012IwEqC+vh6uD3XENFi72qrtBFA9MAQNz +At3iCADRbX5yYfCbsQAAAABJRU5ErkJggg== +""" diff --git a/icon/gamepadla-plus-loading.svg b/icon/gamepadla-plus-loading.svg new file mode 100644 index 0000000..ee4934e --- /dev/null +++ b/icon/gamepadla-plus-loading.svg @@ -0,0 +1,335 @@ + + + +Gamepadla+ Icon with Loading ScreenXABYLoading ApplicationGamepadla+ Icon with Loading Screen07.11.2024Adam McKellar diff --git a/icon/gamepadla-plus.png b/icon/gamepadla-plus.png deleted file mode 100644 index 69e08c9a5759642e367e744601d77ebcc66dd55b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10900 zcmdT~g;!MV*S#YkDhepwNOwz0cMjblJxI4hj?yjNjda5Z(jYC}jf60Ccm3x5FTQWB zJL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