IronPython ->. Exe Executable and distributed with all HELP DLLs

I tried to compile this IronPython program into a working .exe for the last 3-4 hours without any luck.

I am using pyc.py which comes with "IronPython 2.6 for .NET 4.0"

D:\IronTestCompile>ipy pyc.py file1.py file2.py /out:Program /main:program.py /target:exe

The program compiles into Program.dll and Program.exe, but Program.exe cannot work.

I use this as a guide:

IronPython - how to compile exe

A very simple HelloWorld program that I worked with, but my more complex program failed. I think my complex program did not start as compiled because it missed the DLL?

From the IronPython directory, I copied all the necessary DLLs (Microsoft * .dll, IronPython * .dll) that are necessary for compilation and as a prerequisite for executing to run the compiled HelloWorld.exe.

How can I understand why my .exe is not starting? Or how to determine which .NET DLL files are needed to be included in a directory? (Assuming I should put the entire .NET DLL in an example .exe directory C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll -> D:\IronTestCompile?)

The only DLL files that are in the program directory:

Microsoft.Scripting.dll
IronPython.dll
IronPython.Modules.dll
Microsoft.Dynamic.dll

I do not have Microsoft.Scripting.Core.dllor Microsoft.Scripting.ExtensionAttribute.dll because I am running IronPython 2.6 for .NET 4.0

Should I have more .dll? My IronPython program uses System.Windows.Forms, as well as many others ...

Thanks for any help.

, .DLL zip , , ! ?


EDIT: , , (. ). :

Dang, .


MyApp.exe - .NET Framework

.NET Framework:

v4.0.30319

.NET Framework.

OK

, .

EDIT: , .NET 3.5, , IronPython .NET 3.5

+3
2

, .

, .

-

import traceback
import inspect

IronPython "ImportError", ipy.exe Program.py .

"ThreadStateException" ( Migol ), System.Windows.Forms.WebBrowser()

, :

, , pyc.py STA.

:

pyc.py mainMethod =...

mainMethod.SetCustomAttribute(clr.GetClrType(System.STAThreadAttribute).GetConstructor(()), System.Array[System.Byte](()))

: http://www.mail-archive.com/users@lists.ironpython.com/msg07725.html

.:)

, . DLL, "IronPython 2.6 .NET 4.0".

IronPython.dll
IronPython.Modules.dll
Microsoft.Scripting.dll
Microsoft.Dynamic.dll
Mycrosoft.Scripting.Debugging.dll

( C:\Program Files\IronPython 2.6 for .NET 4.0\ IronPython)

, script, :

D:\IronTestCompile\project_3>"c:\Program Files\IronPython 2.6 for .NET 4.0\ipy.exe" pyc.py Form1.py utils.py project.py /out:MyApp /main:program.py /target:winexe

IronPython - exe

, , main: ( program.py. PYC.py .:)

edit: .py, pyc.py. ( MyApp.dll), .py , , .

, -, , . . =)

+5

, .NET Framework 4.0?

0

Source: https://habr.com/ru/post/1765611/


All Articles