From f1779ec9e4ad09fc55527f30cbffad34f9648c4c Mon Sep 17 00:00:00 2001 From: chrg6 Date: Mon, 9 Nov 2026 09:48:29 -0500 Subject: [PATCH] Refresh the translator beside the game before the shader step prepares shaders. The compile step copies the kit's translator next to the game, but a kit that changes only the translator runs the shader step alone (its step key holds the translator's identity), which then prepared with the old copy. From the local fixes package (fix 9); its translator build guard is in main already. Co-Authored-By: Claude Opus 5.5 --- tools/make_game.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/make_game.py b/tools/make_game.py index e19a1d1e..cdbca71a 100644 --- a/tools/make_game.py +++ b/tools/make_game.py @@ -1129,6 +1129,14 @@ def step_shaders(out): """Every shader of the game files into the game's shader cache and the driver's own cache, before the first start. Its output is read as it comes: the counts nx2navi.exe prints become progress events, the other lines go on to the log, and while nothing moves an event every few seconds keeps saying the step is running and for how long.""" + # The game translates with the copy beside it. The compile step refreshes that copy, but a kit that changes only + # the translator runs this step again alone (step_key), which would then prepare with the old one. Only a kit that + # has one: the compile step, which always runs first, stops a build without it. + for d in (KIT / 'bin', KIT / 'build' / 'xlate'): + if (d / XLATE_NAME).is_file(): + for name in (XLATE_NAME, 'nx2navi_xlate.id'): + copy_if_changed(d / name, out / name) + break cmd = [sys.executable, '-u', str(KIT / 'tools' / 'prepare_shaders.py'), str(out), '--romfs', str(out / 'romfs'), '--exefs', str(out / 'exefs'), '--no-list', '--exe', EXE_NAME] proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, encoding='utf-8',