[Pythonmac-SIG] [SOLVED] How to exclude py2app Pygame icon

Rob Leachman callmerob at gmail.com
Tue Mar 1 19:31:07 CET 2011


As often happens, forming confusion into an intelligible question yields the
solution. I'll share my finding and would appreciate any feedback. This hack
seems a lot of bother but any other fix evades.

The issue was stated nicely some time ago, see
http://www.mail-archive.com/pythonmac-sig@python.org/msg08548.html as
desired. The follow-up reply (add --resources AppIcon.png) doesn't seem to
help. Looks like this list has a tradition of revisiting this topic on an
annual basis (ha) and I didn't see another answer. My question was the same
as OP, how to recreate the .zip after hacking on it, today the attached
seems to do the trick and at the expense of just a bit more work producing
the .app:

Recreate the problem:

hg clone https://RobertLeachman@bitbucket.org/RobertLeachman/pythentene
hg clone https://RobertLeachman@
bitbucket.org/RobertLeachman/pythenteneassets
cp pythenteneassets/stuff/setup_mac.py pythentene
cp pythenteneassets/stuff/gameIcon.icns pythentene/stuff
cd pythentene
python setup_mac.py py2app

Works fine, produces dist/Pythentene.app but has the issue at hand: the
Pygame icon flashes on the dock as the game starts.

cd dist/Pythentene.app/Contents/Resources/lib/python2.6
mkdir x; cd x; unzip ../site-packages.zip; cd pygame
rm pygame_icon*
cp ../../../../../../../../stuff/gameIcon.icns pygame_icon.icns
cd ..
zip -r9 site-packages-new.zip *
cd ..
mv x/site-packages-new.zip site-packages.zip
rm -rf x

Success, no more pygame icon but instead a nice stable experience for the
user. I'm sincere about wanting to talk about the subject line, but also
can't resist... this is all go-forward from the 0.1a release of
http://www.bitblaster.com/pythentene/ and I'm hungry for help or feedback.
Let me know if you are interested in some open-source programming work, or
just play this classic game and complete the survey if you will.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20110301/3a36679f/attachment.html>


More information about the Pythonmac-SIG mailing list