summaryrefslogtreecommitdiffstats
path: root/src/tools/windeployqt/utils.h
diff options
context:
space:
mode:
authorOliver Wolff <[email protected]>2023-08-01 13:43:45 +0200
committerOliver Wolff <[email protected]>2023-08-22 11:15:13 +0200
commit68b16974a72a35e33e4e947f7edfabd6ccd5f6a1 (patch)
tree687383e22fd59a159fd6854f798914d8bd6ac678 /src/tools/windeployqt/utils.h
parent634f474300fe27b6decb61937f1c5a5401807fad (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 <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/tools/windeployqt/utils.h')
-rw-r--r--src/tools/windeployqt/utils.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/tools/windeployqt/utils.h b/src/tools/windeployqt/utils.h
index 71f964d0343..88e5b38c2c7 100644
--- a/src/tools/windeployqt/utils.h
+++ b/src/tools/windeployqt/utils.h
@@ -20,7 +20,6 @@ QT_BEGIN_NAMESPACE
enum PlatformFlag {
// OS
WindowsBased = 0x00001,
- UnixBased = 0x00002,
// CPU
IntelBased = 0x00010,
ArmBased = 0x00020,
@@ -34,7 +33,6 @@ enum PlatformFlag {
WindowsDesktopMinGW = WindowsBased + IntelBased + MinGW,
WindowsDesktopClangMsvc = WindowsBased + IntelBased + ClangMsvc,
WindowsDesktopClangMinGW = WindowsBased + IntelBased + ClangMinGW,
- Unix = UnixBased,
UnknownPlatform
};
@@ -137,9 +135,8 @@ inline QString normalizeFileName(const QString &name) { return name; }
#endif // !Q_OS_WIN
static const char windowsSharedLibrarySuffix[] = ".dll";
-static const char unixSharedLibrarySuffix[] = ".so";
-inline QString sharedLibrarySuffix(Platform platform) { return QLatin1StringView((platform & WindowsBased) ? windowsSharedLibrarySuffix : unixSharedLibrarySuffix); }
+inline QString sharedLibrarySuffix() { return QLatin1StringView(windowsSharedLibrarySuffix); }
bool isBuildDirectory(Platform platform, const QString &dirName);
bool createSymbolicLink(const QFileInfo &source, const QString &target, QString *errorMessage);
@@ -170,19 +167,6 @@ bool runProcess(const QString &binary, const QStringList &args,
bool readPeExecutable(const QString &peExecutableFileName, QString *errorMessage,
QStringList *dependentLibraries = 0, unsigned *wordSize = 0,
bool *isDebug = 0, bool isMinGW = false, unsigned short *machineArch = nullptr);
-bool readElfExecutable(const QString &elfExecutableFileName, QString *errorMessage,
- QStringList *dependentLibraries = 0, unsigned *wordSize = 0,
- bool *isDebug = 0);
-
-inline bool readExecutable(const QString &executableFileName, Platform platform,
- QString *errorMessage, QStringList *dependentLibraries = 0,
- unsigned *wordSize = 0, bool *isDebug = 0, unsigned short *machineArch = nullptr)
-{
- return platform == Unix ?
- readElfExecutable(executableFileName, errorMessage, dependentLibraries, wordSize, isDebug) :
- readPeExecutable(executableFileName, errorMessage, dependentLibraries, wordSize, isDebug,
- (platform == WindowsDesktopMinGW), machineArch);
-}
#ifdef Q_OS_WIN
# if !defined(IMAGE_FILE_MACHINE_ARM64)
@@ -193,10 +177,10 @@ QString getArchString (unsigned short machineArch);
// Return dependent modules of executable files.
-inline QStringList findDependentLibraries(const QString &executableFileName, Platform platform, QString *errorMessage)
+inline QStringList findDependentLibraries(const QString &executableFileName, QString *errorMessage)
{
QStringList result;
- readExecutable(executableFileName, platform, errorMessage, &result);
+ readPeExecutable(executableFileName, errorMessage, &result);
return result;
}