Recent

Author Topic: CEF4Delphi now supports Lazarus/FPC  (Read 12122 times)

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
CEF4Delphi now supports Lazarus/FPC
« 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
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

silvestre

  • Jr. Member
  • **
  • Posts: 76
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #1 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. :)

AlexTP

  • Hero Member
  • *****
  • Posts: 2384
    • UVviewsoft
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #2 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.

AlexTP

  • Hero Member
  • *****
  • Posts: 2384
    • UVviewsoft
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #3 on: May 24, 2018, 09:26:21 pm »
3- I hope ustring (in your code) is UnicodeString or string, not Widestring.

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #4 on: May 25, 2018, 08:23:37 am »
Yes, ustring is a unicodestring in FPC.

Thanks for the suggestions!
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

JernejL

  • Jr. Member
  • **
  • Posts: 92
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #5 on: May 25, 2018, 09:56:45 am »
Is there a possibility of using this on linux or arm platforms?
 

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #6 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.

Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #7 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.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #8 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
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #9 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.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #10 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...
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #11 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 :
  • 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
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #12 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.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

krystian-broniszewski

  • Newbie
  • Posts: 1
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #13 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.

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: CEF4Delphi now supports Lazarus/FPC
« Reply #14 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
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

 

TinyPortal © 2005-2018