更改Cx_freeze脚本的图标

Jos*_*ith 8 python icons cx-freeze python-3.x

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

Tex*_*512 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]
    )
Run Code Online (Sandbox Code Playgroud)