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