From 63404085185a4110fa05657a8a150f7c1e44e13c Mon Sep 17 00:00:00 2001 From: Jakob Gahde Date: Tue, 6 Jun 2017 01:00:34 +0200 Subject: [PATCH] Also set rpath for -executable=, resolves #83 --- shared/shared.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index a59411a..363a71a 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -1059,10 +1059,14 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a /* From now on let ldd exit if it doesn't find something */ qtDetectionComplete = 1; + QString libraryPath; if(fhsLikeMode == false){ - changeIdentification("$ORIGIN/lib/" + bundleLibraryDirectory, QFileInfo(applicationBundle.binaryPath).canonicalFilePath()); + libraryPath = QFileInfo(applicationBundle.binaryPath).dir().filePath("lib/" + bundleLibraryDirectory); } else { - changeIdentification("$ORIGIN/../lib/" + bundleLibraryDirectory, QFileInfo(applicationBundle.binaryPath).canonicalFilePath()); + libraryPath = QFileInfo(applicationBundle.binaryPath).dir().filePath("../lib/" + bundleLibraryDirectory); + } + foreach (const QString &executable, QStringList() << applicationBundle.binaryPath << additionalExecutables) { + changeIdentification("$ORIGIN/" + QFileInfo(executable).dir().relativeFilePath(libraryPath) + "/" + bundleLibraryDirectory, QFileInfo(executable).canonicalFilePath()); } applicationBundle.libraryPaths = findAppLibraries(appDirPath); LogDebug() << "applicationBundle.libraryPaths:" << applicationBundle.libraryPaths;