我只是想知道是否可以更改cx_freeze脚本的程序图标,我环顾四周但我找不到任何东西。
答案 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]
)