From: Jimmy R. <ji...@re...> - 2005-09-29 01:52:01
|
Alexander Liden wrote: > If I use the following setup file and compile with > C:\Python24>python setup.py py2exe > everything works >=20 > # winsetup.py > from distutils.core import setup > import py2exe > setup(windows=3D["winApp.pyw"]) >=20 > However if I try to add an icon to the application > C:\Python24>python setup.py py2exe --icon winApp.ico > with the following setup >=20 > # setup.py > from distutils.core import setup > import py2exe > setup(windows=3D["winApp.pyw"], > data_files=3D[(".", > ["winApp.ico"])], > ) >=20 > I get >=20 > error: option --icon not recognized Change your setup call to look like this: setup( windows =3D [ { "script": "winApp.pyw", "icon_resources": [(1, "winApp.ico")] } ], ) The wiki has more info: http://starship.python.net/crew/theller/moin.cgi/CustomIcons Jimmy |