upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/build_runtime.ps1
diff options
context:
space:
mode:
authordesamodeth <desamodeth@gmail.com>2026-11-22 22:52:23 +0300
committerdesamodeth <desamodeth@gmail.com>2026-11-22 22:52:23 +0300
commitcc1d9926ef1a3f6ab510e002efe3e05ef70d57de (patch)
tree8c23434232bd38f70e2c840160629e4d3d599021 /scripts/build_runtime.ps1
parent162821017ea3c286c8bec860f3ff94f037912061 (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.ps19
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.
5param([switch]$Debug, [switch]$FetchSdl3) 5param(
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
11if (-not $vs) { throw "Visual Studio with the C++ x64 tools wasn't found." } 15if (-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"