diff options
Diffstat (limited to 'indra')
86 files changed, 987 insertions, 2069 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d51ae77662..576562724e 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -58,7 +58,7 @@ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported b # Platform-specific compilation flags. -if (WINDOWS) +if (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU AND WINDOWS) # Don't build DLLs. set(BUILD_SHARED_LIBS OFF) @@ -114,7 +114,7 @@ if (WINDOWS) # Allow use of sprintf etc add_compile_definitions(_CRT_SECURE_NO_WARNINGS) -endif (WINDOWS) +endif (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU AND WINDOWS) if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE ) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index f54eb3e3db..26c0843300 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -9,31 +9,27 @@ if( USE_CONAN ) target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS ) return() elseif( NOT USE_AUTOBUILD_3P ) - if (DARWIN) + if (WINDOWS) + set(sfx -mt) + target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/x86_64-w64-mingw32/include) + target_link_directories( ll::boost INTERFACE /opt/local/x86_64-w64-mingw32/lib) + elseif (DARWIN) + set(sfx -mt) target_include_directories( ll::boost SYSTEM INTERFACE /opt/local/libexec/boost/1.81/include) - target_link_libraries( ll::boost INTERFACE - /opt/local/libexec/boost/1.81/lib/libboost_context-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_fiber-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_regex-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_system-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_thread-mt.a - /opt/local/libexec/boost/1.81/lib/libboost_url-mt.a - ) - else (DARWIN) + target_link_directories( ll::boost INTERFACE /opt/local/libexec/boost/1.81/lib) + else (WINDOWS) find_package( Boost REQUIRED ) - target_link_libraries( ll::boost INTERFACE - boost_context - boost_fiber - boost_filesystem - boost_program_options - boost_regex - boost_system - boost_thread - boost_url - ) - endif (DARWIN) + endif (WINDOWS) + target_link_libraries( ll::boost INTERFACE + boost_context${sfx} + boost_fiber${sfx} + boost_filesystem${sfx} + boost_program_options${sfx} + boost_regex${sfx} + boost_system${sfx} + boost_thread${sfx} + boost_url${sfx} + ) target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) return() endif() @@ -61,7 +57,6 @@ elseif (LINUX) boost_filesystem-mt${addrsfx} boost_program_options-mt${addrsfx} boost_regex-mt${addrsfx} - boost_thread-mt${addrsfx} boost_system-mt${addrsfx} boost_thread-mt${addrsfx} boost_url-mt${addrsfx}) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index c1ef0c3447..b85de3b845 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -27,7 +27,7 @@ use_prebuilt_binary(curl) ) endif (NOT ${curl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) endif (DARWIN) -elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/curl_installed OR NOT ${curl_installed} EQUAL 0) +elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/curl_installed OR NOT ${curl_installed} EQUAL 0)) if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz) file(DOWNLOAD https://github.com/secondlife/3p-curl/archive/refs/tags/v7.54.1-r1.tar.gz @@ -89,7 +89,7 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA ) file(WRITE ${PREBUILD_TRACKING_DIR}/curl_installed "${curl_installed}") endif (DARWIN OR LINUX OR NOT USESYSTEMLIBS) -if (WINDOWS) +if (WINDOWS AND NOT USESYSTEMLIBS) target_link_libraries(ll::libcurl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.lib ll::openssl diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 1cb1679d75..80d243d9f8 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -26,9 +26,6 @@ if (HAVOK) elseif (HAVOK_TPV) use_prebuilt_binary(llphysicsextensions_tpv) target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv) -elseif (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) - target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub) - return () else (HAVOK) use_prebuilt_binary(llphysicsextensions_stub) set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 03a5d165b3..39c07e3377 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -19,111 +19,117 @@ if( USE_CONAN ) endif() if( USESYSTEMLIBS ) - if( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) + if( WINDOWS ) + include(FindPkgConfig) + pkg_check_modules(Colladadom REQUIRED collada-dom-141) + target_compile_definitions( ll::colladadom INTERFACE COLLADA_DOM_SUPPORT141 ) + target_include_directories( ll::colladadom SYSTEM INTERFACE ${Colladadom_INCLUDE_DIRS} ) + target_link_directories( ll::colladadom INTERFACE ${Colladadom_LIBRARY_DIRS} ) + target_link_libraries( ll::colladadom INTERFACE ${Colladadom_LIBRARIES} ) + return () + elseif( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD ) # Build of the collada-dom for Linux and FreeBSD is done in # indra/llprimitive/CMakeLists.txt return () - endif( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) - include(FindPkgConfig) - pkg_check_modules(Minizip REQUIRED minizip) - pkg_check_modules(Libxml2 REQUIRED libxml-2.0) - pkg_check_modules(Libpcrecpp libpcrecpp) - target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} ) - target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} ) - if ( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz) - file(DOWNLOAD - https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r4.tar.gz - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz - ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz) - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz - DESTINATION ${CMAKE_BINARY_DIR} - ) - file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) - if( DARWIN ) - try_compile(COLLADADOM_RESULT - PROJECT colladadom - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - TARGET collada14dom - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Libxml2_LIBRARY_DIRS} - -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp - -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} - -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt - -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt - -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS}/libxml2 - -DEXTRA_COMPILE_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} - -DBoost_CFLAGS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} - -DOPT_COLLADA14:BOOL=ON - -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada - -DCOLLADA_DOM_SOVERSION:STRING=0 - -DCOLLADA_DOM_VERSION:STRING=2.3-r4 - -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} - -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 - OUTPUT_VARIABLE colladadom_installed - ) - if (${COLLADADOM_RESULT}) - file( - COPY - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.2.3-r4.dylib - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.0.dylib - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.dylib - DESTINATION ${LIBS_PREBUILT_DIR}/lib/release - FOLLOW_SYMLINK_CHAIN + else( WINDOWS ) + include(FindPkgConfig) + pkg_check_modules(Minizip REQUIRED minizip) + pkg_check_modules(Libxml2 REQUIRED libxml-2.0) + pkg_check_modules(Libpcrecpp libpcrecpp) + target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} ) + target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} ) + if( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) + if( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz ) + file(DOWNLOAD + https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r4.tar.gz + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz ) - endif (${COLLADADOM_RESULT}) - else( DARWIN ) - execute_process( - COMMAND sed -i "" -e "s/SHARED/STATIC/g" 1.4/CMakeLists.txt - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src - ) - try_compile(COLLADADOM_RESULT - PROJECT colladadom - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - TARGET collada14dom - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Libxml2_LIBRARY_DIRS} - -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp - -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} - -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem - -DBoost_SYSTEM_LIBRARY:STRING=boost_system - -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libxml2_INCLUDE_DIRS} - -DEXTRA_COMPILE_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} - -DBoost_CFLAGS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} - -DOPT_COLLADA14:BOOL=ON - -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada - -DCOLLADA_DOM_SOVERSION:STRING=0 - -DCOLLADA_DOM_VERSION:STRING=2.3-r4 - OUTPUT_VARIABLE colladadom_installed + endif( NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz ) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} ) - if (${COLLADADOM_RESULT}) + file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4) + if( DARWIN ) + try_compile(COLLADADOM_RESULT + PROJECT colladadom + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + TARGET collada14dom + CMAKE_FLAGS + -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} + "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} -L${Minizip_LIBRARY_DIRS}exec/boost/1.81/lib" + -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} + -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt + -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt + -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} + -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS} + -DBoost_CFLAGS:STRING=-I${Libpcrecpp_LIBRARY_DIRS}exec/boost/1.81/include + -DOPT_COLLADA14:BOOL=ON + -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada + -DCOLLADA_DOM_SOVERSION:STRING=0 + -DCOLLADA_DOM_VERSION:STRING=2.3-r4 + OUTPUT_VARIABLE colladadom_installed + ) + if( ${COLLADADOM_RESULT} ) + file( + COPY + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.2.3-r4.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.0.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.dylib + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + FOLLOW_SYMLINK_CHAIN + ) + endif( ${COLLADADOM_RESULT} ) + else( DARWIN ) + execute_process( + COMMAND sed -i "" -e "s/SHARED/STATIC/g" 1.4/CMakeLists.txt + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src + ) + try_compile(COLLADADOM_RESULT + PROJECT colladadom + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + TARGET collada14dom + CMAKE_FLAGS + -DCMAKE_CXX_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} + -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Minizip_LIBRARY_DIRS} + -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} + -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem + -DBoost_SYSTEM_LIBRARY:STRING=boost_system + -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} + -DEXTRA_COMPILE_FLAGS:STRING=-I${Libxml2_INCLUDE_DIRS} + -DOPT_COLLADA14:BOOL=ON + -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada + -DCOLLADA_DOM_SOVERSION:STRING=0 + -DCOLLADA_DOM_VERSION:STRING=2.3-r4 + OUTPUT_VARIABLE colladadom_installed + ) + if( ${COLLADADOM_RESULT} ) + file( + COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + ) + endif( ${COLLADADOM_RESULT} ) + endif( DARWIN ) + if( ${COLLADADOM_RESULT} ) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada/1.4) file( - COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.a - DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + COPY + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.4 + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.5 + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae.h + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dom.h + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/modules + DESTINATION ${LIBS_PREBUILT_DIR}/include/collada ) - endif (${COLLADADOM_RESULT}) - endif( DARWIN ) - if (${COLLADADOM_RESULT}) - file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada/1.4) - file( - COPY - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.4 - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.5 - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae.h - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dom.h - ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/modules - DESTINATION ${LIBS_PREBUILT_DIR}/include/collada - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "0") - endif (${COLLADADOM_RESULT}) - endif( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) + file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "${colladadom_installed}") + endif( ${COLLADADOM_RESULT} ) + endif( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) + endif( WINDOWS ) else( USESYSTEMLIBS ) use_system_binary( colladadom ) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 383051a4a6..31907d31df 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -7,7 +7,7 @@ include(Prebuilt) include_guard() add_library( ll::SDL INTERFACE IMPORTED ) -if (USESYSTEMLIBS AND NOT DARWIN) +if (USESYSTEMLIBS AND NOT (WINDOWS OR DARWIN)) include(FindPkgConfig) pkg_check_modules(Sdl2 REQUIRED sdl2) target_compile_definitions( ll::SDL INTERFACE LL_SDL=1) diff --git a/indra/cmake/LibraryInstall.cmake b/indra/cmake/LibraryInstall.cmake index b94841897c..e98d71f044 100644 --- a/indra/cmake/LibraryInstall.cmake +++ b/indra/cmake/LibraryInstall.cmake @@ -4,7 +4,7 @@ list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt) if (BUILD_SHARED_LIBS) if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) + elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) set(_LIB lib64) else () set(_LIB lib) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 0dc4069431..e1bfe10e93 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -8,72 +8,49 @@ add_library( ll::meshoptimizer INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(meshoptimizer) -else (NOT USESYSTEMLIBS) - if (NOT (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN)) - find_package(meshoptimizer) - target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) - endif (NOT (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN)) +elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) + find_package(meshoptimizer) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) + return () endif (NOT USESYSTEMLIBS) -if (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR NOT USESYSTEMLIBS) - if (USESYSTEMLIBS) - if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz) - file(DOWNLOAD - https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz - ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz - ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz) - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz - DESTINATION ${CMAKE_BINARY_DIR} - ) - if (DARWIN) - try_compile(MESHOPTIMIZER_RESULT - PROJECT meshoptimizer - SOURCE_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21 - BINARY_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21 - TARGET meshoptimizer - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} - -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 - OUTPUT_VARIABLE meshoptimizer_installed - ) - else (DARWIN) - try_compile(MESHOPTIMIZER_RESULT - PROJECT meshoptimizer - SOURCE_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21 - BINARY_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21 - TARGET meshoptimizer - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - OUTPUT_VARIABLE meshoptimizer_installed - ) - endif (DARWIN) - if (${MESHOPTIMIZER_RESULT}) - file( - COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/src/meshoptimizer.h - DESTINATION ${LIBS_PREBUILT_DIR}/include/meshoptimizer - ) - file( - COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/libmeshoptimizer.a - DESTINATION ${LIBS_PREBUILT_DIR}/lib/release - ) - file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "0") - endif (${MESHOPTIMIZER_RESULT}) - endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) - else (USESYSTEMLIBS) +if (LINUX OR NOT USESYSTEMLIBS) use_prebuilt_binary(meshoptimizer) - endif (USESYSTEMLIBS) +elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz) + file(DOWNLOAD + https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz + ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} + ) + try_compile(MESHOPTIMIZER_RESULT + PROJECT meshoptimizer + SOURCE_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21 + BINARY_DIR ${CMAKE_BINARY_DIR}/meshoptimizer-0.21 + TARGET meshoptimizer + OUTPUT_VARIABLE meshoptimizer_installed + ) + if (${MESHOPTIMIZER_RESULT}) + file( + COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/src/meshoptimizer.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/meshoptimizer + ) + file( + COPY ${CMAKE_BINARY_DIR}/meshoptimizer-0.21/libmeshoptimizer.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "${meshoptimizer_installed}") + endif (${MESHOPTIMIZER_RESULT}) +endif (LINUX OR NOT USESYSTEMLIBS) -if (WINDOWS) +if (NOT USESYSTEMLIBS AND WINDOWS) target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) -elseif (LINUX) +else (NOT USESYSTEMLIBS AND WINDOWS) target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) -elseif (DARWIN) - target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a) -endif (WINDOWS) +endif (NOT USESYSTEMLIBS AND WINDOWS) target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer) -endif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR NOT USESYSTEMLIBS) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 1bf6c5086c..b75bb2509d 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -8,8 +8,9 @@ add_library( ll::ndof INTERFACE IMPORTED ) if (NDOF) if (WINDOWS OR DARWIN) - if (USESYSTEMLIBS) - if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0) + if (NOT USESYSTEMLIBS) + use_prebuilt_binary(libndofdev) + elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0)) file(DOWNLOAD https://github.com/secondlife/3p-libndofdev/archive/refs/tags/v0.1.8e9edc7.tar.gz ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7.tar.gz @@ -23,11 +24,7 @@ if (NDOF) SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev BINARY_DIR ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev TARGET ndofdev - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} - -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 - -DCMAKE_C_FLAGS:STRING=-DTARGET_OS_MAC\ -Wno-int-conversion + CMAKE_FLAGS -DCMAKE_C_FLAGS:STRING=-DTARGET_OS_MAC\ -Wno-int-conversion OUTPUT_VARIABLE libndofdev_installed ) if (${LIBNDOFDEV_RESULT}) @@ -39,12 +36,9 @@ if (NDOF) COPY ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7/libndofdev/src/libndofdev.dylib DESTINATION ${LIBS_PREBUILT_DIR}/lib/release ) - file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "0") + file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "${libndofdev_installed}") endif (${LIBNDOFDEV_RESULT}) - endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0) - else (USESYSTEMLIBS) - use_prebuilt_binary(libndofdev) - endif (USESYSTEMLIBS) + endif (NOT USESYSTEMLIBS) elseif (LINUX) use_prebuilt_binary(open-libndofdev) endif (WINDOWS OR DARWIN) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 9d0303340f..463e4365ce 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -7,8 +7,9 @@ add_library( ll::openjpeg INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(openjpeg) endif (NOT USESYSTEMLIBS) -if (USESYSTEMLIBS AND NOT LINUX) - if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) +if (LINUX OR NOT USESYSTEMLIBS) +use_prebuilt_binary(openjpeg) +elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz) file(DOWNLOAD https://github.com/secondlife/3p-openjpeg/archive/refs/tags/v2.5.0.ea12248.tar.gz @@ -19,32 +20,16 @@ if (USESYSTEMLIBS AND NOT LINUX) INPUT ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) - if (DARWIN) - try_compile(OPENJPEG_RESULT - PROJECT OPENJPEG - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg - TARGET openjp2 - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS:BOOL=OFF - -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} - -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 - OUTPUT_VARIABLE openjpeg_installed - ) - else (DARWIN) - try_compile(OPENJPEG_RESULT - PROJECT OPENJPEG - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg - TARGET openjp2 - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS:BOOL=OFF - -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON - OUTPUT_VARIABLE openjpeg_installed - ) - endif (DARWIN) + try_compile(OPENJPEG_RESULT + PROJECT OPENJPEG + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg + TARGET openjp2 + CMAKE_FLAGS + -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} + -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON + OUTPUT_VARIABLE openjpeg_installed + ) if (${OPENJPEG_RESULT}) file( COPY @@ -62,10 +47,7 @@ if (USESYSTEMLIBS AND NOT LINUX) ) file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") endif (${OPENJPEG_RESULT}) - endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) -else (USESYSTEMLIBS AND NOT LINUX) -use_prebuilt_binary(openjpeg) -endif (USESYSTEMLIBS AND NOT LINUX) +endif (LINUX OR NOT USESYSTEMLIBS) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 801850b7ab..c6481c89e9 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -42,7 +42,7 @@ use_prebuilt_binary(openssl) ) endif (NOT ${ssl_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES}) endif (DARWIN) -elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openssl_installed OR NOT ${openssl_installed} EQUAL 0) +elseif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openssl_installed OR NOT ${openssl_installed} EQUAL 0)) if (NOT EXISTS ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w.tar.gz) file(DOWNLOAD https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1w.tar.gz @@ -55,135 +55,137 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA ) execute_process( COMMAND ./config no-shared - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w ) execute_process( COMMAND make -j${MAKE_JOBS} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w RESULT_VARIABLE openssl_installed ) file( COPY - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/aes.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1_mac.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1err.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asn1t.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/async.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/asyncerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bio.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bioerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/blowfish.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bn.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/bnerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/buffer.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/buffererr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/camellia.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cast.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cmac.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cms.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cmserr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/comp.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/comperr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/conf.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/conf_api.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/conferr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/crypto.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cryptoerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ct.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/cterr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/des.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dh.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dherr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dsa.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dsaerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/dtls1.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/e_os2.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ebcdic.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ec.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ecdh.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ecdsa.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ecerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/engine.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/engineerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/err.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/evp.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/evperr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/hmac.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/idea.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/kdf.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/kdferr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/lhash.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/md2.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/md4.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/md5.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/mdc2.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/modes.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/obj_mac.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/objects.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/objectserr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ocsp.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ocsperr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/opensslconf.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/opensslv.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ossl_typ.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pem.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pem2.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pemerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs12.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs12err.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs7.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/pkcs7err.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rand.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rand_drbg.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/randerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rc2.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rc4.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rc5.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ripemd.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rsa.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/rsaerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/safestack.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/seed.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/sha.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/srp.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/srtp.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ssl.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ssl2.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ssl3.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/sslerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/stack.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/store.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/storeerr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/symhacks.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/tls1.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ts.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/tserr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/txt_db.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/ui.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/uierr.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/whrlpool.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509_vfy.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509err.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509v3.h - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/include/openssl/x509v3err.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/aes.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1_mac.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1err.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asn1t.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/async.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/asyncerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bio.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bioerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/blowfish.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bn.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/bnerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/buffer.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/buffererr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/camellia.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cast.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cmac.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cms.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cmserr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/comp.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/comperr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/conf.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/conf_api.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/conferr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/crypto.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cryptoerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ct.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/cterr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/des.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dh.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dherr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dsa.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dsaerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/dtls1.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/e_os2.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ebcdic.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ec.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ecdh.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ecdsa.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ecerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/engine.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/engineerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/err.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/evp.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/evperr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/hmac.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/idea.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/kdf.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/kdferr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/lhash.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/md2.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/md4.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/md5.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/mdc2.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/modes.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/obj_mac.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/objects.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/objectserr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ocsp.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ocsperr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/opensslconf.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/opensslv.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ossl_typ.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pem.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pem2.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pemerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs12.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs12err.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs7.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/pkcs7err.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rand.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rand_drbg.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/randerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rc2.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rc4.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rc5.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ripemd.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rsa.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/rsaerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/safestack.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/seed.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/sha.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/srp.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/srtp.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ssl.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ssl2.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ssl3.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/sslerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/stack.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/store.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/storeerr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/symhacks.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/tls1.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ts.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/tserr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/txt_db.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/ui.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/uierr.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/whrlpool.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509_vfy.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509err.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509v3.h + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/include/openssl/x509v3err.h DESTINATION ${LIBS_PREBUILT_DIR}/include/openssl ) file( COPY - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/libcrypto.a - ${CMAKE_BINARY_DIR}/OpenSSL_1_1_1w/libssl.a + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/libcrypto.a + ${CMAKE_BINARY_DIR}/openssl-OpenSSL_1_1_1w/libssl.a DESTINATION ${LIBS_PREBUILT_DIR}/lib/release ) file(WRITE ${PREBUILD_TRACKING_DIR}/openssl_installed "${openssl_installed}") endif (DARWIN OR LINUX OR NOT USESYSTEMLIBS) -if (WINDOWS) +if (WINDOWS AND NOT USESYSTEMLIBS) target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.lib Crypt32.lib) elseif (LINUX) target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.a ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.a dl) else() target_link_libraries(ll::openssl INTERFACE ssl crypto) -endif (WINDOWS) +endif (WINDOWS AND NOT USESYSTEMLIBS) +if (NOT (WINDOWS AND USESYSTEMLIBS)) target_include_directories( ll::openssl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) +endif (NOT (WINDOWS AND USESYSTEMLIBS)) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 4034599fde..051435e7cb 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -61,7 +61,7 @@ macro (use_prebuilt_binary _binary) OUTPUT_STRIP_TRAILING_WHITESPACE ) endif ("${package_url}" STREQUAL "") - string(REGEX REPLACE "^https://(megapahit.net/downloads|github.com/secondlife|automated-builds-secondlife-com.s3.amazonaws.com/ct2).*/" "" package_name ${package_url}) + string(REGEX REPLACE "^https?://(megapahit.net/downloads|github.com/secondlife|automated-builds-secondlife-com.s3.amazonaws.com/ct2).*/" "" package_name ${package_url}) file(DOWNLOAD ${package_url} ${CMAKE_BINARY_DIR}/${package_name} diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index 7aa05ff5a6..0751e1caa5 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -16,7 +16,7 @@ if (INSTALL) if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) + elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) set(_LIB lib64) else (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 0a5191ff08..13f5ebf862 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -1,12 +1,12 @@ # -*- cmake -*- include(Prebuilt) -if (NOT DARWIN) +if (NOT (WINDOWS OR DARWIN)) add_library( ll::fontconfig INTERFACE IMPORTED ) find_package(Fontconfig REQUIRED) target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig ) -endif (NOT DARWIN) +endif (NOT (WINDOWS OR DARWIN)) if( USE_AUTOBUILD_3P ) use_prebuilt_binary(libhunspell) @@ -16,8 +16,8 @@ if (NOT USESYSTEMLIBS) use_prebuilt_binary(slvoice) endif (NOT USESYSTEMLIBS) -if ((${LINUX_DISTRO} MATCHES debian OR DARWIN) OR NOT USESYSTEMLIBS) +if ((${LINUX_DISTRO} MATCHES debian OR WINDOWS OR DARWIN) OR NOT USESYSTEMLIBS) use_prebuilt_binary(nanosvg) -endif ((${LINUX_DISTRO} MATCHES debian OR DARWIN) OR NOT USESYSTEMLIBS) +endif ((${LINUX_DISTRO} MATCHES debian OR WINDOWS OR DARWIN) OR NOT USESYSTEMLIBS) use_prebuilt_binary(viewer-fonts) use_prebuilt_binary(emoji_shortcodes) diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index be51957794..3491a511f5 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -6,14 +6,16 @@ include_guard() add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") -if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR (${LINUX_DISTRO} MATCHES fedora) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) +if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES arch) OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) +use_prebuilt_binary(webrtc) +elseif (NOT (WINDOWS OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) target_compile_definitions(ll::webrtc INTERFACE CM_WEBRTC=1) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) - if (LINUX) - set(WEBRTC_PLATFORM linux-x64) - else (LINUX) - set(WEBRTC_PLATFORM macos-arm64) - endif (LINUX) + if (DARWIN) + set(WEBRTC_PLATFORM macos-arm64) + else (DARWIN) + set(WEBRTC_PLATFORM linux-x64) + endif (DARWIN) if (NOT EXISTS ${CMAKE_BINARY_DIR}/libwebrtc-${WEBRTC_PLATFORM}.tar.xz) file(DOWNLOAD https://github.com/crow-misia/libwebrtc-bin/releases/download/114.5735.6.1/libwebrtc-${WEBRTC_PLATFORM}.tar.xz @@ -28,54 +30,52 @@ if (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR (${LINUX_DISTRO} MATCHES fedora) OR file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/webrtc) file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/webrtc) foreach(directory - api - audio - base - build - buildtools - call - common_audio - common_video - examples - logging - media - modules - net - p2p - pc - rtc_base - rtc_tools - sdk - stats - system_wrappers - test - testing - third_party - tools - video - ) - file(RENAME - ${LIBS_PREBUILT_DIR}/include/${directory} - ${LIBS_PREBUILT_DIR}/include/webrtc/${directory} + api + audio + base + build + buildtools + call + common_audio + common_video + examples + logging + media + modules + net + p2p + pc + rtc_base + rtc_tools + sdk + stats + system_wrappers + test + testing + third_party + tools + video ) + file(RENAME + ${LIBS_PREBUILT_DIR}/include/${directory} + ${LIBS_PREBUILT_DIR}/include/webrtc/${directory} + ) endforeach() file(RENAME - ${LIBS_PREBUILT_DIR}/lib/libwebrtc.a - ${LIBS_PREBUILT_DIR}/lib/release/libwebrtc.a - ) - if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/lib/release/WebRTC.framework) - file(RENAME - ${LIBS_PREBUILT_DIR}/Frameworks/WebRTC.xcframework/${WEBRTC_PLATFORM}/WebRTC.framework - ${LIBS_PREBUILT_DIR}/lib/release/WebRTC.framework + ${LIBS_PREBUILT_DIR}/lib/libwebrtc.a + ${LIBS_PREBUILT_DIR}/lib/release/libwebrtc.a ) - file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/Frameworks) + if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/lib/release/WebRTC.framework) + file(RENAME + ${LIBS_PREBUILT_DIR}/Frameworks/WebRTC.xcframework/${WEBRTC_PLATFORM}/WebRTC.framework + ${LIBS_PREBUILT_DIR}/lib/release/WebRTC.framework + ) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/Frameworks) endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) file(WRITE ${PREBUILD_TRACKING_DIR}/webrtc_installed "0") endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) -elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) -use_prebuilt_binary(webrtc) -endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR (${LINUX_DISTRO} MATCHES fedora) OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) +endif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES arch) OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) if (WINDOWS) target_link_libraries( ll::webrtc INTERFACE webrtc.lib ) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 8d403dc6c8..b98edc67de 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -93,10 +93,6 @@ target_link_libraries(llprimitive ll::glh_linear ) -if (USESYSTEMLIBS) - add_subdirectory(llphysicsextensions) -endif () - include(LibraryInstall) #add unit tests diff --git a/indra/llprimitive/llphysicsextensions/CMakeLists.txt b/indra/llprimitive/llphysicsextensions/CMakeLists.txt deleted file mode 100644 index 258cea5dd7..0000000000 --- a/indra/llprimitive/llphysicsextensions/CMakeLists.txt +++ /dev/null @@ -1,101 +0,0 @@ -# -*- cmake -*- - -project(llphysicsextensions) - -include(00-Common) -include(Variables) -include(LLCommon) -include(LLMath) - -set(LLPHYSICSEXTENSIONS_LIB_NAME llphysicsextensions) - -if (WINDOWS) - set(LLPHYSICSEXTENSIONS_LIBRARIES ${LLPHYSICSEXTENSIONS_LIB_NAME}.lib) -else (WINDOWS) - set(LLPHYSICSEXTENSIONS_LIBRARIES ${LLPHYSICSEXTENSIONS_LIB_NAME}.a) -endif (WINDOWS) - -set(LLPHYSICSEXTENSIONS_INCLUDE_DIR - ${CMAKE_CURRENT_SOURCE_DIR}) - -set(LLPHYSICSEXTENSIONS_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug) -set(LLPHYSICSEXTENSIONS_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release) - -#set(LLPHYSICSEXTENSIONS_LIBRARIES_LIBRARIES -# debug ${LLPHYSICSEXTENSIONS_DEBUG_LIB} -# optimized ${LLPHYSICSEXTENTIONS_RELEASE_LIB} -#) - -if (LINUX) - list(INSERT LLPHYSICSEXTENSIONS_LIBRARIES 0 -Wl,--start-group) - list(APPEND LLPHYSICSEXTENSIONS_LIBRARIES -Wl,--end-group) -endif (LINUX) - -#include_directories( -# ${CMAKE_SOURCE_DIR}/llphysicsextensions -# ${LLPHYSICSEXTENSIONS_INCLUDE_DIR} -# ${LLCOMMON_INCLUDE_DIRS} -# ${LLMATH_INCLUDE_DIRS} -# ) - -set(llphysicsextensions_SOURCE_FILES - llpathinglib.cpp - LLPathingLibStubImpl.cpp - llconvexdecomposition.cpp - LLConvexDecompositionStubImpl.cpp - llphysicsextensions.cpp - LLPhysicsExtensionsStubImpl.cpp - ) - -set(llphysicsextensions_HEADER_FILES - - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/llpathinglib.h - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/llconvexdecomposition.h - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/llphysicsextensions.h - LLPathingLibStubImpl.h - LLConvexDecompositionStubImpl.h - LLPhysicsExtensionsStubImpl.h - ) - -if (WINDOWS) - list(APPEND llphysicsextensions_HEADER_FILES - ${LLPHYSICSEXTENSIONS_INCLUDE_DIR}/windowsincludes.h) -endif (WINDOWS) - -set_source_files_properties(${llphysicsextensions_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - -# some of the include files contain compile-time switches based on these -set_source_files_properties(${llphysicsextensions_SOURCE_FILES} - PROPERTIES COMPILE_DEFINITIONS "LL_PATHING_LIB_STUB;LL_CONVEX_DECOMP_STUB;LL_PHYSICS_EXTENSIONS_STUB") - -list(APPEND llphysicsextensionsstub_SOURCE_FILES ${llphysicsextensions_HEADER_FILES}) - -add_library(${PROJECT_NAME}stub ${${PROJECT_NAME}_SOURCE_FILES}) -target_include_directories(${PROJECT_NAME}stub INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(${PROJECT_NAME}stub llmath llcommon) -list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES - LLPathingLibStubImpl.h - LLConvexDecompositionStubImpl.h - LLPhysicsExtensionsStubImpl.h) -#install(FILES ${${PROJECT_NAME}_HEADER_FILES} DESTINATION include/${PROJECT_NAME}) -if (BUILD_SHARED_LIBS) - if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) - set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) - set(_LIB lib64) - else () - set(_LIB lib) - endif () - install(TARGETS ${PROJECT_NAME}stub DESTINATION ${_LIB}) -endif () - -if (LINUX) - IF(CMAKE_BUILD_TYPE MATCHES Release) - SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/release) - ENDIF(CMAKE_BUILD_TYPE MATCHES Release) - IF(CMAKE_BUILD_TYPE MATCHES Debug) - SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/debug) - ENDIF(CMAKE_BUILD_TYPE MATCHES Debug) - -endif (LINUX) diff --git a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp b/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp deleted file mode 100644 index b1214a7f31..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/** -* @file LLConvexDecompositionStubImpl.cpp -* @author falcon@lindenlab.com -* @brief A stub implementation of LLConvexDecomposition -* -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 20112010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include <string.h> -#include <memory> -#include "LLConvexDecompositionStubImpl.h" - -LLConvexDecomposition* LLConvexDecompositionImpl::getInstance() -{ - return NULL; -} - -LLCDResult LLConvexDecompositionImpl::initSystem() -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::initThread() -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::quitThread() -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::quitSystem() -{ - return LLCD_NOT_IMPLEMENTED; -} - -void LLConvexDecompositionImpl::genDecomposition(int& decomp) -{ - decomp = -1; -} - -void LLConvexDecompositionImpl::deleteDecomposition(int decomp) -{ - -} - -void LLConvexDecompositionImpl::bindDecomposition(int decomp) -{ - -} - -LLCDResult LLConvexDecompositionImpl::setParam(const char* name, float val) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::setParam(const char* name, bool val) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::setParam(const char* name, int val) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::setMeshData( const LLCDMeshData* data, bool vertex_based ) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::registerCallback(int stage, llcdCallbackFunc callback ) -{ - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::executeStage(int stage) -{ - return LLCD_NOT_IMPLEMENTED; -} - -int LLConvexDecompositionImpl::getNumHullsFromStage(int stage) -{ - return 0; -} - -LLCDResult LLConvexDecompositionImpl::getSingleHull( LLCDHull* hullOut ) -{ - memset( hullOut, 0, sizeof(LLCDHull) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::getHullFromStage( int stage, int hull, LLCDHull* hullOut ) -{ - memset( hullOut, 0, sizeof(LLCDHull) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut ) -{ - memset( meshDataOut, 0, sizeof(LLCDMeshData) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::getMeshFromHull( LLCDHull* hullIn, LLCDMeshData* meshOut ) -{ - memset( meshOut, 0, sizeof(LLCDMeshData) ); - return LLCD_NOT_IMPLEMENTED; -} - -LLCDResult LLConvexDecompositionImpl::generateSingleHullMeshFromMesh(LLCDMeshData* meshIn, LLCDMeshData* meshOut) -{ - memset( meshOut, 0, sizeof(LLCDMeshData) ); - return LLCD_NOT_IMPLEMENTED; -} - -void LLConvexDecompositionImpl::loadMeshData(const char* fileIn, LLCDMeshData** meshDataOut) -{ - static LLCDMeshData meshData; - memset( &meshData, 0, sizeof(LLCDMeshData) ); - *meshDataOut = &meshData; -} - diff --git a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h b/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h deleted file mode 100644 index 9ae879efb4..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h +++ /dev/null @@ -1,92 +0,0 @@ -/** -* @file LLConvexDecompositionStubImpl.h -* @author falcon@lindenlab.com -* @brief A stub implementation of LLConvexDecomposition -* -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 20112010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_CONVEX_DECOMP_UTIL_H -#define LL_CONVEX_DECOMP_UTIL_H - -#include "llconvexdecomposition.h" - -class LLConvexDecompositionImpl : public LLConvexDecomposition -{ - public: - - virtual ~LLConvexDecompositionImpl() {} - - static LLConvexDecomposition* getInstance(); - static LLCDResult initSystem(); - static LLCDResult initThread(); - static LLCDResult quitThread(); - static LLCDResult quitSystem(); - - void genDecomposition(int& decomp); - void deleteDecomposition(int decomp); - void bindDecomposition(int decomp); - - // Sets *paramsOut to the address of the LLCDParam array and returns - // the length of the array - int getParameters(const LLCDParam** paramsOut) - { - *paramsOut = NULL; - return 0; - } - - int getStages(const LLCDStageData** stagesOut) - { - *stagesOut = NULL; - return 0; - } - - // Set a parameter by name. Returns false if out of bounds or unsupported parameter - LLCDResult setParam(const char* name, float val); - LLCDResult setParam(const char* name, int val); - LLCDResult setParam(const char* name, bool val); - LLCDResult setMeshData( const LLCDMeshData* data, bool vertex_based ); - LLCDResult registerCallback(int stage, llcdCallbackFunc callback ); - - LLCDResult executeStage(int stage); - - int getNumHullsFromStage(int stage); - - LLCDResult getHullFromStage( int stage, int hull, LLCDHull* hullOut ); - LLCDResult getSingleHull( LLCDHull* hullOut ) ; - - // TODO: Implement lock of some kind to disallow this call if data not yet ready - LLCDResult getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut); - LLCDResult getMeshFromHull( LLCDHull* hullIn, LLCDMeshData* meshOut ); - - // For visualizing convex hull shapes in the viewer physics shape display - LLCDResult generateSingleHullMeshFromMesh( LLCDMeshData* meshIn, LLCDMeshData* meshOut); - - /// Debug - void loadMeshData(const char* fileIn, LLCDMeshData** meshDataOut); - - private: - LLConvexDecompositionImpl() {} -}; - -#endif //LL_CONVEX_DECOMP_UTIL_H - diff --git a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp b/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp deleted file mode 100644 index 8ad13532f2..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/** -* @file LLPathingLibStubImpl.cpp -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPathingLib -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 20112010, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include "llpathinglib.h" -#include "LLPathingLibStubImpl.h" - -#include "llsd.h" - -//============================================================================= -LLPathingLibImpl::LLPathingLibImpl() -{ -} - -LLPathingLibImpl::~LLPathingLibImpl() -{ - -} - -LLPathingLib* LLPathingLibImpl::getInstance() -{ - return NULL; -} - - -LLPathingLib::LLPLResult LLPathingLibImpl::initSystem() -{ - return LLPL_NOT_IMPLEMENTED; -} - -LLPathingLib::LLPLResult LLPathingLibImpl::quitSystem() -{ - return LLPL_NOT_IMPLEMENTED; -} - -LLPathingLib::LLPLResult LLPathingLibImpl::extractNavMeshSrcFromLLSD( const LLSD::Binary& dataBlock, int dir ) -{ - return LLPL_NOT_IMPLEMENTED; -} - -void LLPathingLibImpl::processNavMeshData() -{ -} - -LLPathingLibImpl::LLPLResult LLPathingLibImpl::generatePath( const PathingPacket& pathingPacket ) -{ - return LLPL_NOT_IMPLEMENTED; -} - -void LLPathingLibImpl::setNavMeshMaterialType( LLPLCharacterType materialType ) -{ -} - -void LLPathingLibImpl::setNavMeshColors( const NavMeshColors& color ) -{ -} - -void LLPathingLibImpl::renderNavMesh() -{ -} - -void LLPathingLibImpl::renderNavMeshEdges() -{ -} - -void LLPathingLibImpl::renderNavMeshShapesVBO( U32 shapeRenderFlags ) -{ -} - -void LLPathingLibImpl::renderPath() -{ -} - -void LLPathingLibImpl::renderPathBookend( LLRender& gl, LLPathingLib::LLPLPathBookEnd type ) -{ -} - -void LLPathingLibImpl::cleanupVBOManager() -{ -} - -void LLPathingLibImpl::cleanupResidual() -{ -} diff --git a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h b/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h deleted file mode 100644 index 75fdb3fa0f..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h +++ /dev/null @@ -1,78 +0,0 @@ -/** -* @file LLPathingLibSubImpl.h -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPathingLib -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_PATHING_LIB_H -#define LL_PATHING_LIB_H - -#include "llpathinglib.h" - -class LLSD; - -//============================================================================= -class LLPathingLibImpl : public LLPathingLib -{ -public: - LLPathingLibImpl(); - virtual ~LLPathingLibImpl(); - - // Obtain a pointer to the actual implementation - static LLPathingLib* getInstance(); - static LLPathingLib::LLPLResult initSystem(); - static LLPathingLib::LLPLResult quitSystem(); - - //Extract and store navmesh data from the llsd datablock sent down by the server - virtual LLPLResult extractNavMeshSrcFromLLSD( const LLSD::Binary& dataBlock, int dir ); - //Stitch any stored navmeshes together - virtual void processNavMeshData(); - - //Method used to generate and visualize a path on the viewers navmesh - virtual LLPLResult generatePath( const PathingPacket& pathingPacket ); - - //Set the material type for the heatmap type - virtual void setNavMeshMaterialType( LLPLCharacterType materialType ); - //Set the various navmesh colors - virtual void setNavMeshColors( const NavMeshColors& color ); - - //The entry method to rendering the client side navmesh - virtual void renderNavMesh(); - //The entry method to rendering the client side navmesh edges - virtual void renderNavMeshEdges(); - //The entry method to render the client navmesh shapes VBO - virtual void renderNavMeshShapesVBO( U32 shapeRenderFlags ); - //The entry method to render the clients designated path - virtual void renderPath(); - //The entry method to render the capsule bookends for the clients designated path - virtual void renderPathBookend( LLRender& gl, LLPathingLib::LLPLPathBookEnd type ); - - //Method to delete any vbo's that are currently being managed by the pathing library - virtual void cleanupVBOManager(); - //Method to cleanup any allocations within the implementation - virtual void cleanupResidual(); -}; - -#endif //LL_PATHING_LIB_H - diff --git a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp b/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp deleted file mode 100644 index 2c432f94e3..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/** -* @file LLPhysicsExtensionsStubImpl.cpp -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPhysicsExtensions -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include "llphysicsextensions.h" -#include "LLPhysicsExtensionsStubImpl.h" - -//============================================================================= -LLPhysicsExtensionsImpl::LLPhysicsExtensionsImpl() -{ -} - -LLPhysicsExtensionsImpl::~LLPhysicsExtensionsImpl() -{ -} - -bool LLPhysicsExtensionsImpl::initSystem() -{ - return false; -} - -bool LLPhysicsExtensionsImpl::quitSystem() -{ - return false; -} - diff --git a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h b/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h deleted file mode 100644 index ac14da1ac3..0000000000 --- a/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h +++ /dev/null @@ -1,46 +0,0 @@ -/** -* @file LLPhysicsExtensionsSubImpl.h -* @author prep@lindenlab.com -* @brief A stubbed implementation of LLPhysicsExtensions -* -* $LicenseInfo:firstyear=2012&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2012, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_PHYSICS_EXTENSIONS_STUB_IMPL_H -#define LL_PHYSICS_EXTENSIONS_STUB_IMPL_H - -#include "llphysicsextensions.h" - -//============================================================================= -class LLPhysicsExtensionsImpl : public LLPhysicsExtensions -{ - public: - - LLPhysicsExtensionsImpl(); - virtual ~LLPhysicsExtensionsImpl(); - - static bool initSystem(); - static bool quitSystem(); -}; - -#endif //LL_PHYSICS_EXTENSIONS_STUB_IMPL_H - diff --git a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp b/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp deleted file mode 100644 index f7caf7f676..0000000000 --- a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/** -* @file llconvexdecomposition.cpp -* @author falcon@lindenlab.com -* @brief A Havok implementation of LLConvexDecomposition interface -* -* $LicenseInfo:firstyear=2011&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#if defined(_WINDOWS) -# include "windowsincludes.h" -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#if !defined(LL_CONVEX_DECOMP_STUB) -# include "LLConvexDecompositionImpl.h" -#else -# include "LLConvexDecompositionStubImpl.h" -#endif - -#include "llconvexdecomposition.h" - - -/*static */bool LLConvexDecomposition::s_isInitialized = false; - -/*static*/bool LLConvexDecomposition::isFunctional() -{ -#if !defined(LL_CONVEX_DECOMP_STUB) - return true; -#else - return false; -#endif -} - -#if !defined(LL_CONVEX_DECOMP_STUB) && defined(HK_COMPILER_CLANG) - //have to specialize before use so that generalized one not auto gen-d -HK_SINGLETON_SPECIALIZATION_DECL(LLConvexDecompositionImpl); -#endif - -/*static*/LLConvexDecomposition* LLConvexDecomposition::getInstance() -{ - if ( !s_isInitialized ) - { - return NULL; - } - else - { -#if !defined(LL_CONVEX_DECOMP_STUB) - return &hkSingleton<LLConvexDecompositionImpl>::getInstance(); -#else - return LLConvexDecompositionImpl::getInstance(); -#endif - } -} - -/*static */LLCDResult LLConvexDecomposition::initSystem() -{ - LLCDResult result = LLConvexDecompositionImpl::initSystem(); - if ( result == LLCD_OK ) - { - s_isInitialized = true; - } - return result; -} - -/*static */LLCDResult LLConvexDecomposition::initThread() -{ - return LLConvexDecompositionImpl::initThread(); -} - -/*static */LLCDResult LLConvexDecomposition::quitThread() -{ - return LLConvexDecompositionImpl::quitThread(); -} - -/*static */LLCDResult LLConvexDecomposition::quitSystem() -{ - return LLConvexDecompositionImpl::quitSystem(); -} - - diff --git a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h b/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h deleted file mode 100644 index 10c6d55315..0000000000 --- a/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h +++ /dev/null @@ -1,231 +0,0 @@ -/** - * @file llconvexdecomposition.cpp - * @brief LLConvexDecomposition interface definition - * - * $LicenseInfo:firstyear=2011&license=lgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_CONVEX_DECOMPOSITION -#define LL_CONVEX_DECOMPOSITION - -typedef int bool32; - -#if defined(_WIN32) || defined(_WIN64) -#define LLCD_CALL __cdecl -#else -#define LLCD_CALL -#endif - -struct LLCDParam -{ - enum LLCDParamType - { - LLCD_INVALID = 0, - LLCD_INTEGER, - LLCD_FLOAT, - LLCD_BOOLEAN, - LLCD_ENUM - }; - - struct LLCDEnumItem - { - const char* mName; - int mValue; - }; - - union LLCDValue - { - float mFloat; - int mIntOrEnumValue; - bool32 mBool; - }; - - union LLCDParamDetails - { - struct { - LLCDValue mLow; - LLCDValue mHigh; - LLCDValue mDelta; - } mRange; - - struct { - int mNumEnums; - LLCDEnumItem* mEnumsArray; - } mEnumValues; - }; - - const char* mName; - const char* mDescription; - LLCDParamType mType; - LLCDParamDetails mDetails; - LLCDValue mDefault; - int mStage; - - // WARNING: Only the LLConvexDecomposition implementation - // should change this value - int mReserved; -}; - -struct LLCDStageData -{ - const char* mName; - const char* mDescription; - bool32 mSupportsCallback; -}; - -struct LLCDMeshData -{ - enum IndexType - { - INT_16, - INT_32 - }; - - const float* mVertexBase; - int mVertexStrideBytes; - int mNumVertices; - const void* mIndexBase; - IndexType mIndexType; - int mIndexStrideBytes; - int mNumTriangles; -}; - -struct LLCDHull -{ - const float* mVertexBase; - int mVertexStrideBytes; - int mNumVertices; -}; - -enum LLCDResult -{ - LLCD_OK = 0, - LLCD_UNKOWN_ERROR, - LLCD_NULL_PTR, - LLCD_INVALID_STAGE, - LLCD_UNKNOWN_PARAM, - LLCD_BAD_VALUE, - LLCD_REQUEST_OUT_OF_RANGE, - LLCD_INVALID_MESH_DATA, - LLCD_INVALID_HULL_DATA, - LLCD_STAGE_NOT_READY, - LLCD_INVALID_THREAD, - LLCD_NOT_IMPLEMENTED -}; - -// This callback will receive a string describing the current subtask being performed -// as well as a pair of numbers indicating progress. (The values should not be interpreted -// as a completion percentage as 'current' may be greater than 'final'.) -// If the callback returns zero, the decomposition will be terminated -typedef int (LLCD_CALL *llcdCallbackFunc)(const char* description, int current, int final); - -class LLConvexDecomposition -{ -public: - // Obtain a pointer to the actual implementation - static LLConvexDecomposition* getInstance(); - - /// @returns false if this is the stub - static bool isFunctional(); - - static LLCDResult initSystem(); - static LLCDResult initThread(); - static LLCDResult quitThread(); - static LLCDResult quitSystem(); - - // Generate a decomposition object handle - virtual void genDecomposition(int& decomp) = 0; - // Delete decomposition object handle - virtual void deleteDecomposition(int decomp) = 0; - // Bind given decomposition handle - // Commands operate on currently bound decomposition - virtual void bindDecomposition(int decomp) = 0; - - // Sets *paramsOut to the address of the LLCDParam array and returns - // the number of parameters - virtual int getParameters(const LLCDParam** paramsOut) = 0; - - - // Sets *stagesOut to the address of the LLCDStageData array and returns - // the number of stages - virtual int getStages(const LLCDStageData** stagesOut) = 0; - - - // Set a parameter by name. Pass enum values as integers. - virtual LLCDResult setParam(const char* name, float val) = 0; - virtual LLCDResult setParam(const char* name, int val) = 0; - virtual LLCDResult setParam(const char* name, bool val) = 0; - - - // Set incoming mesh data. Data is copied to local buffers and will - // persist until the next setMeshData call - virtual LLCDResult setMeshData( const LLCDMeshData* data, bool vertex_based ) = 0; - - - // Register a callback to be called periodically during the specified stage - // See the typedef above for more information - virtual LLCDResult registerCallback( int stage, llcdCallbackFunc callback ) = 0; - - - // Execute the specified decomposition stage - virtual LLCDResult executeStage(int stage) = 0; - virtual LLCDResult buildSingleHull() = 0 ; - - - // Gets the number of hulls generated by the specified decompositions stage - virtual int getNumHullsFromStage(int stage) = 0; - - - // Populates hullOut to reference the internal copy of the requested hull - // The data will persist only until the next executeStage call for that stage. - virtual LLCDResult getHullFromStage( int stage, int hull, LLCDHull* hullOut ) = 0; - - virtual LLCDResult getSingleHull( LLCDHull* hullOut ) = 0 ; - - - // TODO: Implement lock of some kind to disallow this call if data not yet ready - // Populates the meshDataOut to reference the utility's copy of the mesh geometry - // for the hull and stage specified. - // You must copy this data if you want to continue using it after the next executeStage - // call - virtual LLCDResult getMeshFromStage( int stage, int hull, LLCDMeshData* meshDataOut) = 0; - - - // Creates a mesh from hullIn and temporarily stores it internally in the utility. - // The mesh data persists only until the next call to getMeshFromHull - virtual LLCDResult getMeshFromHull( LLCDHull* hullIn, LLCDMeshData* meshOut ) = 0; - - // Takes meshIn, generates a single convex hull from it, converts that to a mesh - // stored internally, and populates meshOut to reference the internally stored data. - // The data is persistent only until the next call to generateSingleHullMeshFromMesh - virtual LLCDResult generateSingleHullMeshFromMesh( LLCDMeshData* meshIn, LLCDMeshData* meshOut) = 0; - - // - /// Debug - virtual void loadMeshData(const char* fileIn, LLCDMeshData** meshDataOut) = 0; - -private: - static bool s_isInitialized; -}; - -#endif //LL_CONVEX_DECOMPOSITION - diff --git a/indra/llprimitive/llphysicsextensions/llpathinglib.cpp b/indra/llprimitive/llphysicsextensions/llpathinglib.cpp deleted file mode 100644 index 1a6017c4b8..0000000000 --- a/indra/llprimitive/llphysicsextensions/llpathinglib.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/** -* @file llpathinglib.cpp -* @author prep@lindenlab.com -* @brief LLPathingLib core creation methods -* -* $LicenseInfo:firstyear=2012&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#if defined(_WINDOWS) -# include "windowsincludes.h" -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -#if !defined(LL_PATHING_LIB_STUB) -# include "LLPathingLibImpl.h" -#else -# include "LLPathingLibStubImpl.h" -#endif - -#include "llpathinglib.h" - -//disable the undefined symbol optimization -//#pragma warning (disable : 4221) - -//============================================================================= - -/*static */bool LLPathingLib::s_isInitialized = false; - -//============================================================================= - - -/*static*/bool LLPathingLib::isFunctional() -{ -#if !defined(LL_PATHING_LIB_STUB) - return true; -#else - return false; -#endif -} - -#if !defined(LL_PATHING_LIB_STUB) && defined(HK_COMPILER_CLANG) - //have to specialize before use so that generalized one not auto gen-d -HK_SINGLETON_SPECIALIZATION_DECL(LLPathingLibImpl); -#endif - -/*static*/LLPathingLib* LLPathingLib::getInstance() -{ - if ( !s_isInitialized ) - { - return NULL; - } - else - { -#if !defined(LL_PATHING_LIB_STUB) - return &hkSingleton<LLPathingLibImpl>::getInstance(); -#else - return LLPathingLibImpl::getInstance(); -#endif - } -} - -//============================================================================= - -/*static */LLPathingLib::LLPLResult LLPathingLib::initSystem() -{ - if ( LLPathingLibImpl::initSystem() == LLPL_OK ) - { - s_isInitialized = true; - return LLPL_OK; - } - return LLPL_UNKOWN_ERROR; -} -//============================================================================= -/*static */LLPathingLib::LLPLResult LLPathingLib::quitSystem() -{ - LLPLResult quitResult = LLPL_UNKOWN_ERROR; - - if (s_isInitialized) - { - quitResult = LLPathingLibImpl::quitSystem(); - s_isInitialized = false; - } - - return quitResult; -} -//============================================================================= - diff --git a/indra/llprimitive/llphysicsextensions/llpathinglib.h b/indra/llprimitive/llphysicsextensions/llpathinglib.h deleted file mode 100644 index c8c7410797..0000000000 --- a/indra/llprimitive/llphysicsextensions/llpathinglib.h +++ /dev/null @@ -1,187 +0,0 @@ -/** - * @file llpathinglib.cpp - * @author prep@lindenlab.com - * @brief LLPathingLib interface definition - * - * $LicenseInfo:firstyear=2012&license=lgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_PATHING_LIBRARY -#define LL_PATHING_LIBRARY - -#include "llpreprocessor.h" -#include "llsd.h" -#include "v3dmath.h" -#include "v4math.h" - -#include "v4color.h" -#include "v4coloru.h" -#include "llphysicsextensions.h" - -typedef int bool32; - -#if defined(_WIN32) || defined(_WIN64) -#define LLCD_CALL __cdecl -#else -#define LLCD_CALL -#endif - -class LLRender; - -//============================================================================= -class LLPathingLib -{ - -public: - enum LLShapeType - { - LLST_WalkableObjects = 0, - LLST_ObstacleObjects, - LLST_MaterialPhantoms, - LLST_ExclusionPhantoms, - LLST_MaxShapeTypes = LLST_ExclusionPhantoms+1, - LLST_None = LLST_MaxShapeTypes+2, - LLST_SimpleBox = LLST_None+1, - LLST_SimpleCapsule = LLST_SimpleBox+1, - }; - - enum LLShapeTypeFlag - { - LLSTB_WalkableObjects = 0x1 << 1, - LLSTB_ObstacleObjects = 0x1 << 2, - LLSTB_MaterialPhantoms = 0x1 << 3, - LLSTB_ExclusionPhantoms = 0x1 << 4, - LLSTB_None = 0x1 << 5 - }; - - enum LLPLPathBookEnd - { - LLPL_START = 0, - LLPL_END, - }; - - enum LLPLResult - { - LLPL_OK = 0, - LLPL_NOTSET, - LLPL_ERROR, - LLPL_NO_NAVMESH, - LLPL_UNKOWN_ERROR, - LLPL_NO_PATH, - LLPL_PATH_GENERATED_OK, - LLPL_NOT_IMPLEMENTED, - }; - - enum LLPLCharacterType - { - LLPL_CHARACTER_TYPE_A = 4, - LLPL_CHARACTER_TYPE_B = 3, - LLPL_CHARACTER_TYPE_C = 2, - LLPL_CHARACTER_TYPE_D = 1, - LLPL_CHARACTER_TYPE_NONE = 0 - }; - - struct PathingPacket - { - PathingPacket() : mHasPointA(false), mHasPointB(false), mCharacterWidth(0.0f), mCharacterType(LLPL_CHARACTER_TYPE_NONE) {} - bool mHasPointA; - LLVector3 mStartPointA; - LLVector3 mEndPointA; - bool mHasPointB; - LLVector3 mStartPointB; - LLVector3 mEndPointB; - F32 mCharacterWidth; - LLPLCharacterType mCharacterType; - }; - - struct NavMeshColors - { - LLColor4U mWalkable; - LLColor4U mObstacle; - LLColor4U mMaterial; - LLColor4U mExclusion; - LLColor4U mConnectedEdge; - LLColor4U mBoundaryEdge; - LLColor4 mHeatColorBase; - LLColor4 mHeatColorMax; - LLColor4U mFaceColor; - LLColor4U mStarValid; - LLColor4U mStarInvalid; - LLColor4U mTestPath; - LLColor4U mWaterColor; - }; - -public: - //Ctor - LLPathingLib() {} - virtual ~LLPathingLib() {} - - /// @returns false if this is the stub - static bool isFunctional(); - - // Obtain a pointer to the actual implementation - static LLPathingLib* getInstance(); - static LLPathingLib::LLPLResult initSystem(); - static LLPathingLib::LLPLResult quitSystem(); - - //Extract and store navmesh data from the llsd datablock sent down by the server - virtual LLPLResult extractNavMeshSrcFromLLSD( const LLSD::Binary& dataBlock, int dir ) = 0; - //Stitch any stored navmeshes together - virtual void processNavMeshData( ) = 0; - - //Method used to generate and visualize a path on the viewers navmesh - virtual LLPLResult generatePath( const PathingPacket& pathingPacket ) = 0; - - //Set the material type for the heatmap type - virtual void setNavMeshMaterialType( LLPLCharacterType materialType ) = 0; - //Set the various navmesh colors - virtual void setNavMeshColors( const NavMeshColors& color ) = 0; - - //The entry method to rendering the client side navmesh - virtual void renderNavMesh() = 0; - //The entry method to rendering the client side navmesh edges - virtual void renderNavMeshEdges() = 0; - //The entry method to render the client navmesh shapes VBO - virtual void renderNavMeshShapesVBO( U32 shapeRenderFlags ) = 0; - //The entry method to render the clients designated path - virtual void renderPath() = 0; - //The entry method to render the capsule bookends for the clients designated path - virtual void renderPathBookend( LLRender& gl, LLPathingLib::LLPLPathBookEnd type ) = 0; - //Renders all of the generated simple shapes (using their default transforms) - virtual void renderSimpleShapes( LLRender& gl, F32 regionsWaterHeight ) = 0; - - //Method called from second life to create a capsule from properties of a character - virtual void createPhysicsCapsuleRep( F32 length, F32 radius, BOOL horizontal, const LLUUID& id ) = 0; - //Removes any cached physics capsule using a list of cached uuids - virtual void cleanupPhysicsCapsuleRepResiduals() = 0; - //Renders a selected uuids physics rep - virtual void renderSimpleShapeCapsuleID( LLRender& gl, const LLUUID& id, const LLVector3& pos, const LLQuaternion& rot ) = 0; - - //Method to delete any vbo's that are currently being managed by the pathing library - virtual void cleanupVBOManager( ) = 0; - //Method to cleanup any allocations within the implementation - virtual void cleanupResidual( ) = 0; -private: - static bool s_isInitialized; -}; - -#endif //LL_PATHING_LIBRARY diff --git a/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp b/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp deleted file mode 100644 index 9bb4522a23..0000000000 --- a/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/** -* @file llphysicsextensions.cpp -* @author nyx@lindenlab.com -* @brief LLPhysicsExtensions core initialization methods -* -* $LicenseInfo:firstyear=2012&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#if defined(_WINDOWS) -# include "windowsincludes.h" -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -#include "llphysicsextensions.h" - -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) -# include "LLPhysicsExtensionsImpl.h" -#else -# include "LLPhysicsExtensionsStubImpl.h" -#endif - - -//disable the undefined symbol optimization -//#pragma warning (disable : 4221) - -//============================================================================= - -/*static */bool LLPhysicsExtensions::s_isInitialized = false; - - -/*static*/bool LLPhysicsExtensions::isFunctional() -{ -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) - return true; -#else - return false; -#endif -} - -//============================================================================= - -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) && defined(HK_COMPILER_CLANG) - //have to specialize before use so that generalized one not auto gen-d -HK_SINGLETON_SPECIALIZATION_DECL(LLPhysicsExtensionsImpl); -#endif - -/*static*/LLPhysicsExtensions* LLPhysicsExtensions::getInstance() -{ - if ( !s_isInitialized ) - { - return NULL; - } - else - { -#if !defined(LL_PHYSICS_EXTENSIONS_STUB) - return &hkSingleton<LLPhysicsExtensionsImpl>::getInstance(); -#else - return LLPhysicsExtensionsImpl::getInstance(); -#endif - } -} - -//============================================================================= - -/*static */bool LLPhysicsExtensions::initSystem() -{ - bool result = LLPhysicsExtensionsImpl::initSystem(); - if ( result ) - { - s_isInitialized = true; - } - return result; -} -//============================================================================= -/*static */bool LLPhysicsExtensions::quitSystem() -{ - return LLPhysicsExtensionsImpl::quitSystem(); -} -//============================================================================= - diff --git a/indra/llprimitive/llphysicsextensions/llphysicsextensions.h b/indra/llprimitive/llphysicsextensions/llphysicsextensions.h deleted file mode 100644 index be479f5d8a..0000000000 --- a/indra/llprimitive/llphysicsextensions/llphysicsextensions.h +++ /dev/null @@ -1,59 +0,0 @@ -/** -* @file llphysicsextensions.h -* @author nyx@lindenlab.com -* @brief LLPhysicsExtensions core shared initialization -* routines -* -* $LicenseInfo:firstyear=2012&license=lgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2011, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#ifndef LL_PHYSICS_EXTENSIONS -#define LL_PHYSICS_EXTENSIONS - -#include "llpreprocessor.h" -#include "llsd.h" -#include "v3dmath.h" - -#define LLPHYSICSEXTENSIONS_VERSION "1.0" - -typedef int bool32; - -class LLPhysicsExtensions -{ - -public: - // Obtain a pointer to the actual implementation - static LLPhysicsExtensions* getInstance(); - - /// @returns false if this is the stub - static bool isFunctional(); - - static bool initSystem(); - static bool quitSystem(); - -private: - static bool s_isInitialized; -}; - -#endif //LL_PATHING_LIBRARY - - diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 439cf46684..f21f0327fe 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -307,16 +307,15 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read) GLuint64 primitives_generated = 0; glGetQueryObjectui64v(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated); #else - GLuint samples_passed = 0; - glGetQueryObjectuiv(mSamplesQuery, GL_QUERY_RESULT, &samples_passed); - GLuint primitives_generated = 0; glGetQueryObjectuiv(mPrimitivesQuery, GL_QUERY_RESULT, &primitives_generated); #endif sTotalTimeElapsed += time_elapsed; +#if GL_VERSION_1_5 sTotalSamplesDrawn += samples_passed; mSamplesDrawn += samples_passed; +#endif U32 tri_count = (U32)primitives_generated / 3; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 23216e586f..a9b47960b7 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2518,7 +2518,9 @@ bool LLImageGL::scaleDown(S32 desired_discard) sScratchPBOSize = (U32)size; } +#if GL_VERSION_1_3 glGetTexImage(mTarget, mip, mFormatPrimary, mFormatType, nullptr); +#endif free_tex_image(mTexName); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index ca10e10b00..fd34a94ae8 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -2149,9 +2149,11 @@ void LLRender::debugTexUnits(void) case LLTexUnit::TT_TEXTURE: LL_CONT << "Texture 2D"; break; +#if GL_VERSION_3_1 case LLTexUnit::TT_RECT_TEXTURE: LL_CONT << "Texture Rectangle"; break; +#endif case LLTexUnit::TT_CUBE_MAP: LL_CONT << "Cube Map"; break; diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index d198b0cd7c..4e568b2b2b 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -67,10 +67,16 @@ public: typedef enum { TT_TEXTURE = 0, // Standard 2D Texture +#if GL_VERSION_3_1 TT_RECT_TEXTURE, // Non power of 2 texture +#endif TT_CUBE_MAP, // 6-sided cube map texture +#if GL_VERSION_4_0 TT_CUBE_MAP_ARRAY, // Array of cube maps +#endif +#if GL_VERSION_3_2 TT_MULTISAMPLE_TEXTURE, // see GL_ARB_texture_multisample +#endif TT_TEXTURE_3D, // standard 3D Texture TT_NONE, // No texture type is currently enabled } eTextureType; diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index af068d5dd6..1ff0dec23a 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -255,12 +255,14 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) stop_glerror(); } +#if GL_VERSION_3_1 if (mUsage != LLTexUnit::TT_RECT_TEXTURE) { gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_MIRROR); stop_glerror(); } else +#endif { // ATI doesn't support mirrored repeat for rectangular textures. gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); @@ -429,8 +431,8 @@ void LLRenderTarget::bindTarget() if (mTex.empty()) { //no color buffer to draw to - GLenum drawbuffers[] = {GL_NONE}; - glDrawBuffers(0, drawbuffers); + GLenum buffers[] = {GL_NONE}; + glDrawBuffers(0, buffers); glReadBuffer(GL_NONE); } else @@ -548,7 +550,8 @@ void LLRenderTarget::flush() sCurResX = gGLViewport[2]; sCurResY = gGLViewport[3]; glReadBuffer(GL_BACK); - glDrawBuffer(GL_BACK); + GLenum drawbuffers[] = {GL_BACK}; + glDrawBuffers(1, drawbuffers); } } diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 4f3d2328aa..0d7c98294f 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -59,12 +59,6 @@ bool LLFocusableElement::handleUnicodeChar(llwchar uni_char, bool called_from_pa } // virtual -bool LLFocusableElement::handleUnicodeString(char *uni_str, bool editing, bool called_from_parent) -{ - return FALSE; -} - -// virtual bool LLFocusableElement::wantsKeyUpKeyDown() const { return false; diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 1ca6f50354..1fa0ac137e 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -59,7 +59,6 @@ public: virtual bool handleKey(KEY key, MASK mask, bool called_from_parent); virtual bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); virtual bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - virtual bool handleUnicodeString(char *uni_str, bool editing, bool called_from_parent); /** * If true this LLFocusableElement wants to receive KEYUP and KEYDOWN messages diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index ac7948f735..60b6115b34 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1031,25 +1031,6 @@ void LLLineEditor::addChar(const llwchar uni_char) getWindow()->hideCursorUntilMouseMove(); } -void LLLineEditor::addString(char *s, bool editing) -{ - if (hasSelection()) - deleteSelection(); - else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) { - if (!prevalidateInput(mText.getWString() - .substr(getCursor(), 1))) - return; - mText.erase(getCursor(), 1); - } else if (editing) { - mText.clear(); - setCursor(0); - } - mText.insert(getCursor(), utf8str_to_wstring(s)); - if (editing) setCursor(strlen(s)); - else setCursor(getCursor() + 1); - getWindow()->hideCursorUntilMouseMove(); -} - // Extends the selection box to the new cursor position void LLLineEditor::extendSelection( S32 new_cursor_pos ) { @@ -1704,36 +1685,6 @@ bool LLLineEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLLineEditor::handleUnicodeStringHere(char *uni_str, bool editing) -{ - auto handled = FALSE; - - if ((gFocusMgr.getKeyboardFocus() == this) - && getVisible() && !mReadOnly) { - handled = TRUE; - LLLineEditorRollback rollback(this); - - addString(uni_str, editing); - - mKeystrokeTimer.reset(); - deselect(); - auto need_to_rollback = mPrevalidator - && !mPrevalidator.validate(mText.getWString()); - - if (need_to_rollback) { - rollback.doRollback(this); - LLUI::getInstance()->reportBadKeystroke(); - mPrevalidator.showLastErrorUsingTimeout(); - } - - if (!need_to_rollback && handled) { - onKeystroke(); - mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); - } - } - - return handled; -} bool LLLineEditor::canDoDelete() const { diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 3a39a7363d..cdd22413e7 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -133,7 +133,6 @@ public: /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; /*virtual*/ bool handleKeyHere(KEY key, MASK mask) override; /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char) override; - /*virtual*/ bool handleUnicodeStringHere(char *uni_str, bool editing) override; /*virtual*/ void onMouseCaptureLost() override; // LLEditMenuHandler overrides @@ -301,7 +300,6 @@ public: void removeChar(); void addChar(const llwchar c); - void addString(char *s, bool editing); void setCursorAtLocalPos(S32 local_mouse_x); S32 findPixelNearestPos(S32 cursor_offset = 0) const; S32 calcCursorPos(S32 mouse_x); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index cbbb164cb2..3537c764b9 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -167,50 +167,6 @@ private: }; /////////////////////////////////////////////////////////////////// -class LLTextEditor::TextCmdAddString : public LLTextBase::TextCmd -{ -public: - TextCmdAddString(S32 pos, bool group_with_next, char *str, - LLTextSegmentPtr segment) : - TextCmd(pos, group_with_next, segment), - mWString(utf8str_to_wstring(str)), - mBlockExtensions(FALSE) - { - } - virtual void blockExtensions() - { - mBlockExtensions = TRUE; - } - virtual bool canExtend(S32 pos) const - { - if (!mSegments.empty()) return FALSE; - - return !mBlockExtensions - && (pos == getPosition() + (S32)mWString.length()); - } - virtual bool execute(LLTextBase* editor, S32* delta) - { - *delta = insert(editor, getPosition(), mWString); - LLWStringUtil::truncate(mWString, *delta); - return (*delta != 0); - } - virtual S32 undo(LLTextBase* editor) - { - remove(editor, getPosition(), mWString.length()); - return getPosition(); - } - virtual S32 redo(LLTextBase* editor) - { - insert(editor, getPosition(), mWString); - return getPosition() + mWString.length(); - } - -private: - LLWString mWString; - bool mBlockExtensions; -}; - -/////////////////////////////////////////////////////////////////// class LLTextEditor::TextCmdOverwriteChar : public LLTextBase::TextCmd { @@ -1208,18 +1164,6 @@ S32 LLTextEditor::addChar(S32 pos, llwchar wc) return execute(new TextCmdAddChar(pos, false, wc, LLTextSegmentPtr())); } -S32 LLTextEditor::addString(S32 pos, char *str) -{ - if ((wstring_utf8_length(getWText()) + strlen(str)) - > mMaxTextByteLength) { - make_ui_sound("UISndBadKeystroke"); - return 0; - } - - return execute(new TextCmdAddString(pos, FALSE, str, - LLTextSegmentPtr())); -} - void LLTextEditor::addChar(llwchar wc) { if (!getEnabled()) @@ -1257,38 +1201,6 @@ void LLTextEditor::addChar(llwchar wc) } } -void LLTextEditor::addString(char *str, bool editing) -{ - if (!getEnabled()) - return; - if (hasSelection()) - deleteSelection(TRUE); - else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) - removeChar(mCursorPos); - else if (editing) { - clear(); - setCursorPos(0); - } - - setCursorPos(mCursorPos + addString(mCursorPos, str)); - - if (!mReadOnly && mAutoreplaceCallback != NULL) { - S32 replacement_start; - S32 replacement_length; - LLWString replacement_string; - S32 new_cursor_pos = mCursorPos; - mAutoreplaceCallback(replacement_start, replacement_length, - replacement_string, new_cursor_pos, getWText()); - - if (replacement_length > 0 || !replacement_string.empty()) { - remove(replacement_start, replacement_length, true); - insert(replacement_start, replacement_string, false, - LLTextSegmentPtr()); - setCursorPos(new_cursor_pos); - } - } -} - void LLTextEditor::showEmojiHelper() { if (mReadOnly || !mShowEmojiHelper) @@ -2060,24 +1972,6 @@ bool LLTextEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -bool LLTextEditor::handleUnicodeStringHere(char *uni_str, bool editing) -{ - auto handled = FALSE; - - if (!mReadOnly) { - addString(uni_str, editing); - getWindow()->hideCursorUntilMouseMove(); - handled = TRUE; - } - - if (handled) { - resetCursorBlink(); - deselect(); - onKeyStroke(); - } - - return handled; -} // virtual bool LLTextEditor::canDoDelete() const diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 47dcadf090..0b5acf19a1 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -105,7 +105,6 @@ public: virtual bool handleKeyHere(KEY key, MASK mask ); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual bool handleUnicodeStringHere(char *uni_str, bool editing); virtual void onMouseCaptureLost(); @@ -250,8 +249,6 @@ protected: // Undoable operations void addChar(llwchar c); // at mCursorPos S32 addChar(S32 pos, llwchar wc); - void addString(char *s, bool editing); - S32 addString(S32 pos, char *str); void addLineBreakChar(bool group_together = false); S32 overwriteChar(S32 pos, llwchar wc); void removeChar(); @@ -313,7 +310,6 @@ private: // Concrete TextCmd sub-classes used by the LLTextEditor base class class TextCmdInsert; class TextCmdAddChar; - class TextCmdAddString; class TextCmdOverwriteChar; class TextCmdRemove; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index f2a1e16aad..7d6c937b85 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1080,31 +1080,12 @@ bool LLView::handleUnicodeChar(llwchar uni_char, bool called_from_parent) return handled; } -bool LLView::handleUnicodeString(char *uni_str, bool editing, bool called_from_parent) -{ - auto handled = FALSE; - - if (getVisible() && getEnabled() && !handled) { - handled = handleUnicodeStringHere(uni_str, editing); - if (handled && LLView::sDebugKeys) - LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL; - } - - if (!handled && !called_from_parent && mParentView) - handled = mParentView->handleUnicodeString(uni_str, editing, FALSE); - - return handled; -} bool LLView::handleUnicodeCharHere(llwchar uni_char ) { return false; } -bool LLView::handleUnicodeStringHere(char *uni_str, bool editing) -{ - return FALSE; -} bool LLView::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 876bfafaa3..710ec3d05e 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -385,7 +385,6 @@ public: /* virtual */ bool handleKey(KEY key, MASK mask, bool called_from_parent); /* virtual */ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); /* virtual */ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - /* virtual */ bool handleUnicodeString(char *uni_str, bool editing, bool called_from_parent); virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, @@ -519,7 +518,6 @@ public: virtual bool handleKeyHere(KEY key, MASK mask); virtual bool handleKeyUpHere(KEY key, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual bool handleUnicodeStringHere(char *uni_str, bool editing); virtual void handleReshape(const LLRect& rect, bool by_user); virtual void dirtyRect(); diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index 9f050daa77..7700eeb7c6 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -58,7 +58,7 @@ elseif (DARWIN) set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs") endif (USE_BUGSPLAT) -elseif (LINUX) +elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) target_link_libraries(llwebrtc PRIVATE ll::webrtc) endif (WINDOWS) @@ -82,7 +82,7 @@ if (INSTALL) set(_LIB ../Frameworks) elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) + elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) set(_LIB lib64) else (DARWIN) set(_LIB lib) diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp index 624ecd5030..c160382c17 100644 --- a/indra/llwindow/llwindowcallbacks.cpp +++ b/indra/llwindow/llwindowcallbacks.cpp @@ -52,10 +52,6 @@ bool LLWindowCallbacks::handleUnicodeChar(llwchar uni_char, MASK mask) return false; } -bool LLWindowCallbacks::handleUnicodeString(char *uni_str, bool editing) -{ - return FALSE; -} bool LLWindowCallbacks::handleMouseDown(LLWindow *window, const LLCoordGL pos, MASK mask) { diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h index 74660e1705..63b585231f 100644 --- a/indra/llwindow/llwindowcallbacks.h +++ b/indra/llwindow/llwindowcallbacks.h @@ -37,7 +37,6 @@ public: virtual bool handleTranslatedKeyUp(KEY key, MASK mask); virtual void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level); virtual bool handleUnicodeChar(llwchar uni_char, MASK mask); - virtual bool handleUnicodeString(char *uni_str, bool editing); virtual bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); virtual bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index a78dedcd25..4ca43e06b7 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -110,6 +110,14 @@ if (DARWIN) -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib" -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib" -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_url-mt.dylib" "@loader_path/../../Frameworks/libboost_url-mt.dylib" -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib" -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib" "$<TARGET_FILE:media_plugin_cef>" @@ -137,8 +145,10 @@ if (INSTALL) elseif (LINUX) if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) + elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) set(_LIB lib64) + else (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) + set(_LIB lib) endif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) install( PROGRAMS diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 0ea874c7ae..6d005bb6d2 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -56,6 +56,14 @@ if (DARWIN) -change "/opt/local/lib/libiconv.2.dylib" "@loader_path/../../Frameworks/libiconv.2.dylib" -change "/opt/local/lib/libapr-1.0.dylib" "@loader_path/../../Frameworks/libapr-1.0.dylib" -change "/opt/local/lib/libexpat.1.dylib" "@loader_path/../../Frameworks/libexpat.1.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_context-mt.dylib" "@loader_path/../../Frameworks/libboost_context-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_fiber-mt.dylib" "@loader_path/../../Frameworks/libboost_fiber-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib" "@loader_path/../../Frameworks/libboost_filesystem-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_program_options-mt.dylib" "@loader_path/../../Frameworks/libboost_program_options-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_regex-mt.dylib" "@loader_path/../../Frameworks/libboost_regex-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib" "@loader_path/../../Frameworks/libboost_system-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib" "@loader_path/../../Frameworks/libboost_thread-mt.dylib" + -change "/opt/local/libexec/boost/1.81/lib/libboost_url-mt.dylib" "@loader_path/../../Frameworks/libboost_url-mt.dylib" -change "/opt/local/lib/libz.1.dylib" "@loader_path/../../Frameworks/libz.1.dylib" -change "/opt/local/lib/libnghttp2.14.dylib" "@loader_path/../../Frameworks/libnghttp2.14.dylib" -change "@rpath/libvlc.dylib" "@loader_path/plugins/libvlc.dylib" @@ -84,7 +92,7 @@ if (INSTALL) ) elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) + elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) set(_LIB lib64) else (DARWIN) set(_LIB lib) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index fa5eac08be..084d71aa24 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -54,12 +54,10 @@ include(LLPrimitive) if (ENABLE_MEDIA_PLUGINS) include(LibVLCPlugin) - if (DARWIN OR LINUX) - include(CEFPlugin) - endif (DARWIN OR LINUX) + include(CEFPlugin) endif (ENABLE_MEDIA_PLUGINS) -if (NOT (USESYSTEMLIBS OR HAVOK_TPV)) +if (NOT HAVOK_TPV) # When using HAVOK_TPV, the library is precompiled, so no need for this # Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball @@ -80,7 +78,7 @@ if (NOT (USESYSTEMLIBS OR HAVOK_TPV)) target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef) endif (DARWIN) endif() -endif (NOT (USESYSTEMLIBS OR HAVOK_TPV)) +endif (NOT HAVOK_TPV) set(viewer_SOURCE_FILES gltfscenemanager.cpp @@ -2093,11 +2091,11 @@ if (LINUX) CACHE STRING "Debian package section.") if (${LINUX_DISTRO} MATCHES debian) set(CPACK_DEBIAN_PACKAGE_DEPENDS - "libalut0, libaprutil1, libboost-fiber1.81.0, libboost-filesystem1.81.0, libboost-program-options1.81.0, libboost-regex1.81.0, libboost-thread1.81.0, libboost-url1.81.0, libexpat1, libfltk1.3, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0, vlc-plugin-base" + "libalut0, libaprutil1, libboost-fiber1.81.0, libboost-filesystem1.81.0, libboost-program-options1.81.0, libboost-regex1.81.0, libboost-thread1.81.0, libboost-url1.81.0, libexpat1, libfltk1.3, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" CACHE STRING "Debian package dependencies.") elseif (${LINUX_DISTRO} MATCHES ubuntu) set(CPACK_DEBIAN_PACKAGE_DEPENDS - "libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.3t64, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, libxmlrpc-epi0t64, vlc-plugin-base" + "libaprutil1t64, libboost-fiber1.83.0, libboost-filesystem1.83.0, libboost-program-options1.83.0, libboost-regex1.83.0, libboost-thread1.83.0, libboost-url1.83.0, libexpat1, libfltk1.3t64, libglu1-mesa, libhunspell-1.7-0, libmeshoptimizer2d, libnghttp2-14, libsdl2-2.0-0, liburiparser1, libvlc5, libvorbisenc2, libvorbisfile3, vlc-plugin-base" CACHE STRING "Debian package dependencies.") endif (${LINUX_DISTRO} MATCHES debian) elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) @@ -2118,13 +2116,18 @@ if (LINUX) CACHE STRING "RPM package description.") if (${LINUX_DISTRO} MATCHES fedora) set(CPACK_RPM_PACKAGE_REQUIRES - "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" + "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, boost-url, expat, fltk, mesa-libGLU, hunspell, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis" CACHE STRING "RPM package requirements.") elseif (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) set(CPACK_RPM_PACKAGE_REQUIRES "libapr-util1-0, libboost_fiber1_85_0, libboost_program_options1_85_0, libboost_regex1_85_0, libboost_thread1_85_0, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, libSDL2-2_0-0, liburiparser1, libvlc5, vlc-codecs, libvorbis0" CACHE STRING "RPM package requirements.") endif (${LINUX_DISTRO} MATCHES fedora) + elseif (${LINUX_DISTRO} MATCHES arch) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/PKGBUILD.in + ${CMAKE_BINARY_DIR}/PKGBUILD + ) endif (${LINUX_DISTRO} MATCHES debian OR ${LINUX_DISTRO} MATCHES ubuntu) endif (PACKAGE) else (USESYSTEMLIBS) @@ -2242,7 +2245,7 @@ elseif (USESYSTEMLIBS) set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} CACHE STRING "FreeBSD package origin.") set(CPACK_FREEBSD_PACKAGE_DEPS - "audio/freealut;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;devel/pcre;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" + "audio/freealut;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;devel/pcre;net/uriparser;multimedia/vlc;audio/libvorbis" CACHE STRING "FreeBSD package dependencies.") endif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) endif (LINUX) @@ -2294,13 +2297,6 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/English.lproj/InfoPlist.strings ${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings ) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_INSTALL_NAME_TOOL} - -change "/usr/local/lib/libxmlrpc-epi.0.dylib" "${AUTOBUILD_INSTALL_DIR}/lib/release/libxmlrpc-epi.0.dylib" - ${VIEWER_APP_EXE} - VERBATIM - ) else (USESYSTEMLIBS) add_custom_command( TARGET ${VIEWER_BINARY_NAME} POST_BUILD diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index 069a0e50a6..bf3a36b5d0 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -4,8 +4,6 @@ set(dirs /opt/local/lib ) -fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/MacOS/${VIEWER_CHANNEL} "" "${dirs}") - file(CREATE_LINK "../../../../Frameworks/libnghttp2.14.dylib" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libnghttp2.14.dylib" @@ -42,6 +40,51 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK + "../../../../Frameworks/libboost_atomic-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_atomic-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_context-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_context-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_fiber-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_fiber-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_filesystem-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_filesystem-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_program_options-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_program_options-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_regex-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_regex-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_system-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_system-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_thread-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_thread-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_url-mt.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_url-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK "../../../../Frameworks/libexpat.1.dylib" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libexpat.1.dylib" SYMBOLIC @@ -67,11 +110,28 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK + "../../../../Frameworks/libicudata.74.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.74.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libicui18n.74.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.74.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libicuuc.74.dylib" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.74.dylib" + SYMBOLIC + ) +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 ) +fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/MacOS/${VIEWER_CHANNEL} "" "${dirs}") + 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 (GPU).app/Contents/MacOS/DullahanHelper (GPU)" @@ -91,12 +151,33 @@ execute_process( COMMAND lipo libaprutil-1.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libaprutil-1.0.dylib + COMMAND lipo libboost_atomic-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_atomic-mt.dylib + COMMAND lipo libboost_context-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_context-mt.dylib + COMMAND lipo libboost_fiber-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_fiber-mt.dylib COMMAND lipo libboost_filesystem-mt.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libboost_filesystem-mt.dylib + COMMAND lipo libboost_program_options-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_program_options-mt.dylib + COMMAND lipo libboost_regex-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_regex-mt.dylib COMMAND lipo libboost_system-mt.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libboost_system-mt.dylib + COMMAND lipo libboost_thread-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_thread-mt.dylib + COMMAND lipo libboost_url-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_url-mt.dylib COMMAND lipo libbrotlicommon.1.1.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libbrotlicommon.1.1.0.dylib @@ -109,9 +190,9 @@ execute_process( COMMAND lipo libcollada14dom.2.3-r4.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libcollada14dom.2.3-r4.dylib - COMMAND lipo libexpat.1.9.2.dylib + COMMAND lipo libexpat.1.9.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libexpat.1.9.2.dylib + -output libexpat.1.9.3.dylib COMMAND lipo libfreetype.6.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libfreetype.6.dylib @@ -191,6 +272,7 @@ execute_process( ERROR_QUIET ) +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( COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libEGL.dylib @@ -200,13 +282,20 @@ execute_process( Frameworks/libalut.0.dylib Frameworks/libapr-1.0.dylib Frameworks/libaprutil-1.0.dylib + Frameworks/libboost_atomic-mt.dylib + Frameworks/libboost_context-mt.dylib + Frameworks/libboost_fiber-mt.dylib Frameworks/libboost_filesystem-mt.dylib + Frameworks/libboost_program_options-mt.dylib + Frameworks/libboost_regex-mt.dylib Frameworks/libboost_system-mt.dylib + Frameworks/libboost_thread-mt.dylib + Frameworks/libboost_url-mt.dylib Frameworks/libbrotlicommon.1.1.0.dylib Frameworks/libbrotlidec.1.1.0.dylib Frameworks/libbz2.1.0.8.dylib Frameworks/libcollada14dom.2.3-r4.dylib - Frameworks/libexpat.1.9.2.dylib + Frameworks/libexpat.1.9.3.dylib Frameworks/libfreetype.6.dylib Frameworks/libhunspell-1.7.0.dylib Frameworks/libiconv.2.dylib diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in index 50c381540c..2dec79c59b 100644 --- a/indra/newview/FixPackage.cmake.in +++ b/indra/newview/FixPackage.cmake.in @@ -4,8 +4,6 @@ set(dirs /opt/local/lib ) -fixup_bundle(${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/MacOS/${CPACK_BUNDLE_NAME} "" "${dirs}") - file(CREATE_LINK "../../../../Frameworks/libnghttp2.14.dylib" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libnghttp2.14.dylib" @@ -42,6 +40,51 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK + "../../../../Frameworks/libboost_atomic-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_atomic-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_context-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_context-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_fiber-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_fiber-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_filesystem-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_filesystem-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_program_options-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_program_options-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_regex-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_regex-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_system-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_system-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_thread-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_thread-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libboost_url-mt.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_url-mt.dylib" + SYMBOLIC + ) +file(CREATE_LINK "../../../../Frameworks/libexpat.1.dylib" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libexpat.1.dylib" SYMBOLIC @@ -67,11 +110,28 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK + "../../../../Frameworks/libicudata.74.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.74.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libicui18n.74.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.74.dylib" + SYMBOLIC + ) +file(CREATE_LINK + "../../../../Frameworks/libicuuc.74.dylib" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.74.dylib" + SYMBOLIC + ) +file(CREATE_LINK "../../../../Frameworks/Chromium Embedded Framework.framework" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework" SYMBOLIC ) +fixup_bundle(${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/MacOS/${CPACK_BUNDLE_NAME} "" "${dirs}") + file(CHMOD "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)" @@ -91,12 +151,33 @@ execute_process( COMMAND lipo libaprutil-1.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libaprutil-1.0.dylib + COMMAND lipo libboost_atomic-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_atomic-mt.dylib + COMMAND lipo libboost_context-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_context-mt.dylib + COMMAND lipo libboost_fiber-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_fiber-mt.dylib COMMAND lipo libboost_filesystem-mt.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libboost_filesystem-mt.dylib + COMMAND lipo libboost_program_options-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_program_options-mt.dylib + COMMAND lipo libboost_regex-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_regex-mt.dylib COMMAND lipo libboost_system-mt.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libboost_system-mt.dylib + COMMAND lipo libboost_thread-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_thread-mt.dylib + COMMAND lipo libboost_url-mt.dylib + -thin ${CMAKE_OSX_ARCHITECTURES} + -output libboost_url-mt.dylib COMMAND lipo libbrotlicommon.1.1.0.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libbrotlicommon.1.1.0.dylib @@ -109,9 +190,9 @@ execute_process( COMMAND lipo libcollada14dom.2.3-r4.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libcollada14dom.2.3-r4.dylib - COMMAND lipo libexpat.1.9.2.dylib + COMMAND lipo libexpat.1.9.3.dylib -thin ${CMAKE_OSX_ARCHITECTURES} - -output libexpat.1.9.2.dylib + -output libexpat.1.9.3.dylib COMMAND lipo libfreetype.6.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libfreetype.6.dylib @@ -191,6 +272,7 @@ execute_process( ERROR_QUIET ) +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( COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libEGL.dylib @@ -200,13 +282,20 @@ execute_process( Frameworks/libalut.0.dylib Frameworks/libapr-1.0.dylib Frameworks/libaprutil-1.0.dylib + Frameworks/libboost_atomic-mt.dylib + Frameworks/libboost_context-mt.dylib + Frameworks/libboost_fiber-mt.dylib Frameworks/libboost_filesystem-mt.dylib + Frameworks/libboost_program_options-mt.dylib + Frameworks/libboost_regex-mt.dylib Frameworks/libboost_system-mt.dylib + Frameworks/libboost_thread-mt.dylib + Frameworks/libboost_url-mt.dylib Frameworks/libbrotlicommon.1.1.0.dylib Frameworks/libbrotlidec.1.1.0.dylib Frameworks/libbz2.1.0.8.dylib Frameworks/libcollada14dom.2.3-r4.dylib - Frameworks/libexpat.1.9.2.dylib + Frameworks/libexpat.1.9.3.dylib Frameworks/libfreetype.6.dylib Frameworks/libhunspell-1.7.0.dylib Frameworks/libiconv.2.dylib diff --git a/indra/newview/PKGBUILD.in b/indra/newview/PKGBUILD.in new file mode 100644 index 0000000000..d917f216b6 --- /dev/null +++ b/indra/newview/PKGBUILD.in @@ -0,0 +1,14 @@ +# Maintainer: $ENV{USER}@${VIEWER_PACKAGE_DOMAIN_NAME} +pkgname=${VIEWER_BINARY_NAME} +pkgver=${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH} +pkgrel=${VIEWER_VERSION_REVISION} +pkgdesc="${VIEWER_PACKAGE_COMMENT}" +arch=('${CMAKE_SYSTEM_PROCESSOR}') +url="https://${VIEWER_PACKAGE_DOMAIN_NAME}" +license=('LGPL-2.1') +depends=(freealut apr-util boost-libs fltk glu hunspell libnghttp2 sdl2 uriparser vlc libvorbis) + +package() { + cd "$startdir" + make DESTDIR="$pkgdir/" install +} diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index e6d8f500a0..ab52c63a91 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -92,7 +92,7 @@ install(PROGRAMS linux_tools/launch_url.sh if (LINUX) if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) set(_LIB lib/${ARCH}-linux-gnu) - elseif (EXISTS /lib64) + elseif (EXISTS /lib64 AND NOT ${LINUX_DISTRO} MATCHES arch) set(_LIB lib64) else () set(_LIB lib) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index b47ceff446..635e5e40f5 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -295,4 +295,19 @@ is_running_function="Floater.IsOpen" is_running_parameters="performance" /> + <command name="favoritefolder" + available_in_toybox="true" + icon="Command_FavoriteFolder_Icon" + label_ref="Command_FavoriteFolder_Label" + tooltip_ref="Command_FavoriteFolder_Tooltip" + execute_function="Inventory.OpenFavoriteFolder" + is_running_function="Inventory.IsFavoriteFolderOpen" + /> + <command name="resync_animations" + available_in_toybox="true" + icon="Command_Resync_Animations" + label_ref="Command_ResyncAnimations_Label" + tooltip_ref="Command_ResyncAnimations_Tooltip" + execute_function="Tools.ResyncAnimations" + /> </commands> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bd49f003c5..42d4e7bb7f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -46,6 +46,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>IMNearbySessionFirst</key> + <map> + <key>Comment</key> + <string>Put nearby session always first(last).</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>IMShowTime</key> <map> <key>Comment</key> @@ -2546,6 +2557,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>DoubleClickZoomIn</key> + <map> + <key>Comment</key> + <string>Set double-click to zoom in on instead of IM avatar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DynamicCameraStrength</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 6b788dd78f..80a4bec57f 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -458,5 +458,16 @@ <key>Value</key> <integer>2</integer> </map> + <key>FavoriteFolder</key> + <map> + <key>Comment</key> + <string>Favorite inventory folder (UUID)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string></string> + </map> </map> </llsd> diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index deabcd9f42..0c87b60e7f 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -545,3 +545,28 @@ void LLAttachmentsMgr::spamStatusInfo() } #endif } + +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 +void LLAttachmentsMgr::refreshAttachments() +{ + if (!isAgentAvatarValid()) + return; + + for (const auto& kvpAttachPt : gAgentAvatarp->mAttachmentPoints) + { + for (const LLViewerObject* pAttachObj : kvpAttachPt.second->mAttachedObjects) + { + const LLUUID& idItem = pAttachObj->getAttachmentItemID(); + if ( (mAttachmentRequests.wasRequestedRecently(idItem)) || (pAttachObj->isTempAttachment()) ) + continue; + + AttachmentsInfo attachment; + attachment.mItemID = idItem; + attachment.mAttachmentPt = kvpAttachPt.first; + attachment.mAdd = true; + mPendingAttachments.push_back(attachment); + mAttachmentRequests.addTime(idItem); + } + } +} +// [/SL:KB] diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index 2428acfb38..de36253339 100644 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -87,6 +87,9 @@ public: bool isAttachmentStateComplete() const; + // [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 + void refreshAttachments(); + private: class LLItemRequestTimes: public std::map<LLUUID,LLTimer> diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 4cd85ac756..0c939add95 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -726,8 +726,11 @@ bool LLConversationSort::operator()(const LLConversationItem* const& a, const LL { if ((type_a == LLConversationItem::CONV_SESSION_NEARBY) || (type_b == LLConversationItem::CONV_SESSION_NEARBY)) { + if (gSavedSettings.getBOOL("IMNearbySessionFirst")) + return (type_b != LLConversationItem::CONV_SESSION_NEARBY); + else // If one is the nearby session, put nearby session *always* last - return (type_b == LLConversationItem::CONV_SESSION_NEARBY); + return (type_b == LLConversationItem::CONV_SESSION_NEARBY); } else if (sort_order == LLConversationFilter::SO_SESSION_TYPE) { diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index abf15ea9cf..3714be2ceb 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1051,6 +1051,10 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) { setSortOrderParticipants(LLConversationFilter::SO_DISTANCE); } + if ("put_nearby_session_first" == command) + { + gSavedSettings.setBOOL("IMNearbySessionFirst", !gSavedSettings.getBOOL("IMNearbySessionFirst")); + } if ("chat_preferences" == command) { LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences"); @@ -1101,6 +1105,10 @@ bool LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE); } + if ("put_nearby_session_first" == command) + { + return gSavedSettings.getBOOL("IMNearbySessionFirst"); + } if ("Translating.Enabled" == command) { return gSavedPerAccountSettings.getBOOL("TranslatingEnabled"); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 2621ce576c..bdc7fdeadc 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -556,7 +556,8 @@ void LLFloaterIMSessionTab::deleteAllChildren() std::string LLFloaterIMSessionTab::appendTime() { std::string timeStr = "[" + LLTrans::getString("TimeHour") + "]:" - "[" + LLTrans::getString("TimeMin") + "]"; + "[" + LLTrans::getString("TimeMin") + "]:" + "[" + LLTrans::getString("TimeSec") + "]"; LLSD substitution; substitution["datetime"] = (S32)time_corrected(); diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index ce419498cf..368306ded8 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -414,8 +414,10 @@ void LLHeroProbeManager::generateRadiance(LLReflectionMap* probe) gHeroRadianceGenProgram.bind(); mVertexBuffer->setBuffer(); +#if GL_VERSION_4_0 S32 channel = gHeroRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); mTexture->bind(channel); +#endif gHeroRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx); gHeroRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD); gHeroRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, mHeroProbeStrength); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ca84c30b66..5ed79a6493 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4413,6 +4413,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items { mWearables=true; } + + items.push_back(std::string("Set favorite folder")); } else { diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index dbf4821ca1..0c35a7f695 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -92,6 +92,7 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu() registrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryGalleryContextMenu::doToSelected, this, _2)); registrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::fileUploadLocation, this, _2)); + registrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryGalleryContextMenu::setFavoriteFolder, this)); registrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH)); registrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND)); registrar.add("Inventory.DoCreate", [this](LLUICtrl*, const LLSD& data) @@ -110,6 +111,7 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu() registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery))); enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2)); + enable_registrar.add("Inventory.CanSetFavoriteFolder", boost::bind(&LLInventoryGalleryContextMenu::canSetFavoriteFolder, this)); enable_registrar.add("Inventory.EnvironmentEnabled", [](LLUICtrl*, const LLSD&) { @@ -504,6 +506,25 @@ bool LLInventoryGalleryContextMenu::canSetUploadLocation(const LLSD& userdata) return true; } +void LLInventoryGalleryContextMenu::setFavoriteFolder() +{ + gSavedPerAccountSettings.setString("FavoriteFolder", mUUIDs.front().asString()); +} + +bool LLInventoryGalleryContextMenu::canSetFavoriteFolder() +{ + if (mUUIDs.size() != 1) + { + return false; + } + LLInventoryCategory* cat = gInventory.getCategory(mUUIDs.front()); + if (!cat) + { + return false; + } + return true; +} + bool is_inbox_folder(LLUUID item_id) { const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); @@ -769,6 +790,8 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men items.push_back(std::string("upload_def")); } + items.push_back(std::string("Set favorite folder")); + if(is_outfits && !isRootFolder()) { items.push_back(std::string("New Outfit")); @@ -843,6 +866,8 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men { disabled_items.push_back(std::string("Copy")); } + + disabled_items.push_back(std::string("Set favorite folder")); } if((obj->getType() == LLAssetType::AT_SETTINGS) || ((obj->getType() <= LLAssetType::AT_GESTURE) diff --git a/indra/newview/llinventorygallerymenu.h b/indra/newview/llinventorygallerymenu.h index 7c3545432b..7f6598e171 100644 --- a/indra/newview/llinventorygallerymenu.h +++ b/indra/newview/llinventorygallerymenu.h @@ -49,6 +49,9 @@ protected: void fileUploadLocation(const LLSD& userdata); bool canSetUploadLocation(const LLSD& userdata); + void setFavoriteFolder(); + bool canSetFavoriteFolder(); + static void onRename(const LLSD& notification, const LLSD& response); private: diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6d42145f6b..c7bd1d943a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -185,6 +185,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); + mCommitCallbackRegistrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryPanel::setFavoriteFolder, this)); mCommitCallbackRegistrar.add("Inventory.OpenNewFolderWindow", boost::bind(&LLInventoryPanel::openSingleViewInventory, this, LLUUID())); } @@ -1757,6 +1758,11 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata) } } +void LLInventoryPanel::setFavoriteFolder() +{ + gSavedPerAccountSettings.setString("FavoriteFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); +} + void LLInventoryPanel::openSingleViewInventory(LLUUID folder_id) { LLPanelMainInventory::newFolderWindow(folder_id.isNull() ? LLFolderBridge::sSelf.get()->getUUID() : folder_id); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 56909c8d98..ab17196e5f 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -225,6 +225,7 @@ public: void doCreate(const LLSD& userdata); bool beginIMSession(); void fileUploadLocation(const LLSD& userdata); + void setFavoriteFolder(); void openSingleViewInventory(LLUUID folder_id = LLUUID()); void purgeSelectedItems(); bool attachObject(const LLSD& userdata); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 366c80f580..72fa553023 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1127,6 +1127,12 @@ void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl) #if 0 // SJB: Useful for testing, but not currently functional or to spec LLAvatarActions::showProfile(clicked_id); #else // spec says open IM window + if (item->getParentUICtrl()->getParentUICtrl() == mNearbyList + && gSavedSettings.getBOOL("DoubleClickZoomIn")) + { + handle_zoom_to_object(clicked_id); + return; + } LLAvatarActions::startIM(clicked_id); #endif } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 7cbbb89313..ddab98b07d 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -505,9 +505,17 @@ void LLPreviewGesture::addKeys() LLComboBox* combo = mKeyCombo; combo->add( NONE_LABEL ); - for (KEY key = KEY_F2; key <= KEY_F12; key++) + for (KEY key = ' '; key < KEY_NONE; key++) { - combo->add( LLKeyboard::stringFromKey(key), ADD_BOTTOM ); + char buffer[] = { (char)key, '\0' }; + std::string str_org(buffer); + std::string str_translated = LLKeyboard::stringFromKey(key); + + if (str_org == str_translated) + { + if (key >= ' ' && key <= '~') combo->add(str_translated, ADD_BOTTOM); + } + else combo->add(str_translated, ADD_BOTTOM); } combo->setCurrentByIndex(0); } diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 2cad413d18..846f8a895a 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -825,8 +825,10 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) gRadianceGenProgram.bind(); mVertexBuffer->setBuffer(); +#if GL_VERSION_4_0 S32 channel = gRadianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); mTexture->bind(channel); +#endif gRadianceGenProgram.uniform1i(sSourceIdx, sourceIdx); gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD); gRadianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_STRENGTH, 1.f); @@ -873,8 +875,10 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) { //generate irradiance map gIrradianceGenProgram.bind(); +#if GL_VERSION_4_0 S32 channel = gIrradianceGenProgram.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); mTexture->bind(channel); +#endif gIrradianceGenProgram.uniform1i(sSourceIdx, sourceIdx); gIrradianceGenProgram.uniform1f(LLShaderMgr::REFLECTION_PROBE_MAX_LOD, mMaxProbeLOD); @@ -907,11 +911,11 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4); S32 res = mMipChain[i].getWidth(); - mIrradianceMaps->bind(channel); #if GL_VERSION_4_0 + mIrradianceMaps->bind(channel); glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i - start_mip, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res); -#endif mTexture->bind(channel); +#endif } } } diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index e733dafcae..49e96db52b 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -28,6 +28,9 @@ #include "llviewerjointattachment.h" +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 +#include "llagent.h" +// [/SL:KB] #include "llviewercontrol.h" #include "lldrawable.h" #include "llgl.h" @@ -164,7 +167,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object) //----------------------------------------------------------------------------- bool LLViewerJointAttachment::addObject(LLViewerObject* object) { - object->extractAttachmentItemID(); +// object->extractAttachmentItemID(); // Same object reattached if (isObjectAttached(object)) @@ -175,17 +178,39 @@ bool LLViewerJointAttachment::addObject(LLViewerObject* object) // re-connect object to the joint correctly } +// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-01-13 (Catznip-2.4) + // LLViewerJointAttachment::removeObject() sets the object's item to the NULL UUID so we need to extract it *after* the block above + object->extractAttachmentItemID(); +// [/SL:KB] + // Two instances of the same inventory item attached -- // Request detach, and kill the object in the meantime. - if (getAttachedObject(object->getAttachmentItemID())) +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 + if (LLViewerObject* pAttachObj = getAttachedObject(object->getAttachmentItemID())) { LL_INFOS() << "(same object re-attached)" << LL_ENDL; - object->markDead(); - - // If this happens to be attached to self, then detach. - LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID()); - return false; + pAttachObj->markDead(); + if (pAttachObj->permYouOwner()) + { + gMessageSystem->newMessage("ObjectDetach"); + gMessageSystem->nextBlockFast(_PREHASH_AgentData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData); + gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, pAttachObj->getLocalID()); + gMessageSystem->sendReliable(gAgent.getRegionHost()); + } } +// [/SL:KB] +// if (getAttachedObject(object->getAttachmentItemID())) +// { +// LL_INFOS() << "(same object re-attached)" << LL_ENDL; +// object->markDead(); +// +// // If this happens to be attached to self, then detach. +// LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID()); +// return FALSE; +// } mAttachedObjects.push_back(object); setupDrawable(object); @@ -457,7 +482,10 @@ const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &o ++iter) { const LLViewerObject* attached_object = iter->get(); - if (attached_object->getAttachmentItemID() == object_id) +// if (attached_object->getAttachmentItemID() == object_id) +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 + if ( (attached_object->getAttachmentItemID() == object_id) && (!attached_object->isDead()) ) +// [/SL:KB] { return attached_object; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5a1228768c..135384ab52 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -39,6 +39,7 @@ #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llinventorypanel.h" +#include "llsidepanelinventory.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llviewereventrecorder.h" @@ -52,6 +53,9 @@ #include "llagentui.h" #include "llagentwearables.h" #include "llagentpilot.h" +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 +#include "llattachmentsmgr.h" +// [/SL:KB] #include "llcompilequeue.h" #include "llconsole.h" #include "lldebugview.h" @@ -2188,6 +2192,13 @@ class LLAdvancedRebakeTextures : public view_listener_t }; +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 +void handle_refresh_attachments() +{ + LLAttachmentsMgr::instance().refreshAttachments(); +} +// [/SL:KB] + #if 1 //ndef LL_RELEASE_FOR_DOWNLOAD /////////////////////////// // DEBUG AVATAR TEXTURES // @@ -6775,6 +6786,35 @@ class LLAvatarToggleSearch : public view_listener_t } }; +// <FS:CR> Resync Animations +class FSToolsResyncAnimations : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + for (S32 i = 0; i < gObjectList.getNumObjects(); i++) + { + LLViewerObject* object = gObjectList.getObject(i); + if (object && + object->isAvatar()) + { + LLVOAvatar* avatarp = (LLVOAvatar*)object; + if (avatarp) + { + for (LLVOAvatar::AnimIterator anim_it = avatarp->mPlayingAnimations.begin(); + anim_it != avatarp->mPlayingAnimations.end(); + anim_it++) + { + avatarp->stopMotion(anim_it->first, true); + avatarp->startMotion(anim_it->first); + } + } + } + } + return true; + } +}; +// </FS:CR> Resync Animations + class LLAvatarResetSkeleton: public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -6903,6 +6943,59 @@ void handle_give_money_dialog() } } +LLFloaterSidePanelContainer* get_favorite_inventory_folder() +{ + LLUUID folder_id = LLUUID(gSavedPerAccountSettings.getString("FavoriteFolder")); + if (!folder_id.isNull()) + { + LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); + for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end();) + { + LLFloaterSidePanelContainer* inventory_container = dynamic_cast<LLFloaterSidePanelContainer*>(*iter++); + if (inventory_container) + { + LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(inventory_container->findChild<LLPanel>("main_panel", true)); + if (sidepanel_inventory) + { + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + if (main_inventory && main_inventory->isSingleFolderMode() + && (main_inventory->getCurrentSFVRoot() == folder_id)) + { + return inventory_container; + } + } + } + } + } + + return NULL; +} + +void toggle_favorite_inventory_folder() +{ + LLUUID folder_id = LLUUID(gSavedPerAccountSettings.getString("FavoriteFolder")); + if ((folder_id.isNull()) || (!gInventory.getCategory(folder_id))) + { + LLNotificationsUtil::add("MissingFavoriteFolder"); + return; + } + + LLFloaterSidePanelContainer* inventory_container = get_favorite_inventory_folder(); + if (inventory_container) + { + inventory_container->closeFloater(); + } + else + { + LLPanelMainInventory::newFolderWindow(folder_id); + } +} + +bool favorite_inventory_folder_visible() +{ + return (get_favorite_inventory_folder() != NULL); +} + bool enable_pay_avatar() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -10026,6 +10119,9 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedCheckDebugCharacterVis(), "Advanced.CheckDebugCharacterVis"); view_listener_t::addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); view_listener_t::addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures"); +// [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 + commit.add("Advanced.RefreshAttachments", boost::bind(&handle_refresh_attachments)); +// [/SL:KB] view_listener_t::addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); view_listener_t::addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); // Advanced > Network @@ -10130,6 +10226,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); view_listener_t::addMenu(new LLAvatarTogglePicks(), "Avatar.TogglePicks"); view_listener_t::addMenu(new LLAvatarToggleSearch(), "Avatar.ToggleSearch"); + view_listener_t::addMenu(new FSToolsResyncAnimations(), "Tools.ResyncAnimations"); // <FS:CR> Resync Animations view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton"); view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton"); view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations"); @@ -10230,6 +10327,9 @@ void initialize_menus() commit.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow)); + commit.add("Inventory.OpenFavoriteFolder", boost::bind(&toggle_favorite_inventory_folder)); + enable.add("Inventory.IsFavoriteFolderOpen", boost::bind(&favorite_inventory_folder_visible)); + enable.add("EnablePayObject", boost::bind(&enable_pay_object)); enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar)); enable.add("EnableEdit", boost::bind(&enable_object_edit)); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c8ff744369..e694474a41 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3147,14 +3147,6 @@ bool LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) return false; } -bool LLViewerWindow::handleUnicodeString(char *uni_str, bool editing) -{ - auto keyboard_focus = gFocusMgr.getKeyboardFocus(); - if (keyboard_focus) - keyboard_focus->handleUnicodeString(uni_str, editing, FALSE); - - return TRUE; -} void LLViewerWindow::handleScrollWheel(S32 clicks) { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index acf9485eca..1b995ea650 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -194,7 +194,6 @@ public: /*virtual*/ bool handleTranslatedKeyUp(KEY key, MASK mask); /*virtual*/ void handleScanKey(KEY key, bool key_down, bool key_up, bool key_level); /*virtual*/ bool handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended - /*virtual*/ bool handleUnicodeString(char *uni_str, bool editing); /*virtual*/ bool handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleCloseRequest(LLWindow *window); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fae55055c5..b3b1d272d0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8787,8 +8787,13 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) return; } +#if GL_VERSION_4_0 S32 channel = shader.enableTexture(LLShaderMgr::REFLECTION_PROBES, LLTexUnit::TT_CUBE_MAP_ARRAY); +#else + S32 channel; +#endif bool bound = false; +#if GL_VERSION_4_0 if (channel > -1 && mReflectionMapManager.mTexture.notNull()) { mReflectionMapManager.mTexture->bind(channel); @@ -8819,6 +8824,7 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) setEnvMat(shader); } +#endif // reflection probe shaders generally sample the scene map as well for SSR channel = shader.enableTexture(LLShaderMgr::SCENE_MAP); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 11eafcb45d..f824816183 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -162,6 +162,8 @@ with the same filename but different name <texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" /> <texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" /> <texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" /> + <texture name="Command_FavoriteFolder_Icon" file_name="toolbar_icons/favorite_folder.png" preload="true" /> + <texture name="Command_Resync_Animations" file_name="toolbar_icons/resync_animations.png" preload="true" /> <texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" /> <texture name="Caret_Right_Icon" file_name="toolbar_icons/caret_right.png" preload="true" scale.left="5" scale.top="15" scale.right="28" scale.bottom="1" /> <texture name="Caret_Left_Icon" file_name="toolbar_icons/caret_left.png" preload="true" scale.left="1" scale.top="15" scale.right="23" scale.bottom="1" /> diff --git a/indra/newview/skins/default/textures/toolbar_icons/favorite_folder.png b/indra/newview/skins/default/textures/toolbar_icons/favorite_folder.png Binary files differnew file mode 100644 index 0000000000..811efffc0b --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/favorite_folder.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/resync_animations.png b/indra/newview/skins/default/textures/toolbar_icons/resync_animations.png Binary files differnew file mode 100644 index 0000000000..dc9ee9c428 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/resync_animations.png diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index c664ab09cd..ec2d1471cc 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -70,7 +70,7 @@ follows="all" left="10" name="megapahit_credits_panel" - height="340" + height="390" top="10"> <text follows="top|left|right" @@ -86,7 +86,7 @@ Megapahit is brought to you by (in order of appearance): <text_editor enabled="false" follows="top|left" - height="180" + height="230" bg_readonly_color="Transparent" left="5" text_color="LtGray" @@ -95,6 +95,7 @@ Megapahit is brought to you by (in order of appearance): width="545" word_wrap="true"> Erik Kundiman +LinneNoir milo (observeur) Fritigern Gothly Hadet Sonnenkern @@ -107,6 +108,8 @@ Cate (32a) Melodey Hiroo Ono Keysin (scoutkeysin) +gwigz +Yikes Lopez </text_editor> <text follows="top|left" @@ -132,7 +135,7 @@ with special thanks to (in order of appearance): width="450" word_wrap="true"> Chorazin Allen and Nicky Perian for involving Erik Kundiman in viewer developments; -LinneNoir for the moral support and initial testing; +JenniWindrider for the pre-MP donation that was used to help build the website; Vir Linden for making it possible for the project to have a place (in every sense of the word) in SL; nutsobvious for the early testing and video proof; Soft Linden for the security testing; and diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml index 24e58c9936..e76387da47 100644 --- a/indra/newview/skins/default/xui/en/language_settings.xml +++ b/indra/newview/skins/default/xui/en/language_settings.xml @@ -37,6 +37,7 @@ <string name="TimeHour">hour,datetime,slt</string> <string name="TimeMin">min,datetime,slt</string> + <string name="TimeSec">second,datetime,slt</string> <string name="TimeYear">year,datetime,slt</string> <string name="TimeDay">day,datetime,slt</string> <string name="TimeMonth">mthnum,datetime,slt</string> diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml index 16907d3577..99f84fe808 100644 --- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml @@ -715,6 +715,16 @@ function="Inventory.CanSetUploadLocation" /> </menu_item_call> </menu> + <menu_item_call + label="Use as favorite folder" + layout="topleft" + name="Set favorite folder"> + <menu_item_call.on_click + function="Inventory.SetFavoriteFolder" + parameter="favorite" /> + <menu_item_call.on_visible + function="Inventory.CanSetFavoriteFolder" /> + </menu_item_call> <menu_item_separator layout="topleft" name="Marketplace Separator" /> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index d8aac71dd5..a72f610abb 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -996,6 +996,13 @@ parameter="pbr_material" /> </menu_item_call> </menu> + <menu_item_call + label="Use as favorite folder" + layout="topleft" + name="Set favorite folder"> + <menu_item_call.on_click + function="Inventory.SetFavoriteFolder" /> + </menu_item_call> <menu_item_separator layout="topleft" name="Marketplace Separator" /> diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 7591e6e02f..91c9a378f0 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -61,6 +61,19 @@ </menu_item_check> <menu_item_separator layout="topleft" /> + <menu_item_check + label="Put nearby session always first" + layout="topleft" + name="put_nearby_session_first"> + <on_click + function="IMFloaterContainer.Action" + parameter="put_nearby_session_first" /> + <on_check + function="IMFloaterContainer.Check" + parameter="put_nearby_session_first" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> <menu_item_call label="Chat preferences..." name="chat_preferences"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 50a8d248f8..cd660d7f7a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -37,6 +37,13 @@ parameter="" /> </menu_item_call> <menu_item_call + label="Favorite Inventory Folder" + layout="topleft" + name="Favorite Folder"> + <menu_item_call.on_click + function="Inventory.OpenFavoriteFolder" /> + </menu_item_call> + <menu_item_call label="Places..." name="Places" shortcut="control|L"> @@ -493,6 +500,13 @@ function="Avatar.ResetSelfSkeletonAndAnimations" /> </menu_item_call> <menu_item_call + label="Refresh attachments" + name="Refresh attachments" + shortcut="alt|shift|R"> + <menu_item_call.on_click + function="Advanced.RefreshAttachments" /> + </menu_item_call> + <menu_item_call label="Attachment scripts..." name="MyScripts"> <menu_item_call.on_click @@ -633,6 +647,14 @@ name="World" tear_off="true"> <menu_item_call + label="Resync Animations" + name="Resync Animations" + shortcut="control|S"> + <menu_item_call.on_click + function="Tools.ResyncAnimations" /> + </menu_item_call> + <menu_item_separator/> + <menu_item_call label="Landmark This Place" name="Create Landmark Here"> <menu_item_call.on_click diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5ce73b2cfa..951903fe34 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -12583,4 +12583,16 @@ are wearing now. yestext="OK"/> </notification> + <notification + icon="alertmodal.tga" + name="MissingFavoriteFolder" + type="alertmodal"> +Favorite folder is missing. + +Select the "use as favorite folder" from a folder's menu to set it as the favorite folder. + <tag>fail</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> </notifications> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index 0412466b4f..8202bb9de3 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -268,6 +268,15 @@ name="sound_on_collisions" top_pad="10" width="200" /> + <check_box + control_name="DoubleClickZoomIn" + height="20" + label="Double click on nearby list to zoom in on avatar" + layout="topleft" + left="83" + name="double_click_zoom_in" + top_pad="10" + width="200" /> <button height="23" label="Other Devices" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 232586636b..ad68bd8d81 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4212,6 +4212,8 @@ name="Command_360_Capture_Label">360 snapshot</string> <string name="Command_Speak_Label">Speak</string> <string name="Command_View_Label">Camera controls</string> <string name="Command_Voice_Label">Voice settings</string> + <string name="Command_FavoriteFolder_Label">Favorite folder</string> + <string name="Command_ResyncAnimations_Label">Resync animations</string> <string name="Command_360_Capture_Tooltip">Capture a 360 equirectangular image</string> @@ -4245,6 +4247,8 @@ name="Command_360_Capture_Tooltip">Capture a 360 equirectangular image</string> <string name="Command_Speak_Tooltip">Speak with people nearby using your microphone</string> <string name="Command_View_Tooltip">Changing camera angle</string> <string name="Command_Voice_Tooltip">Volume controls for calls and people near you in world</string> + <string name="Command_FavoriteFolder_Tooltip">Open your favorite inventory folder</string> + <string name="Command_ResyncAnimations_Tooltip">Synchronizes avatar animations</string> <string name="Toolbar_Bottom_Tooltip">currently in your bottom toolbar</string> <string name="Toolbar_Left_Tooltip" >currently in your left toolbar</string> |