summaryrefslogtreecommitdiff
path: root/src/macdeployqt/shared/shared.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-01 11:01:44 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-02 03:54:56 +0200
commitcb72077e562a5a53e52f7ac94b0c3c26320c6242 (patch)
tree24327b6aa3234e1b3d0865204a455a0ebb3e3cb8 /src/macdeployqt/shared/shared.cpp
parente2bb989e237da8479a2dca647e3420861ad526e2 (diff)
parentbda7ece99a8162118a91e9f475c149be39846ecd (diff)
downloadqttools-cb72077e562a5a53e52f7ac94b0c3c26320c6242.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/designer/src/designer/qdesigner.cpp One side changed Q_OS_MAC -> Q_OS_MACOS; the other changed it to Q_OS_OSX and combined with Q_OS_WIN. Kept the latter. tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result One side added some XML next to where another made a local change. Change-Id: I812b55fbaccc85baa9856aedf90f9258428dfcab
Diffstat (limited to 'src/macdeployqt/shared/shared.cpp')
-rw-r--r--src/macdeployqt/shared/shared.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index b9d71d11e..47bd70e17 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -51,6 +51,7 @@
bool runStripEnabled = true;
bool alwaysOwerwriteEnabled = false;
bool runCodesign = false;
+QStringList librarySearchPath;
QString codesignIdentiy;
bool appstoreCompliant = false;
int logLevel = 1;
@@ -293,15 +294,26 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, const QString &appBundl
} 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();
+ foreach (QString path, librarySearchPath) {
+ if (!path.endsWith("/"))
+ path += '/';
+ QString nameInPath = path + parts.join("/");
+ if (QFile::exists(nameInPath)) {
+ info.frameworkDirectory = path + partsCopy.join("/");
+ break;
+ }
+ }
if (currentPart.contains(".framework")) {
- info.frameworkDirectory = "/Library/Frameworks/" + partsCopy.join("/");
+ if (info.frameworkDirectory.isEmpty())
+ info.frameworkDirectory = "/Library/Frameworks/" + partsCopy.join("/");
if (!info.frameworkDirectory.endsWith("/"))
info.frameworkDirectory += "/";
state = FrameworkName;
--part;
continue;
} else if (currentPart.contains(".dylib")) {
- info.frameworkDirectory = "/usr/lib/" + partsCopy.join("/");
+ if (info.frameworkDirectory.isEmpty())
+ info.frameworkDirectory = "/usr/lib/" + partsCopy.join("/");
if (!info.frameworkDirectory.endsWith("/"))
info.frameworkDirectory += "/";
state = DylibName;