archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
946 stars 269 forks source link

Use Edge Browser on Windows #742

Closed Phillipus closed 2 years ago

Phillipus commented 3 years ago

The internal browser used by Eclipse (and Archi) on Windows is IE 11. That's an outdated browser and will be removed in Windows 11.

We use the internal browser for the Help System, Welcome Page, Hints window, and HTML report preview, and it can be used with jArchi.

There was an Eclipse initiative to use the Chromium browser instead. TL;DR - it's no longer happening.

There is this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=538991

https://www.eclipse.org/swt/faq.php#howuseedge

So, it would require a later version of Eclipse and the end user installing stuff that I don't understand. Maybe it will work out of the box on Windows 11 and a later Eclipse version. Perhaps someone could investigate.

Phillipus commented 3 years ago

I also found this:

https://www.eclipse.org/forums/index.php/t/1093905/

Adding this to Archi.ini does something, but not sure what:

-Dorg.eclipse.swt.browser.IEVersion=12001

Perhaps it means that ES6 is used:

https://stackoverflow.com/questions/52975822/is-there-a-way-to-use-ecmascript-6-in-swt-browser-view-under-windows-10

Phillipus commented 2 years ago

I got it to work.

Add this to Archi.ini:

-Dorg.eclipse.swt.browser.DefaultType=edge

Read this:

https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

And install this:

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

Bingo!

We have to prefix local content with file:/// for it to work (Hints and HTML Report Preview) and that will be in the next Archi build.

I don't know if Windows 11 already has the WebView2 runtime installed by default. But at least we can say goodbye to IE 11 on Windows.

:beers:

Phillipus commented 2 years ago

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=575660

Phillipus commented 2 years ago

Useful links:

https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

https://peter.sh/experiments/chromium-command-line-switches/

https://www.thewindowsclub.com/what-is-microsoft-edge-webview2-runtime

In the last link:

In Windows 11, the component is installed on the system by default. In earlier versions of Windows, it is installed automatically for users with modern versions of Microsoft Office for the specific purpose of running Office applications and the components embedded in the apps, built on the basis of web frameworks.

Phillipus commented 2 years ago

All the necessary changes have been committed to master.

There's a new preference in General Preferences to use the Edge Browser. This requires the Microsoft Edge WebView2 Runtime to be installed on Windows 10, and Windows 11 has it already installed. The Archi User Guide has the details.

Phillipus commented 2 years ago

I installed Windows 11 in a VM (see https://getlabsdone.com/windows-11-on-vmware-workstation-how-to-install-it/).

  1. Archi works 🍾
  2. The internal browser worked out of the box. It looks like IE 11 when you right-click on the Hints window or Report Preview, but it can't be. The right-click menu is different than Edge's, so I don't know what it is.
  3. Setting Archi 4.9 beta to use Edge as the internal browser worked. No need to install the Edge WebView2 Runtime
  4. I hate Windows 11 - ugh!
Phillipus commented 2 years ago

I'm gonna close this one...yay!