rjpcomputing / luaforwindows

Lua for Windows is a 'batteries included environment' for the Lua scripting language on Windows. NOTICE: Looking for maintainer.
2.93k stars 485 forks source link

VS2022 Lua5.4.4 windows build script bat #137

Open laiqun opened 2 years ago

laiqun commented 2 years ago

call "d:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" mkdir dll_output mkdir bin mkdir static_lib_output cd src ::Compile all C -> obj cl /MD /O2 /c /DLUA_BUILD_AS_DLL .c :: Rename obj ren lua.obj lua.o ren luac.obj luac.o ::Generate lib and DLL link /DLL /IMPLIB:lua5.4.4.lib /OUT:lua5.4.4.dll .obj ::Generate Executer link /OUT:lua.exe lua.o lua5.4.4.lib ::Generate static library lib /OUT:lua5.4.4-static.lib *.obj ::Generate Lua compiler link /OUT:luac.exe luac.o lua5.4.4-static.libxcopy lua5.4.4.dll ..\dll_output\ xcopy lua5.4.4.lib ..\dll_output\ xcopy lua5.4.4-static.lib ..\static_lib_output xcopy lua.exe ..\bin xcopy luac.exe ..\bin xcopy lua5.4.4.lib ..\bin xcopy lua5.4.4.dll ..\bin xcopy lua5.4.4-static.lib ..\bin

::Clean tmp files del .obj del .exe del .exp del .lib del .o del .dll cd ..