From 084d2d463985b4dcead0b24bcfeddc867d555a80 Mon Sep 17 00:00:00 2001 From: Matthew Stanley <1379tech@gmail.com> Date: Wed, 5 Aug 2026 10:48:09 -0700 Subject: [PATCH] mods: clear the staged catalog before restaging it copy_directory merges, so a mod package deleted from source survived in the build output indefinitely -- it kept showing on the Mods page and inflated the release packagers' catalog assertions (Tomba 2 found 7 manifests where 5 exist). Remove the staged tree first; this runs before the game's own POST_BUILD copy, so game and framework catalogs both land on a clean slate. Co-Authored-By: Claude Fable 5 --- runtime/runtime.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/runtime.cmake b/runtime/runtime.cmake index ec1f18a4..70d94d5f 100644 --- a/runtime/runtime.cmake +++ b/runtime/runtime.cmake @@ -801,6 +801,13 @@ function(psxrecomp_add_runtime_target target) # to; copy_directory merges rather than replacing the tree. if(EXISTS "${PSXRECOMP_ROOT}/mods/builtin/packages") add_custom_command(TARGET ${target} POST_BUILD + # Clear first: copy_directory MERGES, so a mod deleted from source + # would otherwise survive in the build output forever and keep + # appearing on the Mods page (and inflate the release packagers' + # catalog assertions). This runs before the game's own staging, so + # both catalogs land on a clean slate. + COMMAND ${CMAKE_COMMAND} -E rm -rf + "$/mods" COMMAND ${CMAKE_COMMAND} -E copy_directory "${PSXRECOMP_ROOT}/mods/builtin" "$/mods"