diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2014-01-22 10:17:33 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-28 10:05:27 +0100 |
commit | 546b9faa04845ca636203679a1ce29b6f3015335 (patch) | |
tree | 00aab0122d4debe1f8d9c1a7f44a73577d0627f1 | |
parent | ee5b9353fe29bf4ad7b4122cc56c22bad22468c0 (diff) | |
download | qttools-546b9faa04845ca636203679a1ce29b6f3015335.tar.gz |
androiddeployqt: Support spaces in jarsigner arguments
The input to the jarsigner (specifically the password, alias,
file name, etc.) can contain spaces, so the arguments need
to be quoted.
[ChangeLog][Android][androiddeployqt] Fixed signing packages
using arguments containing spaces.
Task-number: QTBUG-36327
Change-Id: Ie673ab91da4ffe074851a6ddef96efbb7657636b
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
-rw-r--r-- | src/androiddeployqt/main.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index 890ec9476..3198a10b5 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -1841,29 +1841,29 @@ bool signPackage(const Options &options) return false; } - jarSignerTool = QString::fromLatin1("\"%1\" -sigalg %2 -digestalg %3 -keystore %4") + jarSignerTool = QString::fromLatin1("\"%1\" -sigalg \"%2\" -digestalg \"%3\" -keystore \"%4\"") .arg(jarSignerTool).arg(options.sigAlg).arg(options.digestAlg).arg(options.keyStore); if (!options.keyStorePassword.isEmpty()) - jarSignerTool += QString::fromLatin1(" -storepass %1").arg(options.keyStorePassword); + jarSignerTool += QString::fromLatin1(" -storepass \"%1\"").arg(options.keyStorePassword); if (!options.storeType.isEmpty()) - jarSignerTool += QString::fromLatin1(" -storetype %1").arg(options.storeType); + jarSignerTool += QString::fromLatin1(" -storetype \"%1\"").arg(options.storeType); if (!options.keyPass.isEmpty()) - jarSignerTool += QString::fromLatin1(" -keypass %1").arg(options.keyPass); + jarSignerTool += QString::fromLatin1(" -keypass \"%1\"").arg(options.keyPass); if (!options.sigFile.isEmpty()) - jarSignerTool += QString::fromLatin1(" -sigfile %1").arg(options.sigFile); + jarSignerTool += QString::fromLatin1(" -sigfile \"%1\"").arg(options.sigFile); if (!options.signedJar.isEmpty()) - jarSignerTool += QString::fromLatin1(" -signedjar %1").arg(options.signedJar); + jarSignerTool += QString::fromLatin1(" -signedjar \"%1\"").arg(options.signedJar); if (!options.tsaUrl.isEmpty()) - jarSignerTool += QString::fromLatin1(" -tsa %1").arg(options.tsaUrl); + jarSignerTool += QString::fromLatin1(" -tsa \"%1\"").arg(options.tsaUrl); if (!options.tsaCert.isEmpty()) - jarSignerTool += QString::fromLatin1(" -tsacert %1").arg(options.tsaCert); + jarSignerTool += QString::fromLatin1(" -tsacert \"%1\"").arg(options.tsaCert); if (options.internalSf) jarSignerTool += QLatin1String(" -internalsf"); @@ -1874,7 +1874,7 @@ bool signPackage(const Options &options) if (options.protectedAuthenticationPath) jarSignerTool += QLatin1String(" -protected"); - jarSignerTool += QString::fromLatin1(" %1 %2") + jarSignerTool += QString::fromLatin1(" %1 \"%2\"") .arg(options.outputDirectory + QLatin1String("/bin/") + apkName(options) |