Android: Install both target and whole project artefacts with qmake

As a workaround for qmake projects with dependencies for shared
libraries, make sure to install both the current target and the whole
project artefacts, the latter was the default before QTCREATORBUG-25793.

Task-number: QTCREATORBUG-26550
Change-Id: I8f313652bb582b2512ebe3471933e53120baf020
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Assam Boudjelthia
2021-12-17 13:13:07 +02:00
parent f55ec2f930
commit 9d221706f4

View File

@@ -107,8 +107,12 @@ bool AndroidPackageInstallationStep::init()
const QString innerQuoted = ProcessArgs::quoteArg(dirPath); const QString innerQuoted = ProcessArgs::quoteArg(dirPath);
const QString outerQuoted = ProcessArgs::quoteArg("INSTALL_ROOT=" + innerQuoted); const QString outerQuoted = ProcessArgs::quoteArg("INSTALL_ROOT=" + innerQuoted);
CommandLine cmd{tc->makeCommand(buildEnvironment())}; const FilePath makeCommand = tc->makeCommand(buildEnvironment());
cmd.addArgs(outerQuoted + " install", CommandLine::Raw); CommandLine cmd{makeCommand};
// Run install on both the target and the whole project as a workaround for QTCREATORBUG-26550.
cmd.addArgs(QString("%1 install && cd %2 && %3 %1 install")
.arg(outerQuoted).arg(ProcessArgs::quoteArg(buildDirectory().toUserOutput()))
.arg(ProcessArgs::quoteArg(makeCommand.toUserOutput())), CommandLine::Raw);
processParameters()->setCommandLine(cmd); processParameters()->setCommandLine(cmd);
// This is useful when running an example target from a Qt module project. // This is useful when running an example target from a Qt module project.