Repository navigation
gta6rt: GAME: and the overlay are absolute, so a bare image name has a game folder - #2957
Conversation
…a game folder `gta6rt --run game.exe`, started from the game folder, set the game folder to the image's parent path, which is empty for a bare name: the run printed `console paths: GAME: -> , writes -> overlay` and every GAME: open failed with ERROR_PATH_NOT_FOUND. A relative --game-dir or --overlay worked only until the title changed its current directory. main.cpp now makes both absolute at startup (keeping the path as given if absolute() fails). New CTest run_tiny_game_dir: tiny_game's opt-in `game-file` check moves its current directory, then reads GAME:\tiny_game_probe.txt; check_game_dir.cmake runs it by bare name and with `--game-dir .`. Without the fix both fail (open errors 3 and 2); with it both pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Small nit: the new header comment in AI-assisted review (diff inspection; the Windows runtime was not built here). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
Not tested: Wine/Linux, a relative |
|
Tested
This fixes the bare-image-name case I hit on #2750 ( AI-assisted (Claude Code). No game files. |
|
Independently tested One diagnostic issue: with a Cyrillic folder name the stdout line from the existing |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Confirmed at |
…est_docs_cli_flags FORK.md: boot-prep is upstream main 3faac55 + ItsNotRexed#2861, ItsNotRexed#1895, fork/first-boot and gdk-offline-classes (ItsNotRexed#3476, after its merge of main). ItsNotRexed#2218, ItsNotRexed#2784, ItsNotRexed#2594, ItsNotRexed#2839, ItsNotRexed#2954, ItsNotRexed#2957, ItsNotRexed#2750, ItsNotRexed#2833 and our ItsNotRexed#3455 are upstream now; fork/first-boot and gdk-runtime-calls are gone, so the fork-only files are carried as a patch when boot-prep is rebuilt. gta6rt now seeds its VkPipelineCache from the pipeline_cache.bin beside it when the header matches the device. tests/test_docs_cli_flags.py failed on boot-prep only: FORK.md, merged from fork/first-boot, quotes git commands, and the test wants every --flag in a Markdown page to appear in a source file. git's flags join FOREIGN, next to gh's and pip's (fork-only line). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Item: new RT item, claimed in #2716 (claim). Found while testing #2750. That PR's
run_tiny_gdk_loadfails for this reason, and passes unchanged once this is merged (details in my comment there).What was wrong
runtime/src/main.cppsetgame_dir = image.parent_path()when--game-dirwas not given. For a bare image name, such asgta6rt --run game.exestarted from the game folder, that path is empty. The run printedconsole paths: GAME: -> , writes -> overlayand everyGAME:open failed withERROR_PATH_NOT_FOUND. A relative--game-diror--overlayworked only until the title calledSetCurrentDirectory. After that,GAME:and the overlay pointed somewhere else.The change
main.cppmakes the game folder (given, or the image's folder) and--overlayabsolute at startup. Ifstd::filesystem::absolutefails, the path stays as given. Absolute paths behave as before.run_tiny_game_dir(runtime/test/check_game_dir.cmake) writestiny_game_probe.txtnext totiny_game.exeand runs it twice, in its own folder: once by bare name, once with--game-dir .. The fixture's new opt-ingame-fileargument moves the current directory to%TEMP%, then readsGAME:\tiny_game_probe.txt. The script checks the guest's verdict, an absoluteGAME:and overlay in theconsole pathsline, and exit 0. As incheck_loaded_gdk.cmake, it checks the printed output rather than trusting the exit status alone.docs/runtime_imports.md: one sentence under theGAME:rules.Tested
On Windows 11 Pro 26300, MSVC 19.44 (VS 2022 Build Tools), Ninja RelWithDebInfo via
scripts/build_runtime.ps1, Vulkan SDK 1.4.363.0, at77444fa0(then rebased onto16282101, which touches only docs).main.cppchange,run_tiny_game_dirfails both ways: bare nameGAME: -> ,, open error 3;--game-dir .GAME: -> ., open error 2 once the current directory has moved. With the change, it passes.ctest -j1, 122/122, on the default Vulkan device and withLEONIDA_VK_DEVICE=Radeon. The second is the Ryzen 7 9800X3D's RDNA2 iGPU, driver 32.0.21042.62; the PC also has an RTX 5080 (621.14). No GPU code is touched.check_loaded_gdk.cmakechange and its--game-dir-free command line, its fixture passes once the game folder is absolute (tested by hand above).I didn't run it under Wine. The script uses the same
RUNNERpattern ascheck_loaded_gdk.cmake, and the regex accepts either a drive letter or a leading slash for the root.No game files. AI-assisted (Claude Code).
Checklist
docs/design.md(n/a: no translator change).🤖 Generated with Claude Code