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.

Move CEF library to spesific folder

Post Reply
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Move CEF library to spesific folder

Post by salvadordf »

CEF4Delphi can be configured to use a different directory for the CEF3 binaries with this :

Code: Select all

  GlobalCEFApp.FrameworkDirPath     := 'cef';
  GlobalCEFApp.ResourcesDirPath     := 'cef';
  GlobalCEFApp.LocalesDirPath       := 'cef\locales';
Replace 'cef' and 'cef\locales' with your custom directory.

You may also need to set this property if you execute your app from the Start menu or other apps.

Code: Select all

  GlobalCEFApp.SetCurrentDir := True;
Use these settings before the GlobalCEFApp.StartMainProcess call.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Move CEF library to spesific folder

Post by salvadordf »

Hi,

Some files have hardcoded dependencies in Chromium and can't be configured that way :
https://magpcss.org/ceforum/viewtopic.php?f=6&t=14873

I suggest you copy the contents of the Release and Resources folders from the 32 bits binaries to the same folder, let's say "c:\cef32". Do the same with the 64 bits binaries and use "c:\cef64".

Your application would have to use this code :

Code: Select all

  {$IFDEF WIN32}
  GlobalCEFApp.FrameworkDirPath     := 'c:\cef32';
  GlobalCEFApp.ResourcesDirPath     := 'c:\cef32';
  GlobalCEFApp.LocalesDirPath       := 'c:\cef32\locales';
  {$ENDIF}

  {$IFDEF WIN64}
  GlobalCEFApp.FrameworkDirPath     := 'c:\cef64';
  GlobalCEFApp.ResourcesDirPath     := 'c:\cef64';
  GlobalCEFApp.LocalesDirPath       := 'c:\cef64\locales';
  {$ENDIF}
Post Reply