|
|
$ErrorActionPreference = "Stop" |
|
|
|
|
|
|
|
|
$projectPath = Join-Path $PSScriptRoot "..\WpfEditor\EchoDict.csproj" |
|
|
$publishDir = Join-Path $PSScriptRoot "..\WpfEditor\bin\Release\net8.0-windows\win-x64\publish" |
|
|
|
|
|
|
|
|
Write-Host "Publishing EchoDict..." |
|
|
dotnet publish $projectPath -c Release -r win-x64 --self-contained false -o $publishDir |
|
|
|
|
|
if ($LASTEXITCODE -ne 0) { |
|
|
Write-Error "Publish failed with exit code $LASTEXITCODE" |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Write-Host "Building MSI Installer..." |
|
|
dotnet build (Join-Path $PSScriptRoot "Setup.wixproj") -c Release |
|
|
|
|
|
if ($LASTEXITCODE -ne 0) { |
|
|
Write-Error "WiX Build failed with exit code $LASTEXITCODE" |
|
|
} |
|
|
|
|
|
Write-Host "Build Complete. MSI should be in bin\Release\" |
|
|
|