Commit 583c61d7 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #2175 from UAVenture/mac_flightgear_path

Update path to executable for FlightGear on OSX
parents e4f8eea2 0aff4103
...@@ -133,7 +133,7 @@ void QGCFlightGearLink::run() ...@@ -133,7 +133,7 @@ void QGCFlightGearLink::run()
// On Windows we need to full qualify the location of the excecutable. The call to setWorkingDirectory only // 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 // sets the QProcess context, not the QProcess::start context. For some strange reason this is not the case on
// OSX. // OSX.
QDir fgProcessFullyQualified(_fgProcessWorkingDirPath); QDir fgProcessFullyQualified(_fgProcessWorkingDirPath);
_fgProcessName = fgProcessFullyQualified.absoluteFilePath(_fgProcessName); _fgProcessName = fgProcessFullyQualified.absoluteFilePath(_fgProcessName);
#endif #endif
...@@ -663,8 +663,14 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -663,8 +663,14 @@ bool QGCFlightGearLink::connectSimulation()
// that is pretty non-standard so we don't try to get fancy beyond hardcoding that path. // that is pretty non-standard so we don't try to get fancy beyond hardcoding that path.
fgAppDir.setPath("/Applications"); fgAppDir.setPath("/Applications");
fgAppName = "FlightGear.app"; fgAppName = "FlightGear.app";
_fgProcessName = "./fgfs.sh"; // new path
_fgProcessWorkingDirPath = "/Applications/FlightGear.app/Contents/Resources/"; _fgProcessName = "./fgfs";
_fgProcessWorkingDirPath = "/Applications/FlightGear.app/Contents/MacOS/";
if(!QFileInfo(_fgProcessWorkingDirPath + _fgProcessName).exists()){
// old path
_fgProcessName = "./fgfs.sh";
_fgProcessWorkingDirPath = "/Applications/FlightGear.app/Contents/Resources/";
}
fgRootPathProposedList += "/Applications/FlightGear.app/Contents/Resources/data/"; fgRootPathProposedList += "/Applications/FlightGear.app/Contents/Resources/data/";
#elif defined Q_OS_WIN32 #elif defined Q_OS_WIN32
_fgProcessName = "fgfs.exe"; _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