diff options
author | Tim Jenssen <tim.jenssen@nokia.com> | 2011-09-06 17:21:37 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-09-07 15:42:09 +0200 |
commit | 10ca9710f1df965d6e338b34fe48491f554df63f (patch) | |
tree | 229c7f0b24f8f2579bbd5f03f1c9c0cbcb52e3df | |
parent | 312543ba17638924482424d467ea77283e3b24ff (diff) |
fix random macdeployqt problem
Change-Id: Ie60bf8a8e9ba36e6090c5ceecaa714942b753f0f
Reviewed-on: http://codereview.qt.nokia.com/4278
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
-rw-r--r-- | installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp b/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp index 41bed6ba6..42a2a47f6 100644 --- a/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp +++ b/installerbuilder/libinstaller/macreplaceinstallnamesoperation.cpp @@ -101,11 +101,25 @@ bool MacReplaceInstallNamesOperation::apply(const QString &indicator, const QStr mIndicator = indicator; mInstallationDir = installationDir; + QStringList alreadyPatchedFrameworks; + QLatin1String frameworkSuffix(".framework"); + QDirIterator dirIterator(searchDir, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks); while (dirIterator.hasNext()) { QString fileName = dirIterator.next(); - if (dirIterator.fileInfo().isDir() && fileName.endsWith(QLatin1String(".framework"))) + + //check that we don't do anything for already patched framework pathes + if (fileName.contains(frameworkSuffix)) { + QString alreadyPatchedSearchString = fileName.left(fileName.lastIndexOf(frameworkSuffix)) + + frameworkSuffix; + if (alreadyPatchedFrameworks.contains(alreadyPatchedSearchString)) { + continue; + } + } + if (dirIterator.fileInfo().isDir() && fileName.endsWith(frameworkSuffix)) { relocateFramework(fileName); + alreadyPatchedFrameworks.append(fileName); + } else if (dirIterator.fileInfo().isDir()) continue; else if (fileName.endsWith(QLatin1String(".dylib"))) |