-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
37 lines (31 loc) · 1.12 KB
/
Copy pathbuild.ps1
File metadata and controls
37 lines (31 loc) · 1.12 KB
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
35
36
37
$ErrorActionPreference = "Stop"
python -m PyInstaller `
--noconfirm `
--clean `
--onefile `
--windowed `
--name RustPainter `
--icon RustPainterIcon.png `
--add-data "RustPainterIcon.png;." `
--add-data "assets/ui;assets/ui" `
--add-data "assets/signs;assets/signs" `
main.py
if ($LASTEXITCODE -ne 0) {
throw "PyInstaller failed with exit code $LASTEXITCODE"
}
$executable = Join-Path $PSScriptRoot "dist\RustPainter.exe"
if (-not (Test-Path -LiteralPath $executable)) {
throw "PyInstaller completed without creating $executable"
}
Write-Host "Built dist\RustPainter.exe"
$releaseDirectory = Join-Path $PSScriptRoot "release"
New-Item -ItemType Directory -Path $releaseDirectory -Force | Out-Null
$archive = Join-Path $releaseDirectory "RustPainter-Windows-x64.zip"
$releaseFiles = @(
$executable,
(Join-Path $PSScriptRoot "LICENSE"),
(Join-Path $PSScriptRoot "ADDITIONAL_TERMS.md"),
(Join-Path $PSScriptRoot "THIRD_PARTY_LICENSES.md")
)
Compress-Archive -LiteralPath $releaseFiles -DestinationPath $archive -Force
Write-Host "Packaged release\RustPainter-Windows-x64.zip"