Commit 657797f7 authored by Eskil Abrahamsen Blomfeldt's avatar Eskil Abrahamsen Blomfeldt
Browse files

Android: Fix installing signed packages



This works around missing support for standalone installations
of signed packages in androiddeployqt. The tool will use its
arguments to decide what the package to install is named, so
the arguments need to match the ones used to build the package.
In particular, we need to tell it that we are creating a signed
package.

This is intended as a temporary solution. The tool should be fixed
to support this use case properly, but the changes needed there
were deemed too risky at this point in the release cycle, so we
apply the work-around for now.

Task-number: QTCREATORBUG-13431
Change-Id: I03163582979715e7daa389c49bf10a88b5879db7
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
parent a46fe36b
......@@ -258,6 +258,16 @@ bool AndroidDeployQtStep::init()
}
if (androidBuildApkStep->useGradle())
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("--gradle"));
if (androidBuildApkStep->signPackage()) {
// The androiddeployqt tool is not really written to do stand-alone installations.
// This hack forces it to use the correct filename for the apk file when installing
// as a temporary fix until androiddeployqt gets the support. Since the --sign is
// only used to get the correct file name of the apk, its parameters are ignored.
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("--sign"));
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("foo"));
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("bar"));
}
} else {
m_uninstallPreviousPackageRun = true;
pp->setCommand(AndroidConfigurations::currentConfig().adbToolPath().toString());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment