summaryrefslogtreecommitdiffstats
path: root/src/tools/androiddeployqt
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-02-08 09:28:00 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-08 12:31:02 +0100
commitfbfacd33be482fa3cf0aa5cffaf7006d538a2f92 (patch)
tree92da72786b3740e37004623612c4fc1c9640d30f /src/tools/androiddeployqt
parentc1f4286a5cbc1794fe7be5bdbbd6a0bf29ef84d4 (diff)
parent74e04d6ace7aa949db97ae2e46c38a4dc0d4d36a (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
Diffstat (limited to 'src/tools/androiddeployqt')
-rw-r--r--src/tools/androiddeployqt/main.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 5db8b6e2f6..344ceba74f 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -148,6 +148,10 @@ struct Options
QString rootPath;
QStringList qmlImportPaths;
+ // Versioning
+ QString versionName;
+ QString versionCode;
+
// lib c++ path
QString stdCppPath;
QString stdCppName = QStringLiteral("gnustl_shared");
@@ -757,6 +761,22 @@ bool readInputFile(Options *options)
}
{
+ const QJsonValue androidVersionName = jsonObject.value(QStringLiteral("android-version-name"));
+ if (!androidVersionName.isUndefined())
+ options->versionName = androidVersionName.toString();
+ else
+ options->versionName = QStringLiteral("1.0");
+ }
+
+ {
+ const QJsonValue androidVersionCode = jsonObject.value(QStringLiteral("android-version-code"));
+ if (!androidVersionCode.isUndefined())
+ options->versionCode = androidVersionCode.toString();
+ else
+ options->versionCode = QStringLiteral("1");
+ }
+
+ {
const QJsonValue applicationBinary = jsonObject.value(QStringLiteral("application-binary"));
if (applicationBinary.isUndefined()) {
fprintf(stderr, "No application binary defined in json file.\n");
@@ -1324,6 +1344,8 @@ bool updateAndroidManifest(Options &options)
replacements[QLatin1String("-- %%INSERT_LOCAL_LIBS%% --")] = localLibs.join(QLatin1Char(':'));
replacements[QLatin1String("-- %%INSERT_LOCAL_JARS%% --")] = options.localJars.join(QLatin1Char(':'));
replacements[QLatin1String("-- %%INSERT_INIT_CLASSES%% --")] = options.initClasses.join(QLatin1Char(':'));
+ replacements[QLatin1String("-- %%INSERT_VERSION_NAME%% --")] = options.versionName;
+ replacements[QLatin1String("-- %%INSERT_VERSION_CODE%% --")] = options.versionCode;
replacements[QLatin1String("package=\"org.qtproject.example\"")] = QString::fromLatin1("package=\"%1\"").arg(options.packageName);
replacements[QLatin1String("-- %%BUNDLE_LOCAL_QT_LIBS%% --")]
= (options.deploymentMechanism == Options::Bundled) ? QString::fromLatin1("1") : QString::fromLatin1("0");
@@ -1884,7 +1906,7 @@ bool stripFile(const Options &options, const QString &fileName)
}
if (options.useLLVM)
- strip = QString::fromLatin1("%1 -strip-all -strip-all-gnu %2").arg(shellQuote(strip), shellQuote(fileName));
+ strip = QString::fromLatin1("%1 -strip-all %2").arg(shellQuote(strip), shellQuote(fileName));
else
strip = QString::fromLatin1("%1 %2").arg(shellQuote(strip), shellQuote(fileName));