11

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

4

1 回答 1

25

只需icon="icon.ico"Executable()这样添加:

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]
    )
于 2015-03-08T19:16:53.247 回答