Commit Graph

38 Commits

Author SHA1 Message Date
62fc1ac866 make_game: resolve a relative WINE before entering the game folder 2026-11-29 04:04:54 +00:00
371d8556f9 Merge pull request #1528 from kawaii-shakal/input-out-of-the-box
make_game, gameinput: controller, keyboard and mouse input out of the box (INPUT-OUT-OF-THE-BOX)
2026-11-29 04:36:04 +01:00
5d7ac1ee5e Merge pull request #1233 from IlyassRS3/carry/old-10028-wine-relative-path
make_game: gta6rt.sh resolves a relative WINE before changing to the game folder (OLD-10028)
2026-11-29 01:53:56 +01:00
ab95ff8427 Merge upstream main into PR #1528 2026-11-28 13:59:13 +00:00
dda535e1c5 Add CrossOver bottle support to the generated runtime launcher 2026-11-25 18:24:22 +02:00
d4d969a1fd make_game, gameinput: controller, keyboard and mouse input out of the box (INPUT-OUT-OF-THE-BOX)
A build made with make_game.py on Windows had no input at all. The runtime
stage ran scripts/build_runtime.ps1 without -FetchSdl3, so on a machine without
an installed SDL3 the GameInput shim was not built. gta6rt then logged "served
without SDL3 (no devices)", and a connected DualSense or Xbox pad did nothing.

- make_game.py: the Windows runtime stage passes -FetchSdl3 (the pinned SDL3
  3.4.20, SHA-256 checked by CMake). --no-sdl3 leaves the download out. The
  docstring's "what it downloads" sentence names it.
- gameinput: LEONIDA_KEYBOARD_PAD defaults to the focused mode, so a player
  without a pad still has the keyboard and mouse. Keys count only while the
  game window has focus. "off" or "0" removes the pad.
- gameinput_test: the other cases set LEONIDA_KEYBOARD_PAD=off, as they count
  only their own virtual pads. The keyboard pad case checks the new default.
- docs/gameinput.md: default and make_game behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 08:31:50 +05:00
bb2cd5a9e2 test_make_game_platform: compare realpath for relative WINE check on macOS 2026-11-24 21:38:37 +01:00
4a056a66c7 make_game: gta6rt.sh resolves a relative WINE before changing to the game folder 2026-11-24 21:38:05 +01:00
28c5b70b1b tests: compare the Wine launcher's physical paths with realpath
test_wine_first_boot_uses_the_packaged_game_and_shader_paths runs on
POSIX only and three assertions failed on macOS: gta6rt.sh resolves its
own path with readlink -f and lets cd settle the game directory, so the
runtime sees /private/var/... while the test expected /var/... (macOS
keeps the temporary directory behind a symlink). The expectations are
now realpath'd, which is a no-op on Linux and on Windows.

