bat批处理luajit编译lua源代码
来源:互联网 发布:linux图形化界面命令 编辑:程序博客网 时间:2024/05/16 00:48
今天看到bat,手痒,看了几篇教程,想动手写写。
这是一个 luajit 编译某个目录下所有.lua文件(支持嵌套目录)。
读前须知:
1.PC平台;假设你已经安装好了luajit;
2.若你需要一个打包程序,这个bat可能不是你需要的。你应该写个或者搜一搜python版本的(更具跨平台性质)。
3.写他存粹是练手。
4.使用:luajitDir [input dir] [output dir]或 luajitDir,然后拖目录至控制台,并在当前目录下创建[input].jit目录
@echo off
if not "%1"=="" (set input=%1&goto LendInput)
:LgetInput
set /p input=Drag input Dir to compile*
if not exist "%input%" goto LgetInput
:LendInput
if not "%2"=="" (set output=%2) else (set output=%input%.jit)
pushd %cd%
cd /d "%input%">nul 2>nul || (echo %input% Dir is BAD! & goto Lexit)
popd
xcopy "%input%" "%output%" /s /y /i>nul 2>nul || (echo %output% Dir is BAD! & goto Lexit)
<pre name="code" class="plain" style="font-size: 18px;">pushd %cd%
cd /d "%output%">nul 2>nul || (echo %output% Dir is BAD! & goto Lexit)
popd
set /a num=0
for /f "delims=" %%i in ('dir /b /a-d /s "%output%"')^
do (if %%~xi==.lua set /a num += 1 & luajit -b %%~fsi)
echo Compile %num% files
*Lexit
if "%1"=="" pause
0 0
- bat批处理luajit编译lua源代码
- cocos2d luajit对Lua脚本编译加密的批处理工具
- windows下使用luaJit编译Lua二进制文件
- Lua:编译安装LuaJIT,第一个Lua程序
- bat批处理编译执行java
- bat批处理编译执行java
- quick-cocos2d-x使用luajit编译lua脚本
- Cocos2dx-lua 环境下的 luajit 编译脚本目录
- Cocos2dx-lua 环境下的 luajit 编译脚本目录
- Cocos2d-x使用Luajit将Lua脚本编译
- 清除系统LJ-批处理.bat 源代码
- vs2012编译lua源代码
- lua源代码编译
- Windows 编译 Lua版本 批处理
- Luajit加密lua
- lua luajit 安装cjson
- Lua和Luajit
- VS2005下编译Lua源代码
- LoadRunner自带实例安装问题could not open ftp port21-port is already used by another server
- 浅谈MDK环境下使用#include <stdio.h>的问题
- Py4JJavaError: An error occurred while calling o18.sql. : java.lang.RuntimeException:
- 《算法导论》读书笔记之最大子数组问题
- 面试中关于栈和队列的一些面试题,精选
- bat批处理luajit编译lua源代码
- HDU 1561 树形dp+背包
- 九度OJ 1112:拦截导弹 (DP、最长下降子序列)
- jquery-dataTables的使用
- java视频笔记目录
- 二维数组的介绍、遍历以及长度的计算
- Redhat6.4未注册 ,yum改成 CentOS6.4 的方法
- POJ3667(线段树区间合并)
- cin,cin.get,cin.getline的区别