Fixed app icon error; created .pkg

This commit is contained in:
Thomas Wilczynski 2025-11-22 14:56:29 -08:00
commit 4fea9596f9

View file

@ -52,6 +52,20 @@ def save_json_file(filepath, data, raw=False):
json.dump(data, f, sort_keys=True, indent=None if raw else 2)
except Exception as error:
raise error
def get_icon_file():
"""Attempts to return a valid icon file."""
if os.name == "nt":
path = ""
try:
path = sys._MEIPASS # For PyInstaller
except Exception:
path = os.path.dirname(os.path.abspath(__file__))
return pathlib.Path(path).parent.parent / "icon.ico"
else:
path = os.path.dirname(os.path.abspath(__file__))
return pathlib.Path(path).parent.parent / "icon.svg"
def parse_dir(path="", ignore_mkdir=False):
"""Converts and creates a directory (can be full file path)."""