summaryrefslogtreecommitdiff
path: root/scripts/build_dev.bat
diff options
context:
space:
mode:
authorIndrajith K L2025-11-10 01:58:00 +0530
committerIndrajith K L2025-11-10 01:58:25 +0530
commitd9d1a8a51ea7cd7e7076724918008b6adb1302ca (patch)
tree59a8f258c9bb4db4edafc2c70993319e3c3c859c /scripts/build_dev.bat
parent8c9367f3689aee05d33fc1cae8a5d1aa6d2b5fb8 (diff)
downloadreilua-enhanced-d9d1a8a51ea7cd7e7076724918008b6adb1302ca.tar.gz
reilua-enhanced-d9d1a8a51ea7cd7e7076724918008b6adb1302ca.tar.bz2
reilua-enhanced-d9d1a8a51ea7cd7e7076724918008b6adb1302ca.zip
Add flexible module loading and complete file embedding
- Support any folder structure (no hard-coded folders) - Embed all file types recursively from any folder - Fix require() dot-to-slash conversion for embedded modules - Clean build folder for fresh builds every time - Generate empty headers for Lua-only projects Backward compatible with existing projects.
Diffstat (limited to 'scripts/build_dev.bat')
-rw-r--r--scripts/build_dev.bat54
1 files changed, 10 insertions, 44 deletions
diff --git a/scripts/build_dev.bat b/scripts/build_dev.bat
index 40f394e..a1995d6 100644
--- a/scripts/build_dev.bat
+++ b/scripts/build_dev.bat
@@ -18,60 +18,25 @@ if errorlevel 1 (
exit /b 1
)
-REM Clean old embedded files (important for dev builds!)
-echo Cleaning old embedded files...
-del /Q embedded_main.h embedded_assets.h 2>nul
-
-REM Warn about Lua files in build directory
-dir /b *.lua >nul 2>&1
-if not errorlevel 1 (
- echo.
- echo WARNING: Found Lua files in build directory!
- echo Development builds should load from file system, not embed.
- echo.
- dir /b *.lua
- echo.
- set /p REMOVE="Remove these files from build directory? (Y/n): "
- if /i not "%REMOVE%"=="n" (
- del /Q *.lua
- echo Lua files removed.
- )
- echo.
-)
-
-REM Warn about assets folder in build directory
-if exist "assets" (
- echo.
- echo WARNING: Found assets folder in build directory!
- echo Development builds should load from file system, not embed.
- echo.
- set /p REMOVE="Remove assets folder from build directory? (Y/n): "
- if /i not "%REMOVE%"=="n" (
- rmdir /S /Q assets
- echo Assets folder removed.
- )
- echo.
-)
-
-REM Clean old configuration if requested
-if "%1"=="clean" (
- echo Cleaning build directory...
- del /Q CMakeCache.txt *.o *.a 2>nul
- rmdir /S /Q CMakeFiles 2>nul
- echo Clean complete!
- echo.
-)
+REM ALWAYS clean build folder for fresh build
+echo Cleaning build directory for fresh build...
+del /Q /S * >nul 2>&1
+for /d %%p in (*) do rmdir "%%p" /s /q >nul 2>&1
+echo * Build directory cleaned
+echo.
-REM Configure with MinGW
+REM Configure
echo Configuring CMake for development...
cmake -G "MinGW Makefiles" ..
if errorlevel 1 (
echo.
echo ERROR: CMake configuration failed!
+ pause
exit /b 1
)
+REM Build
echo.
echo Building ReiLua...
mingw32-make
@@ -79,6 +44,7 @@ mingw32-make
if errorlevel 1 (
echo.
echo ERROR: Build failed!
+ pause
exit /b 1
)