[Qt-interest] Deploying apps in MacOS

Mike Jackson imikejackson at gmail.com
Mon Jun 1 15:48:46 CEST 2009


On 2009-06-01 04:30:56 -0400, Alexandre Courbot <gnurou at gmail.com> said:

>> Yep, but note that macdeployqt takes care only of Qt frameworks.
>> frameworkdeployqt.pl script can fix dependencies for other frameworks that
>> depend on Qt. If you have other non-Qt-dependent dynamic libraries, you
>> would have to deal with them on your own (this includes adding their
>> dependencies to the bundle as well) - let otool and install_name_tool be
>> your friends :)
> 
> Maybe macdeployqt could/should be turned into a more generic tool that
> allows to embed selected frameworks in addition to Qt? That would make
> our lives much easier. It's hard to believe that such a tool does not
> exist yet, still macdeployqt is definitely a great step in the right
> direction.
> 
> Alex.

At the risk of being "shot" I'll make the following suggestion: Use 
CMake/CPack for your application. CMake does basically the same as 
qmake. (I'll leave the true differences for somewhere else) but CPack 
can generate all the Platform specific installers for you: NSIS On 
Windows, DMG or .pkg on OS X and rpms on Linux.
  As far as the Mac Specific answer to the original question, CMake has 
built in functionality to "fix up" the OS X application bundle which 
means CMake will invoke otool for _all_ the non-system dependent 
libraries. So for example one of my applications depends on hdf5, tiff, 
expat and Qt. CMake will copy all those libraries/frameworks into the 
proper location inside the Application bundle then run otool on _all_ 
the libraries to make sure it is a true stand alone app bundle. Then 
you can use CPack to create any number of installers for OS X, from zip 
files to DMG files.

 Just a suggestion.

Now, if macdeployqt were to be updated to include all that same 
functionality then it would become usable to a wider audience.

Mike Jackson
Principal Software Engineer
BlueQuartz Software
www.bluequartz.net




More information about the Qt-interest-old mailing list