I'm working on an application that installs into "Program Files", but the installer sets the startup directory of the desktop shortcut it creates, to the public "Documents" folder.
When I try to start the app from this shortcut, the app errs because the chromium libraries are not found. The libraries *are* installed into the .exe folder in "Program Files" and the app starts up if I manually go to that folder and start it.
Is it WAD that the libraries are not found, if the active directory is not the same as the directory containing the executable?
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.
Libraries not found when startup directory is different from exe directory
-
- Posts: 2
- Joined: Thu Jul 06, 2017 12:22 am
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Libraries not found when startup directory is different from exe directory
Hi,
Try setting the full path to the libraries in GlobalCEFApp.FrameworkDirPath and GlobalCEFApp.ResourcesDirPath before the GlobalCEFApp.StartMainProcess call in the DPR file.
Try setting the full path to the libraries in GlobalCEFApp.FrameworkDirPath and GlobalCEFApp.ResourcesDirPath before the GlobalCEFApp.StartMainProcess call in the DPR file.
-
- Posts: 2
- Joined: Thu Jul 06, 2017 12:22 am
Re: Libraries not found when startup directory is different from exe directory
Thanks, that works, when I also set the GlobalCEFApp.LocalesDirPath.
However, the question still remains, shouldn't the libraries be found in the exe directory by default? If I put other needed DLLs there, Windows still finds and loads them.
However, the question still remains, shouldn't the libraries be found in the exe directory by default? If I put other needed DLLs there, Windows still finds and loads them.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Libraries not found when startup directory is different from exe directory
Hi,
Yes. The CEF3 binaries are loaded by default from the main exe directory but in some rare cases it's better to specify the full path.anothercef4duser2 wrote: Fri Jul 07, 2017 5:32 am Thanks, that works, when I also set the GlobalCEFApp.LocalesDirPath.
However, the question still remains, shouldn't the libraries be found in the exe directory by default? If I put other needed DLLs there, Windows still finds and loads them.