mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-25 18:05:12 -04:00
a8ea6c93d0
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.
15 lines
604 B
PowerShell
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
|