Files
skate-3-rust-engine/scripts/Ensure-WindowsSdk.ps1
T
Ethanw05andCursor 821f523bb8 Fix MP air launch NaNs, solid modding, and Windows release packaging.
Sanitize non-finite SIMD lanes in offboard air selection, add solid dynamics and mod replication APIs, improve setup refresh without re-extracting assets, and harden Build-Release.ps1 for older PowerShell hosts.

Co-authored-by: Cursor <[email protected]>
2026-09-11 12:24:42 -06:00

31 lines
1.2 KiB
PowerShell

# Locate rc.exe for skate-game icon embedding. Debug and release builds share build.rs.
$ErrorActionPreference = 'Stop'
if ($env:RC -and (Test-Path -LiteralPath $env:RC)) { return }
if (-not ${env:ProgramFiles(x86)}) {
$fallback = 'C:\Program Files (x86)'
if (Test-Path -LiteralPath $fallback) {
${env:ProgramFiles(x86)} = $fallback
}
}
if (-not ${env:ProgramFiles(x86)}) {
throw 'ProgramFiles(x86) is not set and C:\Program Files (x86) was not found. Run from a normal Command Prompt or install the Windows SDK.'
}
$sdkBin = Join-Path ${env:ProgramFiles(x86)} 'Windows Kits\10\bin'
if (-not (Test-Path -LiteralPath $sdkBin)) {
throw "Windows 10 SDK not found at $sdkBin. Install it with Visual Studio (Desktop development with C++) or the standalone Windows SDK."
}
$rc = Get-ChildItem -LiteralPath $sdkBin -Directory |
Sort-Object Name -Descending |
ForEach-Object { Join-Path $_.FullName 'x64\rc.exe' } |
Where-Object { Test-Path -LiteralPath $_ } |
Select-Object -First 1
if (-not $rc) {
throw "Windows SDK resource compiler (rc.exe) not found under $sdkBin. Install the Windows 10 SDK build tools or set RC to rc.exe."
}
$env:RC = $rc