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. The fastest way to deploy Qt app on Window, etc. for beginners.
Qt 6.11 is out! See what's new in the release blog

The fastest way to deploy Qt app on Window, etc. for beginners.

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 1.4k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    ermylistru
    wrote on last edited by
    #1

    Read this great deployment guide - "Deploy Applications on Windows": http://qt-project.org/wiki/Deploy_an_Application_on_Windows

    Qt is absolutely great, fast and easy to develop apps.
    But some points in it, for us newbies, are a real problem. One of them is deployment, for example, on Windows.
    I had this problem and solved it as I think in a very stupid and simple way, and I want to share it in hope that it can help someone.
    After compiling release version of the app, putting the exe file in a separate folder and running, I surely got a long list of messages about missing dlls, which I successfully took in "mingw482_32\bin" folder and put in my app root folder. Also I knew about the need in "bin\plugins\platforms\qwindows.dll" and copied it also this way "myappfolder\platforms\qwindows.dll". On the dev computer now the app ran OK, but if I started it on another computer, it didn't work. Windows didn't show any warning messages, but the app window did not appear on the screen, app started and was shown in task manager, but not on the screen.
    I thought it might be some missing libs or plugins, which the app took from Qt install folder, to test it I renamed Qt installation folder on dev machine and vualia - app didn't work on dev machine either. So it was the point.
    But how to find out which plugins the app depends on? There are quite a lot of them. I searched and read a lot on the forum here, I tried Dependancy Walker, MS Process Explorer and windeployqt.exe, all are not good to give results in a fast and comfortable way.
    After some hours of headache a stupid idea came to my mind - I just began renaming folders in Qt install folder to make them unavailable for the app. I began from the top level dirs, found the one, the lack of which made my app to stop working, and then proceded to its subdirectories. In 5 minutes I found out that my app needed ..\mingw482_32\qml\QtQuick\Window.2 and qml\QtQuick.2 directories, which I coppied to my app folder like that – myappfolder\QtQuick\Window.2 and myappfolder\QtQuick.2 and it made everything work perfectly.
    I understand that this is a really stupid method, but it became a hundred times faster than seaching and learning all those wierd tools which are as far from deployment as stars from earth, imho.

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

      Hi,

      Otherwise, you also have that fine "wiki entry":http://qt-project.org/wiki/Deploy_an_Application_on_Windows

      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
      • E Offline
        E Offline
        ermylistru
        wrote on last edited by
        #3

        Yes, great deployment guide!!! Exactly what is needed, it's a pitty that I haven't seen it before. We have to popularize it, because it is not shown in the seach on this topic.
        Especially I liked the way to copy dlls and plugins to app folder and during the app running try to delete them, those which are used by the app won't be deleted, nice.

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

          It should already be, most of the recent deployment related threads have it mentioned at some point

          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
          • E Offline
            E Offline
            ermylistru
            wrote on last edited by
            #5

            OK, than it is great.. thank you guys for all the work you do. )

            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