Solved How to deploy a Windows application on a Windows 10 clean PC?
-
@SGaist I've tried with gallery sample and occurs the same.
I've created a virtual machine with Windows 10 Home. After compile gallery sample with MSVC 2017 64 bit, I've copied the exe and all the dlls inside C:\Qt\5.9.2\msvc2017_64\bin and all the C:\Qt\5.9.2\msvc2017_64\plugins directory.
On the virtual machine I've installed "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.11.25325\vcredist_x64.exe".
Continues the same. On the development laptop works, on the Windows 10 virtual machine, doesn't start.
-
@SGaist It's a very basic app, only uses: QT += quickcontrols2
-
Did you pass the
--qmldir
option towindeployqt
?[edit: fixed option name SGaist]
-
@SGaist No
-
This post is deleted! -
@SGaist I've put the --qmldir option on windeploy and the gallery sample works!!!
C:\Qt\5.9.2\msvc2017_64\bin\windeployqt.exe --qmldir C:\Qt\5.9.2\msvc2017_64\qml gallery.exe
-
@lqsa It works with my app!
Thank you very much.
-
Since you are using QtQuick Controls, you have to also deploy the related libraries/qml files. That's why you should point
windeployqt
to your project qml folder with the--qmldir
option so that it can parse them and deploy the needed dependencies. -
@SGaist Sorry, I don't understand your answer. My qmls files are embeded in the application because are treated like resources, so it isn't necessary to copy them. If you see the previous command used, I put on the qmldir parameter the Qt directoy where are the general Qt Qml files.
-
It's not about having your qml files deployed it's about having them parsed so the tool can deploy the files from the related modules needed by your qml code to run properly.