python - Changing the icon of the produced .exe, py2exe -


ive been googling none of results worked me.

here setup file

setup( windows = [     {         "script": "start.py",         "icon_resources": [(1, "myicon.ico")]     } ], ) 

the icon of actual .exe file should "myicon.ico". not happen , default icon. "myicon.ico" 32 x 32.

i using windows 7.

i've had problem before (though i'm using windows xp). recent snippet of code worked me:

from distutils.core import setup  setup(     options = {'py2exe': {'bundle_files': 1}},     zipfile = none,     windows = [{             "script":"myprogram.pyw",             "icon_resources": [(1, "myicon.ico")],             "dest_base":"myprogram"             }], ) 

this creates 1 .exe file can use distribute (even includes windows libs -- use caution there)

my .ico file 64 x 64 , used tool create jpg (something http://www.favicon.cc/) photoshop , gimp saving file .ico default settings not quite enough, aware might have else there.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -