mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 07:10:40 +08:00

* Application refactor * [windows] refactor out main loop. Create new application struct. Refactor assethandler/assetserver signatures. * Refactor darwin app * Refactor app for linux * Update v2/internal/frontend/assetserver/assethandler.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Update v2/internal/frontend/assetserver/assethandler.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Update v2/internal/frontend/assetserver/assetserver.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> * Update v2/internal/frontend/assetserver/assetserver.go Co-authored-by: stffabi <stffabi@users.noreply.github.com> Co-authored-by: stffabi <stffabi@users.noreply.github.com>
28 lines
772 B
Go
28 lines
772 B
Go
//go:build windows && !bindings
|
|
|
|
package app
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/v2/internal/logger"
|
|
"github.com/wailsapp/wails/v2/internal/wv2installer"
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
)
|
|
|
|
func PreflightChecks(options *options.App, logger *logger.Logger) error {
|
|
|
|
_ = options
|
|
|
|
// 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 := wv2installer.Process(options)
|
|
if installedVersion != "" {
|
|
logger.Debug("WebView2 Runtime Version '%s' installed. Minimum version required: %s.",
|
|
installedVersion, wv2installer.MinimumRuntimeVersion)
|
|
}
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|