From 864ea069965be2211c04114763e7ed98aeeb683e Mon Sep 17 00:00:00 2001 From: ske087 Date: Sun, 13 Sep 2026 10:15:26 +0300 Subject: [PATCH] Stop the runtime hook from planting a bundled config on first run _compy_bundled_resources() in the PyInstaller runtime hook copied config/app_config.json next to the .exe on first start. With the config no longer bundled (see the first-run setup commit) that copy would simply fail, but leaving the entry in place keeps the intent alive and would re-plant a stale config if the file were ever added back to the bundle. The hook now copies only the resource files (icons, intro video), and the comment explains why the config is deliberately absent: the player must start unconfigured so it asks the operator for the server details instead of inheriting the build machine's settings. --- windows/pyi_runtime_hook.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/windows/pyi_runtime_hook.py b/windows/pyi_runtime_hook.py index 9477482..cbce93c 100644 --- a/windows/pyi_runtime_hook.py +++ b/windows/pyi_runtime_hook.py @@ -110,13 +110,18 @@ def _setup_paths(): def _copy_bundled_resources(): - """Copy bundled resource/config files to the local folders on first run.""" + """Copy bundled resource files to the local folders on first run. + + NOTE: app_config.json is intentionally absent. It is not bundled (see + build.spec) because shipping it would plant the build machine's server + settings into a fresh install. The player instead starts unconfigured and + runs its first-run setup, writing a real config next to the .exe. + """ exe_dir = Path(sys.executable).parent internal_dir = Path(getattr(sys, '_MEIPASS', exe_dir)) # Files to copy (source in bundle -> destination next to .exe) files_to_copy = [ - ('config/app_config.json', 'config/app_config.json'), ('config/resources/access-card.png', 'config/resources/access-card.png'), ('config/resources/arrow.png', 'config/resources/arrow.png'), ('config/resources/backward.png', 'config/resources/backward.png'),