-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
27 lines (22 loc) · 833 Bytes
/
Copy pathbuild.ps1
File metadata and controls
27 lines (22 loc) · 833 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
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $projectRoot
python -m PyInstaller `
--noconfirm `
--clean `
--onefile `
--windowed `
--name SpeedTray `
--icon "$projectRoot\assets\SpeedTray.ico" `
--version-file "$projectRoot\packaging\version_info.txt" `
--distpath "$projectRoot\release" `
--workpath "$projectRoot\build" `
--specpath "$projectRoot\build" `
"$projectRoot\SpeedTray.pyw"
if ($LASTEXITCODE -ne 0) {
throw "PyInstaller failed with exit code $LASTEXITCODE"
}
$hash = (Get-FileHash -Algorithm SHA256 -LiteralPath release\SpeedTray.exe).Hash.ToLowerInvariant()
"$hash SpeedTray.exe" | Set-Content -Encoding ascii release\SHA256SUMS.txt
Write-Host "Built release\SpeedTray.exe"
Write-Host "SHA-256: $hash"