[python-win32] adding icon in an exe

Graeme Glass graemeglass at gmail.com
Wed May 3 10:11:22 CEST 2006


Great, thanks to the both of you, very helpful!!
I had found a interim work around, (not programmable, using GoRC and
Resource Hacker) and so was not happy with it, this is of great help,
thank you.
Graeme

On 5/3/06, Ralf Schmitt <ralf at brainbot.com> wrote:
> Mark Hammond schrieb:
> >> Does anyone know of a way to add an icon to an existing .exe file on
> >> win32 platform using win32all package?
> >
> > With some pain :(  You need to put together the .ico structure yourself and
> > use the BeginUpdateResource() etc win32 functions.  The only working code I
> > know (off the top of my head) is in py2exe - and sadly that implements it in
> > C.  However, if you understand C it should be possible to port to pure
> > pywin32.
> >
>
> pyinstaller (http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi/wiki) has
> pure python code to set icons. Here is a link to the relevant file:
> http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi/file/trunk/icon.py
>
> - Ralf
>
>


More information about the Python-win32 mailing list