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
@@ -92,7 +92,11 @@ jobs:
SHORT_SHA="${GITHUB_SHA:0:7}"
BUILD_DATE="$(date -u +%Y-%m-%d)"
mkdir -p bin
go build -trimpath -ldflags="-s -w \
# -H=windowsgui = subsystem WINDOWS, double-click no longer
# flashes a console window. main.go calls AttachConsole on
# startup so CLI invocations from cmd/PowerShell still print
# to the parent terminal.
go build -trimpath -ldflags="-s -w -H=windowsgui \
-X main.Version=dev-${SHORT_SHA} \
-X main.Commit=${SHORT_SHA} \
-X main.BuildDate=${BUILD_DATE}" \