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
Forum Updated to NodeBB v4.3 + New Features

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.5k Views 2 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.
  • hskoglundH Offline
    hskoglundH Offline
    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 Offline
      hskoglundH Offline
      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 Offline
            hskoglundH Offline
            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