'Moving an application from Windows and WebView2 to OSX and Chromium; how do I get started?

I'm looking to port an application, currently on Windows and using WebView2 for the front end, to OSX and Chromium. I know next to nothing about either WebView2 or Chromium, so I'm looking for a guide to get started. Does anyone know of such a thing? An online search leaves things pretty muddy.



Solution 1:[1]

Using web technologies for creating GUI in desktop apps is pretty popular approach today. You take a web browser control that allows displaying web pages built with HTML5, CSS3, JavaScript or local HTML files, and embed it into your desktop app on Windows, Linux, macOS.

There are different solutions both free (open-source) and commercial for different technology stacks, programming languages, operating systems, etc. I don't know your requirements for the software, but you can take a look at the following solutions:

CEF (Cross-platform, free, for C++ developers)

CEF is one of the first solutions that wrapped Chromium functionality and provided an API that can be used by third-party applications. Chromium is a standalone desktop application. CEF is a framework. Since Chromium is written using C++, CEF represents a framework for C++ developers, but there are many ports for Java, .NET, and Python languages.

The main purpose of CEF is to let C++ developers embed Chromium into their C++ cross-desktop application and access Chromium features like rendering (including off-screen), DOM, V8, PDF Viewer, Printing, Network requests/responses, cookies, etc.

The examples of such applications are Steam, Spotify, Adoby Brakets, and more.

Electron (Cross-platform, free, for JS developers)

Taking into account that CEF and Electron source codes are very similar, I can assume that:

Electron == CEF + Node.js

The main purpose of Electron is to let JavaScript developers build cross-platform desktop applications on top of Chromium. Each window in Electron app represents a Chromium window that renders specific web page or HTML. The GUI of Electron apps is built using HTML, CSS, and JavaScript. The logic (backend) is written using Node.js.

JxBrowser (Cross-platform, commercial, for Java developers)

It's a commercial Java library that lets you add Chromium web browser control to your Java app, display web pages and PDFs in JavaFX, Swing, SWT, work with DOM, JS, network, printing, downloads, etc.

Used by commercial companies that develop commercial cross-platform software using Java technology and have high requirements for a third-party solutions including security, stability, guarantee, technical support, assistance in troubleshooting, expert advise, etc. It has been developed and supported by TeamDev since 2004.

DotNetBrowser (Windows, commercial, for .NET developers)

Same as JxBrowser, but for .NET developers and only for Windows. Linux and macOS support is in progress.

Other

There are other solutions including EO.WebBrowser, Ultralight, Qt WebBrowser and more.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vladimir