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?

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 described [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). In the most basic form:

+

# Move myprog.app and all other files into a directory

+

# Start Disk Utility

+

# Select File &rarr; New &rarr; Disk Image from Folder

+

#* Image Format: compressed

+

#* Encryption: none

+

#* Other choices may work as well.

== Application and package icon ==

== Application and package icon ==

−

# Create icons with size: 16x16, 32x32, 128x128, 256x256 and 512x512

+

'''Need update, but can still use Icon Composer 2x'''

+

+

# Create an icon with size 1024x1024 pixels

#* Format can be tiff, png, ...

#* Format can be tiff, png, ...

#* Best from SVG (try http://commons.wikimedia.org)

#* Best from SVG (try http://commons.wikimedia.org)

−

# Paste them into Icon Composer

+

# Drag and drop it into Icon Composer

+

#* Start with the largest one, then drag it to smaller ones.

# Save .icns file

# Save .icns file

#* Note: Icon Composer can also create .ico file but these use different sizes

#* Note: Icon Composer can also create .ico file but these use different sizes

Ok, this didn't work even though it is the same procedure as described here: http://doc.qt.nokia.com/4.7-snapshot/appicon.html &rarr; try again, and also look at http://www.qtforum.org/article/32922/application-icon.html

+

−

+

−

Strangely enough, I could paste .icns files from other applications onto qthid so maybe it was my .icns file? Try the procedure with other icns files.

+

+

Note: We can also copy and paste .icns files in/out of the bundle and edit the .plist file.

During runtime the dock icon can be changed by calling [http://doc.qt.nokia.com/4.7/qwidget.html#windowIcon-prop QWidget::setWindowIcon()] on the main window<ref>[http://doc.qt.nokia.com/4.7/qtmac-as-native.html Qt is Mac OS X Native]</ref>.

During runtime the dock icon can be changed by calling [http://doc.qt.nokia.com/4.7/qwidget.html#windowIcon-prop QWidget::setWindowIcon()] on the main window<ref>[http://doc.qt.nokia.com/4.7/qtmac-as-native.html Qt is Mac OS X Native]</ref>.

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?