Merge pull request #2608 from opentx/raphaelcoeffic/issue2549

Fixes #2549 - Use PrefixPath to find the simulator libs
This commit is contained in:
Bertrand Songis
2015-08-01 08:44:27 +02:00
@@ -2,6 +2,7 @@
#include <QDebug>
#include <QDir>
#include <QLibrary>
#include <QLibraryInfo>
#include <QMap>
#include <QMessageBox>
#include "version.h"
@@ -46,9 +47,13 @@ void registerSimulators()
simulatorsFound = true;
}
#if !( (!defined __GNUC__) || (defined __CYGWIN__) )
#if defined(__APPLE__) || !( (!defined __GNUC__) || (defined __CYGWIN__) )
if (!simulatorsFound) {
#if defined(__APPLE__)
dir = QLibraryInfo::location(QLibraryInfo::PrefixPath) + "/Resources";
#else
dir = SIMULATOR_LIB_SEARCH_PATH;
#endif
foreach(QString filename, dir.entryList(filters, QDir::Files)) {
registerSimulator(filename.prepend(dir.path() + "/"));
simulatorsFound = true;