[Pythonmac-SIG] py2app iconfile not working?

Nat Goodspeed ngoodspeed at solidworks.com
Fri Mar 2 15:09:51 CET 2007


@Tim Ansell from November 27, 2006:
http://www.mail-archive.com/pythonmac-sig@python.org/msg06196.html

I read with interest Frank Niessink's suggestion of 26 Nov 2006:
http://www.mail-archive.com/pythonmac-sig@python.org/msg06195.html

> I had a similar issue. Adding a plist option to the py2app options 
> solved it. See setup.py fragment below.
> 
>      setupOptions.update(dict(app=['taskcoach.py'],
>          setup_requires=['py2app'],
>          options=dict(py2app=dict(argv_emulation=True,
compressed=True,
>              dist_dir=builddir, optimize=2,
>              iconfile='icons.in/taskcoach.icns',
>              packages=['i18n'],
>              plist=dict(CFBundleIconFile='taskcoach.icns')))))

It seems possible to me that the app-bundle icon functionality broke (or
at least changed) when we upgraded from py2app 0.2.x to 0.3.5. Perhaps
the iconfile option used to set CFBundleIconFile in the plist as well as
copying the .icns file, but now it no longer does that. In any case, we
used to get the desired app icon, but it stopped working.

My first approach was to introduce a plist item
CFBundleIconFile="path/to/my/icon.icns". That didn't work.

Then I realized that py2app's iconfile option places the specified file
in the new app bundle's Resources directory, and that my
CFBundleIconFile should be specified simply as "icon.icns" (the basename
of my desired icon file, not the relative path). When I made that
change, py2app resumed setting my desired app icon.

Admittedly I'm running py2app on Tiger 10.4.8.

Sorry this isn't properly appended to the original thread, but I'm not a
subscriber.


More information about the Pythonmac-SIG mailing list