Page 2 of 13

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Mon Sep 14, 2020 10:25 pm
by ChrisR
You rock Justin and Ohm version 0.1 is superb Image
Fred wrote:Finally a new native solution is coming ! Thanks for the wrapper, we will look into it once it gets live.
Image Image

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Tue Sep 15, 2020 11:04 am
by Justin
Hi ChrisR, thanks i want to keep improving it.
Fred wrote:Finally a new native solution is coming ! Thanks for the wrapper, we will look into it once it gets live.
That's great, will be chromium in the three platforms? or webkit in linux /mac?

One thing i found problematic is that ExecuteScript() is asynchronous, in c# you can use async/await but in PB i had to spawn a message loop to make a synchronous version. I hope you found a better solution, don't known if implementing async / await is possible in PB.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Mon Sep 28, 2020 8:29 am
by HanPBF
Hello Justin: great!great!great!

Even ctrl-shift-i does open development tools!

(Any idea how to bind an external chrome developer via remote debugging? chrome://inspect)


Your implementation is a game changer!

Again: great!
Thanks a lot!!!

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Mon Sep 28, 2020 4:36 pm
by Justin
Hi HanPBF,
i don't have experience with remote debugging, but it is expained here:
https://docs.microsoft.com/en-us/micros ... debugging/

I tried the Android device debugging and it worked as expected, it did not recognize my android phone at first, i had to follow the steps here: (The Update 24 February 2016 part)
https://stackoverflow.com/questions/219 ... plugged-in

Basically i installed the Windows USB driver, the ADB package, and issued 'adb devices' from cmd as explained in the page and it worked.

Is that what you were looking for?

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Mon Sep 28, 2020 5:24 pm
by HanPBF
Yes, normally a page shown with a specific port should be enough to remote debug.

But, internal debugger (ctrl-shift-i) should always work.

Thanks!

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sun Oct 04, 2020 4:21 pm
by Justin
Small update 4 October 2020, see first post.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Thu Oct 22, 2020 6:48 pm
by Seymour Clufley
Thanks for this, Justin. Excellent work.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sat Oct 24, 2020 1:18 pm
by Justin
Updated to 1.0.622.22 SDK, see first post.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sun Nov 01, 2020 11:44 am
by Justin
Updated to 1.0.674-prerelease SDK, see first post.

The prerelease has introduced static linking of the WebView2Loader.dll, it does not work simply importing it in PB because you have to import all the dependencies.

If anyone wants to try, WebView2LoaderStatic.lib it's in the prerelease folder:

Try:

Code: Select all

Import "WebView2LoaderStatic.lib"
	CreateCoreWebView2Environment(environment_created_handler.i)
	CreateCoreWebView2EnvironmentWithOptions(browserExecutableFolder.s, userDataFolder.s, environmentOptions.i, environment_created_handler.i)
	GetAvailableCoreWebView2BrowserVersionString(browserExecutableFolder.s, versionInfo.i)
	CompareBrowserVersions(version1.s, version2.s, result.i)
EndImport

CreateCoreWebView2Environment(0)
And it will show all the unresolved external symbols, maybe someone can fix it.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sun Dec 13, 2020 1:00 pm
by Justin
Updtated to the latest WebView2 SDK 1.0.664.37 / 1.0.721-prerelease.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sun Dec 13, 2020 1:57 pm
by Tenaja
Thanks for sharing. I think I might use this some day.

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sun Jan 17, 2021 3:23 pm
by firace
Great work, thanks for sharing!

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Mon Jan 25, 2021 9:55 am
by cabaptista
Thank you for the great job. :D

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sat Jan 30, 2021 12:48 pm
by oyster
sounds nice.
one question, how to release the final EXE file to end-users to ensure he can see the webview2 control?

Re: Webview2 control - Chromium browser for Purebasic (Windo

Posted: Sat Jan 30, 2021 11:18 pm
by Justin
Hi, thanks for the feedback.

I updated to the latest WebView2 SDK 1.0.705.50 / 1.0.781-prerelease, see first post. There are some interesting new apis in the prerelease.

oyster,
Basically you need the WebView2 Runtime installed in the machine and the WebView2Loader.dll from the WebView2 SDK in the executable folder.

The distribution model is explained here:
https://docs.microsoft.com/en-us/micros ... stribution

WebView2 Runtime download:
https://developer.microsoft.com/en-us/m ... /webview2/