From 73e4f9593abecad68b39bbf68564a92dff5222e6 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Date: Wed, 23 Jul 2014 16:50:23 +0200 Subject: [PATCH] androiddeployqt: Force Qt Gui dependency for all apps Currently, the only way to launch an Android application is through the platform plugin, which of course depends on Qt Gui. This causes problems running corelib autotests, since they have QT = core in the .pro file and thus will not deploy or load the platform plugin. At some point, we may have a way to launch pure corelib-applications on Android (like services), but until then, we need to hardcore the dependency on Qt Gui to make sure these autotests run properly. Change-Id: Ica794af972a06ec021c1fa28333866296eab96e0 Reviewed-by: BogDan Vatra <bogdan@kde.org> --- src/androiddeployqt/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index 78c947ba3..b1279d672 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -1364,6 +1364,17 @@ 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 (!options->qtDependencies.contains(guiLib)) { + options->qtDependencies.append(guiLib); + usedDependencies.insert(guiLib); + if (!readAndroidDependencyXml(options, QLatin1String("Qt5Gui"), &usedDependencies, &remainingDependencies)) + return false; + } + QString qtDir = options->qtInstallDirectory + QLatin1Char('/'); while (!remainingDependencies.isEmpty()) { -- GitLab