Replace output executable icon on Windows

209 views
Skip to first unread message

dbv

unread,
Apr 4, 2013, 5:55:03 AM4/4/13
to pyins...@googlegroups.com
Environment: Windows XP/7, PyInstaller-Develop (2.x)

Want to replace the PyInstaller icon (yellow chick?) on the generated executable with an alternative icon (.ico).

Adding the option (as stated in both 2.0 and 2.1 manual):

--icon=FILE.ICO where FILE.ICO = "/path/to/icon/file/my.ico"

in the .spec file doesn't work.  Is there something else to do?


Martin Zibricky

unread,
Apr 4, 2013, 3:36:45 PM4/4/13
to pyins...@googlegroups.com
dbv píše v Čt 04. 04. 2013 v 02:55 -0700:
> in the .spec file doesn't work. Is there something else to do?

Do you get any errors, tracebacks, etc.?
Could you provide your icon for testing?

dbv

unread,
Apr 4, 2013, 3:45:39 PM4/4/13
to pyins...@googlegroups.com
No errors or Traceback.  Icon file attached.  Thx!
x.ico

Martin Zibricky

unread,
Apr 6, 2013, 3:46:53 PM4/6/13
to pyins...@googlegroups.com
dbv píše v Čt 04. 04. 2013 v 12:45 -0700:
> No errors or Traceback. Icon file attached. Thx!

I was testing your icon with the test_helloworld test and the icon was
set properly.

I was using my branch ( the main tree is not much different).

dbv

unread,
Apr 13, 2013, 7:11:45 AM4/13/13
to pyins...@googlegroups.com
Was anything different done to get the icon to work as it still doesn't work for me.  The pyinstaller command line looks like:

python ..//pyinstaller-develop//pyinstaller.py --noconfirm --log-level=ERROR --onedir --console --nowindowed --icon=x.ico tto.spec


Martin Zibricky

unread,
Apr 14, 2013, 8:58:52 AM4/14/13
to pyins...@googlegroups.com
dbv píše v So 13. 04. 2013 v 04:11 -0700:
> python ..//pyinstaller-develop//pyinstaller.py --noconfirm
> --log-level=ERROR --onedir --console --nowindowed --icon=x.ico
> tto.spec

The issue with this command is that options --onedir --console
--nowindowed --icon are ignored when using .speci files.

dbv

unread,
Apr 14, 2013, 1:56:50 PM4/14/13
to pyins...@googlegroups.com
Ok, it works now.  The 2.0 manual isn't clear about the options supported by the .spec file but the 2.1 manual does.

I guess the discussion to have just one configuration file must have taken place in the past?

Martin Zibricky

unread,
Apr 14, 2013, 2:15:51 PM4/14/13
to pyins...@googlegroups.com
dbv píše v Ne 14. 04. 2013 v 10:56 -0700:
> I guess the discussion to have just one configuration file must have
> taken place in the past?

There was no discussion, the one configuration is just merging of
several utilities into one.

Reply all
Reply to author
Forward
0 new messages