windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory
-
It was more or less connected :-) the platform plugin dll is usually qwindows.dll and it has changed between 5.13.2 and 5.14, it's not a change in C++ code but in the flags for the .dll, if you run MSVC's dumpbin.exe/header on the MinGW 5.13.2 qwindows.dll you get:
Executable Line numbers stripped Symbols stripped 32 bit word machine Debug information stripped DLL
and if you run the dumpbin/header on the MinGW 5.14.0 qwindows.dll you get:
Executable Line numbers stripped 32 bit word machine DLL
the difference is not much, only those ...STRIPPED... flags, but it's enough to confuse windeployt, the relevant code is in qt-everywhere-src-5.14.0/qttools/src/shared/winutils/utils.cpp line 828 and line 829:
... // Use logic that's used e.g. in objdump / pfd library *isDebugIn = !(nth->FileHeader.Characteristics & IMAGE_FILE_DEBUG_STRIPPED); ...
because this is never true in MinGW 5.14.0 the ! will cause *isDebugIn to be always true, i.e. windeployqt thinks that qwindows.dll is debug flavored and not a good match for your release flavored .exe :-(
But then windeployin debug flavored builds should still work in MinGW 5.14.0, right? Nice try, but sorry. It will instead complain about the lack of the *d.dll suffixed .dlls, .e.g. it does not find Qt5Cored.dll.
I'll file a bug report once I had some coffee.
-
ok, https://bugreports.qt.io/browse/QTBUG-80806 submitted
I only had to report about the release build problem. the debug build problems that there are no .dll's with a d.dll suffix was already reported 2 days ago:
https://bugreports.qt.io/browse/QTBUG-80763If you promise you will only use windeployqt for Release builds I can give you a patched windeployqt.exe...
Edit: I patched that line 829, to
*isDebugIn = false;
and rebuilt windeployqt to a new .exe, called it windeployqtreleaseonly
Drop it into C:\Qt\5.14.0\mingw73_32\bin and you're good to go. -
@hskoglund Thank you very much for the greate effort
-
@hskoglund said in windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory:
ok, https://bugreports.qt.io/browse/QTBUG-80806 submitted
I only had to report about the release build problem. the debug build problems that there are no .dll's with a d.dll suffix was already reported 2 days ago:
https://bugreports.qt.io/browse/QTBUG-80763If you promise you will only use windeployqt for Release builds I can give you a patched windeployqt.exe...
Edit: I patched that line 829, to
*isDebugIn = false;
and rebuilt windeployqt to a new .exe, called it windeployqtreleaseonly
Drop it into C:\Qt\5.14.0\mingw73_32\bin and you're good to go.@hskoglund 64bit version , pls. Thanks for your contribution.
-
@hskoglund Seems that nobody at Qt gives a... nything about this bug? It's a year later and 5.15.2 apparently still suffers from the very same issue. Thank you for the patched windeployqt version!
-
@hskoglund @hskoglund i am also facing same problem...can you please give me a soluntion detail way?
:)
thanks in Advance -
This post is deleted!
-
@hskoglund: thx man, you saved my day :)
-
@bogdan_bdg said in windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory:
@hskoglund Seems that nobody at Qt gives a... nything about this bug? It's a year later and 5.15.2 apparently still suffers from the very same issue. Thank you for the patched windeployqt version!
Worse, the conan package for Qt 5.15.2 has the same problem and the patched binary can't just be dropped in.
Edit: Actually it is fixed. The --debug flag specifies installing the debug versions, not, as was posted elsewhere on the internet, turning on debug output for windeployqt.
-
@hskoglund Oh yeah, thank you very much for your patched versions. Sadly, those are still required in Qt 5.15.2 (working also with C:\Qt\5.15.2\mingw81...... )