diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-11-18 12:08:31 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-11-18 12:50:50 +0100 |
commit | 657797f7a06de9c5297952896421fc94a360b848 (patch) | |
tree | edf732f4a70ee593f5f35db11540ffe1f6b51c61 /src/plugins | |
parent | a46fe36bce87eb96744d8bfde86cbfa3fac5f417 (diff) | |
download | qt-creator-657797f7a06de9c5297952896421fc94a360b848.tar.gz |
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: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/android/androiddeployqtstep.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 82ad8929f4..8f0d6d512f 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -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()); |