[Qt-interest] macdeployqt

Boudewijn Rempt boud at valdyas.org
Thu Mar 5 15:13:15 CET 2009


On Thu, 5 Mar 2009, Nathan Carter wrote:

> 
> Dear list,
> 
> I recently installed the Qt 4.5 SDK on Mac OS X Leopard, and noticed  
> in the changelog a comment about a tool called macdeployqt.  After  
> some time spent with Google, I find at the bottom of this page
> 	http://doc.trolltech.com/4.5/deployment-mac.html
> that it's not called macdeployqt after all, but rather just  
> macdeploy.  (There's also plenty of instances of the phrase deployqt  
> out there as well, adding to my confusion.)  Here are my specific  
> questions:
> 
> 1. What does this tool actually do?  If it automates the process of  
> building a Mac app (as the link above says), then why does that same  
> page still give tons of instructions about otool and install_name_tool  
> and so on?  Are those instructions for users for whom macdeploy is not  
> appropriate, or does macdeploy only automate part of the process?
> 
> 2. Where can I find more thorough documentation on macdeploy, such as  
> how to use it and what part of the process it automates?
> 
> 3. Most importantly:  Where the heck is it?  I can't find it in / 
> Developer/Tools/Qt, /usr/bin, /usr/local/bin, or /usr/local/Qt4.5.

It's in tools/macdeployqt; in 4.5.0 it got built automatically for me,
though it didn't before. It goes through your bundle and assembles the
frameworks needed to complete the bundle and runs otool on them.

However, if your app has a lot of plugins, macdeployqt doesn't help much, 
since it only runs for the main executable and not for the plugin libs
(which need the same treatment).

There is a further complication in that with 4.5.0 final, something
seems to have changed, so system libraries that are copied into 
your bundle don't get their permissions changed, which means otool 
cannot work on them.

And it tries to make a dmg for you, at least, some time ago it did.

But it's a nice, simple timesaver nonetheless, and easy to to hack into
something that also runs on plugins, changes the permissions and doesn't
try to make that dmg -- I've got my own fork of it for local use :-)

Boudewijn




More information about the Qt-interest-old mailing list