-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_v3.ps1
More file actions
34 lines (28 loc) · 1010 Bytes
/
Copy pathbuild_v3.ps1
File metadata and controls
34 lines (28 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
param(
[switch]$Clean
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $Root
Write-Host "== FNAF Save Manager v3 build ==" -ForegroundColor Cyan
Write-Host "Python: $(python --version)"
Write-Host "PyInstaller: $(pyinstaller --version)"
if ($Clean) {
Write-Host "Cleaning previous build artifacts..." -ForegroundColor Yellow
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue build
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue dist
}
Write-Host "Building EXE..." -ForegroundColor Cyan
python -m PyInstaller --noconfirm --clean fnaf_save.spec
if ($LASTEXITCODE -ne 0) {
Write-Host "Build FAILED." -ForegroundColor Red
exit 1
}
$exe = Join-Path $Root "dist\fnaf_save_v3.exe"
if (Test-Path $exe) {
$size = [math]::Round((Get-Item $exe).Length / 1MB, 1)
Write-Host "Build OK: $exe ($size MB)" -ForegroundColor Green
} else {
Write-Host "EXE not found after build." -ForegroundColor Red
exit 1
}