Kelsidavis-WoWee/build.sh
Kelsi f66b9eb154 Fix macOS build process and make shell scripts cross-platform
- Add vulkan-loader, vulkan-headers, shaderc to macOS CI brew install
- Add vulkan-loader and shaderc to macOS PKG_CONFIG_PATH
- Replace Linux-only `nproc` with portable fallback in build.sh,
  rebuild.sh, extract_assets.sh, and tools/backup_assets.sh
- Replace `ldconfig` StormLib check with portable detection
  (ldconfig, pkg-config, brew lib) in extract_assets.sh
- Update BUILD_INSTRUCTIONS.md macOS section with vulkan/shaderc
  packages and MoltenVK explanation
- Add macOS prerequisites to README.md
2026-02-23 18:35:53 -08:00

32 lines
679 B
Bash
Executable file

#!/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
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
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"