简体   繁体   English

如何将waf构建系统转换为exe?

[英]how to convert waf build system to exe?

i use waf( https://waf.io/ ) as my build system,我使用 waf( https://waf.io/ ) 作为我的构建系统,
as not ervey my client want install the python, so I want try to convert it (python+waf+wscript) to exe file,因为不是我的客户想要安装 python,所以我想尝试将它(python+waf+wscript)转换为 exe 文件,

first I try the pyinstaller,首先我尝试 pyinstaller,

pyinstaller.exe -F waf

it give the error as follows:它给出如下错误:

D:\CX\wafexample\1_basic\15_Task_rule_exe>waf.exe
Traceback (most recent call last):
File "waf", line 162, in 
wafdir = find_lib()
File "waf", line 159, in find_lib
unpack_wafdir(dir, src)
File "waf", line 59, in unpack_wafdir
f = open(src,'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\XIA~1.CHE\AppData\Local\Temp\_MEI158042\waf.py'
[11540] Failed to execute script 'waf' due to unhandled exception!

then i try the nuitka, it gives as:然后我试试 nuitka,它给出的是:

>waf.cmd configure build
Waf: Run from a folder containing a 'wscript' file (or try -h for the generic options)

this means nuitka convert python+waf to exe, but without the wscript.这意味着 nuitka 将 python+waf 转换为 exe,但没有 wscript。

can anyone can share how to convert python+waf+wscript to build.exe?任何人都可以分享如何将 python+waf+wscript 转换为 build.exe 吗? then i can use然后我可以使用

 build.exe configure build 

to build a project?建立一个项目?

I know waf , but not nuitka .我知道 waf,但不知道 nuitka Just looking through the docs, it seems there's an option to include data files: --include-data-file .只是浏览文档,似乎有一个包含数据文件的选项: --include-data-file I think that's the way to go:)我想这就是去 go 的路:)

Good luck!祝你好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM