[windows] Support webview2 runtime installation strategies

This commit is contained in:
Lea Anthony
2021-06-15 21:25:08 +10:00
parent afe677d39d
commit e90f5361be
13 changed files with 212 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
// +build wv2runtime.browser
package wv2runtime
import (
"fmt"
"github.com/leaanthony/webview2runtime"
)
func doInstallationStrategy(installStatus installationStatus) error {
confirmed, err := webview2runtime.Confirm("This application requires the WebView2 runtime. Press OK to open the download page. Minimum version required: "+minimumRuntimeVersion, "Missing Requirements")
if err != nil {
return err
}
if confirmed {
err = webview2runtime.OpenInstallerDownloadWebpage()
if err != nil {
return err
}
}
return fmt.Errorf("webview2 runtime not installed")
}