From 279587cb16ff75851223357d5aea6f7cf2e59040 Mon Sep 17 00:00:00 2001 From: Pouare514 Date: Sun, 27 Sep 2026 12:57:23 +0200 Subject: [PATCH] fix(libcohtml): provide libcohtml.Prospero.prx for DT_NEEDED Copy the patched libcohtml.prx to libcohtml.Prospero.prx (exact DT_NEEDED name) via a post-build copy in the module CMakeLists, wired into the libs umbrella target. OUTPUT_NAME with a dot was rejected: the parent pipeline derives unpatched/patched paths from the directory target name, so renaming output would break it; dotted CMake target names are supported (e.g. libSceSaveData.native) but the parent-owned NID-patch rule is kept untouched. Adds DEPLOY.md deploy note. All 50 raw NIDs re-verified in the renamed file export table. --- core/libs/prx/libcohtml/CMakeLists.txt | 13 +++++++++++++ core/libs/prx/libcohtml/DEPLOY.md | 16 ++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 core/libs/prx/libcohtml/DEPLOY.md diff --git a/core/libs/prx/libcohtml/CMakeLists.txt b/core/libs/prx/libcohtml/CMakeLists.txt index 842799d34..f32848eb2 100644 --- a/core/libs/prx/libcohtml/CMakeLists.txt +++ b/core/libs/prx/libcohtml/CMakeLists.txt @@ -4,3 +4,16 @@ add_library(libcohtml SHARED EXCLUDE_FROM_ALL target_include_directories(libcohtml PRIVATE ${LIBS_INCLUDE_DIR}) set_target_properties(libcohtml PROPERTIES CXX_EXTENSIONS OFF) configure_windows_unwind(libcohtml) + +set(LIBCOHTML_PATCHED ${PATCHED_DIR}/libcohtml.prx) +set(LIBCOHTML_PROSPERO_PATCHED ${PATCHED_DIR}/libcohtml.Prospero.prx) +add_custom_command( + OUTPUT ${LIBCOHTML_PROSPERO_PATCHED} + COMMAND ${CMAKE_COMMAND} -E copy ${LIBCOHTML_PATCHED} ${LIBCOHTML_PROSPERO_PATCHED} + DEPENDS ${LIBCOHTML_PATCHED} + COMMENT "Providing libcohtml.Prospero.prx for DT_NEEDED" + VERBATIM +) +add_custom_target(libcohtml_prospero DEPENDS ${LIBCOHTML_PROSPERO_PATCHED}) +list(APPEND PATCHED_OUTPUTS ${LIBCOHTML_PROSPERO_PATCHED}) +set(PATCHED_OUTPUTS ${PATCHED_OUTPUTS} PARENT_SCOPE) diff --git a/core/libs/prx/libcohtml/DEPLOY.md b/core/libs/prx/libcohtml/DEPLOY.md new file mode 100644 index 000000000..de4c3ffea --- /dev/null +++ b/core/libs/prx/libcohtml/DEPLOY.md @@ -0,0 +1,16 @@ +# libcohtml — deploy note + +Game `DT_NEEDED` expects exactly: `libcohtml.Prospero.prx`. + +Copy next to the relinked eboot (same directory): + +- `build/core/libs/libs/libcohtml.Prospero.prx` (patched build output, 50 NIDs) — required. +- `libgcc_s_seh-1.dll`, `libstdc++-6.dll`, `libwinpthread-1.dll` from `winlibs-gcc15/mingw64/bin` — required on Windows (see `docs/TechnicalDebt.md`). + +Do NOT deploy: + +- `libcohtml.prx` (build intermediate kept for the NID-patch pipeline, wrong `DT_NEEDED` name). +- Anything under `build/core/libs/libs/unpatched/` (NIDs not patched). +- `libc.prx` / `libkernel.prx` are not runtime imports of this module (no such DLL dependency); the game may need its other modules separately (out of scope). + +Scope: raw-NID stubs only; real Cohtml rendering stays out of scope.