Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Packaging for deployment on windows... Is QML missing from my binary?



  • I've been using Visual Studio 2015 on my Windows box (and QtCreator on OSX and various tools on Linux) and am quite happy with the results; however, I'm now trying to package the Windows version with our installer software and running into some weirdness.

    I've chased down all the Qt DLL dependencies (some of which just fail silently - such as SVG support - if you forget them); however, when my QML quick interface based application starts up I just get a blank white view as if none of my QML existed.

    I was under the impression that the build process included your application's QML (and its dependencies) into your binary, and that as long as you used the pathing from your QRC file - it would resolve at runtime, is this not the case?

    How do you package/configure Qml in order to deploy it? (This is a regular thick client application.)

    I don't think running the qt deploy tool will work for me because I'm not using the PRO file on Windows (because it's a Visual Studio solution.)

    Suggestions?


  • Moderators

    Hi @VRHans,

    I've chased down all the Qt DLL dependencies (some of which just fail silently - such as SVG support - if you forget them)

    The silently-failing ones are plugins.

    The benefit of plugins is that you can create new plugins to support new formats without changing your core code. For this design to work, the core code needs to be agnostic towards the supported formats -- therefore it cannot know in advance which plugin DLLs it needs.

    I was under the impression that the build process included your application's QML (and its dependencies) into your binary, and that as long as you used the pathing from your QRC file - it would resolve at runtime, is this not the case?

    Yes, the QRC system helps ensure that paths are resolved nicely.

    However, I suspect that your issue isn't in your code or files. Rather, you need to deploy Qt's own QML-related files too. See the diagram at http://wiki.qt.io/Deploy_an_Application_on_Windows



  • I will give that a try in the morning, thanks.

    It seems strange that when the build includes my Qml into my binary it doesn't pull in the other Qml code since it can't operate without it, no?

    I can't think of a reason why you wouldn't want this to happen.



  • BTW, the silently failing ones weren't plugins, they were Qt5Widgets.dll (Image containing an SVG disappears) and Qt5Svg.dll (same result.) Either one of those missing and application runs fine just doesn't show SVG images.



  • Ultimately I just started using the deployment tool on Windows as it runs against the executable itself. It seems to include a lot of unnecessary things - but I can pare that down later.

    @JKSH - I'll mark yours as the thumbs up, and I'll mark this solved even though I used a different method - thanks!


  • Moderators

    Glad to hear you've found a solution :)

    @VRHans said:

    BTW, the silently failing ones weren't plugins, they were Qt5Widgets.dll (Image containing an SVG disappears) and Qt5Svg.dll (same result.) Either one of those missing and application runs fine just doesn't show SVG images.

    That's very interesting. May I ask which QML type(s) did you use to show the SVG images?

    If you deployed imageformats/qsvg.dll or even iconengines/qsvgicon.dll, does it still require Qt5Widgets.dll and Qt5Svg.dll?


Log in to reply