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

Windows Webview without bundling WebView2Loader #496

Open
mochalins opened this issue Oct 10, 2024 · 5 comments
Open

Windows Webview without bundling WebView2Loader #496

mochalins opened this issue Oct 10, 2024 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mochalins
Copy link
Contributor

Rather than relying on users to provide and bundle WebView2Loader.dll or statically link WebView2Loader.lib, a custom WV2 loader implementation can be embedded in webui.

An existing embedded Windows WV2 loader is referenced below:

https://github.com/webview/webview/blob/master/core/include/webview/detail/platform/windows/webview2/loader.hh

@AlbertShown
Copy link
Contributor

Yes, good idea, this will be helpful.
We should try using loader.hh as it is, so we can get updates later.

Also, both projects are MIT licensed, so all good 👍

@mochalins
Copy link
Contributor Author

Yes, good idea, this will be helpful. We should try using loader.hh as it is, so we can get updates later.

Also, both projects are MIT licensed, so all good 👍

We shouldn't use loader.hh or other files from webview directly, as it requires a minimum C++11 compiler rather than building with pure C. It shouldn't be infeasible to add a custom C implementation and maintain it separately; any major improvements/fixes can still be shared between libraries.

@AlbertShown
Copy link
Contributor

I checked the file very quickly, and I did not even notice it's in C++ !
However, we can keep this in our to-do list, implementing it may take some time., but it's very good feature to have.

@AlbertShown AlbertShown added enhancement New feature or request help wanted Extra attention is needed labels Nov 22, 2024
@jinzhongjia
Copy link
Collaborator

I have a small question. Currently, the function show_wv needs to be linked to the dynamic link library WebView2Loader.dll during compilation to work properly, right?

@AlbertShown
Copy link
Contributor

Yes, all xxx_wv() needs WebView2Loader.dll to be present in Windows, otherwise those functions will return false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants