Packaging Qt apps for Mac OS X
- Build your application in release mode
- Execute "macdeployqt myprog.app"
- see -h for options
- good to use -verbose=2
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?
- Move myprog.app and all other files into a directory
- Start Disk Utility
- Select File → New → Disk Image from Folder
- Image Format: compressed
- Encryption: none
- Other choices may work as well.
Application and package icon
- Create an icon with size 512x512 pixels
- Format can be tiff, png, ...
- Best from SVG (try http://commons.wikimedia.org)
- Drag and drop it into Icon Composer
- Start with the largest one, then drag it to smaller ones.
- Save .icns file
- Note: Icon Composer can also create .ico file but these use different sizes
- Edit project.pro and add: ICON = path/to/icons.icns
- Ejoy the results:
Note: We can also copy and paste .icns files in/out of the bundle and edit the .plist file.
Including additional data