Lazarus

Programming => Packages and Libraries => Topic started by: salvadordf on May 18, 2018, 09:53:04 am

Title: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on May 18, 2018, 09:53:04 am
Hi,

I'm the maintainer of an open source project called CEF4Delphi that was released more a than a year ago to embed Chromium-based browsers in our applications.

Originally, CEF4Delphi only supported Delphi but the latest version also has Lazarus/FPC support and it can be used for Windows targets.

CEF4Delphi is based on DCEF3, made by Henri Gourvest. It uses the latest CEF3 branch  3.3359.1772.gd1df190 which includes Chromium 66.0.3359.117.

This is my first Lazarus component and any help from someone with more experience with Lazarus/FPC is more than welcome.

If you want to test it, install the cef4delphi_lazarus.lpk package and run the SimpleLazarusBrowser demo.

https://github.com/salvadordf/CEF4Delphi
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: silvestre on May 18, 2018, 10:58:39 am
I have been using CEF4Delphi for some months now as a replacement for Twebbrowser in Delphi and it is great news that it is also available in Fpc/Lazarus, opening the multi-platform field. I have only words of praise for Salvador's work. :)
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: AlexTP on May 24, 2018, 09:21:37 pm
Suggestions
1- move .lrs files to subdir source/res/, and include them from this subdir.

2- make folders like in my components:
see e.g. https://github.com/Alexey-T/ATSynEdit
this way user can copy entire subdir e.g. cef4delphi/ (it has *.pas *.lpk *.lrs in dirs) and its done.
demos go to another dir, and user doesnt copy them.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: AlexTP on May 24, 2018, 09:26:21 pm
3- I hope ustring (in your code) is UnicodeString or string, not Widestring.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on May 25, 2018, 08:23:37 am
Yes, ustring is a unicodestring in FPC.

Thanks for the suggestions!
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: JernejL on May 25, 2018, 09:56:45 am
Is there a possibility of using this on linux or arm platforms?
 
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on May 25, 2018, 10:50:55 am
Sorry, but at this moment CEF4Delphi only supports Windows on 32bit and 64bit.

I would love to add support for other platforms but I don't know how to program in linux or macos.

In the latest CEF4Delphi update I added some CEF initialization changes needed to support linux and macos but any help would be greatly appreciated.

Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on January 08, 2019, 07:34:43 pm
Just a quick update on the state of this component in Lazarus.

The latest CEF4Delphi update has many more conditional compilation directives and now it's possible to build CEF4Delphi in Linux using Lazarus 2.0RC3 in Linux Mint 19.1

...but I still have to fix a lot of things because the demo still crashes in Linux  >:(

The demos work fine in Windows.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: avra on May 14, 2019, 03:41:20 pm
I have converted most of the Delphi demos to Lazarus and fixed uCEFInterfaces.pas. Enjoy!  :)

Temporary download link:
https://bitbucket.org/avra/ct4laz/downloads/tmp_cef4delphi_demos_and_fixes.zip

Tested on Win10x64 with 32bit FPC 3.0.5 and LAZ 2.0.1
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on May 14, 2019, 04:22:17 pm
Thank you so much avra!  :D

Right now I'm a bit busy but I'll add them to the project as soon as I can.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: avra on May 14, 2019, 06:15:27 pm
Thank you so much avra!  :D
You're most welcome. You are the one who did the hard work, not me. Please test full functionality of each demo, 'cause I am a CEF beginner and I don't know what functionality should be in each demo.

Right now I'm a bit busy but I'll add them to the project as soon as I can.
Take your time...
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on May 19, 2019, 04:29:28 pm
I just uploaded a new CEF4Delphi version with almost all the demos you sent me.

I had to delete a few Lazarus demos because :

CEF4Delphi is now updated to CEF 74.1.19 which includes Chromium 74.0.3729.157

Thank you very much avra!!!  :D
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: avra on May 20, 2019, 01:21:10 am
I just uploaded a new CEF4Delphi version with almost all the demos you sent me.
Thanks! Now I will delete the lazarus demos archive file on temporary link.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: krystian-broniszewski on November 01, 2020, 06:09:03 pm
I have always problem with dcef4 in lazarus, delphi7 and new delphi10.4. I copied dll's to c:/windows/system32 or program folder. dcef4 form is always blank. Component dcef4 installed corectly

Old cef3 works corectly.

P.S I am sorry for my english.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on November 01, 2020, 06:23:07 pm
Please, read this document and try to run one of the demos :
https://github.com/salvadordf/CEF4Delphi/wiki/Before-you-run-the-demos

There's even more information here :
https://www.briskbard.com/index.php?lang=en&pageid=cef
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on December 13, 2020, 07:00:55 pm
I just uploaded a new CEF4Delphi demo for Lazarus called "TinyBrowser2" that works on Linux! :D

The rest of the linux demos still have issues but I'm very happy for this step.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on December 28, 2020, 06:42:05 pm
The latest CEF4Delphi update fixes the crashes in the SimpleOSRBrowser demo in Linux !  :D

There are still some issues and missing features but that demo can navigate.

Feel free to make suggestions and create pull requests if you have experience with Lazarus/FPC in Linux.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on December 30, 2020, 07:44:40 pm
Yet another Linux demo working in the latest CEF4Delphi update.

Now we have a browser in normal mode in the SimpleBrowser2 demo.
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: six1 on January 01, 2021, 07:50:13 am
Thanks Salvador, that sounds great!
Title: Re: CEF4Delphi now supports Lazarus/FPC
Post by: salvadordf on January 06, 2021, 07:11:12 pm
I recently bought a Raspberry Pi 4 and installed Lazarus 2.0.10 with Fpcupdeluxe.

Then I installed the latest CEF4Delphi and it works!   :D
TinyPortal © 2005-2018