diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-26 12:45:39 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-05-26 12:45:48 +0200 |
commit | 9eb5086aebc7dd01a444778d0885cc1959e4a901 (patch) | |
tree | 9ed500096c2a5685a22d39361017d9bb4f75a1bf /src/macdeployqt | |
parent | 5aa15fbed1375dfa7f19b0263e69e5bcf2c29ddc (diff) | |
parent | e0edc350632e6f311548cac2831a60f3b9e4dbda (diff) | |
download | qttools-9eb5086aebc7dd01a444778d0885cc1959e4a901.tar.gz |
Merge remote-tracking branch 'origin/5.6.1' into 5.7.0
Change-Id: I92f700c15556b5c8f5f6cd66c490190ea7c9a46c
Diffstat (limited to 'src/macdeployqt')
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index 3b0c954cc..3cfa79b39 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -281,7 +281,7 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, const QString &appBundl if (state == QtPath) { // Check for library name part - if (part < parts.count() && parts.at(part).contains(".dylib ")) { + if (part < parts.count() && parts.at(part).contains(".dylib")) { info.frameworkDirectory += "/" + (qtPath + currentPart + "/").simplified(); state = DylibName; continue; @@ -290,16 +290,23 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, const QString &appBundl state = FrameworkName; continue; } else if (trimmed.startsWith("/") == false) { // If the line does not contain a full path, the app is using a binary Qt package. + QStringList partsCopy = parts; + partsCopy.removeLast(); if (currentPart.contains(".framework")) { - info.frameworkDirectory = "/Library/Frameworks/"; + info.frameworkDirectory = "/Library/Frameworks/" + partsCopy.join("/"); + if (!info.frameworkDirectory.endsWith("/")) + info.frameworkDirectory += "/"; state = FrameworkName; - } else { - info.frameworkDirectory = "/usr/lib/"; + --part; + continue; + } else if (currentPart.contains(".dylib")) { + info.frameworkDirectory = "/usr/lib/" + partsCopy.join("/"); + if (!info.frameworkDirectory.endsWith("/")) + info.frameworkDirectory += "/"; state = DylibName; + --part; + continue; } - - --part; - continue; } qtPath += (currentPart + "/"); @@ -343,9 +350,12 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, const QString &appBundl } } - info.installName = findDependencyInfo(info.sourceFilePath).installName; - if (info.installName.startsWith("@rpath/")) - info.deployedInstallName = info.installName; + if (!info.sourceFilePath.isEmpty() && QFile::exists(info.sourceFilePath)) { + info.installName = findDependencyInfo(info.sourceFilePath).installName; + if (info.installName.startsWith("@rpath/")) + info.deployedInstallName = info.installName; + } + return info; } |