更改Cx_freeze脚本的图标

时间:2012-05-10 04:21:15

标签: python python-3.x icons cx-freeze

我只是想知道是否可以更改cx_freeze脚本的程序图标,我环顾四周但我找不到任何东西。

1 个答案:

答案 0 :(得分:19)

只需在Executable()中添加icon = icon.ico,就像这样:

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]
    )