I was just wondering if it's possible to change the program icon for a cx_Freeze script, I've looked around but I couldn't find anything.
Asked
Active
Viewed 2.2k times
12
-
2The `icon` option is listed in the docs: http://cx_freeze.readthedocs.org/en/latest/distutils.html#build-exe IIRC, you need to have a .ico file for it to work on Windows, so if it's in another format, you'll have to convert it manually. – Thomas K May 10 '12 at 11:47
-
Thomas You've been very helpful lately ;) – Joseph Smith May 15 '12 at 02:06
1 Answers
25
Just add icon="icon.ico"
in Executable()
like this:
from cx_Freeze import setup, Executable
target = Executable(
script="your_program.py",
base="Win32GUI",
compress=False,
copyDependentFiles=True,
appendScriptToExe=True,
appendScriptToLibrary=False,
icon="icon.ico"
)
setup(
name="name",
version="1.0",
description="the description",
author="the author",
options={"build_exe": options},
executables=[target]
)