Repository navigation
make_game: keep gta6rt.sh packaged mode active when extra loader flags are passed - #7019
SkippySteve wants to merge 2 commits into
Conversation
…s are passed Co-authored-by: Cursor <cursoragent@cursor.com>
|
Tested c008082 merged with main 8575d36 on Linux/Python 3.12.16: pass Commands run (merged worktree,
Diff read: the launcher now scans its arguments (one of |
|
Tested c008082 on Ubuntu 24.04 (Python 3.12.3), generating
AI-assisted (Claude Code). |
--log (from ItsNotRexed#7329) takes a value; without it in the launcher's value list the file name counted as an image and packaged defaults were dropped. Relative --log paths now resolve against the caller's cwd like --trace.
|
Thanks @GeremC — fixed in f34b826. Test: |
|
Could someone take a fresh, independent look at the current head f34b826? The earlier passes (@kapitche's merge test and @GeremC's Ubuntu run) were on The only change since then is the Suggested check:
Merge order with #7329, which is still open and adds |
|
Tested Fresh check on updated head
AI-assisted. |
|
Thanks @hcampbell98, that was a thorough check. The negative controls that drop |
|
Tested f34b826 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
Claim: #6910 (comment)
wine_launcher()generated agta6rt.shthat only entered packaged mode when$# -eq 1. Passing any extra loader option alongside--dry-run,--init, or--run— such asgta6rt.sh --run --trace-d3d12,gta6rt.sh --run --trace boot.jsonl,gta6rt.sh --init --trace-d3d12, orgta6rt.sh --run -- <game args>— bypassedgame_path.txt,./$image,--overlay,LEONIDA_SHADERSrelocation, andLEONIDA_D3D12=vulkan, causinggta6rt.exeto exit 2 with usage because no<image>was provided.Change
make_game.py(wine_launcher()): scan positional arguments before--(respectinggta6rt.exe's value-taking flags--trace,--game-dir,--overlay,--mods,--view-mode-getter,--archetype-lookup). Packaged mode now activates whenever exactly one mode flag (--dry-run,--init, or--run) is present, no explicit<image>argument was passed, and no value-taking flag is missing its argument.<image>path is supplied (e.g.,gta6rt.sh --run other.exe -- ...), when multiple modes are passed, when a value-taking flag lacks its value, or when a mode flag appears only after--.--trace,--overlay,--mods, and--game-dir(before--) toZ:<caller_pwd>/<arg>beforecding into the game package so relative paths stay anchored to the caller's working directory instead of writing into the read-only package folder. Absolute Unix paths (/*), Windows drive paths ([A-Za-z]:*), UNC paths (\\*), and empty strings are left unchanged.--overlay "Z:$here/overlay"when the caller already supplied--overlay, and insert./$image(and default--overlay) before"$@"(keeping a leading mode flag first so the bare-mode argument order is unchanged) so-- <game args>stays at the end.README.md: note that extra loader options such as--trace-d3d12,--trace FILE, and-- <game args>work in packaged mode and an explicit executable path bypasses packaged defaults.tests/test_make_game_platform.py: addtest_wine_launcher_packaged_mode_with_extra_flagscovering--trace-d3d12, relative and absolute--trace/--mods/--overlay/--game-dirpaths (with spaces, quotes, and$HOMEin directory names), non-path value flags,-- <game args>, mode flag after another option, and pass-through cases (explicit image, two modes, dangling value flag, mode after--).Note on open PR #4213: #4213 adds
--protonhandling right afterhere=...and updates the finalexecline without modifying the packaged-mode block; both changes compose cleanly once--protonshifts itself before the scan loop.Tested
Linux (Omarchy/Arch), Python 3.14,
/bin/shandbash --posix. Synthetic fixtures only; no game files or GPU used.make_game.pychange, the newtest_wine_launcher_packaged_mode_with_extra_flagsfailed on all packaged multi-arg cases (7 failures).python3 -m compileall -q make_game.py tools testsandpython3 -I make_game.py --help: clean.python3 -I tests/test_make_game_platform.py: 45/45 OK.sh -nandbash --posix -non the generatedgta6rt.sh: OK.tests/test_make_game_*.pyandtests/test_docs_cli_flags.py: OK (excepttests/test_make_game_resume.py, which has a pre-existingFakeProc.pollerror onmainunrelated towine_launcher).AI-assisted (Gemini 4 Neon, via Cursor).