我使用以下安装文件使用cx_freeze创建可执行文件.是否可以使用除可执行脚本名称之外的其他名称生成exe?
from cx_Freeze import setup, Executable
import xlrd
buildOptions = dict(
compressed = True,
optimize=2,
path=sys.path+[".\\uitls", “.\\supported”],
include_files=[“Doc"],
includes=[“xlrd”, "win32com"],
packages=["utils", ”supported"],
append_script_to_exe=True,
copy_dependent_files=True,
)
setup(
name = "TestExecutable",
version = "0.1",
options = dict(build_exe = buildOptions),
executables = [Executable(script=r".\\codebase\\runner.py",
icon=".\\icon.ico",
base="Win32GUI")]
)
Run Code Online (Sandbox Code Playgroud)
所以现在创建的exe文件名为runner.exe,我希望它与myexecutable.exe不同,重命名可执行文件,如果脚本不能正常运行,则脚本模块会进一步引用该脚本.