Usually to deploy a Qt project I either:
- Keep running it and find the libraries that it complains are missing and add them until there are no more.
- Use dependency walker to get me most of the way (if not all) and then go back to option 1.
- Or just create a statically linked version (pain in the bum sometimes)
So I now wanted to try windeployqt which for me exists in D:\install\Qt\5.5\mingw492_32\bin\
Then I ran it using:
D:\>D:\install\Qt\5.5\mingw492_32\bin\windeployqt.exe d:\software\build-qtGuiTestApp-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug
Here is the result output:
D:\software\build-qtGuiTestApp-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug\qtGuiTes
tApp.exe 32 bit, debug executable
Adding Qt5Svg for qsvgicond.dll
Skipping plugin qmldbg_qtquick2d.dll due to disabled dependencies.
Skipping plugin qmldbg_tcpd.dll due to disabled dependencies.
Direct dependencies: Qt5Core Qt5Network Qt5WebKitWidgets Qt5Widgets
All dependencies : Qt5Core Qt5Gui Qt5Multimedia Qt5MultimediaWidgets Qt5Networ
k Qt5OpenGL Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5Sql Qt5
WebKit Qt5WebKitWidgets Qt5Widgets
To be deployed : Qt5Core Qt5Gui Qt5Multimedia Qt5MultimediaWidgets Qt5Networ
k Qt5OpenGL Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5Sensors Qt5Sql Qt5
Svg Qt5WebKit Qt5WebKitWidgets Qt5Widgets
Updating Qt5WebChanneld.dll.
Updating icuin54.dll.
Updating icuuc54.dll.
Updating icudt54.dll.
Updating Qt5Cored.dll.
Updating Qt5Guid.dll.
Updating Qt5Multimediad.dll.
Updating Qt5MultimediaWidgetsd.dll.
Updating Qt5Networkd.dll.
Updating Qt5OpenGLd.dll.
Updating Qt5Positioningd.dll.
Updating Qt5PrintSupportd.dll.
Updating Qt5Qmld.dll.
Updating Qt5Quickd.dll.
Updating Qt5Sensorsd.dll.
Updating Qt5Sqld.dll.
Updating Qt5Svgd.dll.
Updating Qt5WebKitd.dll.
Updating Qt5WebKitWidgetsd.dll.
Updating Qt5Widgetsd.dll.
Updating libGLESV2d.dll.
Updating libEGLd.dll.
Updating D3Dcompiler_47.dll.
Creating directory audio.
Updating qtaudio_windowsd.dll.
Creating directory bearer.
Updating qgenericbearerd.dll.
Updating qnativewifibearerd.dll.
Creating directory iconengines.
Updating qsvgicond.dll.
Creating directory imageformats.
Updating qddsd.dll.
Updating qgifd.dll.
Updating qicnsd.dll.
Updating qicod.dll.
Updating qjp2d.dll.
Updating qjpegd.dll.
Updating qmngd.dll.
Updating qsvgd.dll.
Updating qtgad.dll.
Updating qtiffd.dll.
Updating qwbmpd.dll.
Updating qwebpd.dll.
Creating directory mediaservice.
Updating dsengined.dll.
Updating qtmedia_audioengined.dll.
Creating directory platforms.
Updating qwindowsd.dll.
Creating directory playlistformats.
Updating qtmultimedia_m3ud.dll.
Creating directory position.
Updating qtposition_positionpolld.dll.
Creating directory printsupport.
Updating windowsprintersupportd.dll.
Creating directory sensorgestures.
Updating qtsensorgestures_plugind.dll.
Updating qtsensorgestures_shakeplugind.dll.
Creating directory sensors.
Updating qtsensors_genericd.dll.
Creating directory sqldrivers.
Updating qsqlited.dll.
Updating qsqlmysqld.dll.
Updating qsqlodbcd.dll.
Updating qsqlpsqld.dll.
Creating D:\software\build-qtGuiTestApp-Desktop_Qt_5_5_0_MinGW_32bit-Debug\debug
\translations...
Creating qt_ca.qm...
Creating qt_cs.qm...
Creating qt_de.qm...
Creating qt_fi.qm...
Creating qt_fr.qm...
Creating qt_hu.qm...
Creating qt_it.qm...
Creating qt_ja.qm...
Creating qt_ko.qm...
Creating qt_lv.qm...
Creating qt_ru.qm...
Creating qt_sk.qm...
Creating qt_uk.qm...
D:\>
So looks good, since my project, although very simple, uses: core, gui, network, webkit, webkitwidgets
so yeah, a lot of qt libraries.
However when I run my executable I get the error that it can't find the following libs:
- libgcc_s_dw2-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
I manually added them from the same folder (D:\install\Qt\5.5\mingw492_32\bin\
) and it works fine. My questions are:
- Why does it miss these files?
- How can I make it get them?
- 1GB of libs seemed a bit excessive to me, so I went around and deleted a few that I thought I don't need and my executable still runs fine. So how can you make windeployqt more efficient and just get the DLLs you need?
Without these questions answered, I find that this tool is a bit useless to me since I can do better myself.... I could probably script something up to keep running it and read the error and copy the relevant dll :o
edit
The following folders (with dll's) where added, but they only amount to 75mb... to be fair the nearly 1GB is due to webkit, quick, gui and other large Qt libs that I AM using:
mediaservice,
platforms,
playlistformats,
position,
printsupport,
sensorgestures,
sensors,
sqldrivers,
translations,
audio,
iconengines,
imageformats