Python 更改cx\U冻结脚本的图标
我只是想知道是否有可能更改cx_冻结脚本的程序图标,我四处查看了一下,但找不到任何东西 只需在Python 更改cx\U冻结脚本的图标,python,python-3.x,icons,cx-freeze,Python,Python 3.x,Icons,Cx Freeze,我只是想知道是否有可能更改cx_冻结脚本的程序图标,我四处查看了一下,但找不到任何东西 只需在可执行文件()中添加icon=“icon.ico”,如下所示: from cx_Freeze import setup, Executable target = Executable( script="your_program.py", base="Win32GUI", compress=False, copyDependentFiles=True, appen
可执行文件()中添加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]
)
文档中列出了图标
选项:IIRC,您需要有一个.ico文件才能在Windows上工作,因此如果它是另一种格式,您必须手动转换它。Thomas您最近很有帮助;)