Hi,
You need to copy the contents of the Release and Resources directories to the directory of your application's exe.
The final layout is this :
Please, check that all the files are copied next to the executable.
If you still get this error set a breakpoint inside TCefApplication.CheckCEFLibrary (uCEFApplication.pas) and inspect what path is used to search for the binaries.
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
CEF3 binaries missing !
- salvadordf
- Posts: 4094
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
-
- Posts: 9
- Joined: Sun May 13, 2018 5:51 am
Re: CEF3 binaries missing !
For anybody else reading this, comments in the sample programs say that you can set the paths to the binaries in the .dpr file before the StartMainProcess call, and this does also work, and unless you're saving your executable files all in the same folder, to me this makes far more sense. For now at least, I've copied the binaries to the CEF4Delphi-master\bin folder where the sample's executables end up, and with other applications I set the GlobalCEFApp properties to point to that folder (and its sub-folders). Specifically, I do this:
Code: Select all
const cefPath = '{my path}\CEF4Delphi-master\bin';
begin
GlobalCEFApp:=TCefApplication.Create;
with GlobalCEFApp do begin
FrameworkDirPath := cefpath;
ResourcesDirPath := cefpath;
LocalesDirPath := cefpath+'\locales';
cache := cefpath+'\cef\cache';
cookies := cefpath+'\cef\cookies';
UserDataPath := cefpath+'\cef\User Data';
{other settings}
if StartMainProcess then begin
{Normal code including creating forms}
end;
end;
end.
Re: CEF3 binaries missing !
Thanks for the information. Actually you helped in an unexpected way. There is information at different web places how to set up CEF4 in order to hide cef stuff to a subfolder. I also tried but failed, also many mentioned that some files should still be at the root of the program. But your answer differ in that FramesDir and ResourceDir point to the same location. Before that I tried to separate them. It's not a good idea, at least for current versions. Now all the files related to cef/chromium live in a subfolder.Philip Rayment wrote: ↑Sun May 27, 2018 4:00 am ... I set the GlobalCEFApp properties to point to that folder (and its sub-folders). Specifically, I do this:Code: Select all
.... FrameworkDirPath := cefpath; ResourcesDirPath := cefpath; ...
-
- Posts: 1
- Joined: Wed Mar 17, 2021 5:37 pm
Re: CEF3 binaries missing !
Is it possible to link those CEF3 binaries files with .exe ?
I cannot distribute my application with all these files, I am forced to distribute to clients only one exe file
TIA
I cannot distribute my application with all these files, I am forced to distribute to clients only one exe file
TIA
- salvadordf
- Posts: 4094
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: CEF3 binaries missing !
I've never tried that.
There's some information about linking the CEF binaries statically for other languages if you search "libcef statically linked" in Google but I'm afraid that information can't be used in Delphi applications.
Then there's the problem with licenses. Chromium uses a lot of code from different open source projects with different licenses. If you link CEF statically you should make sure your license is compatible with all the rest.
There's some information about linking the CEF binaries statically for other languages if you search "libcef statically linked" in Google but I'm afraid that information can't be used in Delphi applications.
Then there's the problem with licenses. Chromium uses a lot of code from different open source projects with different licenses. If you link CEF statically you should make sure your license is compatible with all the rest.