Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Tauri/Wry with Fixed Version of Webview2 #1378

Closed
2 tasks
geolehmann opened this issue Mar 23, 2021 · 6 comments
Closed
2 tasks

Using Tauri/Wry with Fixed Version of Webview2 #1378

geolehmann opened this issue Mar 23, 2021 · 6 comments

Comments

@geolehmann
Copy link

Describe the bug
For the webview runtime, there is generally the possbility to pack the application with a fixed version of the runtime (aka bring-your-own, see https://developer.microsoft.com/en-us/microsoft-edge/webview2/). This is needed when the target audience has no elevated rights in their platform to install the runtime by theirself.

I couldn´t find a way to make wry work with the fixed version of the runtime (simply putting the app .exe in the unzipped runtime folder didn´t work). It seems, in C++ you can use the CreateCoreWebView2EnvironmentWithOptions function together with a browserExecutableFolder parameter to specifiy where the fixed version binaries are located. We need something similar for Wry.

Steps To Reproduce

Expected behavior

Platform and Versions (please complete the following information):
OS: Windows

Would you assign yourself to resolve this bug?

  • Yes
  • No

Additional context

@wusyong
Copy link
Member

wusyong commented Mar 23, 2021

Evergreen distribution is the recommended way for most scenarios as Microsoft states.
I think it's better for this crate to stick with it to prevent more complex version issues.
After the April update, Windows 10 will have webview2 runtime by default.
As for older versions like Windows 7 and 8, there's an evergreen bootstrapper in the link you post which can provide to users.
We will offer this check in Tauri if users don't have webview2 runtime yet.

@geolehmann
Copy link
Author

okay, I agree with this, thanks.

@nothingismagick
Copy link
Member

nothingismagick commented Mar 23, 2021

I agree that this should not be WRY's concern. Adding a binary delivery mechanism is out of scope (for wry). That said, I think that Tauri should consider offering this as an option in its MS bundler configuration. To that end I have transferred this issue and renamed.

@nothingismagick nothingismagick transferred this issue from tauri-apps/wry Mar 23, 2021
@nothingismagick nothingismagick changed the title Using Wry with Fixed Version of Webview2 Using Tauri/Wry with Fixed Version of Webview2 Mar 23, 2021
@nothingismagick
Copy link
Member

My justification here is that there may be situations where you cannot rely on the internet for your installation and need to ship a complete system (e.g. airgapped systems).

@Boscop
Copy link

Boscop commented May 18, 2021

@geolehmann Note: When this is merged, you can print a user-friendly error if WebView2 is not installed, indicating that if the user doesn't have admin rights, their admin should install it for them.

@lucasfernog
Copy link
Member

This will be available on the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants