From 448fba8770071f00473bbc41f6da6b60b779c4a6 Mon Sep 17 00:00:00 2001 From: Suriyakumarvijayanayagam Date: Sat, 19 Sep 2026 15:13:43 +0530 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01KGcjxF1cNLcuwc3DAPcnfj --- installer/build.ps1 | 2 +- release.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/installer/build.ps1 b/installer/build.ps1 index b7b3fe5..c581bf0 100644 --- a/installer/build.ps1 +++ b/installer/build.ps1 @@ -71,7 +71,7 @@ Push-Location (Join-Path $root "desktop") # from brand/loyaly-icon-512.png), and `wails build` would add a second copy # of both and fail the link with duplicate resources. $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" } Pop-Location diff --git a/release.sh b/release.sh index 312b8e7..0e3e865 100755 --- a/release.sh +++ b/release.sh @@ -32,7 +32,10 @@ fi step "1. Desktop app (Wails, pure-Go Windows target)" (cd desktop/frontend && npm run build >/dev/null) 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" .) step "2. Agent and setup tool"