5.8 and macdeployqt

  • My .pro file contains the following configuration adds

    equals(QT_MAJOR_VERSION, 5) {
    QT += core gui
    QT += widgets
    QT += webkitwidgets
    QT += printsupport
    QT += xml
    QT += network

    At the end of a build/compile, this displays..
    -framework QtWebKitWidgets
    -framework QtPrintSupport
    -framework QtWidgets
    -framework QtGui
    -framework QtCore
    -framework DiskArbitration
    -framework IOKit
    -framework QtWebKit
    -framework QtNetwork
    -framework QtXml
    -framework OpenGL
    -framework AGL
    08:51:56: The process "/usr/bin/make" exited normally.

    I assume that the only "frameworks" that need to be included in the app bundle are those listed in the build output.

    Yet, when I run macdeployqt to make the bundle, this is what it includes..

    ..as you would expect..

    ..but these are included anyway. .even though hey are not used in the project.

    It's like macdeployqt thinks the desktop app is to be deployed to an iOS device. A desktop app does not need QtPositioning or QtSensors. And the app definitely does not use QtSQL. AFAIK it does not use QtMultiMedia.

    If I try to delete the extra Qt frameworks, the app crashes on startup.

  • Lifetime Qt Champion


    That's because you don't take into account indirect dependencies. In this case, they all come from QtWebKit.

  • @SGaist

    Thanks. I would not have expected that.

    Is there a Qt tool like the Windows Depends tool or just use Depends for Windows DLL dependancies?

    I'll be needing to package a Windows build, too..that uses the same code base as that of the Mac version.

    Or should I just assume the same named .DLL libraries are used?

  • Moderators

    @PSI_lbc Not sure whether I understood your question correctly.
    Take a look at this: http://doc.qt.io/qt-5/windows-deployment.html

  • @jsulm

    Yep. Skimmed those docs. Missed the part about windeployqt.

    I ended up using the Depends tool. Not surprisingly, it came up with a list that matched what I expected..but not what the program actually needed to run..it did not find the indirect dependancies.

    Everything listed by macdeployqt was also required for the Windows version of the program..along with a number of Windows specific support DLLs. I'll give the windeployqt utility a try at another time, but I suspect it will do a better job than Depends.

    Thx for everyone's help.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.