mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 00:09:56 +08:00
[v2] Update to webview2runtime v1.3.0
This commit is contained in:
parent
c0f283335a
commit
e5732bcee1
@ -22,7 +22,7 @@ github.com/leaanthony/go-common-file-dialog v1.0.3 // indirect
|
||||
github.com/leaanthony/go-webview2 v0.0.0-20210914103035-f00aa774a934 // indirect
|
||||
github.com/leaanthony/slicer v1.5.0 // indirect
|
||||
github.com/leaanthony/typescriptify-golang-structs v0.1.7 // indirect
|
||||
github.com/leaanthony/webview2runtime v1.1.0 // indirect
|
||||
github.com/leaanthony/webview2runtime v1.3.0 // indirect
|
||||
github.com/leaanthony/winc v0.0.0-20210921073452-54963136bf18 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
|
@ -22,7 +22,7 @@ github.com/leaanthony/go-common-file-dialog v1.0.3 // indirect
|
||||
github.com/leaanthony/go-webview2 v0.0.0-20210914103035-f00aa774a934 // indirect
|
||||
github.com/leaanthony/slicer v1.5.0 // indirect
|
||||
github.com/leaanthony/typescriptify-golang-structs v0.1.7 // indirect
|
||||
github.com/leaanthony/webview2runtime v1.1.0 // indirect
|
||||
github.com/leaanthony/webview2runtime v1.3.0 // indirect
|
||||
github.com/leaanthony/winc v0.0.0-20210921073452-54963136bf18 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
|
@ -27,7 +27,7 @@ require (
|
||||
github.com/leaanthony/idgen v1.0.0
|
||||
github.com/leaanthony/slicer v1.5.0
|
||||
github.com/leaanthony/typescriptify-golang-structs v0.1.7
|
||||
github.com/leaanthony/webview2runtime v1.1.0
|
||||
github.com/leaanthony/webview2runtime v1.3.0
|
||||
github.com/leaanthony/winc v0.0.0-20211202091710-9931d43181ff
|
||||
github.com/leaanthony/winicon v1.0.0
|
||||
github.com/matryer/is v1.4.0
|
||||
@ -81,3 +81,5 @@ require (
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
)
|
||||
|
||||
replace github.com/leaanthony/webview2runtime => C:\Users\leaan\Documents\wails-v2-beta\webview2runtime
|
||||
|
@ -15,9 +15,9 @@ func PreflightChecks(options *options.App, logger *logger.Logger) error {
|
||||
// Process the webview2 runtime situation. We can pass a strategy in via the `webview2` flag for `wails build`.
|
||||
// This will determine how wv2runtime.Process will handle a lack of valid runtime.
|
||||
installedVersion, err := wv2runtime.Process()
|
||||
if installedVersion != nil {
|
||||
logger.Debug("WebView2 Runtime installed: Name: '%s' Version:'%s' Location:'%s'. Minimum version required: %s.",
|
||||
installedVersion.Name, installedVersion.Version, installedVersion.Location, wv2runtime.MinimumRuntimeVersion)
|
||||
if installedVersion != "" {
|
||||
logger.Debug("WebView2 Runtime Version '%s' installed. Minimum version required: %s.",
|
||||
installedVersion, wv2runtime.MinimumRuntimeVersion)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -15,14 +15,14 @@ const (
|
||||
installed
|
||||
)
|
||||
|
||||
func Process() (*webview2runtime.Info, error) {
|
||||
func Process() (string, error) {
|
||||
installStatus := needsInstalling
|
||||
installedVersion := webview2runtime.GetInstalledVersion()
|
||||
if installedVersion != nil {
|
||||
if installedVersion != "" {
|
||||
installStatus = installed
|
||||
compareResult, err := webviewloader.CompareBrowserVersions(installedVersion.Version, MinimumRuntimeVersion)
|
||||
compareResult, err := webviewloader.CompareBrowserVersions(installedVersion, MinimumRuntimeVersion)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return "", err
|
||||
}
|
||||
updateRequired := compareResult == -1
|
||||
// Installed and does not require updating
|
||||
|
Loading…
Reference in New Issue
Block a user