Pyinstaller Custom .ico

This is the place for queries that don't fit in any of the other categories.

Pyinstaller Custom .ico

Postby GoshFather » Thu Dec 26, 2013 4:53 am

I know how to make a .exe for example:

"python pyinstaller.py --onefile myscript.py" in the command prompt

but im having trouble figuring out how to configure pyinstaller to use a custom .ico file for the created executable.

I tried "python pyinstaller.py --onefile icon=<test.ico> myscript.py"

but it tells me that the file couldnt be found. Im assuming its referring to my test.ico file. Where should it be placed in order for it to work?

Has anybody done this before?
GoshFather
 
Posts: 8
Joined: Tue Dec 03, 2013 3:44 am

Re: Pyinstaller Custom .ico

Postby GoshFather » Thu Dec 26, 2013 5:02 am

Never mind it was a syntax problem.

instead of "--icon=<test.ico>"

its just "--icon=test.ico"

I hate how they have it so confusing on the website
GoshFather
 
Posts: 8
Joined: Tue Dec 03, 2013 3:44 am

Re: Pyinstaller Custom .ico

Postby drpaneas » Thu Dec 26, 2013 5:04 am

I am not sure if <> are required. I would suggest you to place the filename.ico into the current folder and use it as it is.

Code: Select all
python pyinstaller.py --onefile icon=test.ico myscript.py


EDIT: Ah, you got me ;) Nice to know you've figured it out.
Far over the Misty Mountains cold, to dungeons deep and caverns old
--> My Python tutorial for beginners <--
User avatar
drpaneas
 
Posts: 6
Joined: Thu Dec 26, 2013 4:00 am
Location: Thessaloniki, GR


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 1 guest