Is there any simple way to get started with Windows WebView2 and JUCE8?
I’m not sure about Projucer as I’m trying under CMake.
I’ve tried getting some of the CMakeFiles scripts from the JUCE8 repo to try and find/install things. but it’s not an “out of the box” experience. (Windows 11 here btw)
This is meant to be mostly seamless, but we discovered about a week ago that the instructions embedded inside our CMake find script to install the WebView2 package may not be working anymore.
Ideally, you should install the WebView2 Nuget package and our FindWebView2.cmake script should find it when the NEEDS_WEBVIEW2 option is specified when creating the JUCE target.
Something could have changed on the package repository’s side. I’ll see if we can streamline it again.
It seems that with some Windows updates, explicitly specifying the -Source option may be necessary now. We’ll update these in the JUCE repository.
You can omit the -RequiredVersion option to always fetch the latest WebView2 package, which is probably a good thing, with the caveat that there could be breaking changes, which we haven’t tested and adjusted to yet.
That said, I really like how @mthierman is using nuget.exe with CMake’s execute_process. This seems to provide better control of the dependency on a per-project basis, so I would probably use this approach for my own projects.