我需要将 RemoveDrive.exe 添加到 cx-freeze msi软件包 中并尝试
includefiles=['RemoveDrive.exe']
在 setup.py 中,但没有添加到软件包中
代码:
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["os","shutil","datetime","subprocess"]}
includefiles = ['RemoveDrive.exe', 'whitelist.txt']
base = None
setup( name = "whitelist",
version = "0.1",
description = "My application!",
options = {"build_exe": build_exe_options},
executables = [Executable("whitelisting.py", base=base)])
答案 0 :(得分:0)
您应该尝试以下操作:
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["os","shutil","datetime","subprocess"]}
includefiles = ['RemoveDrive.exe', 'whitelist.txt']
base = None
exe = Executable(script='whitelisting.py', base = base)
setup( name = "whitelist",
version = "0.1",
description = "My application!",
options = {"build_exe": {'include_files':includefiles}},
executables = [exe])