简体   繁体   English

如何为Ironpython文件和.Net dll文件构建可执行文件?

[英]How to build a executable for ironpython files and a .Net dll file?

I have two python files (Iron Python 2.7) and a .net dll file. 我有两个python文件(Iron Python 2.7)和一个.net dll文件。

  • abc.py abc.py
  • def.py def.py
  • ghi.dll ghi.dll

abc.py is the Main file that contains the code for Windows Forms application and def.py is a supporting file that has the functions. abc.py是主文件,其中包含Windows Forms应用程序的代码,而def.py是具有功能的支持文件。 ghi.dll is a third party api file that has been modified to dll. ghi.dll是已被修改为dll的第三方api文件。 I want to create this to an Windows Forms Application executable to distribute it to others in my team. 我想将其创建到Windows Forms Application可执行文件,以将其分发给团队中的其他人。 Used Visual Studio 2017 to write the code. 使用Visual Studio 2017编写代码。

  • Create a folder and copy all the required .net dlls from the C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework.NETFramework\\v4.0 folder and copy all the required files from the C:\\Program Files (x86)\\IronPython 2.7\\Lib folder 创建一个文件夹,并从C复制所有必要的.NET的DLL:\\程序文件(x86)\\参考大会\\微软\\ Framework.NETFramework \\ v4.0的文件夹,并将从C所有必需的文件:\\ Program Files文件(86 )\\ IronPython 2.7 \\ Lib文件夹

  • Copy the ipyc.exe from C:\\Program Files (x86)\\IronPython 2.7 folder and copy pyc.py from C:\\Program Files (x86)\\IronPython 2.7\\Tools\\Scripts folder C:\\ Program Files(x86)\\ IronPython 2.7文件夹复制ipyc.exe,并从C:\\ Program Files(x86)\\ IronPython 2.7 \\ Tools \\ Scripts文件夹复制pyc.py

  • Open Command Prompt and navigate to the appropriate folder and use the following command ipyc def.py /main:abc.py /target:winexe 打开命令提示符并导航到相应的文件夹,然后使用以下命令ipyc def.py /main:abc.py / target:winexe

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

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