Qt Installer Framework - install libraries that depends on Qt on Mac OS X

  • Dear all,
    I already did an installer of my libraries using Qt Installer Framework on windows. In my case, my libraries needs the Qt libraries.
    On windows, I resolved this by just saying to my users to install Qt, and that's it because the location of the DLL are resolved by the fact that the Qt DLL are in the bin directory on the PATH environment variable.

    Instead, on Mac OS X, the path where the libraries are is not resolved using the PATH variable, but it is resolved looking into the .dylib where for each dependencies it is indicated also the path where it resides.
    But in that case, the .dylib installed has the path of Qt where I installed on my machine, and not path where the user will install the Qt libraries.
    So, the solution to say to the users first install Qt and then install my libraries it doesn't seems to works.
    How can I resolve on Mac ?


  • Lifetime Qt Champion


    You don't make your user install additional libraries on OS X, you bundle them with your application. macdeployqt is used for that.

    On a side note, making user install Qt libraries on Windows and modifying the PATH variable is a bad idea. You should also provide the dlls along your application. Installing Qt and changing the PATH variable to point to it could wreak havoc on their system since you don't know which application they use could also be using Qt. A Qt version that might have been modified and now their application will work with another set of libraries than the one the where build against.

  • Hi SGaist,
    but we are not developing an application, but a set of libraries for development.
    So, the OS X bundle is not our case (Qt is not installed as bundle).
    And we cannot use macdeployqt because it's intended only for app bundles.

    Also, in our case it's not a good idea to ship also Qt libraries, because our users are developers that may do others things and they typically have Qt for doing something else and shipping Qt with our package will means to have more that one Qt installed on the system. It's not something that people wants.

  • Lifetime Qt Champion

    My bad, I misunderstood your use case.

    On OS X, what you generally do when providing libraries is to provide frameworks which are also bundles like applications. Qt by default installs bundles.

    If you take the example of Qt's installation one step is to correct the paths from the library in each bundle to make it match where it's installed so you don't need too much fiddling with e.g. DYLD_LIBRARY_PATH

Log in to reply

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