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. Deployment on windows
Qt 6.11 is out! See what's new in the release blog

Deployment on windows

Scheduled Pinned Locked Moved Installation and Deployment
7 Posts 2 Posters 3.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.
  • C Offline
    C Offline
    code_fodder
    wrote on last edited by
    #1

    Hi All,

    I am using Qt SDK 5.0.2 and I have a little console project that running nicely within the Qt Creator environment. But now I want to take the compiled .exe file and run it on another PC.

    I have been reading as many "how to deploy your app" in the forums/web as I can but have not found quite what I need to know to get going.

    Mostly people are saying you need to add your .dll files into your project. So at the moment I am trying to achieve this by running my QT project via the .exe file that it produces (i.e. in standalone mode).

    When I run my .exe it complains that it cant fine QtCored.dll. So I add this to the folder where my .exe is and that warning goes away, and I get warned about the next missing .dll.

    My question is, how are people adding these .dlls to their projects? Do we just do as I have done and manually copy them into the output folder, or do we include then in our projects somehow?

    I have a copy of dependency walker which helps me to find the .dlls that I need to find.

    One further/relevant question: What does the "build --> deploy project" menu option to in Qt Creator? - mine is grey'ed out so I can't use it.

    Thanks for any help.

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

      Hi,

      Did you add a deploy step ?

      To deploy an application on windows, I've just followed the official documentation, i.e. take the libs for every module I use, then add the 3rd party non system libs etc... (It also depends on whether you build dynamically or statically). For this last step, Dependency Walker is a great help.

      Don't forget the plugins ! Image formats, sql drivers etc... in the correct folders

      Once everything is sorted, I use a package builder like InnoSetup (others are available) to make an installer.

      Hope it helps

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

        Hi SGaist,

        I have not added a deploy step.... actually this is the first I have heard of this step!... I am totally missing this information!, where is the documentation for this stuff?, I think I am really just on step 1.

        You said you "take the libs for each module you use" but what does that mean? - just include them in the .pro file?

        Thanks

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

          In the Projects panel, under run settings you have the deployment step but I can't remember the exact location of the documentation for this feature.

          No, I mean that i go in the release build directory and copy in there each Qt lib for the modules I use:

          • QtSql.dll if i use database connection
          • QtNetwork.dll if i use networking
            etc...

          Once I have everything needed I make a build script for the installer using this information.

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

            ah ha, ok, that basically answers my question! - I was starting to drag and drop all of the .dll files into my .exe directory, but then I thought that there may have been an easier way to to this!

            Thanks for the Deployment Step, I found it... no Idea how to use it yet, but now I know where it is I can at least search for help on that too :)

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

              Watch out when drag and dropping on windows, you might be moving the libs around rather than copying them and then... Well nothing will run anymore...

              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
              • C Offline
                C Offline
                code_fodder
                wrote on last edited by
                #7

                lol...thanks for the tip :) - I am a Qt newb, not a windows newb :o
                But still... noted :)

                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