GUI subsystem: -H=windowsgui + AttachConsole, MB_TOPMOST on test window
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:
@@ -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}" \
|
||||
|
||||
Reference in New Issue
Block a user