Difference between revisions of "Packaging Qt apps for Mac OS X"

From MyLabWiki
Jump to: navigation, search
m
Line 5: Line 5:
  
 
This will bundle all the Qt libraries into the myprog.app - this will be approximately 40 MB. I guess one could still do the manual process for small applications that do not need all the Qt libraries. Or maybe the unnecessary libraries can be removed again manually?
 
This will bundle all the Qt libraries into the myprog.app - this will be approximately 40 MB. I guess one could still do the manual process for small applications that do not need all the Qt libraries. Or maybe the unnecessary libraries can be removed again manually?
 +
 +
''Note: http://doc.qt.nokia.com/4.7/mac-differences.html#bundle-based-libraries''
  
 
To create a .dmg we can either use the -dmg option to macdeployqt or use the Mac Disk Utility as describe [http://mac101.net/content/how-to/how-to-create-dmg-art-for-fancy-application-installations/ here] or [http://mac101.net/content/how-to/security-create-encrypted-dmg-disk-images-sensative-data/ here] (without the encryption part).
 
To create a .dmg we can either use the -dmg option to macdeployqt or use the Mac Disk Utility as describe [http://mac101.net/content/how-to/how-to-create-dmg-art-for-fancy-application-installations/ here] or [http://mac101.net/content/how-to/security-create-encrypted-dmg-disk-images-sensative-data/ here] (without the encryption part).
 +
  
 
== Application and package icon ==
 
== Application and package icon ==

Revision as of 13:34, 21 February 2011

Once you got tired of reading and trying to comprehend Deploying an Application on Mac OS X in the Qt documentation, you realize at the bottom of the page that all you have to do is:

  1. Build your application in release mode
  2. Execute "macdeployqt myprog.app" (see -h for options)

This will bundle all the Qt libraries into the myprog.app - this will be approximately 40 MB. I guess one could still do the manual process for small applications that do not need all the Qt libraries. Or maybe the unnecessary libraries can be removed again manually?

Note: http://doc.qt.nokia.com/4.7/mac-differences.html#bundle-based-libraries

To create a .dmg we can either use the -dmg option to macdeployqt or use the Mac Disk Utility as describe here or here (without the encryption part).


Application and package icon

How?

During runtime the dock icon can be changed by calling QWidget::setWindowIcon() on the main window[1].

Including addition data

How?

References

  1. Qt is Mac OS X Native

Bundle Programming Guide