Robust config search and ZIP packaging

This commit is contained in:
joel
2026-07-20 18:14:19 +02:00
parent eb222dd2ca
commit cb13fd8d2b
2 changed files with 27 additions and 5 deletions
+6 -5
View File
@@ -23,11 +23,12 @@ def _load_app_info():
try:
# Finde config.json relativ zum Skript oder im PyInstaller Bundle
if getattr(sys, "frozen", False):
if platform.system() == "Darwin":
# Path(sys.executable) ist fcco-Converter.app/Contents/MacOS/executable
base_dir = Path(sys.executable).parent.parent.parent.parent
else:
base_dir = Path(sys.executable).parent
# Suche ausgehend von der Executable aufwärts nach config.json
base_dir = Path(sys.executable).parent
while base_dir.name and str(base_dir) != base_dir.root:
if (base_dir / "config.json").exists():
break
base_dir = base_dir.parent
else:
base_dir = Path(__file__).parent.parent