Skip to content

VS2022 Lua5.4.4 windows build script bat #137

@laiqun

Description

@laiqun

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 ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions