Build the desktop app with the Wails build tags
A plain go build of a Wails app starts, shows 'Wails applications will not build without the correct build tags' and exits. That is what the first Windows install of v0.4.4-demo saw. -tags desktop,production is what wails build passes; both build paths pass it now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KGcjxF1cNLcuwc3DAPcnfj
This commit is contained in:
@@ -71,7 +71,7 @@ Push-Location (Join-Path $root "desktop")
|
|||||||
# from brand/loyaly-icon-512.png), and `wails build` would add a second copy
|
# from brand/loyaly-icon-512.png), and `wails build` would add a second copy
|
||||||
# of both and fail the link with duplicate resources.
|
# of both and fail the link with duplicate resources.
|
||||||
$env:CGO_ENABLED = "0"
|
$env:CGO_ENABLED = "0"
|
||||||
go build -ldflags "-H windowsgui -X main.version=$Version" -o (Join-Path $root "desktop\build\bin\Behavision.exe") .
|
go build -tags desktop,production -ldflags "-H windowsgui -X main.version=$Version" -o (Join-Path $root "desktop\build\bin\Behavision.exe") .
|
||||||
if ($LASTEXITCODE -ne 0) { throw "desktop build failed" }
|
if ($LASTEXITCODE -ne 0) { throw "desktop build failed" }
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ fi
|
|||||||
step "1. Desktop app (Wails, pure-Go Windows target)"
|
step "1. Desktop app (Wails, pure-Go Windows target)"
|
||||||
(cd desktop/frontend && npm run build >/dev/null)
|
(cd desktop/frontend && npm run build >/dev/null)
|
||||||
rm -rf "$STAGE" && mkdir -p "$STAGE/engine-src"
|
rm -rf "$STAGE" && mkdir -p "$STAGE/engine-src"
|
||||||
(cd desktop && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath \
|
# -tags desktop,production is what `wails build` passes; without them the
|
||||||
|
# binary starts, shows "Wails applications will not build without the correct
|
||||||
|
# build tags" and exits. Measured on the first Windows install of v0.4.4-demo.
|
||||||
|
(cd desktop && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -tags desktop,production \
|
||||||
-ldflags "-H windowsgui -s -w -X main.version=$TAG" -o "../$STAGE/Behavision.exe" .)
|
-ldflags "-H windowsgui -s -w -X main.version=$TAG" -o "../$STAGE/Behavision.exe" .)
|
||||||
|
|
||||||
step "2. Agent and setup tool"
|
step "2. Agent and setup tool"
|
||||||
|
|||||||
Reference in New Issue
Block a user