summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@digia.com>2013-06-04 16:42:26 +0200
committerDaniel Teske <daniel.teske@digia.com>2013-06-10 11:43:44 +0200
commit8011d0c32b68d68352497a3023ea3fe43cb87ac1 (patch)
tree74589b80f5e4193451e5a8243cd370ae65975c16
parentb6e9ebb7e6610c835b2057c4d15c57cc7ade92b6 (diff)
downloadqt-creator-8011d0c32b68d68352497a3023ea3fe43cb87ac1.tar.gz
Android: Use '/' in INSTALL_ROOT if sh.exe is in PATH
Task-number: QTBUG-31147 Change-Id: Ifdeef2fa96668fdb482fd613eb8766c1ff5e3afd Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--src/plugins/android/androidpackageinstallationstep.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/android/androidpackageinstallationstep.cpp b/src/plugins/android/androidpackageinstallationstep.cpp
index 629c857a90..7b69ac3467 100644
--- a/src/plugins/android/androidpackageinstallationstep.cpp
+++ b/src/plugins/android/androidpackageinstallationstep.cpp
@@ -31,6 +31,11 @@
#include "androidmanager.h"
#include <projectexplorer/buildsteplist.h>
+#include <projectexplorer/target.h>
+#include <projectexplorer/buildconfiguration.h>
+#include <utils/hostosinfo.h>
+
+#include <QDir>
using namespace Android::Internal;
@@ -50,6 +55,14 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::
bool AndroidPackageInstallationStep::init()
{
- setUserArguments(QString::fromLatin1("INSTALL_ROOT=\"%1\" install").arg(AndroidManager::dirPath(target()).toUserOutput()));
+ ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
+ if (!bc)
+ bc = target()->activeBuildConfiguration();
+ QString dirPath = AndroidManager::dirPath(target()).toString();
+ if (Utils::HostOsInfo::isWindowsHost())
+ if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty())
+ dirPath = QDir::toNativeSeparators(dirPath);
+ setUserArguments(QString::fromLatin1("INSTALL_ROOT=\"%1\" install").arg(dirPath));
+
return MakeStep::init();
}