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 not copying all required DLLs but also adds unnecessary files
Forum Updated to NodeBB v4.3 + New Features

windeployqt.exe not copying all required DLLs but also adds unnecessary files

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 3.3k 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.
  • R Offline
    R Offline
    Red Baron
    wrote on last edited by
    #1

    I'm currently testing my application in a Windows 7 virtual machine (32bit) while the system the application was built on (the host) is a 64bit Windows 10 with Qt 5.7 32bit version. The reason - ship the application to a colleague of mine who lives in another city and doesn't know a thing about Qt or any of that software stuff.

    After getting strange errors and trying to work my way through the results dependencies walker delivered I found that Qt actually provides a tool to create a ready-to-deploy version of a given Qt application.

    I gave it a go:

    C:\Users\USER> C:\Qt\5.7\mingw53_32\bin\windeployqt.exe  .\Documents\Projects\Project1\Prototypes\RawDataVisualizer\build\RDV.exe
    

    It did its magic, copied a bunch of stuff and that was it. Or so I thought:

    • my application requires Qt5OpenGL.dll as well as Qt5PrintSupport.dll however these two DLLs were not copied with the rest as dependencies
    • my application requires Qt5Svg.dll yet imageformats->qsvg.dll seems not to be required to run it (I'm not familiar with this deployment stuff since I have always executed my Qt applications on platforms where Qt SDK was installed hence I have no idea what this library is for...)
    • inside imageformats there are actually a lot of libraries including qtiff.dll, qjpeg.dll etc. none of which are something that I need (in the QRC file in my project I have 2 SVG files and a bunch of PNGs)

    There are a couple of other small things but I hope you get the picture.

    Now the documentation states:

    Qt libraries can be added by passing their name (-xml) or removed by passing
    the name prepended by --no- (--no-xml). Available libraries: bluetooth clucene concurrent ...

    This solves the first issue I'm having that is the missing print support and OpenGL are my fault. However the amount of extras that are copied without me saying so is quite the amount.

    Is this some built-in behaviour of the tool or am I missing something when looking at the quite small list of options available for the command prompt?

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

      Hi,

      It's surprising that Qt5OpenGL is not deployed however it's pretty normal that all the image format plugins are. After all, impossible for any tool to know what image format you will be specifically using.

      qtiff, qjpeg and qsvg are plugin so if not present, it won't make the application crash, that will just reduce the number of image format you'll be able to handle.

      What modules are you exactly using in your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        It's surprising that Qt5OpenGL is not deployed however it's pretty normal that all the image format plugins are. After all, impossible for any tool to know what image format you will be specifically using.

        qtiff, qjpeg and qsvg are plugin so if not present, it won't make the application crash, that will just reduce the number of image format you'll be able to handle.

        What modules are you exactly using in your application ?

        R Offline
        R Offline
        Red Baron
        wrote on last edited by Red Baron
        #3

        Hi and thanks for your reply! I'm using Qwt (which has a bunch of dependencies on its own), core, gui and widget. The Qt5PrintSupport is probably added internally due to me using a QPlainTextEdit with rich text (HTML formatted) inside. As for the images - my application has no feature that involves loading some sort of an image outside the ones that are included in the QRC (PNG files). The Qt5Svg dependency is probably due to Qwt.

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

          I think most of the surprising dependencies comes for Qwt. Other than that, you can also check with a too like Dependency Walker what your application is currently linked against.

          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

          • Login

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