Skip to content

Commit

Permalink
- Call omc_Main_setWindowsPaths on Windows so that APIs like simulate…
Browse files Browse the repository at this point in the history
… can work properly.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25691 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Apr 22, 2015
1 parent b0f6071 commit 05a6017
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -49,6 +49,9 @@ void (*omc_throw)(threadData_t*) __attribute__ ((noreturn)) = omc_throw_function
int omc_Main_handleCommand(void *threadData, void *imsg, void *ist, void **omsg, void **ost);
void* omc_Main_init(void *threadData, void *args);
void* omc_Main_readSettings(void *threadData, void *args);
#ifdef WIN32
void omc_Main_setWindowsPaths(threadData_t *threadData, void* _inOMHome);
#endif
}

#include <stdlib.h>
Expand Down Expand Up @@ -302,6 +305,9 @@ bool OMCProxy::initializeOMC()
// set OpenModelicaHome variable
sendCommand("getInstallationDirectoryPath()");
Helper::OpenModelicaHome = StringHandler::removeFirstLastQuotes(getResult());
#ifdef WIN32
omc_Main_setWindowsPaths(threadData, mmc_mk_scon(Helper::OpenModelicaHome.toStdString().c_str()));
#endif
/* set the tmp directory as the working directory */
changeDirectory(tmpPath);
// set the OpenModelicaLibrary variable.
Expand Down

0 comments on commit 05a6017

Please sign in to comment.