diff options
author | Guineng Ni <[email protected]> | 2022-04-10 15:11:37 +0800 |
---|---|---|
committer | Morten Johan Sørvig <[email protected]> | 2022-06-15 07:11:10 +0000 |
commit | 6dbe45c96a6b807cfc19c34cf2833504148d019f (patch) | |
tree | f9741638cb634fba2ccb03da6b4b87bd8a799611 | |
parent | 12eac545b6f5a6f963fcc1d06c3ae426260adb9b (diff) |
macdeployqt: macdeployqt process some libraries(e.g. ffmpeg) incorrect
ffmpeg and nettle are different from other libraries, they use symbol
link as their inner module dependencies. Calling one more
install_name_tool can handle this case.
Fixes: QTBUG-100093
Pick-to: 6.2 6.3 6.4
Change-Id: I12cdd53bd5aa3120910070ba283178686deb3eb0
Reviewed-by: Morten Johan Sørvig <[email protected]>
-rw-r--r-- | src/tools/macdeployqt/shared/shared.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp index 5abc0281c69..fa22b47067c 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp @@ -834,9 +834,15 @@ void changeInstallName(const QString &bundlePath, const FrameworkInfo &framework changeInstallName(framework.installName, deployedInstallName, binary); // Workaround for the case when the library ID name is a symlink, while the dependencies // specified using the canonical path to the library (QTBUG-56814) - QString canonicalInstallName = QFileInfo(framework.installName).canonicalFilePath(); + QFileInfo fileInfo= QFileInfo(framework.installName); + QString canonicalInstallName = fileInfo.canonicalFilePath(); if (!canonicalInstallName.isEmpty() && canonicalInstallName != framework.installName) { changeInstallName(canonicalInstallName, deployedInstallName, binary); + // some libraries' inner dependencies (such as ffmpeg, nettle) use symbol link (QTBUG-100093) + QString innerDependency = fileInfo.canonicalPath() + "/" + fileInfo.fileName(); + if (innerDependency != canonicalInstallName && innerDependency != framework.installName) { + changeInstallName(innerDependency, deployedInstallName, binary); + } } } } |