Reputation:
I am trying to deploy a simple Qt based chat program, that uses a WebWidget for the chat itself, QListWidgets and some labels. As well as QWebSocket for the network connection. But I do need to add 120 MB files to deploy it.
This are my QT and CONFIG variables in the pro file:
CONFIG += qt release
QT += gui websockets webkitwidgets widgets
This is the list of files I had to add:
│ D3Dcompiler_47.dll
│ icudt54.dll
│ icuin54.dll
│ icuuc54.dll
│ libEGL.dll
│ libgcc_s_dw2-1.dll
│ libGLESV2.dll
│ libstdc++-6.dll
│ libwinpthread-1.dll
│ opengl32sw.dll
│ Qt5Core.dll
│ Qt5Gui.dll
│ Qt5Multimedia.dll
│ Qt5MultimediaWidgets.dll
│ Qt5Network.dll
│ Qt5OpenGL.dll
│ Qt5Positioning.dll
│ Qt5PrintSupport.dll
│ Qt5Qml.dll
│ Qt5Quick.dll
│ Qt5Sensors.dll
│ Qt5Sql.dll
│ Qt5Svg.dll
│ Qt5WebChannel.dll
│ Qt5WebKit.dll
│ Qt5WebKitWidgets.dll
│ Qt5WebSockets.dll
│ Qt5Widgets.dll
│
├───audio
│ qtaudio_windows.dll
│
├───bearer
│ qgenericbearer.dll
│ qnativewifibearer.dll
│
├───iconengines
│ qsvgicon.dll
│
├───imageformats
│ qdds.dll
│ qgif.dll
│ qicns.dll
│ qico.dll
│ qjp2.dll
│ qjpeg.dll
│ qmng.dll
│ qsvg.dll
│ qtga.dll
│ qtiff.dll
│ qwbmp.dll
│ qwebp.dll
│
├───mediaservice
│ dsengine.dll
│ qtmedia_audioengine.dll
│
├───platforms
│ qwindows.dll
│
├───playlistformats
│ qtmultimedia_m3u.dll
│
├───position
│ qtposition_positionpoll.dll
│
├───printsupport
│ windowsprintersupport.dll
│
├───sensorgestures
│ qtsensorgestures_plugin.dll
│ qtsensorgestures_shakeplugin.dll
│
├───sensors
│ qtsensors_generic.dll
│
├───sqldrivers
│ qsqlite.dll
│ qsqlmysql.dll
│ qsqlodbc.dll
│ qsqlpsql.dll
│
└───translations
qt_ca.qm
qt_cs.qm
qt_de.qm
qt_en.qm
qt_fi.qm
qt_fr.qm
qt_he.qm
qt_hu.qm
qt_it.qm
qt_ja.qm
qt_ko.qm
qt_lv.qm
qt_ru.qm
qt_sk.qm
qt_uk.qm
QtPositioning, Sql dlls, Qml and QtQuick? Last time I deployed a Qt program was with Qt4; I remember I had less dependencies.. Is there something wrong?
Upvotes: 2
Views: 2188
Reputation: 49319
You might want to do your own Qt build and cut it down as much as possible. It will still be a mess, but a smaller one. Remove optional modules you don't need, resort to using system libraries instead of those bundled with Qt wherever possible, don't use ICU - that alone will cut almost 30MB of dependencies.
The best option is to use a static build and link statically, but there are plenty of limitations at play, you either need a commercial license or to open your code, and still, deployment for QML projects is and has been broken for years. Sadly, it seems like making the lives of all of those using Qt for free as miserable as possible has become quite a priority, in order to force developers into spending on the expensive commercial license, which is the sole remedy to the situation, or at least it will be hopefully by the time Qt 5.7 is released.
BTW, if those DLLs got pulled in by the deployment tool - I advice against trusting it. I have tried it literally yesterday, and it turned out to be completely broken - failed to pull in half of the needed DLLs, half of those it pulled in weren't actually needed, and in terms of qml files, it did even worse.
If not by the deployment tool, those extra dlls are probably indirect dependencies - for example the web sockets define a QML API, so they might pull QML in as a dependency, which itself pulls a cascade of other modules and libraries. You should investigate if you can build those modules without their QML side.
Upvotes: 2