Extract Windows runtime payload deployment

This commit is contained in:
2026-06-02 21:36:31 +02:00
parent 7b882896f1
commit a2e47c862e
4 changed files with 32 additions and 23 deletions

View File

@@ -20,6 +20,7 @@ endif()
include(PanoPainterWarnings) include(PanoPainterWarnings)
include(PanoPainterSources) include(PanoPainterSources)
include(PanoPainterVersion) include(PanoPainterVersion)
include(PanoPainterRuntime)
if(PP_ENABLE_CLANG_TIDY) if(PP_ENABLE_CLANG_TIDY)
find_program(PP_CLANG_TIDY_EXE NAMES clang-tidy) find_program(PP_CLANG_TIDY_EXE NAMES clang-tidy)
@@ -305,26 +306,7 @@ if(PP_BUILD_APP)
pp_add_version_generation(PanoPainter "$<IF:$<CONFIG:Debug>,debug,release>") pp_add_version_generation(PanoPainter "$<IF:$<CONFIG:Debug>,debug,release>")
add_custom_command(TARGET PanoPainter POST_BUILD pp_configure_windows_runtime_payloads(PanoPainter)
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/data"
"$<TARGET_FILE_DIR:PanoPainter>/data"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/bugtrap-client/lib/BugTrapU-x64.dll"
"$<TARGET_FILE_DIR:PanoPainter>/BugTrapU-x64.dll"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-debug-x64/libcurl_debug.dll>$<$<NOT:$<CONFIG:Debug>>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-release-x64/libcurl.dll>"
"$<TARGET_FILE_DIR:PanoPainter>/"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/libyuv/lib/win/libyuv.dll"
"$<TARGET_FILE_DIR:PanoPainter>/libyuv.dll"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/mp4v2/lib/win/libmp4v2.dll"
"$<TARGET_FILE_DIR:PanoPainter>/libmp4v2.dll"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/openh264/lib/openh264-2.0.0-win64.dll"
"$<TARGET_FILE_DIR:PanoPainter>/openh264-2.0.0-win64.dll"
VERBATIM)
else() 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.") 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() endif()

View File

@@ -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"
"$<TARGET_FILE_DIR:${target_name}>/data"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/bugtrap-client/lib/BugTrapU-x64.dll"
"$<TARGET_FILE_DIR:${target_name}>/BugTrapU-x64.dll"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-debug-x64/libcurl_debug.dll>$<$<NOT:$<CONFIG:Debug>>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-release-x64/libcurl.dll>"
"$<TARGET_FILE_DIR:${target_name}>/"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/libyuv/lib/win/libyuv.dll"
"$<TARGET_FILE_DIR:${target_name}>/libyuv.dll"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/mp4v2/lib/win/libmp4v2.dll"
"$<TARGET_FILE_DIR:${target_name}>/libmp4v2.dll"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/libs/openh264/lib/openh264-2.0.0-win64.dll"
"$<TARGET_FILE_DIR:${target_name}>/openh264-2.0.0-win64.dll"
VERBATIM)
endfunction()

View File

@@ -10,7 +10,7 @@ Keep it updated as platform paths move to shared CMake targets.
| Platform/Target | Current Entrypoint | Notes | | 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 | | Windows AppX | `PanoPainterPackage/Package.appxmanifest`, `.wapproj` referenced by solution | Distribution packaging |
| macOS | `PanoPainter-OSX/` project files and `Info.plist` | Uses `NSOpenGLView` today | | macOS | `PanoPainter-OSX/` project files and `Info.plist` | Uses `NSOpenGLView` today |
| iOS | `PanoPainter/Info.plist`, related Apple sources | Uses OpenGL ES today | | iOS | `PanoPainter/Info.plist`, related Apple sources | Uses OpenGL ES today |

View File

@@ -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 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_app` composition target and `pp_platform_windows` shell target so
`PanoPainter` is only the executable/resource wrapper; Windows and vendor link `PanoPainter` is only the executable/resource wrapper; Windows and vendor link
dependencies now belong to the platform shell target. Android arm64 now dependencies now belong to the platform shell target, and Windows runtime
configures and builds headless foundation/tool targets through the root 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 CMake/NDK path. Non-Windows platform app/package files remain during Phase 6
alignment. alignment.