Qt World Summit: Submit your Presentation

Deployment - OS X default Qt libs

  • Hi guys,

    I'm in the process of packaging my apps for OS X.
    I'm wondering why the size of the package is 50MB but on Windows it's only 35MB

    I see a folder named "PlugIns" with a bunch of things i'm not sure I need. (printsupport, sqldrivers, audio, mediaservice). I don't need any print support or sqldrivers, and the audio is played with the open source library SFML. Is there a way not to bundle up theses lib when I run macdeployqt?

    Also another question, I need to package third party libraries with my software
    I would like them to be copied automatically with macdeployqt, is that possible? They are linked in my .pro file, but they don't get copied.
    @ #SFML
    INCLUDEPATH += /Users/tourlou2/Dropbox/SFML-2.1-osx-clang-universal/include
    LIBS += /Users/tourlou2/Dropbox/SFML-2.1-osx-clang-universal/lib/libsfml-audio.2.1.dylib
    LIBS += /Users/tourlou2/Dropbox/SFML-2.1-osx-clang-universal/lib/libsfml-system.2.1.dylib@

    Thanks in advance!

  • Lifetime Qt Champion


    Which version of Qt are you using ?

    You can use the -no-plugins option to avoid their deployment.

    Do you have any error message on the console about these libraries ?

  • Hey SGaist, latest version 5.3.1 on 10.9 OS X.

    No all the libraries are deployed correctly with macdeployqt, except those 2 libraries that I have to copy manually. Was wondering if there was a "trick" inside the .pro so that it deploys them also to save time for the deployment

    Error message is: can't find theses 2 libraries, if I put them in /Frameworks, program runs fine


  • Lifetime Qt Champion

    Can you past the path where macdeployqt searches for these libs and the current path where thy can be found?

  • Good question, I just run macdeployqt without verbose, I'll check it with verbose on next time.

    The libs are on the path posted up there (.pro file) and also in usr/local/lib
    For right now, I'm okay just copying the libs manually after running macdeployqt, will try to optimize deployment, later, thanks for your help!

  • Lifetime Qt Champion

    If you need to deploy them by hand, don't forget to also correct their path with install_name_tool.

    However macdeployqt should find them

  • It's looking for the missing libs in ../Frameworks so I just copy the 2 missing libs there by hands
    Just wondering why they aren't being copied there by macdeployqt like the others libs, qwt, etc.

  • Lifetime Qt Champion

    There was bug when looking for libraries that should have bin fixed. Wonder if you found something that needs some patches

  • I'll try with the newest version of Qt and see if it's better, thanks ;)

  • Lifetime Qt Champion

    The 5.4 beta would be a good starting point

Log in to reply