mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Fix macOS asset extraction auto-build and docs
- extract_assets.sh: detect Homebrew and pass CMAKE_PREFIX_PATH, OPENSSL_ROOT_DIR, and PKG_CONFIG_PATH when auto-building on macOS (bare cmake couldn't find Homebrew deps) - README.md: fix macOS brew command that had comments after line continuations (breaks shell execution) - BUILD_INSTRUCTIONS.md: expand macOS asset extraction section with auto-build note and expansion targets
This commit is contained in:
parent
f66b9eb154
commit
685736fa16
3 changed files with 21 additions and 3 deletions
|
|
@ -95,10 +95,15 @@ cmake --build build -j"$(sysctl -n hw.logicalcpu)"
|
||||||
|
|
||||||
### Asset Extraction (macOS)
|
### Asset Extraction (macOS)
|
||||||
|
|
||||||
|
The script will auto-build `asset_extract` if needed (requires `stormlib`).
|
||||||
|
It automatically detects Homebrew and passes the correct paths to CMake.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./extract_assets.sh /path/to/WoW/Data wotlk
|
./extract_assets.sh /path/to/WoW/Data wotlk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Supports `classic`, `tbc`, `wotlk` targets (auto-detected if omitted).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🪟 Windows (MSYS2 — Recommended)
|
## 🪟 Windows (MSYS2 — Recommended)
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,10 @@ sudo pacman -S sdl2 glm openssl \
|
||||||
# macOS (Homebrew)
|
# macOS (Homebrew)
|
||||||
brew install cmake pkg-config sdl2 glew glm openssl@3 zlib ffmpeg \
|
brew install cmake pkg-config sdl2 glew glm openssl@3 zlib ffmpeg \
|
||||||
vulkan-loader vulkan-headers shaderc \
|
vulkan-loader vulkan-headers shaderc \
|
||||||
unicorn \ # optional: Warden module execution
|
unicorn \
|
||||||
stormlib # optional: asset_extract tool
|
stormlib
|
||||||
|
# unicorn is optional (Warden module execution)
|
||||||
|
# stormlib is optional (asset_extract tool)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Container build
|
### Container build
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,18 @@ if [ ! -f "$BINARY" ]; then
|
||||||
|
|
||||||
echo "Building asset_extract..."
|
echo "Building asset_extract..."
|
||||||
if [ ! -d "$BUILD_DIR" ]; then
|
if [ ! -d "$BUILD_DIR" ]; then
|
||||||
cmake -S "$SCRIPT_DIR" -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=Release
|
CMAKE_EXTRA_ARGS=()
|
||||||
|
# On macOS, Homebrew installs to a non-default prefix that CMake
|
||||||
|
# can't find automatically — pass it explicitly.
|
||||||
|
if command -v brew &>/dev/null; then
|
||||||
|
BREW="$(brew --prefix)"
|
||||||
|
CMAKE_EXTRA_ARGS+=(
|
||||||
|
"-DCMAKE_PREFIX_PATH=$BREW"
|
||||||
|
"-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@3)"
|
||||||
|
)
|
||||||
|
export PKG_CONFIG_PATH="$BREW/lib/pkgconfig:$(brew --prefix ffmpeg)/lib/pkgconfig:$(brew --prefix openssl@3)/lib/pkgconfig:$(brew --prefix vulkan-loader 2>/dev/null)/lib/pkgconfig:$(brew --prefix shaderc 2>/dev/null)/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||||
|
fi
|
||||||
|
cmake -S "$SCRIPT_DIR" -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=Release "${CMAKE_EXTRA_ARGS[@]}"
|
||||||
fi
|
fi
|
||||||
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
|
NPROC=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || echo 4)
|
||||||
cmake --build "$BUILD_DIR" --target asset_extract -- -j"$NPROC"
|
cmake --build "$BUILD_DIR" --target asset_extract -- -j"$NPROC"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue