cmd/drover: replace MessageBox stub with Wails GUI (internal/gui.Run)
Bare 'drover' (and 'drover gui') no longer pop a Win32 MessageBox — they hand off to internal/gui which mounts a real Wails window with the Classic React variant. The old gui_windows.go / gui_other.go files are removed; their job is now done by internal/gui/run.go. Auto-update on startup is unchanged — still runs before gui.Run(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-8
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"git.okcu.io/root/drover-go/internal/gui"
|
||||
"git.okcu.io/root/drover-go/internal/updater"
|
||||
)
|
||||
|
||||
@@ -46,13 +47,12 @@ func newRootCmd() *cobra.Command {
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: false,
|
||||
// No subcommand and no flags = end-user double-clicked the exe.
|
||||
// First do a quick update check (silent if no network or already
|
||||
// current); if an update is available we prompt, apply, and
|
||||
// re-launch ourselves. Then show the smoke-test window.
|
||||
// First do a quick silent update check (no-op if offline or
|
||||
// already current); if an update is available we apply it and
|
||||
// re-launch ourselves. Then we open the Wails-backed GUI.
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
autoUpdateOnStartup()
|
||||
showTestWindow()
|
||||
return nil
|
||||
return gui.Run(Version)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -72,10 +72,9 @@ func newRootCmd() *cobra.Command {
|
||||
func newGUICmd() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "gui",
|
||||
Short: "Show a test window (smoke check that the binary launches on this machine)",
|
||||
Short: "Open the Drover-Go window (same as launching the exe with no args)",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
showTestWindow()
|
||||
return nil
|
||||
return gui.Run(Version)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user