Robust config search and ZIP packaging
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user