forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -258,6 +258,16 @@ bool AndroidDeployQtStep::init()
|
|||||||
}
|
}
|
||||||
if (androidBuildApkStep->useGradle())
|
if (androidBuildApkStep->useGradle())
|
||||||
Utils::QtcProcess::addArg(&m_androiddeployqtArgs, QLatin1String("--gradle"));
|
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 {
|
} else {
|
||||||
m_uninstallPreviousPackageRun = true;
|
m_uninstallPreviousPackageRun = true;
|
||||||
pp->setCommand(AndroidConfigurations::currentConfig().adbToolPath().toString());
|
pp->setCommand(AndroidConfigurations::currentConfig().adbToolPath().toString());
|
||||||
|
Reference in New Issue
Block a user