summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/shared/shared.h
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-04-20 15:41:48 -0700
committerJake Petroules <jake.petroules@qt.io>2016-05-10 16:31:39 +0000
commit75b595a6867652cc2b3ff8b2749f91236b6cb58c (patch)
treef14b6da75c8e19623496ce03d2e9fbf0da2bffd5 /src/macdeployqt/shared/shared.h
parente126ccfa0c8f06bd52f0175766dd5a5321d74325 (diff)
Fix macdeployqt usage when client application has no rpath to Qt libs.
macdeployqt used to determine the Qt library path from one of the Qt libraries linked to by the application (by searching its rpath list). However, if an application does not have an rpath pointing to the Qt library directory, macdeployqt cannot find the Qt libraries. This is likely when the application is built with a non-qmake build system like CMake or qbs. This patch adds the Qt library path (from QLibraryInfo) as a fallback search path to allow macdeployqt to find the Qt libraries and deploy them. Task-number: QTBUG-47868 Change-Id: Ie1d005955826b416c223a1bc6cac911d2ae44b20 Reviewed-by: Guilherme Steinmann <guidefloripa@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Diffstat (limited to 'src/macdeployqt/shared/shared.h')
-rw-r--r--src/macdeployqt/shared/shared.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/macdeployqt/shared/shared.h b/src/macdeployqt/shared/shared.h
index 604e3ef4a..47b93f42b 100644
--- a/src/macdeployqt/shared/shared.h
+++ b/src/macdeployqt/shared/shared.h
@@ -37,6 +37,7 @@
#include <QStringList>
#include <QDebug>
#include <QSet>
+#include <QVersionNumber>
extern int logLevel;
#define LogError() if (logLevel < 0) {} else qDebug() << "ERROR:"
@@ -65,6 +66,24 @@ public:
QString binaryDestinationDirectory;
};
+class DylibInfo
+{
+public:
+ QString binaryPath;
+ QVersionNumber currentVersion;
+ QVersionNumber compatibilityVersion;
+};
+
+class OtoolInfo
+{
+public:
+ QString installName;
+ QString binaryPath;
+ QVersionNumber currentVersion;
+ QVersionNumber compatibilityVersion;
+ QList<DylibInfo> dependencies;
+};
+
bool operator==(const FrameworkInfo &a, const FrameworkInfo &b);
QDebug operator<<(QDebug debug, const FrameworkInfo &info);
@@ -91,6 +110,7 @@ inline QDebug operator<<(QDebug debug, const ApplicationBundleInfo &info);
void changeQtFrameworks(const QString appPath, const QString &qtPath, bool useDebugLibs);
void changeQtFrameworks(const QList<FrameworkInfo> frameworks, const QStringList &binaryPaths, const QString &qtPath);
+OtoolInfo findDependencyInfo(const QString &binaryPath);
FrameworkInfo parseOtoolLibraryLine(const QString &line, const QString &appBundlePath, const QSet<QString> &rpaths, bool useDebugLibs);
QString findAppBinary(const QString &appBundlePath);
QList<FrameworkInfo> getQtFrameworks(const QString &path, const QString &appBundlePath, const QSet<QString> &rpaths, bool useDebugLibs);