Commit 0aff4103 authored by Andreas Antener's avatar Andreas Antener

check for new and old flightgear path

parent b723939a
......@@ -133,7 +133,7 @@ void QGCFlightGearLink::run()
// On Windows we need to full qualify the location of the excecutable. The call to setWorkingDirectory only
// sets the QProcess context, not the QProcess::start context. For some strange reason this is not the case on
// OSX.
QDir fgProcessFullyQualified(_fgProcessWorkingDirPath);
QDir fgProcessFullyQualified(_fgProcessWorkingDirPath);
_fgProcessName = fgProcessFullyQualified.absoluteFilePath(_fgProcessName);
......@@ -663,8 +663,14 @@ bool QGCFlightGearLink::connectSimulation()
// that is pretty non-standard so we don't try to get fancy beyond hardcoding that path.
fgAppName = "";
// new path
_fgProcessName = "./fgfs";
_fgProcessWorkingDirPath = "/Applications/";
if(!QFileInfo(_fgProcessWorkingDirPath + _fgProcessName).exists()){
// old path
_fgProcessName = "./";
_fgProcessWorkingDirPath = "/Applications/";
fgRootPathProposedList += "/Applications/";
#elif defined Q_OS_WIN32
_fgProcessName = "fgfs.exe";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment