wails icon indicating copy to clipboard operation
wails copied to clipboard

Can I configure the webview kernel in the application at packaging time? Used to help ordinary people who can't install webview. Avoid complex operations

Open catfives opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

Can I configure the webview kernel in the application at packaging time? Used to help ordinary people who can't install webview. Avoid complex operations

Describe alternatives you've considered

No response

Additional context

No response

catfives avatar Jun 28 '24 07:06 catfives

Mac - preinstalled because of Safari

Windows - Can configure via what webview is used in options, would require you to write a certain version to the desired location and load it here https://wails.io/docs/reference/options#webviewbrowserpath

Linux - Only if you package as a deb or app image where you allow install steps to downloads deps

atterpac avatar Jul 16 '24 20:07 atterpac

I also want to know the specific code implementation. Can you give a corresponding example?

biuaxia avatar Jul 18 '24 02:07 biuaxia

The docs show how to get a specific version of a Webview runtime for windows, you'd write that to the clients device and whatever path you set is what you set as the WebviewBrowserPath in windows options.

You will need to //go:embed the version you want into your application and do a os.WriteFile with permission 0755 to allow it to be executed

Wherever you write the file should be your WebviewBrowserPath

atterpac avatar Jul 18 '24 03:07 atterpac