首页 > 解决方案 > 在 cx_freeze 设置函数中,name、version 和 description 关键字实际上是做什么的?

问题描述

当我使用 cx_freeze 冻结我的代码时,我通常在 setup 函数中包含名称、版本和描述关键字参数,因为这是在文档示例中所做的。但我无法弄清楚这些关键字参数实际上是如何影响设置脚本的输出的。如果我忽略或省略这些关键字参数,是否会导致任何问题?以下是文档中的示例代码以供参考。

import sys
from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(  name = "guifoo",
        version = "0.1",
        description = "My GUI application!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("guifoo.py", base=base)])

标签: pythonsetuptoolscx-freezedistutils

解决方案


嘿亲爱的名字是输出.exe(应用程序)的名称,描述是您制作的应用程序的描述,描述将显示为任务管理器中的任务(应用程序)的名称,最后是版本是您的应用程序的版本.. 谢谢


推荐阅读