forked from qt-creator/qt-creator
Android: Use new AbstractProcessStep convenience functions
Change-Id: I3fa4dcdd210f4c5d492217f2e3f1ceca353a4161 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -86,18 +86,6 @@ const char KeystoreLocationKey[] = "KeystoreLocation";
|
|||||||
const char BuildTargetSdkKey[] = "BuildTargetSdk";
|
const char BuildTargetSdkKey[] = "BuildTargetSdk";
|
||||||
const char VerboseOutputKey[] = "VerboseOutput";
|
const char VerboseOutputKey[] = "VerboseOutput";
|
||||||
|
|
||||||
static void setupProcessParameters(ProcessParameters *pp,
|
|
||||||
BuildStep *step,
|
|
||||||
const QStringList &arguments,
|
|
||||||
const QString &command)
|
|
||||||
{
|
|
||||||
pp->setMacroExpander(step->macroExpander());
|
|
||||||
pp->setWorkingDirectory(step->buildDirectory());
|
|
||||||
Utils::Environment env = step->buildEnvironment();
|
|
||||||
pp->setEnvironment(env);
|
|
||||||
pp->setCommandLine({command, arguments});
|
|
||||||
}
|
|
||||||
|
|
||||||
class PasswordInputDialog : public QDialog
|
class PasswordInputDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -257,11 +245,13 @@ bool AndroidBuildApkStep::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::ProcessParameters *pp = processParameters();
|
ProjectExplorer::ProcessParameters *pp = processParameters();
|
||||||
Android::setupProcessParameters(pp, this, arguments, command);
|
setupProcessParameters(pp);
|
||||||
|
pp->setCommandLine({command, arguments});
|
||||||
|
|
||||||
// Generate arguments with keystore password concealed
|
// Generate arguments with keystore password concealed
|
||||||
ProjectExplorer::ProcessParameters pp2;
|
ProjectExplorer::ProcessParameters pp2;
|
||||||
Android::setupProcessParameters(&pp2, this, argumentsPasswordConcealed, command);
|
setupProcessParameters(&pp2);
|
||||||
|
pp->setCommandLine({command, argumentsPasswordConcealed});
|
||||||
m_command = pp2.effectiveCommand().toString();
|
m_command = pp2.effectiveCommand().toString();
|
||||||
m_argumentsPasswordConcealed = pp2.prettyArguments();
|
m_argumentsPasswordConcealed = pp2.prettyArguments();
|
||||||
|
|
||||||
|
@@ -85,6 +85,7 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(BuildStepList *bs
|
|||||||
setSummaryUpdater([this] {
|
setSummaryUpdater([this] {
|
||||||
return tr("<b>Make install:</b> Copy App Files to %1").arg(nativeAndroidBuildPath());
|
return tr("<b>Make install:</b> Copy App Files to %1").arg(nativeAndroidBuildPath());
|
||||||
});
|
});
|
||||||
|
setUseEnglishOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AndroidPackageInstallationStep::init()
|
bool AndroidPackageInstallationStep::init()
|
||||||
@@ -100,11 +101,7 @@ bool AndroidPackageInstallationStep::init()
|
|||||||
cmd.addArgs(outerQuoted + " install", CommandLine::Raw);
|
cmd.addArgs(outerQuoted + " install", CommandLine::Raw);
|
||||||
|
|
||||||
ProcessParameters *pp = processParameters();
|
ProcessParameters *pp = processParameters();
|
||||||
pp->setMacroExpander(macroExpander());
|
setupProcessParameters(pp);
|
||||||
pp->setWorkingDirectory(buildDirectory());
|
|
||||||
Environment env = buildEnvironment();
|
|
||||||
Environment::setupEnglishOutput(&env);
|
|
||||||
pp->setEnvironment(env);
|
|
||||||
pp->setCommandLine(cmd);
|
pp->setCommandLine(cmd);
|
||||||
|
|
||||||
m_androidDirsToClean.clear();
|
m_androidDirsToClean.clear();
|
||||||
|
Reference in New Issue
Block a user