summaryrefslogtreecommitdiffstats
path: root/src/tools/macdeployqt/shared
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2023-10-12 19:17:20 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-17 19:23:42 +0000
commit1eddd7add027d05cec2470a5209f46809e690478 (patch)
tree1477910391c5566a2fbcff64944d779e59dd7dd7 /src/tools/macdeployqt/shared
parent0345f07dd11cb931e4c3625284bb1b408455fb32 (diff)
macdeployqt: Fix codesigning with @loader_path
When the -executable parameter is specified, macdeployqt uses @loader_path instead of @rpath. This case was not handled in getBinaryDependencies() used for the code signing. Fixes: QTBUG-118075 Pick-to: 6.6 Change-Id: Ie1e0d0781305e1849df9ec0d5fb1c3ce6713a62b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/tools/macdeployqt/shared')
-rw-r--r--src/tools/macdeployqt/shared/shared.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
index 413f8413f6..b7ee93f6fc 100644
--- a/src/tools/macdeployqt/shared/shared.cpp
+++ b/src/tools/macdeployqt/shared/shared.cpp
@@ -598,6 +598,10 @@ QStringList getBinaryDependencies(const QString executablePath,
QString binary = QDir::cleanPath(executablePath + trimmedLine.mid(QStringLiteral("@executable_path/").length()));
if (binary != path)
binaries.append(binary);
+ } else if (trimmedLine.startsWith("@loader_path/")) {
+ QString binary = QDir::cleanPath(QFileInfo(path).path() + "/" + trimmedLine.mid(QStringLiteral("@loader_path/").length()));
+ if (binary != path)
+ binaries.append(binary);
} else if (trimmedLine.startsWith("@rpath/")) {
if (!rpathsLoaded) {
rpaths = getBinaryRPaths(path, true, executablePath);