Also search for simulators in companion.exe path on Windows (Fix #3012)
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
#if defined WIN32 || !defined __GNUC__
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
QMap<QString, SimulatorFactory *> registered_simulators;
|
QMap<QString, SimulatorFactory *> registered_simulators;
|
||||||
|
|
||||||
@@ -47,10 +50,15 @@ void registerSimulators()
|
|||||||
simulatorsFound = true;
|
simulatorsFound = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__APPLE__) || !( (!defined __GNUC__) || (defined __CYGWIN__) )
|
|
||||||
if (!simulatorsFound) {
|
if (!simulatorsFound) {
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
dir = QLibraryInfo::location(QLibraryInfo::PrefixPath) + "/Resources";
|
dir = QLibraryInfo::location(QLibraryInfo::PrefixPath) + "/Resources";
|
||||||
|
#elif (!defined __GNUC__) || (defined __CYGWIN__)
|
||||||
|
char name[MAX_PATH];
|
||||||
|
GetModuleFileName(NULL, name, MAX_PATH);
|
||||||
|
QString path(name);
|
||||||
|
path.truncate(path.lastIndexOf('\\'));
|
||||||
|
dir.setPath(path);
|
||||||
#else
|
#else
|
||||||
dir = SIMULATOR_LIB_SEARCH_PATH;
|
dir = SIMULATOR_LIB_SEARCH_PATH;
|
||||||
#endif
|
#endif
|
||||||
@@ -59,7 +67,6 @@ void registerSimulators()
|
|||||||
simulatorsFound = true;
|
simulatorsFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SimulatorFactory *getSimulatorFactory(const QString &name)
|
SimulatorFactory *getSimulatorFactory(const QString &name)
|
||||||
|
|||||||
Reference in New Issue
Block a user