Files
psxrecomp/tools/update_cmake.ps1
T
Claude a8ea6c93d0 Scaffold: expose recomp-net headers; add tools/update_cmake.{sh,ps1}
main.cpp includes recomp_net/host_relay.h unconditionally, so offline
(PSX_NETPLAY=OFF) game builds fail with 'No such file'. Add a managed
recomp-net-headers block to CMakeLists.txt.in and an idempotent
update_cmake tool (py core + .sh/.ps1 wrappers) to sync existing projects.
2026-10-03 17:17:30 +00:00

15 lines
604 B
PowerShell

# update_cmake.ps1 — sync a game project's CMakeLists.txt with the scaffold
# template's managed blocks (implementation: tools/update_cmake.py).
# Usage: update_cmake.ps1 [--project DIR] [--check] [--dry-run]
$ErrorActionPreference = 'Stop'
$Root = Split-Path -Parent $PSScriptRoot
$Py = $env:PYTHON
if (-not $Py) {
foreach ($c in 'python3', 'python', 'py') {
if (Get-Command $c -ErrorAction SilentlyContinue) { $Py = $c; break }
}
}
if (-not $Py) { Write-Error 'update_cmake: python not found on PATH'; exit 1 }
& $Py (Join-Path $Root 'tools/update_cmake.py') @args
exit $LASTEXITCODE