From 65c2e8b07bc05324a7c61bc12948183baf7e05d0 Mon Sep 17 00:00:00 2001 From: kleuter Date: Tue, 24 Nov 2020 11:52:14 +0100 Subject: [PATCH] 5.15.2: macdeployqt applied patch for QTBUG-85600 (macdeployqt not built as host_build) --- .../src/macdeployqt/macdeployqt/macdeployqt.pro | 5 ++++- .../qttools/src/macdeployqt/macdeployqt/main.cpp | 4 +++- 5.15.2/qttools/src/macdeployqt/shared/shared.cpp | 14 ++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/5.15.2/qttools/src/macdeployqt/macdeployqt/macdeployqt.pro b/5.15.2/qttools/src/macdeployqt/macdeployqt/macdeployqt.pro index bf195f8..d751e29 100644 --- a/5.15.2/qttools/src/macdeployqt/macdeployqt/macdeployqt.pro +++ b/5.15.2/qttools/src/macdeployqt/macdeployqt/macdeployqt.pro @@ -1,5 +1,8 @@ +option(host_build) +CONFIG += force_bootstrap + SOURCES += main.cpp ../shared/shared.cpp QT = core LIBS += -framework CoreFoundation -load(qt_app) +load(qt_tool) \ No newline at end of file diff --git a/5.15.2/qttools/src/macdeployqt/macdeployqt/main.cpp b/5.15.2/qttools/src/macdeployqt/macdeployqt/main.cpp index 0f91640..93c476b 100644 --- a/5.15.2/qttools/src/macdeployqt/macdeployqt/main.cpp +++ b/5.15.2/qttools/src/macdeployqt/macdeployqt/main.cpp @@ -232,7 +232,9 @@ int main(int argc, char **argv) // Update deploymentInfo.deployedFrameworks - the QML imports // may have brought in extra frameworks as dependencies. deploymentInfo.deployedFrameworks += findAppFrameworkNames(appBundlePath); - deploymentInfo.deployedFrameworks = deploymentInfo.deployedFrameworks.toSet().toList(); + QSet deployedFrameworks(deploymentInfo.deployedFrameworks.begin(), + deploymentInfo.deployedFrameworks.end()); + deploymentInfo.deployedFrameworks = deployedFrameworks.values(); } if (plugins && !deploymentInfo.qtPath.isEmpty()) { diff --git a/5.15.2/qttools/src/macdeployqt/shared/shared.cpp b/5.15.2/qttools/src/macdeployqt/shared/shared.cpp index a81a2f0..d825668 100644 --- a/5.15.2/qttools/src/macdeployqt/shared/shared.cpp +++ b/5.15.2/qttools/src/macdeployqt/shared/shared.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +40,6 @@ #include #include #include -#include #include "shared.h" #ifdef Q_OS_DARWIN @@ -181,7 +179,7 @@ OtoolInfo findDependencyInfo(const QString &binaryPath) return info; } - static const QRegularExpression regexp(QStringLiteral( + static const QRegExp regexp(QStringLiteral( "^\\t(.+) \\(compatibility version (\\d+\\.\\d+\\.\\d+), " "current version (\\d+\\.\\d+\\.\\d+)(, weak)?\\)$")); @@ -938,7 +936,7 @@ bool DeploymentInfo::containsModule(const QString &module, const QString &libInF return true; } // Check for dylib - const QRegularExpression dylibRegExp(QLatin1String("libQt[0-9]+") + module + + const QRegExp dylibRegExp(QLatin1String("libQt[0-9]+") + module + libInFix + QLatin1String(".[0-9]+.dylib")); return deployedFrameworks.filter(dylibRegExp).size() > 0; } @@ -1498,10 +1496,10 @@ QSet codesignBundle(const QString &identity, // Check if there are unsigned dependencies, sign these first. QStringList dependencies = - getBinaryDependencies(rootBinariesPath, binary, additionalBinariesContainingRpaths).toSet() - .subtract(signedBinaries) - .subtract(pendingBinariesSet) - .toList(); + getBinaryDependencies(rootBinariesPath, binary, additionalBinariesContainingRpaths); + + QSet dependenciesSet(dependencies.begin(), dependencies.end()); + dependencies = dependenciesSet.subtract(signedBinaries).subtract(pendingBinariesSet).values(); if (!dependencies.isEmpty()) { pendingBinaries.push(binary);