chore: fix build scripts to create build directory and update gitignore
- Update all build scripts (.sh and .bat) to automatically create build directory if it doesn't exist - Fix 'can't cd to build' error that occurred when build directory was missing - Update .gitignore to exclude build artifacts and IDE files - Add proper navigation to project root in build_dev.bat for consistency
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
.vscode
|
.vscode
|
||||||
|
build/
|
||||||
@@ -7,7 +7,11 @@ echo ReiLua - Development Build
|
|||||||
echo ================================
|
echo ================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
REM Navigate to build directory
|
REM Get script directory and navigate to project root
|
||||||
|
cd /d "%~dp0.."
|
||||||
|
|
||||||
|
REM Create and navigate to build directory
|
||||||
|
if not exist "build" mkdir build
|
||||||
cd build
|
cd build
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo ERROR: Cannot access build directory
|
echo ERROR: Cannot access build directory
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ echo "ReiLua - Development Build"
|
|||||||
echo "================================"
|
echo "================================"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Navigate to build directory
|
# Get the script directory and navigate to project root
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
cd "$SCRIPT_DIR/.." || exit 1
|
||||||
|
|
||||||
|
# Create and navigate to build directory
|
||||||
|
mkdir -p build
|
||||||
cd build || exit 1
|
cd build || exit 1
|
||||||
|
|
||||||
# Clean old embedded files (important for dev builds!)
|
# Clean old embedded files (important for dev builds!)
|
||||||
|
|||||||
@@ -7,13 +7,17 @@ echo ReiLua - Release Build
|
|||||||
echo ================================
|
echo ================================
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
|
REM Get script directory and navigate to project root
|
||||||
|
cd /d "%~dp0.."
|
||||||
|
|
||||||
REM Check if we're in the right directory
|
REM Check if we're in the right directory
|
||||||
if not exist "CMakeLists.txt" (
|
if not exist "CMakeLists.txt" (
|
||||||
echo ERROR: Please run this script from the ReiLua root directory
|
echo ERROR: Cannot find CMakeLists.txt in project root
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
REM Navigate to build directory
|
REM Create and navigate to build directory
|
||||||
|
if not exist "build" mkdir build
|
||||||
cd build
|
cd build
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo ERROR: Cannot access build directory
|
echo ERROR: Cannot access build directory
|
||||||
|
|||||||
@@ -7,13 +7,18 @@ echo "ReiLua - Release Build"
|
|||||||
echo "================================"
|
echo "================================"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# Get the script directory and navigate to project root
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
cd "$SCRIPT_DIR/.." || exit 1
|
||||||
|
|
||||||
# Check if we're in the right directory
|
# Check if we're in the right directory
|
||||||
if [ ! -f "CMakeLists.txt" ]; then
|
if [ ! -f "CMakeLists.txt" ]; then
|
||||||
echo "ERROR: Please run this script from the ReiLua root directory"
|
echo "ERROR: Cannot find CMakeLists.txt in project root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Navigate to build directory
|
# Create and navigate to build directory
|
||||||
|
mkdir -p build
|
||||||
cd build || exit 1
|
cd build || exit 1
|
||||||
|
|
||||||
# Clean old embedded files
|
# Clean old embedded files
|
||||||
|
|||||||
Reference in New Issue
Block a user