diff --git a/exe_setup.py b/exe_setup.py index 895fdfc..6241566 100644 --- a/exe_setup.py +++ b/exe_setup.py @@ -6,7 +6,7 @@ "excludes": ["pytest", "PyQt6", "PyQt5", "cv2", "numpy", "mypy", "test", "email", "pydoc_data", "multiprocessing", "rubicon"], "packages": ["pyautogui", "pyperclip", "attrs", "pynput"], "include_msvcr": True, - "include_files": ["autosmx.png"], + "include_files": ["autosmx.png", "src/img"], } bdist_mac = {"iconfile": "autosmx.ico", "bundle_name": "AutoSMX"} diff --git a/src/img/sm_incident_tab.png b/src/img/sm_incident_tab.png index 9925d67..e14f115 100644 Binary files a/src/img/sm_incident_tab.png and b/src/img/sm_incident_tab.png differ diff --git a/src/popups/CalibrationHelpPopup.py b/src/popups/CalibrationHelpPopup.py index a4259ef..47447c7 100644 --- a/src/popups/CalibrationHelpPopup.py +++ b/src/popups/CalibrationHelpPopup.py @@ -1,16 +1,20 @@ +import os +import sys from tkinter import Message, Misc, ttk from PIL import Image, ImageTk from popups.Popup import Popup +_APPLICATION_PATH = os.path.dirname(sys.executable) + class CalibrationHelpPopup(Popup): def __init__(self, master: Misc | None, image_name: str): width = 360 super().__init__(master, "Calibration Help", width=width) - img = Image.open(f"src/img/{image_name}.png") + img = Image.open(f"{_APPLICATION_PATH}/img/{image_name}.png") img = img.resize((width, 500), resample=Image.LANCZOS) img = ImageTk.PhotoImage(img) # type: ignore panel = ttk.Label(self, image=img) # type: ignore