(cherry picked from commit 93f77743581ec6ca2a41c4ccadfcf68033f12bfd)
2026-11-24 03:30:40 +02:00
9f669b362f Reject directories at runtime installation file paths (#6734)
Squash-merged after diff review of PR #6734 - make_game: Reject directories at runtime installation file paths
2026-11-23 10:05:10 -06:00
c646bf8367 Speed up make_game by overlapping stages and showing progress. (#1797)
Squash-merged after diff review of PR #1797
2026-11-23 09:32:22 -06:00
b7e81bc555 Linux: launch the installed game with its shader catalog and overlay (#5477)
Squash-merged after review of PR #5477 - Linux: launch the installed game with its shader catalog and overlay
2026-11-23 08:09:33 -06:00
29f4d4d93c Merge pull request #4400 from Vonsek
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:14:22 -05:00
a33cf4cf3f Merge pull request #4333 from ligmaSec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:13:40 -05:00
d4ea397d8d Merge pull request #3930 from Maraco91
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:38 -05:00
214054a339 Require an executable pipeline checker on POSIX 2026-11-23 01:13:54 +00:00
a6f6f054c5 Load the packaged shader directory on Wine and Windows 2026-11-23 00:53:11 +00:00
b763d04d2b make_game: start Windows PowerShell by its full path for the runtime stage
The runtime stage ran scripts/build_runtime.ps1 through the bare name
"powershell". CreateProcess searches System32 but not
System32\WindowsPowerShell\v1.0, so on a PC whose PATH no longer lists
that folder the stage ended in a FileNotFoundError traceback, after the
shader and asset stages had already run.

windows_powershell() returns the file under %SystemRoot%, and the bare
name where the file is not at its usual place.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 23:32:11 +01:00
813e63318d Merge pull request #3328 from bobcatchris 2026-11-22 17:01:25 -05:00
94d402f410 Merge pull request #3250 from desamodeth 2026-11-22 15:16:11 -05:00
a8b76ea638 Merge pull request #3073 from desamodeth 2026-11-22 15:14:34 -05:00
b616525c28 Pipelines: refuse an empty or unreadable translated shader index 2026-11-22 14:07:47 -06:00
cc1d9926ef runtime: honor the Windows build job limit from make_game
BUILD-952

AI-assisted-by: Codex Astra 6.2 High
2026-11-22 22:52:23 +03:00
adf687993d Merge upstream main into the Windows pipeline checker fix
Keep the pipeline crash-recovery code and the upstream translated-shader preflight while resolving the checker path once per selected runtime build.
2026-11-22 16:27:33 -03:00
4537c6b9c2 make_game: print a usable first-load diagnostic command
BUILD-887

AI-assisted-by: Codex Astra 6.2 High
2026-11-22 22:17:12 +03:00
a00b5f3fc5 build: reuse the supplied Windows Vulkan pipeline checker
Resolve the optional checker beside the supplied Windows runtime files before looking in the local build, and use the same choice during preflight and the pipeline stage. Preserve native Linux checker selection.

AI-assisted.
2026-11-22 13:14:02 -03:00
05686f15a4 Pipelines stage: a module that takes vk_pipeline_check down is skipped and the rest is still checked
Since dcd8ecf the two #881/#884 giants pass spirv-val and are back in the corpus. On NVIDIA the larger one runs the
driver's compiler out of memory (LLVM ERROR: out of memory, exit 0x80000003), vk_pipeline_check dies with it, and the
pipelines stage stops: on @VeTkN's RTX 5070 (#884, c603b8f) about 5,750 pipelines after it were never checked or
cached, and make_game.py exited 1.

vk_pipeline_check:
- --inflight-file F keeps the names of the modules being compiled in F. It is rewritten when a module over
  --large-module-bytes starts or finishes (those compile alone, #903, so F then names exactly that module), by the 5 s
  watchdog for the others, and emptied at the end of the pass.
- --skip-file F: modules named in F are not compiled; each is reported as `MODULE CRASH <name> (<stage>, killed the
  driver in an earlier run; not retried)` and counted as a failed pipeline, as --isolate does on POSIX. --isolate
  passes it on to its children. A missing F is a usage error (exit 2).

make_game.py, pipelines stage:
- runs the checker with --inflight-file. When it exits other than 0, 1 or 2 (a crash, not Ctrl+C), the modules in
  the in-flight file are added to pipeline_crashes.txt and the checker runs again with --skip-file; what was already
  compiled comes back from pipeline_cache.bin (checkpointed every 10 minutes). If several modules were compiling, each
  is tried alone (--start/--count in the checker's name-sorted index) and only those that crash alone are skipped.
- a crash no module can be named for is not retried, nor is Ctrl+C, and there are at most 5 restarts.
- the stage still fails when anything failed, now after checking everything else, and names the modules that took
  the driver down. pipeline_crashes.txt is cleared at the start of each pipelines stage, so a module gets a fresh
  chance after a translator change.
- run() takes check=False and returns the exit code.

The --isolate child-process mode stays POSIX-only; with a multi-GB pipeline cache per child it is too heavy for the
default path. A memory cap for the checker on Windows, so the OOM doesn't take other programs down, is a follow-up.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24:
- tests/test_make_game_pipelines.py: 6 new cases (a named crasher is skipped and the rest checked; several in flight
  are tried alone and only the crasher is skipped; no suspect or Ctrl+C is not retried; the retry limit; a clean run is
  one call and an old skip list is dropped). All 14 test_make_game*.py files pass.
- end to end on 62 real compute modules from my own copy's work folder (2 over 4 MiB), through make_game.pipelines:
  with VK_PIPELINE_CHECK_SIMULATE_CRASH on one large module, the first run died (exit 3), the in-flight file named
  that module, the second run checked the other 61 (all ok) and saved the cache, and the stage failed naming it.
  Without the hook: one call, 62/62, exit 0. The in-flight file is empty after a clean pass.
No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:58:37 -05:00
302f925cc3 make_game: a redirected console must not kill --find on an un-encodable path
Windows encodes a redirected stdout (make_game.py > build.log) with the console's ANSI code page, and
`python -I` ignores PYTHONUTF8, so when a found dump's path holds a character outside that code page (a
Cyrillic, Greek or CJK user name in the profile it sits under), print() raised UnicodeEncodeError and
--find / auto-discovery ended in a traceback. stderr escapes such characters (backslashreplace); stdout
was strict. cli() now reconfigures stdout with errors="replace", so the listing prints '?' where the
code page has no glyph. Interactive consoles already write Unicode and are unaffected.

The regression test runs the real `make_game.py --find` as a child process over a synthetic dump (empty
probe files with the manifest sizes, no game data) under a private-use character no ANSI code page maps:
fails before the fix on every Windows locale, passes after, and passes on UTF-8 systems either way.
2026-11-22 03:08:37 -08:00
204989e9e7 make_game: --jobs reaches the Ogg Opus step; --runtime-build may be the output folder
- assets: awc_opus.py was started without --jobs, so with --jobs 1 the bank export still ran half the CPU count
  of processes (audio_wav.py, the next step, did get it).
- runtime: with --runtime-build pointing at the output folder (a runtime build unpacked where the port goes),
  shutil.copy2 raised SameFileError and the stage stopped before game_path.txt and the launcher were written.
  A file that is already the destination is left as it is.

Tests: one in test_make_game_argparse.py and three in test_make_game_platform.py; one of each fails on the old
code.
2026-11-22 10:00:48 +00:00
a65a039cfd make_game.py: pass the versioned LLVM tools to CMake as full paths
CMake keeps the archiver and resource compiler given on the command line as
bare names (CMAKE_AR=llvm-lib-23), so a build folder configured from a
versioned set still needed those names on PATH: once a static library had to
be archived again, the runtime stage failed. The overrides are now the
resolved paths, so every entry in the cache is absolute.
2026-11-22 02:36:02 -07:00
961792cd8e make_game.py: read the cross-build's tools from CMake's compiler files
CMake keeps a toolchain-chosen compiler in CMakeFiles/<version>/
CMakeCXXCompiler.cmake, not in CMakeCache.txt, so every runtime/build/windows
configured with the plain names went unrecognised: with only a versioned set
left on PATH, preflight passed and the build failed after the long stages.
Preflight now reads the configured tools from those files and requires each
to resolve, else it says to restore them or delete the folder.

The plain names win only when their clang-cl is 19 or newer, so an old default
no longer hides a complete newer versioned set. A mixed set names the missing
versioned tool. The overrides go to every configure until the folder records
its tools, which also covers a folder whose first configure failed.
2026-11-22 02:34:50 -07:00
5e9f17c6b3 make_game.py: accept versioned LLVM tools for the Linux cross-build
Distributions that install LLVM as clang-cl-21, lld-link-21 and so on (Debian,
Ubuntu) were reported as having none of the five tools, so the runtime stage
was dropped or refused. Preflight now accepts the newest full set with one
version suffix and passes it to a new build folder as the toolchain's
CMAKE_<var> overrides (docs/testing.md). A runtime/build/windows whose cached
compiler still exists needs no tools on PATH: it keeps what it was configured
with.
2026-11-22 02:27:17 -07:00
273886db50 make_game.py: build the runtime stage on Linux with clang-cl and xwin
Off Windows the runtime stage refused to run without --runtime-build. It now
cross-builds gta6rt.exe and gta6rt_tls_host.dll into runtime/build/windows
with runtime/cmake/clang-cl-xwin.cmake (XWIN_DIR, or ~/.local/share/xwin-sdk
as in docs/testing.md), then packages them with the Wine launcher as before.

Preflight lists what the cross-build lacks (cmake, the LLVM tools, clang-cl
older than 19, an xwin splat without VC/Tools/MSVC or Windows Kits um/x64)
and then configures it, so any toolchain error stops the run before the
shader stage. Without the tools the default stages still leave runtime out;
asking for it lists what is missing. The pipelines stage's vk_pipeline_check
is built natively into runtime/build/linux at the end of preflight, for the
same reason.
2026-11-22 01:36:05 -07:00
05afb6ff82 tests/test_make_game_platform: mock sys.version_info in RuntimeBuildPreflightTest
RuntimeBuildPreflightTest::test_runtime_off_windows_passes_with_a_complete_build
errored under Python 3.11.9 because make_game.preflight checks
sys.version_info < (3, 12) and RuntimeBuildPreflightTest.preflight did not
patch it. Also assert the missing-TLS-host failure names
gta6rt_tls_host.dll.

AI-assisted
2026-11-22 06:48:10 +00:00
6eaf8b6fa8 make_game: runtime stage on Linux with --runtime-build and a Wine launcher
--runtime-build DIR takes a Windows build of runtime/ (gta6rt.exe and
gta6rt_tls_host.dll, e.g. the Runtime workflow's runtime-windows
artifact) instead of building it. Off Windows the runtime stage then
runs instead of failing: it copies both files into --out and writes
gta6rt.sh, which starts gta6rt.exe with wine (or $WINE). Without the
option nothing changes. Preflight checks the folder before any work.
README: Running the loader on Linux.
2026-11-22 02:39:10 +00:00
f951282368 Build: package the runtime TLS host DLL 2026-11-22 02:39:44 +01:00
f74528bc64 Honor explicitly requested build stages on Linux 2026-11-21 20:43:13 -03:00
c73e25f4b7 make_game.py on Linux: leave the Windows-only runtime stage out by default, refuse it up front, find the Linux vk_pipeline_check
- Without --stages, runtime (Windows only for now) is left out off Windows.
  Before, the default build ran shaders and assets (hours) and then failed
  in runtime, so pipelines never ran.
- Asked for explicitly off Windows, preflight() refuses it before any work.
- pipelines finds vk_pipeline_check where CMake builds it off Windows
  (runtime/build/linux as in the README, or runtime/build as in
  CONTRIBUTING.md) instead of only vk_pipeline_check.exe, and says how to
  build it when it is missing. Windows is unchanged.
- tests/test_make_game_platform.py (9 tests, 6 fail before this change);
  test_make_game_preflight.py's all-tools test asks for runtime only on
  Windows, since it is now refused elsewhere.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:48:41 +01:00