QStringList arguments;
// check for new ECP
-#ifndef CONFIG_WIN32
- QString newCommand = QDir(QCoreApplication::applicationDirPath() +
+#if defined(CONFIG_WIN32)
+ QString ecpCommand = QDir(QCoreApplication::applicationDirPath() +
+ QDir::separator() + SDK_EMULATOR_TOOLS_BIN_PATH +
+ SDK_ECP_FILE + ".cmd").absolutePath();
+#elif defined(CONFIG_LINUX)
+ QString ecpCommand = QDir(QCoreApplication::applicationDirPath() +
QDir::separator() + SDK_EMULATOR_TOOLS_BIN_PATH +
SDK_ECP_FILE).absolutePath();
#else
- QString newCommand = QDir(QCoreApplication::applicationDirPath() +
+ QString ecpCommand = QDir(QCoreApplication::applicationDirPath() +
QDir::separator() + SDK_EMULATOR_TOOLS_BIN_PATH +
- SDK_ECP_FILE + ".cmd").absolutePath();
+ SDK_ECP_FILE + ".app").absolutePath();
+#endif
+ if (QFileInfo(ecpCommand).exists()) {
+#if defined(CONFIG_DARWIN)
+ // In mac os x, launch .app using "open" command
+ // ex : open emulator-control-panel.app --args vm_name=... platform_version=...
+ command = "open";
+ arguments << ecpCommand << "--args";
+#else
+ command = ecpCommand;
#endif
- if (QFileInfo(newCommand).exists()) {
- command = newCommand;
-
QString vmNameOpt = "vm_name=" + parent->getUiInfo()->getVmName();
QString platformVersionOpt = "platform_version=" +
QString::fromLocal8Bit(get_platform_version());