From 1e71b35d9775b0abc9de0ce051bff400f0f1ba64 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 4 Dec 2013 10:05:04 +0100 Subject: androiddeployqt: Add OpenGL dependency to manifest if necessary In order to filter out devices that do not support OpenGLES 2 in Google Play, we need to report that we depend on it when using Qt Quick or Qt OpenGL. It would have been more generic to add the information to the meta-data in the module, but since we already have the information there, just in the form of forcing the use of the GL plugin, we might as well use that and not complicate the dependency XMLs any further. Task-number: QTBUG-32491 Change-Id: I2af044be010fcd0a8076906de6385701041b9c01 Reviewed-by: Paul Olav Tvete --- src/androiddeployqt/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index e6def6232..9d3cf507b 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -850,6 +850,14 @@ bool updateAndroidManifest(Options &options) fprintf(stdout, " -- Using platform plugin %s\n", qPrintable(plugin)); } + bool usesGL = false; + foreach (QString localLib, localLibs) { + if (localLib.endsWith(QLatin1String("libqtforandroidGL.so"))) { + usesGL = true; + break; + } + } + QHash replacements; replacements[QLatin1String("-- %%INSERT_APP_LIB_NAME%% --")] = QFileInfo(options.applicationBinary).baseName().mid(sizeof("lib") - 1); replacements[QLatin1String("-- %%INSERT_LOCAL_LIBS%% --")] = localLibs.join(QLatin1Char(':')); @@ -869,6 +877,9 @@ bool updateAndroidManifest(Options &options) QString features; foreach (QString feature, options.features) features += QString::fromLatin1("\n").arg(feature); + if (usesGL) + features += QStringLiteral(""); + replacements[QLatin1String("")] = features; QString androidManifestPath = options.outputDirectory + QLatin1String("/AndroidManifest.xml"); -- cgit v1.2.3