Tool for compiling Lua into bytecode using Garry's Mod's
lua_shared
dynamic library. Useful for obfuscation of source code you don't want readable.
Based on https://github.com/lua/luac/blob/master/luac.c
and https://code.google.com/p/lcdhost/
Depends on danielga/scanning which is included as a git submodule. And premake5 is used to create project files.
lua_dyn.c
& lua_dyn.h
are generated using tools/lua_dyn_export_h.lua
alongside the
source code for the target version of LuaJIT used in GMod (currently luajit-2.0.4
)
Running the program requires the libraries from GMod to be in the directory with them:
- Windows:
lua_shared.dll
,tier0.dll
andvstdlib.dll
- Linux:
lua_shared_srv.so
,libsteam.so
,libsteam_api.so
,libtier0_srv.so
libvstdlib_srv.so
On Linux you need to export LD_LIBRARY_PATH
to the directory in order to load the shared libraries
from it, this can be done by simply running: export LD_LIBRARY_PATH=.
First run: git submodule update --init --recursive
to grab danielga/scanning
.
- Windows: Generate your project files using
premake5 vs2015
and build usingproject/gluac.sln
- Linux: Run
premake5 gmake && make
The MIT License (MIT) - Copyright (c) 2017-2018 Matt Stevens