Skip to content

Commit 86bea79

Browse files
vkrauseliangqi
authored andcommitted
Look for dependency XML files in all prefix paths
src/tools/androiddeployqt/main.cpp was moved from qttools into qtbase in 5.11. So re-apply 07bc7c02 in qttools here. Change-Id: I13a77a0c8567d07c4aa6369ed76bdb894b88f86f Reviewed-by: Volker Krause <volker.krause@kdab.com>
1 parent 413ca86 commit 86bea79

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tools/androiddeployqt/main.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,11 @@ QList<QtDependency> findFilesRecursively(const Options &options, const QFileInfo
14261426

14271427
QList<QtDependency> findFilesRecursively(const Options &options, const QString &fileName)
14281428
{
1429+
for (const auto &prefix : options.extraPrefixDirs) {
1430+
QFileInfo info(prefix + QLatin1Char('/') + fileName);
1431+
if (info.exists())
1432+
return findFilesRecursively(options, info, prefix + QLatin1Char('/'));
1433+
}
14291434
QFileInfo info(options.qtInstallDirectory + QLatin1Char('/') + fileName);
14301435
return findFilesRecursively(options, info, options.qtInstallDirectory + QLatin1Char('/'));
14311436
}
@@ -1435,7 +1440,7 @@ bool readAndroidDependencyXml(Options *options,
14351440
QSet<QString> *usedDependencies,
14361441
QSet<QString> *remainingDependencies)
14371442
{
1438-
QString androidDependencyName = options->qtInstallDirectory + QString::fromLatin1("/lib/%1-android-dependencies.xml").arg(moduleName);
1443+
QString androidDependencyName = absoluteFilePath(options, QString::fromLatin1("/lib/%1-android-dependencies.xml").arg(moduleName));
14391444

14401445
QFile androidDependencyFile(androidDependencyName);
14411446
if (androidDependencyFile.exists()) {
@@ -1480,7 +1485,7 @@ bool readAndroidDependencyXml(Options *options,
14801485
int bundling = reader.attributes().value(QLatin1String("bundling")).toInt();
14811486
QString fileName = reader.attributes().value(QLatin1String("file")).toString();
14821487
if (bundling == (options->deploymentMechanism == Options::Bundled)) {
1483-
QtDependency dependency(fileName, options->qtInstallDirectory + QLatin1Char('/') + fileName);
1488+
QtDependency dependency(fileName, absoluteFilePath(options, fileName));
14841489
if (!usedDependencies->contains(dependency.absolutePath)) {
14851490
options->qtDependencies.append(dependency);
14861491
usedDependencies->insert(dependency.absolutePath);

0 commit comments

Comments
 (0)