468,514 Members | 1,550 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

py2exe Icon Resources

I have created an app using python and then converting it to an exe
using py2exe, and have the following code:

"icon_resources": [(1, "appFavicon.ico"), (2, "dataFavicon.ico")]

in my py2exe setup file, the appFavicon works fine and it sets that as
the app icon thats fine, but the program creates data files (like
documents) and i wanted them to have a different icon...

I package my apps using Inno Setup 5, and it registers the file type
fine so that it loads on double click, what i cant do is set the icon
for the file.

as you can see i have packaged two different icons with py2exe but
when i set DefaultIcon in the registry to "C:\pathtoapp\myapp.exe,2"
it doesnt work, nor does it work with a 1 or a %1 or indeed with
passing a path to the icon itself, nothing seems to work!!

how do you access the other icons generated from py2exe, or how do you
set the registry up so that i looks for the icon correctly,

any help appreciated,

Caspar
Jun 27 '08 #1
2 2758
On Apr 29, 3:24*pm, flarefi...@googlemail.com wrote:
I have created an app using python and then converting it to an exe
using py2exe, and have the following code:

"icon_resources": [(1, "appFavicon.ico"), (2, "dataFavicon.ico")]

in my py2exe setup file, the appFavicon works fine and it sets that as
the app icon thats fine, but the program creates data files (like
documents) and i wanted them to have a different icon...

I package my apps using Inno Setup 5, and it registers the file type
fine so that it loads on double click, what i cant do is set the icon
for the file.

as you can see i have packaged two different icons with py2exe but
when i set DefaultIcon in the registry to "C:\pathtoapp\myapp.exe,2"
it doesnt work, nor does it work with a 1 or a %1 or indeed with
passing a path to the icon itself, nothing seems to work!!

how do you access the other icons generated from py2exe, or how do you
set the registry up so that i looks for the icon correctly,

any help appreciated,

Caspar
I recommend cross-posting this to the py2exe mailing list and maybe
the distutils mailing list if the fine people here don't have answers.

https://lists.sourceforge.net/lists/...o/py2exe-users

http://mail.python.org/mailman/listinfo/distutils-sig

Mike
Jun 27 '08 #2
fl********@googlemail.com schrieb:
I have created an app using python and then converting it to an exe
using py2exe, and have the following code:

"icon_resources": [(1, "appFavicon.ico"), (2, "dataFavicon.ico")]

in my py2exe setup file, the appFavicon works fine and it sets that as
the app icon thats fine, but the program creates data files (like
documents) and i wanted them to have a different icon...

I package my apps using Inno Setup 5, and it registers the file type
fine so that it loads on double click, what i cant do is set the icon
for the file.

as you can see i have packaged two different icons with py2exe but
when i set DefaultIcon in the registry to "C:\pathtoapp\myapp.exe,2"
it doesnt work, nor does it work with a 1 or a %1 or indeed with
passing a path to the icon itself, nothing seems to work!!

how do you access the other icons generated from py2exe, or how do you
set the registry up so that i looks for the icon correctly,
There was a problem in the icon resources code in py2exe which was
recently fixed in CVS but there is not yet a binary release of this code.
Maybe it solves your problem...

Thomas
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.