mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
feat: add multi-platform Docker build system for Linux, macOS, and Windows
Replace the single Ubuntu-based container build with a dedicated Dockerfile, build script, and launcher for each target platform. Infrastructure: - Add .dockerignore to minimize Docker build context - Add container/builder-linux.Dockerfile (Ubuntu 24.04, GCC, native build) - Add container/builder-macos.Dockerfile (multi-stage: SDK fetcher + osxcross/Clang 18) - Add container/builder-windows.Dockerfile (LLVM-MinGW 20240619, vcpkg) - Add container/macos/sdk-fetcher.py (auto-fetch macOS SDK from Apple catalog) - Add container/macos/osxcross-toolchain.cmake (auto-detecting CMake toolchain) - Add container/macos/triplets/arm64-osx-cross.cmake - Add container/macos/triplets/x64-osx-cross.cmake - Remove container/builder-ubuntu.Dockerfile (replaced by per-platform Dockerfiles) - Remove container/build-in-container.sh and container/build-wowee.sh (replaced) Build scripts (run inside containers): - Add container/build-linux.sh (tar copy, FidelityFX clone, cmake/ninja) - Add container/build-macos.sh (arch detection, vcpkg triplet, cross-compile) - Add container/build-windows.sh (Vulkan import lib via dlltool, cross-compile) Launcher scripts (run on host): - Add container/run-linux.sh, run-macos.sh, run-windows.sh (bash) - Add container/run-linux.ps1, run-macos.ps1, run-windows.ps1 (PowerShell) Documentation: - Add container/README.md (quick start, options, file structure, troubleshooting) - Add container/FLOW.md (comprehensive build flow for each platform) CMake changes: - Add macOS cross-compile support (VulkanHeaders, -undefined dynamic_lookup) - Add LLVM-MinGW/Windows cross-compile support - Detect osxcross toolchain and vcpkg triplets Other: - Update vcpkg.json with ffmpeg feature flags - Update resources/wowee.rc version string
This commit is contained in:
parent
c1c28d4216
commit
85f8d05061
25 changed files with 1881 additions and 74 deletions
62
container/build-linux.sh
Executable file
62
container/build-linux.sh
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
# Linux amd64 build entrypoint — runs INSIDE the linux container.
|
||||
# Bind-mounts:
|
||||
# /src (ro) — project source
|
||||
# /out (rw) — host ./build/linux
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SRC=/src
|
||||
OUT=/out
|
||||
NPROC=$(nproc)
|
||||
|
||||
echo "==> [linux] Copying source tree..."
|
||||
tar -C "${SRC}" \
|
||||
--exclude='./build' --exclude='./logs' --exclude='./cache' \
|
||||
--exclude='./container' --exclude='./.git' \
|
||||
--exclude='./Data/character' --exclude='./Data/creature' \
|
||||
--exclude='./Data/db' --exclude='./Data/environment' \
|
||||
--exclude='./Data/interface' --exclude='./Data/item' \
|
||||
--exclude='./Data/misc' --exclude='./Data/sound' \
|
||||
--exclude='./Data/spell' --exclude='./Data/terrain' \
|
||||
--exclude='./Data/world' \
|
||||
-cf - . | tar -C /wowee-build-src -xf -
|
||||
|
||||
cd /wowee-build-src
|
||||
|
||||
echo "==> [linux] Fetching external SDKs (if needed)..."
|
||||
if [ ! -f extern/FidelityFX-FSR2/src/ffx-fsr2-api/ffx_fsr2.h ]; then
|
||||
git clone --depth 1 \
|
||||
https://github.com/GPUOpen-Effects/FidelityFX-FSR2.git \
|
||||
extern/FidelityFX-FSR2 || echo "Warning: FSR2 clone failed — continuing without FSR2"
|
||||
fi
|
||||
|
||||
SDK_REPO="${WOWEE_FFX_SDK_REPO:-https://github.com/Kelsidavis/FidelityFX-SDK.git}"
|
||||
SDK_REF="${WOWEE_FFX_SDK_REF:-main}"
|
||||
if [ ! -f "extern/FidelityFX-SDK/sdk/include/FidelityFX/host/ffx_frameinterpolation.h" ]; then
|
||||
git clone --depth 1 --branch "${SDK_REF}" "${SDK_REPO}" extern/FidelityFX-SDK \
|
||||
|| echo "Warning: FidelityFX-SDK clone failed — continuing without FSR3"
|
||||
fi
|
||||
|
||||
echo "==> [linux] Configuring with CMake (Release, Ninja, amd64)..."
|
||||
cmake -S . -B "${OUT}" \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER=gcc \
|
||||
-DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
|
||||
|
||||
echo "==> [linux] Building with ${NPROC} cores..."
|
||||
cmake --build "${OUT}" --parallel "${NPROC}"
|
||||
|
||||
echo "==> [linux] Creating Data symlink..."
|
||||
mkdir -p "${OUT}/bin"
|
||||
if [ ! -e "${OUT}/bin/Data" ]; then
|
||||
# Relative symlink so it resolves correctly on the host:
|
||||
# build/linux/bin/Data -> ../../../Data (project root)
|
||||
ln -s ../../../Data "${OUT}/bin/Data"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> [linux] Build complete. Artifacts in: ./build/linux/"
|
||||
echo " Binary: ./build/linux/bin/wowee"
|
||||
Loading…
Add table
Add a link
Reference in a new issue