我只是想知道是否可以更改 cx_Freeze 脚本的程序图标,我环顾四周但找不到任何东西。
最佳答案
只需在 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]
)
关于python - 更改 cx_Freeze 脚本的图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10527454/