Forum > Networking and Web Programming

fpCef3: cef3lib.pas: set CefResourcesDirPath/CefFrameworkDirPath in FormCreate?

(1/3) > >>

PaulANormanNZ:
Hi

What are CefResourcesDirPath and  CefFrameworkDirPath (cef3lib.pas) for?

CefLocalesDirPath can/must be set in FormCreate,
 but is it possible to also point to the required DLLs etc through CefResourcesDirPath and or CefFrameworkDirPath or other in a unit's FormCreate?

Or must the resources be in the project directory or path, compulsorily?

I would like to share these between applications, with out the overhead of all of the files needing to be duplicated for each application on a User's device.

I'm developing with fpCEF3-3.3029 and matched resources
on Windows 8.1
Lazarus 1.8.0 r56594 FPC 3.0.4 x86_64-win64-win32/win64.

TIA

Paul

Thaddy:
IIRC there is an example for chromium somewhere pointed to on this forum.

This topic may also be of interest http://forum.lazarus.freepascal.org/index.php/topic,34519.msg226984.html#msg226984

And the wiki of course http://wiki.freepascal.org/fpCEF3 It worked for me on Windows and Linux-arm.

PaulANormanNZ:
Thanks Thaddy,

I've had Chromium running nicely thank you, I was just trying to find out if it was possible to share it's resources (some 460mb? per project  :) ) between different apps on the same machine.

I did a search on the CefResourcesDirPath/CefFrameworkDirPath variables on this Forum but nothing had turned up; and Google only has one result which goes to the GitHub source...

https://www.google.co.nz/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjSpeDjsJ3YAhUD2LwKHQf6A6UQFggrMAA&url=https%3A%2F%2Fgithub.com%2Fdliw%2FfpCEF3%2Fblob%2Fmaster%2Fcef3lib.pas&usg=AOvVaw2q3KRPLaH3-IizqxkmHfkp that is https://github.com/dliw/fpCEF3/blob/master/cef3lib.pas

The GitHub Readme says...


--- Quote ---Resources

Unless CefResourcesDirPath and CefLocalesDirPath is set, CEF expects the resources to be in the same folder as the executable.

Binaries

The setup of the binaries depends on the target operating system:
Windows

Copy all files from either Debug or Release to the folder your .exe will be in.


--- End quote ---

I wanted to know if CefFrameworkDirPath could point to the binaries outside the app's .exe folder, or what CefFrameworkDirPath actually refers to?

I'm keen to find out if its possible to share the CEF3 Release folder, as the Release directory alone contains 416 MB and it would be good to be able to share them between projects without installing them in Windows .dll (etc) area(s) to keep better and simpler version control.

... so that's why I posted here.

That http://forum.lazarus.freepascal.org/index.php/topic,34519.msg226984.html#msg226984 link is very helpful for many other useful things thanks.

Anyone have any direct experience please with CefResourcesDirPath and particularly: CefFrameworkDirPath?

TIA

Paul

Altagur:
You have to set this path before the cef load it, so if the cef is on your form, and created design time you have to delete it and create at runtime after you set this two path, or set in  initialization, or the application initialization section, lpr.

I use the two path to redirect to one path for example: c:\proj\cefVer1\
, i didn't try with different path.

I copied all file except chrome_elf.dll, if i copied its throw exception.


PaulANormanNZ:
Dear Altagur,

So just to confirm,

if at run time for each project,  I set both CefResourcesDirPath and CefFrameworkDirPath to one reusable/sharable path, say for example: c:\proj\cefVer1\
 and have everything required in there exceept for chrome_elf.dll,

and always have  chrome_elf.dll in each project's top directory,

I should be alright?

Previously it became a real problem in just trying to run the FPCef3 examples folders :-)

Thanks for that,
Paul

Navigation

[0] Message Index

[#] Next page

Go to full version