mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Keep the Steam shortcut from starting the game while the launcher runs a job in the game folder.
The Steam shortcut's --play runs before the window's single-instance lock and checked only whether the game was running. Started while the window rebuilt the game, installed an update or built the mods' code, it ran mods.prepare into the folder the job was reading and started the old ocarina.exe, and the job then failed at the swap with "ocarina.exe is in use" (an update's install left the new launcher on the old build); during the shaders step, make_game.py's own run of the exe made the shortcut log "already running" and do nothing visible. play_only now tries the launcher folder's lock and lets go of it at once: when another process holds it and data/job-running.json names a job (jobs.running_job, which leaves the marker in place), it logs that the launcher is busy, says which job to wait for in a message box and does not start the game. A marker that a stopped launcher left does not stop it, since its lock went with its process, and neither does the window open without a job. Not reproduced before the change in a game run: found by reading the code. Checks that passed: tests/launcher_test.py (216 tests, a new one for a held lock with the job's marker, a leftover marker with the lock free, and the window open without a job, which fails before the change) and tools/check_content.py --staged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,9 @@ Customize Launcher (on the home screen) makes the look the player's own:
|
||||
first and started again after. The shortcut runs the launcher's `pythonw.exe` on `data/steam_play.pyw`, which
|
||||
starts the launcher of `app/current.txt` with `--play`: the game starts as Play starts it, and the process waits
|
||||
for it, so Steam counts the game as running while it is. Its end goes into the logs as Play's does, and a fatal
|
||||
error or a crash gets a message box, as no window shows it.
|
||||
error or a crash gets a message box, as no window shows it. While the window or a command runs a job in the game
|
||||
folder (the launcher folder's lock is held and `data/job-running.json` names the job), it does not start the
|
||||
game, which would be the build that job is replacing, and a box says which job to wait for.
|
||||
|
||||
The choices are `theme`, `custom_background`, `custom_panel`, `custom_buttons`, `background`, `background_dim`,
|
||||
`animations` and `sounds` in `data/launcher.json`.
|
||||
|
||||
Reference in New Issue
Block a user