From 9d221706f48cfcc6aad17f8cd6730ae0c9107716 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Fri, 17 Dec 2021 13:13:07 +0200 Subject: [PATCH] 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 Reviewed-by: Qt CI Bot --- src/plugins/android/androidpackageinstallationstep.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/android/androidpackageinstallationstep.cpp b/src/plugins/android/androidpackageinstallationstep.cpp index 5fe710b6b7b..e635461e734 100644 --- a/src/plugins/android/androidpackageinstallationstep.cpp +++ b/src/plugins/android/androidpackageinstallationstep.cpp @@ -107,8 +107,12 @@ bool AndroidPackageInstallationStep::init() const QString innerQuoted = ProcessArgs::quoteArg(dirPath); const QString outerQuoted = ProcessArgs::quoteArg("INSTALL_ROOT=" + innerQuoted); - CommandLine cmd{tc->makeCommand(buildEnvironment())}; - cmd.addArgs(outerQuoted + " install", CommandLine::Raw); + const FilePath makeCommand = tc->makeCommand(buildEnvironment()); + 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); // This is useful when running an example target from a Qt module project.