mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 16:20:53 +08:00
25 lines
612 B
Go
25 lines
612 B
Go
//go:build wv2runtime.browser
|
|
// +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")
|
|
}
|