Problem deploying a simple qml windows App
-
Hello,
I have a relatively simple windows app compiled with MSVC2017_64bit SDK.
The application runs OK in release mode from QT creator and VS2017.
I tried running windeployqt.exe. It copies over 60MB of data in the executable folder, but the executable does NOT run. When I try to start it, nothing happends. No errors, but no messages or nothing.
I tried copying the various needed dll in the folder, but I am getting stuck on a missing MSVCP140_APP.dll dll (ie: I start the exe. it complains that dll ??? is missing, so I copy the dll in the folder and try again).
Any idea what is happening/what I am doing wrong/what I need to do?
Thanks
-
Follow the deployment guide. This is cumbersome, but you only need to do it once, thankfully :-)
I am getting stuck on a missing MSVCP140_APP.dll
Why stuck? You can't find it or? It's installed together with your compiler, search your c:/ drive for "msvcp140" and you'll get a bunch of results.
-
a typical error for applications that have QML parts is missing QML path.
Did you spefify the folder where your QML files are during the execution of windeployqt.exe ?--qmldir
-
Hello,
Sorry, I miss-copied... I could not find vcruntime140_app.dll...
I did finally manage to track the dll down and I now have the following in my directory:
CBScope.exe MSVCP140_APP.DLL Qt5Core.dll Qt5Gui.dll Qt5Multimedia.dll Qt5Network.dll Qt5PrintSupport.dll Qt5Qml.dll Qt5Quick.dll Qt5Widgets.dll VCRUNTIME140_APP.DLL
But the app is still not working, I just get a "crash" now: "application unable to start correctly"...the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...
Cyrille
-
@Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:
the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...
You have to specify it even in that case, IIRC.
-
@Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:
the app is a QML application, but the qml files are resources of the application (compiled in). so I do not think that I need to specify a qml dir.. unless I am misunderstanding...
You do,
the deployment tool needs to know where the actual qml files are, so it can check them for the Imports and copy needed dll's and plugins. -
Hello
--qmldir was the problem! Thanks!
However it is still over 60mb for a small 200KB app :-( seems like an overkill!cyrille
-
@Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:
However it is still over 60mb for a small 200KB app :-( seems like an overkill!
Yep, that sucks, but is not avoidable. Well, you could cut it down to probably ~30MB with some tricks but not less. The reason why your app can be small is that Qt does the heavy lifting ;-) And that takes space.
-
@Cyrille-de-Brebisson said in Problem deploying a simple qml windows App:
Hello
--qmldir was the problem! Thanks!
great that it works for you
However it is still over 60mb for a small 200KB app :-( seems like an overkill!
cyrille
That's the nature of things sadly. On the upside, it won't get significantly bigger, as long as you don't add new modules or new/different imports
There a ways to reduce the size, but its going to be time consuming.
Static build qt and / or Qt Lite
take a look at this - relatively - old blog entry
http://blog.qt.io/blog/2017/01/23/qt-5-8-released/