Add 'drover gui' subcommand: native Win32 MessageBox smoke test
Shows a small message box with version metadata + build info. Used as a fastest possible end-user smoke check after install: double-click drover.exe in a portable bundle (or run 'drover gui' from cmd) and see "OK — the binary launched and the Windows API is reachable" with the right version on screen. No network calls, no admin needed. Implementation: cgo-free, uses only golang.org/x/sys/windows (already pulled in by the updater package). gui_other.go is a stub so the package still compiles on Linux for the CI smoke build. Locally verified: built with -X main.Version=test-local, ran 'drover.exe gui' on Windows 11, message box appeared with correct version/commit/Go runtime info. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -49,10 +49,22 @@ func newRootCmd() *cobra.Command {
|
||||
root.AddCommand(newCheckCmd())
|
||||
root.AddCommand(newUpdateCmd())
|
||||
root.AddCommand(newServiceCmd())
|
||||
root.AddCommand(newGUICmd())
|
||||
|
||||
return root
|
||||
}
|
||||
|
||||
func newGUICmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "gui",
|
||||
Short: "Show a test window (smoke check that the binary launches on this machine)",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
showTestWindow()
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func newCheckCmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "check",
|
||||
|
||||
Reference in New Issue
Block a user