Skip to content

Commit

Permalink
Use correct path delimiter for Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Apr 13, 2016
1 parent af50f2d commit dcd1258
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions OMEdit/OMEditGUI/TLM/FetchInterfaceDataThread.cpp
Expand Up @@ -54,14 +54,15 @@ void FetchInterfaceDataThread::run()
connect(mpManagerProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(managerProcessFinished(int,QProcess::ExitStatus)));
QStringList args;
args << "-r" << fileInfo.absoluteFilePath();
TLMPage *pTLMPage = mpFetchInterfaceDataDialog->getMainWindow()->getOptionsDialog()->getTLMPage();
QProcessEnvironment environment;
#ifdef WIN32
environment = StringHandler::simulationProcessEnvironment();
environment.insert("PATH", pTLMPage->getTLMPluginPathTextBox()->text() + ";" + environment.value("PATH"));
#else
environment = QProcessEnvironment::systemEnvironment();
environment.insert("PATH", pTLMPage->getTLMPluginPathTextBox()->text() + ":" + environment.value("PATH"));
#endif
TLMPage *pTLMPage = mpFetchInterfaceDataDialog->getMainWindow()->getOptionsDialog()->getTLMPage();
environment.insert("PATH", pTLMPage->getTLMPluginPathTextBox()->text() + ";" + environment.value("PATH"));
environment.insert("TLMPluginPath", pTLMPage->getTLMPluginPathTextBox()->text());
mpManagerProcess->setProcessEnvironment(environment);
mpManagerProcess->start(pTLMPage->getTLMManagerProcessTextBox()->text(), args);
Expand Down
6 changes: 4 additions & 2 deletions OMEdit/OMEditGUI/TLM/TLMCoSimulationThread.cpp
Expand Up @@ -70,10 +70,11 @@ void TLMCoSimulationThread::runManager()
QProcessEnvironment environment;
#ifdef WIN32
environment = StringHandler::simulationProcessEnvironment();
environment.insert("PATH", tlmCoSimulationOptions.getTLMPluginPath() + ";" + environment.value("PATH"));
#else
environment = QProcessEnvironment::systemEnvironment();
environment.insert("PATH", tlmCoSimulationOptions.getTLMPluginPath() + ":" + environment.value("PATH"));
#endif
environment.insert("PATH", tlmCoSimulationOptions.getTLMPluginPath() + ";" + environment.value("PATH"));
environment.insert("TLMPluginPath", tlmCoSimulationOptions.getTLMPluginPath());
mpManagerProcess->setProcessEnvironment(environment);
// start the executable
Expand All @@ -99,10 +100,11 @@ void TLMCoSimulationThread::runMonitor()
QProcessEnvironment environment;
#ifdef WIN32
environment = StringHandler::simulationProcessEnvironment();
environment.insert("PATH", tlmCoSimulationOptions.getTLMPluginPath() + ";" + environment.value("PATH"));
#else
environment = QProcessEnvironment::systemEnvironment();
environment.insert("PATH", tlmCoSimulationOptions.getTLMPluginPath() + ":" + environment.value("PATH"));
#endif
environment.insert("PATH", tlmCoSimulationOptions.getTLMPluginPath() + ";" + environment.value("PATH"));
environment.insert("TLMPluginPath", tlmCoSimulationOptions.getTLMPluginPath());
mpMonitorProcess->setProcessEnvironment(environment);
mpMonitorProcess->start(fileName, args);
Expand Down

0 comments on commit dcd1258

Please sign in to comment.