mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 12:03:50 +00:00
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
67 lines
2.2 KiB
Docker
67 lines
2.2 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
# Windows cross-compile using LLVM-MinGW — best-in-class Clang/LLD toolchain
|
|
# targeting x86_64-w64-mingw32. Produces native .exe/.dll without MSVC or Wine.
|
|
# LLVM-MinGW ships: clang, clang++, lld, libc++ / libunwind headers, winpthreads.
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV LLVM_MINGW_VERSION=20240619
|
|
ENV LLVM_MINGW_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VERSION}/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-ubuntu-20.04-x86_64.tar.xz
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
build-essential \
|
|
cmake \
|
|
ninja-build \
|
|
git \
|
|
python3 \
|
|
curl \
|
|
zip \
|
|
unzip \
|
|
tar \
|
|
xz-utils \
|
|
pkg-config \
|
|
nasm \
|
|
libssl-dev \
|
|
zlib1g-dev && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install LLVM-MinGW toolchain
|
|
RUN curl -fsSL "${LLVM_MINGW_URL}" -o /tmp/llvm-mingw.tar.xz && \
|
|
tar -xf /tmp/llvm-mingw.tar.xz -C /opt && \
|
|
mv /opt/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-ubuntu-20.04-x86_64 /opt/llvm-mingw && \
|
|
rm /tmp/llvm-mingw.tar.xz
|
|
|
|
ENV PATH="/opt/llvm-mingw/bin:${PATH}"
|
|
|
|
# Windows dependencies via vcpkg (static, x64-mingw-static triplet)
|
|
ENV VCPKG_ROOT=/opt/vcpkg
|
|
RUN git clone --depth 1 https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}" && \
|
|
"${VCPKG_ROOT}/bootstrap-vcpkg.sh" -disableMetrics
|
|
|
|
ENV VCPKG_DEFAULT_TRIPLET=x64-mingw-static
|
|
RUN "${VCPKG_ROOT}/vcpkg" install \
|
|
sdl2[vulkan] \
|
|
openssl \
|
|
glew \
|
|
glm \
|
|
zlib \
|
|
ffmpeg \
|
|
--triplet x64-mingw-static
|
|
|
|
# Vulkan SDK headers (loader is linked statically via SDL2's vulkan surface)
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends libvulkan-dev glslang-tools && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Provide a no-op powershell.exe so vcpkg's MinGW applocal post-build hook
|
|
# exits cleanly. The x64-mingw-static triplet is fully static (no DLLs to
|
|
# copy), so the script has nothing to do — it just needs to not fail.
|
|
RUN printf '#!/bin/sh\nexit 0\n' > /usr/local/bin/powershell.exe && \
|
|
chmod +x /usr/local/bin/powershell.exe
|
|
|
|
COPY build-windows.sh /build-platform.sh
|
|
RUN chmod +x /build-platform.sh
|
|
|
|
ENTRYPOINT ["/build-platform.sh"]
|