diff options
Diffstat (limited to 'indra')
434 files changed, 4546 insertions, 1333 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 500ffa3e8b..154d83a640 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -24,6 +24,10 @@ if( USE_CONAN ) set( USE_AUTOBUILD_3P OFF ) conan_basic_setup(TARGETS NO_OUTPUT_DIRS) add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P) +elseif( USESYSTEMLIBS ) + set( USE_CONAN OFF ) + set( USE_AUTOBUILD_3P OFF ) + add_compile_definitions(LL_USESYSTEMLIBS) else() set( USE_CONAN OFF ) set( USE_AUTOBUILD_3P ON ) @@ -111,7 +115,7 @@ else (USE_BUGSPLAT) endif (USE_BUGSPLAT) add_subdirectory(${VIEWER_PREFIX}newview) -add_dependencies(viewer secondlife-bin) +add_dependencies(viewer ${VIEWER_BINARY_NAME}) add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 690159583a..c345cfac5c 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -106,7 +106,7 @@ if (WINDOWS) endif (WINDOWS) -if (LINUX) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") set(CMAKE_SKIP_RPATH TRUE) # EXTERNAL_TOS @@ -120,10 +120,14 @@ if (LINUX) add_compile_definitions( _REENTRANT _FORTIFY_SOURCE=2 - EXTERNAL_TOS APPID=secondlife LL_IGNORE_SIGCHLD ) + + if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + add_compile_definitions(EXTERNAL_TOS) + endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + add_compile_options( -fexceptions -fno-math-errno @@ -134,9 +138,13 @@ if (LINUX) -pthread -Wno-parentheses -Wno-deprecated - -fvisibility=hidden + -Wno-c++20-compat ) + if (NOT BUILD_SHARED_LIBS) + add_compile_options(-fvisibility=hidden) + endif (NOT BUILD_SHARED_LIBS) + if (ADDRESS_SIZE EQUAL 32) add_compile_options(-march=pentium4) endif (ADDRESS_SIZE EQUAL 32) @@ -147,7 +155,7 @@ if (LINUX) set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") -endif (LINUX) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if (DARWIN) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 21139319c3..72486f110d 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -5,6 +5,15 @@ include_guard() add_library( ll::apr INTERFACE IMPORTED ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + include(FindPkgConfig) + pkg_check_modules(Apr REQUIRED apr-1 apr-util-1) + target_include_directories(ll::apr SYSTEM INTERFACE ${Apr_INCLUDE_DIRS}) + target_link_directories(ll::apr INTERFACE ${Apr_LIBRARY_DIRS}) + target_link_libraries(ll::apr INTERFACE ${Apr_LIBRARIES}) + return () +endif () + use_system_binary( apr apr-util ) use_prebuilt_binary(apr_suite) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index 38547bb017..4c1a141dc5 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -4,6 +4,15 @@ include(Prebuilt) include_guard() add_library( ll::vorbis INTERFACE IMPORTED ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + include(FindPkgConfig) + pkg_check_modules(Vorbis REQUIRED ogg vorbis vorbisenc vorbisfile) + target_include_directories(ll::vorbis SYSTEM INTERFACE ${Vorbis_INCLUDE_DIRS}) + target_link_directories(ll::vorbis INTERFACE ${Vorbis_LIBRARY_DIRS}) + target_link_libraries(ll::vorbis INTERFACE ${Vorbis_LIBRARIES}) + return () +endif () + use_system_binary(vorbis) use_prebuilt_binary(ogg_vorbis) target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 601a23a86d..0c5abd885c 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -8,6 +8,21 @@ if( USE_CONAN ) target_link_libraries( ll::boost INTERFACE CONAN_PKG::boost ) target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS ) return() +elseif( NOT USE_AUTOBUILD_3P ) + find_package( Boost REQUIRED ) + target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) + if (DARWIN) + set(sfx "-mt") + endif() + 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}) + return() endif() use_prebuilt_binary(boost) diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index aa151bafc8..3b09cc4321 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -55,4 +55,10 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}" "LLBUILD_CONFIG=\"${CMAKE_BUILD_TYPE}\"" ) +if (PACKAGE) + include(CPack) + set(CPACK_PACKAGE_VERSION + ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} + CACHE STRING "Viewer major.minor.patch.revision versions.") +endif (PACKAGE) endif (NOT DEFINED VIEWER_SHORT_VERSION) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 9b77becf29..2a1d30e548 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -5,8 +5,8 @@ include(Prebuilt) include_guard() add_library( ll::cef INTERFACE IMPORTED ) -use_prebuilt_binary(dullahan) -target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) +#use_prebuilt_binary(dullahan) +target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) target_link_libraries( ll::cef INTERFACE @@ -33,4 +33,9 @@ elseif (DARWIN) ) elseif (LINUX) + target_link_libraries( ll::cef INTERFACE + dullahan + cef_dll_wrapper + cef + ) endif (WINDOWS) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index b9f685f37b..d47e2a765c 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -4,8 +4,8 @@ include(Prebuilt) include_guard() add_library( ll::libcurl INTERFACE IMPORTED ) -use_system_binary(libcurl) -use_prebuilt_binary(curl) +#use_system_binary(libcurl) +#use_prebuilt_binary(curl) if (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.lib) else (WINDOWS) diff --git a/indra/cmake/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake index 9e798d663b..d64c1643ee 100644 --- a/indra/cmake/ConfigurePkgConfig.cmake +++ b/indra/cmake/ConfigurePkgConfig.cmake @@ -14,7 +14,7 @@ IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") else (ADDRESS_SIZE EQUAL 32) SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib) SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib) - SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu) + SET(PKG_CONFIG_MULTI_GUESS /usr/lib/x86_64-linux-gnu) SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu) endif (ADDRESS_SIZE EQUAL 32) diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 77140af641..fbf188d100 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -4,6 +4,15 @@ include(Prebuilt) include_guard() add_library( ll::freetype INTERFACE IMPORTED ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + include(FindPkgConfig) + pkg_check_modules(Freetype REQUIRED freetype2) + target_include_directories( ll::freetype SYSTEM INTERFACE ${Freetype_INCLUDE_DIRS} ) + target_link_directories( ll::freetype INTERFACE ${Freetype_LIBRARY_DIRS} ) + target_link_libraries( ll::freetype INTERFACE ${Freetype_LIBRARIES} ) + return () +endif () + use_system_binary(freetype) use_prebuilt_binary(freetype) target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index a780966f0c..ea349237d3 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -3,7 +3,10 @@ include(Prebuilt) include(GLH) add_library( ll::glext INTERFACE IMPORTED ) -use_system_binary(glext) -use_prebuilt_binary(glext) +if (USESYSTEMLIBS) + return () +endif () +use_system_binary(glext) +use_prebuilt_binary(glext) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index 0cefc3543a..09f7d568be 100644 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -3,5 +3,11 @@ include(Prebuilt) add_library( ll::glh_linear INTERFACE IMPORTED ) +if (USESYSTEMLIBS) + target_include_directories(ll::glh_linear SYSTEM INTERFACE + ${CMAKE_SYSROOT}/usr/local/include) + return () +endif () + use_system_binary( glh_linear ) use_prebuilt_binary(glh_linear) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index bb037c0237..96c75ad262 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -2,7 +2,9 @@ include(Prebuilt) include_guard() +if (USE_AUTOBUILD_3P OR USE_CONAN) use_prebuilt_binary(dictionaries) +endif () add_library( ll::hunspell INTERFACE IMPORTED ) use_system_binary(hunspell) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 80d243d9f8..1cb1679d75 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -26,6 +26,9 @@ 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 735f5e8052..539f5c0d55 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -11,6 +11,16 @@ add_library( ll::minizip-ng INTERFACE IMPORTED ) add_library( ll::libxml INTERFACE IMPORTED ) add_library( ll::colladadom INTERFACE IMPORTED ) +if ( NOT (USE_AUTOBUILD_3P OR USE_CONAN) ) + include(FindPkgConfig) + pkg_check_modules(Colladadom REQUIRED collada-dom) + target_compile_definitions( ll::colladadom INTERFACE COLLADA_DOM_SUPPORT141 ) + target_include_directories( ll::colladadom SYSTEM INTERFACE ${Colladadom_INCLUDE_DIRS} ${Colladadom_INCLUDE_DIRS}/1.4 ) + target_link_directories( ll::colladadom INTERFACE ${Colladadom_LIBRARY_DIRS} ) + target_link_libraries( ll::colladadom INTERFACE ${Colladadom_LIBRARIES} ) + return () +endif () + # ND, needs fixup in collada conan pkg if( USE_CONAN ) target_include_directories( ll::colladadom SYSTEM INTERFACE diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 2e1b601b79..089f1fffc2 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -7,6 +7,19 @@ include(Prebuilt) include_guard() add_library( ll::SDL INTERFACE IMPORTED ) +if (USESYSTEMLIBS) + include(FindPkgConfig) + pkg_check_modules(Sdl2 REQUIRED sdl2) + target_compile_definitions( ll::SDL INTERFACE LL_SDL=1) + target_include_directories(ll::SDL SYSTEM INTERFACE ${Sdl2_INCLUDE_DIRS}) + target_link_directories(ll::SDL INTERFACE ${Sdl2_LIBRARY_DIRS}) + if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + list(APPEND Sdl2_LIBRARIES X11) + endif () + target_link_libraries(ll::SDL INTERFACE ${Sdl2_LIBRARIES}) + return () +endif () + if (LINUX) #Must come first as use_system_binary can exit this file early diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 599ce02844..66dc13d126 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -5,9 +5,26 @@ include(Prebuilt) include_guard() add_library( ll::libvlc INTERFACE IMPORTED ) +if (USE_AUTOBUILD_3P OR USE_CONAN) use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") +else () + if (DARWIN) + target_include_directories( ll::libvlc SYSTEM INTERFACE /Applications/VLC.app/Contents/MacOS/include) + target_link_directories( ll::libvlc INTERFACE /Applications/VLC.app/Contents/MacOS/lib) + target_link_libraries( ll::libvlc INTERFACE vlc vlccore ) + else () + include(FindPkgConfig) + pkg_check_modules(Libvlc REQUIRED libvlc vlc-plugin) + target_include_directories( ll::libvlc SYSTEM INTERFACE ${Libvlc_INCLUDE_DIRS} ) + target_link_directories( ll::libvlc INTERFACE ${Libvlc_LIBRARY_DIRS} ) + target_link_libraries( ll::libvlc INTERFACE ${Libvlc_LIBRARIES} ) + endif () + set(LIBVLCPLUGIN ON CACHE BOOL + "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") + return() +endif () if (WINDOWS) target_link_libraries( ll::libvlc INTERFACE diff --git a/indra/cmake/LibraryInstall.cmake b/indra/cmake/LibraryInstall.cmake new file mode 100644 index 0000000000..b94841897c --- /dev/null +++ b/indra/cmake/LibraryInstall.cmake @@ -0,0 +1,13 @@ +list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt) +#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} DESTINATION ${_LIB}) +endif () diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 0ab30d0800..a297e04143 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -65,7 +65,7 @@ elseif (WINDOWS) rpcrt4.lib legacy_stdio_definitions ) -else() +elseif (DARWIN) include(CMakeFindFrameworks) find_library(COREFOUNDATION_LIBRARY CoreFoundation) find_library(CARBON_LIBRARY Carbon) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index fd144d2b97..70b3a2c088 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -6,6 +6,12 @@ include(Prebuilt) include_guard() add_library( ll::meshoptimizer INTERFACE IMPORTED ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${CMAKE_SYSROOT}/usr/local/include ) + target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) + return () +endif () + use_system_binary(meshoptimizer) use_prebuilt_binary(meshoptimizer) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 0b6a7c2853..cc7deac2d9 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -18,6 +18,17 @@ endif() if (USE_OPENAL) add_library( ll::openal INTERFACE IMPORTED ) + + if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1) + include(FindPkgConfig) + pkg_check_modules(Openal REQUIRED freealut) + target_include_directories(ll::openal SYSTEM INTERFACE ${Openal_INCLUDE_DIRS}) + target_link_directories(ll::openal INTERFACE ${Openal_LIBRARY_DIRS}) + target_link_libraries(ll::openal INTERFACE ${Openal_LIBRARIES}) + return () + endif () + target_include_directories( ll::openal SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/AL") target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1) use_prebuilt_binary(openal) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index c4aab2e9e5..6de03113ed 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -4,8 +4,17 @@ include(Prebuilt) include_guard() add_library( ll::openjpeg INTERFACE IMPORTED ) +if (NOT USESYSTEMLIBS) use_system_binary(openjpeg) use_prebuilt_binary(openjpeg) +elseif (NOT LINUX) + include(FindPkgConfig) + pkg_check_modules(Openjpeg REQUIRED libopenjp2) + target_include_directories(ll::openjpeg SYSTEM INTERFACE ${Openjpeg_INCLUDE_DIRS}) + target_link_directories(ll::openjpeg INTERFACE ${Openjpeg_LIBRARY_DIRS}) + target_link_libraries(ll::openjpeg INTERFACE ${Openjpeg_LIBRARIES}) + return () +endif (NOT USESYSTEMLIBS) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) -target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg) +target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 3387c74f45..26508dc429 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -4,8 +4,8 @@ include(Prebuilt) include_guard() add_library( ll::openssl INTERFACE IMPORTED ) -use_system_binary(openssl) -use_prebuilt_binary(openssl) +#use_system_binary(openssl) +#use_prebuilt_binary(openssl) if (WINDOWS) target_link_libraries(ll::openssl INTERFACE libssl libcrypto) elseif (LINUX) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 634cc15c21..b0acae279b 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -67,6 +67,22 @@ macro ( use_system_binary package ) endif() endforeach() return() + elseif( NOT USE_AUTOBUILD_3P ) + include(FindPkgConfig) + pkg_check_modules(${package} ${package}) + if( ${package}_FOUND ) + target_link_directories( ll::${package} INTERFACE ${${package}_LIBRARY_DIRS} ) + else() + pkg_check_modules(${package} lib${package}) + if( ${package}_FOUND ) + target_link_directories( ll::${package} INTERFACE ${${package}_LIBRARY_DIRS} ) + else() + find_package( ${package} REQUIRED ) + endif() + endif() + target_include_directories( ll::${package} SYSTEM INTERFACE ${${package}_INCLUDE_DIRS} ) + target_link_libraries( ll::${package} INTERFACE ${${package}_LIBRARIES} ) + return() endif() endmacro() diff --git a/indra/cmake/TinyEXR.cmake b/indra/cmake/TinyEXR.cmake index e6d142d19d..c3053b8149 100644 --- a/indra/cmake/TinyEXR.cmake +++ b/indra/cmake/TinyEXR.cmake @@ -1,7 +1,9 @@ # -*- cmake -*- include(Prebuilt) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(tinyexr) +endif () set(TINYEXR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tinyexr) diff --git a/indra/cmake/TinyGLTF.cmake b/indra/cmake/TinyGLTF.cmake index 92b2de309f..b20a2a41de 100644 --- a/indra/cmake/TinyGLTF.cmake +++ b/indra/cmake/TinyGLTF.cmake @@ -1,7 +1,11 @@ # -*- cmake -*- include(Prebuilt) +if (NOT USESYSTEMLIBS) + use_prebuilt_binary(tinygltf) set(TINYGLTF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tinygltf) +endif (NOT USESYSTEMLIBS) + diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 8f135676d6..c0f1dfb44e 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -4,12 +4,19 @@ include(FreeType) add_library( ll::uilibraries INTERFACE IMPORTED ) -if (LINUX) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") target_compile_definitions(ll::uilibraries INTERFACE LL_GTK=1 LL_X11=1 ) if( USE_CONAN ) target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk ) return() + elseif( NOT USE_AUTOBUILD_3P ) + include(FindPkgConfig) + pkg_check_modules(Gtk2 REQUIRED gtk+-2.0) + target_include_directories( ll::uilibraries SYSTEM INTERFACE ${Gtk2_INCLUDE_DIRS} ) + target_link_directories( ll::uilibraries INTERFACE ${Gtk2_LIBRARY_DIRS} ) + target_link_libraries( ll::uilibraries INTERFACE ${Gtk2_LIBRARIES} ) + return() endif() use_prebuilt_binary(gtk-atk-pango-glib) @@ -30,7 +37,7 @@ if (LINUX) Xinerama ll::freetype ) -endif (LINUX) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if( WINDOWS ) target_link_libraries( ll::uilibraries INTERFACE opengl32 @@ -48,7 +55,9 @@ if( WINDOWS ) ) endif() +if (USE_AUTOBUILD_3P OR USE_CONAN) target_include_directories( ll::uilibraries SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) +endif () diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index 139be0a008..a748237c5b 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -6,14 +6,16 @@ set(INSTALL OFF CACHE BOOL "Generate install target.") if (INSTALL) - set(INSTALL_PREFIX /usr CACHE PATH + set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Top-level installation directory.") - if (EXISTS /lib64) + if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) + set(_LIB lib/${ARCH}-linux-gnu) + elseif (EXISTS /lib64) set(_LIB lib64) - else (EXISTS /lib64) + else () set(_LIB lib) - endif (EXISTS /lib64) + endif () set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH "Installation directory for read-only shared files.") @@ -21,11 +23,15 @@ if (INSTALL) set(INSTALL_SHARE_DIR ${INSTALL_PREFIX}/share CACHE PATH "Installation directory for read-only shared files.") - set(APP_BINARY_DIR ${INSTALL_LIBRARY_DIR}/secondlife-${viewer_VERSION} + set(APP_BINARY_DIR ${INSTALL_PREFIX}/bin CACHE PATH "Installation directory for binaries.") - set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/secondlife-${viewer_VERSION} + set(APP_SHARE_DIR ${INSTALL_SHARE_DIR}/${VIEWER_BINARY_NAME} CACHE PATH "Installation directory for read-only data files.") + + set(APP_LIBEXEC_DIR ${INSTALL_PREFIX}/libexec/${VIEWER_BINARY_NAME} + CACHE PATH + "Installation directory for non-manual executables.") endif (INSTALL) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index cae68fbc11..04a4c72d5f 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -1,6 +1,11 @@ # -*- cmake -*- include(Prebuilt) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + add_library( ll::fontconfig INTERFACE IMPORTED ) + use_system_binary(fontconfig) +endif () + if (LINUX) #use_prebuilt_binary(libuuid) add_library( ll::fontconfig INTERFACE IMPORTED ) diff --git a/indra/cmake/VulkanGltf.cmake b/indra/cmake/VulkanGltf.cmake index 94541d5307..d7083a33c9 100644 --- a/indra/cmake/VulkanGltf.cmake +++ b/indra/cmake/VulkanGltf.cmake @@ -1,5 +1,7 @@ # -*- cmake -*- include(Prebuilt) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(vulkan_gltf) +endif () diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 6409f9d6e2..994df3d128 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -4,8 +4,20 @@ include(Prebuilt) include_guard() add_library( ll::xmlrpc-epi INTERFACE IMPORTED ) +if (USE_AUTOBUILD_3P OR USE_CONAN) use_system_binary( xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) +endif () + target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) + +if (USE_AUTOBUILD_3P OR USE_CONAN) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) +elseif (LINUX) + target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE + ${CMAKE_SYSROOT}/usr/include/xmlrpc-epi) +elseif (DARWIN) + target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE /usr/local/include) + target_link_directories( ll::xmlrpc-epi INTERFACE /usr/local/lib) +endif () diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index 5d99cd9709..60164116dd 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -8,6 +8,12 @@ add_library( ll::zlib-ng INTERFACE IMPORTED ) if(USE_CONAN ) target_link_libraries( ll::zlib-ng INTERFACE CONAN_PKG::zlib ) return() +elseif(NOT USE_AUTOBUILD_3P) + pkg_check_modules(Zlib REQUIRED zlib) + target_include_directories( ll::zlib-ng SYSTEM INTERFACE ${Zlib_INCLUDE_DIRS}) + target_link_directories( ll::zlib-ng INTERFACE ${Zlib_LIBRARY_DIRS} ) + target_link_libraries( ll::zlib-ng INTERFACE ${Zlib_LIBRARIES}) + return() endif() use_prebuilt_binary(zlib-ng) diff --git a/indra/cmake/xxHash.cmake b/indra/cmake/xxHash.cmake index a7c1cba62c..2dcab005ba 100644 --- a/indra/cmake/xxHash.cmake +++ b/indra/cmake/xxHash.cmake @@ -5,4 +5,11 @@ endif (XXHASH_CMAKE_INCLUDED) set (XXHASH_CMAKE_INCLUDED TRUE) include(Prebuilt) + +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + include(FindPkgConfig) + pkg_check_modules(Xxhash REQUIRED libxxhash) + return () +endif () + use_prebuilt_binary(xxhash) diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index c3be8bc78e..f3f822f61c 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -84,3 +84,5 @@ if (BUILD_HEADLESS) llcommon ) endif (BUILD_HEADLESS) + +include(LibraryInstall) diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index dec491b9ff..4fc9ada15e 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -1443,7 +1443,9 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, 0); } +#if GL_VERSION_1_1 glGetTexImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGBA, GL_UNSIGNED_BYTE, temp); +#endif U8* alpha_cursor = alpha_data; U8* pixel = temp; diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 4f469b9bb5..f36da83c69 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -69,3 +69,5 @@ endif() if( TARGET ll::fmodstudio ) target_link_libraries( llaudio ll::fmodstudio ) endif() + +include(LibraryInstall) diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index bc45eb474a..7c158c4ff9 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -70,3 +70,5 @@ target_link_libraries( llfilesystem llxml ) + +include(LibraryInstall) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 5f4ed2fffa..38fd05fae6 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -9,7 +9,9 @@ include(Linking) include(Boost) include(LLSharedLibs) include(JsonCpp) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(Copy3rdPartyLibs) +endif () include(ZLIBNG) include(URIPARSER) include(Tracy) @@ -164,6 +166,7 @@ set(llcommon_HEADER_FILES lleventdispatcher.h lleventfilter.h llevents.h + lleventtimer.h lleventemitter.h llexception.h llfasttimer.h @@ -188,12 +191,14 @@ set(llcommon_HEADER_FILES llliveappconfig.h lllivefile.h llmainthreadtask.h + llmake.h llmd5.h llmemory.h llmemorystream.h llmetrics.h llmetricperformancetester.h llmortician.h + llmutex.h llnametable.h llpointer.h llprofiler.h @@ -250,7 +255,9 @@ set(llcommon_HEADER_FILES llwin32headerslean.h llworkerthread.h hbxxh.h + is_approx_equal_fraction.h lockstatic.h + mutex.h stdtypes.h stringize.h threadpool.h @@ -287,7 +294,24 @@ target_link_libraries( target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +if (USE_AUTOBUILD_3P OR USE_CONAN) add_dependencies(llcommon stage_third_party_libs) +else () + target_compile_options(${PROJECT_NAME} PUBLIC -Wno-deprecated-declarations) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties( + llapp.cpp + llsdutil.cpp + PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation) + set_source_files_properties(llevent.cpp PROPERTIES + COMPILE_FLAGS -Wno-nonnull) + elseif (LINUX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_source_files_properties(llsys.cpp PROPERTIES + COMPILE_FLAGS -Wno-unused-but-set-variable) + endif() +endif () + +include(LibraryInstall) if (LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llcommon/hbxxh.cpp b/indra/llcommon/hbxxh.cpp index 41d797a7e3..8ccf8dfcbe 100644 --- a/indra/llcommon/hbxxh.cpp +++ b/indra/llcommon/hbxxh.cpp @@ -34,7 +34,11 @@ // in your build, in which case the latter would be used instead. For ARM64 // builds, this would also automatically enable NEON vectorization. #define XXH_INLINE_ALL +#if LL_USESYSTEMLIBS +#include <xxhash.h> +#else #include "xxhash/xxhash.h" +#endif #include "hbxxh.h" diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index 722743f453..7ceb57336e 100644 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -43,7 +43,7 @@ #if LL_WINDOWS #include "lltimer.h" -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ #include <sys/time.h> #include <sched.h> #include "lltimer.h" diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 17ad37b031..cf5e43d805 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -127,8 +127,22 @@ public: #endif +#if (LL_DARWIN && defined(__arm64__)) -#if (LL_LINUX) && !(defined(__i386__) || defined(__amd64__)) + static U32 getCPUClockCount64() + { + U64 t = clock_gettime_nsec_np(CLOCK_UPTIME_RAW); + return t/1000; + } + + static U64 getCPUClockCount32() + { + return (U32) (getCPUClockCount64() >> 8); + } + +#endif + +#if (LL_LINUX && !(defined(__i386__) || defined(__amd64__))) // // Linux implementation of CPU clock - non-x86. // This is accurate but SLOW! Only use out of desperation. @@ -159,7 +173,7 @@ public: #endif // (LL_LINUX) && !(defined(__i386__) || defined(__amd64__)) -#if (LL_LINUX || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) +#if (LL_LINUX || LL_DARWIN || __FreeBSD__) && (defined(__i386__) || defined(__amd64__)) // // Mac+Linux FAST x86 implementation of CPU clock static U32 getCPUClockCount32() diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 313c380587..b73030d978 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -52,7 +52,7 @@ class LLMutex ; #define LL_DEFAULT_HEAP_ALIGN 8 #elif LL_DARWIN #define LL_DEFAULT_HEAP_ALIGN 16 -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ #define LL_DEFAULT_HEAP_ALIGN 8 #endif @@ -71,7 +71,11 @@ LL_COMMON_API void ll_assert_aligned_func(uintptr_t ptr,U32 alignment); #define ll_assert_aligned(ptr,alignment) #endif +#if defined(__i386__) || defined(__x86_64__) #include <xmmintrin.h> +#else +#include <sse2neon.h> +#endif template <typename T> T* LL_NEXT_ALIGNED_ADDRESS(T* address) { @@ -85,7 +89,7 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) (uintptr_t(address) + 0x3F) & ~0x3F); } -#if LL_LINUX || LL_DARWIN +#if LL_LINUX || LL_DARWIN || __FreeBSD__ #define LL_ALIGN_PREFIX(x) #define LL_ALIGN_POSTFIX(x) __attribute__((aligned(x))) diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index a54408a852..83cd6941dc 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -32,9 +32,11 @@ #ifdef LL_LINUX #define __ENABLE_WSTRING #include <endian.h> +#elif defined(__FreeBSD__) +#include <sys/endian.h> #endif // LL_LINUX -#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__))) +#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)) || (defined(__FreeBSD__) && (_BYTE_ORDER == _LITTLE_ENDIAN))) #define LL_LITTLE_ENDIAN 1 #else #define LL_BIG_ENDIAN 1 @@ -80,7 +82,7 @@ #endif // Deal with minor differences on Unixy OSes. -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || __FreeBSD__ // Different name, same functionality. #define stricmp strcasecmp #define strnicmp strncasecmp diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h index 166da8f424..dcd316cb0f 100644 --- a/indra/llcommon/llprocess.h +++ b/indra/llcommon/llprocess.h @@ -40,7 +40,7 @@ #if LL_WINDOWS #include "llwin32headerslean.h" // for HANDLE -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ #if defined(Status) #undef Status #endif diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 9d53b9be35..35d08d8de9 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -638,6 +638,13 @@ public: { getCPUIDInfo(); uint64_t frequency = getSysctlInt64("hw.cpufrequency"); + if (!frequency) { + auto tbfrequency = getSysctlInt64("hw.tbfrequency"); + struct clockinfo clockrate; + auto clockrate_len = sizeof(clockrate); + if (!sysctlbyname("kern.clockrate", &clockrate, &clockrate_len, NULL, 0)) + frequency = tbfrequency * clockrate.hz; + } setInfo(eFrequency, (F64)frequency / (F64)1000000); } @@ -742,12 +749,14 @@ private: : "0" (level)) #endif +#if __i386__ || __x86_64__ unsigned int eax, ebx, ecx, edx; __cpuid(0x1, eax, ebx, ecx, edx); if(feature_infos[0] != (S32)edx) { LL_WARNS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; } +#endif // __i386__ || __x86_64__ #endif // LL_RELEASE_FOR_DOWNLOAD @@ -792,6 +801,100 @@ private: } }; +#elif __FreeBSD__ + +#include <sys/sysctl.h> +class LLProcessorInfoFreeBSDImpl : public LLProcessorInfoImpl +{ +public: + LLProcessorInfoFreeBSDImpl() + { + size_t len = 0; + using std::string; + + char cpu_brand_string[0x40]; + len = sizeof cpu_brand_string; + memset(cpu_brand_string, '\0', len); + sysctlbyname("hw.model", (void *)cpu_brand_string, &len, + NULL, 0); + cpu_brand_string[0x3f] = '\0'; + setInfo(eBrandName, cpu_brand_string); + + uint64_t cpu_frequency = 0; + len = sizeof cpu_frequency; + sysctlbyname("hw.clockrate", (void *)&cpu_frequency, &len, + NULL, 0); + setInfo(eFrequency, (F64)cpu_frequency); + + auto dmesgboot = LLFile::fopen("/var/run/dmesg.boot", "rb"); + std::ostringstream s; + if (dmesgboot) { + char line[MAX_STRING]; + memset(line, 0, MAX_STRING); + while (fgets(line, MAX_STRING, dmesgboot)) { + line[strlen(line) - 1] = ' '; + s << line; + s << std::endl; + } + fclose(dmesgboot); + s << std::endl; + } + + auto dmesgboot_str = s.str(); + int decimal; + + auto idx1 = dmesgboot_str.find_first_of("\"") + 1; + auto idx2 = (idx1 != string::npos) + ? dmesgboot_str.find_first_of("\"", idx1) + : string::npos; + auto vendor = dmesgboot_str.substr(idx1, idx2 - idx1); + if (vendor.length() > 0) setInfo(eVendor, vendor.c_str()); + + idx1 = dmesgboot_str.find_first_of("=", idx2); + idx1 = dmesgboot_str.find_first_of("=", idx1 + 1) + 3; + idx2 = dmesgboot_str.find_first_of(" ", idx1); + auto family = dmesgboot_str.substr(idx1, idx2 - idx1); + std::istringstream(family) >> std::hex >> decimal; + setInfo(eFamily, decimal); + setInfo(eFamilyName, compute_CPUFamilyName(vendor.c_str(), + decimal, 0)); + + idx1 = dmesgboot_str.find_first_of("=", idx2) + 3; + idx2 = dmesgboot_str.find_first_of(" ", idx1); + auto model = dmesgboot_str.substr(idx1, idx2 - idx1); + std::istringstream(model) >> std::hex >> decimal; + setInfo(eModel, decimal); + + idx1 = dmesgboot_str.find_first_of("=", idx2) + 1; + idx2 = dmesgboot_str.find_first_of("\n", idx1); + auto stepping = dmesgboot_str.substr(idx1, idx2 - idx1); + setInfo(eStepping, std::stoi(stepping)); + + if (dmesgboot_str.find(",SSE,") != string::npos) + setExtension(cpu_feature_names[eSSE_Ext]); + + if (dmesgboot_str.find(",SSE2,") != string::npos) + setExtension(cpu_feature_names[eSSE2_Ext]); + + if (dmesgboot_str.find("<SSE3,") != string::npos) + setExtension(cpu_feature_names[eSSE3_Features]); + + if (dmesgboot_str.find(",SSSE3,") != string::npos) + setExtension(cpu_feature_names[eSSE3S_Features]); + + if (dmesgboot_str.find(",SSE4.1,") != string::npos) + setExtension(cpu_feature_names[eSSE4_1_Features]); + + if (dmesgboot_str.find(",SSE4.2,") != string::npos) + setExtension(cpu_feature_names[eSSE4_2_Features]); + + if (dmesgboot_str.find(",SSE4A,") != string::npos) + setExtension(cpu_feature_names[eSSE4a_Features]); + } + + virtual ~LLProcessorInfoFreeBSDImpl() {} +}; + #elif LL_LINUX const char CPUINFO_FILE[] = "/proc/cpuinfo"; @@ -867,7 +970,7 @@ private: LLPI_SET_INFO_INT(eModel, "model"); - S32 family; + S32 family = 0; if (!cpuinfo["cpu family"].empty() && LLStringUtil::convertToS32(cpuinfo["cpu family"], family)) { @@ -972,6 +1075,9 @@ LLProcessorInfo::LLProcessorInfo() : mImpl(NULL) #elif LL_DARWIN static LLProcessorInfoDarwinImpl the_impl; mImpl = &the_impl; +#elif __FreeBSD__ + static LLProcessorInfoFreeBSDImpl the_impl; + mImpl = &the_impl; #else static LLProcessorInfoLinuxImpl the_impl; mImpl = &the_impl; diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp index efce458117..fb6b6bd589 100644 --- a/indra/llcommon/llsdutil.cpp +++ b/indra/llcommon/llsdutil.cpp @@ -36,7 +36,7 @@ # include <winsock2.h> // for htonl #elif LL_LINUX # include <netinet/in.h> -#elif LL_DARWIN +#elif LL_DARWIN || __FreeBSD__ # include <arpa/inet.h> #endif diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index b7ffddc023..459fe0c0c8 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -81,8 +81,13 @@ using namespace llsd; # include <sys/sysinfo.h> # include <stdexcept> const char MEMINFO_FILE[] = "/proc/meminfo"; +#ifdef __GNU__ # include <gnu/libc-version.h> #endif +#elif __FreeBSD__ +# include <sys/sysctl.h> +# include <sys/utsname.h> +#endif LLCPUInfo gSysCPU; @@ -345,6 +350,8 @@ LLOSInfo::LLOSInfo() : mOSString = mOSStringSimple; } +#ifdef __GNU__ + const char OS_VERSION_MATCH_EXPRESSION[] = "([0-9]+)\\.([0-9]+)(\\.([0-9]+))?"; boost::regex os_version_parse(OS_VERSION_MATCH_EXPRESSION); boost::smatch matched; @@ -408,6 +415,8 @@ LLOSInfo::LLOSInfo() : LL_WARNS("AppInit") << "glibc version '" << glibc_version << "' cannot be parsed to three numbers; using all zeros" << LL_ENDL; } +#endif // __GNU__ + #else struct utsname un; @@ -434,6 +443,13 @@ LLOSInfo::LLOSInfo() : if (simple.length() > 0) mOSStringSimple = simple; } + else if (ostype == "FreeBSD") + { + // Only care about major and minor FreeBSD versions, truncate at first '-' + std::string simple = mOSStringSimple.substr(0, mOSStringSimple.find_first_of("-", 0)); + if (simple.length() > 0) + mOSStringSimple = simple; + } } else { @@ -770,13 +786,17 @@ static U32Kilobytes LLMemoryAdjustKBResult(U32Kilobytes inKB) } #endif -#if LL_DARWIN +#if LL_DARWIN || __FreeBSD__ // static U32Kilobytes LLMemoryInfo::getHardwareMemSize() { // This might work on Linux as well. Someone check... uint64_t phys = 0; +#if LL_DARWIN int mib[2] = { CTL_HW, HW_MEMSIZE }; +#else + int mib[2] = { CTL_HW, HW_PHYSMEM }; +#endif size_t len = sizeof(phys); sysctl(mib, 2, &phys, &len, NULL, 0); @@ -790,7 +810,7 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const #if LL_WINDOWS return LLMemoryAdjustKBResult(U32Kilobytes(mStatsMap["Total Physical KB"].asInteger())); -#elif LL_DARWIN +#elif LL_DARWIN || __FreeBSD__ return getHardwareMemSize(); #elif LL_LINUX diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index 5c87ce6bf2..7338b0f0cb 100644 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -130,7 +130,7 @@ public: void stream(std::ostream& s) const; ///< output text info to s U32Kilobytes getPhysicalMemoryKB() const; -#if LL_DARWIN +#if LL_DARWIN || __FreeBSD__ static U32Kilobytes getHardwareMemSize(); // Because some Mac linkers won't let us reference extern gSysMemory from a different lib. #endif diff --git a/indra/llcommon/llthreadsafequeue.h b/indra/llcommon/llthreadsafequeue.h index 034e3f7897..85fcbbacac 100644 --- a/indra/llcommon/llthreadsafequeue.h +++ b/indra/llcommon/llthreadsafequeue.h @@ -452,7 +452,11 @@ ElementT LLThreadSafeQueue<ElementT, QueueT>::pop(void) // so we can finish draining the queue. pop_result popped = pop_(lock1, value); if (popped == POPPED) +#if LL_LINUX + return value; +#else return std::move(value); +#endif // Once the queue is DONE, there will never be any more coming. if (popped == DONE) diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 6f74bf3fc8..00a04d87b6 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -35,7 +35,7 @@ #if LL_WINDOWS # include "llwin32headerslean.h" -#elif LL_LINUX || LL_DARWIN +#elif LL_LINUX || LL_DARWIN || __FreeBSD__ # include <errno.h> # include <sys/time.h> #else @@ -115,7 +115,7 @@ void ms_sleep(U32 ms) #endif -#elif LL_LINUX || LL_DARWIN +#elif LL_LINUX || LL_DARWIN || __FreeBSD__ static void _sleep_loop(struct timespec& thiswait) { struct timespec nextwait; @@ -233,7 +233,7 @@ F64 calc_clock_frequency() #endif // LL_WINDOWS -#if LL_LINUX || LL_DARWIN +#if LL_LINUX || LL_DARWIN || __FreeBSD__ // Both Linux and Mac use gettimeofday for accurate time F64 calc_clock_frequency() { diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index ab66fa6ddc..be2e51560e 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -522,7 +522,7 @@ S32 LLUUID::getNodeID(unsigned char* node_id) #include <net/if.h> #include <net/if_types.h> #include <net/if_dl.h> -#include <net/route.h> +//#include <net/route.h> #include <ifaddrs.h> // static @@ -606,7 +606,7 @@ S32 LLUUID::getNodeID(unsigned char* node_id) #define HAVE_NETINET_IN_H #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> -#if !LL_DARWIN +#if !LL_DARWIN && !__FreeBSD__ #include <linux/sockios.h> #endif #endif diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h index 28e50b3d21..b40a718593 100644 --- a/indra/llcommon/stdtypes.h +++ b/indra/llcommon/stdtypes.h @@ -29,6 +29,7 @@ #include <cassert> #include <cfloat> #include <climits> +#include <cstddef> #include <limits> #include <type_traits> @@ -71,7 +72,7 @@ typedef unsigned __int64 U64; #else typedef long long int S64; typedef long long unsigned int U64; -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || __FreeBSD__ #define S64L(a) (a##LL) #define U64L(a) (a##ULL) #endif @@ -113,6 +114,10 @@ typedef U32 TPACKETID; #define FALSE (0) #endif +#if __FreeBSD__ +#undef NULL +#endif + #ifndef NULL #define NULL (0) #endif diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 87796abd3c..01ccdc048a 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -3,15 +3,21 @@ project(llcorehttp) include(00-Common) +if (LL_TESTS) include(GoogleMock) +endif () include(CURL) include(OpenSSL) include(NGHTTP2) include(ZLIBNG) include(LLCoreHttp) +if (LL_TESTS) include(LLAddBuildTest) +endif () include(LLCommon) +if (LL_TESTS) include(Tut) +endif () include(bugsplat) set(llcorehttp_SOURCE_FILES @@ -93,6 +99,8 @@ target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # lead to circular dependencies (or in case of cmake, the first project declaring it's dependencies wins) target_include_directories( llcorehttp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage) +include(LibraryInstall) + # tests set(LLCOREHTTP_TESTS ON CACHE BOOL "Build and run llcorehttp integration tests specifically") diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt index 6ac73c0d32..3506a35c1e 100644 --- a/indra/llcrashlogger/CMakeLists.txt +++ b/indra/llcrashlogger/CMakeLists.txt @@ -21,3 +21,5 @@ list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES}) add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES}) target_link_libraries( llcrashlogger llcommon llmessage llcorehttp llxml llfilesystem ) + +include(LibraryInstall) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 9f24f75eab..7db1971460 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -30,17 +30,17 @@ if (DARWIN) LIST(APPEND llfilesystem_HEADER_FILES lldir_mac.h) endif (DARWIN) -if (LINUX) +if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") LIST(APPEND llfilesystem_SOURCE_FILES lldir_linux.cpp) LIST(APPEND llfilesystem_HEADER_FILES lldir_linux.h) if (INSTALL) set_source_files_properties(lldir_linux.cpp PROPERTIES COMPILE_FLAGS - "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\"" + "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\" -DAPP_LIBEXEC_DIR=\\\"${APP_LIBEXEC_DIR}\\\" -DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\"" ) endif (INSTALL) -endif (LINUX) +endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if (WINDOWS) LIST(APPEND llfilesystem_SOURCE_FILES lldir_win32.cpp) @@ -56,6 +56,8 @@ target_link_libraries(llfilesystem ) target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + # Add tests if (LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index cbf4c1ffb8..a92b994b58 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -386,7 +386,7 @@ std::string LLDir::buildSLOSCacheDir() const } else { - res = add(getOSCacheDir(), "SecondLife"); + res = add(getOSCacheDir(), "Megapahit"); } return res; } @@ -690,7 +690,7 @@ void LLDir::walkSearchSkinDirs(const std::string& subdir, const std::string& filename, const FUNCTION& function) const { - for (const std::string& skindir : mSearchSkinDirs) + for (std::string skindir : mSearchSkinDirs) { std::string subdir_path(add(skindir, subdir)); for (const std::string& subsubdir : subsubdirs) diff --git a/indra/llfilesystem/lldir_linux.cpp b/indra/llfilesystem/lldir_linux.cpp index cc951ec4b9..1992cb83c7 100644 --- a/indra/llfilesystem/lldir_linux.cpp +++ b/indra/llfilesystem/lldir_linux.cpp @@ -83,7 +83,11 @@ LLDir_Linux::LLDir_Linux() mExecutableFilename = ""; mExecutablePathAndName = ""; +#ifdef APP_LIBEXEC_DIR + mExecutableDir = APP_LIBEXEC_DIR; +#else mExecutableDir = tmp_str; +#endif mWorkingDir = tmp_str; #ifdef APP_RO_DATA_DIR mAppRODataDir = APP_RO_DATA_DIR; @@ -123,7 +127,7 @@ LLDir_Linux::LLDir_Linux() if ((path_end = strrchr(tmp_str,'/'))) { *path_end = '\0'; - mExecutableDir = tmp_str; + //mExecutableDir = tmp_str; mWorkingDir = tmp_str; mExecutableFilename = path_end+1; } @@ -133,7 +137,11 @@ LLDir_Linux::LLDir_Linux() } } +#ifdef APP_PLUGIN_DIR + mLLPluginDir = APP_PLUGIN_DIR; +#else mLLPluginDir = mExecutableDir + mDirDelimiter + "llplugin"; +#endif // *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something. mTempDir = "/tmp"; @@ -205,7 +213,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name, LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL; } - mCAFile = getExpandedFilename(LL_PATH_EXECUTABLE, "ca-bundle.crt"); + mCAFile = add(mAppRODataDir, "ca-bundle.crt"); } U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string &mask) diff --git a/indra/llfilesystem/lldir_linux.h b/indra/llfilesystem/lldir_linux.h index bd031bd7bb..f9b0427ccd 100644 --- a/indra/llfilesystem/lldir_linux.h +++ b/indra/llfilesystem/lldir_linux.h @@ -24,7 +24,7 @@ * $/LicenseInfo$ */ -#if !LL_LINUX +#if !LL_LINUX && !__FreeBSD__ #error This header must not be included when compiling for any target other than Linux. Consider including lldir.h instead. #endif // !LL_LINUX diff --git a/indra/llfilesystem/lldir_mac.cpp b/indra/llfilesystem/lldir_mac.cpp index b9560c8234..2b51930aab 100644 --- a/indra/llfilesystem/lldir_mac.cpp +++ b/indra/llfilesystem/lldir_mac.cpp @@ -64,7 +64,7 @@ LLDir_Mac::LLDir_Mac() { mDirDelimiter = "/"; - const std::string secondLifeString = "SecondLife"; + const std::string secondLifeString = "Megapahit"; std::string executablepathstr = getSystemExecutableFolder(); diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index cc75c463bc..f55d9fdf5e 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -8,9 +8,13 @@ include(LLImage) include(JPEG) include(LLKDU) include(ZLIBNG) +if (LL_TESTS) include(LLAddBuildTest) +endif () include(bugsplat) +if (LL_TESTS) include(Tut) +endif () set(llimage_SOURCE_FILES llimagebmp.cpp @@ -63,6 +67,18 @@ target_link_libraries(llimage ll::libjpeg ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties(llimageworker.cpp PROPERTIES COMPILE_FLAGS -Wno-int-in-bool-context) + set_source_files_properties( + llimage.cpp + llimagefilter.cpp + PROPERTIES COMPILE_FLAGS -Wno-stringop-overflow) + endif() +endif () + +include(LibraryInstall) + # Add tests if (LL_TESTS) SET(llimage_TEST_SOURCE_FILES diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index 93e85668dd..5a2aac9e84 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -21,9 +21,11 @@ list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES}) add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) +include_directories( ${CMAKE_SOURCE_DIR}/llimage ) target_link_libraries( llimagej2coj llcommon - llimage + #llimage ll::openjpeg ) +include(LibraryInstall) diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index f5f151e27b..67cd9d572d 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -28,9 +28,15 @@ #include "llimagej2coj.h" // this is defined so that we get static linking. -#include "openjpeg.h" -#include "event.h" -#include "cio.h" +#if LL_LINUX || !LL_USESYSTEMLIBS +#include "openjpeg/openjpeg.h" +#include "openjpeg/event.h" +#include "openjpeg/cio.h" +#else +#include <openjpeg-2.5/openjpeg.h> +#include <openjpeg-2.5/event.h> +#include <openjpeg-2.5/cio.h> +#endif #define MAX_ENCODED_DISCARD_LEVELS 5 diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 93a586759f..88a2c33ae0 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -59,6 +59,8 @@ add_library (llinventory ${llinventory_SOURCE_FILES}) target_link_libraries( llinventory llcommon llmath llmessage llxml ) target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + #add unit tests if (LL_TESTS) INCLUDE(LLAddBuildTest) diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index c1893eff41..145a44240a 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -396,6 +396,7 @@ bool LLSettingsBase::validate() LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations, bool partial) { + using boost::placeholders::_1, boost::placeholders::_2; static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, _2, 63)); static Validator validateId(SETTING_ID, false, LLSD::TypeUUID); static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger); diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index e14b2f25ed..902a66b0b2 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -150,6 +150,7 @@ const F32 LLSettingsSky::DOME_RADIUS(15000.f); namespace { + using boost::placeholders::_1, boost::placeholders::_2; LLSettingsSky::validation_list_t legacyHazeValidationList() { diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index 4cd84970ff..84542e2cb4 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -224,6 +224,7 @@ LLSettingsWater::validation_list_t LLSettingsWater::validationList() if (validation.empty()) { + using boost::placeholders::_1, boost::placeholders::_2; validation.push_back(Validator(SETTING_BLUR_MULTIPLIER, true, LLSD::TypeReal, boost::bind(&Validator::verifyFloatRange, _1, _2, llsd::array(-0.5f, 0.5f)))); validation.push_back(Validator(SETTING_FOG_COLOR, true, LLSD::TypeArray, diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index eb29df245a..c85d9c75c7 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -59,6 +59,7 @@ set(llmath_HEADER_FILES llmath.h llmatrix3a.h llmatrix3a.inl + llmatrix4a.h llmodularmath.h lloctree.h llperlin.h @@ -102,6 +103,13 @@ add_library (llmath ${llmath_SOURCE_FILES}) target_link_libraries(llmath llcommon llmeshoptimizer) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +if (USESYSTEMLIBS AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties(llcalc.cpp PROPERTIES + COMPILE_FLAGS -Wno-dangling-pointer) +endif () + +include(LibraryInstall) + # Add tests if (LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index e8fdcc9ae3..569ae4a498 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -131,14 +131,14 @@ struct LLCalcParser : grammar<LLCalcParser> power = unary_expr[power.value = arg1] >> - *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)])) + *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind<float, float, float>(&powf)(power.value, arg1)])) ; term = power[term.value = arg1] >> *(('*' >> assert_syntax(power[term.value *= arg1])) | ('/' >> assert_syntax(power[term.value /= arg1])) | - ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)])) + ('%' >> assert_syntax(power[term.value = phoenix::bind<float, float, float>(&fmodf)(term.value, arg1)])) ) ; diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index 40953dc2e8..590d8de92f 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -31,7 +31,7 @@ #error "Please include llmath.h before this file." #endif -#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) ) +#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__ || __ARM_NEON) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) ) #error SSE2 not enabled. LLVector4a and related class will not compile. #endif @@ -39,8 +39,12 @@ #include <stdint.h> #endif +#if defined(__i386__) || defined(__x86_64__) #include <xmmintrin.h> #include <emmintrin.h> +#else +#include <sse2neon.h> +#endif #include "llmemory.h" #include "llsimdtypes.h" diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 41e614524e..69138f64f5 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -55,7 +55,11 @@ #include "mikktspace/mikktspace.hh" +#if LL_USESYSTEMLIBS +#include <meshoptimizer.h> +#else #include "meshoptimizer/meshoptimizer.h" +#endif #define DEBUG_SILHOUETTE_BINORMALS 0 #define DEBUG_SILHOUETTE_NORMALS 0 // TomY: Use this to display normals using the silhouette diff --git a/indra/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt index dfac44c296..100e4448cb 100644 --- a/indra/llmeshoptimizer/CMakeLists.txt +++ b/indra/llmeshoptimizer/CMakeLists.txt @@ -25,10 +25,12 @@ list(APPEND llmeshoptimizer_SOURCE_FILES ${llmeshoptimizer_HEADER_FILES}) add_library (llmeshoptimizer ${llmeshoptimizer_SOURCE_FILES}) target_include_directories( llmeshoptimizer INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/llmath) target_link_libraries(llmeshoptimizer llcommon - llmath ll::meshoptimizer) +include(LibraryInstall) + # Add tests diff --git a/indra/llmeshoptimizer/llmeshoptimizer.cpp b/indra/llmeshoptimizer/llmeshoptimizer.cpp index 52ed9b9526..d79be48cf8 100644 --- a/indra/llmeshoptimizer/llmeshoptimizer.cpp +++ b/indra/llmeshoptimizer/llmeshoptimizer.cpp @@ -291,6 +291,9 @@ U64 LLMeshOptimizer::simplifyU32(U32 *destination, vertex_positions_stride, target_index_count, target_error, +#if MESHOPTIMIZER_VERSION >= 180 + 0, +#endif result_error ); } @@ -332,6 +335,9 @@ U64 LLMeshOptimizer::simplify(U16 *destination, vertex_positions_stride, target_index_count, target_error, +#if MESHOPTIMIZER_VERSION >= 180 + 0, +#endif result_error ); } diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index e44309476b..258d32a045 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -3,13 +3,19 @@ project(llmessage) include(00-Common) +if (LL_TESTS) include(GoogleMock) include(LLAddBuildTest) +endif () include(LLCommon) include(LLCoreHttp) +if (LL_TESTS) include(LLAddBuildTest) +endif () include(Python) +if (LL_TESTS) include(Tut) +endif () include(Python) include(JsonCpp) @@ -132,6 +138,7 @@ set(llmessage_HEADER_FILES llmessagebuilder.h llmessageconfig.h llmessagereader.h + llmessagesenderinterface.h llmessagetemplate.h llmessagetemplateparser.h llmessagethrottle.h @@ -199,6 +206,15 @@ target_link_libraries( ) target_include_directories( llmessage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties(llnamevalue.cpp PROPERTIES + COMPILE_FLAGS -Wno-stringop-truncation) + endif() +endif () + +include(LibraryInstall) + # tests if (LL_TESTS) SET(llmessage_TEST_SOURCE_FILES diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 14a69afe6e..19ce47d357 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,3 +46,4 @@ target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) +include(LibraryInstall) diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 5857ee32e7..505cb7fc41 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -33,7 +33,9 @@ #include "llpluginmessageclasses.h" #include "llcontrol.h" +#if LL_DARWIN || LL_LINUX extern LLControlGroup gSavedSettings; +#endif #if LL_DARWIN extern BOOL gHiDPISupport; #endif @@ -934,8 +936,10 @@ void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache message.setValue("username", username); // cef shares cache between users but creates user-based contexts message.setValue("cef_log_file", user_data_path_cef_log); +#if LL_DARWIN || LL_LINUX bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog"); message.setValueBoolean("cef_verbose_log", cef_verbose_log); +#endif sendMessage(message); } diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index bfb551ff8d..1d5f52c394 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -45,8 +45,12 @@ #define USE_WIN32_SHARED_MEMORY 1 #elif LL_DARWIN #define USE_SHM_OPEN_SHARED_MEMORY 1 +#elif _POSIX_SHARED_MEMORY_OBJECTS == -1 + #define USE_APR_SHARED_MEMORY 1 #elif LL_LINUX #define USE_SHM_OPEN_SHARED_MEMORY 1 +#elif __FreeBSD__ + #define USE_SHM_OPEN_SHARED_MEMORY 1 #endif diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 0ea6495eac..e86ddd8a32 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -60,6 +60,15 @@ if (DARWIN) ) endif (DARWIN) +if (BUILD_SHARED_LIBS) + set_target_properties(SLPlugin PROPERTIES LINK_FLAGS_RELEASE + "${LINK_FLAGS_RELEASE} -Wl,--allow-shlib-undefined") +endif () + +if (INSTALL) + install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) +endif () + if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) endif (LL_TESTS) diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index f2925a1fa1..d20e01c231 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -46,7 +46,7 @@ using namespace std; #include "slplugin-objc.h" #endif -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || __FreeBSD__ #include <signal.h> #endif @@ -64,7 +64,7 @@ using namespace std; Now that SLPlugin is a bundled app on the Mac, this is no longer necessary (it can just use a regular Info.plist file), but I'm leaving this comment in for posterity. */ -#if LL_DARWIN || LL_LINUX +#if LL_DARWIN || LL_LINUX || __FreeBSD__ // Signal handlers to make crashes not show an OS dialog... static void crash_handler(int sig) { @@ -182,7 +182,7 @@ int main(int argc, char **argv) // display a crash message if something bad happens. The host app will // see the missing heartbeat and log appropriately. initExceptionHandler(); -#elif LL_DARWIN || LL_LINUX +#elif LL_DARWIN || LL_LINUX || __FreeBSD__ if(argc < 2) { LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL; diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 2bd1edaacc..f24d8ed3b3 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -73,6 +73,14 @@ target_link_libraries(llprimitive ll::glh_linear ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + set_source_files_properties(lldaeloader.cpp PROPERTIES COMPILE_FLAGS + -std=c++14) + add_subdirectory(llphysicsextensions) +endif () + +include(LibraryInstall) + #add unit tests if (LL_TESTS) INCLUDE(LLAddBuildTest) diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index e8b586fdf1..e0dbebe2c0 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -941,12 +941,20 @@ bool LLDAELoader::OpenFile(const std::string& filename) domCOLLADA* dom; if (mPreprocessDAE) { +#ifdef LL_USESYSTEMLIBS + dom = static_cast<domCOLLADA *>(dae.openFromMemory(uri_filename, preprocessDAE(filename).c_str())); +#else dom = dae.openFromMemory(uri_filename, preprocessDAE(filename).c_str()); +#endif } else { LL_INFOS() << "Skipping dae preprocessing" << LL_ENDL; +#ifdef LL_USESYSTEMLIBS + dom = static_cast<domCOLLADA *>(dae.open(uri_filename)); +#else dom = dae.open(uri_filename); +#endif } if (!dom) diff --git a/indra/llprimitive/lldaeloader.h b/indra/llprimitive/lldaeloader.h index 4531e03474..c6e5ea42fc 100644 --- a/indra/llprimitive/lldaeloader.h +++ b/indra/llprimitive/lldaeloader.h @@ -29,6 +29,7 @@ #include "llmodelloader.h" +#ifndef LL_USESYSTEMLIBS class DAE; class daeElement; class domProfile_COMMON; @@ -38,6 +39,7 @@ class domTranslate; class domController; class domSkin; class domMesh; +#endif class LLDAELoader : public LLModelLoader { diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index 855cb58832..3726bf2a28 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -36,6 +36,7 @@ #include <array> #include <string> +#include <array> #include <map> namespace tinygltf diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 657dc31fd2..fe80ca1e29 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -35,8 +35,10 @@ #include <boost/align/aligned_allocator.hpp> +#ifndef LL_USESYSTEMLIBS class daeElement; class domMesh; +#endif #define MAX_MODEL_FACES 8 diff --git a/indra/llprimitive/llphysicsextensions/CMakeLists.txt b/indra/llprimitive/llphysicsextensions/CMakeLists.txt new file mode 100644 index 0000000000..258cea5dd7 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/CMakeLists.txt @@ -0,0 +1,101 @@ +# -*- 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 new file mode 100644 index 0000000000..b1214a7f31 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp @@ -0,0 +1,143 @@ +/** +* @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 new file mode 100644 index 0000000000..9ae879efb4 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h @@ -0,0 +1,92 @@ +/** +* @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 new file mode 100644 index 0000000000..8ad13532f2 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp @@ -0,0 +1,107 @@ +/** +* @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 new file mode 100644 index 0000000000..75fdb3fa0f --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h @@ -0,0 +1,78 @@ +/** +* @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 new file mode 100644 index 0000000000..2c432f94e3 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp @@ -0,0 +1,49 @@ +/** +* @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 new file mode 100644 index 0000000000..ac14da1ac3 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h @@ -0,0 +1,46 @@ +/** +* @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 new file mode 100644 index 0000000000..f7caf7f676 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp @@ -0,0 +1,102 @@ +/** +* @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 new file mode 100644 index 0000000000..10c6d55315 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/llconvexdecomposition.h @@ -0,0 +1,231 @@ +/** + * @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 new file mode 100644 index 0000000000..1a6017c4b8 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/llpathinglib.cpp @@ -0,0 +1,110 @@ +/** +* @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 new file mode 100644 index 0000000000..c8c7410797 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/llpathinglib.h @@ -0,0 +1,187 @@ +/** + * @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 new file mode 100644 index 0000000000..9bb4522a23 --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp @@ -0,0 +1,103 @@ +/** +* @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 new file mode 100644 index 0000000000..be479f5d8a --- /dev/null +++ b/indra/llprimitive/llphysicsextensions/llphysicsextensions.h @@ -0,0 +1,59 @@ +/** +* @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/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 1657e9324e..87ee33a701 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -274,7 +274,7 @@ void LLPrimitive::setAllTETextures(const LLUUID &tex_id) //=============================================================== void LLPrimitive::setTE(const U8 index, const LLTextureEntry& te) { - if(mTextureList.copyTexture(index, te) != TEM_CHANGE_NONE && te.getBumpmap() > 0) + if(mTextureList.copyTexture(index, &te) != TEM_CHANGE_NONE && te.getBumpmap() > 0) { mNumBumpmapTEs++; } @@ -753,7 +753,7 @@ void LLPrimitive::copyTEs(const LLPrimitive *primitivep) } for (i = 0; i < num_tes; i++) { - mTextureList.copyTexture(i, *(primitivep->getTE(i))); + mTextureList.copyTexture(i, primitivep->getTE(i)); } } diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index ce4df843ea..1a1d6602ab 100644 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -125,7 +125,7 @@ void LLPrimTextureList::take(LLPrimTextureList& other_list) // virtual // copies LLTextureEntry 'te' // returns TEM_CHANGE_TEXTURE if successful, otherwise TEM_CHANGE_NONE -S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te) +S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry* te) { if (S32(index) >= mEntryList.size()) { @@ -137,9 +137,9 @@ S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te) // we're changing an existing entry llassert(mEntryList[index]); delete (mEntryList[index]); - if (&te) + if (te) { - mEntryList[index] = te.newCopy(); + mEntryList[index] = te->newCopy(); } else { diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h index 79744e9f08..b8bdad60b3 100644 --- a/indra/llprimitive/llprimtexturelist.h +++ b/indra/llprimitive/llprimtexturelist.h @@ -71,7 +71,7 @@ public: // copies LLTextureEntry 'te' // returns TEM_CHANGE_TEXTURE if successful, otherwise TEM_CHANGE_NONE - S32 copyTexture(const U8 index, const LLTextureEntry& te); + S32 copyTexture(const U8 index, const LLTextureEntry* te); // takes ownership of LLTextureEntry* 'te' // returns TEM_CHANGE_TEXTURE if successful, otherwise TEM_CHANGE_NONE diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 7f881c8bb3..7424356057 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -106,3 +106,4 @@ target_link_libraries(llrender OpenGL::GLU ) +include(LibraryInstall) diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index f16d5b6e53..f0158ec54f 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -211,7 +211,9 @@ void LLCubeMap::initEnvironmentMap(const std::vector<LLPointer<LLImageRaw> >& ra enableTexture(0); bind(); mImages[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC); +#if GL_VERSION_3_2 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); +#endif glGenerateMipmap(GL_TEXTURE_CUBE_MAP); gGL.getTexUnit(0)->disable(); disable(); diff --git a/indra/llrender/llcubemaparray.cpp b/indra/llrender/llcubemaparray.cpp index 03fbb90bf6..a758d7e22b 100644 --- a/indra/llrender/llcubemaparray.cpp +++ b/indra/llrender/llcubemaparray.cpp @@ -130,8 +130,10 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL us while (resolution >= 1) { +#if GL_VERSION_4_0 glTexImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, format, resolution, resolution, count * 6, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr); +#endif if (!use_mips) { diff --git a/indra/llrender/llfontfreetypesvg.cpp b/indra/llrender/llfontfreetypesvg.cpp index 355e8432aa..1672aa4b96 100644 --- a/indra/llrender/llfontfreetypesvg.cpp +++ b/indra/llrender/llfontfreetypesvg.cpp @@ -34,9 +34,17 @@ #endif #define NANOSVG_IMPLEMENTATION +#if __FreeBSD__ +#include <nanosvg.h> +#else #include <nanosvg/nanosvg.h> +#endif #define NANOSVGRAST_IMPLEMENTATION +#if __FreeBSD__ +#include <nanosvgrast.h> +#else #include <nanosvg/nanosvgrast.h> +#endif #if LL_WINDOWS #pragma warning (pop) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 1b5566a3f7..10920f1de3 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -72,7 +72,7 @@ static const std::string HEADLESS_VERSION_STRING("1.0"); llofstream gFailLog; -#if GL_ARB_debug_output +#if GL_ARB_debug_output || GL_KHR_debug #ifndef APIENTRY #define APIENTRY @@ -95,9 +95,9 @@ void APIENTRY gl_debug_callback(GLenum source, }*/ if (gGLManager.mIsDisabled && - severity == GL_DEBUG_SEVERITY_HIGH_ARB && - source == GL_DEBUG_SOURCE_API_ARB && - type == GL_DEBUG_TYPE_ERROR_ARB && + severity == GL_DEBUG_SEVERITY_HIGH && + source == GL_DEBUG_SOURCE_API && + type == GL_DEBUG_TYPE_ERROR && id == GL_INVALID_VALUE) { // Suppress messages about deleting already deleted objects called from LLViewerWindow::stopGL() @@ -157,7 +157,11 @@ void APIENTRY gl_debug_callback(GLenum source, if (ubo != 0) { glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_SIZE, &ubo_size); +#if GL_EXT_buffer_storage + glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_IMMUTABLE_STORAGE_EXT, &ubo_immutable); +#else glGetBufferParameteriv(GL_UNIFORM_BUFFER, GL_BUFFER_IMMUTABLE_STORAGE, &ubo_immutable); +#endif } // No needs to halt when is called from LLViewerWindow::stopGL() @@ -234,6 +238,8 @@ PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT = nullptr; #endif +/* + // GL_VERSION_1_2 //PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements = nullptr; //PFNGLTEXIMAGE3DPROC glTexImage3D = nullptr; @@ -978,6 +984,7 @@ PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC glMultiDrawArraysIndirectCount = nullpt PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC glMultiDrawElementsIndirectCount = nullptr; PFNGLPOLYGONOFFSETCLAMPPROC glPolygonOffsetClamp = nullptr; +*/ #endif LLGLManager gGLManager; @@ -1131,6 +1138,7 @@ bool LLGLManager::initGL() #endif } +#if GL_VERSION_1_3 if (mGLVersion >= 2.1f && LLImageGL::sCompressTextures) { //use texture compression glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST); @@ -1139,6 +1147,7 @@ bool LLGLManager::initGL() { //GL version is < 3.0, always disable texture compression LLImageGL::sCompressTextures = false; } +#endif // Trailing space necessary to keep "nVidia Corpor_ati_on" cards // from being recognized as ATI. @@ -1155,7 +1164,7 @@ bool LLGLManager::initGL() mIsNVIDIA = TRUE; } else if (mGLVendor.find("INTEL") != std::string::npos -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ // The Mesa-based drivers put this in the Renderer string, // not the Vendor string. || mGLRenderer.find("INTEL") != std::string::npos @@ -1233,15 +1242,17 @@ bool LLGLManager::initGL() } glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &mNumTextureImageUnits); +#if GL_VERSION_3_2 glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &mMaxColorTextureSamples); glGetIntegerv(GL_MAX_DEPTH_TEXTURE_SAMPLES, &mMaxDepthTextureSamples); glGetIntegerv(GL_MAX_INTEGER_SAMPLES, &mMaxIntegerSamples); glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords); +#endif glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples); if (mGLVersion >= 4.59f) { - glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &mMaxAnisotropy); + glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &mMaxAnisotropy); } initGLStates(); @@ -1411,6 +1422,7 @@ void LLGLManager::initExtensions() mInited = TRUE; +/* #if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL; @@ -2251,6 +2263,7 @@ void LLGLManager::initExtensions() glPolygonOffsetClamp = (PFNGLPOLYGONOFFSETCLAMPPROC)GLH_EXT_GET_PROC_ADDRESS("glPolygonOffsetClamp"); #endif +*/ } void rotate_quat(LLQuaternion& rotation) @@ -2277,12 +2290,14 @@ void log_glerror() error = glGetError(); while (LL_UNLIKELY(error)) { +#if GLU_VERSION_1_1 GLubyte const * gl_error_msg = gluErrorString(error); if (NULL != gl_error_msg) { LL_WARNS() << "GL Error: " << error << " GL Error String: " << gl_error_msg << LL_ENDL ; } else +#endif // GLU_VERSION_1_1 { // gluErrorString returns NULL for some extensions' error codes. // you'll probably have to grep for the number in glext.h. @@ -2301,6 +2316,7 @@ void do_assert_glerror() if (LL_UNLIKELY(error)) { quit = TRUE; +#if GLU_VERSION_1_1 GLubyte const * gl_error_msg = gluErrorString(error); if (NULL != gl_error_msg) { @@ -2313,6 +2329,7 @@ void do_assert_glerror() } } else +#endif // GLU_VERSION_1_1 { // gluErrorString returns NULL for some extensions' error codes. // you'll probably have to grep for the number in glext.h. @@ -2387,8 +2404,10 @@ void LLGLState::initClass() // sStateMap[GL_TEXTURE_2D] = GL_TRUE; //make sure multisample defaults to disabled +#if GL_EXT_multisample || GL_EXT_multisampled_compatibility sStateMap[GL_MULTISAMPLE] = GL_FALSE; glDisable(GL_MULTISAMPLE); +#endif } //static @@ -2403,6 +2422,7 @@ void LLGLState::restoreGL() void LLGLState::resetTextureStates() { gGL.flush(); +#if GL_VERSION_1_3 GLint maxTextureUnits; glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &maxTextureUnits); @@ -2412,6 +2432,7 @@ void LLGLState::resetTextureStates() glClientActiveTexture(GL_TEXTURE0+j); j == 0 ? gGL.getTexUnit(j)->enable(LLTexUnit::TT_TEXTURE) : gGL.getTexUnit(j)->disable(); } +#endif } void LLGLState::dumpStates() diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index c5e1ff3e23..a397de499e 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -27,7 +27,7 @@ #ifndef LL_LLGLHEADERS_H #define LL_LLGLHEADERS_H -#if LL_MESA +#if LL_MESA || LL_LINUX || __FreeBSD__ //---------------------------------------------------------------------------- // MESA headers // quotes so we get libraries/.../GL/ version @@ -825,8 +825,12 @@ extern PFNGLPOLYGONOFFSETCLAMPPROC glPolygonOffsetClamp; #define GL_GLEXT_PROTOTYPES #include "GL/glext.h" +#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED +#include <OpenGL/gl3.h> + #include "GL/glh_extensions.h" +#if 0 // These symbols don't exist on 10.3.9, so they have to be declared weak. Redeclaring them here fixes the problem. // Note that they also must not be called on 10.3.9. This should be taken care of by a runtime check for the existence of the GL extension. #include <AvailabilityMacros.h> @@ -1028,6 +1032,7 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); #endif #include <OpenGL/gl.h> +#endif // 0 #endif // LL_MESA / LL_WINDOWS / LL_DARWIN diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 28b5bc7495..0c1519824c 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -233,12 +233,18 @@ void LLGLSLShader::placeProfileQuery(bool for_runtime) glGenQueries(1, &mPrimitivesQuery); } - glBeginQuery(GL_TIME_ELAPSED, mTimerQuery); +#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query + glBeginQuery(GL_TIME_ELAPSED_EXT, mTimerQuery); +#endif if (!for_runtime) { +#if GL_VERSION_1_5 glBeginQuery(GL_SAMPLES_PASSED, mSamplesQuery); +#endif +#if GL_VERSION_3_0 glBeginQuery(GL_PRIMITIVES_GENERATED, mPrimitivesQuery); +#endif } } } @@ -249,19 +255,30 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read) { if (!mProfilePending) { - glEndQuery(GL_TIME_ELAPSED); +#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query + glEndQuery(GL_TIME_ELAPSED_EXT); +#endif if (!for_runtime) { +#if GL_VERSION_1_5 glEndQuery(GL_SAMPLES_PASSED); +#endif +#if GL_VERSION_3_0 glEndQuery(GL_PRIMITIVES_GENERATED); +#endif } mProfilePending = for_runtime; } if (mProfilePending && for_runtime && !force_read) { +#if GL_ARB_timer_query GLuint64 result = 0; glGetQueryObjectui64v(mTimerQuery, GL_QUERY_RESULT_AVAILABLE, &result); +#else + GLuint result = 0; + glGetQueryObjectuiv(mTimerQuery, GL_QUERY_RESULT_AVAILABLE, &result); +#endif if (result != GL_TRUE) { @@ -269,18 +286,31 @@ bool LLGLSLShader::readProfileQuery(bool for_runtime, bool force_read) } } +#if GL_ARB_timer_query GLuint64 time_elapsed = 0; glGetQueryObjectui64v(mTimerQuery, GL_QUERY_RESULT, &time_elapsed); +#else + GLuint time_elapsed = 0; + glGetQueryObjectuiv(mTimerQuery, GL_QUERY_RESULT, &time_elapsed); +#endif mTimeElapsed += time_elapsed; mProfilePending = false; if (!for_runtime) { +#if GL_ARB_timer_query GLuint64 samples_passed = 0; glGetQueryObjectui64v(mSamplesQuery, GL_QUERY_RESULT, &samples_passed); - U64 primitives_generated = 0; + 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; sTotalSamplesDrawn += samples_passed; @@ -693,10 +723,14 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString>* u case GL_FLOAT_VEC2: size *= 2; break; case GL_FLOAT_VEC3: size *= 3; break; case GL_FLOAT_VEC4: size *= 4; break; +#if GL_VERSION_1_1 case GL_DOUBLE: size *= 2; break; +#if GL_VERSION_4_0 case GL_DOUBLE_VEC2: size *= 2; break; case GL_DOUBLE_VEC3: size *= 6; break; case GL_DOUBLE_VEC4: size *= 8; break; +#endif // GL_VERSION_4_0 +#endif // GL_VERSION_1_1 case GL_INT_VEC2: size *= 2; break; case GL_INT_VEC3: size *= 3; break; case GL_INT_VEC4: size *= 4; break; @@ -715,6 +749,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString>* u case GL_FLOAT_MAT3x4: size *= 12; break; case GL_FLOAT_MAT4x2: size *= 8; break; case GL_FLOAT_MAT4x3: size *= 12; break; +#if GL_VERSION_4_0 case GL_DOUBLE_MAT2: size *= 8; break; case GL_DOUBLE_MAT3: size *= 18; break; case GL_DOUBLE_MAT4: size *= 32; break; @@ -724,6 +759,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString>* u case GL_DOUBLE_MAT3x4: size *= 24; break; case GL_DOUBLE_MAT4x2: size *= 16; break; case GL_DOUBLE_MAT4x3: size *= 24; break; +#endif // GL_VERSION_4_0 } mTotalUniformSize += size; } @@ -798,7 +834,10 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; - if ((type >= GL_SAMPLER_1D && type <= GL_SAMPLER_2D_RECT_SHADOW) || + if ( +#if GL_VERSION_2_0 + (type >= GL_SAMPLER_1D && type <= GL_SAMPLER_2D_RECT_SHADOW) || +#endif type == GL_SAMPLER_2D_MULTISAMPLE || type == GL_SAMPLER_CUBE_MAP_ARRAY) { //this here is a texture diff --git a/indra/llrender/llglstates.h b/indra/llrender/llglstates.h index 9bb980d7ad..68d4df8e90 100644 --- a/indra/llrender/llglstates.h +++ b/indra/llrender/llglstates.h @@ -166,6 +166,7 @@ public: //---------------------------------------------------------------------------- +#if GL_VERSION_1_1 class LLGLSSpecular { public: @@ -190,6 +191,7 @@ public: } } }; +#endif //---------------------------------------------------------------------------- diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 1609afb7ef..c713a2b3a9 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -271,23 +271,31 @@ S32 LLImageGL::dataFormatBits(S32 dataformat) { switch (dataformat) { +#if GL_EXT_texture_compression_s3tc || GL_EXT_texture_compression_dxt1 case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: return 4; - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return 4; case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: return 8; - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return 8; case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: return 8; +#endif +#if GL_EXT_texture_sRGB || GL_EXT_texture_compression_s3tc_srgb + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return 4; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return 8; case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: return 8; +#endif case GL_LUMINANCE: return 8; case GL_ALPHA: return 8; case GL_RED: return 8; +#if GL_VERSION_1_1 case GL_COLOR_INDEX: return 8; +#endif case GL_LUMINANCE_ALPHA: return 16; case GL_RGB: return 24; case GL_SRGB: return 24; case GL_RGB8: return 24; case GL_RGBA: return 32; +#if GL_VERSION_2_1 case GL_SRGB_ALPHA: return 32; case GL_BGRA: return 32; // Used for QuickTime media textures on the Mac +#endif case GL_DEPTH_COMPONENT: return 24; default: LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL; @@ -300,6 +308,8 @@ S64 LLImageGL::dataFormatBytes(S32 dataformat, S32 width, S32 height) { switch (dataformat) { +#if GL_EXT_texture_compression_s3tc || GL_EXT_texture_compression_dxt1 \ + || GL_EXT_texture_sRGB || GL_EXT_texture_compression_s3tc_srgb case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: @@ -309,6 +319,7 @@ S64 LLImageGL::dataFormatBytes(S32 dataformat, S32 width, S32 height) if (width < 4) width = 4; if (height < 4) height = 4; break; +#endif default: break; } @@ -322,22 +333,30 @@ S32 LLImageGL::dataFormatComponents(S32 dataformat) { switch (dataformat) { +#if GL_EXT_texture_compression_s3tc || GL_EXT_texture_compression_dxt1 case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: return 3; - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return 3; case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: return 4; - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return 4; case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: return 4; +#endif +#if GL_EXT_texture_sRGB || GL_EXT_texture_compression_s3tc_srgb + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return 3; + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return 4; case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: return 4; +#endif case GL_LUMINANCE: return 1; case GL_ALPHA: return 1; case GL_RED: return 1; +#if GL_VERSION_1_1 case GL_COLOR_INDEX: return 1; +#endif case GL_LUMINANCE_ALPHA: return 2; case GL_RGB: return 3; case GL_SRGB: return 3; case GL_RGBA: return 4; +#if GL_VERSION_2_1 case GL_SRGB_ALPHA: return 4; case GL_BGRA: return 4; // Used for QuickTime media textures on the Mac +#endif default: LL_ERRS() << "LLImageGL::Unknown format: " << dataformat << LL_ENDL; return 0; @@ -791,11 +810,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 } else { +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); stop_glerror(); } +#endif LLImageGL::setManualImage(mTarget, gl_level, mFormatInternal, w, h, mFormatPrimary, GL_UNSIGNED_BYTE, (GLvoid*)data_in, mAllowCompression); if (gl_level == 0) @@ -804,11 +825,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 } updatePickMask(w, h, data_in); +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); stop_glerror(); } +#endif stop_glerror(); } @@ -821,11 +844,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 { stop_glerror(); { +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); stop_glerror(); } +#endif S32 w = getWidth(mCurrentDiscardLevel); S32 h = getHeight(mCurrentDiscardLevel); @@ -835,10 +860,12 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 //use legacy mipmap generation mode (note: making this condional can cause rendering issues) // -- but making it not conditional triggers deprecation warnings when core profile is enabled // (some rendering issues while core profile is enabled are acceptable at this point in time) +#if GL_VERSION_1_4 if (!LLRender::sGLCoreProfile) { glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); } +#endif LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, @@ -849,11 +876,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 updatePickMask(w, h, data_in); +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); stop_glerror(); } +#endif if (LLRender::sGLCoreProfile) { @@ -938,11 +967,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 llassert(w > 0 && h > 0 && cur_mip_data); (void)cur_mip_data; { +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); stop_glerror(); } +#endif LLImageGL::setManualImage(mTarget, m, mFormatInternal, w, h, mFormatPrimary, mFormatType, cur_mip_data, mAllowCompression); if (m == 0) @@ -955,11 +986,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 updatePickMask(w, h, cur_mip_data); } +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); stop_glerror(); } +#endif } if (prev_mip_data && prev_mip_data != data_in) { @@ -994,11 +1027,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 } else { +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); stop_glerror(); } +#endif LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, mFormatPrimary, mFormatType, (GLvoid *)data_in, mAllowCompression); @@ -1008,11 +1043,13 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32 stop_glerror(); +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); stop_glerror(); } +#endif } } @@ -1057,13 +1094,17 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image) { case 1: // Use luminance alpha (for fonts) +#if GL_VERSION_1_1 mFormatInternal = GL_LUMINANCE8; +#endif mFormatPrimary = GL_LUMINANCE; mFormatType = GL_UNSIGNED_BYTE; break; case 2: // Use luminance alpha (for fonts) +#if GL_VERSION_1_1 mFormatInternal = GL_LUMINANCE8_ALPHA8; +#endif mFormatPrimary = GL_LUMINANCE_ALPHA; mFormatType = GL_UNSIGNED_BYTE; break; @@ -1091,22 +1132,26 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image) glPixelStorei(GL_UNPACK_ROW_LENGTH, raw_image->getWidth()); stop_glerror(); +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); stop_glerror(); } +#endif return TRUE ; } void LLImageGL::postAddToAtlas() { +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); stop_glerror(); } +#endif glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); gGL.getTexUnit(0)->setTextureFilteringOption(mFilterOption); @@ -1120,7 +1165,9 @@ U32 type_width_from_pixtype(U32 pixtype) { case GL_UNSIGNED_BYTE: case GL_BYTE: +#if GL_VERSION_1_2 case GL_UNSIGNED_INT_8_8_8_8_REV: +#endif type_width = 1; break; case GL_UNSIGNED_SHORT: @@ -1235,11 +1282,13 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3 glPixelStorei(GL_UNPACK_ROW_LENGTH, data_width); stop_glerror(); +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 1); stop_glerror(); } +#endif const U8* sub_datap = datap + (y_pos * data_width + x_pos) * getComponents(); // Update the GL texture @@ -1263,11 +1312,13 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3 gGL.getTexUnit(0)->disable(); stop_glerror(); +#if GL_VERSION_1_1 if(mFormatSwapBytes) { glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); stop_glerror(); } +#endif glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); stop_glerror(); @@ -1435,35 +1486,57 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt { case GL_RGB: case GL_RGB8: +#if GL_VERSION_1_3 intformat = GL_COMPRESSED_RGB; +#endif break; case GL_SRGB: case GL_SRGB8: +#if GL_VERSION_2_1 intformat = GL_COMPRESSED_SRGB; +#endif break; case GL_RGBA: case GL_RGBA8: +#if GL_VERSION_1_3 intformat = GL_COMPRESSED_RGBA; +#endif break; - case GL_SRGB_ALPHA: case GL_SRGB8_ALPHA8: +#if GL_VERSION_2_1 + case GL_SRGB_ALPHA: intformat = GL_COMPRESSED_SRGB_ALPHA; +#endif break; case GL_LUMINANCE: +#if GL_VERSION_1_1 case GL_LUMINANCE8: +#endif +#if GL_VERSION_1_3 intformat = GL_COMPRESSED_LUMINANCE; +#endif break; case GL_LUMINANCE_ALPHA: +#if GL_VERSION_1_1 case GL_LUMINANCE8_ALPHA8: +#endif +#if GL_VERSION_1_3 intformat = GL_COMPRESSED_LUMINANCE_ALPHA; +#endif break; case GL_ALPHA: +#if GL_VERSION_1_1 case GL_ALPHA8: +#endif +#if GL_VERSION_1_3 intformat = GL_COMPRESSED_ALPHA; +#endif break; case GL_RED: case GL_R8: +#if GL_VERSION_3_0 intformat = GL_COMPRESSED_RED; +#endif break; default: LL_WARNS() << "Could not compress format: " << std::hex << intformat << LL_ENDL; @@ -1602,13 +1675,21 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S { case 1: // Use luminance alpha (for fonts) +#if GL_VERSION_1_1 mFormatInternal = GL_LUMINANCE8; +#else + mFormatInternal = GL_LUMINANCE; +#endif mFormatPrimary = GL_LUMINANCE; mFormatType = GL_UNSIGNED_BYTE; break; case 2: // Use luminance alpha (for fonts) +#if GL_VERSION_1_1 mFormatInternal = GL_LUMINANCE8_ALPHA8; +#else + mFormatInternal = GL_LUMINANCE_ALPHA; +#endif mFormatPrimary = GL_LUMINANCE_ALPHA; mFormatType = GL_UNSIGNED_BYTE; break; @@ -1890,6 +1971,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre } //----------------------------------------------------------------------------------------------- +#if GL_VERSION_1_3 if (is_compressed) { LLGLint glbytes; @@ -1916,6 +1998,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre glGetTexImage(GL_TEXTURE_2D, gl_discard, mFormatPrimary, mFormatType, (GLvoid*)(imageraw->getData())); //stop_glerror(); } +#endif // GL_VERSION_1_3 //----------------------------------------------------------------------------------------------- if((error = glGetError()) != GL_NO_ERROR) @@ -2004,11 +2087,13 @@ BOOL LLImageGL::getIsResident(BOOL test_now) { if (test_now) { +#if GL_VERSION_1_1 if (mTexName != 0) { glAreTexturesResident(1, (GLuint*)&mTexName, &mIsResident); } else +#endif { mIsResident = FALSE; } @@ -2138,12 +2223,16 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() mIsMask = FALSE; return; //no alpha channel. case GL_RGBA: +#if GL_VERSION_2_1 case GL_SRGB_ALPHA: +#endif mAlphaStride = 4; break; +#if GL_EXT_bgra case GL_BGRA_EXT: mAlphaStride = 4; break; +#endif default: break; } @@ -2153,6 +2242,7 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() { mAlphaOffset = mAlphaStride - 1 ; } +#if GL_VERSION_1_2 else if(is_little_endian()) { if (mFormatType == GL_UNSIGNED_INT_8_8_8_8) @@ -2175,10 +2265,15 @@ void LLImageGL::calcAlphaChannelOffsetAndStride() mAlphaOffset = 0 ; } } +#endif // GL_VERSION_1_2 if( mAlphaStride < 1 || //unsupported format - mAlphaOffset < 0 || //unsupported type - (mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE)) //unknown situation + mAlphaOffset < 0 //unsupported type +#if GL_EXT_bgra + || + (mFormatPrimary == GL_BGRA_EXT && mFormatType != GL_UNSIGNED_BYTE) //unknown situation +#endif + ) { LL_WARNS() << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << LL_ENDL; @@ -2324,6 +2419,8 @@ bool LLImageGL::isCompressed() bool is_compressed = false; switch (mFormatPrimary) { +#if GL_EXT_texture_compression_s3tc || GL_EXT_texture_compression_dxt1 \ + || GL_EXT_texture_sRGB || GL_EXT_texture_compression_s3tc_srgb case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: @@ -2332,6 +2429,7 @@ bool LLImageGL::isCompressed() case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: is_compressed = true; break; +#endif default: break; } @@ -2350,7 +2448,10 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in) if (mFormatType != GL_UNSIGNED_BYTE || ((mFormatPrimary != GL_RGBA) - && (mFormatPrimary != GL_SRGB_ALPHA))) +#if GL_VERSION_2_1 + && (mFormatPrimary != GL_SRGB_ALPHA) +#endif + )) { //cannot generate a pick mask for this texture return; diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index 4242e330f4..aa092e5215 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -296,8 +296,10 @@ void LLPostProcess::getShaderUniforms(glslUniforms & uniforms, GLuint & prog) void LLPostProcess::doEffects(void) { /// Save GL State +#if GL_VERSION_1_1 glPushAttrib(GL_ALL_ATTRIB_BITS); glPushClientAttrib(GL_ALL_ATTRIB_BITS); +#endif /// Copy the screen buffer to the render texture { @@ -322,15 +324,19 @@ void LLPostProcess::doEffects(void) viewPerspective(); /// Reset GL State +#if GL_VERSION_1_1 glPopClientAttrib(); glPopAttrib(); +#endif checkError(); } void LLPostProcess::copyFrameBuffer(U32 & texture, unsigned int width, unsigned int height) { gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, texture); +#if GL_VERSION_3_1 glCopyTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 0, 0, width, height, 0); +#endif } void LLPostProcess::drawOrthoQuad(unsigned int width, unsigned int height, QuadType type) @@ -371,8 +377,10 @@ void LLPostProcess::createTexture(LLPointer<LLImageGL>& texture, unsigned int wi if(texture->createGLTexture()) { gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, texture->getTexName()); +#if GL_VERSION_3_1 glTexImage2D(GL_TEXTURE_RECTANGLE, 0, 4, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); +#endif gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); } @@ -406,18 +414,22 @@ bool LLPostProcess::checkError(void) while (glErr != GL_NO_ERROR) { // shaderErrorLog << (const char *) gluErrorString(glErr) << std::endl; +#if GLU_VERSION_1_1 char const * err_str_raw = (const char *) gluErrorString(glErr); if(err_str_raw == NULL) { +#endif std::ostringstream err_builder; err_builder << "unknown error number " << glErr; mShaderErrorString = err_builder.str(); +#if GLU_VERSION_1_1 } else { mShaderErrorString = err_str_raw; } +#endif retCode = true; glErr = glGetError(); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index b92c9363fc..f28eefcb63 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -81,10 +81,16 @@ static std::unordered_map<U64, LLVBCache> sVBCache; static const GLenum sGLTextureType[] = { GL_TEXTURE_2D, +#if GL_VERSION_3_1 GL_TEXTURE_RECTANGLE, +#endif GL_TEXTURE_CUBE_MAP, +#if GL_VERSION_4_0 GL_TEXTURE_CUBE_MAP_ARRAY, +#endif +#if GL_VERSION_3_2 GL_TEXTURE_2D_MULTISAMPLE, +#endif GL_TEXTURE_3D }; @@ -522,17 +528,18 @@ void LLTexUnit::setTextureFilteringOption(LLTexUnit::eTextureFilterOptions optio { if (LLImageGL::sGlobalUseAnisotropic && option == TFO_ANISOTROPIC) { - glTexParameterf(sGLTextureType[mCurrTexType], GL_TEXTURE_MAX_ANISOTROPY, gGLManager.mMaxAnisotropy); + glTexParameterf(sGLTextureType[mCurrTexType], GL_TEXTURE_MAX_ANISOTROPY_EXT, gGLManager.mMaxAnisotropy); } else { - glTexParameterf(sGLTextureType[mCurrTexType], GL_TEXTURE_MAX_ANISOTROPY, 1.f); + glTexParameterf(sGLTextureType[mCurrTexType], GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.f); } } } GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) { +#if GL_VERSION_1_3 switch(src) { // All four cases should return the same value. @@ -547,8 +554,10 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) case TBS_TEX_ALPHA: case TBS_ONE_MINUS_TEX_COLOR: case TBS_ONE_MINUS_TEX_ALPHA: +#endif return GL_TEXTURE; +#if GL_VERSION_1_3 // All four cases should return the same value. case TBS_VERT_COLOR: case TBS_VERT_ALPHA: @@ -567,6 +576,7 @@ GLint LLTexUnit::getTextureSource(eTextureBlendSrc src) LL_WARNS() << "Unknown eTextureBlendSrc: " << src << ". Using Vertex Color instead." << LL_ENDL; return GL_PRIMARY_COLOR; } +#endif } GLint LLTexUnit::getTextureSourceType(eTextureBlendSrc src, bool isAlpha) @@ -613,7 +623,9 @@ void LLTexUnit::setColorScale(S32 scale) { mCurrColorScale = scale; gGL.flush(); +#if GL_VERSION_1_1 glTexEnvi( GL_TEXTURE_ENV, GL_RGB_SCALE, scale ); +#endif } } @@ -623,7 +635,9 @@ void LLTexUnit::setAlphaScale(S32 scale) { mCurrAlphaScale = scale; gGL.flush(); +#if GL_VERSION_1_1 glTexEnvi( GL_TEXTURE_ENV, GL_ALPHA_SCALE, scale ); +#endif } } @@ -877,7 +891,9 @@ bool LLRender::init(bool needs_vertex_buffer) glCullFace(GL_BACK); // necessary for reflection maps +#if GL_VERSION_3_2 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); +#endif #if LL_WINDOWS if (glGenVertexArrays == nullptr) diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index ebdc9e751d..020682f526 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -34,6 +34,7 @@ //#include "linden_common.h" +#include <array> #include "v2math.h" #include "v3math.h" #include "v4coloru.h" diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index e1742f84a1..5939fe68dc 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -1514,10 +1514,12 @@ void LLRender2D::setLineWidth(F32 width) // If outside the allowed range, glLineWidth fails with "invalid value". // On Darwin, the range is [1, 1]. static GLfloat range[2]{0.0}; +#if GL_VERSION_1_2 if (range[1] == 0) { glGetFloatv(GL_SMOOTH_LINE_WIDTH_RANGE, range); } +#endif width *= lerp(LLRender::sUIGLScaleFactor.mV[VX], LLRender::sUIGLScaleFactor.mV[VY], 0.5f); glLineWidth(llclamp(width, range[0], range[1])); } diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 9cd7527d3e..aa5bcd0864 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -430,7 +430,8 @@ void LLRenderTarget::bindTarget() if (mTex.empty()) { //no color buffer to draw to - glDrawBuffer(GL_NONE); + GLenum drawbuffers[] = {GL_NONE}; + glDrawBuffers(0, drawbuffers); glReadBuffer(GL_NONE); } @@ -498,7 +499,9 @@ void LLRenderTarget::bindTexture(U32 index, S32 channel, LLTexUnit::eTextureFilt { case GL_SRGB: case GL_SRGB8: +#if GL_VERSION_2_1 case GL_SRGB_ALPHA: +#endif case GL_SRGB8_ALPHA8: isSRGB = true; break; diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index a0314cb5f2..5991a5b35e 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -270,6 +270,8 @@ target_link_libraries(llui llcommon ) +include(LibraryInstall) + # Add tests if(LL_TESTS) include(LLAddBuildTest) diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 2331b34c43..5b7525daac 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -59,6 +59,12 @@ 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 964897500c..c12d52d121 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -59,6 +59,7 @@ 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 6dc68b4de2..05de46b852 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1031,6 +1031,25 @@ 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 ) { @@ -1685,6 +1704,36 @@ 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 340308535f..10f486643a 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -133,6 +133,7 @@ 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 @@ -300,6 +301,7 @@ 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 e030861f20..a76b11621a 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -167,6 +167,50 @@ 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 { @@ -1164,6 +1208,18 @@ 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()) @@ -1201,6 +1257,38 @@ 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) @@ -1972,6 +2060,24 @@ 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 e917f65fbd..a654425230 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -105,6 +105,7 @@ 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(); @@ -249,6 +250,8 @@ 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(); @@ -310,6 +313,7 @@ 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 877585cbef..d44f39682a 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1072,12 +1072,31 @@ 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 fefdd83bd4..a840498628 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -385,6 +385,7 @@ 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, @@ -518,6 +519,7 @@ 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/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 7b1430c67c..1e3c517483 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -51,7 +51,7 @@ set(llwindow_LINK_LIBRARIES llcommon llimage llmath - llrender + #llrender llfilesystem llxml ll::glh_linear @@ -59,9 +59,12 @@ set(llwindow_LINK_LIBRARIES ll::uilibraries ll::SDL ) + +include_directories(${CMAKE_SOURCE_DIR}/llrender) + # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level -if (LINUX) +if (USESYSTEMLIBS) list(APPEND viewer_SOURCE_FILES llkeyboardsdl.cpp llwindowsdl.cpp @@ -84,9 +87,9 @@ if (LINUX) ) endif (BUILD_HEADLESS) -endif (LINUX) +endif (USESYSTEMLIBS) -if (DARWIN) +if (DARWIN AND (NOT USESYSTEMLIBS)) list(APPEND llwindow_SOURCE_FILES llkeyboardmacosx.cpp llwindowmacosx.cpp @@ -108,7 +111,7 @@ if (DARWIN) PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -fpascal-strings" ) -endif (DARWIN) +endif (DARWIN AND (NOT USESYSTEMLIBS)) if (WINDOWS) @@ -180,8 +183,10 @@ endif (SDL_FOUND) target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) target_include_directories(llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -if (DARWIN) +if (DARWIN AND (NOT USESYSTEMLIBS)) include(CMakeFindFrameworks) find_library(CARBON_LIBRARY Carbon) target_link_libraries(llwindow ${CARBON_LIBRARY}) -endif (DARWIN) +endif (DARWIN AND (NOT USESYSTEMLIBS)) + +include(LibraryInstall) diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index b3dcac6222..f154351ce3 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -195,9 +195,9 @@ void LLKeyboard::resetKeys() } -BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) +BOOL LLKeyboard::translateKey(const U32 os_key, KEY *out_key) { - std::map<U16, KEY>::iterator iter; + std::map<U32, KEY>::iterator iter; // Only translate keys in the map, ignore all other keys for now iter = mTranslateKeyMap.find(os_key); @@ -215,9 +215,9 @@ BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) } -U16 LLKeyboard::inverseTranslateKey(const KEY translated_key) +U32 LLKeyboard::inverseTranslateKey(const KEY translated_key) { - std::map<KEY, U16>::iterator iter; + std::map<KEY, U32>::iterator iter; iter = mInvTranslateKeyMap.find(translated_key); if (iter == mInvTranslateKeyMap.end()) { diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index 2618f9f022..1a6292f29f 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -67,16 +67,16 @@ public: BOOL getKeyDown(const KEY key) { return mKeyLevel[key]; } BOOL getKeyRepeated(const KEY key) { return mKeyRepeated[key]; } - BOOL translateKey(const U16 os_key, KEY *translated_key); - U16 inverseTranslateKey(const KEY translated_key); + BOOL translateKey(const U32 os_key, KEY *translated_key); + U32 inverseTranslateKey(const KEY translated_key); BOOL handleTranslatedKeyUp(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes BOOL handleTranslatedKeyDown(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes - virtual BOOL handleKeyUp(const U16 key, MASK mask) = 0; - virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0; + virtual BOOL handleKeyUp(const U32 key, MASK mask) = 0; + virtual BOOL handleKeyDown(const U32 key, MASK mask) = 0; -#ifdef LL_DARWIN +#if defined(LL_DARWIN) && !defined(LL_SDL) // We only actually use this for OS X. virtual void handleModifier(MASK mask) = 0; #endif // LL_DARWIN @@ -111,8 +111,8 @@ protected: void addKeyName(KEY key, const std::string& name); protected: - std::map<U16, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs - std::map<KEY, U16> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys + std::map<U32, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs + std::map<KEY, U32> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys LLWindowCallbacks *mCallbacks; LLTimer mKeyLevelTimer[KEY_COUNT]; // Time since level was set diff --git a/indra/llwindow/llkeyboardheadless.cpp b/indra/llwindow/llkeyboardheadless.cpp index 01ac26261b..3e81aff626 100644 --- a/indra/llwindow/llkeyboardheadless.cpp +++ b/indra/llwindow/llkeyboardheadless.cpp @@ -35,11 +35,11 @@ void LLKeyboardHeadless::resetMaskKeys() { } -BOOL LLKeyboardHeadless::handleKeyDown(const U16 key, const U32 mask) +BOOL LLKeyboardHeadless::handleKeyDown(const U32 key, const U32 mask) { return FALSE; } -BOOL LLKeyboardHeadless::handleKeyUp(const U16 key, const U32 mask) +BOOL LLKeyboardHeadless::handleKeyUp(const U32 key, const U32 mask) { return FALSE; } MASK LLKeyboardHeadless::currentMask(BOOL for_mouse_event) diff --git a/indra/llwindow/llkeyboardheadless.h b/indra/llwindow/llkeyboardheadless.h index 8e067e6108..73910ed883 100644 --- a/indra/llwindow/llkeyboardheadless.h +++ b/indra/llwindow/llkeyboardheadless.h @@ -35,8 +35,8 @@ public: LLKeyboardHeadless(); /*virtual*/ ~LLKeyboardHeadless() {}; - /*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask); - /*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask); + /*virtual*/ BOOL handleKeyUp(const U32 key, MASK mask); + /*virtual*/ BOOL handleKeyDown(const U32 key, MASK mask); /*virtual*/ void resetMaskKeys(); /*virtual*/ MASK currentMask(BOOL for_mouse_event); /*virtual*/ void scanKeyboard(); diff --git a/indra/llwindow/llkeyboardsdl.cpp b/indra/llwindow/llkeyboardsdl.cpp index 3ee10f70cd..d1e5cd6c5a 100644 --- a/indra/llwindow/llkeyboardsdl.cpp +++ b/indra/llwindow/llkeyboardsdl.cpp @@ -29,7 +29,7 @@ #include "linden_common.h" #include "llkeyboardsdl.h" #include "llwindowcallbacks.h" -#include "SDL/SDL.h" +#include "SDL2/SDL.h" LLKeyboardSDL::LLKeyboardSDL() { @@ -40,7 +40,7 @@ LLKeyboardSDL::LLKeyboardSDL() // Virtual key mappings from SDL_keysym.h ... // SDL maps the letter keys to the ASCII you'd expect, but it's lowercase... - U16 cur_char; + U32 cur_char; for (cur_char = 'A'; cur_char <= 'Z'; cur_char++) { mTranslateKeyMap[cur_char] = cur_char; @@ -57,16 +57,16 @@ LLKeyboardSDL::LLKeyboardSDL() // These ones are translated manually upon keydown/keyup because // SDL doesn't handle their numlock transition. - //mTranslateKeyMap[SDLK_KP4] = KEY_PAD_LEFT; - //mTranslateKeyMap[SDLK_KP6] = KEY_PAD_RIGHT; - //mTranslateKeyMap[SDLK_KP8] = KEY_PAD_UP; - //mTranslateKeyMap[SDLK_KP2] = KEY_PAD_DOWN; + //mTranslateKeyMap[SDLK_KP_4] = KEY_PAD_LEFT; + //mTranslateKeyMap[SDLK_KP_6] = KEY_PAD_RIGHT; + //mTranslateKeyMap[SDLK_KP_8] = KEY_PAD_UP; + //mTranslateKeyMap[SDLK_KP_2] = KEY_PAD_DOWN; //mTranslateKeyMap[SDLK_KP_PERIOD] = KEY_DELETE; - //mTranslateKeyMap[SDLK_KP7] = KEY_HOME; - //mTranslateKeyMap[SDLK_KP1] = KEY_END; - //mTranslateKeyMap[SDLK_KP9] = KEY_PAGE_UP; - //mTranslateKeyMap[SDLK_KP3] = KEY_PAGE_DOWN; - //mTranslateKeyMap[SDLK_KP0] = KEY_INSERT; + //mTranslateKeyMap[SDLK_KP_7] = KEY_HOME; + //mTranslateKeyMap[SDLK_KP_1] = KEY_END; + //mTranslateKeyMap[SDLK_KP_9] = KEY_PAGE_UP; + //mTranslateKeyMap[SDLK_KP_3] = KEY_PAGE_DOWN; + //mTranslateKeyMap[SDLK_KP_0] = KEY_INSERT; mTranslateKeyMap[SDLK_SPACE] = ' '; mTranslateKeyMap[SDLK_RETURN] = KEY_RETURN; @@ -124,23 +124,23 @@ LLKeyboardSDL::LLKeyboardSDL() mTranslateKeyMap[SDLK_QUOTE] = '\''; // Build inverse map - std::map<U16, KEY>::iterator iter; + std::map<U32, KEY>::iterator iter; for (iter = mTranslateKeyMap.begin(); iter != mTranslateKeyMap.end(); iter++) { mInvTranslateKeyMap[iter->second] = iter->first; } // numpad map - mTranslateNumpadMap[SDLK_KP0] = KEY_PAD_INS; - mTranslateNumpadMap[SDLK_KP1] = KEY_PAD_END; - mTranslateNumpadMap[SDLK_KP2] = KEY_PAD_DOWN; - mTranslateNumpadMap[SDLK_KP3] = KEY_PAD_PGDN; - mTranslateNumpadMap[SDLK_KP4] = KEY_PAD_LEFT; - mTranslateNumpadMap[SDLK_KP5] = KEY_PAD_CENTER; - mTranslateNumpadMap[SDLK_KP6] = KEY_PAD_RIGHT; - mTranslateNumpadMap[SDLK_KP7] = KEY_PAD_HOME; - mTranslateNumpadMap[SDLK_KP8] = KEY_PAD_UP; - mTranslateNumpadMap[SDLK_KP9] = KEY_PAD_PGUP; + mTranslateNumpadMap[SDLK_KP_0] = KEY_PAD_INS; + mTranslateNumpadMap[SDLK_KP_1] = KEY_PAD_END; + mTranslateNumpadMap[SDLK_KP_2] = KEY_PAD_DOWN; + mTranslateNumpadMap[SDLK_KP_3] = KEY_PAD_PGDN; + mTranslateNumpadMap[SDLK_KP_4] = KEY_PAD_LEFT; + mTranslateNumpadMap[SDLK_KP_5] = KEY_PAD_CENTER; + mTranslateNumpadMap[SDLK_KP_6] = KEY_PAD_RIGHT; + mTranslateNumpadMap[SDLK_KP_7] = KEY_PAD_HOME; + mTranslateNumpadMap[SDLK_KP_8] = KEY_PAD_UP; + mTranslateNumpadMap[SDLK_KP_9] = KEY_PAD_PGUP; mTranslateNumpadMap[SDLK_KP_PERIOD] = KEY_PAD_DEL; // build inverse numpad map @@ -154,7 +154,7 @@ LLKeyboardSDL::LLKeyboardSDL() void LLKeyboardSDL::resetMaskKeys() { - SDLMod mask = SDL_GetModState(); + SDL_Keymod mask = SDL_GetModState(); // MBW -- XXX -- This mirrors the operation of the Windows version of resetMaskKeys(). // It looks a bit suspicious, as it won't correct for keys that have been released. @@ -165,7 +165,11 @@ void LLKeyboardSDL::resetMaskKeys() mKeyLevel[KEY_SHIFT] = TRUE; } - if(mask & KMOD_CTRL) + if(mask & (KMOD_CTRL +#ifdef LL_DARWIN + | KMOD_GUI +#endif + )) { mKeyLevel[KEY_CONTROL] = TRUE; } @@ -187,7 +191,11 @@ MASK LLKeyboardSDL::updateModifiers(const U32 mask) out_mask |= MASK_SHIFT; } - if(mask & KMOD_CTRL) + if(mask & (KMOD_CTRL +#ifdef LL_DARWIN + | KMOD_GUI +#endif + )) { out_mask |= MASK_CONTROL; } @@ -201,34 +209,34 @@ MASK LLKeyboardSDL::updateModifiers(const U32 mask) } -static U16 adjustNativekeyFromUnhandledMask(const U16 key, const U32 mask) +static U32 adjustNativekeyFromUnhandledMask(const U32 key, const U32 mask) { // SDL doesn't automatically adjust the keysym according to // whether NUMLOCK is engaged, so we massage the keysym manually. - U16 rtn = key; + U32 rtn = key; if (!(mask & KMOD_NUM)) { switch (key) { case SDLK_KP_PERIOD: rtn = SDLK_DELETE; break; - case SDLK_KP0: rtn = SDLK_INSERT; break; - case SDLK_KP1: rtn = SDLK_END; break; - case SDLK_KP2: rtn = SDLK_DOWN; break; - case SDLK_KP3: rtn = SDLK_PAGEDOWN; break; - case SDLK_KP4: rtn = SDLK_LEFT; break; - case SDLK_KP6: rtn = SDLK_RIGHT; break; - case SDLK_KP7: rtn = SDLK_HOME; break; - case SDLK_KP8: rtn = SDLK_UP; break; - case SDLK_KP9: rtn = SDLK_PAGEUP; break; + case SDLK_KP_0: rtn = SDLK_INSERT; break; + case SDLK_KP_1: rtn = SDLK_END; break; + case SDLK_KP_2: rtn = SDLK_DOWN; break; + case SDLK_KP_3: rtn = SDLK_PAGEDOWN; break; + case SDLK_KP_4: rtn = SDLK_LEFT; break; + case SDLK_KP_6: rtn = SDLK_RIGHT; break; + case SDLK_KP_7: rtn = SDLK_HOME; break; + case SDLK_KP_8: rtn = SDLK_UP; break; + case SDLK_KP_9: rtn = SDLK_PAGEUP; break; } } return rtn; } -BOOL LLKeyboardSDL::handleKeyDown(const U16 key, const U32 mask) +BOOL LLKeyboardSDL::handleKeyDown(const U32 key, const U32 mask) { - U16 adjusted_nativekey; + U32 adjusted_nativekey; KEY translated_key = 0; U32 translated_mask = MASK_NONE; BOOL handled = FALSE; @@ -246,9 +254,9 @@ BOOL LLKeyboardSDL::handleKeyDown(const U16 key, const U32 mask) } -BOOL LLKeyboardSDL::handleKeyUp(const U16 key, const U32 mask) +BOOL LLKeyboardSDL::handleKeyUp(const U32 key, const U32 mask) { - U16 adjusted_nativekey; + U32 adjusted_nativekey; KEY translated_key = 0; U32 translated_mask = MASK_NONE; BOOL handled = FALSE; @@ -268,7 +276,7 @@ BOOL LLKeyboardSDL::handleKeyUp(const U16 key, const U32 mask) MASK LLKeyboardSDL::currentMask(BOOL for_mouse_event) { MASK result = MASK_NONE; - SDLMod mask = SDL_GetModState(); + SDL_Keymod mask = SDL_GetModState(); if (mask & KMOD_SHIFT) result |= MASK_SHIFT; if (mask & KMOD_CTRL) result |= MASK_CONTROL; @@ -277,7 +285,7 @@ MASK LLKeyboardSDL::currentMask(BOOL for_mouse_event) // For keyboard events, consider Meta keys equivalent to Control if (!for_mouse_event) { - if (mask & KMOD_META) result |= MASK_CONTROL; + if (mask & KMOD_GUI) result |= MASK_CONTROL; } return result; @@ -310,12 +318,12 @@ void LLKeyboardSDL::scanKeyboard() } -BOOL LLKeyboardSDL::translateNumpadKey( const U16 os_key, KEY *translated_key) +BOOL LLKeyboardSDL::translateNumpadKey( const U32 os_key, KEY *translated_key) { return translateKey(os_key, translated_key); } -U16 LLKeyboardSDL::inverseTranslateNumpadKey(const KEY translated_key) +U32 LLKeyboardSDL::inverseTranslateNumpadKey(const KEY translated_key) { return inverseTranslateKey(translated_key); } diff --git a/indra/llwindow/llkeyboardsdl.h b/indra/llwindow/llkeyboardsdl.h index 620f83e9b4..ac6e9f2cef 100644 --- a/indra/llwindow/llkeyboardsdl.h +++ b/indra/llwindow/llkeyboardsdl.h @@ -28,7 +28,10 @@ #define LL_LLKEYBOARDSDL_H #include "llkeyboard.h" -#include "SDL/SDL.h" +#if !defined(__i386__) && !defined(__x86_64__) +#define SDL_DISABLE_IMMINTRIN_H +#endif +#include "SDL2/SDL.h" class LLKeyboardSDL : public LLKeyboard { @@ -36,8 +39,8 @@ public: LLKeyboardSDL(); /*virtual*/ ~LLKeyboardSDL() {}; - /*virtual*/ BOOL handleKeyUp(const U16 key, MASK mask); - /*virtual*/ BOOL handleKeyDown(const U16 key, MASK mask); + /*virtual*/ BOOL handleKeyUp(const U32 key, MASK mask); + /*virtual*/ BOOL handleKeyDown(const U32 key, MASK mask); /*virtual*/ void resetMaskKeys(); /*virtual*/ MASK currentMask(BOOL for_mouse_event); /*virtual*/ void scanKeyboard(); @@ -45,11 +48,11 @@ public: protected: MASK updateModifiers(const U32 mask); void setModifierKeyLevel( KEY key, BOOL new_state ); - BOOL translateNumpadKey( const U16 os_key, KEY *translated_key ); - U16 inverseTranslateNumpadKey(const KEY translated_key); + BOOL translateNumpadKey( const U32 os_key, KEY *translated_key ); + U32 inverseTranslateNumpadKey(const KEY translated_key); private: - std::map<U16, KEY> mTranslateNumpadMap; // special map for translating OS keys to numpad keys - std::map<KEY, U16> mInvTranslateNumpadMap; // inverse of the above + std::map<U32, KEY> mTranslateNumpadMap; // special map for translating OS keys to numpad keys + std::map<KEY, U32> mInvTranslateNumpadMap; // inverse of the above }; #endif diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 9cc11091b6..b51b4fad82 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -33,8 +33,10 @@ #include "llwindowsdl.h" #elif LL_WINDOWS #include "llwindowwin32.h" +/* #elif LL_DARWIN #include "llwindowmacosx.h" +*/ #endif #include "llerror.h" @@ -74,12 +76,12 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) #if LL_MESA_HEADLESS // !!! *FIX: (?) LL_WARNS() << "OSMessageBox: " << text << LL_ENDL; return OSBTN_OK; +#elif LL_SDL + result = OSMessageBoxSDL(text, caption, type); #elif LL_WINDOWS result = OSMessageBoxWin32(text, caption, type); #elif LL_DARWIN result = OSMessageBoxMacOSX(text, caption, type); -#elif LL_SDL - result = OSMessageBoxSDL(text, caption, type); #else #error("OSMessageBox not implemented for this platform!") #endif @@ -259,12 +261,12 @@ BOOL LLWindow::copyTextToPrimary(const LLWString &src) // static std::vector<std::string> LLWindow::getDynamicFallbackFontList() { -#if LL_WINDOWS +#if LL_SDL + return LLWindowSDL::getDynamicFallbackFontList(); +#elif LL_WINDOWS return LLWindowWin32::getDynamicFallbackFontList(); #elif LL_DARWIN return LLWindowMacOSX::getDynamicFallbackFontList(); -#elif LL_SDL - return LLWindowSDL::getDynamicFallbackFontList(); #else return std::vector<std::string>(); #endif @@ -273,12 +275,12 @@ std::vector<std::string> LLWindow::getDynamicFallbackFontList() // static std::vector<std::string> LLWindow::getDisplaysResolutionList() { -#if LL_WINDOWS +#ifdef LL_SDL + return std::vector<std::string>(); +#elif LL_WINDOWS return LLWindowWin32::getDisplaysResolutionList(); #elif LL_DARWIN return LLWindowMacOSX::getDisplaysResolutionList(); -#else - return std::vector<std::string>(); #endif } @@ -359,11 +361,13 @@ void LLSplashScreen::show() { if (!gSplashScreenp) { +#if !LL_SDL #if LL_WINDOWS && !LL_MESA_HEADLESS gSplashScreenp = new LLSplashScreenWin32; #elif LL_DARWIN gSplashScreenp = new LLSplashScreenMacOSX; #endif +#endif // !LL_SDL if (gSplashScreenp) { gSplashScreenp->showImpl(); @@ -412,7 +416,7 @@ LLWindow* LLWindowManager::createWindow( U32 max_vram, F32 max_gl_version) { - LLWindow* new_window; + LLWindow* new_window = nullptr; if (use_gl) { diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp index a43d281d4c..ddf913045f 100644 --- a/indra/llwindow/llwindowcallbacks.cpp +++ b/indra/llwindow/llwindowcallbacks.cpp @@ -52,6 +52,10 @@ 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 d5681400a1..b7a843e748 100644 --- a/indra/llwindow/llwindowcallbacks.h +++ b/indra/llwindow/llwindowcallbacks.h @@ -37,6 +37,7 @@ 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/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index df8b2ba5ab..f7079d574c 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -51,12 +51,14 @@ extern "C" { # include "fontconfig/fontconfig.h" } -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ // not necessarily available on random SDL platforms, so #if LL_LINUX // for execv(), waitpid(), fork() # include <unistd.h> # include <sys/types.h> # include <sys/wait.h> +# define GLX_GLXEXT_PROTOTYPES 1 +# include <GL/glx.h> #endif // LL_LINUX extern BOOL gDebugWindowProc; @@ -66,6 +68,41 @@ const S32 MAX_NUM_RESOLUTIONS = 200; // static variable for ATI mouse cursor crash work-around: static bool ATIbug = false; +#if LL_DARWIN + +#include <OpenGL/OpenGL.h> +#include <CoreGraphics/CGDirectDisplay.h> +#include <CoreServices/CoreServices.h> + +BOOL gHiDPISupport = TRUE; + +namespace +{ + struct NativeKeyEventData { + enum EventType { + KEYUNKNOWN, + KEYUP, + KEYDOWN, + KEYCHAR + }; + + EventType mKeyEvent = KEYUNKNOWN; + uint32_t mEventType = 0; + uint32_t mEventModifiers = 0; + uint32_t mEventKeyCode = 0; + uint32_t mEventChars = 0; + uint32_t mEventUnmodChars = 0; + bool mEventRepeat = false; + } *mRawKeyEvent = NULL; +} +// +// LLWindowMacOSX +// + +BOOL LLWindowSDL::sUseMultGL = FALSE; + +#endif + // // LLWindowSDL // @@ -119,7 +156,9 @@ bool LLWindowSDL::ll_try_gtk_init(void) if (!tried_gtk_init) { tried_gtk_init = TRUE; +#ifndef LL_USESYSTEMLIBS if (!g_thread_supported ()) g_thread_init (NULL); +#endif maybe_lock_display(); gtk_is_good = gtk_init_check(NULL, NULL); maybe_unlock_display(); @@ -267,7 +306,7 @@ static SDL_Surface *Load_BMP_Resource(const char *basename) return SDL_LoadBMP(path_buffer); } -#if LL_X11 +#if 0 // This is an XFree86/XOrg-specific hack for detecting the amount of Video RAM // on this machine. It works by searching /var/log/var/log/Xorg.?.log or // /var/log/XFree86.?.log for a ': (VideoRAM ?|Memory): (%d+) kB' regex, where @@ -430,44 +469,25 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B << int(c_sdl_version.major) << "." << int(c_sdl_version.minor) << "." << int(c_sdl_version.patch) << LL_ENDL; - const SDL_version *r_sdl_version; - r_sdl_version = SDL_Linked_Version(); + SDL_version r_sdl_version; + SDL_GetVersion(&r_sdl_version); LL_INFOS() << " Running against SDL " - << int(r_sdl_version->major) << "." - << int(r_sdl_version->minor) << "." - << int(r_sdl_version->patch) << LL_ENDL; + << int(r_sdl_version.major) << "." + << int(r_sdl_version.minor) << "." + << int(r_sdl_version.patch) << LL_ENDL; - const SDL_VideoInfo *video_info = SDL_GetVideoInfo( ); - if (!video_info) + SDL_DisplayMode display_mode; + if (SDL_GetDesktopDisplayMode(0, &display_mode) < 0) { LL_INFOS() << "SDL_GetVideoInfo() failed! " << SDL_GetError() << LL_ENDL; setupFailure("SDL_GetVideoInfo() failed, Window creation error", "Error", OSMB_OK); return FALSE; } - if (video_info->current_h > 0) - { - mOriginalAspectRatio = (float)video_info->current_w / (float)video_info->current_h; - LL_INFOS() << "Original aspect ratio was " << video_info->current_w << ":" << video_info->current_h << "=" << mOriginalAspectRatio << LL_ENDL; - } - - SDL_EnableUNICODE(1); - SDL_WM_SetCaption(mWindowTitle.c_str(), mWindowTitle.c_str()); - - // Set the application icon. - SDL_Surface *bmpsurface; - bmpsurface = Load_BMP_Resource("ll_icon.BMP"); - if (bmpsurface) + if (display_mode.h > 0) { - // This attempts to give a black-keyed mask to the icon. - SDL_SetColorKey(bmpsurface, - SDL_SRCCOLORKEY, - SDL_MapRGB(bmpsurface->format, 0,0,0) ); - SDL_WM_SetIcon(bmpsurface, NULL); - // The SDL examples cheerfully avoid freeing the icon - // surface, but I'm betting that's leaky. - SDL_FreeSurface(bmpsurface); - bmpsurface = NULL; + mOriginalAspectRatio = (float)display_mode.w / (float)display_mode.h; + LL_INFOS() << "Original aspect ratio was " << display_mode.w << ":" << display_mode.h << "=" << mOriginalAspectRatio << LL_ENDL; } // note: these SetAttributes make Tom's 9600-on-AMD64 fail to @@ -481,13 +501,21 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B // We need stencil support for a few (minor) things. if (!getenv("LL_GL_NO_STENCIL")) SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); - SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, (bits <= 16) ? 1 : 8); + SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, (bits <= 16) ? 1 : 8); // *FIX: try to toggle vsync here? mFullscreen = fullscreen; - int sdlflags = SDL_OPENGL | SDL_RESIZABLE | SDL_ANYFORMAT; + int sdlflags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE;// | SDL_ANYFORMAT; + + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); +#if LL_DARWIN + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); +#else + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6); +#endif + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); @@ -551,19 +579,23 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B height = 768; } - mWindow = SDL_SetVideoMode(width, height, bits, sdlflags | SDL_FULLSCREEN); + mWindow = SDL_CreateWindow(mWindowTitle.c_str(), + SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, + width, height, sdlflags | SDL_WINDOW_FULLSCREEN); if (!mWindow && bits > 16) { SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); - mWindow = SDL_SetVideoMode(width, height, bits, sdlflags | SDL_FULLSCREEN); + mWindow = SDL_CreateWindow(mWindowTitle.c_str(), + SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, + width, height, sdlflags | SDL_WINDOW_FULLSCREEN); } if (mWindow) { + SDL_GL_CreateContext(mWindow); mFullscreen = TRUE; - mFullscreenWidth = mWindow->w; - mFullscreenHeight = mWindow->h; - mFullscreenBits = mWindow->format->BitsPerPixel; + SDL_GetWindowSize(mWindow, &mFullscreenWidth, &mFullscreenHeight); + //mFullscreenBits = mWindow->format->BitsPerPixel; mFullscreenRefresh = -1; LL_INFOS() << "Running at " << mFullscreenWidth @@ -595,11 +627,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B width = 768; LL_INFOS() << "createContext: creating window " << width << "x" << height << "x" << bits << LL_ENDL; - mWindow = SDL_SetVideoMode(width, height, bits, sdlflags); + mWindow = SDL_CreateWindow(mWindowTitle.c_str(), + SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, + width, height, sdlflags); if (!mWindow && bits > 16) { SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); - mWindow = SDL_SetVideoMode(width, height, bits, sdlflags); + mWindow = SDL_CreateWindow(mWindowTitle.c_str(), + SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, + width, height, sdlflags); } if (!mWindow) @@ -608,29 +644,63 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B setupFailure("Window creation error", "Error", OSMB_OK); return FALSE; } + SDL_GL_CreateContext(mWindow); } else if (!mFullscreen && (mWindow != NULL)) { LL_INFOS() << "createContext: SKIPPING - !fullscreen, but +mWindow " << width << "x" << height << "x" << bits << LL_ENDL; } - // Detect video memory size. -# if LL_X11 - gGLManager.mVRAM = x11_detect_VRAM_kb() / 1024; - if (gGLManager.mVRAM != 0) + //SDL_EnableUNICODE(1); + SDL_SetWindowTitle(mWindow, mWindowTitle.c_str()); + + // Set the application icon. + SDL_Surface *bmpsurface; + bmpsurface = Load_BMP_Resource("ll_icon.BMP"); + if (bmpsurface) { - LL_INFOS() << "X11 log-parser detected " << gGLManager.mVRAM << "MB VRAM." << LL_ENDL; + // This attempts to give a black-keyed mask to the icon. + SDL_SetColorKey(bmpsurface, + SDL_TRUE, + SDL_MapRGB(bmpsurface->format, 0,0,0) ); + SDL_SetWindowIcon(mWindow, bmpsurface); + // The SDL examples cheerfully avoid freeing the icon + // surface, but I'm betting that's leaky. + SDL_FreeSurface(bmpsurface); + bmpsurface = NULL; + } + + // Detect video memory size. +#if LL_DARWIN + CGLRendererInfoObj info = 0; + GLint vram_megabytes = 0; + int num_renderers = 0; + auto err = CGLQueryRendererInfo(CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay), + &info, &num_renderers); + if (!err) { + CGLDescribeRenderer(info, 0, kCGLRPVideoMemoryMegabytes, &vram_megabytes); + CGLDestroyRendererInfo(info); } else -# endif // LL_X11 - { - // fallback to letting SDL detect VRAM. - // note: I've not seen SDL's detection ever actually find - // VRAM != 0, but if SDL *does* detect it then that's a bonus. - gGLManager.mVRAM = video_info->video_mem / 1024; - if (gGLManager.mVRAM != 0) - { - LL_INFOS() << "SDL detected " << gGLManager.mVRAM << "MB VRAM." << LL_ENDL; + vram_megabytes = 256; + gGLManager.mVRAM = vram_megabytes; +#else + PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC queryInteger; + queryInteger = (PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) + glXGetProcAddressARB((const GLubyte *)"glXQueryCurrentRendererIntegerMESA"); + unsigned int vram_megabytes = 0; + queryInteger(GLX_RENDERER_VIDEO_MEMORY_MESA, &vram_megabytes); + if (!vram_megabytes) { + glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, (int *)&vram_megabytes); + vram_megabytes /= 1024; } - } + if (!vram_megabytes) { + glGetIntegerv(GL_VBO_FREE_MEMORY_ATI, (int *)&vram_megabytes); + vram_megabytes /= 1024; + } + + gGLManager.mVRAM = vram_megabytes; +# endif // LL_DARWIN + if (gGLManager.mVRAM) + LL_INFOS() << "Detected " << gGLManager.mVRAM << "MB VRAM." << LL_ENDL; // If VRAM is not detected, that is handled later // *TODO: Now would be an appropriate time to check for some @@ -660,6 +730,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B // relaxed about if we have to. if (colorBits < 32) { +#if 0 close(); setupFailure( "Second Life requires True Color (32-bit) to run in a window.\n" @@ -670,6 +741,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B "Error", OSMB_OK); return FALSE; +#endif } #if 0 // *FIX: we're going to brave it for now... @@ -693,15 +765,17 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B /* Grab the window manager specific information */ SDL_SysWMinfo info; SDL_VERSION(&info.version); - if ( SDL_GetWMInfo(&info) ) + if ( SDL_GetWindowWMInfo(mWindow, &info) ) { /* Save the information for later use */ if ( info.subsystem == SDL_SYSWM_X11 ) { mSDL_Display = info.info.x11.display; - mSDL_XWindowID = info.info.x11.wmwindow; + mSDL_XWindowID = info.info.x11.window; + /* Lock_Display = info.info.x11.lock_func; Unlock_Display = info.info.x11.unlock_func; + */ } else { @@ -718,12 +792,16 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B //make sure multisampling is disabled by default +#if GL_VERSION_1_3 glDisable(GL_MULTISAMPLE_ARB); +#endif // We need to do this here, once video is init'd + /* if (-1 == SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL)) LL_WARNS() << "Couldn't enable key-repeat: " << SDL_GetError() <<LL_ENDL; + */ // Don't need to get the current gamma, since there's a call that restores it to the system defaults. return TRUE; @@ -896,8 +974,7 @@ BOOL LLWindowSDL::getSize(LLCoordScreen *size) { if (mWindow) { - size->mX = mWindow->w; - size->mY = mWindow->h; + SDL_GetWindowSize(mWindow, &size->mX, &size->mY); return (TRUE); } @@ -908,8 +985,7 @@ BOOL LLWindowSDL::getSize(LLCoordWindow *size) { if (mWindow) { - size->mX = mWindow->w; - size->mY = mWindow->h; + SDL_GetWindowSize(mWindow, &size->mX, &size->mY); return (TRUE); } @@ -934,9 +1010,10 @@ BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size) // Push a resize event onto SDL's queue - we'll handle it // when it comes out again. SDL_Event event; - event.type = SDL_VIDEORESIZE; - event.resize.w = size.mX; - event.resize.h = size.mY; + event.type = SDL_WINDOWEVENT; + event.window.event = SDL_WINDOWEVENT_RESIZED; + event.window.data1 = size.mX; + event.window.data2 = size.mY; SDL_PushEvent(&event); // copied into queue return TRUE; @@ -952,9 +1029,10 @@ BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size) // Push a resize event onto SDL's queue - we'll handle it // when it comes out again. SDL_Event event; - event.type = SDL_VIDEORESIZE; - event.resize.w = size.mX; - event.resize.h = size.mY; + event.type = SDL_WINDOWEVENT; + event.window.event = SDL_WINDOWEVENT_RESIZED; + event.window.data1 = size.mX; + event.window.data2 = size.mY; SDL_PushEvent(&event); // copied into queue return TRUE; @@ -968,7 +1046,7 @@ void LLWindowSDL::swapBuffers() { if (mWindow) { - SDL_GL_SwapBuffers(); + SDL_GL_SwapWindow(mWindow); } } @@ -990,7 +1068,9 @@ F32 LLWindowSDL::getGamma() BOOL LLWindowSDL::restoreGamma() { //CGDisplayRestoreColorSyncSettings(); - SDL_SetGamma(1.0f, 1.0f, 1.0f); + Uint16 ramp; + SDL_CalculateGammaRamp(1.0f, &ramp); + SDL_SetWindowGammaRamp(mWindow, &ramp, &ramp, &ramp); return true; } @@ -999,7 +1079,9 @@ BOOL LLWindowSDL::setGamma(const F32 gamma) mGamma = gamma; if (mGamma == 0) mGamma = 0.1f; mGamma = 1/mGamma; - SDL_SetGamma(mGamma, mGamma, mGamma); + Uint16 ramp; + SDL_CalculateGammaRamp(mGamma, &ramp); + SDL_SetWindowGammaRamp(mWindow, &ramp, &ramp, &ramp); return true; } @@ -1035,6 +1117,27 @@ void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immedia #endif } +void *LLWindowSDL::createSharedContext() +{ + // *FIX: What to do with SDL? + return nullptr; +} + +void LLWindowSDL::makeContextCurrent(void* context) +{ + // *FIX: What to do with SDL? +} + +void LLWindowSDL::destroySharedContext(void* context) +{ + // *FIX: What to do with SDL? +} + +void LLWindowSDL::toggleVSync(bool enable_vsync) +{ + // *FIX: What to do with SDL? +} + BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position) { BOOL result = TRUE; @@ -1048,7 +1151,10 @@ BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position) //LL_INFOS() << "setCursorPosition(" << screen_pos.mX << ", " << screen_pos.mY << ")" << LL_ENDL; // do the actual forced cursor move. - SDL_WarpMouse(screen_pos.mX, screen_pos.mY); + if (mFullscreen) + SDL_WarpMouseGlobal(screen_pos.mX, screen_pos.mY); + else + SDL_WarpMouseInWindow(mWindow, screen_pos.mX, screen_pos.mY); //LL_INFOS() << llformat("llcw %d,%d -> scr %d,%d", position.mX, position.mY, screen_pos.mX, screen_pos.mY) << LL_ENDL; @@ -1125,6 +1231,12 @@ F32 LLWindowSDL::getPixelAspectRatio() return pixel_aspect; } +U32 LLWindowSDL::getAvailableVRAMMegabytes() +{ + static const U32 mb = 1024*1024; + static const U32 total_factor = 2; + return gGLManager.mVRAM - (LLImageGL::getTextureBytesAllocated() * total_factor/mb); +} // This is to support 'temporarily windowed' mode so that // dialogs are still usable in fullscreen. @@ -1146,7 +1258,7 @@ void LLWindowSDL::beforeDialog() // it only works in X11 if (running_x11 && mWindow) { - SDL_WM_ToggleFullScreen(mWindow); + SDL_SetWindowFullscreen(mWindow, SDL_WINDOW_FULLSCREEN); } } } @@ -1188,7 +1300,7 @@ void LLWindowSDL::afterDialog() // in X11 if (running_x11 && mWindow) { - SDL_WM_ToggleFullScreen(mWindow); + SDL_SetWindowFullscreen(mWindow, SDL_WINDOW_FULLSCREEN); } } } @@ -1331,17 +1443,24 @@ BOOL LLWindowSDL::copyTextToPrimary(const LLWString &text) BOOL LLWindowSDL::isClipboardTextAvailable() { - return FALSE; // unsupported + return SDL_HasClipboardText(); } BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst) { - return FALSE; // unsupported + auto data = SDL_GetClipboardText(); + if (data) + { + dst = LLWString(utf8str_to_wstring(data)); + SDL_free(data); + return TRUE; + } + return FALSE; } BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s) { - return FALSE; // unsupported + return !SDL_SetClipboardText(wstring_to_utf8str(s).c_str()); } BOOL LLWindowSDL::isPrimaryTextAvailable() @@ -1368,6 +1487,7 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso mSupportedResolutions = new LLWindowResolution[MAX_NUM_RESOLUTIONS]; mNumSupportedResolutions = 0; + /* SDL_Rect **modes = SDL_ListModes(NULL, SDL_OPENGL | SDL_FULLSCREEN); if ( (modes != NULL) && (modes != ((SDL_Rect **) -1)) ) { @@ -1382,8 +1502,14 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso { modes--; SDL_Rect *r = *modes; - int w = r->w; - int h = r->h; + */ + static int display_in_use = 0; // Only using first display + auto display_mode_count = SDL_GetNumDisplayModes(display_in_use); + SDL_DisplayMode mode; + for (int i = 0; i < display_mode_count; ++i) { + SDL_GetDisplayMode(display_in_use, i, &mode); + int w = mode.w; + int h = mode.h; if ((w >= 800) && (h >= 600)) { // make sure we don't add the same resolution multiple times! @@ -1397,7 +1523,7 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso } } } - } + //} } num_resolutions = mNumSupportedResolutions; @@ -1410,7 +1536,9 @@ BOOL LLWindowSDL::convertCoords(LLCoordGL from, LLCoordWindow *to) return FALSE; to->mX = from.mX; - to->mY = mWindow->h - from.mY - 1; + int h; + SDL_GetWindowSize(mWindow, nullptr, &h); + to->mY = h - from.mY - 1; return TRUE; } @@ -1421,7 +1549,9 @@ BOOL LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordGL* to) return FALSE; to->mX = from.mX; - to->mY = mWindow->h - from.mY - 1; + int h; + SDL_GetWindowSize(mWindow, nullptr, &h); + to->mY = h - from.mY - 1; return TRUE; } @@ -1482,13 +1612,13 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) else mReallyCapturedCount = 0; - SDL_GrabMode wantmode, newmode; + SDL_bool wantmode, newmode; if (mReallyCapturedCount <= 0) // uncapture { - wantmode = SDL_GRAB_OFF; + wantmode = SDL_FALSE; } else // capture { - wantmode = SDL_GRAB_ON; + wantmode = SDL_TRUE; } if (mReallyCapturedCount < 0) // yuck, imbalance. @@ -1512,7 +1642,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) *keyboard* input from the window manager, which was frustrating users. */ int result; - if (wantmode == SDL_GRAB_ON) + if (wantmode == SDL_TRUE) { //LL_INFOS() << "X11 POINTER GRABBY" << LL_ENDL; //newmode = SDL_WM_GrabInput(wantmode); @@ -1523,13 +1653,13 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) None, None, CurrentTime); maybe_unlock_display(); if (GrabSuccess == result) - newmode = SDL_GRAB_ON; + newmode = SDL_TRUE; else - newmode = SDL_GRAB_OFF; - } else if (wantmode == SDL_GRAB_OFF) + newmode = SDL_FALSE; + } else if (wantmode == SDL_FALSE) { //LL_INFOS() << "X11 POINTER UNGRABBY" << LL_ENDL; - newmode = SDL_GRAB_OFF; + newmode = SDL_FALSE; //newmode = SDL_WM_GrabInput(SDL_GRAB_OFF); maybe_lock_display(); @@ -1539,7 +1669,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) maybe_unlock_display(); } else { - newmode = SDL_GRAB_QUERY; // neutral + //newmode = SDL_GRAB_QUERY; // neutral } } else // not actually running on X11, for some reason newmode = wantmode; @@ -1550,11 +1680,11 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) } // return boolean success for whether we ended up in the desired state - return (capture && SDL_GRAB_ON==newmode) || - (!capture && SDL_GRAB_OFF==newmode); + return (capture && SDL_TRUE==newmode) || + (!capture && SDL_FALSE==newmode); } -U32 LLWindowSDL::SDLCheckGrabbyKeys(SDLKey keysym, BOOL gain) +U32 LLWindowSDL::SDLCheckGrabbyKeys(SDL_Keycode keysym, BOOL gain) { /* part of the fix for SL-13243: Some popular window managers like to totally eat alt-drag for the purposes of moving windows. We @@ -1755,7 +1885,6 @@ void LLWindowSDL::gatherInput() case SDL_KEYDOWN: mKeyScanCode = event.key.keysym.scancode; - mKeyVirtualKey = event.key.keysym.unicode; mKeyModifiers = event.key.keysym.mod; gKeyboard->handleKeyDown(event.key.keysym.sym, event.key.keysym.mod); @@ -1763,16 +1892,23 @@ void LLWindowSDL::gatherInput() if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0) SDLReallyCaptureInput(TRUE); - if (event.key.keysym.unicode) + if (event.key.keysym.sym < SDLK_SPACE) { - handleUnicodeUTF16(event.key.keysym.unicode, + handleUnicodeUTF16(event.key.keysym.sym, gKeyboard->currentMask(FALSE)); } break; + case SDL_TEXTINPUT: + mCallbacks->handleUnicodeString(event.text.text, false); + break; + + case SDL_TEXTEDITING: + mCallbacks->handleUnicodeString(event.edit.text, true); + break; + case SDL_KEYUP: mKeyScanCode = event.key.keysym.scancode; - mKeyVirtualKey = event.key.keysym.unicode; mKeyModifiers = event.key.keysym.mod; if (SDLCheckGrabbyKeys(event.key.keysym.sym, FALSE) == 0) @@ -1837,14 +1973,17 @@ void LLWindowSDL::gatherInput() { mCallbacks->handleMiddleMouseDown(this, openGlCoord, mask); } - else if (event.button.button == 4) // mousewheel up...thanks to X11 for making SDL consider these "buttons". - mCallbacks->handleScrollWheel(this, -1); - else if (event.button.button == 5) // mousewheel down...thanks to X11 for making SDL consider these "buttons". - mCallbacks->handleScrollWheel(this, 1); break; } + case SDL_MOUSEWHEEL: + if (event.wheel.y > 0) // mousewheel up + mCallbacks->handleScrollWheel(this, -1); + else if (event.wheel.y < 0) // mousewheel down + mCallbacks->handleScrollWheel(this, 1); + break; + case SDL_MOUSEBUTTONUP: { LLCoordWindow winCoord(event.button.x, event.button.y); @@ -1863,19 +2002,21 @@ void LLWindowSDL::gatherInput() break; } - case SDL_VIDEOEXPOSE: // VIDEOEXPOSE doesn't specify the damage, but hey, it's OpenGL...repaint the whole thing! - mCallbacks->handlePaint(this, 0, 0, mWindow->w, mWindow->h); - break; - - case SDL_VIDEORESIZE: // *FIX: handle this? + case SDL_WINDOWEVENT: { - LL_INFOS() << "Handling a resize event: " << event.resize.w << - "x" << event.resize.h << LL_ENDL; + if (event.window.event == SDL_WINDOWEVENT_EXPOSED) { // VIDEOEXPOSE doesn't specify the damage, but hey, it's OpenGL...repaint the whole thing! + int w, h; + SDL_GetWindowSize(mWindow, &w, &h); + mCallbacks->handlePaint(this, 0, 0, w, h); + } else if (event.window.event == SDL_WINDOWEVENT_RESIZED) { + LL_INFOS() << "Handling a resize event: " << event.window.data1 << + "x" << event.window.data2 << LL_ENDL; - S32 width = llmax(event.resize.w, (S32)mMinWindowWidth); - S32 height = llmax(event.resize.h, (S32)mMinWindowHeight); + S32 width = llmax(event.window.data1, (S32)mMinWindowWidth); + S32 height = llmax(event.window.data2, (S32)mMinWindowHeight); // *FIX: I'm not sure this is necessary! + /* mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags); if (!mWindow) { @@ -1889,10 +2030,13 @@ void LLWindowSDL::gatherInput() } break; } + */ mCallbacks->handleResize(this, width, height); + } break; } + /* case SDL_ACTIVEEVENT: if (event.active.state & SDL_APPINPUTFOCUS) { @@ -1929,6 +2073,7 @@ void LLWindowSDL::gatherInput() } } break; + */ case SDL_QUIT: if(mCallbacks->handleCloseRequest(this)) @@ -2467,9 +2612,55 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b) { return (FALSE); } + +#if LL_DARWIN + +LLSD LLWindowSDL::getNativeKeyData() +{ + LLSD result = LLSD::emptyMap(); + + if(mRawKeyEvent) + { + result["event_type"] = LLSD::Integer(mRawKeyEvent->mEventType); + result["event_modifiers"] = LLSD::Integer(mRawKeyEvent->mEventModifiers); + result["event_keycode"] = LLSD::Integer(mRawKeyEvent->mEventKeyCode); + result["event_chars"] = (mRawKeyEvent->mEventChars) ? LLSD(LLSD::Integer(mRawKeyEvent->mEventChars)) : LLSD(); + result["event_umodchars"] = (mRawKeyEvent->mEventUnmodChars) ? LLSD(LLSD::Integer(mRawKeyEvent->mEventUnmodChars)) : LLSD(); + result["event_isrepeat"] = LLSD::Boolean(mRawKeyEvent->mEventRepeat); + } + + LL_DEBUGS() << "native key data is: " << result << LL_ENDL; + + return result; +} + +#else + +LLSD LLWindowSDL::getNativeKeyData() +{ + LLSD result = LLSD::emptyMap(); + + U32 modifiers = 0; + modifiers |= (mKeyModifiers & KMOD_LSHIFT) ? 0x0001 : 0; + modifiers |= (mKeyModifiers & KMOD_RSHIFT) ? 0x0001 : 0; + modifiers |= (mKeyModifiers & KMOD_CAPS) ? 0x0002 : 0; + modifiers |= (mKeyModifiers & KMOD_LCTRL) ? 0x0004 : 0; + modifiers |= (mKeyModifiers & KMOD_RCTRL) ? 0x0004 : 0; + modifiers |= (mKeyModifiers & KMOD_LALT) ? 0x0008 : 0; + modifiers |= (mKeyModifiers & KMOD_RALT) ? 0x0008 : 0; + + result["scan_code"] = (S32)mKeyScanCode; + result["virtual_key"] = (S32)mKeyVirtualKey; + result["modifiers"] = (S32)modifiers; + + return result; +} + +#endif // LL_DARWIN + #endif // LL_GTK -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ // extracted from spawnWebBrowser for clarity and to eliminate // compiler confusion regarding close(int fd) vs. LLWindow::close() void exec_cmd(const std::string& cmd, const std::string& arg) @@ -2525,7 +2716,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) LL_INFOS() << "spawn_web_browser: " << escaped_url << LL_ENDL; -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ # if LL_X11 if (mSDL_Display) { @@ -2537,13 +2728,53 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) # endif // LL_X11 std::string cmd, arg; +#ifdef LL_USESYSTEMLIBS + cmd = gDirUtilp->getExecutableDir(); +#else cmd = gDirUtilp->getAppRODataDir(); cmd += gDirUtilp->getDirDelimiter(); cmd += "etc"; +#endif cmd += gDirUtilp->getDirDelimiter(); cmd += "launch_url.sh"; arg = escaped_url; exec_cmd(cmd, arg); + +#elif LL_DARWIN + + S32 result = 0; + CFURLRef urlRef = NULL; + + LL_INFOS() << "Opening URL " << escaped_url << LL_ENDL; + + CFStringRef stringRef = CFStringCreateWithCString(NULL, escaped_url.c_str(), kCFStringEncodingUTF8); + if (stringRef) + { + // This will succeed if the string is a full URL, including the http:// + // Note that URLs specified this way need to be properly percent-escaped. + urlRef = CFURLCreateWithString(NULL, stringRef, NULL); + + // Don't use CRURLCreateWithFileSystemPath -- only want valid URLs + + CFRelease(stringRef); + } + + if (urlRef) + { + result = LSOpenCFURLRef(urlRef, NULL); + + if (result != noErr) + { + LL_INFOS() << "Error " << result << " on open." << LL_ENDL; + } + + CFRelease(urlRef); + } + else + { + LL_INFOS() << "Error: couldn't create URL." << LL_ENDL; + } + #endif // LL_LINUX LL_INFOS() << "spawn_web_browser returning." << LL_ENDL; diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index e96fce92f5..0dbd94b1fe 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -32,12 +32,15 @@ #include "llwindow.h" #include "lltimer.h" -#include "SDL/SDL.h" -#include "SDL/SDL_endian.h" +#if !defined(__i386__) && !defined(__x86_64__) +#define SDL_DISABLE_IMMINTRIN_H +#endif +#include "SDL2/SDL.h" +#include "SDL2/SDL_endian.h" #if LL_X11 // get X11-specific headers for use in low-level stuff like copy-and-paste support -#include "SDL/SDL_syswm.h" +#include "SDL2/SDL_syswm.h" #endif // AssertMacros.h does bad things. @@ -49,80 +52,86 @@ class LLWindowSDL : public LLWindow { public: - /*virtual*/ void show(); - /*virtual*/ void hide(); - /*virtual*/ void close(); - /*virtual*/ BOOL getVisible(); - /*virtual*/ BOOL getMinimized(); - /*virtual*/ BOOL getMaximized(); - /*virtual*/ BOOL maximize(); - /*virtual*/ void minimize(); - /*virtual*/ void restore(); + void show() override; + void hide() override; + void close() override; + BOOL getVisible() override; + BOOL getMinimized() override; + BOOL getMaximized() override; + BOOL maximize() override; + void minimize() override; + void restore() override; /*virtual*/ BOOL getFullscreen(); - /*virtual*/ BOOL getPosition(LLCoordScreen *position); - /*virtual*/ BOOL getSize(LLCoordScreen *size); - /*virtual*/ BOOL getSize(LLCoordWindow *size); - /*virtual*/ BOOL setPosition(LLCoordScreen position); - /*virtual*/ BOOL setSizeImpl(LLCoordScreen size); - /*virtual*/ BOOL setSizeImpl(LLCoordWindow size); - /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL); - /*virtual*/ BOOL setCursorPosition(LLCoordWindow position); - /*virtual*/ BOOL getCursorPosition(LLCoordWindow *position); - /*virtual*/ void showCursor(); - /*virtual*/ void hideCursor(); - /*virtual*/ void showCursorFromMouseMove(); - /*virtual*/ void hideCursorUntilMouseMove(); - /*virtual*/ BOOL isCursorHidden(); - /*virtual*/ void updateCursor(); - /*virtual*/ void captureMouse(); - /*virtual*/ void releaseMouse(); - /*virtual*/ void setMouseClipping( BOOL b ); - /*virtual*/ void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true); - - /*virtual*/ BOOL isClipboardTextAvailable(); - /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst); - /*virtual*/ BOOL copyTextToClipboard(const LLWString & src); - - /*virtual*/ BOOL isPrimaryTextAvailable(); - /*virtual*/ BOOL pasteTextFromPrimary(LLWString &dst); - /*virtual*/ BOOL copyTextToPrimary(const LLWString & src); - - /*virtual*/ void flashIcon(F32 seconds); - /*virtual*/ F32 getGamma(); - /*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma - /*virtual*/ U32 getFSAASamples(); - /*virtual*/ void setFSAASamples(const U32 samples); - /*virtual*/ BOOL restoreGamma(); // Restore original gamma table (before updating gamma) - /*virtual*/ ESwapMethod getSwapMethod() { return mSwapMethod; } - /*virtual*/ void processMiscNativeEvents(); - /*virtual*/ void gatherInput(); - /*virtual*/ void swapBuffers(); + BOOL getPosition(LLCoordScreen *position) override; + BOOL getSize(LLCoordScreen *size) override; + BOOL getSize(LLCoordWindow *size) override; + BOOL setPosition(LLCoordScreen position) override; + BOOL setSizeImpl(LLCoordScreen size) override; + BOOL setSizeImpl(LLCoordWindow size) override; + BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) override; + void* createSharedContext() override; + void makeContextCurrent(void* context) override; + void destroySharedContext(void* context) override; + void toggleVSync(bool enable_vsync) override; + BOOL setCursorPosition(LLCoordWindow position) override; + BOOL getCursorPosition(LLCoordWindow *position) override; + void showCursor() override; + void hideCursor() override; + void showCursorFromMouseMove() override; + void hideCursorUntilMouseMove() override; + BOOL isCursorHidden() override; + void updateCursor() override; + void captureMouse() override; + void releaseMouse() override; + void setMouseClipping( BOOL b ) override; + void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true) override; + + BOOL isClipboardTextAvailable() override; + BOOL pasteTextFromClipboard(LLWString &dst) override; + BOOL copyTextToClipboard(const LLWString & src) override; + + BOOL isPrimaryTextAvailable() override; + BOOL pasteTextFromPrimary(LLWString &dst) override; + BOOL copyTextToPrimary(const LLWString & src) override; + + void flashIcon(F32 seconds) override; + F32 getGamma() override; + BOOL setGamma(const F32 gamma) override; // Set the gamma + U32 getFSAASamples() override; + void setFSAASamples(const U32 samples) override; + BOOL restoreGamma() override; // Restore original gamma table (before updating gamma) + ESwapMethod getSwapMethod() override { return mSwapMethod; } + void processMiscNativeEvents() override; + void gatherInput() override; + void swapBuffers() override; /*virtual*/ void restoreGLContext() {}; - /*virtual*/ void delayInputProcessing() { }; + void delayInputProcessing() override { }; // handy coordinate space conversion routines - /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to); - /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to); - /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to); - /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to); - /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to); - /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to); + BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) override; + BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) override; + BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) override; + BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) override; + BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) override; + BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) override; + + LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) override; + F32 getNativeAspectRatio() override; + F32 getPixelAspectRatio() override; + void setNativeAspectRatio(F32 ratio) override { mOverrideAspectRatio = ratio; } - /*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions); - /*virtual*/ F32 getNativeAspectRatio(); - /*virtual*/ F32 getPixelAspectRatio(); - /*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; } + U32 getAvailableVRAMMegabytes() override; - /*virtual*/ void beforeDialog(); - /*virtual*/ void afterDialog(); + void beforeDialog() override; + void afterDialog() override; - /*virtual*/ BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b); + BOOL dialogColorPicker(F32 *r, F32 *g, F32 *b) override; - /*virtual*/ void *getPlatformWindow(); - /*virtual*/ void bringToFront(); + void *getPlatformWindow() override; + void bringToFront() override; - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async) override; static std::vector<std::string> getDynamicFallbackFontList(); @@ -145,6 +154,10 @@ public: static Display* get_SDL_Display(void); #endif // LL_X11 +#if LL_DARWIN + static BOOL sUseMultGL; +#endif + protected: LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, int x, int y, int width, int height, U32 flags, @@ -152,8 +165,8 @@ protected: BOOL ignore_pixel_depth, U32 fsaa_samples); ~LLWindowSDL(); - /*virtual*/ BOOL isValid(); - /*virtual*/ LLSD getNativeKeyData(); + BOOL isValid() override; + LLSD getNativeKeyData() override; void initCursors(); void quitCursors(); @@ -177,7 +190,7 @@ protected: void destroyContext(); void setupFailure(const std::string& text, const std::string& caption, U32 type); void fixWindowSize(void); - U32 SDLCheckGrabbyKeys(SDLKey keysym, BOOL gain); + U32 SDLCheckGrabbyKeys(SDL_Keycode keysym, BOOL gain); BOOL SDLReallyCaptureInput(BOOL capture); // @@ -185,7 +198,7 @@ protected: // U32 mGrabbyKeyFlags; int mReallyCapturedCount; - SDL_Surface * mWindow; + SDL_Window * mWindow; std::string mWindowTitle; double mOriginalAspectRatio; BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize. @@ -211,7 +224,7 @@ private: U32 mKeyScanCode; U32 mKeyVirtualKey; - SDLMod mKeyModifiers; + Uint16 mKeyModifiers; }; diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 508c2b919b..03ac4bc9f2 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -4,6 +4,7 @@ project(llxml) include(00-Common) include(LLCommon) +include(LLWindow) set(llxml_SOURCE_FILES llcontrol.cpp @@ -31,9 +32,11 @@ target_link_libraries( llxml llmath llcommon ll::expat + ll::SDL ) target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) # tests diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index 2298dc22e7..df27f16ea1 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -29,6 +29,7 @@ #include <iostream> #include <map> +#include <SDL_rwops.h> #include "llxmlnode.h" diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index baf2e6a951..c9da53daae 100644 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -111,7 +111,7 @@ LLXmlTreeNode::~LLXmlTreeNode() attribute_map_t::iterator iter; for (iter=mAttributes.begin(); iter != mAttributes.end(); iter++) delete iter->second; - for(LLXmlTreeNode* node : mChildren) + for(LLXmlTreeNode* node : mChildren) { delete node; } diff --git a/indra/media_plugins/CMakeLists.txt b/indra/media_plugins/CMakeLists.txt index 972bb7dd2d..20a8a74042 100644 --- a/indra/media_plugins/CMakeLists.txt +++ b/indra/media_plugins/CMakeLists.txt @@ -2,16 +2,16 @@ add_subdirectory(base) -if (LINUX) - #add_subdirectory(gstreamer010) +if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + add_subdirectory(libvlc) add_subdirectory(example) -endif (LINUX) +endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") -if (DARWIN) +if (DARWIN OR LINUX) add_subdirectory(cef) add_subdirectory(libvlc) add_subdirectory(example) -endif (DARWIN) +endif (DARWIN OR LINUX) if (WINDOWS) add_subdirectory(cef) diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 64b6a4228d..593aa982f1 100644 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -31,6 +31,7 @@ set(media_plugin_base_HEADER_FILES ) add_library(media_plugin_base + STATIC ${media_plugin_base_SOURCE_FILES} ) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 410778114d..15b2d71923 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -32,8 +32,9 @@ set(media_plugin_cef_HEADER_FILES # Select which VolumeCatcher implementation to use if (LINUX) - message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n" - " Please create a volume_catcher implementation for this platform.") +# message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n" +# " Please create a volume_catcher implementation for this platform.") + list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp) elseif (DARWIN) list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp) find_library(CORESERVICES_LIBRARY CoreServices) @@ -90,3 +91,14 @@ if (DARWIN) ) endif (DARWIN) + +if (INSTALL) + 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} DESTINATION ${_LIB}) +endif () diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index a3c1c4ef99..d5d9a5d147 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -55,3 +55,14 @@ if (DARWIN) ) endif (DARWIN) + +if (INSTALL) + 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} DESTINATION ${_LIB}) +endif () diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c2869eedfd..59a7327400 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -9,20 +9,28 @@ include(Linking) include(Boost) include(bugsplat) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(BuildPackagesInfo) +endif () include(BuildVersion) include(CMakeCopyIfDifferent) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(CubemapToEquirectangularJS) include(DBusGlib) +endif () include(DragDrop) include(EXPAT) include(FMODSTUDIO) include(Hunspell) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(JPEGEncoderBasic) +endif () include(JsonCpp) include(LLAppearance) include(LLAudio) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(LLCA) +endif () include(LLCommon) include(LLCoreHttp) include(LLImage) @@ -38,18 +46,29 @@ include(OpenSSL) include(PNG) include(TemplateCheck) include(TinyEXR) +if (NOT USESYSTEMLIBS) include(ThreeJS) +endif () include(Tracy) include(UI) include(ViewerMiscLibs) +if (USE_AUTOBUILD_3P OR USE_CONAN) include(ViewerManager) +endif () include(VisualLeakDetector) include(VulkanGltf) include(ZLIBNG) include(URIPARSER) include(LLPrimitive) - -if (NOT HAVOK_TPV) +if (ENABLE_MEDIA_PLUGINS) + include(LibVLCPlugin) + if (DARWIN OR LINUX) + include(CEFPlugin) + endif (DARWIN OR LINUX) +endif (ENABLE_MEDIA_PLUGINS) +include(UnixInstall) + +if ((USE_AUTOBUILD_3P OR USE_CONAN) AND 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 @@ -70,7 +89,7 @@ if (NOT HAVOK_TPV) target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef) endif (DARWIN) endif() -endif (NOT HAVOK_TPV) +endif ((USE_AUTOBUILD_3P OR USE_CONAN) AND NOT HAVOK_TPV) set(viewer_SOURCE_FILES gltfscenemanager.cpp @@ -1402,12 +1421,15 @@ set_source_files_properties( ) if (DARWIN) + if (NOT USESYSTEMLIBS) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm) LIST(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.h) + endif (NOT USESYSTEMLIBS) LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm) LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h) + if (NOT USESYSTEMLIBS) # This should be compiled with the viewer. LIST(APPEND viewer_SOURCE_FILES llappdelegate-objc.mm) set_source_files_properties( @@ -1422,6 +1444,7 @@ if (DARWIN) # warnings. COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness" ) + endif (NOT USESYSTEMLIBS) # Add resource files to the project. set(viewer_RESOURCE_FILES @@ -1441,17 +1464,19 @@ if (DARWIN) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) endif (DARWIN) -if (LINUX) +if (USESYSTEMLIBS) LIST(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp) set_source_files_properties( llappviewerlinux.cpp PROPERTIES COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" ) - LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp) + #LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp) + if (NOT (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") + endif () -endif (LINUX) +endif (USESYSTEMLIBS) if (WINDOWS) list(APPEND viewer_SOURCE_FILES @@ -1637,6 +1662,10 @@ set(viewer_APPSETTINGS_FILES featuretable_mac.txt ) +if (NOT (USE_AUTOBUILD_3P OR USE_CONAN)) + list(REMOVE_ITEM viewer_APPSETTINGS_FILES packages-info.txt) +endif () + source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES}) set_source_files_properties(${viewer_APPSETTINGS_FILES} @@ -1932,8 +1961,16 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLPHYSICSEXTENSIONS_LIBRARIES} ll::bugsplat ll::tracy + ll::fontconfig ) +if (ENABLE_MEDIA_PLUGINS) + target_link_libraries(${VIEWER_BINARY_NAME} ll::libvlc ) + if (DARWIN OR LINUX) + target_link_libraries(${VIEWER_BINARY_NAME} ll::cef ) + endif (DARWIN OR LINUX) +endif (ENABLE_MEDIA_PLUGINS) + if( TARGET ll::intel_memops ) target_link_libraries(${VIEWER_BINARY_NAME} ll::intel_memops ) endif() @@ -1945,6 +1982,42 @@ endif() set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to artwork files.") +set_source_files_properties(llinventorygallery.cpp PROPERTIES COMPILE_FLAGS + -Wno-unused-but-set-variable) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_source_files_properties(llappviewerlinux.cpp PROPERTIES + COMPILE_FLAGS -Wno-dangling-gsl + ) + set_source_files_properties(llviewerstats.cpp PROPERTIES + COMPILE_FLAGS -Wno-unused-value) +elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties( + llface.cpp + llhttpretrypolicy.cpp + llmodelpreview.cpp + llpanelface.cpp + lltexturefetch.cpp + PROPERTIES COMPILE_FLAGS -Wno-maybe-uninitialized) + set_source_files_properties(llfasttimerview.cpp PROPERTIES + COMPILE_FLAGS -Wno-nonnull) + set_source_files_properties(llinventorygallerymenu.cpp PROPERTIES + COMPILE_FLAGS -Wno-uninitialized) + set_source_files_properties(llviewerstats.cpp PROPERTIES + COMPILE_FLAGS -Wno-unused-value) + set_source_files_properties(llurl.cpp PROPERTIES COMPILE_FLAGS + -Wno-stringop-truncation) + set_source_files_properties( + llfloaterimsessiontab.cpp + llfloatersimplesnapshot.cpp + llfloatersidepanelcontainer.cpp + llinventorypanel.cpp + llpanelmaininventory.cpp + llpathfindingnavmesh.cpp + llsidepanelinventory.cpp + PROPERTIES COMPILE_FLAGS -Wno-dangling-reference + ) +endif () + message("Copying fonts") file(GLOB FONT_FILE_GLOB_LIST "${AUTOBUILD_INSTALL_DIR}/fonts/*" @@ -1967,6 +2040,8 @@ foreach(elem ${country_codes}) configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY) endforeach() +if (NOT USESYSTEMLIBS) + if (LINUX) set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}) @@ -2044,6 +2119,8 @@ if (LINUX) endif (PACKAGE) endif (LINUX) +endif (NOT USESYSTEMLIBS) + if (DARWIN) # These all get set with PROPERTIES. It's not that the property names are # magically known to CMake -- it's that these names are referenced in the @@ -2052,12 +2129,12 @@ if (DARWIN) set(MACOSX_EXECUTABLE_NAME "${VIEWER_CHANNEL}") set(MACOSX_BUNDLE_INFO_STRING "${VIEWER_CHANNEL}") set(MACOSX_BUNDLE_ICON_FILE "secondlife.icns") - set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.secondlife.indra.viewer") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.megapahit.viewer") set(MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") - set(MACOSX_BUNDLE_BUNDLE_NAME "SecondLife") + set(MACOSX_BUNDLE_BUNDLE_NAME "Megapahit") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") set(MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}") - set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2020") + set(MACOSX_BUNDLE_COPYRIGHT "Copyright © Megapahit. 2024") set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "SecondLife.nib") set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLApplication") @@ -2112,7 +2189,15 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) + if (ENABLE_MEDIA_PLUGINS) + if (DARWIN OR LINUX) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef) + else (DARWIN) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc) + endif (DARWIN OR LINUX) + else (ENABLE_MEDIA_PLUGINS) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin) + endif (ENABLE_MEDIA_PLUGINS) if (ENABLE_SIGNING) set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}") diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 041b8cea0b..353d660a2d 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -1,7 +1,7 @@ /* Localized versions of Info.plist keys */ -CFBundleName = "Second Life"; +CFBundleName = "Megapahit"; -CFBundleShortVersionString = "Second Life version %%VERSION%%"; -CFBundleGetInfoString = "Second Life version %%VERSION%%, Copyright 2004 Linden Research, Inc."; +CFBundleShortVersionString = "Megapahit version %%VERSION%%"; +CFBundleGetInfoString = "Megapahit version %%VERSION%%, Copyright 2024 Megapahit."; diff --git a/indra/newview/SecondLife.xib b/indra/newview/SecondLife.xib index fbff8fe307..8302392f5d 100644 --- a/indra/newview/SecondLife.xib +++ b/indra/newview/SecondLife.xib @@ -42,7 +42,7 @@ <array class="NSMutableArray" key="NSMenuItems"> <object class="NSMenuItem" id="694149608"> <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Second Life</string> + <string key="NSTitle">Megapahit</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> <object class="NSCustomResource" key="NSOnImage" id="353210768"> @@ -55,11 +55,11 @@ </object> <string key="NSAction">submenuAction:</string> <object class="NSMenu" key="NSSubmenu" id="110575045"> - <string key="NSTitle">Second Life</string> + <string key="NSTitle">Megapahit</string> <array class="NSMutableArray" key="NSMenuItems"> <object class="NSMenuItem" id="238522557"> <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">About Second Life</string> + <string key="NSTitle">About Megapahit</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> <reference key="NSOnImage" ref="353210768"/> @@ -120,7 +120,7 @@ </object> <object class="NSMenuItem" id="755159360"> <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide Second Life</string> + <string key="NSTitle">Hide Megapahit</string> <string key="NSKeyEquiv">h</string> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> @@ -156,7 +156,7 @@ </object> <object class="NSMenuItem" id="632727374"> <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Quit Second Life</string> + <string key="NSTitle">Quit Megapahit</string> <string key="NSKeyEquiv">q</string> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> @@ -323,7 +323,7 @@ <int key="NSWindowBacking">2</int> <string key="NSWindowRect">{{196, 240}, {1024, 600}}</string> <int key="NSWTFlags">74974208</int> - <string key="NSWindowTitle">Second Life</string> + <string key="NSWindowTitle">Megapahit</string> <string key="NSWindowClass">LLNSWindow</string> <nil key="NSViewClass"/> <nil key="NSUserInterfaceItemIdentifier"/> @@ -338,7 +338,7 @@ </object> <string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string> <string key="NSMaxSize">{10000000000000, 10000000000000}</string> - <string key="NSFrameAutosaveName">Second Life</string> + <string key="NSFrameAutosaveName">Megapahit</string> <int key="NSWindowCollectionBehavior">128</int> <bool key="NSWindowIsRestorable">NO</bool> </object> diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index ac2247c815..7ee70132c0 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -1,28 +1,78 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME} - DESTINATION ${APP_BINARY_DIR} + DESTINATION bin ) -install(DIRECTORY skins app_settings linux_tools - DESTINATION ${APP_SHARE_DIR} +install(PROGRAMS linux_tools/launch_url.sh + DESTINATION libexec/${VIEWER_BINARY_NAME} + ) + +if (LINUX) + 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(FILES + ${AUTOBUILD_INSTALL_DIR}/lib/release/libcef.so + DESTINATION ${_LIB}) + install(PROGRAMS + ${AUTOBUILD_INSTALL_DIR}/bin/release/chrome-sandbox + DESTINATION libexec/${VIEWER_BINARY_NAME} + PERMISSIONS SETUID OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + install(PROGRAMS + ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host + DESTINATION libexec/${VIEWER_BINARY_NAME}) + install(FILES + ${AUTOBUILD_INSTALL_DIR}/bin/release/snapshot_blob.bin + ${AUTOBUILD_INSTALL_DIR}/bin/release/v8_context_snapshot.bin + DESTINATION ${_LIB}) + install(FILES + ${AUTOBUILD_INSTALL_DIR}/resources/chrome_100_percent.pak + ${AUTOBUILD_INSTALL_DIR}/resources/chrome_200_percent.pak + ${AUTOBUILD_INSTALL_DIR}/resources/icudtl.dat + ${AUTOBUILD_INSTALL_DIR}/resources/resources.pak + DESTINATION ${_LIB}) + install(DIRECTORY + ${AUTOBUILD_INSTALL_DIR}/resources/locales + DESTINATION ${_LIB}) +endif (LINUX) + +install(DIRECTORY skins app_settings fonts + DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) +install(DIRECTORY icons/hicolor + DESTINATION share/icons + ) + find_file(IS_ARTWORK_PRESENT NAMES have_artwork_bundle.marker PATHS ${VIEWER_DIR}/newview/res) if (IS_ARTWORK_PRESENT) install(DIRECTORY res res-sdl character - DESTINATION ${APP_SHARE_DIR} + DESTINATION share/${VIEWER_BINARY_NAME} PATTERN ".svn" EXCLUDE ) else (IS_ARTWORK_PRESENT) message(STATUS "WARNING: Artwork is not present, and will not be installed") endif (IS_ARTWORK_PRESENT) -install(FILES featuretable_linux.txt featuretable_solaris.txt - DESTINATION ${APP_SHARE_DIR} +install(FILES featuretable_linux.txt + #featuretable_solaris.txt + licenses.txt + ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt + DESTINATION share/${VIEWER_BINARY_NAME} ) install(FILES ${SCRIPTS_DIR}/messages/message_template.msg - DESTINATION ${APP_SHARE_DIR}/app_settings + ${SCRIPTS_DIR}/../etc/message.xml + DESTINATION share/${VIEWER_BINARY_NAME}/app_settings + ) + +install(FILES linux_tools/${VIEWER_BINARY_NAME}.desktop + DESTINATION share/applications ) diff --git a/indra/newview/app_settings/camera/Rear.xml b/indra/newview/app_settings/camera/Rear.xml index 7eda566e48..db02001b9c 100644 --- a/indra/newview/app_settings/camera/Rear.xml +++ b/indra/newview/app_settings/camera/Rear.xml @@ -53,8 +53,8 @@ <key>Value</key> <array> <real>-3</real> - <real>0</real> - <real>0.75</real> + <real>0.5</real> + <real>0.2</real> </array> </map> <key>CameraOffsetScale</key> @@ -89,9 +89,9 @@ <string>Vector3D</string> <key>Value</key> <array> - <real>1.0</real> - <real>0.0</real> - <real>1.0</real> + <real>0.9</real> + <real>0.5</real> + <real>0.2</real> </array> </map> <key>PresetCameraActive</key> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7513c8e3d3..75c3e6cacb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8720,7 +8720,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>NameTagShowUsernames</key> <map> @@ -9752,7 +9752,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>https://feedback.secondlife.com/</string> + <string>https://megapahit.com/enter_bug.cgi</string> </map> <key>RevokePermsOnStopAnimation</key> <map> @@ -10302,7 +10302,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>NavBarShowParcelProperties</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl index 49470f0e39..1c394e1de4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/aoUtil.glsl @@ -79,10 +79,10 @@ float calcAmbientOcclusion(vec4 pos, vec3 norm, vec2 pos_screen) { float ret = 1.0; vec3 pos_world = pos.xyz; - vec2 noise_reflect = texture(noiseMap, pos_screen.xy * (screen_res / 128)).xy; + vec2 noise_reflect = texture(noiseMap, pos_screen.xy * (screen_res / 128.0)).xy; float angle_hidden = 0.0; - float points = 0; + float points = 0.0; float scale = min(ssao_radius / -pos_world.z, ssao_max_radius); diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl index 01543732d0..38fbda316b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl @@ -241,7 +241,7 @@ vec4 texture2DLodSpecular(vec2 tc, float lod) vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); float det = min(lod/(proj_lod*0.5), 1.0); float d = min(dist.x, dist.y); - d *= min(1, d * (proj_lod - lod)); // BUG? extra factor compared to diffuse causes N repeats + d *= min(1.0, d * (proj_lod - lod)); // BUG? extra factor compared to diffuse causes N repeats float edge = 0.25*det; ret *= clamp(d/edge, 0.0, 1.0); @@ -357,7 +357,7 @@ vec3 pbrIbl(vec3 diffuseColor, float perceptualRough) { // retrieve a scale and bias to F0. See [1], Figure 3 - vec2 brdf = BRDF(clamp(nv, 0, 1), 1.0-perceptualRough); + vec2 brdf = BRDF(clamp(nv, 0.0, 1.0), 1.0-perceptualRough); vec3 diffuseLight = irradiance; vec3 specularLight = radiance; @@ -517,7 +517,7 @@ uniform float waterSign; void waterClip(vec3 pos) { // TODO: make this less branchy - if (waterSign > 0) + if (waterSign > 0.0) { if ((dot(pos.xyz, waterPlane.xyz) + waterPlane.w) < 0.0) { diff --git a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl index cf0595ee45..178510f483 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl @@ -27,11 +27,11 @@ float random (vec2 uv) { - return 0; + return 0.0; } float tapScreenSpaceReflection(int totalSamples, vec2 tc, vec3 viewPos, vec3 n, inout vec4 collectedColor, sampler2D source, float glossiness) { collectedColor = vec4(0); - return 0; + return 0.0; } diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl index 72eda80716..bfb592be9b 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl @@ -49,7 +49,7 @@ void main() float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) ); #if HAS_NOISE - float TRUE_NOISE_RES = 128; // See mTrueNoiseMap + float TRUE_NOISE_RES = 128.0; // See mTrueNoiseMap // *NOTE: Usually this is vary_fragcoord not vary_texcoord0, but glow extraction is in screen space vec3 glow_noise = texture(glowNoiseMap, vary_texcoord0.xy * (screen_res / TRUE_NOISE_RES)).xyz; // Dithering. Reduces banding effects in the reduced precision glow buffer. diff --git a/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl b/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl index 09eb7a6a6a..82f32da048 100644 --- a/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/gaussianF.glsl @@ -45,7 +45,7 @@ void main() for (int i = 0; i < 9; ++i) { - vec2 tc = vary_texcoord0 + (i-4)*direction*resScale; + vec2 tc = vary_texcoord0 + float(i-4)*direction*resScale; col += texture(diffuseRect, tc).rgb * w[i]; } diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl index 1372ddbcfa..bdc5b58060 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl @@ -47,7 +47,7 @@ void calcAtmospherics(vec3 inPositionEye) { vec3 tmpaddlit = vec3(1); vec3 tmpattenlit = vec3(1); vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir; - calcAtmosphericVars(inPositionEye, light_dir, 1, tmpsunlit, tmpamblit, tmpaddlit, tmpattenlit); + calcAtmosphericVars(inPositionEye, light_dir, 1.0, tmpsunlit, tmpamblit, tmpaddlit, tmpattenlit); setSunlitColor(tmpsunlit); setAmblitColor(tmpamblit); setAdditiveColor(tmpaddlit); diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl index a5592188a9..03da5b020f 100644 --- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl @@ -145,7 +145,7 @@ void main() //get wave normals vec2 bigwave = vec2(refCoord.w, view.w); - vec3 wave1_a = texture(bumpMap, bigwave, -2 ).xyz*2.0-1.0; + vec3 wave1_a = texture(bumpMap, bigwave, -2.0 ).xyz*2.0-1.0; vec3 wave2_a = texture(bumpMap, littleWave.xy).xyz*2.0-1.0; vec3 wave3_a = texture(bumpMap, littleWave.zw).xyz*2.0-1.0; @@ -167,10 +167,10 @@ void main() vec3 wavef = (wave1 + wave2 * 0.4 + wave3 * 0.6) * 0.5; - vec3 waver = wavef*3; + vec3 waver = wavef*3.0; vec3 up = transform_normal(vec3(0,0,1)); - float vdu = -dot(viewVec, up)*2; + float vdu = -dot(viewVec, up)*2.0; vec3 wave_ibl = wavef; wave_ibl.z *= 2.0; @@ -178,7 +178,7 @@ void main() vec3 norm = transform_normal(normalize(wavef)); - vdu = clamp(vdu, 0, 1); + vdu = clamp(vdu, 0.0, 1.0); wavef.z *= max(vdu*vdu*vdu, 0.1); wavef = normalize(wavef); @@ -266,7 +266,7 @@ void main() color += ibl; float nv = clamp(abs(dot(norm.xyz, v)), 0.001, 1.0); - vec2 brdf = BRDF(clamp(nv, 0, 1), 1.0); + vec2 brdf = BRDF(clamp(nv, 0.0, 1.0), 1.0); float f = 1.0-brdf.y; //1.0 - (brdf.x+brdf.y); f *= 0.9; f *= f; @@ -279,7 +279,7 @@ void main() // shift from -1 to 1 f += (fresnelOffset - 0.5) * 2.0; - f = clamp(f, 0, 1); + f = clamp(f, 0.0, 1.0); color = ((1.0 - f) * color) + fb.rgb; diff --git a/indra/newview/character/attentions.xml b/indra/newview/character/attentions.xml index be9a2b28fc..9bda3309ac 100644 --- a/indra/newview/character/attentions.xml +++ b/indra/newview/character/attentions.xml @@ -33,7 +33,7 @@ MOUSELOOK: Tracks center of view when in mouselook view mode. <param attention="hover" priority="4.0" timeout="1.0" /> <param attention="conversation" priority="0.0" timeout="-1" /> <param attention="select" priority="6.0" timeout="-1" /> - <param attention="focus" priority="6.0" timeout="-1" /> + <param attention="focus" priority="0.0" timeout="-1" /> <param attention="mouselook" priority="7.0" timeout="-1" /> </gender> <gender name="Feminine"> @@ -44,7 +44,7 @@ MOUSELOOK: Tracks center of view when in mouselook view mode. <param attention="hover" priority="4.0" timeout="1.0" /> <param attention="conversation" priority="0.0" timeout="-1" /> <param attention="select" priority="6.0" timeout="-1" /> - <param attention="focus" priority="6.0" timeout="-1" /> + <param attention="focus" priority="0.0" timeout="-1" /> <param attention="mouselook" priority="7.0" timeout="-1" /> </gender> </linden_attentions> diff --git a/indra/newview/icons/hicolor/128x128/apps/megapahit.png b/indra/newview/icons/hicolor/128x128/apps/megapahit.png Binary files differnew file mode 100644 index 0000000000..48abffffd7 --- /dev/null +++ b/indra/newview/icons/hicolor/128x128/apps/megapahit.png diff --git a/indra/newview/icons/hicolor/256x256/apps/megapahit.png b/indra/newview/icons/hicolor/256x256/apps/megapahit.png Binary files differnew file mode 100644 index 0000000000..d792c460ac --- /dev/null +++ b/indra/newview/icons/hicolor/256x256/apps/megapahit.png diff --git a/indra/newview/icons/hicolor/48x48/apps/megapahit.png b/indra/newview/icons/hicolor/48x48/apps/megapahit.png Binary files differnew file mode 100644 index 0000000000..3189bb2c3d --- /dev/null +++ b/indra/newview/icons/hicolor/48x48/apps/megapahit.png diff --git a/indra/newview/icons/hicolor/512x512/apps/megapahit.png b/indra/newview/icons/hicolor/512x512/apps/megapahit.png Binary files differnew file mode 100644 index 0000000000..23d6209f67 --- /dev/null +++ b/indra/newview/icons/hicolor/512x512/apps/megapahit.png diff --git a/indra/newview/icons/hicolor/64x64/apps/megapahit.png b/indra/newview/icons/hicolor/64x64/apps/megapahit.png Binary files differnew file mode 100644 index 0000000000..4917b1a825 --- /dev/null +++ b/indra/newview/icons/hicolor/64x64/apps/megapahit.png diff --git a/indra/newview/icons/hicolor/96x96/apps/megapahit.png b/indra/newview/icons/hicolor/96x96/apps/megapahit.png Binary files differnew file mode 100644 index 0000000000..d35578dcda --- /dev/null +++ b/indra/newview/icons/hicolor/96x96/apps/megapahit.png diff --git a/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns b/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns Binary files differindex 272b496e7d..2be0a73507 100644 --- a/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns +++ b/indra/newview/installers/darwin/release-dmg/_VolumeIcon.icns diff --git a/indra/newview/installers/darwin/release-dmg/background.jpg b/indra/newview/installers/darwin/release-dmg/background.jpg Binary files differindex e7064d9545..41c2bc320b 100644 --- a/indra/newview/installers/darwin/release-dmg/background.jpg +++ b/indra/newview/installers/darwin/release-dmg/background.jpg diff --git a/indra/newview/licenses-linux.txt b/indra/newview/licenses-linux.txt index e53ba94a36..23dace4de0 100644 --- a/indra/newview/licenses-linux.txt +++ b/indra/newview/licenses-linux.txt @@ -1,21 +1,3 @@ -=========== -APR License -=========== - -Copyright 2000-2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ============== Base32 License ============== @@ -69,43 +51,65 @@ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +=========== +CEF License +=========== -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. - +// Copyright (c) 2008-2020 Marshall A. Greenblatt. Portions Copyright (c) +// 2006-2009 Google Inc. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -============= -expat License -============= -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd +================ +Dullahan License +================ -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Copyright (c) 2016, Linden Research, Inc. -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -================ -FreeType License -================ +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -Portions of this software are copyright (c) 2003 The FreeType -Project (www.freetype.org). All rights reserved. ========================== FSI FontShop International @@ -126,10 +130,10 @@ obtain a license from FSI FontShop International at www.fontfont.com. GL License ========== -Mesa 3-D graphics library -Version: 6.2 +Mesa 3-D graphics library and Mesa Demos +Version: 6.2 and 8.5.0 -Copyright (C) 1999-2004 Brian Paul All Rights Reserved. +Copyright (C) 1999-2014 Brian Paul All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -191,122 +195,50 @@ Redistribution and use in source and binary forms, with or Cass Everitt - cass@r3.nu -======================= -JPEG Library 6b License -======================= - -This software is based in part on the work of the Independent JPEG Group - ================ -JPEG2000 License +OpenJPEG License ================ -Copyright 2001, David Taubman, The University of New South Wales (UNSW) -The copyright owner is Unisearch Ltd, Australia (commercial arm of UNSW) -Neither this copyright statement, nor the licensing details below -may be removed from this file or dissociated from its contents. - -Licensee: Linden Research, Inc. -License number: 00024 -The licensee has been granted a COMMERCIAL license to the contents of -this source file. A brief summary of this license appears below. This -summary is not to be relied upon in preference to the full text of the -license agreement, accepted at purchase of the license. -1. The Licensee has the right to Commercial Use of the Kakadu software, - including distribution of one or more Applications built using the - software. -2. The Licensee has the right to Internal Use of the Kakadu software, - including use by employees of the Licensee or an Affiliate for the - purpose of performing services on behalf of the Licensee or Affiliate, - or in the performance of services for Third Parties who engage Licensee - or an Affiliate for such services. -3. The Licensee has the right to distribute Reusable Code (including - source code and dynamically or statically linked libraries) to a Third - Party, provided the Third Party possesses a license to use the Kakadu - software. - -================== -ogg/vorbis License -================== - -Copyright (c) 2001, Xiphophorus - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiphophorus nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -=========== -SDL License -=========== - -SDL - Simple DirectMedia Layer -Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; if not, write to the Free -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Sam Lantinga -slouken@libsdl.org - -The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html - -============= -ELFIO License -============= - -ELFIO.h - ELF reader and producer. -Copyright (C) 2001 Serge Lamikhov-Center <to_serge@users.sourceforge.net> - -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; either -version 2.1 of the License, or (at your option) any later version. - -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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/* + * The copyright in this software is being made available under the 2-clauses + * BSD License, included below. This software may be subject to other third + * party and contributor rights, including patent rights, and no such rights + * are granted under this license. + * + * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2014, Professor Benoit Macq + * Copyright (c) 2003-2014, Antonin Descampe + * Copyright (c) 2003-2009, Francois-Olivier Devaux + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France + * Copyright (c) 2012, CS Systemes d'Information, France + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ -The GNU Library GPL is available at http://www.gnu.org/copyleft/lesser.html =============== OpenSSL License @@ -426,321 +358,6 @@ copied and put under another distribution licence [including the GNU Public Licence.] -================== -xmlrpc-epi License -================== - -Copyright 2000 Epinions, Inc. - -Subject to the following 3 conditions, Epinions, Inc. permits you, free of charge, to (a) use, copy, distribute, modify, perform and display this software and associated documentation files (the "Software"), and (b) permit others to whom the Software is furnished to do so as well. - -1) The above copyright notice and this permission notice shall be included without modification in all copies or substantial portions of the Software. - -2) THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OR CONDITION OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF ACCURACY, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - -3) IN NO EVENT SHALL EPINIONS, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE (HOWEVER ARISING, INCLUDING NEGLIGENCE), EVEN IF EPINIONS, INC. IS AWARE OF THE POSSIBILITY OF SUCH DAMAGES. - - -=============== -libuuid License -=============== - -Copyright (C) 1999, 2000, 2003, 2004 by Theodore Ts'o - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, and the entire permission notice in its entirety, - including the disclaimer of warranties. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF -WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - -============ -zlib License -============ - -'zlib' general purpose compression library version 1.1.4, March 11th, 2002 - -Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment in the product documentation would be appreciated but is -not required. - -Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -This notice may not be removed or altered from any source distribution. - -Jean-loup Gailly -jloup@gzip.org - -Mark Adler -madler@alumni.caltech.edu - -================================= -tcmalloc/Google perftools license -================================= - -Copyright (c) 2005, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -============== -libpng license -============== - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -If you modify libpng you may insert additional notices immediately following -this sentence. - -libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are -Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.2.5 -with the following individual added to the list of Contributing Authors: - - Cosmin Truta - -libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are -Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.0.6 -with the following individuals added to the list of Contributing Authors: - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of the - library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is with - the user. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-0.96, -with the following individuals added to the list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996, 1997 Andreas Dilger -Distributed according to the same disclaimer and license as libpng-0.88, -with the following individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing Authors -and Group 42, Inc. disclaim all warranties, expressed or implied, -including, without limitation, the warranties of merchantability and of -fitness for any purpose. The Contributing Authors and Group 42, Inc. -assume no liability for direct, indirect, incidental, special, exemplary, -or consequential damages, which may result from the use of the PNG -Reference Library, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - -1. The origin of this source code must not be misrepresented. - -2. Altered versions must be plainly marked as such and -must not be misrepresented as being the original source. - -3. This Copyright notice may not be removed or altered from - any source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, without -fee, and encourage the use of this source code as a component to -supporting the PNG file format in commercial products. If you use this -source code in a product, acknowledgment is not required but would be -appreciated. - -================= -Vivox SDK License -================= - -RSA Data Security, Inc. MD5 Message-Digest Algorithm - -Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C) - -Open Source Software Licensing -Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below. - - -************************************************************* -************************************************************* - -/** - * OpenAL cross platform audio library - * Copyright (C) 1999-2000 by authors. - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * Or go to http://www.gnu.org/copyleft/lgpl.html - */ - -************************************************************* -************************************************************* -RTP code under Lesser General Public License - -/* - The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) stack. - Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org - - 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; either - version 2.1 of the License, or (at your option) any later version. - - 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -************************************************************ -************************************************************* - -/* - * The Vovida Software License, Version 1.0 - * - * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The names "VOCAL", "Vovida Open Communication Application Library", - * and "Vovida Open Communication Application Library (VOCAL)" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact vocal@vovida.org. - * - * 4. Products derived from this software may not be called "VOCAL", nor - * may "VOCAL" appear in their name, without prior written - * permission of Vovida Networks, Inc. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND - * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA - * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES - * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * - * This software consists of voluntary contributions made by Vovida - * Networks, Inc. and many individuals on behalf of Vovida Networks, - * Inc. For more information on Vovida Networks, Inc., please see - * - * - */ ************************************************************* ************************************************************* @@ -763,49 +380,54 @@ Internet Software Consortium code * SOFTWARE. */ -************************************************************* - -************************************************************* - -************************************************************ - -http://tinyxpath.sourceforge.net/ - -TinyXPath is covered by the zlib license : - - www.sourceforge.net/projects/tinyxpath - Copyright (c) 2002-2006 Yves Berquin (yvesb@users.sourceforge.net) +============= +meshoptimizer +============= +MIT License - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any - damages arising from the use of this software. +Copyright (c) 2016-2021 Arseny Kapoulkine - Permission is granted to anyone to use this software for any - purpose, including commercial applications, and to alter it and - redistribute it freely, subject to the following restrictions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - 2. Altered source versions must be plainly marked as such, and - must not be misrepresented as being the original software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. - 3. This notice may not be removed or altered from any source distribution. +============ +tinygltf +============ +MIT License -************************************************************ -************************************************************ +Copyright (c) 2017 Syoyo Fujita, Aurélien Chatelain and many contributors -THE FREE SOFTWARE FOUNDATION +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Any customer may request the source code for all open source portions of this product which are covered by the Free Software Foundation's General Public License (GPL), for a period of three years from purchase. Please contact the vendor from whom you obtained this product for instructions. A fee equivalent to the cost of making the code available may be charged. Alternatively, customers may choose to download desired GPL components directly from their original vendors. Specifically, this product contains the following GPL-licensed components: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -From Vivox: - - Assorted software components. To request source, contact Vivox at: - Vivox, Inc. - Attn: customer support - 40 Speen Street Suite 402 - Framingham, MA 01701 diff --git a/indra/newview/licenses-mac.txt b/indra/newview/licenses-mac.txt index 29b5a919bd..ac06498555 100644 --- a/indra/newview/licenses-mac.txt +++ b/indra/newview/licenses-mac.txt @@ -48,6 +48,42 @@ Base32 License * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + +=========== +CEF License +=========== + +// Copyright (c) 2008-2020 Marshall A. Greenblatt. Portions Copyright (c) +// 2006-2009 Google Inc. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ============ cURL License ============ @@ -75,6 +111,31 @@ be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. +================ +Dullahan License +================ + +Copyright (c) 2016, Linden Research, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + ============= expat License ============= @@ -198,32 +259,48 @@ JPEG Library 6b License This software is based in part on the work of the Independent JPEG Group ================ -JPEG2000 License +OpenJPEG License ================ -Copyright 2001, David Taubman, The University of New South Wales (UNSW) -The copyright owner is Unisearch Ltd, Australia (commercial arm of UNSW) -Neither this copyright statement, nor the licensing details below -may be removed from this file or dissociated from its contents. - -Licensee: Linden Research, Inc. -License number: 00024 -The licensee has been granted a COMMERCIAL license to the contents of -this source file. A brief summary of this license appears below. This -summary is not to be relied upon in preference to the full text of the -license agreement, accepted at purchase of the license. -1. The Licensee has the right to Commercial Use of the Kakadu software, - including distribution of one or more Applications built using the - software. -2. The Licensee has the right to Internal Use of the Kakadu software, - including use by employees of the Licensee or an Affiliate for the - purpose of performing services on behalf of the Licensee or Affiliate, - or in the performance of services for Third Parties who engage Licensee - or an Affiliate for such services. -3. The Licensee has the right to distribute Reusable Code (including - source code and dynamically or statically linked libraries) to a Third - Party, provided the Third Party possesses a license to use the Kakadu - software. +/* + * The copyright in this software is being made available under the 2-clauses + * BSD License, included below. This software may be subject to other third + * party and contributor rights, including patent rights, and no such rights + * are granted under this license. + * + * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2014, Professor Benoit Macq + * Copyright (c) 2003-2014, Antonin Descampe + * Copyright (c) 2003-2009, Francois-Olivier Devaux + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France + * Copyright (c) 2012, CS Systemes d'Information, France + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ ================== ogg/vorbis License @@ -259,6 +336,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +=========== +SDL License +=========== + +SDL - Simple DirectMedia Layer +Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org> + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + =============== OpenSSL License =============== @@ -516,18 +617,6 @@ supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. -================= -Vivox SDK License -================= - -RSA Data Security, Inc. MD5 Message-Digest Algorithm - -Audio coding: Polycom(R) Siren14TM (ITU-T Rec. G.722.1 Annex C) - -Open Source Software Licensing -Each open source software component utilized by this product is subject to its own copyright and licensing terms, as listed below. - - ************************************************************* ************************************************************* @@ -553,80 +642,6 @@ Each open source software component utilized by this product is subject to its o ************************************************************* ************************************************************* -RTP code under Lesser General Public License - -/* - The oRTP library is an RTP (Realtime Transport Protocol - rfc3550) stack. - Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org - - 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; either - version 2.1 of the License, or (at your option) any later version. - - 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -************************************************************ -************************************************************* - -/* - * The Vovida Software License, Version 1.0 - * - * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The names "VOCAL", "Vovida Open Communication Application Library", - * and "Vovida Open Communication Application Library (VOCAL)" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact vocal@vovida.org. - * - * 4. Products derived from this software may not be called "VOCAL", nor - * may "VOCAL" appear in their name, without prior written - * permission of Vovida Networks, Inc. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND - * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA - * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES - * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * - * This software consists of voluntary contributions made by Vovida - * Networks, Inc. and many individuals on behalf of Vovida Networks, - * Inc. For more information on Vovida Networks, Inc., please see - * - * - */ -************************************************************* -************************************************************* Internet Software Consortium code @@ -647,54 +662,6 @@ Internet Software Consortium code * SOFTWARE. */ -************************************************************* - -************************************************************* - -************************************************************ - -http://tinyxpath.sourceforge.net/ - -TinyXPath is covered by the zlib license : - - www.sourceforge.net/projects/tinyxpath - Copyright (c) 2002-2006 Yves Berquin (yvesb@users.sourceforge.net) - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any - damages arising from the use of this software. - - Permission is granted to anyone to use this software for any - purpose, including commercial applications, and to alter it and - redistribute it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and - must not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - - -************************************************************ -************************************************************ - -THE FREE SOFTWARE FOUNDATION - -Any customer may request the source code for all open source portions of this product which are covered by the Free Software Foundation's General Public License (GPL), for a period of three years from purchase. Please contact the vendor from whom you obtained this product for instructions. A fee equivalent to the cost of making the code available may be charged. Alternatively, customers may choose to download desired GPL components directly from their original vendors. Specifically, this product contains the following GPL-licensed components: - - -From Vivox: - - Assorted software components. To request source, contact Vivox at: - Vivox, Inc. - Attn: customer support - 40 Speen Street Suite 402 - Framingham, MA 01701 - - ============= meshoptimizer ============= @@ -771,3 +738,29 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +======== +sse2neon +======== +/* + * sse2neon is freely redistributable under the MIT License. + * + * Copyright (c) 2015-2024 SSE2NEON Contributors. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh index 404ea36f26..7c4ebf2291 100755 --- a/indra/newview/linux_tools/launch_url.sh +++ b/indra/newview/linux_tools/launch_url.sh @@ -61,6 +61,7 @@ fi # will be tried first, which is a debian alternative. BROWSER_COMMANDS=" \ x-www-browser \ + chrome \ firefox \ mozilla-firefox \ iceweasel \ diff --git a/indra/newview/linux_tools/megapahit.desktop b/indra/newview/linux_tools/megapahit.desktop new file mode 100755 index 0000000000..05e5d0175a --- /dev/null +++ b/indra/newview/linux_tools/megapahit.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Megapahit +Comment=A fork of the Second Life viewer +Exec=megapahit +Icon=megapahit +Terminal=false +Type=Application +Categories=Application;Network; +StartupNotify=true +X-Desktop-File-Install-Version=3.0" diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1626af74e2..b3c2f3c108 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -132,13 +132,13 @@ #include "stringize.h" #include "llcoros.h" #include "llexception.h" -#if !LL_LINUX +#if LL_DARWIN || LL_LINUX #include "cef/dullahan_version.h" +#endif #include "vlc/libvlc_version.h" -#endif // LL_LINUX #if LL_DARWIN -#include "llwindowmacosx.h" +#include "llwindowsdl.h" #endif // Third party library includes @@ -266,7 +266,7 @@ using namespace LL; // define a self-registering event API object #include "llappviewerlistener.h" -#if LL_LINUX && LL_GTK +#if (LL_LINUX || __FreeBSD__) && LL_GTK #include "glib.h" #endif // (LL_LINUX) && LL_GTK @@ -312,6 +312,8 @@ S32 gLastExecDuration = -1; // (<0 indicates unknown) # define LL_PLATFORM_KEY "mac" #elif LL_LINUX # define LL_PLATFORM_KEY "lnx" +#elif __FreeBSD__ +# define LL_PLATFORM_KEY "bsd" #else # error "Unknown Platform" #endif @@ -530,11 +532,13 @@ static void settings_to_globals() { LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize")); -#if LL_DARWIN +//#if LL_DARWIN LLRender::sGLCoreProfile = true; +/* #else LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLContextCoreProfile"); #endif +*/ LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport"); LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); @@ -561,7 +565,7 @@ static void settings_to_globals() LLWorldMapView::setScaleSetting(gSavedSettings.getF32("MapScale")); #if LL_DARWIN - LLWindowMacOSX::sUseMultGL = gSavedSettings.getBOOL("RenderAppleUseMultGL"); + LLWindowSDL::sUseMultGL = gSavedSettings.getBOOL("RenderAppleUseMultGL"); gHiDPISupport = gSavedSettings.getBOOL("RenderHiDPI"); #endif } @@ -667,7 +671,7 @@ LLAppViewer::LLAppViewer() // Need to do this initialization before we do anything else, since anything // that touches files should really go through the lldir API - gDirUtilp->initAppDirs("SecondLife"); + gDirUtilp->initAppDirs("Megapahit"); // // IMPORTANT! Do NOT put anything that will write // into the log files during normal startup until AFTER @@ -886,7 +890,7 @@ bool LLAppViewer::init() std::string mime_types_name; #if LL_DARWIN mime_types_name = "mime_types_mac.xml"; -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ mime_types_name = "mime_types_linux.xml"; #else mime_types_name = "mime_types.xml"; @@ -962,6 +966,7 @@ bool LLAppViewer::init() return 0; } +#if defined(__i386__) || defined(__x86_64__) || defined(__amd64__) // Without SSE2 support we will crash almost immediately, warn here. if (!gSysCPU.hasSSE2()) { @@ -973,6 +978,7 @@ bool LLAppViewer::init() OSMB_OK); return 0; } +#endif // alert the user if they are using unsupported hardware if(!gSavedSettings.getBOOL("AlertedUnsupportedHardware")) @@ -1728,7 +1734,7 @@ bool LLAppViewer::cleanup() // one because it happens just after mFastTimerLogThread is deleted. This // comment is in case we guessed wrong, so we can move it here instead. -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ // remove any old breakpad minidump files from the log directory if (! isError()) { @@ -3263,7 +3269,7 @@ LLSD LLAppViewer::getViewerInfo() const url = LLTrans::getString("RELEASE_NOTES_BASE_URL"); if (!LLStringUtil::endsWith(url, "/")) url += "/"; - url += LLURI::escape(versionInfo.getVersion()) + ".html"; + url += "#" + LLURI::escape(versionInfo.getVersion()); // + ".html"; } info["VIEWER_RELEASE_NOTES_URL"] = url; @@ -3375,7 +3381,7 @@ LLSD LLAppViewer::getViewerInfo() const info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); } -#if !LL_LINUX +#if LL_DARWIN || LL_LINUX std::ostringstream cef_ver_codec; cef_ver_codec << "Dullahan: "; cef_ver_codec << DULLAHAN_VERSION_MAJOR; @@ -3405,7 +3411,7 @@ LLSD LLAppViewer::getViewerInfo() const info["LIBCEF_VERSION"] = "Undefined"; #endif -#if !LL_LINUX +//#if !LL_LINUX std::ostringstream vlc_ver_codec; vlc_ver_codec << LIBVLC_VERSION_MAJOR; vlc_ver_codec << "."; @@ -3413,9 +3419,11 @@ LLSD LLAppViewer::getViewerInfo() const vlc_ver_codec << "."; vlc_ver_codec << LIBVLC_VERSION_REVISION; info["LIBVLC_VERSION"] = vlc_ver_codec.str(); +/* #else info["LIBVLC_VERSION"] = "Undefined"; #endif +*/ S32 packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); if (packets_in > 0) @@ -5440,7 +5448,7 @@ void LLAppViewer::forceErrorBreakpoint() LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL; #ifdef LL_WINDOWS DebugBreak(); -#else +#elif __i386__ || __x86_64__ asm ("int $3"); #endif return; diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 1709970156..a0aa567742 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -120,7 +120,9 @@ bool LLAppViewerLinux::init() // before any mutexes are held, *and* some of our third-party // libraries likes to use glib functions; in short, do this here // really early in app startup! +#ifndef LL_USESYSTEMLIBS if (!g_thread_supported ()) g_thread_init (NULL); +#endif bool success = LLAppViewer::init(); @@ -328,11 +330,13 @@ void LLAppViewerLinux::initCrashReporting(bool reportFreeze) { std::string cmd =gDirUtilp->getExecutableDir(); cmd += gDirUtilp->getDirDelimiter(); -#if LL_LINUX +//#if LL_LINUX cmd += "linux-crash-logger.bin"; +/* #else # error Unknown platform #endif +*/ std::stringstream pid_str; pid_str << LLApp::getPid(); diff --git a/indra/newview/llappviewerlinux.h b/indra/newview/llappviewerlinux.h index dde223878d..9524432b26 100644 --- a/indra/newview/llappviewerlinux.h +++ b/indra/newview/llappviewerlinux.h @@ -27,9 +27,11 @@ #ifndef LL_LLAPPVIEWERLINUX_H #define LL_LLAPPVIEWERLINUX_H +#if LL_GTK extern "C" { # include <glib.h> } +#endif #if LL_DBUS_ENABLED extern "C" { diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 832d4c269b..70827ae723 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -93,8 +93,8 @@ BOOL LLConversationLogList::handleRightMouseDown(S32 x, S32 y, MASK mask) LLToggleableMenu* context_menu = mContextMenu.get(); { context_menu->buildDrawLabels(); - if (context_menu && size()) - context_menu->updateParent(LLMenuGL::sMenuContainer); + if (context_menu && size()) + context_menu->updateParent(LLMenuGL::sMenuContainer); LLMenuGL::showPopup(this, context_menu, x, y); } diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp index bac435ad80..8c2181292f 100644 --- a/indra/newview/lldirpicker.cpp +++ b/indra/newview/lldirpicker.cpp @@ -37,7 +37,7 @@ #include "llviewercontrol.h" #include "llwin32headerslean.h" -#if LL_LINUX || LL_DARWIN +#if LL_LINUX || LL_DARWIN || __FreeBSD__ # include "llfilepicker.h" #endif @@ -187,7 +187,7 @@ std::string LLDirPicker::getDirName() return mFilePicker->getFirstFile(); } -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ LLDirPicker::LLDirPicker() : mFileName(NULL), diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h index e76a19dd40..82adbcce11 100644 --- a/indra/newview/lldirpicker.h +++ b/indra/newview/lldirpicker.h @@ -78,7 +78,7 @@ private: void buildDirname( void ); bool check_local_file_access_enabled(); -#if LL_LINUX || LL_DARWIN +#if LL_LINUX || LL_DARWIN || __FreeBSD__ // On Linux we just implement LLDirPicker on top of LLFilePicker LLFilePicker *mFilePicker; #endif diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 2d44949c4a..7532b1fc85 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -365,7 +365,9 @@ void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color) void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4U& color) { +#if GL_VERSION_1_1 glColor4ubv(color.mV); +#endif } void LLFacePool::LLOverrideFaceColor::setColor(F32 r, F32 g, F32 b, F32 a) diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index eec17149e7..9b71d09db3 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1048,7 +1048,11 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI if (!LLPipeline::sRenderDeferred) { +#if GL_VERSION_1_1 bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA); +#else + bump->setExplicitFormat(GL_ALPHA8_EXT, GL_ALPHA); +#endif #if LL_BUMPLIST_MULTITHREADED auto tex_queue = LLImageGLThread::sEnabledTextures ? sTexUpdateQueue.lock() : nullptr; diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 2a9c27fec9..02a77dc418 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -593,6 +593,7 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->bind(detail_texture0p); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -600,6 +601,7 @@ void LLDrawPoolTerrain::renderFull4TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 1: Generate alpha ramp for detail0/detail1 transition @@ -616,12 +618,14 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(2)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(2)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 3: Modulate with primary (vertex) color for lighting @@ -643,12 +647,14 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->bind(detail_texture3p); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 1: Generate alpha ramp for detail2/detail3 transition @@ -669,12 +675,14 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(2)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(2)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif // // Stage 3: Generate alpha ramp for detail1/detail2 transition @@ -709,8 +717,10 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(2)->disable(); gGL.getTexUnit(2)->activate(); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -733,8 +743,10 @@ void LLDrawPoolTerrain::renderFull4TU() gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -768,6 +780,7 @@ void LLDrawPoolTerrain::renderFull2TU() // Stage 0: Render detail 0 into base // gGL.getTexUnit(0)->bind(detail_texture0p); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); @@ -775,6 +788,7 @@ void LLDrawPoolTerrain::renderFull2TU() glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif drawLoop(); @@ -786,8 +800,10 @@ void LLDrawPoolTerrain::renderFull2TU() // gGL.getTexUnit(0)->bind(m2DAlphaRampImagep); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif // // Stage 1: Write detail1 @@ -796,12 +812,14 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif gGL.getTexUnit(0)->activate(); { @@ -829,12 +847,14 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif { LLGLEnable blend(GL_BLEND); @@ -860,12 +880,14 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV); glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV); +#endif gGL.getTexUnit(0)->activate(); { @@ -882,8 +904,10 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(1)->disable(); gGL.getTexUnit(1)->activate(); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -894,8 +918,10 @@ void LLDrawPoolTerrain::renderFull2TU() gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); +#if GL_VERSION_1_1 glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); +#endif gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index f1205a72b7..e56548d618 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -27,6 +27,8 @@ #ifndef LL_ENVIRONMENT_H #define LL_ENVIRONMENT_H +#include <array> + #include "llsingleton.h" #include "llmemory.h" #include "llsd.h" diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4c26e6b8af..849dbb28f4 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -548,15 +548,21 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color) gGL.multMatrix((F32*) volume->getRelativeXform().mMatrix); const LLVolumeFace& vol_face = rigged->getVolumeFace(getTEOffset()); LLVertexBuffer::unbind(); +#if GL_VERSION_1_1 glVertexPointer(3, GL_FLOAT, 16, vol_face.mPositions); +#endif if (vol_face.mTexCoords) { +#if GL_VERSION_1_1 glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_FLOAT, 8, vol_face.mTexCoords); +#endif } gGL.syncMatrices(); glDrawElements(GL_TRIANGLES, vol_face.mNumIndices, GL_UNSIGNED_SHORT, vol_face.mIndices); +#if GL_VERSION_1_1 glDisableClientState(GL_TEXTURE_COORD_ARRAY); +#endif } } #endif @@ -636,10 +642,14 @@ void LLFace::renderOneWireframe(const LLColor4 &color, F32 fogCfx, bool wirefram glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); } +#if GL_VERSION_1_1 LLGLEnable offset(GL_POLYGON_OFFSET_LINE); +#endif glPolygonOffset(3.f, 3.f); glLineWidth(5.f); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif renderFace(mDrawablep, this); } } @@ -839,7 +849,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, //VECTORIZE THIS LLMatrix4a mat_vert; mat_vert.loadu(mat_vert_in); - LLVector4a new_extents[2]; + //LLVector4a new_extents[2]; llassert(less_than_max_mag(face.mExtents[0])); llassert(less_than_max_mag(face.mExtents[1])); diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 9f12648470..4bece9d4b4 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -62,7 +62,7 @@ #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt"; #else const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 51b9923684..c871b4723a 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -40,7 +40,7 @@ #include "llwindowsdl.h" // for some X/GTK utils to help with filepickers #endif // LL_SDL -#if LL_LINUX +#if LL_LINUX || __FreeBSD__ #include "llhttpconstants.h" // file picker uses some of thes constants on Linux #endif @@ -1100,7 +1100,7 @@ BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, } //END LL_DARWIN -#elif LL_LINUX +#elif LL_LINUX || __FreeBSD__ # if LL_GTK @@ -1367,6 +1367,14 @@ static std::string add_save_texture_filter_to_gtkchooser(GtkWindow *picker) return caption; } +BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, + void (*callback)(bool, std::vector<std::string> &, void*), + void *userdata ) +{ + LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; + return FALSE; +} + BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { BOOL rtn = FALSE; @@ -1484,6 +1492,15 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, return rtn; } +BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, + const std::string& filename, + void (*callback)(bool, std::string&, void*), + void *userdata) +{ + LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; + return FALSE; +} + BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { BOOL rtn = FALSE; @@ -1516,7 +1533,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) filtername = add_xml_filter_to_gtkchooser(picker); break; case FFLOAD_GLTF: - filtername = dead_code_should_blow_up_here(picker); + //filtername = dead_code_should_blow_up_here(picker); break; case FFLOAD_COLLADA: filtername = add_collada_filter_to_gtkchooser(picker); @@ -1549,6 +1566,14 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) return rtn; } +BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, + void (*callback)(bool, std::vector<std::string> &, void*), + void *userdata) +{ + LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; + return FALSE; +} + BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { BOOL rtn = FALSE; @@ -1675,13 +1700,13 @@ BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, #else // not implemented -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) +BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { reset(); return FALSE; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter ) +BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { reset(); return FALSE; diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 47deb92826..241d44ddf8 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -96,6 +96,8 @@ BOOL LLFloaterTOS::postBuild() external_prompt->setVisible(true); web_browser->setVisible(false); + + updateAgreeEnabled(true); #else web_browser->addObserver(this); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 4db76c7971..b2de352793 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -73,6 +73,7 @@ #if LL_DARWIN #include <CoreFoundation/CFURL.h> +#include <CoreFoundation/CFBundle.h> #endif // Static initialization diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index e862fc7bc1..563f1dbf96 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -117,9 +117,11 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, proj[i] = (F64) gGLProjection[i]; } +#if GLU_VERSION_1_1 gluProject(render_pos.mV[0], render_pos.mV[1], render_pos.mV[2], mdlv, proj, (GLint*) viewport, &winX, &winY, &winZ); +#endif //fonts all render orthographically, set up projection`` gGL.matrixMode(LLRender::MM_PROJECTION); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 187dbdd3a2..1cc76d7268 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -24,6 +24,8 @@ * $/LicenseInfo$ */ +#include <array> + #include "llviewerprecompiledheaders.h" #include "llimview.h" diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 4b47346473..5f5474b359 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -569,7 +569,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men items.push_back(std::string("Copy Asset UUID")); items.push_back(std::string("Copy Separator")); - bool is_asset_knowable = is_asset_knowable = LLAssetType::lookupIsAssetIDKnowable(obj->getType()); + bool is_asset_knowable = LLAssetType::lookupIsAssetIDKnowable(obj->getType()); if ( !is_asset_knowable // disable menu item for Inventory items with unknown asset. EXT-5308 || (! ( is_full_perm_item || gAgent.isGodlike()))) { diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 2d9b46bf84..cf1aebf26b 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -404,7 +404,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) relnotes = LLTrans::getString("RELEASE_NOTES_BASE_URL"); if (!LLStringUtil::endsWith(relnotes, "/")) relnotes += "/"; - relnotes += LLURI::escape(login_version) + ".html"; + relnotes += "#" + LLURI::escape(login_version); // + ".html"; } if (gViewerWindow) diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index f43613be9f..09f1e703d1 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -574,8 +574,10 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string gGL.scalef(inv_zoom_amt, inv_zoom_amt, inv_zoom_amt); } + /* LLColor4 shadow_color = LLColor4::black; shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; + */ if (fractional_portion != 0) { diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 54aa22be2b..7e8b5db942 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -274,7 +274,9 @@ void LLManipRotate::render() } LLGLEnable cull_face(GL_CULL_FACE); +#if GL_VERSION_1_1 LLGLEnable clip_plane0(GL_CLIP_PLANE0); +#endif LLGLDepthTest gls_depth(GL_FALSE); //LLGLDisable gls_stencil(GL_STENCIL_TEST); diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 736971276e..092861a240 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3438,9 +3438,13 @@ BOOL LLModelPreview::render() if (edges) { glLineWidth(PREVIEW_EDGE_WIDTH); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif glLineWidth(1.f); } buffer->unmapBuffer(); @@ -3562,10 +3566,14 @@ BOOL LLModelPreview::render() gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV); glLineWidth(PREVIEW_PSYH_EDGE_WIDTH); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif glLineWidth(1.f); buffer->unmapBuffer(); @@ -3579,7 +3587,9 @@ BOOL LLModelPreview::render() if (mHasDegenerate) { glLineWidth(PREVIEW_DEG_EDGE_WIDTH); +#if GL_VERSION_1_1 glPointSize(PREVIEW_DEG_POINT_SIZE); +#endif gPipeline.enableLightsFullbright(); //show degenerate triangles LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS); @@ -3648,7 +3658,9 @@ BOOL LLModelPreview::render() gGL.popMatrix(); } glLineWidth(1.f); +#if GL_VERSION_1_1 glPointSize(1.f); +#endif gPipeline.enableLightsPreview(); gGL.setSceneBlendType(LLRender::BT_ALPHA); } @@ -3767,9 +3779,13 @@ BOOL LLModelPreview::render() gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); glLineWidth(PREVIEW_EDGE_WIDTH); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif glLineWidth(1.f); } } diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index bbd1ef45f4..2891f21b6a 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -517,7 +517,7 @@ void LLProgressView::initStartTexture(S32 location_id, bool is_in_production) void LLProgressView::initTextures(S32 location_id, bool is_in_production) { initStartTexture(location_id, is_in_production); - initLogos(); + //initLogos(); childSetVisible("panel_icons", mLogosList.empty() ? FALSE : TRUE); childSetVisible("panel_top_spacer", mLogosList.empty() ? TRUE : FALSE); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 5a8f44f5c2..ad5928271c 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -789,7 +789,9 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) LL_PROFILE_GPU_ZONE("probe mip copy"); mTexture->bind(0); //glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, 0, 0, probe->mCubeIndex * 6 + face, 0, 0, res, res); +#if GL_VERSION_4_0 glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, 0, 0, sourceIdx * 6 + face, 0, 0, res, res); +#endif //if (i == 0) //{ //glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, 0, 0, probe->mCubeIndex * 6 + face, 0, 0, res, res); @@ -848,7 +850,9 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) mVertexBuffer->drawArrays(gGL.TRIANGLE_STRIP, 0, 4); +#if GL_VERSION_4_0 glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res); +#endif } if (i != mMipChain.size() - 1) @@ -899,7 +903,9 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) S32 res = mMipChain[i].getWidth(); mIrradianceMaps->bind(channel); +#if GL_VERSION_4_0 glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, i - start_mip, 0, 0, probe->mCubeIndex * 6 + cf, 0, 0, res, res); +#endif mTexture->bind(channel); } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f602dee0cb..870cd394ee 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6439,7 +6439,9 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } } +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces for (S32 te = 0; te < num_tes; ++te) @@ -6454,7 +6456,9 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) gGL.popMatrix(); glLineWidth(1.f); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif if (shader) { diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 60f88c9cea..85a73c25cf 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1663,7 +1663,9 @@ void renderOctree(LLSpatialGroup* group) { LLGLDepthTest gl_depth(FALSE, FALSE); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif gGL.diffuseColor4f(1,0,0,group->mBuilt); gGL.flush(); @@ -1765,7 +1767,9 @@ void renderOctree(LLSpatialGroup* group) gGL.popMatrix(); } } +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif gDebugProgram.bind(); // make sure non-rigged variant is bound gGL.diffuseColor4f(1,1,1,1); } @@ -2504,7 +2508,9 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume, bool wireframe llassert(LLGLSLShader::sCurBoundShader != 0); LLVertexBuffer::unbind(); +#if GL_VERSION_1_1 glVertexPointer(3, GL_FLOAT, 16, phys_volume->mHullPoints); +#endif gGL.diffuseColor4fv(color.mV); @@ -2701,7 +2707,9 @@ void renderTextureAnim(LLDrawInfo* params) void renderBatchSize(LLDrawInfo* params) { +#if GL_VERSION_1_1 LLGLEnable offset(GL_POLYGON_OFFSET_FILL); +#endif glPolygonOffset(-1.f, 1.f); LLGLSLShader* old_shader = LLGLSLShader::sCurBoundShaderPtr; bool bind = false; @@ -3007,7 +3015,9 @@ void renderRaycast(LLDrawable* drawablep) dir.setSub(end, start); gGL.flush(); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif { //render face positions @@ -3026,7 +3036,9 @@ void renderRaycast(LLDrawable* drawablep) } gGL.popMatrix(); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif } } } @@ -3614,16 +3626,22 @@ void LLSpatialPartition::renderDebug() LLGLEnable blend(GL_BLEND); LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif gGL.diffuseColor4f(0.5f, 0.0f, 0, 0.25f); +#if GL_VERSION_1_1 LLGLEnable offset(GL_POLYGON_OFFSET_LINE); +#endif glPolygonOffset(-1.f, -1.f); LLOctreeRenderXRay xray(camera); xray.traverse(mOctree); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif } } gDebugProgram.unbind(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index f8bb4f3351..a0a625c5fc 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -109,6 +109,7 @@ static void onClickVolume(void*); LLStatusBar::LLStatusBar(const LLRect& rect) : LLPanel(), mTextTime(NULL), + mTextFps(NULL), mSGBandwidth(NULL), mSGPacketLoss(NULL), mBtnVolume(NULL), @@ -127,6 +128,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); + mFpsUpdateTimer = new LLFrameTimer(); buildFromFile("panel_status_bar.xml"); } @@ -164,6 +166,7 @@ BOOL LLStatusBar::postBuild() gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); mTextTime = getChild<LLTextBox>("TimeText" ); + mTextFps = getChild<LLTextBox>("FpsText"); getChild<LLUICtrl>("buyL")->setCommitCallback( boost::bind(&LLStatusBar::onClickBuyCurrency, this)); @@ -297,6 +300,15 @@ void LLStatusBar::refresh() //mSGBandwidth->setThreshold(2, bwtotal); } + if(mFpsUpdateTimer->getElapsedTimeF32() >= 1.0f) + { + mFpsUpdateTimer->reset(); + + S32 fps = (S32) llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, 50)); + std::string fpsStr = std::to_string(fps); + mTextFps->setText(fpsStr); + } + // update clock every 10 seconds if(mClockUpdateTimer.getElapsedTimeF32() > 10.f) { diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index fb923d3d09..da3c4a71f1 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -121,6 +121,7 @@ private: private: LLTextBox *mTextTime; + LLTextBox *mTextFps; LLStatGraph *mSGBandwidth; LLStatGraph *mSGPacketLoss; @@ -131,6 +132,7 @@ private: LLTextBox *mBoxBalance; LLButton *mMediaToggle; LLFrameTimer mClockUpdateTimer; + LLFrameTimer *mFpsUpdateTimer; S32 mBalance; S32 mHealth; diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index 2a9aaf8ce2..71624d1156 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -86,7 +86,7 @@ private: : mWidth(0) {} - LLButton* mButton; + LLButton* mButton = nullptr; std::string mURL; U32 mURLExternal; S32 mWidth; diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index caa91d204b..1bc49490d2 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -489,10 +489,17 @@ void draw_shockwave(F32 center_z, F32 t, S32 steps, LLColor4 color) gGL.end(); } + void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4 fogged_color, F32 dist) { - const U32 BEACON_VERTS = 256; - F32 step; + const F32 MAX_HEIGHT = 5020.f; + const U32 BEACON_ROWS = 256; + + U32 nRows; + F32 height; + F32 rowHeight; + + LLColor4 c_col, col_next, col_edge, col_edge_next; gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); @@ -501,59 +508,99 @@ void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4 { gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]); draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color); - step = (5020.0f - pos_agent.mV[2]) / BEACON_VERTS; + height = MAX_HEIGHT - pos_agent.mV[2]; } else { gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], 0); - step = pos_agent.mV[2] / BEACON_VERTS; + height = pos_agent.mV[2]; } - gGL.color4fv(fogged_color.mV); + nRows = ceil((BEACON_ROWS * height) / MAX_HEIGHT); + if(nRows<2) nRows=2; + rowHeight = height / nRows; - LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis(); - F32 t = gRenderStartTime.getElapsedTimeF32(); + gGL.color4fv(fogged_color.mV); - for (U32 i = 0; i < BEACON_VERTS; i++) - { - F32 x = x_axis.mV[0]; - F32 y = x_axis.mV[1]; - - F32 z = i * step; - F32 z_next = (i+1)*step; - - bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR; - F32 a = pulse_func(t, z, tracking_avatar, direction); - F32 an = pulse_func(t, z_next, tracking_avatar, direction); - - LLColor4 c_col = fogged_color + LLColor4(a,a,a,a); - LLColor4 col_next = fogged_color + LLColor4(an,an,an,an); - LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f); - LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f); - - a *= 2.f; - a += 1.0f; - - an *= 2.f; - an += 1.0f; - - gGL.begin(LLRender::TRIANGLE_STRIP); - gGL.color4fv(col_edge.mV); - gGL.vertex3f(-x*a, -y*a, z); - gGL.color4fv(col_edge_next.mV); - gGL.vertex3f(-x*an, -y*an, z_next); - - gGL.color4fv(c_col.mV); - gGL.vertex3f(0, 0, z); - gGL.color4fv(col_next.mV); - gGL.vertex3f(0, 0, z_next); - - gGL.color4fv(col_edge.mV); - gGL.vertex3f(x*a,y*a,z); - gGL.color4fv(col_edge_next.mV); - gGL.vertex3f(x*an,y*an,z_next); - gGL.end(); + LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis(); + F32 t = gRenderStartTime.getElapsedTimeF32(); + + F32 x = x_axis.mV[0]; + F32 y = x_axis.mV[1]; + F32 z = 0.f; + F32 z_next; + + F32 a,an; + F32 xa,xan; + F32 ya,yan; + + bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR; + + gGL.begin(LLRender::TRIANGLES); + + for (U32 i = 0; i < nRows; i++) + { + z_next = z + rowHeight; + + a = pulse_func(t, z, tracking_avatar, direction); + an = pulse_func(t, z_next, tracking_avatar, direction); + + c_col = fogged_color + LLColor4(a, a, a, a); + col_next = fogged_color + LLColor4(an, an, an, an); + col_edge = fogged_color * LLColor4(a, a, a, 0.0f); + col_edge_next = fogged_color * LLColor4(an, an, an, 0.0f); + + a = a + a + 1.f; + an = an + an + 1.f; + + xa = x*a; + ya = y*a; + xan = x*an; + yan = y*an; + + gGL.color4fv(col_edge.mV); + gGL.vertex3f(-xa, -ya, z); + + gGL.color4fv(col_next.mV); + gGL.vertex3f(0, 0, z_next); + + gGL.color4fv(col_edge_next.mV); + gGL.vertex3f(-xan, -yan, z_next); + + + gGL.color4fv(col_edge.mV); + gGL.vertex3f(-xa, -ya, z); + + gGL.color4fv(c_col.mV); + gGL.vertex3f(0, 0, z); + + gGL.color4fv(col_next.mV); + gGL.vertex3f(0, 0, z_next); + + + gGL.color4fv(c_col.mV); + gGL.vertex3f(0, 0, z); + + gGL.color4fv(col_edge_next.mV); + gGL.vertex3f(xan, yan, z_next); + + gGL.color4fv(col_next.mV); + gGL.vertex3f(0, 0, z_next); + + + gGL.color4fv(c_col.mV); + gGL.vertex3f(0, 0, z); + + gGL.color4fv(col_edge.mV); + gGL.vertex3f(xa, ya, z); + + gGL.color4fv(col_edge_next.mV); + gGL.vertex3f(xan, yan, z_next); + + z += rowHeight; } + + gGL.end(); gGL.popMatrix(); } diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index c3dc07f357..3c5881841f 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -158,9 +158,9 @@ LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity() else { LL_WARNS() << "Channel '" << channel - << "' does not follow naming convention, assuming Test" + << "' does not follow naming convention, assuming Release" << LL_ENDL; - maturity = TEST_VIEWER; + maturity = RELEASE_VIEWER; } return maturity; } diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 437f1239bf..8487efc8dd 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -198,6 +198,7 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const //static void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks) { +#if GLU_VERSION_1_1 GLint* viewport = (GLint*) gGLViewport; F64 model[16]; F64 proj[16]; @@ -290,6 +291,7 @@ void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zfli } camera.calcAgentFrustumPlanes(frust); +#endif // GLU_VERSION_1_1 } void LLViewerCamera::setPerspective(BOOL for_selection, @@ -432,12 +434,14 @@ void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 scree proj[i] = (F64) gGLProjection[i]; } +#if GLU_VERSION_1_1 gluUnProject( GLdouble(screen_x), GLdouble(screen_y), 0.0, mdlv, proj, (GLint*)gGLViewport, &x, &y, &z ); +#endif pos_agent->setVec( (F32)x, (F32)y, (F32)z ); } @@ -480,6 +484,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord proj[i] = (F64) gGLProjection[i]; } +#if GLU_VERSION_1_1 if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ], mdlv, proj, (GLint*)viewport, &x, &y, &z)) @@ -556,6 +561,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord } } else +#endif // GLU_VERSION_1_1 { return FALSE; } @@ -567,6 +573,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const { +#if GLU_VERSION_1_1 LLVector3 dir_to_point = pos_agent - getOrigin(); dir_to_point /= dir_to_point.magVec(); @@ -713,6 +720,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, out_point.mY = int_y + world_rect.mBottom; return TRUE; } +#endif // GLU_VERSION_1_1 return FALSE; } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index bb3378f4fe..9ed1fbf366 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1552,7 +1552,9 @@ void render_ui_2d() // Render 2D UI elements that overlay the world (no z compare) // Disable wireframe mode below here, as this is HUD/menus +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +#endif // Menu overlays, HUD, etc gViewerWindow->setup2DRender(); diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index fa3bfe6e2a..a7ce549bdf 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -56,7 +56,7 @@ #include "llmatrix4a.h" #include "llperfstats.h" -#if !LL_DARWIN && !LL_LINUX +#if !LL_DARWIN && !LL_LINUX && !__FreeBSD__ extern PFNGLWEIGHTPOINTERARBPROC glWeightPointerARB; extern PFNGLWEIGHTFVARBPROC glWeightfvARB; extern PFNGLVERTEXBLENDARBPROC glVertexBlendARB; @@ -242,7 +242,9 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) stop_glerror(); +#if GL_VERSION_1_1 LLGLSSpecular specular(LLColor4(1.f,1.f,1.f,1.f), 0.f); +#endif //---------------------------------------------------------------- // setup current texture diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 66182684ad..c347a5a725 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1733,9 +1733,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } else if(LLFile::stat(plugin_name, &s)) { -#if !LL_LINUX LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL; -#endif } else { @@ -1789,9 +1787,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } } } -#if !LL_LINUX LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL; -#endif if(gAgent.isInitialized()) { diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 0431184a9d..3763af7aa8 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -1217,7 +1217,15 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh LLGLEnable clamp(use_depth_clamp ? GL_DEPTH_CLAMP : 0); - U32 mode = gGLManager.mGLVersion >= 3.3f ? GL_ANY_SAMPLES_PASSED : GL_SAMPLES_PASSED; + U32 mode = +#if GL_VERSION_1_5 + gGLManager.mGLVersion >= 3.3f ? +#endif + GL_ANY_SAMPLES_PASSED +#if GL_VERSION_1_5 + : GL_SAMPLES_PASSED +#endif + ; #if LL_TRACK_PENDING_OCCLUSION_QUERIES sPendingQueries.insert(mOcclusionQuery[LLViewerCamera::sCurCameraID]); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 4c1dc7eb71..f8825fe7e1 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -171,15 +171,25 @@ void LLViewerTextureList::doPreloadImages() image->setAddressMode(LLTexUnit::TAM_WRAP); mImagePreloads.insert(image); } +#if GL_VERSION_1_1 image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD); +#else + image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + GL_ALPHA8_EXT, GL_ALPHA, IMG_ALPHA_GRAD); +#endif if (image) { image->setAddressMode(LLTexUnit::TAM_CLAMP); mImagePreloads.insert(image); } +#if GL_VERSION_1_1 image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD_2D); +#else + image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + GL_ALPHA8_EXT, GL_ALPHA, IMG_ALPHA_GRAD_2D); +#endif if (image) { image->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -911,9 +921,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag vsize /= min_scale; -#if LL_DARWIN - vsize /= 1.f + LLViewerTexture::sDesiredDiscardBias*(1.f+face->getDrawable()->mDistanceWRTCamera*bias_distance_scale); -#else +//#if LL_DARWIN +// vsize /= 1.f + LLViewerTexture::sDesiredDiscardBias*(1.f+face->getDrawable()->mDistanceWRTCamera*bias_distance_scale); +//#else vsize /= LLViewerTexture::sDesiredDiscardBias; vsize /= llmax(1.f, (LLViewerTexture::sDesiredDiscardBias-1.f) * (1.f + face->getDrawable()->mDistanceWRTCamera * bias_distance_scale)); @@ -924,7 +934,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag { // further reduce by discard bias when off screen or occluded vsize /= LLViewerTexture::sDesiredDiscardBias; } -#endif +//#endif // if a GLTF material is present, ignore that face // as far as this texture stats go, but update the GLTF material // stats diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b637bcbdac..a19d9a3567 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3146,6 +3146,14 @@ 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 fc22b003d5..93c78cbacc 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -194,6 +194,7 @@ 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/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e5d0eda766..d7382eaac6 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -11495,24 +11495,38 @@ void LLVOAvatar::placeProfileQuery() glGenQueries(1, &mGPUTimerQuery); } - glBeginQuery(GL_TIME_ELAPSED, mGPUTimerQuery); +#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query + glBeginQuery(GL_TIME_ELAPSED_EXT, mGPUTimerQuery); +#endif } void LLVOAvatar::readProfileQuery(S32 retries) { if (!mGPUProfilePending) { - glEndQuery(GL_TIME_ELAPSED); +#if GL_EXT_timer_query || GL_EXT_disjoint_timer_query + glEndQuery(GL_TIME_ELAPSED_EXT); +#endif mGPUProfilePending = true; } +#if GL_ARB_timer_query GLuint64 result = 0; glGetQueryObjectui64v(mGPUTimerQuery, GL_QUERY_RESULT_AVAILABLE, &result); +#else + GLuint result = 0; + glGetQueryObjectuiv(mGPUTimerQuery, GL_QUERY_RESULT_AVAILABLE, &result); +#endif if (result == GL_TRUE || --retries <= 0) { // query available, readback result +#if GL_ARB_timer_query GLuint64 time_elapsed = 0; glGetQueryObjectui64v(mGPUTimerQuery, GL_QUERY_RESULT, &time_elapsed); +#else + GLuint time_elapsed = 0; + glGetQueryObjectuiv(mGPUTimerQuery, GL_QUERY_RESULT, &time_elapsed); +#endif mGPURenderTime = time_elapsed / 1000000.f; mGPUProfilePending = false; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 3bb23bf126..e03bd1a726 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -935,7 +935,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() gDirUtilp->append(exe_path, "SLVoice"); #else std::string exe_path = gDirUtilp->getExecutableDir(); - gDirUtilp->append(exe_path, "SLVoice"); + gDirUtilp->append(exe_path, "SLVoice.exe"); #endif // See if the vivox executable exists llstat s; @@ -943,7 +943,12 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() { // vivox executable exists. Build the command line and launch the daemon. LLProcess::Params params; +#if LL_LINUX || __FreeBSD__ + params.executable = "wine"; + params.args.add(exe_path); +#else params.executable = exe_path; +#endif // VOICE-88: Cycle through [portbase..portbase+portrange) on // successive tries because attempting to relaunch (after manually diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 1cd72a1cc5..5dc2df7bed 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -384,7 +384,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const mCertStore = gSavedSettings.getString("CertStore"); httpOpts->setSSLVerifyPeer( vefifySSLCert ); - httpOpts->setSSLVerifyHost( vefifySSLCert ? 2 : 0); + httpOpts->setSSLVerifyHost( vefifySSLCert ); // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d22206ca98..8e880a2ceb 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -947,7 +947,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY) gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); } } @@ -964,7 +964,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY) gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); } } @@ -3787,10 +3787,12 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion) llassert(!sRenderingHUDs); +#if GL_VERSION_1_1 if (gUseWireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } +#endif if (&camera == LLViewerCamera::getInstance()) { // a bit hacky, this is the start of the main render frame, figure out delta between last modelview matrix and @@ -3913,10 +3915,12 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera, bool do_occlusion) } // Tracy ZoneScoped +#if GL_VERSION_1_1 if (gUseWireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } +#endif } void LLPipeline::renderGeomPostDeferred(LLCamera& camera) @@ -3924,10 +3928,12 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; LL_PROFILE_GPU_ZONE("renderGeomPostDeferred"); +#if GL_VERSION_1_1 if (gUseWireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } +#endif U32 cur_type = 0; @@ -4038,10 +4044,12 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) renderDebug(); } +#if GL_VERSION_1_1 if (gUseWireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } +#endif } void LLPipeline::renderGeomShadow(LLCamera& camera) @@ -4134,7 +4142,9 @@ void LLPipeline::renderPhysicsDisplay() gGL.flush(); gDebugProgram.bind(); +#if GL_VERSION_1_1 LLGLEnable(GL_POLYGON_OFFSET_LINE); +#endif glPolygonOffset(3.f, 3.f); glLineWidth(3.f); LLGLEnable blend(GL_BLEND); @@ -4150,10 +4160,12 @@ void LLPipeline::renderPhysicsDisplay() bool wireframe = (pass == 2); +#if GL_VERSION_1_1 if (wireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } +#endif for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -4173,10 +4185,12 @@ void LLPipeline::renderPhysicsDisplay() } gGL.flush(); +#if GL_VERSION_1_1 if (wireframe) { glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } +#endif } glLineWidth(1.f); gDebugProgram.unbind(); @@ -4256,7 +4270,9 @@ void LLPipeline::renderDebug() glClearColor(clearColor.mV[0],clearColor.mV[1],clearColor.mV[2],0); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // no stencil -- deprecated | GL_STENCIL_BUFFER_BIT); gGL.setColorMask(true, false); +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); +#endif } //NavMesh @@ -4286,7 +4302,9 @@ void LLPipeline::renderDebug() gPathfindingProgram.bind(); gGL.flush(); +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); +#endif glLineWidth(1.0f); gGL.flush(); } @@ -4343,7 +4361,9 @@ void LLPipeline::renderDebug() LLGLDisable cull(i >= 2 ? GL_CULL_FACE : 0); gGL.flush(); +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); +#endif //get rid of some z-fighting LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL); @@ -4368,8 +4388,10 @@ void LLPipeline::renderDebug() gGL.flush(); } +#if GL_VERSION_1_1 LLGLEnable lineOffset(GL_POLYGON_OFFSET_LINE); glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); +#endif F32 offset = gSavedSettings.getF32("PathfindingLineOffset"); @@ -4389,10 +4411,14 @@ void LLPipeline::renderDebug() } else { +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); +#endif gPathfindingProgram.uniform1f(sAmbiance, ambiance); llPathingLibInstance->renderNavMeshShapesVBO( render_order[i] ); +#if GL_VERSION_1_1 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); +#endif } } @@ -4409,7 +4435,9 @@ void LLPipeline::renderDebug() glLineWidth(1.f); } +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); +#endif } } } @@ -4420,7 +4448,9 @@ void LLPipeline::renderDebug() { //render navmesh xray F32 ambiance = gSavedSettings.getF32("PathfindingAmbiance"); +#if GL_VERSION_1_1 LLGLEnable lineOffset(GL_POLYGON_OFFSET_LINE); +#endif LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL); F32 offset = gSavedSettings.getF32("PathfindingLineOffset"); @@ -4437,10 +4467,14 @@ void LLPipeline::renderDebug() if (gSavedSettings.getBOOL("PathfindingXRayWireframe")) { //draw hidden wireframe as darker and less opaque +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); +#endif gPathfindingProgram.uniform1f(sAmbiance, 1.f); llPathingLibInstance->renderNavMesh(); +#if GL_VERSION_1_1 glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); +#endif } else { @@ -4480,7 +4514,9 @@ void LLPipeline::renderDebug() gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep, true); +#if GL_VERSION_1_1 glPointSize(8.f); +#endif LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS); gGL.begin(LLRender::POINTS); @@ -4505,7 +4541,9 @@ void LLPipeline::renderDebug() } gGL.end(); gGL.flush(); +#if GL_VERSION_1_1 glPointSize(1.f); +#endif } // Debug stuff. @@ -4690,7 +4728,9 @@ void LLPipeline::renderDebug() { //render visible point cloud gGL.flush(); +#if GL_VERSION_1_1 glPointSize(8.f); +#endif gGL.begin(LLRender::POINTS); F32* c = col+i*4; @@ -4704,7 +4744,9 @@ void LLPipeline::renderDebug() gGL.end(); gGL.flush(); +#if GL_VERSION_1_1 glPointSize(1.f); +#endif LLVector3* ext = mShadowExtents[i]; LLVector3 pos = (ext[0]+ext[1])*0.5f; @@ -6745,7 +6787,7 @@ void apply_cube_face_rotation(U32 face) void validate_framebuffer_object() { GLenum status; - status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); + status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch(status) { case GL_FRAMEBUFFER_COMPLETE: diff --git a/indra/newview/secondlife.icns b/indra/newview/secondlife.icns Binary files differindex 4560d4bb24..cf46b5941f 100644 --- a/indra/newview/secondlife.icns +++ b/indra/newview/secondlife.icns diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 92f63a1820..73e9c85f4d 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -4,13 +4,13 @@ <!-- Named Colors --> <color name="EmphasisColor" - value="0.38 0.694 0.573 1" /> + value="0.34 0.51 0.64 1" /> <color name="EmphasisColor_13" - value="0.38 0.694 0.573 0.13" /> + value="0.34 0.51 0.64 0.13" /> <color name="EmphasisColor_35" - value="0.38 0.694 0.573 0.35" /> + value="0.34 0.51 0.64 0.35" /> <color name="BeaconColor" value="0.749 0.298 0 1" /> @@ -70,7 +70,8 @@ value="0 0 0 0.5" /> <color name="FrogGreen" - value="0.26 0.345 0.263 1" /> + value="0.26 0.33 0.42 1" /> + <!-- ^(Not actually green) --> <color name="Red" value="1 0 0 1" /> @@ -338,7 +339,7 @@ reference="EmphasisColor" /> <color name="ConversationFriendColor" - value="0.42 0.85 0.71 1" /> + value="0.5 0.7 0.85 1" /> <color name="DefaultHighlightDark" reference="White_10" /> @@ -359,7 +360,7 @@ reference="Black" /> <color name="FilterTextColor" - value="0.38 0.69 0.57 1" /> + reference="EmphasisColor" /> <color name="FloaterButtonImageColor" reference="LtGray" /> @@ -380,7 +381,10 @@ reference="EmphasisColor" /> <color name="FolderViewLoadingMessageTextColor" - value="0.3344 0.5456 0.5159 1" /> + value="0.3344 0.545 0.645 1" /> + <color + name="FpsTextColor" + value="0.34 0.51 0.64 0.8" /> <color name="GridFocusPointColor" reference="White_50" /> @@ -407,7 +411,7 @@ value="0.43 0.06 0.06 1" /> <color name="HTMLLinkColor" - value="0.3 0.82 1 1" /> + reference="EmphasisColor" /> <color name="HealthTextColor" reference="White" /> @@ -437,7 +441,7 @@ value="1 0 1 1" /> <color name="HighlightParentColor" - value="0.67 0.83 0.96 1" /> + value="0.5 0.65 0.8 1" /> <color name="IMHistoryBgColor" reference="Unused?" /> @@ -503,10 +507,10 @@ reference="White" /> <color name="MapAvatarColor" - reference="Green" /> + reference="White" /> <color name="MapAvatarFriendColor" - reference="Yellow" /> + value="0.5 0.7 0.85 1" /> <color name="MapAvatarSelfColor" value="0.53125 0 0.498047 1" /> @@ -527,7 +531,7 @@ value="0.5 0 0 1" /> <color name="MenuBarBgColor" - reference="DkGray" /> + reference="MouseGray" /> <color name="MenuBarGodBgColor" reference="FrogGreen" /> @@ -592,7 +596,7 @@ reference="White" /> <color name="NameTagFriend" - value="0.447 0.784 0.663 1" /> + value="0.5 0.7 0.85 1" /> <color name="NameTagLegacy" reference="White" /> @@ -640,7 +644,7 @@ reference="DkGray_66" /> <color name="ObjectChatColor" - reference="EmphasisColor" /> + reference="LtYellow" /> <color name="OverdrivenColor" reference="Red" /> @@ -835,10 +839,10 @@ reference="LtGray" /> <color name="UserChatColor" - reference="Yellow" /> + reference="White" /> <color name="llOwnerSayChatColor" - reference="LtYellow" /> + reference="LtOrange" /> <!-- New Colors --> <color @@ -975,10 +979,10 @@ value="1 0.14 0 1" /> <color name="OutfitGalleryItemSelected" - value="0.22 0.45 0.35 1" /> + reference="EmphasisColor_35" /> <color name="OutfitGalleryItemWorn" - value="0.33 0.58 0.47 1" /> + reference="EmphasisColor_13" /> <color name="OutfitGalleryItemUnselected" value="0.4 0.4 0.4 1" /> diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_Center.png b/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_Center.png Binary files differindex ffc3c85ea2..90389734e5 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_Center.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_Center.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_In.png b/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_In.png Binary files differindex c8560c0869..a540674662 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_In.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Rotate_In.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_Center.png b/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_Center.png Binary files differindex 2812d614e6..a507127fda 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_Center.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_Center.png diff --git a/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_In.png b/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_In.png Binary files differindex ae2c57c207..61b1085e96 100644 --- a/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_In.png +++ b/indra/newview/skins/default/textures/bottomtray/Cam_Tracking_In.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Backward_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Backward_On.png Binary files differindex 9f31d461b5..1af8e6b956 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Backward_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Backward_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png Binary files differindex f7ed4c25fb..4f97611db1 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Down_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Forward_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Forward_On.png Binary files differindex d0a825a682..f01c9f3c63 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Forward_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Forward_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png Binary files differindex 2f81fb1588..a120d46e99 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Left_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png Binary files differindex 4f86e81a15..c241ac75df 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Right_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_TurnLeft_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_TurnLeft_On.png Binary files differindex b211371e64..20ce7b9296 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_TurnLeft_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_TurnLeft_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_TurnRight_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_TurnRight_On.png Binary files differindex e937c3f012..7b3d2e8dd8 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_TurnRight_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_TurnRight_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png b/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png Binary files differindex ed4902f3ee..ecce0d0192 100644 --- a/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png +++ b/indra/newview/skins/default/textures/bottomtray/Movement_Up_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png Binary files differindex cd18ae310d..3072512301 100644 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png +++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png Binary files differindex b0ed6ee8eb..28872be28f 100644 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png +++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png Binary files differindex be4881b64c..823acfc583 100644 --- a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png +++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png Binary files differindex 6cb33efb93..63e07a31d4 100644 --- a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png +++ b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png Binary files differindex 6cb33efb93..2aa31478d8 100644 --- a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png +++ b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Cone_Selected.png b/indra/newview/skins/default/textures/build/Object_Cone_Selected.png Binary files differindex d50dc69ffe..4aeb96c3ae 100644 --- a/indra/newview/skins/default/textures/build/Object_Cone_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Cone_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Cube_Selected.png b/indra/newview/skins/default/textures/build/Object_Cube_Selected.png Binary files differindex 3d6964530d..9c9d4f506a 100644 --- a/indra/newview/skins/default/textures/build/Object_Cube_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Cube_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png b/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png Binary files differindex 3ed0389961..50bd865cfc 100644 --- a/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Cylinder_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Grass_Selected.png b/indra/newview/skins/default/textures/build/Object_Grass_Selected.png Binary files differindex 3ebd5ea7a1..19cf732d91 100644 --- a/indra/newview/skins/default/textures/build/Object_Grass_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Grass_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png b/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png Binary files differindex 3bdc4d1fd5..ae65f1d5e6 100644 --- a/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Hemi_Cone_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png b/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png Binary files differindex 0912442e29..c837e953da 100644 --- a/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Hemi_Cylinder_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png b/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png Binary files differindex 33db4a2de8..2d1e035d41 100644 --- a/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Hemi_Sphere_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Prism_Selected.png b/indra/newview/skins/default/textures/build/Object_Prism_Selected.png Binary files differindex 9e80fe2b84..6ec9e72c54 100644 --- a/indra/newview/skins/default/textures/build/Object_Prism_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Prism_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png b/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png Binary files differindex d36bfa55d4..ffb878dc72 100644 --- a/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Pyramid_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Ring_Selected.png b/indra/newview/skins/default/textures/build/Object_Ring_Selected.png Binary files differindex 962f6efb93..ccc1f6d221 100644 --- a/indra/newview/skins/default/textures/build/Object_Ring_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Ring_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png b/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png Binary files differindex 715d597144..ee015e1786 100644 --- a/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Sphere_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png b/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png Binary files differindex b2ea680f23..1afb115ce5 100644 --- a/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Tetrahedron_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Torus_Selected.png b/indra/newview/skins/default/textures/build/Object_Torus_Selected.png Binary files differindex 1fc22686eb..ff1cce3a79 100644 --- a/indra/newview/skins/default/textures/build/Object_Torus_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Torus_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Tree_Selected.png b/indra/newview/skins/default/textures/build/Object_Tree_Selected.png Binary files differindex 5bd87f8a2f..f21b0e4043 100644 --- a/indra/newview/skins/default/textures/build/Object_Tree_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Tree_Selected.png diff --git a/indra/newview/skins/default/textures/build/Object_Tube_Selected.png b/indra/newview/skins/default/textures/build/Object_Tube_Selected.png Binary files differindex a4c3f39e14..5653f06af1 100644 --- a/indra/newview/skins/default/textures/build/Object_Tube_Selected.png +++ b/indra/newview/skins/default/textures/build/Object_Tube_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Accordion_Selected.png b/indra/newview/skins/default/textures/containers/Accordion_Selected.png Binary files differindex 0616dea6a3..0c193cd2b8 100644 --- a/indra/newview/skins/default/textures/containers/Accordion_Selected.png +++ b/indra/newview/skins/default/textures/containers/Accordion_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png Binary files differindex 1951413f8d..c5b232d9ab 100644 --- a/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png +++ b/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png Binary files differindex 8364716e02..a55d8d0d41 100644 --- a/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png +++ b/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png Binary files differindex 21f1c2d8a8..be624ab273 100644 --- a/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png +++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png Binary files differindex 3946917c7c..8bc17ebc0b 100644 --- a/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png +++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png Binary files differindex eeef28e5a5..db28e9e13a 100644 --- a/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png +++ b/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png Binary files differindex b0f1f16398..7d73c197fe 100644 --- a/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png +++ b/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png Binary files differindex 41b5d24d87..f347505772 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png Binary files differindex 083acc0156..fd24e5b430 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png Binary files differindex ee4649a8f9..539943618e 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png Binary files differindex 55c02160e3..cf30330f1c 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png Binary files differindex 2f6ea90196..6ac1ce3ffb 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png Binary files differindex 642113b135..2c985ceb19 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png Binary files differindex 01fd765c3d..d4881e21d3 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png Binary files differindex 74e00635f1..bf2a72d6f4 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png Binary files differindex 8a0d98a780..5556234cf4 100644 --- a/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png +++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png Binary files differindex 0732a33d93..fb57265dac 100644 --- a/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png +++ b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png Binary files differindex 8124554902..907113cbb7 100644 --- a/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png +++ b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png Binary files differindex be1cd0706f..82d650ef4b 100644 --- a/indra/newview/skins/default/textures/icons/Info_Over.png +++ b/indra/newview/skins/default/textures/icons/Info_Over.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Shape.png b/indra/newview/skins/default/textures/icons/Inv_Shape.png Binary files differnew file mode 100644 index 0000000000..e5db447b36 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Shape.png diff --git a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png Binary files differindex 57eafc4047..2550cae0d4 100644 --- a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png +++ b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png diff --git a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png Binary files differindex b080688e55..5b56d86184 100644 --- a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png +++ b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png diff --git a/indra/newview/skins/default/textures/icons/MP_Logo.png b/indra/newview/skins/default/textures/icons/MP_Logo.png Binary files differnew file mode 100644 index 0000000000..b01e8f4ea3 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/MP_Logo.png diff --git a/indra/newview/skins/default/textures/icons/MusicNote.png b/indra/newview/skins/default/textures/icons/MusicNote.png Binary files differnew file mode 100644 index 0000000000..8d3534a94b --- /dev/null +++ b/indra/newview/skins/default/textures/icons/MusicNote.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png b/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png Binary files differindex be58114aa1..1d2dbd6349 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Disabled.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Off.png b/indra/newview/skins/default/textures/icons/OutboxPush_Off.png Binary files differindex e6b9480ab1..f8f3367c42 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Off.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Off.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_On.png b/indra/newview/skins/default/textures/icons/OutboxPush_On.png Binary files differindex ffda2e92d4..b1fd734100 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_On.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_On.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png b/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png Binary files differindex 6b5911014f..e234400b72 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_On_Over.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Over.png b/indra/newview/skins/default/textures/icons/OutboxPush_Over.png Binary files differindex 9c26b92e73..9e1b0e2dfc 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Over.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Over.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Press.png b/indra/newview/skins/default/textures/icons/OutboxPush_Press.png Binary files differindex 3b5d462975..14d9eacc52 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Press.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Press.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png Binary files differindex f85be047b0..85015fc913 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_1.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png Binary files differindex cd4e482216..6158242b68 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_2.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png Binary files differindex d212a871ce..7105380bff 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_3.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png Binary files differindex e5b6023e36..0e65a60fc8 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_4.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png Binary files differindex e1911a092f..7acef05891 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_5.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png Binary files differindex 9e59f7843a..4f5b34a643 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Progress_6.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png Binary files differindex 51e8bff646..d58826da67 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png Binary files differindex 300e2e69e1..cad9f118b1 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Disabled.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png Binary files differindex 32fb236381..65d914c6b3 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Over.png diff --git a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png Binary files differindex 827f343b1e..cd50d41903 100644 --- a/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png +++ b/indra/newview/skins/default/textures/icons/OutboxPush_Selected_Press.png diff --git a/indra/newview/skins/default/textures/icons/Permission_Ungranted.png b/indra/newview/skins/default/textures/icons/Permission_Ungranted.png Binary files differnew file mode 100644 index 0000000000..d206af4433 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Permission_Ungranted.png diff --git a/indra/newview/skins/default/textures/icons/SL_Logo.png b/indra/newview/skins/default/textures/icons/SL_Logo.png Binary files differindex 5e376c72f9..8234387058 100644 --- a/indra/newview/skins/default/textures/icons/SL_Logo.png +++ b/indra/newview/skins/default/textures/icons/SL_Logo.png diff --git a/indra/newview/skins/default/textures/icons/Sync_Enabled.png b/indra/newview/skins/default/textures/icons/Sync_Enabled.png Binary files differindex bc236c8b98..0e7e5157cb 100644 --- a/indra/newview/skins/default/textures/icons/Sync_Enabled.png +++ b/indra/newview/skins/default/textures/icons/Sync_Enabled.png diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png Binary files differindex cd18ae310d..546fca9ec5 100644 --- a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png +++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png Binary files differindex b0ed6ee8eb..26b125d804 100644 --- a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png +++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_On.png b/indra/newview/skins/default/textures/icons/VoicePTT_On.png Binary files differindex be4881b64c..a614f13d9a 100644 --- a/indra/newview/skins/default/textures/icons/VoicePTT_On.png +++ b/indra/newview/skins/default/textures/icons/VoicePTT_On.png diff --git a/indra/newview/skins/default/textures/icons/add_icon.png b/indra/newview/skins/default/textures/icons/add_icon.png Binary files differindex cb68ee8e16..b5b09ae6e0 100644 --- a/indra/newview/skins/default/textures/icons/add_icon.png +++ b/indra/newview/skins/default/textures/icons/add_icon.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_off.png b/indra/newview/skins/default/textures/icons/back_arrow_off.png Binary files differindex e7cea49d73..d0d8b31006 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_off.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_off.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_over.png b/indra/newview/skins/default/textures/icons/back_arrow_over.png Binary files differindex 4e5a93a25f..4a247e0f1f 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_over.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_over.png diff --git a/indra/newview/skins/default/textures/icons/back_arrow_press.png b/indra/newview/skins/default/textures/icons/back_arrow_press.png Binary files differindex 289b8c20e6..3e9f1a6e96 100644 --- a/indra/newview/skins/default/textures/icons/back_arrow_press.png +++ b/indra/newview/skins/default/textures/icons/back_arrow_press.png diff --git a/indra/newview/skins/default/textures/icons/check_mark.png b/indra/newview/skins/default/textures/icons/check_mark.png Binary files differindex fefd202dec..ea59769d38 100644 --- a/indra/newview/skins/default/textures/icons/check_mark.png +++ b/indra/newview/skins/default/textures/icons/check_mark.png diff --git a/indra/newview/skins/default/textures/icons/copy_clipboard.png b/indra/newview/skins/default/textures/icons/copy_clipboard.png Binary files differindex bb1ceff1ce..9ce67d8547 100644 --- a/indra/newview/skins/default/textures/icons/copy_clipboard.png +++ b/indra/newview/skins/default/textures/icons/copy_clipboard.png diff --git a/indra/newview/skins/default/textures/icons/delete_icon.png b/indra/newview/skins/default/textures/icons/delete_icon.png Binary files differindex 37ce374653..5a80155d8b 100644 --- a/indra/newview/skins/default/textures/icons/delete_icon.png +++ b/indra/newview/skins/default/textures/icons/delete_icon.png diff --git a/indra/newview/skins/default/textures/icons/file_upload.png b/indra/newview/skins/default/textures/icons/file_upload.png Binary files differindex 58f2757136..78b75fdd72 100644 --- a/indra/newview/skins/default/textures/icons/file_upload.png +++ b/indra/newview/skins/default/textures/icons/file_upload.png diff --git a/indra/newview/skins/default/textures/icons/hand.png b/indra/newview/skins/default/textures/icons/hand.png Binary files differindex 41b9600da6..3f497eefbb 100644 --- a/indra/newview/skins/default/textures/icons/hand.png +++ b/indra/newview/skins/default/textures/icons/hand.png diff --git a/indra/newview/skins/default/textures/icons/multi_folder_mode.png b/indra/newview/skins/default/textures/icons/multi_folder_mode.png Binary files differindex 8cda3efc36..b363848aba 100644 --- a/indra/newview/skins/default/textures/icons/multi_folder_mode.png +++ b/indra/newview/skins/default/textures/icons/multi_folder_mode.png diff --git a/indra/newview/skins/default/textures/icons/paste_clipboard.png b/indra/newview/skins/default/textures/icons/paste_clipboard.png Binary files differindex e1589ab098..ff8493d4ad 100644 --- a/indra/newview/skins/default/textures/icons/paste_clipboard.png +++ b/indra/newview/skins/default/textures/icons/paste_clipboard.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta.png b/indra/newview/skins/default/textures/icons/profile_badge_beta.png Binary files differindex 7c8a723c47..95e277aab0 100644 --- a/indra/newview/skins/default/textures/icons/profile_badge_beta.png +++ b/indra/newview/skins/default/textures/icons/profile_badge_beta.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png Binary files differindex 7c38e9e2ae..fb145901e2 100644 --- a/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png +++ b/indra/newview/skins/default/textures/icons/profile_badge_beta_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png Binary files differindex 475edd080e..3f7fd343b3 100644 --- a/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png +++ b/indra/newview/skins/default/textures/icons/profile_badge_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_linden.png b/indra/newview/skins/default/textures/icons/profile_badge_linden.png Binary files differindex 1b6ac03e86..6ab9fcebea 100644 --- a/indra/newview/skins/default/textures/icons/profile_badge_linden.png +++ b/indra/newview/skins/default/textures/icons/profile_badge_linden.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png Binary files differindex 4286995202..5c68ad40ce 100644 --- a/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png +++ b/indra/newview/skins/default/textures/icons/profile_badge_pplus_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png Binary files differindex 47e93c4fac..58957b7b96 100644 --- a/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png +++ b/indra/newview/skins/default/textures/icons/profile_badge_premium_lifetime.png diff --git a/indra/newview/skins/default/textures/icons/remove_icon.png b/indra/newview/skins/default/textures/icons/remove_icon.png Binary files differindex 6e62ee33f4..d8a45cc21c 100644 --- a/indra/newview/skins/default/textures/icons/remove_icon.png +++ b/indra/newview/skins/default/textures/icons/remove_icon.png diff --git a/indra/newview/skins/default/textures/icons/see_me_online.png b/indra/newview/skins/default/textures/icons/see_me_online.png Binary files differindex 52dc2ae74f..5684e27f43 100644 --- a/indra/newview/skins/default/textures/icons/see_me_online.png +++ b/indra/newview/skins/default/textures/icons/see_me_online.png diff --git a/indra/newview/skins/default/textures/icons/see_on_map.png b/indra/newview/skins/default/textures/icons/see_on_map.png Binary files differindex 200e649818..fc7057cacd 100644 --- a/indra/newview/skins/default/textures/icons/see_on_map.png +++ b/indra/newview/skins/default/textures/icons/see_on_map.png diff --git a/indra/newview/skins/default/textures/icons/see_them_on_map.png b/indra/newview/skins/default/textures/icons/see_them_on_map.png Binary files differnew file mode 100644 index 0000000000..d309980c13 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/see_them_on_map.png diff --git a/indra/newview/skins/default/textures/icons/see_them_online.png b/indra/newview/skins/default/textures/icons/see_them_online.png Binary files differnew file mode 100644 index 0000000000..135e6cdd82 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/see_them_online.png diff --git a/indra/newview/skins/default/textures/icons/single_folder_back.png b/indra/newview/skins/default/textures/icons/single_folder_back.png Binary files differindex b614e9ef9b..b93bb2525a 100644 --- a/indra/newview/skins/default/textures/icons/single_folder_back.png +++ b/indra/newview/skins/default/textures/icons/single_folder_back.png diff --git a/indra/newview/skins/default/textures/icons/single_folder_forward.png b/indra/newview/skins/default/textures/icons/single_folder_forward.png Binary files differindex c7bee3522d..12a21b2bba 100644 --- a/indra/newview/skins/default/textures/icons/single_folder_forward.png +++ b/indra/newview/skins/default/textures/icons/single_folder_forward.png diff --git a/indra/newview/skins/default/textures/icons/single_folder_mode.png b/indra/newview/skins/default/textures/icons/single_folder_mode.png Binary files differindex f70b754123..0fc8475917 100644 --- a/indra/newview/skins/default/textures/icons/single_folder_mode.png +++ b/indra/newview/skins/default/textures/icons/single_folder_mode.png diff --git a/indra/newview/skins/default/textures/icons/single_folder_up.png b/indra/newview/skins/default/textures/icons/single_folder_up.png Binary files differindex 651b2b1af1..c1c8c63870 100644 --- a/indra/newview/skins/default/textures/icons/single_folder_up.png +++ b/indra/newview/skins/default/textures/icons/single_folder_up.png diff --git a/indra/newview/skins/default/textures/icons/snapshot_icon.png b/indra/newview/skins/default/textures/icons/snapshot_icon.png Binary files differindex 41d524678f..9b6ac6eeb0 100644 --- a/indra/newview/skins/default/textures/icons/snapshot_icon.png +++ b/indra/newview/skins/default/textures/icons/snapshot_icon.png diff --git a/indra/newview/skins/default/textures/icons/texture_icon.png b/indra/newview/skins/default/textures/icons/texture_icon.png Binary files differindex 278760a5b0..f5c205208c 100644 --- a/indra/newview/skins/default/textures/icons/texture_icon.png +++ b/indra/newview/skins/default/textures/icons/texture_icon.png diff --git a/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png b/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png Binary files differindex 8d5ca624af..19629aba04 100644 --- a/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png +++ b/indra/newview/skins/default/textures/icons/thumbnail_fallback_icon.png diff --git a/indra/newview/skins/default/textures/model_wizard/progress_light.png b/indra/newview/skins/default/textures/model_wizard/progress_light.png Binary files differindex c8ab151c44..be6b263fb6 100644 --- a/indra/newview/skins/default/textures/model_wizard/progress_light.png +++ b/indra/newview/skins/default/textures/model_wizard/progress_light.png diff --git a/indra/newview/skins/default/textures/navbar/BuyArrow_Over.png b/indra/newview/skins/default/textures/navbar/BuyArrow_Over.png Binary files differindex 0b3f252ccf..3d9c758574 100644 --- a/indra/newview/skins/default/textures/navbar/BuyArrow_Over.png +++ b/indra/newview/skins/default/textures/navbar/BuyArrow_Over.png diff --git a/indra/newview/skins/default/textures/navbar/BuyArrow_Press.png b/indra/newview/skins/default/textures/navbar/BuyArrow_Press.png Binary files differindex 5c4c150bed..69b0d43900 100644 --- a/indra/newview/skins/default/textures/navbar/BuyArrow_Press.png +++ b/indra/newview/skins/default/textures/navbar/BuyArrow_Press.png diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png Binary files differindex e27dbe2cad..6d42f52963 100644 --- a/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png +++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png Binary files differindex 7909d54f2b..74861fdb58 100644 --- a/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png +++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG.png b/indra/newview/skins/default/textures/navbar/NavBar_BG.png Binary files differindex 38eea783e6..6a91700ae0 100644 --- a/indra/newview/skins/default/textures/navbar/NavBar_BG.png +++ b/indra/newview/skins/default/textures/navbar/NavBar_BG.png diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png Binary files differindex a79d999932..c61dcde58c 100644 --- a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png +++ b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png Binary files differindex b692ed92da..9e3da34596 100644 --- a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png +++ b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png diff --git a/indra/newview/skins/default/textures/navbar/Row_Selection.png b/indra/newview/skins/default/textures/navbar/Row_Selection.png Binary files differindex fc4f0c07ef..aededa12e0 100644 --- a/indra/newview/skins/default/textures/navbar/Row_Selection.png +++ b/indra/newview/skins/default/textures/navbar/Row_Selection.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 97468c3b2e..968910d304 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -642,7 +642,7 @@ with the same filename but different name <texture name="SliderThumb_Disabled" file_name="widgets/SliderThumb_Disabled.png" /> <texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" /> - <texture name="SL_Logo" file_name="icons/SL_Logo.png" preload="true" /> + <texture name="SL_Logo" file_name="icons/MP_Logo.png" preload="true" /> <texture name="OBJECT_Icon" file_name="icons/object_icon.png" preload="true" /> <texture name="Unknown_Icon" file_name="icons/unknown_icon.png" preload="true" /> @@ -653,8 +653,8 @@ with the same filename but different name <texture name="Snapshot_Profile" file_name="toolbar_icons/profile.png" preload="false" /> <texture name="startup_logo" file_name="windows/startup_logo.png" preload="true" /> - <texture name="login_sl_logo" file_name="windows/login_sl_logo.png" preload="true" /> - <texture name="login_sl_logo_small" file_name="windows/login_sl_logo_small.png" preload="true" /> + <texture name="login_mp_logo" file_name="windows/login_mp_logo.png" preload="true" /> + <texture name="login_mp_logo_small" file_name="windows/login_mp_logo_small.png" preload="true" /> <texture name="first_login_image" file_name="windows/first_login_image.jpg" preload="true" /> <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="false" /> @@ -780,9 +780,9 @@ with the same filename but different name scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_NoTitle_Background" file_name="windows/Window_NoTitle_Background.png" preload="true" + <texture name="Window_NoTitle_Background" file_name="windows/Window_Background.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> - <texture name="Window_NoTitle_Foreground" file_name="windows/Window_NoTitle_Foreground.png" preload="true" + <texture name="Window_NoTitle_Foreground" file_name="windows/Window_Foreground.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> <texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" /> @@ -896,7 +896,7 @@ with the same filename but different name <texture name="Default_Outfit_Photo" file_name="icons/Default_Outfit_Photo.png" preload="true"/> <texture name="Notification_Condense" file_name="icons/Icon_Notification_Condense.png" preload="true"/> <texture name="Notification_Expand" file_name="icons/Icon_Notification_Expand.png" preload="true"/> - <texture name="System_Notification" file_name="icons/SL_Logo.png" preload="true"/> + <texture name="System_Notification" file_name="icons/MP_Logo.png" preload="true"/> <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true"/> <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true"/> diff --git a/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png b/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png Binary files differindex aa1bb26a56..bce67be463 100644 --- a/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png +++ b/indra/newview/skins/default/textures/toolbar_icons/highlighting_selected.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/twitter.png b/indra/newview/skins/default/textures/toolbar_icons/twitter.png Binary files differindex a99c490887..0ad56f7802 100644 --- a/indra/newview/skins/default/textures/toolbar_icons/twitter.png +++ b/indra/newview/skins/default/textures/toolbar_icons/twitter.png diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Small_Down.png b/indra/newview/skins/default/textures/widgets/Arrow_Small_Down.png Binary files differnew file mode 100644 index 0000000000..8694cdf2d4 --- /dev/null +++ b/indra/newview/skins/default/textures/widgets/Arrow_Small_Down.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png Binary files differindex 95a4a36c9d..e61e7a29a1 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Off.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png Binary files differindex 20d1ebf53d..7e278e1065 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Over.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png Binary files differindex 63f4b503e2..31038e28ae 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Left_Press.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png Binary files differindex 28a002b118..52bcf88258 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Off.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png Binary files differindex a195e80b0e..efdd13003a 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Over.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png Binary files differindex 9863ee32cb..3c66b1f1cc 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Middle_Press.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png Binary files differindex ce47da169b..4c433ec42a 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Off.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png Binary files differindex 2225150983..5915f34bb6 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Over.png diff --git a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png Binary files differindex 2d541d0f70..ab939cc99f 100644 --- a/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png +++ b/indra/newview/skins/default/textures/widgets/BreadCrumbBtn_Right_Press.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_On.png b/indra/newview/skins/default/textures/widgets/ComboButton_On.png Binary files differindex b42cc7542e..1d1ea1bd87 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_On.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_On.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png Binary files differindex bbc0657487..d87e46aba7 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png Binary files differindex b7b5c2e1d4..34b0c70cb0 100644 --- a/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png +++ b/indra/newview/skins/default/textures/widgets/ComboButton_UpSelected.png diff --git a/indra/newview/skins/default/textures/widgets/DropDown_On.png b/indra/newview/skins/default/textures/widgets/DropDown_On.png Binary files differindex 10262d3979..4a3c8c8e3a 100644 --- a/indra/newview/skins/default/textures/widgets/DropDown_On.png +++ b/indra/newview/skins/default/textures/widgets/DropDown_On.png diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Press.png b/indra/newview/skins/default/textures/widgets/DropDown_Press.png Binary files differindex 16cb25cc77..9d09871e58 100644 --- a/indra/newview/skins/default/textures/widgets/DropDown_Press.png +++ b/indra/newview/skins/default/textures/widgets/DropDown_Press.png diff --git a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png Binary files differindex 61f9b076ce..c01d50e6b9 100644 --- a/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png +++ b/indra/newview/skins/default/textures/widgets/Linden_Dollar_Background.png diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Over.png b/indra/newview/skins/default/textures/widgets/ListItem_Over.png Binary files differindex 4b2b9ab3e5..0ec8de776e 100644 --- a/indra/newview/skins/default/textures/widgets/ListItem_Over.png +++ b/indra/newview/skins/default/textures/widgets/ListItem_Over.png diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Select.png b/indra/newview/skins/default/textures/widgets/ListItem_Select.png Binary files differindex 317c672441..6dd7b3c638 100644 --- a/indra/newview/skins/default/textures/widgets/ListItem_Select.png +++ b/indra/newview/skins/default/textures/widgets/ListItem_Select.png diff --git a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png Binary files differindex fbc164123f..d76d1246fb 100644 --- a/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png +++ b/indra/newview/skins/default/textures/widgets/MarketplaceBtn_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/ProgressBar.png b/indra/newview/skins/default/textures/widgets/ProgressBar.png Binary files differindex 3f0e4eba28..492d9b6fc4 100644 --- a/indra/newview/skins/default/textures/widgets/ProgressBar.png +++ b/indra/newview/skins/default/textures/widgets/ProgressBar.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Off.png b/indra/newview/skins/default/textures/widgets/PushButton_Off.png Binary files differindex 1ee0329e66..c74cea62d3 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Off.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Off.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On.png b/indra/newview/skins/default/textures/widgets/PushButton_On.png Binary files differindex 661d1c5611..af65a960b6 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_On.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_On.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png Binary files differindex 48e8aa2eab..2e9097a7dc 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Over.png Binary files differindex c227f07513..34a64a3ade 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Over.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Over.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Press.png Binary files differindex 0a4a3a6ad9..4591305bff 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Press.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Press.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png Binary files differindex 0a4a3a6ad9..aa949c65cb 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Selected.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png Binary files differindex 661d1c5611..0b306d8816 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png Binary files differindex 48e8aa2eab..ca9870d078 100644 --- a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png +++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png Binary files differindex 77c4224539..7146900b30 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png Binary files differindex 8b93dd551e..8fffd72633 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png Binary files differindex 3f207cbea2..5e8f0d12b4 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png Binary files differindex 220df9db25..09d10e6feb 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png Binary files differindex dde367f05e..cdc4abb15c 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png Binary files differindex 1574f48b28..cee5d77931 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png Binary files differindex ab31f6ded7..237503fe32 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png Binary files differindex 1574f48b28..de081c2a4f 100644 --- a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png +++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png Binary files differindex cf0d8ee2c1..ff21034095 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png Binary files differindex fe3a7beafd..7349132503 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png Binary files differindex 133589b8a6..133845bdbc 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png Binary files differindex e83babc519..3dce7733c2 100644 --- a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png +++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Active.png Binary files differindex ca6daab4e0..66c3867b81 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Active.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Active.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png Binary files differindex 3d205a3f2e..baf747f581 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png diff --git a/indra/newview/skins/default/textures/widgets/TextField_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Off.png Binary files differindex 911d907acc..a35562f950 100644 --- a/indra/newview/skins/default/textures/widgets/TextField_Off.png +++ b/indra/newview/skins/default/textures/widgets/TextField_Off.png diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png Binary files differindex ee5979046f..f623b501e2 100644 --- a/indra/newview/skins/default/textures/widgets/buy_off.png +++ b/indra/newview/skins/default/textures/widgets/buy_off.png diff --git a/indra/newview/skins/default/textures/widgets/buy_over.png b/indra/newview/skins/default/textures/widgets/buy_over.png Binary files differindex 93adb68c86..25d4173242 100644 --- a/indra/newview/skins/default/textures/widgets/buy_over.png +++ b/indra/newview/skins/default/textures/widgets/buy_over.png diff --git a/indra/newview/skins/default/textures/widgets/buy_press.png b/indra/newview/skins/default/textures/widgets/buy_press.png Binary files differindex 3f442d6eaa..3195431c84 100644 --- a/indra/newview/skins/default/textures/widgets/buy_press.png +++ b/indra/newview/skins/default/textures/widgets/buy_press.png diff --git a/indra/newview/skins/default/textures/widgets/track_control_sphere.png b/indra/newview/skins/default/textures/widgets/track_control_sphere.png Binary files differindex a13b7725ea..6ba8d3877f 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_sphere.png +++ b/indra/newview/skins/default/textures/widgets/track_control_sphere.png diff --git a/indra/newview/skins/default/textures/windows/Inspector_I.png b/indra/newview/skins/default/textures/windows/Inspector_I.png Binary files differindex b4875fd638..82d650ef4b 100644 --- a/indra/newview/skins/default/textures/windows/Inspector_I.png +++ b/indra/newview/skins/default/textures/windows/Inspector_I.png diff --git a/indra/newview/skins/default/textures/windows/Resize_Corner.png b/indra/newview/skins/default/textures/windows/Resize_Corner.png Binary files differindex 16ed63e428..8cdcc1f99d 100644 --- a/indra/newview/skins/default/textures/windows/Resize_Corner.png +++ b/indra/newview/skins/default/textures/windows/Resize_Corner.png diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png Binary files differindex db253900af..04d1c05e2e 100644 --- a/indra/newview/skins/default/textures/windows/Window_Background.png +++ b/indra/newview/skins/default/textures/windows/Window_Background.png diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png Binary files differindex b81ec5b43c..d74db0de7e 100644 --- a/indra/newview/skins/default/textures/windows/Window_Foreground.png +++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png Binary files differdeleted file mode 100644 index a570ac06bd..0000000000 --- a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png Binary files differdeleted file mode 100644 index d573e8c69a..0000000000 --- a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_center.png b/indra/newview/skins/default/textures/windows/add_payment_image_center.png Binary files differindex b5459136cb..0b99a72f32 100644 --- a/indra/newview/skins/default/textures/windows/add_payment_image_center.png +++ b/indra/newview/skins/default/textures/windows/add_payment_image_center.png diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_left.png b/indra/newview/skins/default/textures/windows/add_payment_image_left.png Binary files differindex 7fb65e724a..a5b28d7023 100644 --- a/indra/newview/skins/default/textures/windows/add_payment_image_left.png +++ b/indra/newview/skins/default/textures/windows/add_payment_image_left.png diff --git a/indra/newview/skins/default/textures/windows/add_payment_image_right.png b/indra/newview/skins/default/textures/windows/add_payment_image_right.png Binary files differindex f1937b6318..5724d39744 100644 --- a/indra/newview/skins/default/textures/windows/add_payment_image_right.png +++ b/indra/newview/skins/default/textures/windows/add_payment_image_right.png diff --git a/indra/newview/skins/default/textures/windows/login_mp_logo.png b/indra/newview/skins/default/textures/windows/login_mp_logo.png Binary files differnew file mode 100644 index 0000000000..7526374ba2 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/login_mp_logo.png diff --git a/indra/newview/skins/default/textures/windows/login_mp_logo_small.png b/indra/newview/skins/default/textures/windows/login_mp_logo_small.png Binary files differnew file mode 100644 index 0000000000..779d8ff649 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/login_mp_logo_small.png diff --git a/indra/newview/skins/default/textures/world/NoEntryLines.png b/indra/newview/skins/default/textures/world/NoEntryLines.png Binary files differindex d7496b8bd0..b295ba1281 100644 --- a/indra/newview/skins/default/textures/world/NoEntryLines.png +++ b/indra/newview/skins/default/textures/world/NoEntryLines.png diff --git a/indra/newview/skins/default/textures/world/NoEntryPassLines.png b/indra/newview/skins/default/textures/world/NoEntryPassLines.png Binary files differindex e4b8fc6ae2..34900e2c02 100644 --- a/indra/newview/skins/default/textures/world/NoEntryPassLines.png +++ b/indra/newview/skins/default/textures/world/NoEntryPassLines.png diff --git a/indra/newview/skins/default/xui/da/language_settings.xml b/indra/newview/skins/default/xui/da/language_settings.xml index 0e3cbfd2d2..fd3fa6c6fd 100644 --- a/indra/newview/skins/default/xui/da/language_settings.xml +++ b/indra/newview/skins/default/xui/da/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">da_DK.UTF-8</string> <string name="DarwinLocale">da_DK.UTF-8</string> <string name="LinuxLocale">da_DK.UTF-8</string> + <string name="FreeBSDLocale">da_DK.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index e4f99d14e9..a7dff91311 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -5,7 +5,7 @@ that are returned from one component and may appear in many places--> <strings> <string name="CAPITALIZED_APP_NAME"> - SECOND LIFE + MEGAPAHIT </string> <string name="SUPPORT_SITE"> Second Life Support Portal @@ -429,7 +429,7 @@ Prøv venligst om lidt igen. Noter om version </string> <string name="RELEASE_NOTES_BASE_URL"> - https://releasenotes.secondlife.com/viewer/ + https://megapahit.net/ </string> <string name="LoadingData"> Henter... diff --git a/indra/newview/skins/default/xui/de/language_settings.xml b/indra/newview/skins/default/xui/de/language_settings.xml index f9346eef7d..912b30615e 100644 --- a/indra/newview/skins/default/xui/de/language_settings.xml +++ b/indra/newview/skins/default/xui/de/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">de_DE.UTF-8</string> <string name="DarwinLocale">de_DE.UTF-8</string> <string name="LinuxLocale">de_DE.UTF-8</string> + <string name="FreeBSDLocale">de_DE.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index a9e7626dc5..b147c49224 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1,8 +1,8 @@ <?xml version="1.0" ?> <strings> <string name="SECOND_LIFE">Second Life</string> - <string name="APP_NAME">Second Life</string> - <string name="CAPITALIZED_APP_NAME">SECOND LIFE</string> + <string name="APP_NAME">Megapahit</string> + <string name="CAPITALIZED_APP_NAME">MEGAPAHIT</string> <string name="SECOND_LIFE_GRID">Second Life-Grid:</string> <string name="SUPPORT_SITE">Second Life Support-Portal</string> <string name="StartupDetectingHardware">Hardware wird erfasst...</string> @@ -267,7 +267,7 @@ nächsten Eigentümer angehängt werden.</string> <string name="NoneFound">Nicht gefunden.</string> <string name="RetrievingData">Laden...</string> <string name="ReleaseNotes">Versionshinweise</string> - <string name="RELEASE_NOTES_BASE_URL">https://releasenotes.secondlife.com/viewer/</string> + <string name="RELEASE_NOTES_BASE_URL">https://megapahit.net/</string> <string name="LoadingData">Wird geladen...</string> <string name="AvatarNameNobody">(niemand)</string> <string name="AvatarNameWaiting">(wartet)</string> diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index ff2fa93cbb..5d51cbd682 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -2,7 +2,7 @@ <floater positioning="centered" legacy_header_height="18" - height="440" + height="520" layout="topleft" name="floater_about" help_topic="floater_about" @@ -14,7 +14,7 @@ follows="all" top="25" left="10" - height="405" + height="490" width="480" name="about_tab" tab_position="top"> @@ -27,7 +27,7 @@ parse_urls="true" follows="top|left" font="SansSerif" - height="343" + height="432" bg_readonly_color="Transparent" left="5" max_length="65536" @@ -46,17 +46,113 @@ </panel> <panel border="true" + has_border="true" label="Credits" help_topic="about_credits_tab" name="credits_panel"> + <accordion + fit_parent="false" + follows="all" + layout="topleft" + left="2" + name="credits_accordion" + single_expansion="true" + top="0" + right="-1"> + <accordion_tab + expanded="true" + fit_panel="false" + layout="topleft" + name="mp_credits_tab" + title="Megapahit"> + <panel + border="false" + follows="all" + left="10" + name="megapahit_credits_panel" + height="295" + top="10"> <text follows="top|left|right" + font.style="BOLD" + height="10" + layout="topleft" + left="5" + top="0" + width="435" + wrap="true"> +Megapahit is brought to you by (in order of appearance): + </text> + <text_editor + enabled="false" + follows="top|left" + height="70" + bg_readonly_color="Transparent" + left="5" + text_color="LtGray" + max_length="65536" + top_pad="5" + width="545" + word_wrap="true"> +Erik Kundiman +observeur +Secret Foxtail + </text_editor> + <text + follows="top|left" + font.style="BOLD" + height="10" + layout="topleft" + left="5" + top_pad="5" + width="465" + wrap="true"> +with special thanks to (in order of appearance): + </text> +<text_editor + enabled="false" + follows="top|left" + height="130" + bg_readonly_color="Transparent" + left="5" + text_color="LtGray" + max_length="65536" + name="megapahit_contributors" + top_pad="5" + width="450" + word_wrap="true"> +LinneNoir for the moral support and initial testing; +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; +Kokua for the Dullahan fork; +Soft Linden for the security testing; +Kyle Linden for selling TPV parcel 2 to Erik Kundiman at L$0 price; and +Fritigern Gothly for the administrative support. + </text_editor> + </panel> + </accordion_tab> + <accordion_tab + expanded="true" + fit_panel="false" + layout="topleft" + name="sl_credits_tab" + title="Second Life"> + <panel + border="false" + follows="all" + left="10" + name="sl_credits_panel" + height="500" + top="10"> + <text + follows="top|left|right" + font.style="BOLD" height="20" layout="topleft" left="5" name="linden_intro" - top="10" - width="465" + top="0" + width="365" wrap="true"> Second Life is brought to you by the Lindens, with open source contributions from: @@ -64,18 +160,21 @@ with open source contributions from: <text_editor enabled="false" follows="top|left" - height="340" + height="375" bg_readonly_color="Transparent" left="5" text_color="LtGray" max_length="65536" name="contrib_names" top_pad="10" - width="465" + width="415" word_wrap="true"> Dummy Name replaced at run time </text_editor> </panel> + </accordion_tab> +</accordion> + </panel> <panel border="true" label="Licenses" @@ -93,35 +192,26 @@ Dummy Name replaced at run time top="5" width="465" word_wrap="true"> - 3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion APR Copyright (C) 2011 The Apache Software Foundation Collada DOM Copyright 2006 Sony Computer Entertainment Inc. cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se) - DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg. GL Copyright (C) 1999-2004 Brian Paul. - google-perftools Copyright (c) 2005, Google Inc. - Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. - jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. meshoptimizer Copyright (c) 2016-2021 Arseny Kapoulkine ogg/vorbis Copyright (C) 2002, Xiphophorus OpenSSL Copyright (C) 1998-2008 The OpenSSL Project. PCRE Copyright (c) 1997-2012 University of Cambridge - SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga + SDL Copyright (C) 1997-2024 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. xxHash Copyright (C) 2012-2020 Yann Collet. zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler. - Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details. - This software contains source code provided by NVIDIA Corporation. All rights reserved. See licenses.txt for details. - - Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C) </text_editor> </panel> </tab_container> diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 738d448f00..412c8febdc 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -290,8 +290,8 @@ font="SansSerifSmall" height="20" is_expandable="true" - text_tentative_color="TextFgTentativeColor" - bg_writeable_color="ScriptBackground" + bg_alpha_color="Transparent" + background_visible="false" name="chat_editor" max_length="1023" spellcheck="true" diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index eba5684819..5e7af80e42 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -50,6 +50,7 @@ Mini-map </floater.string> <net_map + bg_color="Transparent" follows="top|left|bottom|right" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index e43143c8c3..c88e4163be 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1194,7 +1194,7 @@ even though the user gets a free copy. follows="left|top" layout="topleft" mouse_opaque="false" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray" name="perms_build" left="0" diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 7efa81d263..df12b8f58a 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -54,7 +54,7 @@ layout="topleft" left_pad="-29" name="expand_btn_panel" - background_visible="true" + background_visible="false" bg_opaque_color="FloaterFocusBackgroundColor" bg_alpha_color="FloaterDefaultBackgroundColor" background_opaque="true" @@ -86,7 +86,7 @@ width="238" follows="right|top" top="6" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray2"> <text text_color="White" @@ -429,7 +429,7 @@ height="22" top_pad="0" width="238" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray2" name="layout_panel_3"> <text @@ -570,7 +570,7 @@ </button> <scroll_list draw_stripes="false" - bg_writeable_color="MouseGray" + bg_writeable_color="Transparent" follows="all" height="145" layout="topleft" @@ -697,7 +697,7 @@ height="22" top_pad="0" width="238" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray2" name="layout_panel_5"> <text diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml index dd521c09d0..24e58c9936 100644 --- a/indra/newview/skins/default/xui/en/language_settings.xml +++ b/indra/newview/skins/default/xui/en/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">C</string> <string name="DarwinLocale">C</string> <string name="LinuxLocale">C</string> + <string name="FreeBSDLocale">C</string> <!-- Note: for plural nouns, see strings.xml. For example: AgeYearsA = singular, diff --git a/indra/newview/skins/default/xui/en/mime_types_linux.xml b/indra/newview/skins/default/xui/en/mime_types_linux.xml index d0ecd0a11c..e5c33809c8 100644 --- a/indra/newview/skins/default/xui/en/mime_types_linux.xml +++ b/indra/newview/skins/default/xui/en/mime_types_linux.xml @@ -7,7 +7,7 @@ none </defaultwidget> <defaultimpl> - media_plugin_webkit + media_plugin_cef </defaultimpl> <widgetset name="web"> <label name="web_label"> @@ -141,7 +141,7 @@ none </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="none/none"> @@ -152,7 +152,7 @@ none </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="audio/*"> @@ -185,7 +185,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="video/vnd.secondlife.qt.legacy"> @@ -207,7 +207,7 @@ web </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="application/ogg"> @@ -229,7 +229,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="application/postscript"> @@ -240,7 +240,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="application/rtf"> @@ -251,7 +251,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="application/smil"> @@ -262,7 +262,7 @@ movie </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="application/xhtml+xml"> @@ -273,7 +273,7 @@ web </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="application/x-director"> @@ -284,7 +284,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="audio/mid"> @@ -339,7 +339,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="image/gif"> @@ -350,7 +350,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="image/jpeg"> @@ -361,7 +361,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="image/png"> @@ -372,7 +372,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="image/svg+xml"> @@ -383,7 +383,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="image/tiff"> @@ -394,7 +394,7 @@ image </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="text/html"> @@ -405,7 +405,7 @@ web </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="text/plain"> @@ -416,7 +416,7 @@ text </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype name="text/xml"> @@ -427,7 +427,7 @@ text </widgettype> <impl> - media_plugin_webkit + media_plugin_cef </impl> </mimetype> <mimetype menu="1" name="video/mpeg"> diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index ad9dbd1156..da900c783b 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel -background_visible="true" +background_visible="false" follows="all" height="570" label="Group Profile" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index af68bd7fee..e25145dd2a 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - background_visible="true" + background_visible="false" follows="all" height="570" layout="topleft" @@ -83,7 +83,7 @@ value="Place Profile" width="280" /> <scroll_container - color="DkGray2" + color="Transparent" follows="all" height="534" layout="topleft" @@ -93,7 +93,7 @@ top_pad="9" width="324"> <panel - bg_alpha_color="DkGray2" + bg_alpha_color="Transparent" follows="left|top|right" height="654" layout="topleft" @@ -280,8 +280,8 @@ <line_editor text_readonly_color="white" enabled="false" - use_bg_color="true" - bg_color="DkGray0" + use_bg_color="false" + bg_color="Transparent" follows="left|top|right" height="22" layout="topleft" @@ -322,7 +322,7 @@ value="My notes:" width="290" /> <text_editor - bg_readonly_color="DkGray0" + bg_readonly_color="Transparent" follows="all" height="75" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 1801ae1f49..f57b0d4825 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -6,7 +6,7 @@ name="panel_login" focus_root="true" background_visible="true" - bg_opaque_color="0.16 0.16 0.16 1" + bg_opaque_color="0.0 0.0 0.0 1" background_opaque="true" width="1024"> <panel.string @@ -41,7 +41,7 @@ <icon height="73" width="165" - image_name="login_sl_logo" + image_name="login_mp_logo" left="0" top="25" name="sl_logo_small" /> diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml index c906e2f96c..5e823c7b2f 100644 --- a/indra/newview/skins/default/xui/en/panel_login_first.xml +++ b/indra/newview/skins/default/xui/en/panel_login_first.xml @@ -6,7 +6,7 @@ name="panel_login" focus_root="true" background_visible="true" - bg_opaque_color="0.16 0.16 0.16 1" + bg_opaque_color="0.0 0.0 0.0 1" background_opaque="true" width="1024"> <panel.string @@ -61,7 +61,7 @@ height="105"> <icon height="94" - image_name="login_sl_logo" + image_name="login_mp_logo" left="0" name="sl_logo" top="0" /> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 85cf4419a3..95787c16c5 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - background_opaque="true" - background_visible="true" + background_opaque="false" + background_visible="false" bg_opaque_color="MouseGray" follows="left|top|right" height="34" @@ -19,18 +19,18 @@ left="0" top="0" height="34" - width="600"/> + width="800"/> <icon follows="all" image_name="NavBar_BG_NoFav_Bevel" mouse_opaque="false" name="bg_icon_no_fav_bevel" scale_image="true" - visible="false" + visible="true" left="0" top="0" height="34" - width="600"/> + width="800"/> <icon follows="all" image_name="NavBar_BG_NoNav_Bevel" @@ -41,7 +41,7 @@ left="0" top="0" height="34" - width="600"/> + width="800"/> <icon follows="all" image_name="NavBar Separator" diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index a0e3344304..dc8ac425b6 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Side tray Outfit Edit panel --> <panel - background_visible="true" + background_visible="false" border="false" height="600" follows="all" @@ -87,8 +87,8 @@ <!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" --> <panel - background_visible="true" - bg_alpha_color="DkGray2" + background_visible="false" + bg_alpha_color="MouseGray" bevel_style="none" follows="top|left|right" height="40" @@ -360,7 +360,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap <!-- BUTTON BAR --> <panel - background_visible="true" + background_visible="false" bevel_style="none" follows="bottom|left|right" height="27" @@ -407,7 +407,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap <!-- BUTTON BAR - WEARABLES ADDING MODE --> <panel - background_visible="true" + background_visible="false" bevel_style="none" follows="left|right|bottom" height="27" diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml index 6bd491f7a3..6166268206 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - background_visible="true" + background_visible="false" bg_alpha_color="DkGray" border="false" follows="all" @@ -46,7 +46,7 @@ top_pad="0"> </scroll_container> <panel - background_visible="true" + background_visible="false" follows="bottom|left|right" height="28" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index d58c2ec2e9..8e21b4d5fe 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="Outfits" - bg_alpha_color="DkGray" - bg_opaque_color="DkGray" - background_opaque="true" - background_visible="true" + bg_alpha_color="MouseGray" + bg_opaque_color="MouseGray" + background_opaque="false" + background_visible="false" follows="all" height="575" label="Things" @@ -37,7 +37,7 @@ filename="panel_outfit_gallery.xml" height="520" name="outfit_gallery_tab" - background_visible="true" + background_visible="false" help_topic="outfit_gallery_tab" follows="all" label="OUTFIT GALLERY" @@ -48,15 +48,15 @@ filename="panel_outfits_list.xml" height="520" name="outfitslist_tab" - background_visible="true" + background_visible="false" help_topic="my_outfits_tab" follows="all" label="MY OUTFITS" layout="topleft" width="315" /> <panel - background_visible="true" - bg_alpha_color="DkGray" + background_visible="false" + bg_alpha_color="MouseGray" class="panel_wearing" filename="panel_outfits_wearing.xml" follows="all" @@ -69,7 +69,7 @@ </tab_container> <panel - background_visible="true" + background_visible="false" follows="bottom|left|right" height="27" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml index 9281a21fbf..e8d8e8f3e2 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - background_visible="true" + background_visible="false" bg_alpha_color="DkGray" border="false" follows="all" @@ -11,7 +11,7 @@ top="0" width="312"> <accordion - background_visible="true" + background_visible="false" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" @@ -31,7 +31,7 @@ value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]"/> </accordion> <panel - background_visible="true" + background_visible="false" follows="bottom|left|right" height="28" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml index a486c03ac7..559917ec0a 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - background_visible="true" + background_visible="false" bg_alpha_color="DkGray" follows="all" height="430" @@ -22,7 +22,7 @@ single_expansion="true" top="0" name="wearables_accordion" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray2" width="309"> <accordion_tab @@ -63,7 +63,7 @@ </accordion_tab> </accordion> <panel - background_visible="true" + background_visible="false" follows="bottom|left|right" height="28" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 8f5292c531..9aa0907a38 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel - background_visible="true" + background_visible="false" follows="all" height="610" layout="topleft" @@ -188,17 +188,18 @@ value="Place Profile" width="280" /> <scroll_container - color="DkGray2" + color="Transparent" follows="all" height="575" layout="topleft" left="9" name="place_scroll" - opaque="true" + opaque="false" top_pad="9" width="324"> <panel - bg_alpha_color="DkGray2" + bg_alpha_color="Transparent" + background_visible="false" follows="left|top|right|bottom" height="597" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index a3a2f7c47e..4d9a03823e 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel -background_visible="true" +background_visible="false" default_tab_group="1" follows="all" height="570" diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 4501e0df3a..dbc181855f 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -185,4 +185,20 @@ top="2" name="volume_btn" width="16" /> + <text + type="string" + font="SansSerif" + text_color="FpsTextColor" + follows="right|top" + halign="center" + valign="center" + height="18" + top="1" + v_pad="0" + left_pad="0" + name="FpsText" + tool_tip="fps" + width="40"> + 60 + </text> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index c898b0989e..c03fac4aad 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel -background_visible="true" +background_visible="false" default_tab_group="1" follows="all" height="570" @@ -25,8 +25,8 @@ width="333"> name="Changing outfits" value="Changing outfits" /> <panel - background_opaque="true" - background_visible="true" + background_opaque="false" + background_visible="false" bg_opaque_color="DkGray2" left="10" top="5" diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 45bc73a0b7..471886aa0d 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -93,7 +93,7 @@ name="properties_panel" top="45" width="313" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray2"> <text type="string" @@ -299,7 +299,7 @@ follows="left|top" layout="topleft" mouse_opaque="false" - background_visible="true" + background_visible="false" bg_alpha_color="DkGray" name="perms_inv" left="0" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index bee58da6b0..1bc8ddc626 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -7,8 +7,8 @@ <!-- Default Args - these arguments will be replaced in all strings --> <string name="SECOND_LIFE">Second Life</string> - <string name="APP_NAME">Second Life</string> - <string name="CAPITALIZED_APP_NAME">SECOND LIFE</string> + <string name="APP_NAME">Megapahit</string> + <string name="CAPITALIZED_APP_NAME">MEGAPAHIT</string> <string name="SECOND_LIFE_GRID">Second Life Grid</string> <string name="SUPPORT_SITE">Second Life Support Portal</string> @@ -333,7 +333,7 @@ are allowed. <string name="ReleaseNotes">Release Notes</string> <!-- Always mark translate="false" for strings that are nothing but URLs, as they don't need translation. --> - <string name="RELEASE_NOTES_BASE_URL" translate="false">https://releasenotes.secondlife.com/viewer/</string> + <string name="RELEASE_NOTES_BASE_URL" translate="false">https://megapahit.net/</string> <!-- Indicates something is being loaded. Maybe should be merged with RetrievingData --> <string name="LoadingData">Loading...</string> diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 8345911525..51852dd6dd 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -9,9 +9,9 @@ read_only="false"> <button_panel name="button_panel" bg_opaque_image="Rounded_Rect" - background_visible="true" + background_visible="false" bg_opaque_image_overlay="MouseGray" - background_opaque="true"/> + background_opaque="false"/> <button_icon_and_text imgoverlay_label_space="7" label_color_selected="White" halign="left" diff --git a/indra/newview/skins/default/xui/es/language_settings.xml b/indra/newview/skins/default/xui/es/language_settings.xml index 997293a741..c345ad73ad 100644 --- a/indra/newview/skins/default/xui/es/language_settings.xml +++ b/indra/newview/skins/default/xui/es/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">es_ES.UTF-8</string> <string name="DarwinLocale">es_ES.UTF-8</string> <string name="LinuxLocale">es_ES.UTF-8</string> + <string name="FreeBSDLocale">es_ES.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index cd8e7687ae..c6c0e9e77d 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <strings> - <string name="CAPITALIZED_APP_NAME">SECOND LIFE</string> + <string name="CAPITALIZED_APP_NAME">MEGAPAHIT</string> <string name="SUPPORT_SITE">Portal de Soporte de Second Life</string> <string name="StartupDetectingHardware">Identificando el hardware...</string> <string name="StartupLoading">Instalando [APP_NAME]...</string> @@ -265,7 +265,7 @@ pueden adjuntarse a las notas.</string> <string name="NoneFound">No se ha encontrado.</string> <string name="RetrievingData">Reintentando...</string> <string name="ReleaseNotes">Notas de la versión</string> - <string name="RELEASE_NOTES_BASE_URL">https://releasenotes.secondlife.com/viewer/</string> + <string name="RELEASE_NOTES_BASE_URL">https://megapahit.net/</string> <string name="LoadingData">Cargando...</string> <string name="AvatarNameNobody">(nadie)</string> <string name="AvatarNameWaiting">(esperando)</string> diff --git a/indra/newview/skins/default/xui/fr/language_settings.xml b/indra/newview/skins/default/xui/fr/language_settings.xml index fdac9d65a7..0dc61fc258 100644 --- a/indra/newview/skins/default/xui/fr/language_settings.xml +++ b/indra/newview/skins/default/xui/fr/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">fr_FR.UTF-8</string> <string name="DarwinLocale">fr_FR.UTF-8</string> <string name="LinuxLocale">fr_FR.UTF-8</string> + <string name="FreeBSDLocale">fr_FR.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 0a3fbeb603..737b570e98 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -1,8 +1,8 @@ <?xml version="1.0" ?> <strings> <string name="SECOND_LIFE">Second Life</string> - <string name="APP_NAME">Second Life</string> - <string name="CAPITALIZED_APP_NAME">SECOND LIFE</string> + <string name="APP_NAME">Megapahit</string> + <string name="CAPITALIZED_APP_NAME">MEGAPAHIT</string> <string name="SECOND_LIFE_GRID">Grille de Second Life</string> <string name="SUPPORT_SITE">Portail Assistance Second Life</string> <string name="StartupDetectingHardware">Détection du matériel...</string> @@ -268,7 +268,7 @@ peuvent être joints aux notes.</string> <string name="NoneFound">Aucun résultat.</string> <string name="RetrievingData">En cours d'extraction...</string> <string name="ReleaseNotes">Notes de version</string> - <string name="RELEASE_NOTES_BASE_URL">https://releasenotes.secondlife.com/viewer/</string> + <string name="RELEASE_NOTES_BASE_URL">https://megapahit.net/</string> <string name="LoadingData">Chargement...</string> <string name="AvatarNameNobody">(personne)</string> <string name="AvatarNameWaiting">(en attente)</string> diff --git a/indra/newview/skins/default/xui/it/language_settings.xml b/indra/newview/skins/default/xui/it/language_settings.xml index 5f448fa828..205ee3dbef 100644 --- a/indra/newview/skins/default/xui/it/language_settings.xml +++ b/indra/newview/skins/default/xui/it/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">it_IT.UTF-8</string> <string name="DarwinLocale">it_IT.UTF-8</string> <string name="LinuxLocale">it_IT.UTF-8</string> + <string name="FreeBSDLocale">it_IT.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 178bb90ca6..69381ef00e 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -1,8 +1,8 @@ <?xml version="1.0" ?> <strings> <string name="SECOND_LIFE">Second Life</string> - <string name="APP_NAME">Second Life</string> - <string name="CAPITALIZED_APP_NAME">SECOND LIFE</string> + <string name="APP_NAME">Megapahit</string> + <string name="CAPITALIZED_APP_NAME">MEGAPAHIT</string> <string name="SUPPORT_SITE">Portale di supporto di Second Life</string> <string name="StartupDetectingHardware">Ricerca hardware...</string> <string name="StartupLoading">Caricamento di [APP_NAME]...</string> @@ -266,7 +266,7 @@ possono essere allegati ai biglietti.</string> <string name="NoneFound">Nessun risultato.</string> <string name="RetrievingData">Recupero dati in corso...</string> <string name="ReleaseNotes">Note sulla versione</string> - <string name="RELEASE_NOTES_BASE_URL">https://releasenotes.secondlife.com/viewer/</string> + <string name="RELEASE_NOTES_BASE_URL">https://megapahit.net/</string> <string name="LoadingData">In caricamento...</string> <string name="AvatarNameNobody">(nessuno)</string> <string name="AvatarNameWaiting">(in attesa)</string> diff --git a/indra/newview/skins/default/xui/ja/language_settings.xml b/indra/newview/skins/default/xui/ja/language_settings.xml index facae22acf..c6f9ae3e26 100644 --- a/indra/newview/skins/default/xui/ja/language_settings.xml +++ b/indra/newview/skins/default/xui/ja/language_settings.xml @@ -12,6 +12,9 @@ <string name="LinuxLocale"> ja_JP.UTF-8 </string> + <string name="FreeBSDLocale"> + ja_JP.UTF-8 + </string> <string name="TimeHour"> hour,datetime,slt </string> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index fa6c329fe7..d04c514322 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -4,10 +4,10 @@ Second Life </string> <string name="APP_NAME"> - Second Life + Megapahit </string> <string name="CAPITALIZED_APP_NAME"> - SECOND LIFE + MEGAPAHIT </string> <string name="SECOND_LIFE_GRID"> Second Lifeグリッド @@ -617,7 +617,7 @@ support@secondlife.com にお問い合わせください。 リリースノート </string> <string name="RELEASE_NOTES_BASE_URL" translate="false"> - https://releasenotes.secondlife.com/viewer/ + https://megapahit.net/ </string> <string name="LoadingData"> 読み込んでいます… diff --git a/indra/newview/skins/default/xui/pl/language_settings.xml b/indra/newview/skins/default/xui/pl/language_settings.xml index 0057ca530c..b84d817aa5 100644 --- a/indra/newview/skins/default/xui/pl/language_settings.xml +++ b/indra/newview/skins/default/xui/pl/language_settings.xml @@ -4,6 +4,7 @@ <string name="MacLocale">pl_PL.UTF-8</string> <string name="DarwinLocale">pl_PL.UTF-8</string> <string name="LinuxLocale">pl_PL.UTF-8</string> + <string name="FreeBSDLocale">pl_PL.UTF-8</string> <string name="TimeHour">hour,datetime,slt</string> <string name="TimeMin">min,datetime,slt</string> <string name="TimeSec">second,datetime,slt</string> diff --git a/indra/newview/skins/default/xui/pt/language_settings.xml b/indra/newview/skins/default/xui/pt/language_settings.xml index 8799475ace..e31af58455 100644 --- a/indra/newview/skins/default/xui/pt/language_settings.xml +++ b/indra/newview/skins/default/xui/pt/language_settings.xml @@ -7,6 +7,7 @@ <string name="MacLocale">pt_PT.UTF-8</string> <string name="DarwinLocale">pt_PT.UTF-8</string> <string name="LinuxLocale">pt_PT.UTF-8</string> + <string name="FreeBSDLocale">pt_PT.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 6db5da2e89..0b12dd2aa0 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <strings> - <string name="CAPITALIZED_APP_NAME">SECOND LIFE</string> + <string name="CAPITALIZED_APP_NAME">MEGAPAHIT</string> <string name="SUPPORT_SITE">Portal de Supporte Second Life</string> <string name="StartupDetectingHardware">Detectando hardware...</string> <string name="StartupLoading">Carregando [APP_NAME]...</string> @@ -230,7 +230,7 @@ ser anexado às anotações.</string> <string name="NoneFound">Não encontrado.</string> <string name="RetrievingData">Buscando...</string> <string name="ReleaseNotes">Notas de versão</string> - <string name="RELEASE_NOTES_BASE_URL">https://releasenotes.secondlife.com/viewer/</string> + <string name="RELEASE_NOTES_BASE_URL">https://megapahit.net/</string> <string name="LoadingData">Carregando...</string> <string name="AvatarNameNobody">(ninguém)</string> <string name="AvatarNameWaiting">(aguardando)</string> diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 61d836a2d1..649d5e7107 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -8,10 +8,10 @@ Second Life </string> <string name="APP_NAME"> - Second Life + Megapahit </string> <string name="CAPITALIZED_APP_NAME"> - SECOND LIFE + MEGAPAHIT </string> <string name="SECOND_LIFE_GRID"> Сетка Second Life diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index e709a4c5d6..f80d8e3382 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -8,10 +8,10 @@ Second Life </string> <string name="APP_NAME"> - Second Life + Megapahit </string> <string name="CAPITALIZED_APP_NAME"> - SECOND LIFE + MEGAPAHIT </string> <string name="SECOND_LIFE_GRID"> Second Life Ağı diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 37dee9ac1d..8359fc5cf9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1191,6 +1191,381 @@ class Darwin_x86_64_Manifest(ViewerManifest): self.set_github_output_path('viewer_app', tarpath) +class Darwin_arm64_Manifest(ViewerManifest): + build_data_json_platform = 'mac' + address_size = 64 + + def finish_build_data_dict(self, build_data_dict): + build_data_dict.update({'Bundle Id':self.args['bundleid']}) + return build_data_dict + + def is_packaging_viewer(self): + # darwin requires full app bundle packaging even for debugging. + return True + + def is_rearranging(self): + # That said, some stuff should still only be performed once. + # Are either of these actions in 'actions'? Is the set intersection + # non-empty? + return bool(set(["package", "unpacked"]).intersection(self.args['actions'])) + + def construct(self): + # copy over the build result (this is a no-op if run within the xcode + # script) + self.path(os.path.join(self.args['configuration'], self.channel() + ".app"), dst="") + + pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') + relpkgdir = os.path.join(pkgdir, "lib", "release") + debpkgdir = os.path.join(pkgdir, "lib", "debug") + + with self.prefix(src="", dst="Contents"): # everything goes in Contents + bugsplat_db = self.args.get('bugsplat') + if bugsplat_db: + # Inject BugsplatServerURL into Info.plist if provided. + Info_plist = self.dst_path_of("Info.plist") + with open(Info_plist, 'rb') as f: + Info = plistlib.load(f) + # https://www.bugsplat.com/docs/platforms/os-x#configuration + Info["BugsplatServerURL"] = \ + "https://{}.bugsplat.com/".format(bugsplat_db) + self.put_in_file( + plistlib.dumps(Info), + os.path.basename(Info_plist), + "Info.plist") + + # CEF framework goes inside Contents/Frameworks. + # Remember where we parked this car. + with self.prefix(src="", dst="Frameworks"): + CEF_framework = "Chromium Embedded Framework.framework" + self.path2basename(relpkgdir, CEF_framework) + CEF_framework = self.dst_path_of(CEF_framework) + + if self.args.get('bugsplat'): + self.path2basename(relpkgdir, "BugsplatMac.framework") + + with self.prefix(dst="MacOS"): + executable = self.dst_path_of(self.channel()) + if self.args.get('bugsplat'): + # According to Apple Technical Note TN2206: + # https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG207 + # "If an app uses @rpath or an absolute path to link to a + # dynamic library outside of the app, the app will be + # rejected by Gatekeeper. ... Neither the codesign nor the + # spctl tool will show the error." + # (Thanks, Apple. Maybe fix spctl to warn?) + # The BugsplatMac framework embeds @rpath, which is + # causing scary Gatekeeper popups at viewer start. Work + # around this by changing the reference baked into our + # viewer. The install_name_tool -change option needs the + # previous value. Instead of guessing -- which might + # silently be defeated by a BugSplat SDK update that + # changes their baked-in @rpath -- ask for the path + # stamped into the framework. + # Let exception, if any, propagate -- if this doesn't + # work, we need the build to noisily fail! + oldpath = subprocess.check_output( + ['objdump', '--macho', '--dylib-id', '--non-verbose', + os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")], + text=True + ).splitlines()[-1] # take the last line of output + self.run_command( + ['install_name_tool', '-change', oldpath, + '@executable_path/../Frameworks/BugsplatMac.framework/BugsplatMac', + executable]) + + # NOTE: the -S argument to strip causes it to keep + # enough info for annotated backtraces (i.e. function + # names in the crash log). 'strip' with no arguments + # yields a slightly smaller binary but makes crash + # logs mostly useless. This may be desirable for the + # final release. Or not. + if ("package" in self.args['actions'] or + "unpacked" in self.args['actions']): + self.run_command( + ['strip', '-S', executable]) + + with self.prefix(dst="Resources"): + # defer cross-platform file copies until we're in the + # nested Resources directory + super().construct() + + # need .icns file referenced by Info.plist + with self.prefix(src=self.icon_path(), dst="") : + self.path("secondlife.icns") + + # Copy in the updater script and helper modules + self.path(src=os.path.join(pkgdir, 'VMP'), dst="updater") + + with self.prefix(src="", dst=os.path.join("updater", "icons")): + self.path2basename(self.icon_path(), "secondlife.ico") + with self.prefix(src="vmp_icons", dst=""): + self.path("*.png") + self.path("*.gif") + + with self.prefix(src=relpkgdir, dst=""): + self.path("libndofdev.dylib") + self.path("libhunspell-*.dylib") + + with self.prefix(src_dst="cursors_mac"): + self.path("*.tif") + + self.path("licenses-mac.txt", dst="licenses.txt") + self.path("featuretable_mac.txt") + self.path("cube.dae") + self.path("SecondLife.nib") + + with self.prefix(src=pkgdir,dst=""): + self.path("ca-bundle.crt") + + # Translations + self.path("English.lproj/language.txt") + self.replace_in(src="English.lproj/InfoPlist.strings", + dst="English.lproj/InfoPlist.strings", + searchdict={'%%VERSION%%':'.'.join(self.args['version'])} + ) + self.path("German.lproj") + self.path("Japanese.lproj") + self.path("Korean.lproj") + self.path("da.lproj") + self.path("es.lproj") + self.path("fr.lproj") + self.path("hu.lproj") + self.path("it.lproj") + self.path("nl.lproj") + self.path("pl.lproj") + self.path("pt.lproj") + self.path("ru.lproj") + self.path("tr.lproj") + self.path("uk.lproj") + self.path("zh-Hans.lproj") + + def path_optional(src, dst): + """ + For a number of our self.path() calls, not only do we want + to deal with the absence of src, we also want to remember + which were present. Return either an empty list (absent) + or a list containing dst (present). Concatenate these + return values to get a list of all libs that are present. + """ + # This was simple before we started needing to pass + # wildcards. Fortunately, self.path() ends up appending a + # (source, dest) pair to self.file_list for every expanded + # file processed. Remember its size before the call. + oldlen = len(self.file_list) + try: + self.path(src, dst) + # The dest appended to self.file_list has been prepended + # with self.get_dst_prefix(). Strip it off again. + added = [os.path.relpath(d, self.get_dst_prefix()) + for s, d in self.file_list[oldlen:]] + except MissingError as err: + print("Warning: "+err.msg, file=sys.stderr) + added = [] + if not added: + print("Skipping %s" % dst) + return added + + # dylibs is a list of all the .dylib files we expect to need + # in our bundled sub-apps. For each of these we'll create a + # symlink from sub-app/Contents/Resources to the real .dylib. + # Need to get the llcommon dll from any of the build directories as well. + libfile_parent = self.get_dst_prefix() + dylibs=[] + for libfile in ( + "libapr-1.0.dylib", + "libaprutil-1.0.dylib", + "libexpat.1.dylib", + # libnghttp2.dylib is a symlink to + # libnghttp2.major.dylib, which is a symlink to + # libnghttp2.version.dylib. Get all of them. + "libnghttp2.*dylib", + "liburiparser.*dylib", + ): + dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) + + # SLVoice executable + with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')): + self.path("SLVoice") + + # Vivox libraries + for libfile in ( + 'libortp.dylib', + 'libvivoxsdk.dylib', + ): + self.path2basename(relpkgdir, libfile) + + # Fmod studio dylibs (vary based on configuration) + if self.args['fmodstudio'] == 'ON': + if self.args['buildtype'].lower() == 'debug': + for libfile in ( + "libfmodL.dylib", + ): + dylibs += path_optional(os.path.join(debpkgdir, libfile), libfile) + else: + for libfile in ( + "libfmod.dylib", + ): + dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) + + # our apps + executable_path = {} + embedded_apps = [ (os.path.join("llplugin", "slplugin"), "SLPlugin.app") ] + for app_bld_dir, app in embedded_apps: + self.path2basename(os.path.join(os.pardir, + app_bld_dir, self.args['configuration']), + app) + executable_path[app] = \ + self.dst_path_of(os.path.join(app, "Contents", "MacOS")) + + # our apps dependencies on shared libs + # for each app, for each dylib we collected in dylibs, + # create a symlink to the real copy of the dylib. + with self.prefix(dst=os.path.join(app, "Contents", "Resources")): + for libfile in dylibs: + self.relsymlinkf(os.path.join(libfile_parent, libfile)) + + # Dullahan helper apps go inside SLPlugin.app + with self.prefix(dst=os.path.join( + "SLPlugin.app", "Contents", "Frameworks")): + + frameworkname = 'Chromium Embedded Framework' + + # This code constructs a relative symlink from the + # target framework folder back to the real CEF framework. + # It needs to be relative so that the symlink still works when + # (as is normal) the user moves the app bundle out of the DMG + # and into the /Applications folder. Note we pass catch=False, + # letting the uncaught exception terminate the process, since + # without this symlink, Second Life web media can't possibly work. + + # It might seem simpler just to symlink Frameworks back to + # the parent of Chromimum Embedded Framework.framework. But + # that would create a symlink cycle, which breaks our + # packaging step. So make a symlink from Chromium Embedded + # Framework.framework to the directory of the same name, which + # is NOT an ancestor of the symlink. + + # from SLPlugin.app/Contents/Frameworks/Chromium Embedded + # Framework.framework back to + # $viewer_app/Contents/Frameworks/Chromium Embedded Framework.framework + SLPlugin_framework = self.relsymlinkf(CEF_framework, catch=False) + + # for all the multiple CEF/Dullahan (as of CEF 76) helper app bundles we need: + for helper in ( + "DullahanHelper", + "DullahanHelper (GPU)", + "DullahanHelper (Renderer)", + "DullahanHelper (Plugin)", + ): + # app is the directory name of the app bundle, with app/Contents/MacOS/helper as the executable + app = helper + ".app" + + # copy DullahanHelper.app + self.path2basename(relpkgdir, app) + + # and fix that up with a Frameworks/CEF symlink too + with self.prefix(dst=os.path.join( + app, 'Contents', 'Frameworks')): + # from Dullahan Helper *.app/Contents/Frameworks/Chromium Embedded + # Framework.framework back to + # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework + # Since SLPlugin_framework is itself a + # symlink, don't let relsymlinkf() resolve -- + # explicitly call relpath(symlink=True) and + # create that symlink here. + helper_framework = \ + self.symlinkf(self.relpath(SLPlugin_framework, symlink=True), catch=False) + + # change_command includes install_name_tool, the + # -change subcommand and the old framework rpath + # stamped into the executable. To use it with + # run_command(), we must still append the new + # framework path and the pathname of the + # executable to change. + change_command = [ + 'install_name_tool', '-change', + '@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework'] + + with self.prefix(dst=os.path.join( + app, 'Contents', 'MacOS')): + # Now self.get_dst_prefix() is, at runtime, + # @executable_path. Locate the helper app + # framework (which is a symlink) from here. + newpath = os.path.join( + '@executable_path', + self.relpath(helper_framework, symlink=True), + frameworkname) + # and restamp the Dullahan Helper executable itself + self.run_command( + change_command + + [newpath, self.dst_path_of(helper)]) + + # SLPlugin plugins + with self.prefix(dst="llplugin"): + dylibexecutable = 'media_plugin_cef.dylib' + self.path2basename("../media_plugins/cef/" + self.args['configuration'], + dylibexecutable) + + # Do this install_name_tool *after* media plugin is copied over. + # Locate the framework lib executable -- relative to + # SLPlugin.app/Contents/MacOS, which will be our + # @executable_path at runtime! + newpath = os.path.join( + '@executable_path', + self.relpath(SLPlugin_framework, executable_path["SLPlugin.app"], + symlink=True), + frameworkname) + # restamp media_plugin_cef.dylib + self.run_command( + change_command + + [newpath, self.dst_path_of(dylibexecutable)]) + + # copy LibVLC plugin itself + dylibexecutable = 'media_plugin_libvlc.dylib' + self.path2basename("../media_plugins/libvlc/" + self.args['configuration'], dylibexecutable) + # add @rpath for the correct LibVLC subfolder + self.run_command(['install_name_tool', '-add_rpath', '@loader_path/lib', self.dst_path_of(dylibexecutable)]) + + # copy LibVLC dynamic libraries + with self.prefix(src=relpkgdir, dst="lib"): + self.path( "libvlc*.dylib*" ) + # copy LibVLC plugins folder + with self.prefix(src='plugins', dst=""): + self.path( "*.dylib" ) + self.path( "plugins.dat" ) + + def package_finish(self): + imagename = self.installer_base_name() + self.set_github_output('imagename', imagename) + finalname = imagename + ".dmg" + self.package_file = finalname + + RUNNER_TEMP = os.getenv('RUNNER_TEMP') + # When running as a GitHub Action job, RUNNER_TEMP is the recommended + # temp directory. If we're not running on GitHub, don't create this + # temp directory or this tarball: we don't clean them up, trusting + # that the runner is itself transient. On a dev machine, that would + # result in temp-directory clutter. + if RUNNER_TEMP: + # Per GitHub's actions/upload-artifact documentation + # https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files + # we must package the app bundle with tar before posting as an + # artifact. Posting individual files follows symlinks, which + # causes problems, especially with frameworks: a framework's top + # level must contain symlinks into its Versions/Current, which + # must itself be a symlink to some specific Versions subdir. + tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.xz") + print(f'Creating {tarpath} from {self.get_dst_prefix()}') + with tarfile.open(tarpath, mode="w:xz") as tarball: + # Store in the tarball as just 'Second Life Mumble.app' + # instead of 'Users/someone/.../newview/Release/Second...' + # It's at this point that we rename 'Second Life Release.app' + # to 'Second Life Viewer.app'. + tarball.add(self.get_dst_prefix(), + arcname=self.app_name() + ".app") + self.set_github_output_path('viewer_app', tarpath) + + class LinuxManifest(ViewerManifest): build_data_json_platform = 'lnx' diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 8381803b03..d33b6d78f7 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -1,6 +1,6 @@ # -*- cmake -*- -project(login) +project(lllogin) include(00-Common) if(LL_TESTS) @@ -9,21 +9,21 @@ endif(LL_TESTS) include(LLCommon) include(LLCoreHttp) -set(login_SOURCE_FILES +set(lllogin_SOURCE_FILES lllogin.cpp ) -set(login_HEADER_FILES +set(lllogin_HEADER_FILES lllogin.h ) list(APPEND - login_SOURCE_FILES - ${login_HEADER_FILES} + lllogin_SOURCE_FILES + ${lllogin_HEADER_FILES} ) add_library(lllogin - ${login_SOURCE_FILES} + ${lllogin_SOURCE_FILES} ) target_include_directories( lllogin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -35,6 +35,8 @@ target_link_libraries(lllogin llxml ) +include(LibraryInstall) + if(LL_TESTS) SET(lllogin_TEST_SOURCE_FILES lllogin.cpp |