Guard macdeployqt against @rpath and @loader_path too.
authorEike Ziller <eike.ziller@nokia.com>
Wed, 27 Jul 2011 08:10:33 +0000 (10:10 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 27 Jul 2011 11:31:27 +0000 (13:31 +0200)
Ported from 4.8 2ccef4f57f036a486cb96904298a8b4673ff0aec

Change-Id: I01f6449ebdb610684d0aab3a37fe66ed0a37b522
Reviewed-on: http://codereview.qt.nokia.com/2256
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
src/macdeployqt/shared/shared.cpp

index 74dd4a4..bb37f0b 100644 (file)
@@ -111,7 +111,7 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, bool useDebugLibs)
     // Don't deploy system libraries.
     if (trimmed.startsWith("/System/Library/") ||
         (trimmed.startsWith("/usr/lib/") && trimmed.contains("libQt") == false) // exception for libQtuitools and libQtlucene
-        || trimmed.startsWith("@executable_path"))
+        || trimmed.startsWith("@executable_path") || trimmed.startsWith("@loader_path") || trimmed.startsWith("@rpath"))
         return info;
 
     enum State {QtPath, FrameworkName, DylibName, Version, End};
@@ -238,7 +238,7 @@ QList<FrameworkInfo> getQtFrameworks(const QString &path, bool useDebugLibs)
     QStringList outputLines = output.split("\n");
     outputLines.removeFirst(); // remove line containing the binary path
     if (path.contains(".framework") || path.contains(".dylib"))
-        outputLines.removeFirst(); // frameworks and dylibs lists themselves as a dependency.
+        outputLines.removeFirst(); // frameworks and dylibs print install name of themselves first.
 
     return getQtFrameworks(outputLines, useDebugLibs);
 }