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

Macdeployqt and .dylib copy



  • Hello,

    I'm trying deployment of Qt app on Mac OS X.

    macdeployqt sounds to be a great tool to populate the .app bundle and a .dmg image. However, macdeployqt reports errors.

    Here is the output of macdeployqt

    @
    make: Entering directory `/Users/user/Sources/test-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release'
    macdeployqt test.app -dmg
    WARNING:
    WARNING: Could not find any external Qt frameworks to deploy in "test.app"
    WARNING: Perhaps macdeployqt was already used on "test.app" ?
    WARNING: If so, you will need to rebuild "test.app" before trying again.
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/accessible/libqtaccessiblewidgets.dylib"
    ERROR: to "test.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/bearer/libqcorewlanbearer.dylib"
    ERROR: to "test.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/bearer/libqgenericbearer.dylib"
    ERROR: to "test.app/Contents/PlugIns/bearer/libqgenericbearer.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqcncodecs.dylib"
    ERROR: to "test.app/Contents/PlugIns/codecs/libqcncodecs.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqjpcodecs.dylib"
    ERROR: to "test.app/Contents/PlugIns/codecs/libqjpcodecs.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqkrcodecs.dylib"
    ERROR: to "test.app/Contents/PlugIns/codecs/libqkrcodecs.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/codecs/libqtwcodecs.dylib"
    ERROR: to "test.app/Contents/PlugIns/codecs/libqtwcodecs.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/graphicssystems/libqtracegraphicssystem.dylib"
    ERROR: to "test.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqgif.dylib"
    ERROR: to "test.app/Contents/PlugIns/imageformats/libqgif.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqico.dylib"
    ERROR: to "test.app/Contents/PlugIns/imageformats/libqico.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqjpeg.dylib"
    ERROR: to "test.app/Contents/PlugIns/imageformats/libqjpeg.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqmng.dylib"
    ERROR: to "test.app/Contents/PlugIns/imageformats/libqmng.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqtga.dylib"
    ERROR: to "test.app/Contents/PlugIns/imageformats/libqtga.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/imageformats/libqtiff.dylib"
    ERROR: to "test.app/Contents/PlugIns/imageformats/libqtiff.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/qmltooling/libqmldbg_inspector.dylib"
    ERROR: to "test.app/Contents/PlugIns/qmltooling/libqmldbg_inspector.dylib"
    ERROR: file copy failed from "/Developer/Applications/Qt/plugins/qmltooling/libqmldbg_tcp.dylib"
    ERROR: to "test.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib"
    WARNING:
    WARNING: "test.app/Contents/Resources/qt.conf" already exists, will not overwrite.
    WARNING: To make sure the plugins are loaded from the correct location,
    WARNING: please make sure qt.conf contains the following lines:
    WARNING: [Paths]
    WARNING: Plugins = PlugIns
    @

    What's strange is that the .dylib are both present in the /Developer and in the test.app/ path and the app runs fine.

    Do you know what I'm doing wrong?

    Thanks


  • Moderators

    I think this is the key line:
    @
    WARNING: Perhaps macdeployqt was already used on "test.app" ?
    @



  • Thanks :-) I should have read much more carefully the messages.

    Indeed, when starting from a fresh .app, the message is not shown.

    There is a -verbose level adjuster, setting it to 0 make macqtdeploy to not show those messages, however I 'm fearing about missing other errors that could occur later.


  • Moderators

    Yeah, I would warn against setting it to 0. macdeployqt does not stop on errors, so it's very easy to miss it when something goes wrong.


Log in to reply