summaryrefslogtreecommitdiff
path: root/build_dev.sh
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.sh
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.sh')
-rw-r--r--build_dev.sh96
1 files changed, 96 insertions, 0 deletions
diff --git a/build_dev.sh b/build_dev.sh
new file mode 100644
index 0000000..4383d36
--- /dev/null
+++ b/build_dev.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+# ReiLua Development Build Script
+# Run this from w64devkit shell
+
+echo "================================"
+echo "ReiLua - Development Build"
+echo "================================"
+echo ""
+
+# Navigate to build directory
+cd build || exit 1
+
+# Clean old embedded files (important for dev builds!)
+echo "Cleaning old embedded files..."
+rm -f embedded_main.h embedded_assets.h
+
+# Warn about Lua files in build directory
+LUA_COUNT=$(ls *.lua 2>/dev/null | wc -l)
+if [ "$LUA_COUNT" -gt 0 ]; then
+ echo ""
+ echo "WARNING: Found Lua files in build directory!"
+ echo "Development builds should load from file system, not embed."
+ echo ""
+ ls -1 *.lua
+ echo ""
+ read -p "Remove these files from build directory? (Y/n): " -n 1 -r
+ echo ""
+ if [[ ! $REPLY =~ ^[Nn]$ ]]; then
+ rm -f *.lua
+ echo "Lua files removed."
+ fi
+ echo ""
+fi
+
+# Warn about assets folder in build directory
+if [ -d "assets" ]; then
+ echo ""
+ echo "WARNING: Found assets folder in build directory!"
+ echo "Development builds should load from file system, not embed."
+ echo ""
+ read -p "Remove assets folder from build directory? (Y/n): " -n 1 -r
+ echo ""
+ if [[ ! $REPLY =~ ^[Nn]$ ]]; then
+ rm -rf assets
+ echo "Assets folder removed."
+ fi
+ echo ""
+fi
+
+# Clean old configuration if requested
+if [ "$1" == "clean" ]; then
+ echo "Cleaning build directory..."
+ rm -rf CMakeCache.txt CMakeFiles/ *.o *.a
+ echo "Clean complete!"
+ echo ""
+fi
+
+# Configure with MinGW
+echo "Configuring CMake for development..."
+cmake -G "MinGW Makefiles" ..
+
+if [ $? -ne 0 ]; then
+ echo ""
+ echo "ERROR: CMake configuration failed!"
+ exit 1
+fi
+
+echo ""
+echo "Building ReiLua..."
+make
+
+if [ $? -ne 0 ]; then
+ echo ""
+ echo "ERROR: Build failed!"
+ exit 1
+fi
+
+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 ""