From 76d29ad66955054ea3093e7bda7731950054049a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 30 Mar 2026 13:40:40 -0700 Subject: [PATCH] fix: address PR #31 and #32 review findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dockerfile: fix LLVM apt repo codename (jammy → noble) for ubuntu:24.04 - build-linux.sh: add missing mkdir -p /wowee-build-src before tar extraction - Dockerfile: remove dead ENV OSXCROSS_VERSION=1.5 and its unset - CMakeLists: scope -undefined dynamic_lookup to wowee target only - GameServices: remove redundant game:: qualifier inside namespace game - application.cpp: zero out gameServices_ after gameHandler reset in shutdown --- CMakeLists.txt | 7 ++++++- container/build-linux.sh | 1 + container/builder-macos.Dockerfile | 4 +--- include/game/game_services.hpp | 2 +- src/core/application.cpp | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c13547b1..af8a30fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,7 +338,7 @@ endif() # macOS cross-compilation: the Vulkan loader (MoltenVK) is not available at link # time. Allow unresolved Vulkan symbols — they are resolved at runtime. if(CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Darwin") - add_link_options("-undefined" "dynamic_lookup") + set(WOWEE_MACOS_CROSS_COMPILE TRUE) endif() # GL/GLEW kept temporarily for unconverted sub-renderers during Vulkan migration. # These files compile against GL types but their code is never called — the Vulkan @@ -783,6 +783,11 @@ add_executable(wowee ${WOWEE_SOURCES} ${WOWEE_HEADERS} ${WOWEE_PLATFORM_SOURCES} if(TARGET opcodes-generate) add_dependencies(wowee opcodes-generate) endif() +# macOS cross-compilation: MoltenVK is not available at link time. +# Allow unresolved Vulkan symbols — resolved at runtime. Scoped to wowee only. +if(WOWEE_MACOS_CROSS_COMPILE) + target_link_options(wowee PRIVATE "-undefined" "dynamic_lookup") +endif() # FidelityFX-SDK headers can trigger compiler-specific pragma/unused-static noise # when included through the runtime bridge; keep suppression scoped to that TU. diff --git a/container/build-linux.sh b/container/build-linux.sh index e16cae11..a87b5e03 100755 --- a/container/build-linux.sh +++ b/container/build-linux.sh @@ -11,6 +11,7 @@ OUT=/out NPROC=$(nproc) echo "==> [linux] Copying source tree..." +mkdir -p /wowee-build-src tar -C "${SRC}" \ --exclude='./build' --exclude='./logs' --exclude='./cache' \ --exclude='./container' --exclude='./.git' \ diff --git a/container/builder-macos.Dockerfile b/container/builder-macos.Dockerfile index fec9afaf..cb3dcb9f 100644 --- a/container/builder-macos.Dockerfile +++ b/container/builder-macos.Dockerfile @@ -32,7 +32,6 @@ FROM ubuntu:24.04 AS builder # Default: arm64. Override with MACOS_ARCH=x86_64 env var at run time. ENV DEBIAN_FRONTEND=noninteractive -ENV OSXCROSS_VERSION=1.5 RUN apt-get update && \ apt-get install -y --no-install-recommends \ @@ -61,7 +60,7 @@ RUN apt-get update && \ gnupg \ software-properties-common && \ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ - echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" > /etc/apt/sources.list.d/llvm-18.list && \ + echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main" > /etc/apt/sources.list.d/llvm-18.list && \ apt-get update && \ apt-get install -y --no-install-recommends \ clang-18 \ @@ -81,7 +80,6 @@ COPY --from=sdk-fetcher /opt/sdk/ /opt/osxcross/tarballs/ ENV MACOSX_DEPLOYMENT_TARGET=13.0 RUN cd /opt/osxcross && \ - unset OSXCROSS_VERSION && \ UNATTENDED=1 ./build.sh && \ rm -rf /opt/osxcross/build /opt/osxcross/tarballs diff --git a/include/game/game_services.hpp b/include/game/game_services.hpp index 080fe0b0..e01f4487 100644 --- a/include/game/game_services.hpp +++ b/include/game/game_services.hpp @@ -14,7 +14,7 @@ namespace game { struct GameServices { rendering::Renderer* renderer = nullptr; pipeline::AssetManager* assetManager = nullptr; - game::ExpansionRegistry* expansionRegistry = nullptr; + ExpansionRegistry* expansionRegistry = nullptr; uint32_t gryphonDisplayId = 0; uint32_t wyvernDisplayId = 0; }; diff --git a/src/core/application.cpp b/src/core/application.cpp index 4e673807..4bf1a4c2 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -921,6 +921,7 @@ void Application::shutdown() { world.reset(); LOG_WARNING("Resetting gameHandler..."); gameHandler.reset(); + gameServices_ = {}; LOG_WARNING("Resetting authHandler..."); authHandler.reset(); LOG_WARNING("Resetting assetManager...");