Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. The windeployqt tool that comes with Qt 5.2
Forum Updated to NodeBB v4.3 + New Features

The windeployqt tool that comes with Qt 5.2

Scheduled Pinned Locked Moved General and Desktop
34 Posts 7 Posters 35.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.
  • L Offline
    L Offline
    Leon
    wrote on last edited by
    #20
    This post is deleted!
    1 Reply Last reply
    0
    • Chris KawaC Online
      Chris KawaC Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #21

      If you open qtenv2.bat in a text editor you will see that it just sets the PATH environment variable like I mentioned in one of previous posts. But this change is local to that batch environment so yeah, you need to run it from command prompt, some script or build system. And if you run two command prompts you would need to run it in both. It doesn't propagate (which is good!).

      You might not need all the stuff windeployqt copies over. It can't know what's gonna be loaded at runtime so it just plays it safe and copies everything. Just throw out what you don't use. Some can be skipped via command params, type "windeployqt" without params to see help.

      As for manual copying - it took me something like 20 minutes the first time too, then about 3 the second time and then I just wrote a .bat that does it for me and it takes me <1 second ever since. Such is coders life ;)

      Btw. Do you really use multimedia, webkit, widgets, qml, sensors, positioning and sql all in one app?

      1 Reply Last reply
      0
      • Chris KawaC Online
        Chris KawaC Online
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #22
        This post is deleted!
        1 Reply Last reply
        0
        • L Offline
          L Offline
          Leon
          wrote on last edited by
          #23

          I don't think i do :D, but i could not run the .exe file without all of these .dll files

          my .pro file is this:
          "http://pastebin.com/zGH5RNR5":http://pastebin.com/zGH5RNR5

          and i guess the important line is
          QT += network widgets webkitwidgets

          am i doing something wrong?

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Leon
            wrote on last edited by
            #24
            This post is deleted!
            1 Reply Last reply
            0
            • Chris KawaC Online
              Chris KawaC Online
              Chris Kawa
              Lifetime Qt Champion
              wrote on last edited by
              #25

              Nah, I'm just asking. I would expect at least Qml and Quick to be not needed since your app seems to be widget based.

              Btw. few things strike me in your .pro file:

              Qt has its own "macos for os detection":http://qt-project.org/doc/qt-5/qtglobal.html#Macrosx. You don't need those ON_WIN32 and ON_LINUX

              Why do you have this: QT += gui-private ? Seems suspicious ;)

              1 Reply Last reply
              0
              • Chris KawaC Online
                Chris KawaC Online
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by
                #26
                This post is deleted!
                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  alexandros
                  wrote on last edited by
                  #27

                  Soo... I am the creator of the .pro file posted above.

                  1. Qml and Quick are needed by webkitwidgets. We have a feature that loads web pages internally and takes snapshots of them. So the whole dependencies tree of webkit widgets is loaded. Is there a way to be more specific of what part of webkit widgets you're interested in so as to throw out the unneeded dependencies?

                  2. I know about those macros, but using my own has 2 benefits: (a) are shorter and cleaner, one can recognize them under non-Qt code and immediately understand what they're referring to. (b) I can be 101% sure that if gui-private is included then ON_WIN32 is used. With Q_OS_WIN32 I am only 99.9% :D

                  3. gui-private is used for zip extraction under Windows (that's why it is included only there)

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    alexandros
                    wrote on last edited by
                    #28
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • Chris KawaC Online
                      Chris KawaC Online
                      Chris Kawa
                      Lifetime Qt Champion
                      wrote on last edited by
                      #29

                      bq. Is there a way to be more specific of what part of webkit widgets you’re interested in so as to throw out the unneeded dependencies?

                      I don't think so, at least I don't know one :(

                      bq. are shorter and cleaner

                      How is ON_WIN32 shorter and cleaner than Q_OS_WIN? They are the same length and to be honest at first glance I wondered what O N stands for :P

                      bq. I can be 101% sure that if gui-private is included then ON_WIN32 is used. With Q_OS_WIN32 I am only 99.9%

                      Equivalent of your define is Q_OS_WIN, not Q_OS_WIN32. win32 is both Q_OS_WIN32 and Q_OS_WIN64.
                      I don't follow your logic. gui-private is included inside win32 brace, which is when Q_OS_WIN is defined. Where's the missing 0.1% of confidence?

                      1 Reply Last reply
                      0
                      • Chris KawaC Online
                        Chris KawaC Online
                        Chris Kawa
                        Lifetime Qt Champion
                        wrote on last edited by
                        #30
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          alexandros
                          wrote on last edited by
                          #31

                          Yeah I might be wrong on the macros, but I feel more confident knowing that ON_WIN32 is defined exactly when gui-private is included.

                          Anyway, this can (and will) change very easily. The sad part is all the extra dlls coming from the webkitwidgets :/

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            alexandros
                            wrote on last edited by
                            #32
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              alexandros
                              wrote on last edited by
                              #33

                              Yeah, well, not totally wrong on the macros part... https://bugreports.qt-project.org/browse/QTBUG-34593

                              It made me scratch my head multiple times why Q_OS_UNIX was working just fine but Q_OS_LINUX was failing....

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                alexandros
                                wrote on last edited by
                                #34
                                This post is deleted!
                                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