DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.33k stars 737 forks source link

Figure out windows webview2 distribution #87

Open jkelleyrtp opened 2 years ago

jkelleyrtp commented 2 years ago

For windows users, they must have webview2. This is not so insurmountable.

https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

We can either package webview with the app or send along a bootstrapper.

Other apps have done this before, so maybe we can steal some thoughts from them.

What are people's general thoughts regarding webview2 access on Windows? Should we just fallback to MSHTML if the user doesn't have edge installed?

nyrf commented 2 years ago

Sometimes we need install application offline, so if there is a way to bundle webview2 into app installer would be great, or bundle application like electron's way?

ealmloff commented 11 months ago

It looks like the tauri bundler exposes options for embedding webview2 in the installer: https://docs.rs/tauri-utils/1.4.0/tauri_utils/config/enum.WebviewInstallMode.html. We now expose this as part of the bundler config

heyrict commented 11 months ago

One remaining issue is that the configuration in Dioxus.toml is not on par with that documented in tauri bundler. As dioxus uses toml for configuration, the Option<PathBuf> makes no sense in wix.language as we cannot provide a null value in toml. What do you think about reuse tauri_utils::config::WixLanguage, or even the whole tauri_utils::config::BundleConfig directly in our configuration?