AndroidDeployQt: Remove not satisfied dependencies
In 438837ce274fdc1457b66179b25df40f33b23a15 commit, we stopped to copy all dependent libs that are kept in plugin directory. This change sounds reasonable, as we do not want to deploy unused libs. Due to the mentioned change, when dependencies.xml contains *.so libraries, they are not copied at all now. They are added to localLibs (later pasted into libs.xml), but are not shipped with the apk. So at the end we have dependencies in libs.xml on some libraries that were not delievered. This commit cleans up the localLibs to not add dependencies to the libs.xml file as they will not be satisfied Fixes: QTBUG-129946 Pick-to: 6.8 Change-Id: I7157e2e65cb928adbe9d7c077e50b2ebcac94490 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
6ef7bba375
commit
7499fd0229
@ -1800,10 +1800,21 @@ bool updateLibsXml(Options *options)
|
||||
|
||||
QStringList localLibs;
|
||||
localLibs = options->localLibs[it.key()];
|
||||
const QList<QtDependency>& deps = options->qtDependencies[it.key()];
|
||||
auto notExistsInDependencies = [&deps] (const QString &lib) {
|
||||
return std::none_of(deps.begin(), deps.end(), [&lib] (const QtDependency &dep) {
|
||||
return QFileInfo(dep.absolutePath).fileName() == QFileInfo(lib).fileName();
|
||||
});
|
||||
};
|
||||
|
||||
// Clean up localLibs: remove libs that were not added to qtDependecies
|
||||
localLibs.erase(std::remove_if(localLibs.begin(), localLibs.end(), notExistsInDependencies),
|
||||
localLibs.end());
|
||||
|
||||
// If .pro file overrides dependency detection, we need to see which platform plugin they picked
|
||||
if (localLibs.isEmpty()) {
|
||||
QString plugin;
|
||||
for (const QtDependency &qtDependency : options->qtDependencies[it.key()]) {
|
||||
for (const QtDependency &qtDependency : deps) {
|
||||
if (qtDependency.relativePath.contains("libplugins_platforms_qtforandroid_"_L1))
|
||||
plugin = qtDependency.relativePath;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user