forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user