diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-06-09 11:49:01 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-09 11:49:01 +0800 |
| commit | 6982c898c54bd0d5fee3a2e3b848280fae600274 (patch) | |
| tree | 6dda36fd6748cfcedcd095a52b8b33910927b88c /indra | |
| parent | b5c4fec2c0065311508aa1a268a8a4e510674dc5 (diff) | |
| parent | 0eda8b9851543e6d54e94ef151a98ff8515adbe8 (diff) | |
Add Windows x64 & macOS actions
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/cmake/Boost.cmake | 18 | ||||
| -rw-r--r-- | indra/cmake/LLPrimitive.cmake | 15 | ||||
| -rw-r--r-- | indra/newview/FixBundle.cmake.in | 8 | ||||
| -rw-r--r-- | indra/newview/ViewerInstall.cmake | 29 |
4 files changed, 54 insertions, 16 deletions
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 25d673e49a..3f9134cb8f 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -12,10 +12,21 @@ if (DARWIN) elseif (WINDOWS) target_include_directories( ll::boost SYSTEM INTERFACE ${prefix_result}/../include) target_link_directories( ll::boost INTERFACE ${prefix_result}) - if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) - set(sfx -vc143-mt-a64-1_91) + # Detect the actual toolset/version suffix from whatever vcpkg installed. + # Glob for boost_context-*.lib and strip the known prefix to get the suffix. + file(GLOB _boost_context_libs "${prefix_result}/boost_context-*.lib") + if (_boost_context_libs) + list(GET _boost_context_libs 0 _boost_context_lib) + get_filename_component(_boost_context_name "${_boost_context_lib}" NAME_WE) + string(REPLACE "boost_context" "" sfx "${_boost_context_name}") else () - set(sfx -vc143-mt-x64-1_91) + if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + set(sfx -vc143-mt-a64-1_91) + else () + set(sfx -vc143-mt-x64-1_91) + endif () + message(WARNING "Could not detect Boost suffix via glob; using fallback '${sfx}'. " + "Check that vcpkg installed boost into ${prefix_result}.") endif () else () find_package( Boost ) @@ -152,4 +163,3 @@ target_link_libraries(ll::boost INTERFACE if (LINUX) target_link_libraries(ll::boost INTERFACE rt) endif (LINUX) - diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index df8d96109f..4708834653 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -69,10 +69,19 @@ if (TRUE) elseif (WINDOWS) set(BOOST_CFLAGS -I${prefix_result}/../include) set(BOOST_LIBS -L${prefix_result}) - if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) - set(BOOST_LIBRARY_SUFFIX -vc143-mt-a64-1_91) + # Detect actual toolset/version suffix from vcpkg-installed libs. + file(GLOB _boost_context_libs "${prefix_result}/boost_context-*.lib") + if (_boost_context_libs) + list(GET _boost_context_libs 0 _boost_context_lib) + get_filename_component(_boost_context_name "${_boost_context_lib}" NAME_WE) + string(REPLACE "boost_context" "" BOOST_LIBRARY_SUFFIX "${_boost_context_name}") else () - set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_91) + if ($ENV{MSYSTEM_CARCH} MATCHES aarch64) + set(BOOST_LIBRARY_SUFFIX -vc143-mt-a64-1_91) + else () + set(BOOST_LIBRARY_SUFFIX -vc143-mt-x64-1_91) + endif () + message(WARNING "Could not detect Boost suffix via glob in LLPrimitive; using fallback.") endif () elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD) set(BOOST_CFLAGS -I/usr/local/include) diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index a2dfadd7ef..d915cac35b 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -94,14 +94,17 @@ file(CREATE_LINK "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.78.dylib" SYMBOLIC ) +if(@ENABLE_MEDIA_PLUGINS@) file(CREATE_LINK "../../../../Frameworks/Chromium Embedded Framework.framework" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework" SYMBOLIC ) +endif() fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/MacOS/${VIEWER_CHANNEL} "" "${dirs}") +if(@ENABLE_MEDIA_PLUGINS@) file(CHMOD "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Alerts).app/Contents/MacOS/DullahanHelper (Alerts)" @@ -110,7 +113,9 @@ file(CHMOD "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) +endif() +if(@ENABLE_MEDIA_PLUGINS@) execute_process( COMMAND hdiutil detach /Volumes/VLC\ media\ player COMMAND lipo libalut.0.dylib @@ -233,6 +238,7 @@ execute_process( WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Frameworks ERROR_QUIET ) +endif() message("By default, the situation is assumed to be the strictest, an Apple Silicon Mac with the default security settings. Running a native self-built viewer on it without correct codesigning would lead to a crash. Also, codesigning requires administrative access. If you believe you're not in such a situation, you can remove the sudos in this file.") execute_process( @@ -637,6 +643,7 @@ execute_process( Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(Plugin\).app/Contents/MacOS/DullahanHelper\ \(Plugin\) WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents ) +if(@ENABLE_MEDIA_PLUGINS@) execute_process( COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} DullahanHelper.app @@ -657,6 +664,7 @@ execute_process( DullahanHelper\ \(Renderer\).app WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks ) +endif() execute_process( COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} --entitlements ${CMAKE_SOURCE_DIR}/newview/slplugin.entitlements diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 8f2827e1bc..7717605f1f 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -130,18 +130,29 @@ elseif (WINDOWS) set(BOOST_PLATFORM x${ADDRESS_SIZE}) endif () + # Detect the actual Boost DLL suffix from vcpkg-installed binaries. + file(GLOB _boost_context_dlls "${prefix_result}/../bin/boost_context-*.dll") + if (_boost_context_dlls) + list(GET _boost_context_dlls 0 _boost_context_dll) + get_filename_component(_boost_context_dll_name "${_boost_context_dll}" NAME_WE) + string(REPLACE "boost_context" "" BOOST_DLL_SFX "${_boost_context_dll_name}") + else () + set(BOOST_DLL_SFX -vc143-mt-${BOOST_PLATFORM}-1_91) + message(WARNING "Could not detect Boost DLL suffix via glob; using fallback '${BOOST_DLL_SFX}'.") + endif () + install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${VIEWER_BINARY_NAME}.exe ${prefix_result}/../bin/OpenAL32.dll ${prefix_result}/../bin/alut.dll - ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_filesystem-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_json-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_program_options-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_thread-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_url-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_context${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_fiber${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_filesystem${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_json${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_program_options${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_thread${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_url${BOOST_DLL_SFX}.dll ${prefix_result}/../bin/brotlicommon.dll ${prefix_result}/../bin/brotlidec.dll ${prefix_result}/../bin/bz2.dll @@ -176,8 +187,8 @@ elseif (WINDOWS) install( PROGRAMS - ${prefix_result}/../bin/boost_context-vc143-mt-${BOOST_PLATFORM}-1_91.dll - ${prefix_result}/../bin/boost_fiber-vc143-mt-${BOOST_PLATFORM}-1_91.dll + ${prefix_result}/../bin/boost_context${BOOST_DLL_SFX}.dll + ${prefix_result}/../bin/boost_fiber${BOOST_DLL_SFX}.dll ${prefix_result}/../bin/libapr-1.dll ${prefix_result}/../bin/libaprutil-1.dll ${prefix_result}/../bin/libexpat.dll |
