Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Compile" a .NET EXE or DLL to Lua #424

Open
2dpdlja496or43iq opened this issue Apr 23, 2023 · 4 comments
Open

"Compile" a .NET EXE or DLL to Lua #424

2dpdlja496or43iq opened this issue Apr 23, 2023 · 4 comments

Comments

@2dpdlja496or43iq
Copy link

Like I suggested on #422, automatically run the decompiler to decompile to C# then translate to Lua.

@Drake53
Copy link
Contributor

Drake53 commented Apr 24, 2023

In my fork I added the option to give a .csproj file as input, then its package references will be automatically decompiled.

@yanghuan
Copy link
Owner

#422

@2dpdlja496or43iq
Copy link
Author

In my fork I added the option to give a .csproj file as input, then its package references will be automatically decompiled.

What if I don't have any .csproj and simply want to use a .NET DLL?

@Drake53
Copy link
Contributor

Drake53 commented Apr 30, 2023

Then you'll have to decompile it yourself.
In my fork I use the following library for this: https://github.com/icsharpcode/ILSpy

I implemented the decompiler at the following location: https://github.com/Drake53/CSharp.lua/blob/master/CSharp.lua/LuaSyntaxGeneratorFactory.cs#L132
At this point I already extracted the .dll's from the nuget packages so it should be easy to adjust this code for your own needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants