aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-11-21 15:01:38 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-11-24 08:34:19 +0100
commited2e963a15aa25bea500d30240151a44245e83d7 (patch)
treefa61089e39ffac74b5c51f04bd2ba6b12a43e1a8
parentcb30a1ae10ea556ea1d9601e96f1a9ded924a6df (diff)
Android: Fix deployment of release builds with Qt 5.3 and earlier
Since unsigned packages are not deployable, we always make packages signed with the debug key when there's no signing requested, even if the native code is built as release. This was already fixed for Qt 5.4, where we use androiddeployqt to deploy the apk, but for earlier versions, we need to use the correct apk name. We also need to use the apk name which is used by androiddeployqt in Qt 5.3, which does not contain the "-signed" suffix. Change-Id: I87f7936002946acd80bc245935c44cf148f9630d Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
-rw-r--r--src/plugins/android/androidqtsupport.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/plugins/android/androidqtsupport.cpp b/src/plugins/android/androidqtsupport.cpp
index 6f99c57b92..a8d2f21d46 100644
--- a/src/plugins/android/androidqtsupport.cpp
+++ b/src/plugins/android/androidqtsupport.cpp
@@ -51,17 +51,11 @@ Utils::FileName Android::AndroidQtSupport::apkPath(ProjectExplorer::Target *targ
apkPath = QLatin1String("/build/outputs/apk/android-build-");
else
apkPath = QLatin1String("/bin/QtApp-");
- if (buildApkStep->buildConfiguration()->buildType() == ProjectExplorer::BuildConfiguration::Release) {
- apkPath += QLatin1String("release-");
- if (!buildApkStep->signPackage())
- apkPath += QLatin1String("un");
- apkPath += QLatin1String("signed.apk");
- } else {
- apkPath += QLatin1String("debug");
- if (buildApkStep->signPackage())
- apkPath += QLatin1String("-signed");
- apkPath += QLatin1String(".apk");
- }
+ if (buildApkStep->signPackage())
+ apkPath += QLatin1String("release.apk");
+ else
+ apkPath += QLatin1String("debug.apk");
+
return target->activeBuildConfiguration()->buildDirectory()
.appendPath(QLatin1String(Android::Constants::ANDROID_BUILDDIRECTORY))
.appendPath(apkPath);