9 lines
587 B
PowerShell
9 lines
587 B
PowerShell
# Builds bin\QuadCastMuteSync.exe with the C# compiler that ships with Windows (.NET Framework 4).
|
|||
|
|
$ErrorActionPreference = 'Stop'
|
||
|
|
$csc = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'
|
||
|
|
if (-not (Test-Path $csc)) { throw "csc.exe not found at $csc" }
|
||
|
|
$bin = Join-Path $PSScriptRoot 'bin'
|
||
|
|
New-Item -ItemType Directory -Force $bin | Out-Null
|
||
|
|
& $csc /nologo /target:winexe /optimize+ /platform:anycpu "/out:$bin\QuadCastMuteSync.exe" "$PSScriptRoot\src\QuadCastMuteSync.cs"
|
||
|
|
if ($LASTEXITCODE -ne 0) { throw "build failed" }
|
||
|
|
Write-Host "Built $bin\QuadCastMuteSync.exe"
|