diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 17:22:43 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 17:22:43 +0100 |
| commit | 3d1dbf1cef8b9240cce69b2bcdba0c09ea0f1d5e (patch) | |
| tree | 5d84c2e541aa31bcf23d9921dde7e9cb92b2ac59 /scripts/build_runtime.ps1 | |
| parent | 2560485f76c45779ec93a2a6dc001c93211f7b3f (diff) | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
Merge main into test/coverage-gaps (#1299)
Conflicts: runtime/test/shaders/check.py, scripts/run_gpu_tests.py
AI-assisted.
Diffstat (limited to 'scripts/build_runtime.ps1')
| -rw-r--r-- | scripts/build_runtime.ps1 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/build_runtime.ps1 b/scripts/build_runtime.ps1 index e71bcfe27..b251a281c 100644 --- a/scripts/build_runtime.ps1 +++ b/scripts/build_runtime.ps1 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Builds runtime\build\gta6rt.exe with MSVC at BelowNormal priority, on half the cores. | 1 | # Builds runtime\build\gta6rt.exe with MSVC at BelowNormal priority, on half the cores. |
| 2 | # Uses VS's CMake + Ninja when the "C++ CMake tools" component is installed, otherwise calls cl.exe directly. | 2 | # Uses VS's CMake + Ninja when the "C++ CMake tools" component is installed, otherwise calls cl.exe directly. |
| 3 | # The GameInput controller shim (SDL3, docs/gameinput.md) is built only on the CMake path: with an installed SDL3, or | 3 | # The GameInput controller shim (SDL3, docs/gameinput.md) is built only on the CMake path: with an installed SDL3, or |
| 4 | # with -FetchSdl3, which lets CMake download the pinned SDL3 release. The cl.exe fallback never builds it. | 4 | # with -FetchSdl3, which lets CMake download the pinned SDL3 release. The cl.exe fallback never builds it. |
| @@ -58,8 +58,10 @@ if defined VULKAN_SDK cl /nologo /std:c++20 /EHsc /O2 /DWIN32_LEAN_AND_MEAN /DNO | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | # A .cmd file avoids cmd.exe's quote stripping on paths with spaces. | 60 | # A .cmd file avoids cmd.exe's quote stripping on paths with spaces. |
| 61 | # Switch to UTF-8 (CP 65001) before invoking CMake/Ninja/cl.exe so non-English MSVC /showIncludes prefixes | ||
| 62 | # (e.g. Spanish "Nota: inclusión del archivo:") match Ninja's msvc_deps_prefix instead of being mojibaked in OEM CP. | ||
| 61 | $bat = Join-Path $out "_build.cmd" | 63 | $bat = Join-Path $out "_build.cmd" |
| 62 | "@echo off`r`nset `"PATH=$installer;%PATH%`"`r`ncall `"$vcvars`" >nul || exit /b 1`r`n$body" | Set-Content -Encoding ascii $bat | 64 | "@echo off`r`nchcp 65001 >nul`r`nset `"PATH=$installer;%PATH%`"`r`ncall `"$vcvars`" >nul || exit /b 1`r`n$body" | Set-Content -Encoding ascii $bat |
| 63 | 65 | ||
| 64 | $p = Start-Process cmd.exe -ArgumentList "/c", "`"$bat`"" -NoNewWindow -PassThru | 66 | $p = Start-Process cmd.exe -ArgumentList "/c", "`"$bat`"" -NoNewWindow -PassThru |
| 65 | $null = $p.Handle # keeps the exit code readable after WaitForExit | 67 | $null = $p.Handle # keeps the exit code readable after WaitForExit |