3 ms·
You mean so you can distribute a standalone binary that is actually just a bunch of lua? Do you do this so that the users have a harder time modifying the code
by aktau 13y ago
You mean so you can distribute a standalone binary that is actually just a bunch of lua? Do you do this so that the users have a harder time modifying the code (just curious)? I'm supposing that this is the case otherwise it would work pretty well with by using the lua or luajit interpreter and some wrapper bash/cmd.exe script to run your lua file(s).
- Touche 13y ago> You mean so you can distribute a standalone binary that is actually just a bunch of lua? No, I'm saying that you can't. You create a wrapper main.c file that loads and executes the lua. I use a script that tranlates the lua into a C byte array so that I can avoid loading the external lua scripts. > Do you do this so that the users have a harder time modifying the code (just curious)? I'm supposing that this is the case otherwise it would work pretty well with by using the lua or luajit interpreter and some wrapper bash/cmd.exe script to run your lua file(s). No, I do it to avoid having to worry about where the .lua scripts are located. Having a single binary is nicety, not required of course.
- coldtea 13y ago>No, I'm saying that you can't. You create a wrapper main.c file that loads and executes the lua. I use a script that tranlates the lua into a C byte array so that I can avoid loading the external lua scripts. I think that's what he meant -- that ignoring the small wrapper part --which is boilerplate--, you can deliver a binary that's basically lua.
- fsniper 13y agoI think what you are looking is called a packager. I left The Windows world and scene long time ago but t was very popular in scenes. With a little search I found out UPX and it seems to be working with many unix binary formats too.. http://upx.sourceforge.net/ http://upx.sourceforge.net/