py2exe Icon Resources

F

flarefight

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
 
M

Mike Driscoll

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/listinfo/py2exe-users

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

Mike
 
T

Thomas Heller

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top