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.
- 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.
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.
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.
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.
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.
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
--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.
- 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>