简体   繁体   English

如何创建具有.cxx.py文件和许多dll的项目的exe

[英]How to create exe of project who has .cxx .py file and many dlls

I have a code who is depended on Qt, PyQt, VTK, ITK, libs.我有一个依赖于 Qt、PyQt、VTK、ITK、libs 的代码。 using CMAKE to build Environment: Windows I want to distribute EXE who has cxx, py files and related dlls使用 CMAKE 构建环境:Windows 我想分发具有 cxx、py 文件和相关 dll 的 EXE

I have tried to compile and got executable but my python files are remaining necked.我已尝试编译并获得可执行文件,但我的 python 文件仍处于收缩状态。 I don't want to share python files as a script.我不想将 python 个文件作为脚本共享。

how we can make those python files as a dlls我们如何将那些 python 文件制作为 dll

python is often a hard language to turn to exe but the best way to do so is using the pyinstaller package. Installed by pip install pyinstaller and can turn a .py file to a .exe by pyinstaller --onefile FILENAME.py in CMD . python 通常是一种难以转换为 exe 的语言,但最好的方法是使用pyinstaller package。通过pip install pyinstaller ,可以通过pyinstaller --onefile FILENAME.py in CMD.py文件转换为.exe After that your exe file should be stored in a folder called disk .之后,您的 exe 文件应存储在名为disk的文件夹中。 The other files can just be included in the same file as the exe.其他文件可以只包含在与 exe 相同的文件中。

docs: https://pyinstaller.org/en/stable/文档: https://pyinstaller.org/en/stable/

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

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