diff --git a/fpcurator.py b/fpcurator.py index 9d912b8..df9a9ad 100644 --- a/fpcurator.py +++ b/fpcurator.py @@ -39,6 +39,7 @@ def toggle_console(): import datetime import functools import pyperclip + import pathlib import googletrans import qfile import glob @@ -222,8 +223,8 @@ def toggle_console(): # This uuid uniquely defines fpcurator. (there is a 0 on the end after the text) UUID = '51be8a01-3307-4103-8913-c2f70e64d83' -TITLE = "fpcurator v1.6.1" -ABOUT = "Created by Zach K - v1.6.1" +TITLE = "fpcurator v1.6.2" +ABOUT = "Created by Zach K - v1.6.2" VER = 6 SITES_FOLDER = "sites" @@ -283,7 +284,16 @@ def __init__(self): self.minsize(695, 650) self.title(TITLE) - self.iconphoto(True, tk.PhotoImage(file="icon.png")) + try: + filepath = pathlib.Path(__file__) + icons = [*filepath.parent.glob("**/icon.png")] + if len(icons) > 0: + self.iconphoto(True, tk.PhotoImage(file=icons[0])) + else: + self.iconphoto(True, tk.PhotoImage(file="icon.png")) + except Exception as e: + fpclib.debug('Could not find fpcurator icon', 1, pre='[ERR] ') + self.protocol("WM_DELETE_WINDOW", self.exit_window) # Cross-window variables diff --git a/pyproject.toml b/pyproject.toml index 06f14e4..bf7868d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fpcurator" -version = "1.6.1" +version = "1.6.2" description = "fpcurator is a Python and fpclib powered tool for downloading urls, auto-generating curations, bulk searching for already curated games, and listing tags/platforms/games/animations for Flashpoint." authors = ["mathgeniuszach "] readme = "README.md" diff --git a/scripts/__init__.py b/scripts/__init__.py index 845b7ad..d7725a4 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -33,12 +33,13 @@ def update_defs(): def build(): clean() os.system(f'pyinstaller fpcurator.py --onedir' + #' --upx-dir=upx' + - f' --add-data="icon.png{os.pathsep}icon.png"' + + f' --add-data="icon.png{os.pathsep}."' + f' --add-data="{tkinter.__path__[0]}{os.pathsep}tkinter"' + f' --add-data="{tkinterweb.__path__[0]}{os.pathsep}tkinterweb"' + f' --add-data="{PIL.__path__[0]}{os.pathsep}PIL"') def clean(): rmpycache() + rm(PROJECT_DIR / "fpcurator.spec") rm(PROJECT_DIR / "build") rm(PROJECT_DIR / "dist") \ No newline at end of file