Browse Source
Make ldd detect pre-existing libraries in the AppDir
master
probonopd
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
2 deletions
-
tools/linuxdeployqt/shared.cpp
|
|
@ -239,8 +239,8 @@ bool copyFilePrintStatus(const QString &from, const QString &to) |
|
|
|
if (alwaysOwerwriteEnabled) { |
|
|
|
QFile(to).remove(); |
|
|
|
} else { |
|
|
|
LogDebug() << QFileInfo(to).fileName() << "already deployed, skipping."; |
|
|
|
return false; |
|
|
|
LogDebug() << QFileInfo(to).fileName() << "already exists at target location"; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1067,6 +1067,16 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a |
|
|
|
} else { |
|
|
|
libraryPath = QFileInfo(applicationBundle.binaryPath).dir().filePath("../lib/" + bundleLibraryDirectory); |
|
|
|
} |
|
|
|
|
|
|
|
/* Make ldd detect pre-existing libraries in the AppDir.
|
|
|
|
* TODO: Consider searching the AppDir for .so* files outside of libraryPath |
|
|
|
* and warning about them not being taken into consideration */ |
|
|
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); |
|
|
|
QString oldPath = env.value("LD_LIBRARY_PATH"); |
|
|
|
QString newPath = libraryPath + ":" + oldPath; // FIXME: If we use a ldd replacement, we still need to observe this path
|
|
|
|
LogDebug() << "Changed LD_LIBRARY_PATH:" << newPath; |
|
|
|
setenv("LD_LIBRARY_PATH",newPath.toUtf8().constData(),1); |
|
|
|
|
|
|
|
foreach (const QString &executable, QStringList() << applicationBundle.binaryPath << additionalExecutables) { |
|
|
|
changeIdentification("$ORIGIN/" + QFileInfo(executable).dir().relativeFilePath(libraryPath) + "/" + bundleLibraryDirectory, QFileInfo(executable).canonicalFilePath()); |
|
|
|
} |
|
|
|