使用luajit将lua脚本编译成字节码
2014-06-28 21:34
429 查看
使用luajit为代码稍微加点保护措施
1、下载luajit
传送门:http://luajit.org/download.html2、安装luajit
官方:http://luajit.org/install.htmlcd LuaJIT-2.0.3
make
sudo make install
3、将lua脚本编译成字节码
先要cd到src里面cd src/
然后输入命令(文件必须带上路径)
./luajit -b 源文件 目标文件
例如:
先把源文件名随便改一下,再把目标文件改成源文件原来的文件名;这样做是为了防止require "hello4"找不到加密后的hello.lua脚本
4、替换工程里对应的脚本文件
虽然显示报错,但还是正常执行的
效果:
编译前:
编译后:
相关文章推荐
- quick-cocos2d-x使用luajit编译lua脚本
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,实现加密 更新
- cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,实现加密 更新
- Cocos2d-x使用Luajit将Lua脚本编译成bytecode,启用加密
- Cocos2d-x使用Luajit将Lua脚本编译
- Windows下LuaJIT的编译和使用,将Lua脚本编译为bytecode
- cocos2dx 使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- cocos 使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2d-x使用Luajit将Lua脚本编译成bytecode,启用加密
- Cocos2d-x使用Luajit将Lua脚本编译为bytecode,从而实现加密
- Cocos2dx-lua环境下的luajit编译脚本目录