diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d38335..58cdc8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,13 +5,13 @@ project(BlockLua CXX) # Export compile_commands.json for VSCode IntelliSense set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -# Output directories to mirror compile.bat's build folder +# Output directories to mirror build.bat's build folder set(OUTPUT_DIR ${CMAKE_SOURCE_DIR}/build) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR}) -# Global compile options to mirror compile.bat +# Global build options to mirror build.bat add_compile_options( -Wall -Werror @@ -27,14 +27,14 @@ include_directories( ${CMAKE_SOURCE_DIR}/inc/lua ) -# Link directories (for -L.) and libraries from compile.bat +# Link directories (for -L.) and libraries from build.bat link_directories( ${CMAKE_SOURCE_DIR} ) # Safe DLL add_library(BlockLua SHARED src/bllua4.cpp) -# Ensure output name matches compile.bat +# Ensure output name matches build.bat set_target_properties(BlockLua PROPERTIES OUTPUT_NAME "BlockLua") # Linker flags and libraries if(MSVC) diff --git a/make.bat b/build.bat similarity index 86% rename from make.bat rename to build.bat index 1884ee2..3025f37 100644 --- a/make.bat +++ b/build.bat @@ -1,7 +1,7 @@ @echo off cd /d %~dp0 -REM Ensure MinGW32 toolchain is first in PATH (matches compile.bat) +REM Ensure MinGW32 toolchain is first in PATH set "PATH=C:\msys64\mingw32\bin;%PATH%" REM Configure CMake (generate into build/) diff --git a/compile.bat b/compile.bat deleted file mode 100644 index 660075f..0000000 --- a/compile.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off -cd /d %~dp0 - -set "PATH=C:\msys64\mingw32\bin;%PATH%" - -if not exist build mkdir build - -set buildargs=-Wall -Werror -m32 -shared -Isrc -Iinc/tsfuncs -Iinc/lua -lpsapi -L. -llua5.1 -static-libgcc -static-libstdc++ - -echo on -g++ src/bllua4.cpp %buildargs% -o build\BlockLua.dll -g++ -DBLLUA_UNSAFE src/bllua4.cpp %buildargs% -o build\BlockLua-Unsafe.dll -@echo off diff --git a/compiling.md b/compiling.md index d49d0d4..8bf75dd 100644 --- a/compiling.md +++ b/compiling.md @@ -27,7 +27,7 @@ What these packages are for: - Run the script: ```powershell -compile.bat +build.bat ``` What the script does: