#Requires -Version 5.1 param( [switch]$SkipTests ) $ErrorActionPreference = "Stop" $Root = Split-Path -Parent $PSScriptRoot Set-Location $Root Write-Host "Building posprint for Windows (x64)..." if (-not $SkipTests) { cargo test if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } cargo build --release if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } $exe = Join-Path $Root "target\release\posprint.exe" if (-not (Test-Path $exe)) { Write-Error "Build failed: $exe not found" } Write-Host "OK: $exe" Get-Item $exe | Select-Object FullName, Length, LastWriteTime