Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Sharing Framework and Resoure files #65
Over on the FP Lazarus Forum under the thread:
There's been a discussion: fpCef3: cef3lib.pas: set CefResourcesDirPath/CefFrameworkDirPath in FormCreate?
Altagur proposed a very workable solution in a discourse with PaulANormanNZ (this writer) there.
The purpose was to discover a way to share the CEF3 binaries and resources on a target machine when there will be two or more projects using fpCEF3.
Considerable disk usage savings were envisaged.
The current result of that discussion thread for working under Windows is:
1. making a small alteration to a projects .lpr pin pointing the shared location(s) on disk.
2. and presently making a small alteration to cef3api.pas
3. placing CEF3 locale folder and all resources and framework binaries and files in a shared local disk location
4. but placing chrome_elf.dll in Each project's .exe folder (the additional presence of chrome_elf.dll in the new CEF3 shared folder is redundant, but apparently harmless)
For completeness: it might be worth looking at whether exposing a setting for chrome_elf.dll similar to that done for
Once this is stabilised, would it be worth updating the Lazarus Wiki entry for fpCEF3 to reflect whatever is finally settled upon by the fpCEF3 maintainers?
Point 1. .lpr made to look something like:
Point 2. cef3api.pas, is as such:-
Point 3. After downloading from either https://cefbuilds.com or http://www.magpcss.net/cef_downloads
The shared framework (Release) and Resource' folder might then look like this:
(00-cef_version_3029-1619.txt is developer written to keep track of things)
a) Potentially this all lends itself to version control.
Point 4. chrome_elf.dll placed in Each Project's .exe directory - this is done as Altagur suspects this is called from a compiled library and we can find no access in FP to detailing it's location at run time at present.
Well, it's only me...
Some general considerations:
I think I will expose a new variable like
Generally I don't think fpCEF should enforce an usage pattern in any way.
Thank you very much for your work on this, Lazarus having Chromium available in this form is a very big thing.
Great news, when you look at the Lazarus Forum entry ---
Its not clear from that, nor at CEFbuilds or previously magpcss (now closed?) what to download...
▶ Standard Distribution
So I'm guessing from what you have written it is either of ...?
▶ Standard Distribution
Which one is best please?
Thank you for that.
I find its worth sticking at a series point on these sorts of library / IDE component releases, and using it for applications for a period of time - can make updates of an existing project more straight forward where the cef3 is not needing itself to be updated. - componenets remain the same in the IDE.
--- Only changing if there is a serious security issue flagged, or a major fix, or necessary new feature added. This keeps Lazarus IDE stable, and development more straight forward.
Actually a separate install / manager for versioning shared/controlled binary libraries and resources is useful in such situations, and I have explored such approaches in the past - and will look at it again if necessary for this.
That sounds wonderful! For myself, I was quite prepared to live with the current workaround, but that would help people greatly, and would avoid developers needing to edit cef3api.pas on each new release.
Really appreciate that, and gratefully acknowledge how your release empowered Altagur and I to find a solution - you soundly have exposed everything we needed for something that you may not have actually planned for yourself, and that is extremely freeing on other developers.
Is the Lazarus Forum, or here, the best place to seek answers on questions on things like the correct usage of VisitDomProc() and things like document.getElementById() ?
Minimal Distribution is all you usually need. Standard Distribution also contains the debug version of CEF.
Ok - but this is not something fpCEF will do.
Unfortunately, it will take at least one month until I have time to work on fpCEF again.
Some basic usage patterns are in the examples, also search for answers on the CEF forum. As fpCEF is a header translation, the usage pattern does not change, whether you use C or Pascal.
I just enabled notifications for the Networking and Web Programming board on the Lazarus Forum, so you can post your questions there. Of course you also can create an issue here, flag it as "question". I will try to answer as good as I can.