#๐Ÿ”’ how am i able to add an .ico file to vsc

45 messages ยท Page 1 of 1 (latest)

ocean flame
#

read the title

exotic daggerBOT
#

@ocean flame

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

grand acorn
#

What do you mean?

#

vsc = Visual Studio Code?

zenith mason
ocean flame
ocean flame
#

because im

grand acorn
#

So just putting a file in a folder?...

zenith mason
#

VS Code is a text editor, so I am still having trouble understanding

ocean flame
#

look

#

so

#

im trying to compile everything into an exe file right

#

then i would put the image

#

but the

#

i changed the directory

#

to where my py file was right?

grand acorn
#

What language are you using? What code are you using to compile the exe?

ocean flame
#

and it keeps telling me it dosent exist

grand acorn
#

Are you using pyinstaller?

ocean flame
#

yep

grand acorn
#

Ok so you want to embed the icon into the bundle

ocean flame
#

yup

grand acorn
#

How are you doing it right now? What's your pyinstaller command?

#

And how are you referencing the icon path in your python code?

ocean flame
#

see the thing is

#

since i cant change the directory

#

i cant compile it all into an exe

#

am i supposed to put it into the python folder enviorment?

#

or can i keep it anywhere i want

grand acorn
#

I need to know those two things, and also the project structure

ocean flame
#

its in documents right now, so im trying to

#

change the directory

zenith mason
ocean flame
#

ok thank you js gimme a sec

grand acorn
#

Well you can also use a relative path, but it depends on you project structure, you should call the pyinstaller command when inside the root folder of your project, and your icons are in the same folder or in some nested folder.

#

Idk if pyinstaller can accepts relative paths tho

nimble vault
#

the icon for the exe is pretty basic and works well if you have an .ico file with all the required sizes in it

but windows can cache the icon for a file that you have browsed/listed in Windows Explorer, sometimes you have to rename the file or move it somewhere else (or even switch view so that it shows the icon in another size) for the new/correct icon to appear on your system

exotic daggerBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.