diff --git a/CMakeLists.txt b/CMakeLists.txt index febf00f..5fee0d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ endif() include(PanoPainterWarnings) include(PanoPainterSources) include(PanoPainterVersion) +include(PanoPainterRuntime) if(PP_ENABLE_CLANG_TIDY) find_program(PP_CLANG_TIDY_EXE NAMES clang-tidy) @@ -305,26 +306,7 @@ if(PP_BUILD_APP) pp_add_version_generation(PanoPainter "$,debug,release>") - add_custom_command(TARGET PanoPainter POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_directory - "${CMAKE_CURRENT_SOURCE_DIR}/data" - "$/data" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "${CMAKE_CURRENT_SOURCE_DIR}/libs/bugtrap-client/lib/BugTrapU-x64.dll" - "$/BugTrapU-x64.dll" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "$<$:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-debug-x64/libcurl_debug.dll>$<$>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-release-x64/libcurl.dll>" - "$/" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "${CMAKE_CURRENT_SOURCE_DIR}/libs/libyuv/lib/win/libyuv.dll" - "$/libyuv.dll" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "${CMAKE_CURRENT_SOURCE_DIR}/libs/mp4v2/lib/win/libmp4v2.dll" - "$/libmp4v2.dll" - COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "${CMAKE_CURRENT_SOURCE_DIR}/libs/openh264/lib/openh264-2.0.0-win64.dll" - "$/openh264-2.0.0-win64.dll" - VERBATIM) + pp_configure_windows_runtime_payloads(PanoPainter) else() message(WARNING "PP_BUILD_APP is enabled, but the root CMake app target is currently Windows-only. Platform alignment is tracked in Phase 6.") endif() diff --git a/cmake/PanoPainterRuntime.cmake b/cmake/PanoPainterRuntime.cmake new file mode 100644 index 0000000..fcdc5e4 --- /dev/null +++ b/cmake/PanoPainterRuntime.cmake @@ -0,0 +1,26 @@ +function(pp_configure_windows_runtime_payloads target_name) + if(NOT TARGET "${target_name}") + message(FATAL_ERROR "pp_configure_windows_runtime_payloads target does not exist: ${target_name}") + endif() + + add_custom_command(TARGET "${target_name}" POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${CMAKE_CURRENT_SOURCE_DIR}/data" + "$/data" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/libs/bugtrap-client/lib/BugTrapU-x64.dll" + "$/BugTrapU-x64.dll" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "$<$:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-debug-x64/libcurl_debug.dll>$<$>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-release-x64/libcurl.dll>" + "$/" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/libs/libyuv/lib/win/libyuv.dll" + "$/libyuv.dll" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/libs/mp4v2/lib/win/libmp4v2.dll" + "$/libmp4v2.dll" + COMMAND "${CMAKE_COMMAND}" -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/libs/openh264/lib/openh264-2.0.0-win64.dll" + "$/openh264-2.0.0-win64.dll" + VERBATIM) +endfunction() diff --git a/docs/modernization/build-inventory.md b/docs/modernization/build-inventory.md index 4d2e408..0812546 100644 --- a/docs/modernization/build-inventory.md +++ b/docs/modernization/build-inventory.md @@ -10,7 +10,7 @@ Keep it updated as platform paths move to shared CMake targets. | Platform/Target | Current Entrypoint | Notes | | --- | --- | --- | -| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell | +| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell and runtime payload deployment in `cmake/PanoPainterRuntime.cmake` | | Windows AppX | `PanoPainterPackage/Package.appxmanifest`, `.wapproj` referenced by solution | Distribution packaging | | macOS | `PanoPainter-OSX/` project files and `Info.plist` | Uses `NSOpenGLView` today | | iOS | `PanoPainter/Info.plist`, related Apple sources | Uses OpenGL ES today | diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index fac7bbb..2723270 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -145,8 +145,9 @@ option targets exist. The Windows desktop app builds through CMake as 2026-05-31 by user decision. The root CMake Windows app graph now includes a `panopainter_app` composition target and `pp_platform_windows` shell target so `PanoPainter` is only the executable/resource wrapper; Windows and vendor link -dependencies now belong to the platform shell target. Android arm64 now -configures and builds headless foundation/tool targets through the root +dependencies now belong to the platform shell target, and Windows runtime +payload deployment lives behind `cmake/PanoPainterRuntime.cmake`. Android arm64 +now configures and builds headless foundation/tool targets through the root CMake/NDK path. Non-Windows platform app/package files remain during Phase 6 alignment.