diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-10-02 13:02:46 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-10-08 11:50:27 +0200 |
commit | c6c364d0cae8b09e23921e942f65013bad0b7ff1 (patch) | |
tree | 9c757c17c367de0ae15f7424a95b5d7524727792 | |
parent | 790380636e5604a418e465a7fd11273ff6b148fb (diff) | |
download | qttools-c6c364d0cae8b09e23921e942f65013bad0b7ff1.tar.gz qttools-c6c364d0cae8b09e23921e942f65013bad0b7ff1.tar.bz2 qttools-c6c364d0cae8b09e23921e942f65013bad0b7ff1.zip |
Android: Support recursive ANDROID_DEPLOYMENT_DEPENDENCIES
The convenience of ANDROID_DEPLOYMENT_DEPENDENCIES would be
greatly increased if you could include a directory and have its
contents be added recursively to the deployment, instead of
listing each file individually.
Change-Id: I3cf3248007369122ea6ba98ab79f7f2f951a26c3
Task-number: QTBUG-41674
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
-rw-r--r-- | src/androiddeployqt/main.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index e91ae494..3696038f 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -741,8 +741,23 @@ bool readInputFile(Options *options) QJsonValue deploymentDependencies = jsonObject.value("deployment-dependencies"); if (!deploymentDependencies.isUndefined()) { QStringList dependencies = deploymentDependencies.toString().split(QLatin1Char(',')); - foreach (QString dependency, dependencies) - options->qtDependencies.append(QtDependency(dependency, options->qtInstallDirectory + QLatin1Char('/') + dependency)); + foreach (QString dependency, dependencies) { + QString path = options->qtInstallDirectory + QLatin1Char('/') + dependency; + if (QFileInfo(path).isDir()) { + QDirIterator iterator(path, QDirIterator::Subdirectories); + while (iterator.hasNext()) { + if (iterator.fileInfo().isFile()) { + QString subPath = iterator.filePath(); + options->qtDependencies.append(QtDependency(subPath.mid(options->qtInstallDirectory.length() + 1), + subPath)); + } + + iterator.next(); + } + } else { + options->qtDependencies.append(QtDependency(dependency, path)); + } + } } } |