fix(windows): simplify installer success message

This commit is contained in:
cabbage committed 2026-10-27 09:37:39 +00:00
1 parent 0735908ca9
commit 49bb103171
3 files changed
+23 -2

No files matched your search

+13
View File
@@ -2,6 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"os"
"strconv" "strconv"
"strings" "strings"
@@ -15,6 +16,18 @@ const (
defaultInstallerWorkDir = `C:\Users\Public` defaultInstallerWorkDir = `C:\Users\Public`
) )
func installerSuccessMessage(configPath string) (string, error) {
data, err := os.ReadFile(configPath)
if err != nil {
return "", fmt.Errorf("read installed client configuration: %w", err)
}
configured, err := config.DecodeClient(data, config.ClientOptions{Platform: config.PlatformWindows})
if err != nil {
return "", fmt.Errorf("decode installed client configuration: %w", err)
}
return "Installed and is running on server " + configured.Client.ServerURL, nil
}
// packagedClientConfig creates the deliberately small first-install TOML. The // packagedClientConfig creates the deliberately small first-install TOML. The
// strict production decoder validates it before an elevated installer writes // strict production decoder validates it before an elevated installer writes
// anything, so the SCM service never starts from a hand-built invalid file. // anything, so the SCM service never starts from a hand-built invalid file.
+7 -1
View File
@@ -48,7 +48,13 @@ func runInteractiveInstaller(_ io.Writer, _ io.Writer) error {
showInstallerMessage(err.Error(), installerErrorIcon) showInstallerMessage(err.Error(), installerErrorIcon)
return err return err
} }
showInstallerMessage("RVBox is installed and its Windows service has started.\n\nThe notification-area icon is available now; no sign-out or reboot is needed. Windows may place it under the hidden-icons arrow.", installerInfoIcon) _, configPath := packagedInstallPaths()
message, err := installerSuccessMessage(configPath)
if err != nil {
showInstallerMessage(err.Error(), installerErrorIcon)
return err
}
showInstallerMessage(message, installerInfoIcon)
return nil return nil
} }
+3 -1
View File
@@ -226,7 +226,9 @@ native installer structure-layout test is in `installer_windows_test.go`.
For the real double-click acceptance route, preserve UAC policy: the unelevated For the real double-click acceptance route, preserve UAC policy: the unelevated
parent must wait for its elevated child to exit successfully, start the installed parent must wait for its elevated child to exit successfully, start the installed
tray with the original user's token, and confirm a registered icon before its tray with the original user's token, and confirm a registered icon before its
single success dialog. Verify both service and tray identities, current-session single success dialog. Its entire message is `Installed and is running on server
<server_url>`, using the installed configuration's URL (including a preserved
URL on upgrade). Verify both service and tray identities, current-session
startup without a reboot, Run-key sign-in startup, duplicate prevention, and startup without a reboot, Run-key sign-in startup, duplicate prevention, and
continued service operation when only the tray exits. The tray must remain continued service operation when only the tray exits. The tray must remain
visible/responsive when its service is absent or its IPC peer stalls. Windows visible/responsive when its service is absent or its IPC peer stalls. Windows