Hi.
I'm thinking about a problem in destribution. Does love2d support lua "binery code"s generated by luac?
thanks.
Lua binary files?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Lua binary files?
It probably does. Lua's virtual machine executes both compiled and non-compiled code alike.
Are you sure your luac.exe output is correct?
Are you sure your luac.exe output is correct?
Re: Lua binary files?
I've compiled a lua file (library-level, .lua) into binary (.b) and love cannot require it.ivan wrote:It probably does. Lua's virtual machine executes both compiled and non-compiled code alike.
Are you sure your luac.exe output is correct?
Re: Lua binary files?
It needs the *.lua extension, unless you modify package.path. BTW, it will not work if the love was compiled with luajit (or: bytecode generated by lua and luajit are not interchangeable).infinte wrote:I've compiled a lua file (library-level, .lua) into binary (.b) and love cannot require it.ivan wrote:It probably does. Lua's virtual machine executes both compiled and non-compiled code alike.
Are you sure your luac.exe output is correct?
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Re: Lua binary files?
Changing `package.path` works! thanks.miko wrote:It needs the *.lua extension, unless you modify package.path. BTW, it will not work if the love was compiled with luajit (or: bytecode generated by lua and luajit are not interchangeable).infinte wrote:I've compiled a lua file (library-level, .lua) into binary (.b) and love cannot require it.ivan wrote:It probably does. Lua's virtual machine executes both compiled and non-compiled code alike.
Are you sure your luac.exe output is correct?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Lua binary files?
That is not a solution, since love ignores package.path, so when properly packaged it won't work. Instead, just name them with a lua extension. This, of course, raises the question why you would do such a thing in the first place.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Lua binary files?
Using compiled lua bytecode doesn't help distribution - Pretty much the opposite; your .love file isn't guaranteed to work in all platforms.infinte wrote:Hi.
I'm thinking about a problem in destribution. Does love2d support lua "binery code"s generated by luac?
thanks.
Your problem probably has to do more with encryption than distribution. Luac alone will not help you on that regard; there's a standard decompiler, called luaDec51, which will easily undo the compiling.
When I write def I mean function.
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests