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. How do I unify all dlls to the main application when doing windeployqt?

How do I unify all dlls to the main application when doing windeployqt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
17 Posts 6 Posters 789 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.
  • B Offline
    B Offline
    Blackzero
    wrote on 22 Jun 2024, 08:20 last edited by
    #1

    How to unify all qt dlls and other dlls in one application without being split when doing windeployqt is it possible?

    1 Reply Last reply
    0
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 22 Jun 2024, 08:51 last edited by
      #2

      Dlls are not split or modified in any way by windeployqt

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      B 1 Reply Last reply 22 Jun 2024, 09:10
      0
      • C Christian Ehrlicher
        22 Jun 2024, 08:51

        Dlls are not split or modified in any way by windeployqt

        B Offline
        B Offline
        Blackzero
        wrote on 22 Jun 2024, 09:10 last edited by
        #3

        @Christian-Ehrlicher I mean to unify all these etc. into one
        Screenshot 2024-06-22 161001.png

        1 Reply Last reply
        0
        • C Online
          C Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 22 Jun 2024, 09:19 last edited by
          #4

          That's not possible. You might create a static version of some dlls but that's not easy and I don't recommend it.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          B 1 Reply Last reply 22 Jun 2024, 10:37
          1
          • C Christian Ehrlicher
            22 Jun 2024, 09:19

            That's not possible. You might create a static version of some dlls but that's not easy and I don't recommend it.

            B Offline
            B Offline
            Blackzero
            wrote on 22 Jun 2024, 10:37 last edited by
            #5

            @Christian-Ehrlicher I see this guy modified the kits for MSVC2019 static whether it has any disadvantages or advantages.
            https://www.youtube.com/watch?v=KCH92zvrHas&t=839s

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goldenhawking
              wrote on 22 Jun 2024, 12:02 last edited by
              #6

              For msys2 Qt, we can write a script with ldd.exe,

              1. run windeployqt.
              2. enum all exe, dll in deploy folder, for each file run "ldd filename"
              3. split ldd outputs, copy files with prefix "/mingw64/" to deploy folder.

              This approach not only enum main Qt dlls, but also include plugin files. For eg, QSql plugins such as qpsql need libpq.dll, and libpq.dll need ssl libiraries at RUNTIME. If some of these dlls is missing, a "Driver not loaded" error will occure and connection will be a failure.

              Qt is the best C++ framework I've ever met.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Volker75
                wrote on 22 Jun 2024, 12:57 last edited by Volker75
                #7

                Hi,
                just 3 things about the dll files under Windows:

                a) It's - in my opinion - a bit odd that some dlls are in subfolders while other dlls are in the main folder. For "normal" users it is not perfect to see so many files in the main folder. It might be better to have all dll files in a (different) subfolder(s). (Or is there a speed problem if they are in a subfolder?)

                b) I installed the new Qt 6.7.2 and now it looks like windeploy doesn't work anymore. I always get an error: :DOS header check failed.
                Sadly this error is now also present if i compile with older Qt version.
                How can i fix that problem?

                c) It looks like windeploy add too many dll files. For example it added qml dll files, even i don't use qml. (I can't remeber, I think that started with Qt 6.6)

                Have a nice weekend

                P 1 Reply Last reply 22 Jun 2024, 15:07
                0
                • V Volker75
                  22 Jun 2024, 12:57

                  Hi,
                  just 3 things about the dll files under Windows:

                  a) It's - in my opinion - a bit odd that some dlls are in subfolders while other dlls are in the main folder. For "normal" users it is not perfect to see so many files in the main folder. It might be better to have all dll files in a (different) subfolder(s). (Or is there a speed problem if they are in a subfolder?)

                  b) I installed the new Qt 6.7.2 and now it looks like windeploy doesn't work anymore. I always get an error: :DOS header check failed.
                  Sadly this error is now also present if i compile with older Qt version.
                  How can i fix that problem?

                  c) It looks like windeploy add too many dll files. For example it added qml dll files, even i don't use qml. (I can't remeber, I think that started with Qt 6.6)

                  Have a nice weekend

                  P Offline
                  P Offline
                  Pl45m4
                  wrote on 22 Jun 2024, 15:07 last edited by
                  #8

                  @Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:

                  For "normal" users it is not perfect to see so many files in the main folder.

                  Just look at the programs in your C:\Program Files folder...

                  This is for example my Antivirus

                  DLL_structure.png

                  Lot of DLLs in the program folder... visible for any "user".
                  It's common to have it like this.


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    Volker75
                    wrote on 22 Jun 2024, 16:21 last edited by
                    #9

                    I didn't said that a lot of guys do it like that. I said it is better for a normal user to have less.
                    You can also make a picture from an untidy room and then tell it is normal, since many people have untidy rooms. For a new guy, that enter the directory/room the first time, it is nice to see a tidy room/directory.

                    P 1 Reply Last reply 22 Jun 2024, 16:59
                    0
                    • V Volker75
                      22 Jun 2024, 16:21

                      I didn't said that a lot of guys do it like that. I said it is better for a normal user to have less.
                      You can also make a picture from an untidy room and then tell it is normal, since many people have untidy rooms. For a new guy, that enter the directory/room the first time, it is nice to see a tidy room/directory.

                      P Offline
                      P Offline
                      Pl45m4
                      wrote on 22 Jun 2024, 16:59 last edited by Pl45m4
                      #10

                      @Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:

                      For a new guy, that enter the directory/room the first time, it is nice to see a tidy room/directory.

                      If you don't have any computer / IT knowledge and you are just a "user" who can open a browser or start a program by clicking the shortcut icon, you shouldn't fumble around in any system or program directory... so you should not care if it's "clean" or if there are some files. These structures are not intended to be modified anyway. The programmer/publisher of this software decided to do it this way and it works.
                      Software is not designed for PEBKACs specifically ;-)
                      But yeah, if you think this way you need to provide some Kiosk OS mode where everything is hidden from the user so one can't do any harm to the system :P
                      (good old Win XP "security" for Sys32... "Files are hidden. Show them anyway?" - "Yes". - "Ok go ahead. GL")


                      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                      ~E. W. Dijkstra

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        Volker75
                        wrote on 22 Jun 2024, 17:33 last edited by
                        #11

                        Well, for new users there is no shortcut.
                        And just because many other guys have untidy directories it doesn't mean that a professional software isn't allowed to be tidy. It will look much more professional.
                        It is like if you sell items on Ebay. If you clean them, you will get sometimes much more money. Just because you removed the dust in a few seconds can make a few 100€ price difference.

                        P 1 Reply Last reply 22 Jun 2024, 17:44
                        0
                        • V Volker75
                          22 Jun 2024, 17:33

                          Well, for new users there is no shortcut.
                          And just because many other guys have untidy directories it doesn't mean that a professional software isn't allowed to be tidy. It will look much more professional.
                          It is like if you sell items on Ebay. If you clean them, you will get sometimes much more money. Just because you removed the dust in a few seconds can make a few 100€ price difference.

                          P Offline
                          P Offline
                          Pl45m4
                          wrote on 22 Jun 2024, 17:44 last edited by
                          #12

                          @Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:

                          it doesn't mean that a professional software isn't allowed to be tidy. It will look much more professional.

                          I bet in 99% of all the "professional" software are files or DLLs in the root program directory.


                          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                          ~E. W. Dijkstra

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            Volker75
                            wrote on 22 Jun 2024, 17:52 last edited by Volker75
                            #13

                            100% of all professional cars didn't have air bags in the old days. One company started with it. Now nearly all have it.

                            1 Reply Last reply
                            0
                            • V Offline
                              V Offline
                              Volker75
                              wrote on 22 Jun 2024, 18:00 last edited by
                              #14

                              Or in other words:
                              If i use linuxdeploy, then i can make an appimage and there is only a single file that a user must click.
                              If i use macdeploy, then i can make an image and there is only a single file that a user must click.
                              If i use windeploy, then the user must open a directory and must be clever enough to select the executable.
                              Do you see the problem now?
                              Linux and MacOS can do it, but not windows.
                              So 3 variants:
                              a) just tidy up the directory (i guess this is the easiest)
                              b) make an app image like with macdeploy or linuxdeploy. But i don't know how to do it with windeploy. How to do it?
                              c) code an installer. Well, only coding an installer for windows only? A bit stupid, since i know it is so easy possible without an installer under linux and mac os.

                              C 1 Reply Last reply 22 Jun 2024, 18:20
                              0
                              • V Volker75
                                22 Jun 2024, 18:00

                                Or in other words:
                                If i use linuxdeploy, then i can make an appimage and there is only a single file that a user must click.
                                If i use macdeploy, then i can make an image and there is only a single file that a user must click.
                                If i use windeploy, then the user must open a directory and must be clever enough to select the executable.
                                Do you see the problem now?
                                Linux and MacOS can do it, but not windows.
                                So 3 variants:
                                a) just tidy up the directory (i guess this is the easiest)
                                b) make an app image like with macdeploy or linuxdeploy. But i don't know how to do it with windeploy. How to do it?
                                c) code an installer. Well, only coding an installer for windows only? A bit stupid, since i know it is so easy possible without an installer under linux and mac os.

                                C Online
                                C Online
                                Christian Ehrlicher
                                Lifetime Qt Champion
                                wrote on 22 Jun 2024, 18:20 last edited by
                                #15

                                @Volker75 said in How do I unify all dlls to the main application when doing windeployqt?:

                                If i use windeploy, then the user must open a directory and must be clever enough to select the executable.
                                Do you see the problem now?

                                Provide a proper installer and the user don't have to use the explorer to find the executable - that's the way to go on windows.

                                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                Visit the Qt Academy at https://academy.qt.io/catalog

                                1 Reply Last reply
                                2
                                • V Offline
                                  V Offline
                                  Volker75
                                  wrote on 22 Jun 2024, 18:28 last edited by Volker75
                                  #16

                                  Yes... Maybe later. I am spare time coder only. So far I made a YouTube Video for guys that don't know how to run it. So far over 16.000 views. So it look like Windows users need an installer. But see my note c)
                                  Anyway. This problem is minor. Currently windeploy doesn't run at all anymore (because of the ":DOS header check failed." that was introduced with Qt 6.7.2) I am currently forced to copy and paste the dlls manually.

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SimonSchroeder
                                    wrote on 24 Jun 2024, 07:32 last edited by
                                    #17

                                    You don't really have to "code" an installer. Qt itself provides the Qt Installer Framework (had some trouble with getting root access on Linux). If your project already uses CMake it is easy to integrate some off-the-shelf installers. For legacy reasons we are using NSIS (without CMake, but I think CMake does support this).

                                    (We also decided to compile Qt statically and link to the static VS runtime which in our case allows to deploy a single executable. I am not sure how that translates with OpenGL and D3D in your case (i.e. if there are static versions of these as well). Linking to Qt statically under the LGPL has some additional requirements which can be a bit annoying. However, for commercial software it is at the same time very unlikely that someone wants to switch out the Qt libraries.)

                                    1 Reply Last reply
                                    1

                                    1/17

                                    22 Jun 2024, 08:20

                                    • Login

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