Page 1 of 1

WebView2 Windows 7

Posted: Thu Jun 15, 2023 7:59 am
by Lion85
Hello everyone, I have finished my software with WebView4Delphi.
some users are still using windows 7( :( ). They have problems with the runtime.
Is there by any chance a way to use this component on windows 7?
Thank you all

Re: WebView2 Windows 7

Posted: Thu Jun 15, 2023 12:50 pm
by salvadordf
Hi,

Google decided to stop supporting Windows 7, 8, 8.1 with Chromium 110.

If your users have Windows 7 then they will have to download an old version of the fixed runtime that works with Edge 109. Here you have some links to download that runtime :
https://www.catalog.update.microsoft.com/Search.aspx?q=webview2%20Runtime%20version%20109
https://github.com/westinyang/WebView2RuntimeArchive/releases/tag/109.0.1518.78

I haven't tested the latest WebView2Loader.dll version in Windows 7 but if you have issues then consider setting GlobalWebView2Loader.UseInternalLoader to TRUE before the GlobalWebView2Loader.StartWebView2 call to initialize WebView2 without WebView2Loader.dll

In theory, the latest WebView4Delphi version should work fine even with older versions of the runtime but in case you detect some issue then install this version :
https://github.com/salvadordf/WebView4Delphi/releases/tag/1.0.1518.46
Even if the latest WebView4Delphi works in Windows 7 you won't be able to use the newer features that came with more recent versions of the runtime and the users will be using an old browser with known security problems.

In order to use the fixed version of the WebView2 runtime you will have to set GlobalWebView2Loader.BrowserExecPath to the path where the fixed runtime is located like this :
https://github.com/salvadordf/WebView4Delphi/blob/ab710a894a3a312842627a413ade3c68c311e209/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1011