bat:更新脚本。

This commit is contained in:
taynpg 2025-02-13 12:59:20 +08:00
parent b2ca6efec2
commit 0fb1b386fc
3 changed files with 28 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ build
.cache
cmake-*
auto_build
export

View File

@ -1,3 +0,0 @@
@echo off
.\build\bin\gendef.exe .\fs\lib.cxx lua_fs .\build\defs
pause

26
def_gen.bat Normal file
View File

@ -0,0 +1,26 @@
@echo off
setlocal
:: 定义路径
set EXPORT_DIR=export
set LUA_DIR=%EXPORT_DIR%\lua
set MLUA_EXE=%EXPORT_DIR%\mlua.exe
set LUA_LS=%EXPORT_DIR%\lua_ls.lua
set BUILD_BIN=build\bin
set GENDEF_EXE=%BUILD_BIN%\gendef.exe
set FS_LIB=fs\lib.cxx
:: 创建 export 和 lua 文件夹
if not exist %EXPORT_DIR% (
mkdir %EXPORT_DIR%
)
if not exist %LUA_DIR% (
mkdir %LUA_DIR%
)
copy /Y %BUILD_BIN%\mlua.exe %MLUA_EXE%
%GENDEF_EXE% %FS_LIB% lua_ls %LUA_DIR%
copy /Y %BUILD_BIN%\lua_fs.dll %LUA_DIR%
echo 操作完成。
endlocal
pause