Lazarus

Announcements => Third party => Topic started by: salvadordf on December 03, 2021, 11:03:56 pm

Title: My new project : WebView4Delphi
Post by: salvadordf on December 03, 2021, 11:03:56 pm

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
Title: Re: My new project : WebView4Delphi
Post by: loaded on December 04, 2021, 08:06:02 am
salvadordf , thanks for your detailed work. I think you did a great job.
I used many of the tricks I learned creating CEF4Delphi and you will notice many similarities if you used it.
We use CEF4Delphi in our projects. It was a bit difficult in the beginning, but now it works very stable and smoothly.
While we're on the subject, I'd like to thank you here. Respects.
Title: Re: My new project : WebView4Delphi
Post by: zoltanleo on December 04, 2021, 09:08:08 am
I just published a new project in GitHub called WebView4Delphi.
Hi salvadordf.

This is a great job. The package was installed successfully, but ... when I try to run any demo I always get some error
Code: Pascal  [Select][+][-]
  1. Project TabbedBrowser raised exception class 'Exception' with message:
  2. Failed to create win32 control, error: 1407 : �� ������� ����� ����� ����.
  3.  
  4.  In file 'win32\win32wscontrols.pp' at line 225
Title: Re: My new project : WebView4Delphi
Post by: salvadordf on December 04, 2021, 10:53:12 am
Please, download WebView4Delphi again from GitHub.

I just fixed an issue with the ".ignore" file and now all the required files are included in the package.

Alse make sure you install the evergreen WebView2 runtime before executing the demos :
https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section
Title: Re: My new project : WebView4Delphi
Post by: AlexTP on December 04, 2021, 02:11:30 pm
Posted small info to wiki
https://wiki.freepascal.org/Webbrowser#WebView4Delphi
Title: Re: My new project : WebView4Delphi
Post by: salvadordf on December 04, 2021, 02:38:05 pm
Posted small info to wiki
https://wiki.freepascal.org/Webbrowser#WebView4Delphi
Thanks!  :D
Title: Re: My new project : WebView4Delphi
Post by: alaa123456789 on December 04, 2021, 06:00:33 pm
thanks for your efforts , actually this what we have asked on many topics on this forum , you have done great job wish you the best .
wish to be added to online package manger to be easier for all users .
Title: Re: My new project : WebView4Delphi
Post by: AlexTP on December 04, 2021, 07:27:09 pm
Q:
does it need NuGet package _or_ MS site package, or does it need both?
Title: Re: My new project : WebView4Delphi
Post by: salvadordf on December 04, 2021, 07:51:37 pm
If you have Windows 11 then you already have the "evergreen" version of the Microsoft Edge WebView2 Runtime installed in your computer but older Windows versions need to install it. Download it from here :
https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

Read the license carefully and pay special attention to the 3.a, 3.b, 9.a and 9.b points because your users might not like what Microsoft is doing.

The WebView4Delphi demos are configured to use the "evergreen" version.

WebView4Delphi loads the WebView2Loader.dll library found inside the Microsoft.Web.WebView2 NuGet package version 1.0.1054.31 but I already extracted that DLL and copied it into the bin32 abd bin64 directories, where the demo executables are automatically created.
Title: Re: My new project : WebView4Delphi
Post by: AlexTP on December 04, 2021, 07:58:39 pm
Okay, and I posted this to the new wiki page
https://wiki.freepascal.org/WebView4Delphi
(linked from https://wiki.freepascal.org/Webbrowser#WebView4Delphi )
TinyPortal © 2005-2018