Skip to content

make_game: the Linux cross-build passes LEONIDA_SDL3_FETCH on and warns when gta6rt.exe has no GameInput shim - #7554

Open
hcristosm wants to merge 1 commit into
ItsNotRexed:mainfrom
hcristosm:feat/linux-gameinput-sdl3
Open

hcristosm wants to merge 1 commit into
ItsNotRexed:mainfrom
hcristosm:feat/linux-gameinput-sdl3

Conversation

@hcristosm

Copy link
Copy Markdown

Claimed in the coordination issue: #7496 (#7496 (comment), new RT item, no ID).

AI-assisted (Claude).

What and why

On Linux, make_game.py --stages runtime cross-builds gta6rt.exe with clang-cl + xwin, and nothing in that path
builds the SDL3 GameInput shim: cross_configure cannot pass -DLEONIDA_SDL3_FETCH=ON, and when CMake finds no SDL3
it only prints a STATUS line that the build output buries. On Windows the loader falls back to the host's
GameInput.dll; under Wine there is none, so GameInputCreate fails and the retail executable stops on its result
(with #7216's #1 alias too: the alias needs the shim to point at).

  • sdl3_fetch_args(): -DLEONIDA_SDL3_FETCH=ON when LEONIDA_SDL3_FETCH is 1/true/yes/on. Nothing is
    downloaded unless asked, as before.
  • cross_build_runtime() warns at the end of the stage when the build has no gameinput_test target (CMake adds it
    only with the shim, under any generator), naming LEONIDA_SDL3_FETCH=1 and that an SDL3_DIR here must be a
    Windows build of SDL3.
  • docs/gameinput.md describes the Linux path.

Related: #7142 (the same stage and Vulkan headers; both add an argument to the same cmake_configure call, so one of
the two will need a one-line rebase) and #7347 (SDL3_FETCH configure under clang-cl where dumpbin is missing; this
machine configured without it). The Wine-only stop itself is documented by #7368 / #7383.

Tests

  • python -I tests/test_make_game_platform.py: 51 tests OK, 5 new in CrossBuildGameInputTest (true and false
    values, cross_configure forwards the flag and adds nothing without it, the warning with and without the target).
  • python -m compileall -q make_game.py tools tests and python -I make_game.py --help.
  • Real configure through cross_configure() into empty build folders on Linux Mint 22.3 (clang-cl 23.1.6, xwin SDK
    10.0.26100, CMake 3.28, Ninja): without the variable the shim is left out and the stage prints the warning after
    building gta6rt; with LEONIDA_SDL3_FETCH=1 SDL3 3.4.20 is fetched and the shim target is there.
  • Under Wine 9.0 with my own 1.0.2.1 copy, a gta6rt.exe with the shim gets past GameInputCreate; without it the
    title stops there. AMD RX 7600 XT, RADV (Mesa 25.2.8).

Not checked: Windows (this path runs only off Windows).

…ns when gta6rt.exe has no GameInput shim

Under Wine there is no host GameInput.dll, so a gta6rt.exe built without the SDL3
GameInput shim fails GameInputCreate and the retail executable stops on its result.
The cross-build gave no flag for the shim and CMake only prints a STATUS line when
it is left out.

cross_configure passes -DLEONIDA_SDL3_FETCH=ON when LEONIDA_SDL3_FETCH is set to a
true value (nothing is downloaded unless asked), and cross_build_runtime warns at the
end of the stage when the gameinput_test target, which CMake adds only with the
shim, is absent. docs/gameinput.md says so.

AI-assisted.
@rideinstead

Copy link
Copy Markdown

Tested on Windows 11, CPython 3.12.10, CPU-only, no game files (synthetic inputs only).

  • Head: 2cbfd00a9
  • python -I tests/test_make_game_platform.py: 51 tests, OK (2 skipped) in 9.66s. The 5 new CrossBuildGameInputTest cases are present.
  • python -I -m compileall -q make_game.py tests/test_make_game_platform.py: clean.
  • python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_platform.py docs/gameinput.md: exit 0.
  • git diff --check origin/main...HEAD: clean.

Caveats: I could only exercise the pure-Python helpers and the warning path with synthetic build dirs; I did not run a real clang-cl/xwin cross configure or Wine, so the gameinput_shim_built() detection against a real CMake tree is unverified here. The change adds no network calls on its own (sdl3_fetch_args only forwards the env var).

AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants