Lazarus
Programming => Packages and Libraries => Topic started 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
-
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. :)
-
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.
-
3- I hope ustring (in your code) is UnicodeString or string, not Widestring.
-
Yes, ustring is a unicodestring in FPC.
Thanks for the suggestions!
-
Is there a possibility of using this on linux or arm platforms?
-
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.
-
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.
-
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
-
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.
-
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...
-
I just uploaded a new CEF4Delphi version with almost all the demos you sent me.
I had to delete a few Lazarus demos because :
- MDI forms weren't working properly
- I couldn't find a virtual keyboard for Lazarus
- Some unexpected issues with DLLs
CEF4Delphi is now updated to CEF 74.1.19 which includes Chromium 74.0.3729.157
Thank you very much avra!!! :D
-
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.
-
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.
-
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
-
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.
-
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.
-
Yet another Linux demo working in the latest CEF4Delphi update.
Now we have a browser in normal mode in the SimpleBrowser2 demo.
-
Thanks Salvador, that sounds great!
-
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