GUI subsystem: -H=windowsgui + AttachConsole, MB_TOPMOST on test window
Build / test (push) Successful in 1m13s
Build / build-windows (push) Successful in 55s

drover.exe is now a GUI subsystem binary:
  - Double-click no longer flashes a console window — a clean
    smoke-test message box opens immediately.
  - When run from cmd / PowerShell, AttachConsole reattaches stdout
    and stderr to the parent terminal so '--version', 'check', etc.
    still print as expected.
  - MB_TOPMOST flag added to MessageBox so the window can't be
    obscured by other windows on launch (this was the actual cause
    of "I clicked but nothing happened" reports).

Verified locally: built with GOOS=windows GOARCH=amd64 -H=windowsgui;
running drover-gui.exe --version prints to PowerShell, drover-gui.exe
gui shows the message box on top of the active window.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-01 03:11:50 +03:00
parent 7306f6be6d
commit 5da30ad058
6 changed files with 71 additions and 4 deletions
+5 -1
View File
@@ -67,7 +67,11 @@ jobs:
BUILD_DATE="$(date -u +%Y-%m-%d)"
SHORT_SHA="${GITHUB_SHA:0:7}"
mkdir -p dist
go build -trimpath -ldflags="-s -w \
# -H=windowsgui makes drover.exe a GUI subsystem binary so the
# double-click experience doesn't flash a console window. main.go
# calls AttachConsole on startup so CLI runs still print to the
# parent terminal when launched from cmd/PowerShell.
go build -trimpath -ldflags="-s -w -H=windowsgui \
-X main.Version=${{ steps.version.outputs.version }} \
-X main.Commit=${SHORT_SHA} \
-X main.BuildDate=${BUILD_DATE}" \