Repository navigation
gta6rt: a --game-dir that is not a folder is the usage error (EGEN-GTA6RT-GAMEDIR-NOT-DIR) - #8729
evilclanker9000 wants to merge 2 commits into
Conversation
…A6RT-GAMEDIR-NOT-DIR) A --game-dir naming a file, or a path that does not exist, was accepted: the loader mapped only the image, the package's DLLs were never found, and --dry-run still exited 0 with "1 module(s) mapped, 92 unimplemented import(s)" (the package folder gives 5 modules and 20). A mistyped path therefore read as a clean dry run. Now it prints "error: --game-dir is not a folder: <path>" and exits 2 before the image is opened, in every mode. The default (the image's own folder) always exists, so no valid invocation changes. Regression: runtime/test/check_game_dir_folder.cmake (CTest entry gta6rt_game_dir_not_a_folder), which builds a text file and two folders itself and needs no game files.
|
Independent build + test: PASS (one message regression) AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo. GPU (not used): NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124. Head
Message regression when Suggested fix: run the check only when |
|
Tested
Attribution, same build tree, only
So the fix belongs in this PR: have Everything else: full build clean for the touched files, This is separate from the message regression @MartinIndra02 reported above; that run did not include the whole suite. No game files used. AI-assisted (Claude Code). |
Two regressions from the previous commit, both reported on the pull request: A mistyped image path with no --game-dir blamed the option: the folder checked was the default (the image's own folder), so 'gta6rt --dry-run F:\nosuchdir\game.exe' printed 'error: --game-dir is not a folder: F:\nosuchdir' and exited 2, where main prints 'error: cannot open F:\nosuchdir\game.exe' and exits 1. Only a folder the user names is checked now; the default stays the loader's own cannot-open. run_tiny_game_console_paths passed --game-dir game-Igra without creating it, relying on the loader only having to report the path. The test creates its folder now, so it still checks what it is for (both UTF-8 paths on the console) instead of the new check. The check's own test gains the default case: an image path that does not exist with no --game-dir must exit 1 without '--game-dir is not a folder'.
|
Tested
AI-assisted (Claude Code). |
|
Follow-up on the two reports above, pushed as
The message regression (MartinIndra02). The check also ran on the default folder, so a mistyped image path blamed an option the user never passed. Only an explicit Before/after on one build tree (Windows 11, MSVC 14.44, Ninja RelWithDebInfo;
The retail copy is unaffected: AI-assisted: yes. |
|
One more result on |
Claimed in the coordination issue as: EGEN-GTA6RT-GAMEDIR-NOT-DIR
(#8504 (comment))
What and why
A
--game-dirthat is a file, or a path that does not exist, was accepted. The loader then mapped only theimage, the package's DLLs were never found, and
--dry-runstill exited 0 with a clean-looking report:gta6rt --dry-run <retail image>--game-dir <a file>1 module(s) mapped, 92 unimplemented import(s)error: --game-dir is not a folder: <path>--game-dir <a path that does not exist>1 module(s) mapped, 92 unimplemented import(s)--game-dir <the package>5 module(s) mapped, 20 unimplemented import(s)So a mistyped
--game-dirread as a clean dry run: the first report a first boot reads (docs/boot.md) lookedfine while the package was never touched.
--game-dirmust now be a folder that exists; anything else printserror: --game-dir is not a folder: <path>and exits 2 before the image is opened, in every mode, the same shapeas the existing
--tracerefusal. The default (left out: the image's own folder) always exists, so no validinvocation changes. The check opens no file: the regression test stands in a text file for the image and the check
stops before the loader reads it.
Tested
Windows 11, MSVC 14.44.35207 (VS 2022 Build Tools), Ninja,
RelWithDebInfo, worktree at867d922f0(upstream/main), build folder
Z:\Claude\Leonida-build\deepseek9\wt-gamedir\runtime\build; own retail 1.0.2.1copy, no GPU work, nothing executed from the image.
Before (binary built from bare
upstream/main867d922f0) and after, the same commands:The last line is the positive control: a folder the loader can use is not refused; the run goes on to the image.
Negative control:
cmake -DLOADER=<main-built gta6rt> -P runtime/test/check_game_dir_folder.cmakefails withgta6rt accepted a --game-dir that is not a folder,returned 1,not an MZ image; with the new build the samecommand exits 0.
The regression is the CTest entry
gta6rt_game_dir_not_a_folder(runtime/test/check_game_dir_folder.cmake),which builds its inputs itself (a text file and two folders, no game files). The neighbouring CLI tests on the same
build:
python -I scripts/check_no_game_data.pyon the four changed files: exit 0.First stop that remains: unchanged. On
867d922f0a real--runof the retail executable ends in the title's ownint3during static initialisers (code 0x80000003 at <exe>+0x5a91c21), withGetProcAddress(xgameruntime.dll, XErrorReport): not servedon stderr and no D3D12 call, i.e. the missing flatXErrorReportexport that #5312/#6582 add. This PR claims only the loader command line.Related, not blocking: #7708 records whether
--game-diris a folder in the startup trace and warns for--initand
--run; this PR refuses a--game-dirthat is not a folder in every mode,--dry-runincluded.AI-assisted: yes
Tag: SHAYDERRR
Checklist
docs/design.md, with how it was confirmed. (no translatorchange)