28 lines
824 B
PowerShell
28 lines
824 B
PowerShell
# Build Anime Video Editor to exe (Windows)
|
|
# Run: .\build_exe.ps1
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
Set-Location $PSScriptRoot
|
|
|
|
Write-Host "Checking project dependencies..." -ForegroundColor Cyan
|
|
pip install -r requirements.txt -q
|
|
if (-not $?) { exit 1 }
|
|
Write-Host "Checking PyInstaller..." -ForegroundColor Cyan
|
|
pip show pyinstaller 2>$null | Out-Null
|
|
if ($LASTEXITCODE -ne 0) {
|
|
Write-Host "Installing PyInstaller..." -ForegroundColor Yellow
|
|
pip install pyinstaller
|
|
}
|
|
|
|
Write-Host "Building exe..." -ForegroundColor Cyan
|
|
pyinstaller --noconfirm AnimeVideoEditor.spec
|
|
|
|
if (Test-Path "dist\AnimeVideoEditor.exe") {
|
|
Write-Host ""
|
|
Write-Host "Done: dist\AnimeVideoEditor.exe" -ForegroundColor Green
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host "Build failed. Check output above." -ForegroundColor Red
|
|
exit 1
|
|
}
|