MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.26k stars 149 forks source link

Windows GUI: Use Edge WebView2 for HTML/Graph view #873

Open cjee21 opened 1 week ago

cjee21 commented 1 week ago

Use Edge WebView2 for HTML and Graph view when available else fallback to IE.

This should work on Windows 7 to 11 both with and without Edge WebView2 Runtime installed.

Additional changes beyond this PR that are required to get WebView2 working:

For more information: https://github.com/MediaArea/MediaInfo/pull/857#issuecomment-2143835197

cjee21 commented 1 week ago

Tried updating the installer and packaging scripts.

@JeromeMartinez Now on your side only need to do the following for this PR:

  1. Install EdgeView2 SDK 1.0.1054.31 by Microsoft from GetIt Package Manager in C++ Builder on build farm
  2. See if the build farm successfully produces a build with this PR

I can help check/test the installer and 7z when there is a dev snapshot for this PR.

cjee21 commented 1 week ago

Tested locally built installer with this PR. It works as expected on Windows 11 including the uninstallation.

Also tested on Windows 7 VM.

Without Edge WebView2 Runtime installed: Screenshot 2024-06-22 132626

With Edge WebView2 Runtime installed: Screenshot 2024-06-22 134429

@JeromeMartinez remember the bug in https://github.com/MediaArea/MediaInfo/pull/853#issuecomment-2141385021? This bug is more serious in Windows 7 where it pops up the following: Screenshot 2024-06-22 133015

The good news is that with Edge WebView2 Runtime installed, this bug does not happen.

JeromeMartinez commented 1 week ago

Now on your side only need to do the following for this PR:

@cjee21 sorry to be late on this one, but still on my radar, please be patient, ~10 days before we have more time.

cjee21 commented 3 days ago

Just realized Graph view is using HTML too so implemented WebView2 for that too. Tested.

Note: Graph view does not have dark mode.

JeromeMartinez commented 3 days ago

Note: Graph view does not have dark mode.

True... HTML code is mixed in C++ code in https://github.com/MediaArea/MediaInfoLib/blob/master/Source/MediaInfo/Export/Export_Graph.cpp , we need to add an option to the library for indicating that we want a dark version...

cjee21 commented 3 days ago

Note: Graph view does not have dark mode.

True... HTML code is mixed in C++ code in https://github.com/MediaArea/MediaInfoLib/blob/master/Source/MediaInfo/Export/Export_Graph.cpp , we need to add an option to the library for indicating that we want a dark version...

Ideally, we should put all styles in all generated HTMLs in