diff options
| author | desamodeth <desamodeth@gmail.com> | 2026-11-22 22:52:23 +0300 |
|---|---|---|
| committer | desamodeth <desamodeth@gmail.com> | 2026-11-22 22:52:23 +0300 |
| commit | cc1d9926ef1a3f6ab510e002efe3e05ef70d57de (patch) | |
| tree | 8c23434232bd38f70e2c840160629e4d3d599021 /scripts/build_runtime.ps1 | |
| parent | 162821017ea3c286c8bec860f3ff94f037912061 (diff) | |
runtime: honor the Windows build job limit from make_game
BUILD-952
AI-assisted-by: Codex Astra 6.2 High
Diffstat (limited to 'scripts/build_runtime.ps1')
| -rw-r--r-- | scripts/build_runtime.ps1 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/build_runtime.ps1 b/scripts/build_runtime.ps1 index b251a281c..05888dea7 100644 --- a/scripts/build_runtime.ps1 +++ b/scripts/build_runtime.ps1 | |||
| @@ -1,8 +1,12 @@ | |||
| 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 by default. |
| 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. |
| 5 | param([switch]$Debug, [switch]$FetchSdl3) | 5 | param( |
| 6 | [switch]$Debug, | ||
| 7 | [switch]$FetchSdl3, | ||
| 8 | [ValidateRange(1, 2147483647)][int]$jobs = [Math]::Max(1, [int]([Environment]::ProcessorCount / 2)) | ||
| 9 | ) | ||
| 6 | $ErrorActionPreference = "Stop" | 10 | $ErrorActionPreference = "Stop" |
| 7 | 11 | ||
| 8 | $root = Split-Path $PSScriptRoot -Parent | 12 | $root = Split-Path $PSScriptRoot -Parent |
| @@ -10,7 +14,6 @@ $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer" | |||
| 10 | $vs = & "$installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | 14 | $vs = & "$installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath |
| 11 | if (-not $vs) { throw "Visual Studio with the C++ x64 tools wasn't found." } | 15 | if (-not $vs) { throw "Visual Studio with the C++ x64 tools wasn't found." } |
| 12 | $vcvars = Join-Path $vs "VC\Auxiliary\Build\vcvars64.bat" | 16 | $vcvars = Join-Path $vs "VC\Auxiliary\Build\vcvars64.bat" |
| 13 | $jobs = [Math]::Max(1, [int]([Environment]::ProcessorCount / 2)) | ||
| 14 | 17 | ||
| 15 | $src = Join-Path $root "runtime" | 18 | $src = Join-Path $root "runtime" |
| 16 | $out = Join-Path $src "build" | 19 | $out = Join-Path $src "build" |