summaryrefslogtreecommitdiff
path: root/scripts/build_dev.sh
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.sh
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.sh')
-rwxr-xr-xscripts/build_dev.sh46
1 files changed, 6 insertions, 40 deletions
diff --git a/scripts/build_dev.sh b/scripts/build_dev.sh
index 5912bb0..914df21 100755
--- a/scripts/build_dev.sh
+++ b/scripts/build_dev.sh
@@ -62,49 +62,15 @@ fi
mkdir -p build
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
+# ALWAYS clean build folder for fresh build
+echo "Cleaning build directory for fresh build..."
+rm -rf ./* 2>/dev/null
+echo "✓ Build directory cleaned"
+echo ""
# Clean old configuration if requested
if [ "$1" == "clean" ]; then
- echo "Cleaning build directory..."
- rm -rf CMakeCache.txt CMakeFiles/ *.o *.a
- echo "Clean complete!"
- echo ""
+ echo "Extra clean flag detected (already cleaned)"
fi
# Detect platform and set appropriate generator