mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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
This commit is contained in:
parent
eb549a9b7a
commit
f66b9eb154
7 changed files with 42 additions and 13 deletions
|
|
@ -63,10 +63,19 @@ fi
|
|||
# --- Build asset_extract if needed ---
|
||||
if [ ! -f "$BINARY" ]; then
|
||||
# --- Check for StormLib (only required to build) ---
|
||||
if ! ldconfig -p 2>/dev/null | grep -qi stormlib; then
|
||||
STORMLIB_FOUND=false
|
||||
if ldconfig -p 2>/dev/null | grep -qi stormlib; then
|
||||
STORMLIB_FOUND=true
|
||||
elif pkg-config --exists stormlib 2>/dev/null; then
|
||||
STORMLIB_FOUND=true
|
||||
elif [ -f "$(brew --prefix 2>/dev/null)/lib/libstorm.dylib" ] 2>/dev/null; then
|
||||
STORMLIB_FOUND=true
|
||||
fi
|
||||
if [ "$STORMLIB_FOUND" = false ]; then
|
||||
echo "Error: StormLib not found."
|
||||
echo "Install it with: sudo apt install libstormlib-dev"
|
||||
echo " or build from source: https://github.com/ladislav-zezula/StormLib"
|
||||
echo " Ubuntu/Debian: sudo apt install libstormlib-dev"
|
||||
echo " macOS: brew install stormlib"
|
||||
echo " From source: https://github.com/ladislav-zezula/StormLib"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -74,7 +83,8 @@ if [ ! -f "$BINARY" ]; then
|
|||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
cmake -S "$SCRIPT_DIR" -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=Release
|
||||
fi
|
||||
cmake --build "$BUILD_DIR" --target asset_extract -- -j"$(nproc)"
|
||||
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
|
||||
cmake --build "$BUILD_DIR" --target asset_extract -- -j"$NPROC"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue