【问题标题】:Change icon for a cx_Freeze script更改 cx_Freeze 脚本的图标
【发布时间】:2012-05-18 15:20:23
【问题描述】:

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

【问题讨论】:

标签: python python-3.x icons cx-freeze


【解决方案1】:

只需像这样在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]
    )

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-07-04
    • 1970-01-01
    • 2020-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-12
    相关资源
    最近更新 更多