WebViewGadget deployment and other questions

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

WebViewGadget deployment and other questions

Post by Kukulkan »

Hi, I just consider using the new WebViewGadget as the basis for a new cross platform app. Unfortunatelly, I found no details about how the WebViewGadget works.
  • What is the underlying technology on Windows, Linux (QT/GTK) and MacOS?
    -> Linux webkit, macOS webkit, windows Edge webview2
  • What are the deployment ressources I need to provide if I deploy such app?
    • Do I need to deploy the WebView2 runtimes on Windows?
      -> Looks like my setup has to check if it is available and needs to download/run if needed.
    • Is there a specific webbrowser that must be installed on Linux? On Mac?
  • Are there dependencies or minimum requirements regarding the supported OS?
    • Does it work with, for example, MacOS Mojave?
    • How about Ubuntu 20.04 or even 18.04?
  • How does this gadget handle IndexedDB and localStorage usage? What are the dependencies?
  • Will it run WASM (WebAssembly)? I know this mainly depends on above answers about underlying technology...
    -> Likely
  • How does this work with proxy settings and PAC files? Do I have to implement this by myself or is this done by the OS (Win/Lin/Mac)?
UPDATE:
I will put the answers I got in this initial post into my questions list above. So we can see what is still unanswered :wink:
Last edited by Kukulkan on Wed Mar 20, 2024 9:33 am, edited 4 times in total.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: WebViewGadget deployment and other questions

Post by infratec »

Linux webkit
macOS webkit
windows Edge webview2

If you own a up to date Win10 version, 'Microsoft Edge WebView2-Runtime' is installed.
For older systems you have to install it by hand.

I use my own WebView2Gadget(), since not all stuff what I needed is not available in PB (up to now).

I already stumpled above some macOS webkit problems, but they were solvable.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: WebViewGadget deployment and other questions

Post by Kukulkan »

Thanks! I updated my question above with your answers. Still a lot questions open...
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: WebViewGadget deployment and other questions

Post by infratec »

You don't need a web-browser.
You use the WebViewGadget() :wink:

Proxy is a problem on Linux and macOS.
On windows I implemented this in my WebView2Gadget(), the PB WebViewGadget() does not support it (up to now)

Or you have to use the global Proxy settings of the OS, which is not nice.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: WebViewGadget deployment and other questions

Post by Kukulkan »

Thanks. But isn't there the issue that the webkit engine on Linux and Mac is not there by default? At least for Linux I believe I have to add some dependency. So is it libQt5WebKit5 or libwebkit2gtk or webkit2gtk3 or webkit2gtk4?
Proxy is a problem on Linux and macOS.
In the past my app had it's own proxy settings and put the proxy data to libcurl. I was using a pacparser library (DLL, .so, .dylib, self compiled) on all three platforms to determine the proxy to use in networked and mobile environments. I hoped that, using WebViewGadget, I can rely on the OS to handle this. So if the system Webbrowser works, the WebView also does. Is there any reference to test or validate this?
Or you have to use the global Proxy settings of the OS, which is not nice.
Which means I have to search and use them. Not sure if this is the way to go... Is there even a function in WebViewGadget to set the proxy to use? The announcement does not even mention proxy server...

I have many end users in company environments. They need proxy settings in order to work.
User avatar
the.weavster
Addict
Addict
Posts: 1581
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: WebViewGadget deployment and other questions

Post by the.weavster »

The dependencies for webview are detailed on github.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: WebViewGadget deployment and other questions

Post by Kukulkan »

The dependencies for webview are detailed on github.
Wait a second, Fred is using this webview project for implementing the WebView? :shock: Are you 100% sure that this is used and Fred did not implement it by himself? This webview project is currently version 0.10 with no official stable release yet and I doubt this is a good solution. Sounds like a can of worms to me...

During my project investigations I reviewed this project and found it not sufficient. I found IndexedDB issues there in Oct 2023 and tried to get help (finally on discord). That was not good and not helpful at all. I then filed a "feature request" issue but found that no one cares. IndexedDB and localStorage is still not consistently working or supported. Setting a proxy is not supported (only using environment variables on luck). So I dropped this and if PB uses the same project as backend, I might need to drop it right here :-(
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: WebViewGadget deployment and other questions

Post by Fred »

I can confirm we use this project, the guys were actually helpful and accepted 2 pulls requests to ease PB integration. BTW, the WebViewGadget() primary goal is to have web based UI, not to have a full fledged emdeded browser with proxy support, localstorage and such. These should be done in the PureBasic part of the program.
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: WebViewGadget deployment and other questions

Post by skywalk »

Hi Fred,
Is there an official gui example/doc with the webviewgadget and Javascript callbacks?

I read similar projects in the forum.

I am debating use of canvas based grids vs html gui.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: WebViewGadget deployment and other questions

Post by Fred »

Doc is coming with next beta :)
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: WebViewGadget deployment and other questions

Post by skywalk »

Thanks!
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Post Reply