mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v2, windows] Pass the correct installationStatus to the webview installation strategy (#1483)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
@@ -15,22 +15,22 @@ type installationStatus int
|
||||
const (
|
||||
needsInstalling installationStatus = iota
|
||||
needsUpdating
|
||||
installed
|
||||
)
|
||||
|
||||
func Process(appoptions *options.App) (string, error) {
|
||||
|
||||
messages := windows.DefaultMessages()
|
||||
if appoptions.Windows != nil && appoptions.Windows.Messages != nil {
|
||||
messages = appoptions.Windows.Messages
|
||||
}
|
||||
|
||||
installStatus := needsInstalling
|
||||
installedVersion, err := webviewloader.GetInstalledVersion()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if installedVersion != "" {
|
||||
installStatus = installed
|
||||
installStatus = needsUpdating
|
||||
compareResult, err := webviewloader.CompareBrowserVersions(installedVersion, MinimumRuntimeVersion)
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -40,7 +40,7 @@ func Process(appoptions *options.App) (string, error) {
|
||||
if !updateRequired {
|
||||
return installedVersion, nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return installedVersion, doInstallationStrategy(installStatus, messages)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user