forked from qt-creator/qt-creator
ProjectExplorer: Introduce some BuildStep convenience accessors
... and use in ProcessStep and related classes. Change-Id: Ie6f1403d0aa2b9f5bcde06e994809466700b1357 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -60,24 +60,23 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(BuildStepList *bs
|
||||
|
||||
bool AndroidPackageInstallationStep::init()
|
||||
{
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
QString dirPath = bc->buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY).toString();
|
||||
QString dirPath = buildDirectory().pathAppended(Constants::ANDROID_BUILDDIRECTORY).toString();
|
||||
if (HostOsInfo::isWindowsHost())
|
||||
if (bc->environment().searchInPath("sh.exe").isEmpty())
|
||||
if (buildEnvironment().searchInPath("sh.exe").isEmpty())
|
||||
dirPath = QDir::toNativeSeparators(dirPath);
|
||||
|
||||
ToolChain *tc = ToolChainKitAspect::cxxToolChain(target()->kit());
|
||||
QTC_ASSERT(tc, return false);
|
||||
|
||||
CommandLine cmd{tc->makeCommand(bc->environment())};
|
||||
CommandLine cmd{tc->makeCommand(buildEnvironment())};
|
||||
const QString innerQuoted = QtcProcess::quoteArg(dirPath);
|
||||
const QString outerQuoted = QtcProcess::quoteArg("INSTALL_ROOT=" + innerQuoted);
|
||||
cmd.addArgs(outerQuoted + " install", CommandLine::Raw);
|
||||
|
||||
ProcessParameters *pp = processParameters();
|
||||
pp->setMacroExpander(bc->macroExpander());
|
||||
pp->setWorkingDirectory(bc->buildDirectory());
|
||||
Environment env = bc->environment();
|
||||
pp->setMacroExpander(macroExpander());
|
||||
pp->setWorkingDirectory(buildDirectory());
|
||||
Environment env = buildEnvironment();
|
||||
Environment::setupEnglishOutput(&env);
|
||||
pp->setEnvironment(env);
|
||||
pp->setCommandLine(cmd);
|
||||
|
Reference in New Issue
Block a user