Commit 8011d0c3 authored by Daniel Teske's avatar Daniel Teske
Browse files

Android: Use '/' in INSTALL_ROOT if sh.exe is in PATH



Task-number: QTBUG-31147

Change-Id: Ifdeef2fa96668fdb482fd613eb8766c1ff5e3afd
Reviewed-by: default avatarYoann Lopes <yoann.lopes@digia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent b6e9ebb7
......@@ -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();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment