github.com/secoba/wails/v2@v2.6.4/internal/app/app_preflight_windows.go (about) 1 //go:build windows && !bindings 2 3 package app 4 5 import ( 6 "github.com/secoba/wails/v2/internal/logger" 7 "github.com/secoba/wails/v2/internal/wv2installer" 8 "github.com/secoba/wails/v2/pkg/options" 9 ) 10 11 func PreflightChecks(options *options.App, logger *logger.Logger) error { 12 13 _ = options 14 15 // Process the webview2 runtime situation. We can pass a strategy in via the `webview2` flag for `wails build`. 16 // This will determine how wv2runtime.Process will handle a lack of valid runtime. 17 installedVersion, err := wv2installer.Process(options) 18 if installedVersion != "" { 19 logger.Debug("WebView2 Runtime Version '%s' installed. Minimum version required: %s.", 20 installedVersion, wv2installer.MinimumRuntimeVersion) 21 } 22 if err != nil { 23 return err 24 } 25 26 return nil 27 }