""" PyInstaller runtime hook — normalize frozen paths before application imports. """ import os import sys if getattr(sys, "frozen", False): os.environ.setdefault("GODCWAK_FROZEN", "1") # Ensure the exe directory is on PATH for any subprocess helpers. exe_dir = os.path.dirname(sys.executable) if exe_dir and exe_dir not in os.environ.get("PATH", ""): os.environ["PATH"] = exe_dir + os.pathsep + os.environ.get("PATH", "")