[PATCH] Mac OS X application icon support

Harald Fernengel harry at kdevelop.org
Sun Dec 30 12:46:01 GMT 2007

Ralf Habacker wrote:
> Harald Fernengel schrieb:
>> Ralf Habacker wrote:
>>> Harald Fernengel schrieb:
>>>> similarly to KDE4_ADD_WIN32_APP_ICON, this patch adds a
>>>> KDE4_ADD_MACOSX_APP_ICON to KDE4Macros.cmake, so KDE applications
>>>> won't have the boring default icon when opened in Finder.
>>>> Unfortunately, I can't reuse the WIN32_APP_ICON macro, since on
>>>> Windows, the app icon is 32x32 and it's compiled into the binary,
>>>> whereas on Mac, it's usually 128x128 and copied into the application
>>>> bundle at install time.
>>> The initial version of the win32 related macro used a
>>> directory/pattern based search for icons and selected the really used
>>> icons inside the macro to be platform independent. See
>>> http://websvn.kde.org/?view=rev&revision=720773 for this version
>>> I don't know why this was removed :-(
>>> Would the following form would be usable by mac os too ?  If so there
>>> could only be one macros for win32 and mac platform and the magics are
>>> done inside the macr.
>>> KDE4_ADD_APP_ICON(<target> <icon-path-pattern> <source-variable>)
>> Looks good to me - provided that my cmake skills are good enough to
>> extract the 128x128 icon from the icon-path-pattern :)
> I updated the patch - on win32 it is already working.
> In the mac osx part i added code to extract the 128'er icon and made
> it more like the win32 part - hope it does not break something else.
> Can you test the mac os x part ?
> BTW: In the patch I changed the signature to
> KDE4_ADD_APP_ICON(<target> <source-variable> <icon-path-pattern> )
> which looks better for me. This is a personal opinion and if there are
> reasons to use the previous proposal i have no problems to change it
> back.

Thanks - some small fixes were required (the icon name was double
qualified, and a variable name changed). I also added a warning if
there's no 128x128 icon (otherwise, there'll be a cryptic error message
from sips, which is not that user friendly).

Would appreciate the patch in KDE 4.0, otherwise, KDE apps will look sad
in the OS X dock.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: icon2.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071230/10bb7752/attachment.ksh>

More information about the kde-core-devel mailing list