param([string]$Python = 'python') $ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot Set-Location -LiteralPath $root & ./launcher/Build-Launcher.ps1 if ($LASTEXITCODE -ne 0) { throw 'Launcher build failed.' } New-Item -ItemType Directory -Force -Path dist | Out-Null & $Python ./installer/package.py ./dist if ($LASTEXITCODE -ne 0) { throw 'Packaging failed.' } $compiler = Join-Path $env:WINDIR 'Microsoft.NET/Framework64/v4.0.30319/csc.exe' & $compiler /nologo /target:winexe /reference:System.Windows.Forms.dll /reference:System.Drawing.dll /reference:System.Core.dll /reference:Microsoft.CSharp.dll /reference:System.IO.Compression.dll /reference:System.IO.Compression.FileSystem.dll /resource:dist/payload.zip,payload.zip /out:dist/BLOCKLINE-Setup.exe (Join-Path $PSScriptRoot 'Setup.cs') (Join-Path $PSScriptRoot 'EngineBootstrap.cs') if ($LASTEXITCODE -ne 0) { throw 'Setup build failed.' } Get-FileHash -Algorithm SHA256 dist/BLOCKLINE-Setup.exe,dist/BLOCKLINE-Mac.zip | Format-Table