Every time a new Qt project is built for first time in Visual Studio, even with the VS Tools installed, I have to copy some Qt-related binary files (Qt5Core.dll, platform files...). Otherwise, when running from Visual Studio, Qt5Core.dll
(or debug one) are correctly found but not the platform DLL:
Obviously, it would also fail when running done from outside the IDE, for example, during unit testing on automated builds.
Qt's has a tool to do so, called windeployqt
, which basically looks for dependencies (Qt) and copy them. For example:
c:\Qt\Qt5.12.1\bin\windeployqt c:\projects\qt-project\Release --release
will analyze executables in c:\projects\qt-project\Release
and copy required DLLs, plugins, translations and other related binaries to such location.
I'm interested in how to integrate windeployqt
into the build workflow of Visual Studio so this process is automatic (even when checked out in different computers).