diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-09-22 16:33:55 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-10-05 13:48:44 +0200 |
commit | ee8a9a0c7e7f69bece49fa410cd8e6866c1cc706 (patch) | |
tree | ebdc60e77a6346f8082daf320229a5f0e9a50366 /src/macdeployqt/shared | |
parent | f06517c8c235984f75a647d95b92cb52c60615f7 (diff) |
Remove macchangeqt from Qt 6
This is macdeployqt’s lesser known cousin, which implemented
support for changing which Qt build an app would load.
Today, this can be accomplished by changing the LC_RPATH
loader command, or by writing a small script which
automates the necessary otool usage.
Change-Id: I01d8e3f89551d2becc2865be68728ca57870ac9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/macdeployqt/shared')
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 32 | ||||
-rw-r--r-- | src/macdeployqt/shared/shared.h | 3 |
2 files changed, 0 insertions, 35 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index 8b15245ba..e72ca8e4a 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -1353,38 +1353,6 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf return true; } -void changeQtFrameworks(const QList<FrameworkInfo> frameworks, const QStringList &binaryPaths, const QString &absoluteQtPath) -{ - LogNormal() << "Changing" << binaryPaths << "to link against"; - LogNormal() << "Qt in" << absoluteQtPath; - QString finalQtPath = absoluteQtPath; - - if (!absoluteQtPath.startsWith("/Library/Frameworks")) - finalQtPath += "/lib/"; - - foreach (FrameworkInfo framework, frameworks) { - const QString oldBinaryId = framework.installName; - const QString newBinaryId = finalQtPath + framework.frameworkName + framework.binaryPath; - foreach (const QString &binary, binaryPaths) - changeInstallName(oldBinaryId, newBinaryId, binary); - } -} - -void changeQtFrameworks(const QString appPath, const QString &qtPath, bool useDebugLibs) -{ - const QString appBinaryPath = findAppBinary(appPath); - const QStringList libraryPaths = findAppLibraries(appPath); - const QList<FrameworkInfo> frameworks = getQtFrameworksForPaths(QStringList() << appBinaryPath << libraryPaths, appPath, getBinaryRPaths(appBinaryPath, true), useDebugLibs); - if (frameworks.isEmpty()) { - LogWarning(); - LogWarning() << "Could not find any _external_ Qt frameworks to change in" << appPath; - return; - } else { - const QString absoluteQtPath = QDir(qtPath).absolutePath(); - changeQtFrameworks(frameworks, QStringList() << appBinaryPath << libraryPaths, absoluteQtPath); - } -} - void codesignFile(const QString &identity, const QString &filePath) { if (!runCodesign) diff --git a/src/macdeployqt/shared/shared.h b/src/macdeployqt/shared/shared.h index ab28360d5..15ff08430 100644 --- a/src/macdeployqt/shared/shared.h +++ b/src/macdeployqt/shared/shared.h @@ -111,9 +111,6 @@ public: inline QDebug operator<<(QDebug debug, const ApplicationBundleInfo &info); -void changeQtFrameworks(const QString appPath, const QString &qtPath, bool useDebugLibs); -void changeQtFrameworks(const QList<FrameworkInfo> frameworks, const QStringList &binaryPaths, const QString &qtPath); - OtoolInfo findDependencyInfo(const QString &binaryPath); FrameworkInfo parseOtoolLibraryLine(const QString &line, const QString &appBundlePath, const QSet<QString> &rpaths, bool useDebugLibs); QString findAppBinary(const QString &appBundlePath); |