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. windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory

windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 9 Posters 10.3k 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.
  • AmrCoderA Offline
    AmrCoderA Offline
    AmrCoder
    wrote on last edited by
    #1

    Hello

    I download the last new version of the QT which is 5.14, I make a release for a test app, and when i tried to use windeployqt.exe to copy the dll files to the exe folder like what i did in almost all versions of QT and it worked, but in the new version it not copy the dlls here is what i used

    C:\Qt\Qt5.14.0\5.14.0\mingw73_32\bin\windeployqt.exe app.exe
    

    it gives me this without copy the dlls to the folder

    D:\FreeLancer\AmazonKinese\build-test-Desktop_Qt_5_14_0_MinGW_32_bit-Release\test\app.exe 32 bit, release executable
    Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
    All dependencies   : Qt5Core Qt5Gui Qt5Widgets
    To be deployed     : Qt5Core Qt5Gui Qt5Widgets
    Unable to find the platform plugin.
    

    so it's very strange problem, is there any new additional parameters i need to add for the new version of QT to make it work?

    1 Reply Last reply
    0
    • hskoglundH Online
      hskoglundH Online
      hskoglund
      wrote on last edited by
      #2

      Hi, I just installed 5.14 today and have the same problem for the MinGW version (but windeployqt still works ok for the MSVC2017 version of 5.14).

      There a 2 differences between this version 5.14 of MinGW and previous versions of Qt like 5.13.2: there are only version of MinGW .dlls like Qt5Core.dll (the MSVC2017 version of 5.14 still has 2: Qt5Core.dll and Qt5Cored.dll)

      When you build your .exe file with MinGW 5.14 there is Build... directory created (same as before), but not the subdirectories Release or Debug (the MSVC2017 version of 5.14 still creates those subdirectories).

      Since you can run the .exe file in Qt Creator obviously the platform plugin is there, even in 5.14 :-) so this could be a bug in windeployqt, perhaps because of the changes I mentioned above.

      I think I will download Qt sources for 5.14 and check the code for windeployqt, I'll post again.

      1 Reply Last reply
      4
      • hskoglundH Online
        hskoglundH Online
        hskoglund
        wrote on last edited by
        #3

        It was more or less connected :-) the platform plugin dll is usually qwindows.dll and it has changed between 5.13.2 and 5.14, it's not a change in C++ code but in the flags for the .dll, if you run MSVC's dumpbin.exe/header on the MinGW 5.13.2 qwindows.dll you get:

        Executable
        Line numbers stripped
        Symbols stripped
        32 bit word machine
        Debug information stripped
        DLL
        

        and if you run the dumpbin/header on the MinGW 5.14.0 qwindows.dll you get:

        Executable
        Line numbers stripped
        32 bit word machine
        DLL
        

        the difference is not much, only those ...STRIPPED... flags, but it's enough to confuse windeployt, the relevant code is in qt-everywhere-src-5.14.0/qttools/src/shared/winutils/utils.cpp line 828 and line 829:

        ...
        // Use logic that's used e.g. in objdump / pfd library
        *isDebugIn = !(nth->FileHeader.Characteristics & IMAGE_FILE_DEBUG_STRIPPED);
        ...
        

        because this is never true in MinGW 5.14.0 the ! will cause *isDebugIn to be always true, i.e. windeployqt thinks that qwindows.dll is debug flavored and not a good match for your release flavored .exe :-(

        But then windeployin debug flavored builds should still work in MinGW 5.14.0, right? Nice try, but sorry. It will instead complain about the lack of the *d.dll suffixed .dlls, .e.g. it does not find Qt5Cored.dll.

        I'll file a bug report once I had some coffee.

        1 Reply Last reply
        5
        • hskoglundH Online
          hskoglundH Online
          hskoglund
          wrote on last edited by hskoglund
          #4

          ok, https://bugreports.qt.io/browse/QTBUG-80806 submitted
          I only had to report about the release build problem. the debug build problems that there are no .dll's with a d.dll suffix was already reported 2 days ago:
          https://bugreports.qt.io/browse/QTBUG-80763

          If you promise you will only use windeployqt for Release builds I can give you a patched windeployqt.exe...

          Edit: I patched that line 829, to

          *isDebugIn = false;
          

          and rebuilt windeployqt to a new .exe, called it windeployqtreleaseonly
          Drop it into C:\Qt\5.14.0\mingw73_32\bin and you're good to go.

          C 1 Reply Last reply
          10
          • AmrCoderA Offline
            AmrCoderA Offline
            AmrCoder
            wrote on last edited by
            #5

            @hskoglund Thank you very much for the greate effort

            1 Reply Last reply
            2
            • hskoglundH hskoglund

              ok, https://bugreports.qt.io/browse/QTBUG-80806 submitted
              I only had to report about the release build problem. the debug build problems that there are no .dll's with a d.dll suffix was already reported 2 days ago:
              https://bugreports.qt.io/browse/QTBUG-80763

              If you promise you will only use windeployqt for Release builds I can give you a patched windeployqt.exe...

              Edit: I patched that line 829, to

              *isDebugIn = false;
              

              and rebuilt windeployqt to a new .exe, called it windeployqtreleaseonly
              Drop it into C:\Qt\5.14.0\mingw73_32\bin and you're good to go.

              C Offline
              C Offline
              catshy
              wrote on last edited by
              #6

              @hskoglund said in windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory:

              ok, https://bugreports.qt.io/browse/QTBUG-80806 submitted
              I only had to report about the release build problem. the debug build problems that there are no .dll's with a d.dll suffix was already reported 2 days ago:
              https://bugreports.qt.io/browse/QTBUG-80763

              If you promise you will only use windeployqt for Release builds I can give you a patched windeployqt.exe...

              Edit: I patched that line 829, to

              *isDebugIn = false;
              

              and rebuilt windeployqt to a new .exe, called it windeployqtreleaseonly
              Drop it into C:\Qt\5.14.0\mingw73_32\bin and you're good to go.

              @hskoglund 64bit version , pls. Thanks for your contribution.

              hskoglundH 1 Reply Last reply
              1
              • C catshy

                @hskoglund said in windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory:

                ok, https://bugreports.qt.io/browse/QTBUG-80806 submitted
                I only had to report about the release build problem. the debug build problems that there are no .dll's with a d.dll suffix was already reported 2 days ago:
                https://bugreports.qt.io/browse/QTBUG-80763

                If you promise you will only use windeployqt for Release builds I can give you a patched windeployqt.exe...

                Edit: I patched that line 829, to

                *isDebugIn = false;
                

                and rebuilt windeployqt to a new .exe, called it windeployqtreleaseonly
                Drop it into C:\Qt\5.14.0\mingw73_32\bin and you're good to go.

                @hskoglund 64bit version , pls. Thanks for your contribution.

                hskoglundH Online
                hskoglundH Online
                hskoglund
                wrote on last edited by
                #7

                @catshy Here you go: windeployqt64releaseonly

                Same here, drop the .exe in your C:\Qt\5.14.0\mingw73_64\bin and hopefully this will be a good start for your 2020 :-)

                C B 2 Replies Last reply
                7
                • hskoglundH hskoglund

                  @catshy Here you go: windeployqt64releaseonly

                  Same here, drop the .exe in your C:\Qt\5.14.0\mingw73_64\bin and hopefully this will be a good start for your 2020 :-)

                  C Offline
                  C Offline
                  catshy
                  wrote on last edited by
                  #8

                  @hskoglund Well Done. This solved my problem very well and best wishes for 2020 :+)

                  1 Reply Last reply
                  3
                  • hskoglundH hskoglund

                    @catshy Here you go: windeployqt64releaseonly

                    Same here, drop the .exe in your C:\Qt\5.14.0\mingw73_64\bin and hopefully this will be a good start for your 2020 :-)

                    B Offline
                    B Offline
                    bogdan_bdg
                    wrote on last edited by
                    #9

                    @hskoglund Seems that nobody at Qt gives a... nything about this bug? It's a year later and 5.15.2 apparently still suffers from the very same issue. Thank you for the patched windeployqt version!

                    kkoehneK S 2 Replies Last reply
                    1
                    • Krupakar ShettyK Offline
                      Krupakar ShettyK Offline
                      Krupakar Shetty
                      wrote on last edited by
                      #10

                      @hskoglund @hskoglund i am also facing same problem...can you please give me a soluntion detail way?
                      :)
                      thanks in Advance

                      1 Reply Last reply
                      0
                      • B bogdan_bdg

                        @hskoglund Seems that nobody at Qt gives a... nything about this bug? It's a year later and 5.15.2 apparently still suffers from the very same issue. Thank you for the patched windeployqt version!

                        kkoehneK Offline
                        kkoehneK Offline
                        kkoehne
                        Moderators
                        wrote on last edited by
                        #11
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • patrikdP Offline
                          patrikdP Offline
                          patrikd
                          wrote on last edited by
                          #12

                          @hskoglund: thx man, you saved my day :)

                          1 Reply Last reply
                          0
                          • B bogdan_bdg

                            @hskoglund Seems that nobody at Qt gives a... nything about this bug? It's a year later and 5.15.2 apparently still suffers from the very same issue. Thank you for the patched windeployqt version!

                            S Offline
                            S Offline
                            smacdonald-2gr
                            wrote on last edited by smacdonald-2gr
                            #13

                            @bogdan_bdg said in windeployqt.exe comes with QT 5.14 Not copy the dlls to the app directory:

                            @hskoglund Seems that nobody at Qt gives a... nything about this bug? It's a year later and 5.15.2 apparently still suffers from the very same issue. Thank you for the patched windeployqt version!

                            Worse, the conan package for Qt 5.15.2 has the same problem and the patched binary can't just be dropped in.

                            Edit: Actually it is fixed. The --debug flag specifies installing the debug versions, not, as was posted elsewhere on the internet, turning on debug output for windeployqt.

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              AlexH3
                              wrote on last edited by
                              #14

                              @hskoglund Oh yeah, thank you very much for your patched versions. Sadly, those are still required in Qt 5.15.2 (working also with C:\Qt\5.15.2\mingw81...... )

                              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