diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2023-08-01 13:43:45 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2023-08-22 11:15:13 +0200 |
commit | 68b16974a72a35e33e4e947f7edfabd6ccd5f6a1 (patch) | |
tree | 687383e22fd59a159fd6854f798914d8bd6ac678 /src/tools/windeployqt/main.cpp | |
parent | 634f474300fe27b6decb61937f1c5a5401807fad (diff) |
Remove elfreader and other unix leftovers from windeployqt
Back then elfreader and other unix functionality was added for the
purpose of having one generic deployment tool but it was never used.
Remove the code to be more clear on what to expect.
Pick-to: 6.6
Change-Id: I2b7a759de04afe0c5fb210ad65f1c86e32934f18
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/tools/windeployqt/main.cpp')
-rw-r--r-- | src/tools/windeployqt/main.cpp | 47 |
1 files changed, 14 insertions, 33 deletions
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp index 2f59a9667b..d846ac9688 100644 --- a/src/tools/windeployqt/main.cpp +++ b/src/tools/windeployqt/main.cpp @@ -116,8 +116,6 @@ static QByteArray formatQtModules(const ModuleBitset &mask, bool option = false) static Platform platformFromMkSpec(const QString &xSpec) { - if (xSpec == "linux-g++"_L1) - return Unix; if (xSpec.startsWith("win32-"_L1)) { if (xSpec.contains("clang-g++"_L1)) return WindowsDesktopClangMinGW; @@ -718,7 +716,8 @@ static bool findDependentQtLibraries(const QString &qtBinDir, const QString &bin QStringList dependentLibs; if (directDependencyCount) *directDependencyCount = 0; - if (!readExecutable(binary, platform, errorMessage, &dependentLibs, wordSize, isDebug, machineArch)) { + if (!readPeExecutable(binary, errorMessage, &dependentLibs, wordSize, isDebug, + platform == WindowsDesktopMinGW, machineArch)) { errorMessage->prepend("Unable to find dependent libraries of "_L1 + QDir::toNativeSeparators(binary) + " :"_L1); return false; @@ -943,19 +942,9 @@ QStringList findQtPlugins(ModuleBitset *usedQtModules, const ModuleBitset &disab QString filter; const bool isPlatformPlugin = subDirName == "platforms"_L1; if (isPlatformPlugin) { - switch (platform) { - case WindowsDesktopMsvc: - case WindowsDesktopMinGW: - filter = QStringLiteral("qwindows"); - if (!infix.isEmpty()) - filter += infix; - break; - case Unix: - filter = QStringLiteral("libqxcb"); - break; - case UnknownPlatform: - break; - } + filter = QStringLiteral("qwindows"); + if (!infix.isEmpty()) + filter += infix; } else { filter = u"*"_s; } @@ -1061,17 +1050,11 @@ static QString libraryPath(const QString &libraryLocation, const char *name, const QString &infix, Platform platform, bool debug) { QString result = libraryLocation + u'/'; - if (platform & WindowsBased) { - result += QLatin1StringView(name); - result += infix; - if (debug && platformHasDebugSuffix(platform)) - result += u'd'; - } else if (platform.testFlag(UnixBased)) { - result += QStringLiteral("lib"); - result += QLatin1StringView(name); - result += infix; - } - result += sharedLibrarySuffix(platform); + result += QLatin1StringView(name); + result += infix; + if (debug && platformHasDebugSuffix(platform)) + result += u'd'; + result += sharedLibrarySuffix(); return result; } @@ -1118,7 +1101,7 @@ static QStringList findMinGWRuntimePaths(const QString &qtBinDir, Platform platf QStringList result; const bool isClang = platform == WindowsDesktopClangMinGW; QStringList filters; - const QString suffix = u'*' + sharedLibrarySuffix(platform); + const QString suffix = u'*' + sharedLibrarySuffix(); for (const auto &minGWRuntime : runtimeFilters) filters.append(minGWRuntime + suffix); @@ -1250,9 +1233,7 @@ static DeployResult deploy(const Options &options, const QMap<QString, QString> const QChar slash = u'/'; const QString qtBinDir = qtpathsVariables.value(QStringLiteral("QT_INSTALL_BINS")); - const QString libraryLocation = options.platform == Unix - ? qtpathsVariables.value(QStringLiteral("QT_INSTALL_LIBS")) - : qtBinDir; + const QString libraryLocation = qtBinDir; const QString infix = qtpathsVariables.value(QLatin1StringView(qmakeInfixKey)); const int version = qtVersion(qtpathsVariables); Q_UNUSED(version); @@ -1331,7 +1312,7 @@ static DeployResult deploy(const Options &options, const QMap<QString, QString> const QStringList qtLibs = dependentQtLibs.filter(QStringLiteral("Qt6Core"), Qt::CaseInsensitive) + dependentQtLibs.filter(QStringLiteral("Qt5WebKit"), Qt::CaseInsensitive); for (const QString &qtLib : qtLibs) { - QStringList icuLibs = findDependentLibraries(qtLib, options.platform, errorMessage).filter(QStringLiteral("ICU"), Qt::CaseInsensitive); + QStringList icuLibs = findDependentLibraries(qtLib, errorMessage).filter(QStringLiteral("ICU"), Qt::CaseInsensitive); if (!icuLibs.isEmpty()) { // Find out the ICU version to add the data library icudtXX.dll, which does not show // as a dependency. @@ -1462,7 +1443,7 @@ static DeployResult deploy(const Options &options, const QMap<QString, QString> } if (options.platform.testFlag(WindowsBased) && !qtGuiLibrary.isEmpty()) { - const QStringList guiLibraries = findDependentLibraries(qtGuiLibrary, options.platform, errorMessage); + const QStringList guiLibraries = findDependentLibraries(qtGuiLibrary, errorMessage); const bool dependsOnOpenGl = !guiLibraries.filter(QStringLiteral("opengl32"), Qt::CaseInsensitive).isEmpty(); if (options.softwareRasterizer && !dependsOnOpenGl) { const QFileInfo softwareRasterizer(qtBinDir + slash + QStringLiteral("opengl32sw") + QLatin1StringView(windowsSharedLibrarySuffix)); |