-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
20 lines (18 loc) · 1012 Bytes
/
Copy pathbuild.ps1
File metadata and controls
20 lines (18 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Windows resources (exe icon/manifest/version): generate .syso for go build to link.
# Requires the wails3 CLI; skipped when absent.
if (Get-Command wails3 -ErrorAction SilentlyContinue) {
Push-Location build
wails3 generate syso -arch amd64 -icon windows/icon.ico -manifest windows/wails.exe.manifest -info windows/info.json -out ../wails_windows_amd64.syso
Pop-Location
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
# Release build: no console window, production tag (devtools off, prod runtime)
# Output: bin/dsh-shell.exe
go build -tags production -ldflags "-s -w -H windowsgui" -o bin/dsh-shell.exe .
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host "built bin/dsh-shell.exe"
# Debug build: no console window (logs go to bin/data/.dsh-shell/dsh-shell.log).
# For live console output use: go build -o bin/dsh-shell-console.exe .
go build -ldflags "-H windowsgui" -o bin/dsh-shell-debug.exe .
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host "built bin/dsh-shell-debug.exe"