mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[windows] Support webview2 runtime installation strategies
This commit is contained in:
23
v2/internal/ffenestri/windows/wv2runtime/browser.go
Normal file
23
v2/internal/ffenestri/windows/wv2runtime/browser.go
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user