[Distutils] Distutils windows binaries...
Thomas Heller
theller at python.net
Wed Feb 4 10:58:47 EST 2004
>>> I know you can change the bitmap displayed during the install but can you
>>> change the icon that is displayed for the *.exe that is generated?
>>
>> You can change the icon of the
>> Lib/site-packages/distutils/command/wininst.exe with any tool of your
>> choice, *before* building the installer.
>
> I would like to do this programatically instead of doing it manually. Anyone
> know of a python tool that can do that...or is that gonna have to be a
> project of my own? I am also interested to know why you stressed the
> *before* statement - surely I could change the icon on the produced *.exe?
> and as such after building the installer?
Well, the finished installer exe-file is actually wininst.exe plus an
appended zip-archive. I haven't tried tools other than MSVC 6, which is
able to edit resources in binary files (there are also others), but
MSVC6 is confused by the appended zip-portion.
I don't know of a Python tool which does this, but py2exe contains a
compiled extension which updates the icon resources. You can probably
either use this as is (it's the py2exe_util.pyd), or you use the source
code and translate the calls into win32all or ctypes calls.
Thomas
More information about the Distutils-SIG
mailing list