mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
- build.sh: incremental build with auto Data symlink creation - rebuild.sh: clean rebuild (rm -rf build) for troubleshooting Both scripts use all available CPU cores and ensure Data symlink exists in bin directory for runtime asset access.
39 lines
830 B
Bash
Executable file
39 lines
830 B
Bash
Executable file
#!/bin/bash
|
|
# Wowee Clean Rebuild Script - Removes all build artifacts and rebuilds from scratch
|
|
|
|
set -e # Exit on error
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "Clean rebuilding wowee..."
|
|
|
|
# Remove build directory completely
|
|
if [ -d "build" ]; then
|
|
echo "Removing old build directory..."
|
|
rm -rf build
|
|
fi
|
|
|
|
# Create fresh build directory
|
|
mkdir -p build
|
|
cd build
|
|
|
|
# Configure with cmake
|
|
echo "Configuring with CMake..."
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
|
|
|
# Build with all cores
|
|
echo "Building with $(nproc) cores..."
|
|
cmake --build . --parallel $(nproc)
|
|
|
|
# Create Data symlink in bin directory
|
|
echo "Creating Data symlink..."
|
|
cd bin
|
|
if [ ! -e Data ]; then
|
|
ln -s ../../Data Data
|
|
echo " Created Data -> ../../Data"
|
|
fi
|
|
cd ..
|
|
|
|
echo ""
|
|
echo "Clean build complete! Binary: build/bin/wowee"
|
|
echo "Run with: cd build/bin && ./wowee"
|