我正在使用cx_freeze来部署我的应用程序.我想包含一个完整的目录,因为包含单个文件不会将它们放在一个文件夹中.我如何包含文件夹?
Ecn*_*o92 25
您必须为构建选项设置包含文件参数.您可以通过不同的方式执行此操作,但我将显示我的配置的一部分.我在这里描述的是针对一个特定文件和一个特定目标.我想你也可以设置这样的路径,但我还没有测试过.
编辑:测试过,请为您的项目选择正确的方法.
buildOptions = dict(include_files = [(absolute_path_to_your_file,'final_filename')]) #single file, absolute path.
buildOptions = dict(include_files = ['your_folder/']) #folder,relative path. Use tuple like in the single file to set a absolute path.
setup(
name = "appname",
version = "1.0",
description = "description",
author = "your name",
options = dict(build_exe = buildOptions),
executables = executables)
Run Code Online (Sandbox Code Playgroud)
另请参阅此主题.它可以解决相同的问题:在使用cx_freeze时如何捆绑其他文件?
归档时间: |
|
查看次数: |
12624 次 |
最近记录: |