Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to deploy a Windows application on a Windows 10 clean PC?
QtWS25 Last Chance

How to deploy a Windows application on a Windows 10 clean PC?

Scheduled Pinned Locked Moved Solved Installation and Deployment
14 Posts 3 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lqsa
    wrote on last edited by lqsa
    #1

    I've created an application with Qt 5.9.2. On my development laptop, the application works well, but when I try to run it on a clean Windows 10 PC, it doesn't start. I've used windeployqt, but without success. I have also copied all the C:\Qt\5.9.2\mingw53_32\bin dlls. I've tried with Mingw32 compiler and MSVC2017 64 bits compiler. In both cases the same, on development works well, but not in a clean PC.

    For Mingw32, I've already copied all the C:\Qt\Tools\mingw530_32\bin dlls. For MSVC2017, I've downloaded and installed the redistributable package.

    I have also tried with the gallery sample. Occurs the same.

    K 1 Reply Last reply
    0
    • L lqsa

      I've created an application with Qt 5.9.2. On my development laptop, the application works well, but when I try to run it on a clean Windows 10 PC, it doesn't start. I've used windeployqt, but without success. I have also copied all the C:\Qt\5.9.2\mingw53_32\bin dlls. I've tried with Mingw32 compiler and MSVC2017 64 bits compiler. In both cases the same, on development works well, but not in a clean PC.

      For Mingw32, I've already copied all the C:\Qt\Tools\mingw530_32\bin dlls. For MSVC2017, I've downloaded and installed the redistributable package.

      I have also tried with the gallery sample. Occurs the same.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @lqsa

      How do you test on development laptop?
      Always from creator?

      It might be a dumb question, but are you copying also the actual Qt dlls and the Qt plugins?

      Vote the answer(s) that helped you to solve your issue(s)

      L 1 Reply Last reply
      0
      • K koahnig

        @lqsa

        How do you test on development laptop?
        Always from creator?

        It might be a dumb question, but are you copying also the actual Qt dlls and the Qt plugins?

        L Offline
        L Offline
        lqsa
        wrote on last edited by
        #3

        @koahnig I've created a separated directory and put there the generated exe and the dlls that needs the application. Doing doble clic, it executes without problems.

        On the clean PC, I've copied the same separated directory. No works. After, I've copied all the QT dlls found on the dirs I've mentioned. No works.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          What exact modules are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 2 Replies Last reply
          0
          • SGaistS SGaist

            Hi,

            What exact modules are you using ?

            L Offline
            L Offline
            lqsa
            wrote on last edited by
            #5

            @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.

            1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              What exact modules are you using ?

              L Offline
              L Offline
              lqsa
              wrote on last edited by
              #6

              @SGaist It's a very basic app, only uses: QT += quickcontrols2

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by SGaist
                #7

                Did you pass the --qmldir option to windeployqt ?

                [edit: fixed option name SGaist]

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                L 3 Replies Last reply
                1
                • SGaistS SGaist

                  Did you pass the --qmldir option to windeployqt ?

                  [edit: fixed option name SGaist]

                  L Offline
                  L Offline
                  lqsa
                  wrote on last edited by
                  #8

                  @SGaist No

                  1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Did you pass the --qmldir option to windeployqt ?

                    [edit: fixed option name SGaist]

                    L Offline
                    L Offline
                    lqsa
                    wrote on last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Did you pass the --qmldir option to windeployqt ?

                      [edit: fixed option name SGaist]

                      L Offline
                      L Offline
                      lqsa
                      wrote on last edited by lqsa
                      #10

                      @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

                      L 1 Reply Last reply
                      0
                      • L lqsa

                        @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

                        L Offline
                        L Offline
                        lqsa
                        wrote on last edited by lqsa
                        #11

                        @lqsa It works with my app!

                        Thank you very much.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          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.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          L 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            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.

                            L Offline
                            L Offline
                            lqsa
                            wrote on last edited by
                            #13

                            @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.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              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.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved