Page 1 of 1

Re: CEF3 binaries missing !

Posted: Sat May 26, 2018 9:20 pm
by salvadordf
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 :
Image

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.

Re: CEF3 binaries missing !

Posted: Sun May 27, 2018 4:00 am
by Philip Rayment
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 !

Posted: Fri Mar 27, 2020 8:56 am
by maxedi
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;
...
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.

Re: CEF3 binaries missing !

Posted: Wed Mar 17, 2021 5:43 pm
by Thierry2607
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

Re: CEF3 binaries missing !

Posted: Thu Mar 18, 2021 9:04 am
by salvadordf
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.