secondvoice/run_build.ps1
2025-11-23 16:57:44 +08:00

25 lines
707 B
PowerShell

# Script to build and run SecondVoice
Write-Host "Building SecondVoice..." -ForegroundColor Cyan
# Get script directory
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $scriptDir
# Execute build script
& cmd /c .\build_mingw.bat
if ($LASTEXITCODE -eq 0) {
Write-Host "`nBuild successful! Launching application..." -ForegroundColor Green
# Check for executable
if (Test-Path "build\mingw-Release\SecondVoice.exe") {
Set-Location "build\mingw-Release"
& .\SecondVoice.exe
} else {
Write-Host "Executable not found at expected location" -ForegroundColor Red
}
} else {
Write-Host "`nBuild failed!" -ForegroundColor Red
exit 1
}