Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PATH with library dirs before system calls. (#8552)
- On Windows the required DLLs need to be in the same directory as the executable or they need to be in PATH. So, before we issue commands that launch simulation executables, update the PATH by prepending the library dirs used for linking the executable. E.g. If these paths are used to compile a simulation executable: ``` { \"-LC:/Users/username/AppData/Roaming/.openmodelica/libraries/Buildings/Resources/Library/win64\", \"-LC:/Users/username/AppData/Roaming/.openmodelica/libraries/Buildings/Resources/Library\", ... } ``` we update the PATH to ``` C:\Users\username\AppData\Roaming\.openmodelica\libraries\Buildings\Resources\Library\win64; C:\Users\username\AppData\Roaming\.openmodelica\libraries\Buildings\Resources\Library; %PATH% ``` before launching the simulation executable. Then we reset it back immediately afterwards. - Fixes #8546. Fixes #6242.
- Loading branch information
Showing
1 changed file
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters