salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.21k stars 372 forks source link

Custom path for libraries/dependencies #419

Closed chmichael closed 2 years ago

chmichael commented 2 years ago

Hello, Currently we have to place the "dll dependencies" within our app folder. Can you add a Path variable do define where to search those dependencies in order to be more clean ?

eg chromiumlibs := 'c:\mychromiumlibs';

Thank you

salvadordf commented 2 years ago

Hi,

Set the path to the CEF binaries using GlobalCEFApp.FrameworkDirPath, GlobalCEFApp.ResourcesDirPath and GlobalCEFApp.LocalesDirPath before the GlobalCEFApp.StartMainProcess call as you can see here : https://github.com/salvadordf/CEF4Delphi/blob/959d152d9c5ca7420c9eed3ac73e4226cd034e6f/demos/Delphi_VCL/SimpleBrowser2/SimpleBrowser2.dpr#L65

salvadordf commented 2 years ago

I forgot to add that in case your application is executed from another application you should set GlobalCEFApp.SetCurrentDir to True.

chmichael commented 2 years ago

Thank you