[Pythonmac-SIG] Dock tile icon

Zachery Bir zbir at urbanape.com
Fri Feb 23 15:00:31 CET 2007


On Feb 23, 2007, at 8:04 AM, Amrit Jassal wrote:

> In my py2app built application, I want to replace the standard  
> application dock tile icon with my own icon.
>
> After using the --iconfile option with py2app, I see that the icon  
> file (icns) is copied into Contents/Resources but Info.plist  
> (CFBundleIconFile) does not reference this icon file. Manually  
> updating the plist also has no effect on the dock icon.
>
> Where did I go wrong?
>
> I am using python 2.4.4 on OS X 10.4.8

I usually reference it directly in the setup.py module:

from distutils.core import setup
import py2app

plist = dict(
     ...
     CFBundleIconFile = "Thumbscrew.icns",
     ...)

setup(
     data_files = [...
                   "Resources/Thumbscrew.icns",
                   ...],
     app = [dict(
         script="ThumbscrewAppDelegate.py", plist=plist),
            ],
     )

And have had no troubles with it. The non-effect of updating the  
plist might be cached launch services stuff?

Zac



More information about the Pythonmac-SIG mailing list