salvadordf 33 Posted December 3, 2021 I just published a new project in GitHub called WebView4Delphi. WebView4Delphi allows you to embed Chromium based web browsers in your Delphi or Lazarus applications using the WebView2 runtime. It uses the latest stable version of the WebView2 nuget package 1.0.1054.31. I used many of the tricks I learned creating CEF4Delphi and you will notice many similarities if you used it. I still have to write the documentation but you can build the available demos to see it working in VCL, FMX and Lazarus apps. There are a few things pending like the "windowless mode". It's being distributed with a simple MIT license so anyone can do whatever s/he wants with it. https://github.com/salvadordf/WebView4Delphi 12 6 Share this post Link to post
Ann Lynnworth 11 Posted December 4, 2021 Great. Thank you. Have you tested going to drive.google.com by any chance? Google is no longer allowing the custom browser that I last compiled with CEF4. I have been meaning to recompile to get around the problem. Google lets me into gmail and they let me download items from drive when the notices come into gmail, but direct use of google drive is blocked. They detect my CEF4 browser as an old version of "Firefox" now. Share this post Link to post
Edwin Yip 154 Posted December 4, 2021 Great! Another amazing project by you! What's the planned supported Delphi versions ;) Share this post Link to post
salvadordf 33 Posted December 4, 2021 (edited) 6 hours ago, Ann Lynnworth said: Great. Thank you. Have you tested going to drive.google.com by any chance? Google is no longer allowing the custom browser that I last compiled with CEF4. I have been meaning to recompile to get around the problem. Google lets me into gmail and they let me download items from drive when the notices come into gmail, but direct use of google drive is blocked. They detect my CEF4 browser as an old version of "Firefox" now. I haven't checked that. Sometimes this is just the result of some temporal issue in the Google servers and they fix it but sometimes this a deliberate safety measure from Google against all embedded browsers. Try using a modern Firefox user agent string. Edited December 4, 2021 by salvadordf Share this post Link to post
Ann Lynnworth 11 Posted December 5, 2021 You are right! It was just a matter of passing a more recent useragent string. GlobalCEFApp.UserAgent := // TCefApplication with CEF4 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0'; 1 Share this post Link to post
klaus49 0 Posted November 3, 2022 I tried WebView4Delphi, but I could not get it to work. Yes, I know - I'm not using the indicated Delphi versions. I'm stuck with Delphi 6 PE. And WebView4Delphi just doesnt compile. I tried to tiddle with the source, but I was soon discouraged by the too many differencies between Delphi 6 and Delphi 7. So, may I ask you if there is any (perhaps older) version of WebView4Delphi, compatible with Delphi 6 ? Share this post Link to post
salvadordf 33 Posted November 3, 2022 6 hours ago, klaus49 said: So, may I ask you if there is any (perhaps older) version of WebView4Delphi, compatible with Delphi 6 ? I'm sorry but WebView4Delphi requires at least Delphi 7. If you need to test this component you can also use Lazarus or Delphi Community Edition. Share this post Link to post
klaus49 0 Posted November 5, 2022 Thank you for your reply. Unfortunately, I'm really stuck to Delphi 6 PE. I'm implementing a (huge) support DLL for another language, and all the stuff is writte, in Delphi 6 PE. Actually, there are over 1300 support functions available, all fully documented in french and english. I'm trying to add Edge-style support to my DLL. My actual WebBrowser functions are based on TWebBrowser (IE environment), and Window"s future evolutions will make this obsolete. I looked for WebView5Delphi for this very reason. Do you have any clue for enother (freeware) component supporting Edge, WebView or Chrome, operational under Delphi 6 PE ? This would be very helpfull ! Just a few words about myself: I am a 73 year old retired former informatic system engineer, creating open source programs for my own pleasure. Nothing commercial. But this explains why I can't invest in comercial products. Share this post Link to post
salvadordf 33 Posted November 5, 2022 11 hours ago, klaus49 said: Do you have any clue for enother (freeware) component supporting Edge, WebView or Chrome, operational under Delphi 6 PE ? This would be very helpfull ! I'm not sure if it supports Delphi 6 but I would also try Wke4Delphi : https://gitee.com/LangjiApp/Wke4Delphi Share this post Link to post
Fr0sT.Brutal 900 Posted November 7, 2022 Probably just a custom rendering engine will suffice? Like HTMLViewer (native) or Sciter (DLL) Share this post Link to post
Edwin Yip 154 Posted November 7, 2022 (edited) On 11/5/2022 at 7:30 PM, salvadordf said: I'm not sure if it supports Delphi 6 but I would also try Wke4Delphi : https://gitee.com/LangjiApp/Wke4Delphi This fork seems to be a bit updated: https://github.com/dshumko/WKE4Delphi Edited November 7, 2022 by Edwin Yip Share this post Link to post
NamoRamana 3 Posted July 6, 2023 Just want to say Thank you for this component. I needed vcl - TWebBrowser replacement for Delphi Rio.. and your component fit right into it. Thank you again and carry on! 🙂 1 Share this post Link to post
jaenicke 13 Posted July 18, 2023 On 11/5/2022 at 1:20 AM, klaus49 said: Unfortunately, I'm really stuck to Delphi 6 PE. I'm implementing a (huge) support DLL for another language, and all the stuff is writte, in Delphi 6 PE. What about using a second DLL? You could write this new DLL with Delphi Community Edition, where you can use newer components. Then you can load this new DLL by your old DLL and just redirect the calls to the new DLL. This way you do not have to upgrade your existing code, but you can use WebView4Delphi though. 1 Share this post Link to post
JohnLM 14 Posted March 13 Hi, I'm having trouble installing webview4delphi under Delphi XE7. I am receiving the following error: "The program can't start because WebView4DelphiVCLRTL.bpl is missing from your computer. Try reinstalling the program to fix this problem." But the file is showing in the listing below: Share this post Link to post
salvadordf 33 Posted March 13 Build WebView4DelphiVCLRTL.bpl, WebView4DelphiFMXRTL.bpl, WebView4DelphiVCL_designtime.bpl and WebView4DelphiFMX_designtime.bpl individually (in that order) or download the latest WebView4Delphi version from GitHub. I recently fixed a project order issue in the project group file thanks to the information on this thread. This Wiki article has all the details to install WebView4Delphi in Delphi. Share this post Link to post
JohnLM 14 Posted March 13 (edited) Unfortunately, I am still getting the same error message stated in my first post above. I've also downloaded the latest version, which are dated 3/9/2024. Please note, each file that I Build, I am first double-clicking on it to select it. WebView4DelphiVCLRTL.bpl, when I right-click it, I select Build, when it finishes, I get Done. WebView4DelphiFMXRTL.bpl, when I right-click it, I select Build, when it finishes, I get Warnings. WebView4DelphiVCL_designtime.bpl when I right-click it, I select Build, when it finishes, I get Done. ** this is the file that will not complete when I right-click and select Install. I get the error message stated earlier. ** WebView4DelphiFMX_designtime.bpl when I right-click, I select Build, when it finishes, I get Warnings. ** this file also will not complete when I right-click and select Install. I get the error message stated earlier. ** Edited March 13 by JohnLM Share this post Link to post
salvadordf 33 Posted March 13 The BPL files should be created in $(BDSCOMMONDIR)\Bpl and not in the WebView4Delphi\packages directory. Perhaps the "Package output directory" option is not set to $(BDSCOMMONDIR)\Bpl Open the Tools -> Options... menu option and then select the "Environment options -> Delphi options -> Library" node in the left tree view. There you can check the "Package output directory" value. If you can't modify that setting try adding the WebView4Delphi\packages directory to the search path. Share this post Link to post
salvadordf 33 Posted March 13 In case there are extra problems read this. Share this post Link to post
JohnLM 14 Posted March 13 (edited) Your suggestion to change the 'Package output directory' worked. The components have been added successfully. Thanks. However, when I try to compile a few of your demos, they fail. It seems none of the .dcu files are being created and Delphi can't find them at compile time. below are from your SimpleBroswer demo. They are in the Uses section with red underlines. uWVBrowser, uWVWinControl, uWVWindowParent, uWVTypes, uWVConstants, uWVTypeLibrary, uWVLibFunctions, uWVLoader, uWVInterfaces, uWVCoreWebView2Args, uWVBrowserBase Edited March 13 by JohnLM Share this post Link to post
JohnLM 14 Posted March 13 Resolved - regarding the .dcu files. Under the: options -> Environment Options -> Delphi Options -> Library -> Library Path: I added the "\WebView4Delphi-main\source\" folder After this update, the SimpleBrowser compiled and ran. Share this post Link to post