-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild_exe.ps1
More file actions
25 lines (18 loc) · 847 Bytes
/
Copy pathbuild_exe.ps1
File metadata and controls
25 lines (18 loc) · 847 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
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$python = Join-Path $projectRoot ".venv\Scripts\python.exe"
if (-not (Test-Path -LiteralPath $python)) {
Write-Host "Creating virtual environment..."
python -m venv (Join-Path $projectRoot ".venv")
}
Write-Host "Installing build dependencies..."
& $python -m pip install -r (Join-Path $projectRoot "requirements-build.txt")
Write-Host "Creating application icon..."
& $python (Join-Path $projectRoot "tools\create_icon.py")
Write-Host "Building PerfectPixel.exe..."
& $python -m PyInstaller --noconfirm --clean (Join-Path $projectRoot "PerfectPixel.spec")
$exe = Join-Path $projectRoot "dist\PerfectPixel.exe"
if (-not (Test-Path -LiteralPath $exe)) {
throw "Build finished without creating $exe"
}
Write-Host "Build complete: $exe"