From ef50aeaff84130e9bbab344027cdb78af8a92ca9 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 9 Feb 2015 15:16:54 +0100 Subject: [PATCH] androiddeployqt: Always include platform plugin dependencies Qt DBus recently became a dependency for the platform plugin, causing applications to crash on startup when this is missing. Instead of special casing the GUI dependency, we always add all dependencies of the platform plugin. Change-Id: I59d71531f60874ce436af1840656974d58c14661 Task-number: QTBUG-44182 Reviewed-by: Shawn Rutledge Reviewed-by: Christian Stromme --- src/androiddeployqt/main.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index f900d56..6da3a10 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -1795,17 +1795,9 @@ bool readDependencies(Options *options) if (!readDependenciesFromElf(options, options->applicationBinary, &usedDependencies, &remainingDependencies)) return false; - // Until we have support non-gui applications on Android, always add Qt Gui - // as a dependency (otherwise the platform plugin cannot be deployed, and - // the application will not run). - QLatin1String guiLib("lib/libQt5Gui.so"); - if (!usedDependencies.contains(guiLib)) { - QtDependency dep(guiLib, options->qtInstallDirectory + QLatin1Char('/') + guiLib); - options->qtDependencies.append(dep); - usedDependencies.insert(guiLib); - if (!readAndroidDependencyXml(options, QLatin1String("Qt5Gui"), &usedDependencies, &remainingDependencies)) - return false; - } + // Jam in the dependencies of the platform plugin, since the application will crash without it + if (!readDependenciesFromElf(options, options->qtInstallDirectory + QLatin1String("/plugins/platforms/android/libqtforandroid.so"), &usedDependencies, &remainingDependencies)) + return false; QString qtDir = options->qtInstallDirectory + QLatin1Char('/'); -- 2.7.4