From bf03044a6348715801c2e71137d0962a3bd94f67 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Feb 2026 01:24:49 -0800 Subject: [PATCH] Add build scripts for incremental and clean builds - 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. --- build.sh | 31 +++++++++++++++++++++++++++++++ rebuild.sh | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100755 build.sh create mode 100755 rebuild.sh diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..233be10a --- /dev/null +++ b/build.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Wowee Build Script - Ensures no stale binaries + +set -e # Exit on error + +cd "$(dirname "$0")" + +echo "Building wowee..." + +# Create build directory if it doesn't exist +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) + +# Ensure Data symlink exists in bin directory +cd bin +if [ ! -e Data ]; then + ln -s ../../Data Data +fi +cd .. + +echo "" +echo "Build complete! Binary: build/bin/wowee" +echo "Run with: cd build/bin && ./wowee" diff --git a/rebuild.sh b/rebuild.sh new file mode 100755 index 00000000..601a3279 --- /dev/null +++ b/rebuild.sh @@ -0,0 +1,39 @@ +#!/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"