summaryrefslogtreecommitdiff
path: root/build_dev.bat
diff options
context:
space:
mode:
authorIndrajith K L2025-11-03 18:11:34 +0530
committerIndrajith K L2025-11-03 18:11:34 +0530
commit4859c415cc7c2274a642b045ff3016b7aae3dbd1 (patch)
tree7be4f439426874fc0207de87261c955f209b0498 /build_dev.bat
parentf4d927aac0f5ce13eca3bc57595d71827b40e657 (diff)
downloadreilua-enhanced-4859c415cc7c2274a642b045ff3016b7aae3dbd1.tar.gz
reilua-enhanced-4859c415cc7c2274a642b045ff3016b7aae3dbd1.tar.bz2
reilua-enhanced-4859c415cc7c2274a642b045ff3016b7aae3dbd1.zip
Add build scripts and Windows icon/resources
Added: - build_dev.bat / build_dev.sh - Development build scripts - build_release.bat / build_release.sh - Release build scripts with embedding - icon.ico - Default Windows icon for executable - resources.rc - Windows resource file for icon and exe metadata - BUILD_SCRIPTS.md - Complete documentation for build scripts Features: - Automated development builds (no embedding, fast iteration) - Automated release builds (with Lua and asset embedding) - Interactive verification and cleanup - Custom icon and version info in Windows executables - Cross-platform scripts (Windows .bat and Unix .sh) - Safety checks and helpful messages The build scripts provide one-command building for both development and release workflows, with clear instructions and progress feedback.
Diffstat (limited to 'build_dev.bat')
-rw-r--r--build_dev.bat100
1 files changed, 100 insertions, 0 deletions
diff --git a/build_dev.bat b/build_dev.bat
new file mode 100644
index 0000000..c1d79d2
--- /dev/null
+++ b/build_dev.bat
@@ -0,0 +1,100 @@
+@echo off
+REM ReiLua Development Build Script
+REM Run this from w64devkit shell or CMD with MinGW in PATH
+
+echo ================================
+echo ReiLua - Development Build
+echo ================================
+echo.
+
+REM Navigate to build directory
+cd build
+if errorlevel 1 (
+ echo ERROR: Cannot access build directory
+ 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 Configure with MinGW
+echo Configuring CMake for development...
+cmake -G "MinGW Makefiles" ..
+
+if errorlevel 1 (
+ echo.
+ echo ERROR: CMake configuration failed!
+ exit /b 1
+)
+
+echo.
+echo Building ReiLua...
+mingw32-make
+
+if errorlevel 1 (
+ echo.
+ echo ERROR: Build failed!
+ exit /b 1
+)
+
+echo.
+echo ================================
+echo Build Complete!
+echo ================================
+echo.
+echo Development build created successfully!
+echo.
+echo To run your game:
+echo cd \path\to\your\game
+echo \path\to\ReiLua\build\ReiLua.exe
+echo.
+echo To run with console logging:
+echo \path\to\ReiLua\build\ReiLua.exe --log
+echo.
+echo Features:
+echo - Lua files load from file system
+echo - Assets load from file system
+echo - Fast iteration - edit and reload
+echo.
+pause