[Interest] error setting app icon on OS X

Till Oliver Knoll till.oliver.knoll at gmail.com
Mon Jul 7 10:46:57 CEST 2014


Am 07.07.2014 um 09:59 schrieb Till Oliver Knoll <till.oliver.knoll at gmail.com>:

> ... 
> 
>> and I had added to mi .pro this line:
>> 
>> ICON = adviser.icns
> 
> This however looks fine and should set the /desktop/ icon

Related to the *.icns topic on OS X (but somewhat unrelated to Qt): You might also want to read the Apple docs about generating high-resolution icons:

 https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW3

Specifically you would 

* name your icon resources (PNG with sRGB colour profile recommended) according to the "@2x" naming convention
* place them into a <folder_name>.iconset folder (note the .iconset extension)
* use the "iconutil" command-line tool to generate an *.icns file from that "iconset folder"
* DON'T use the Icon Composer application anymore (it does not support high-resolution icons)

You can probably automate all the above steps with "custom build steps" with qmake. You probably need to have a "dummy *.icns" file checked in in your source control, such that when you run qmake it does recognize the proper path (and the existence) of the referenced file in "ICON = MyAppIcon.icns". You also would want to make sure that "iconutil" is called before the app resources are being copied into the app bundle ("pre-build step"?).

Cheers, Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140707/ed2754f9/attachment.html>


More information about the Interest mailing list