Update path for iamges to work correctly on windows

This commit is contained in:
jknapp 2025-03-16 09:00:02 -07:00
parent a18f51858a
commit 8a2c467930
3 changed files with 3 additions and 3 deletions

BIN
dist/mp-server.exe vendored

Binary file not shown.

View File

@ -17,7 +17,7 @@ class MacroPadServer:
self.root.geometry("800x600")
# Create the image Directory
self.images_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "macro_images")
self.images_dir = "macro_images"
os.makedirs(self.images_dir, exist_ok=True)
# Set dark theme colors
@ -171,7 +171,7 @@ class MacroPadServer:
# Load image if exists
if "image_path" in macro and macro["image_path"]:
try:
img_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), macro["image_path"])
img_path = macro["image_path"]
img = Image.open(img_path)
# Resize for display
img.thumbnail((64, 64)) # Keep aspect ratio for display

View File

@ -29,7 +29,7 @@ exe = EXE(
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,