aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-01-11 00:10:05 +0000
committerJoão Valverde <j@v6e.pt>2023-01-12 14:30:41 +0000
commitd00bd20fea5c6304b42ee3e9ac3cb6f20885f4bc (patch)
tree0c86165bcb9137d9edf2ec4ed8d04dcb1e834b71 /ui/qt
parentb0cb719672abc64c27e1477d01591a731ee6bc6c (diff)
MSYS2: Fix system installation
Make the "ninja install" target in the MINGW64 shell work and allow Wireshark to run from the msys2 installation, besides the build directory. To clarify the names used here MSYSTEM is the distribution with a Linux-like environment for Windows. MINGW is the toolchain. It is possible to use MinGW without MSYS2 and we generally select the CMake variables WIN32/MSVC/MINGW/USE_MSYSTEM taking that into consideration but that WIN32+MINGW platform is not supported at the moment and it's unlikely to be supported in the near future.
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
index 68b53ffa7e..aba9f051c5 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -342,7 +342,7 @@ check_and_warn_user_startup()
}
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW64__)
// Try to avoid library search path collisions. QCoreApplication will
// search QT_INSTALL_PREFIX/plugins for platform DLLs before searching
// the application directory. If
@@ -360,6 +360,9 @@ check_and_warn_user_startup()
// same path on the build machine. At any rate, loading DLLs from paths
// you don't control is ill-advised. We work around this by removing every
// path except our application directory.
+//
+// NOTE: This does not apply to MinGW-w64 using MSYS2. In that case we use
+// the system's Qt plugins with the default search paths.
static inline void
win32_reset_library_path(void)
@@ -647,7 +650,7 @@ int main(int argc, char *qt_argv[])
commandline_early_options(argc, argv);
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW64__)
win32_reset_library_path();
#endif