summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt6
-rw-r--r--indra/cmake/APR.cmake9
-rw-r--r--indra/cmake/Audio.cmake9
-rw-r--r--indra/cmake/Boost.cmake15
-rw-r--r--indra/cmake/ConfigurePkgConfig.cmake2
-rw-r--r--indra/cmake/FreeType.cmake9
-rw-r--r--indra/cmake/GLEXT.cmake5
-rw-r--r--indra/cmake/GLH.cmake5
-rw-r--r--indra/cmake/Hunspell.cmake2
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake3
-rw-r--r--indra/cmake/LLPrimitive.cmake10
-rw-r--r--indra/cmake/LLWindow.cmake13
-rw-r--r--indra/cmake/LibVLCPlugin.cmake17
-rw-r--r--indra/cmake/LibraryInstall.cmake4
-rw-r--r--indra/cmake/Linking.cmake2
-rw-r--r--indra/cmake/Meshoptimizer.cmake6
-rw-r--r--indra/cmake/OPENAL.cmake11
-rw-r--r--indra/cmake/OpenJPEG.cmake9
-rw-r--r--indra/cmake/OpenSSL.cmake6
-rw-r--r--indra/cmake/Prebuilt.cmake16
-rw-r--r--indra/cmake/UI.cmake13
-rw-r--r--indra/cmake/UnixInstall.cmake10
-rw-r--r--indra/cmake/ViewerMiscLibs.cmake6
-rw-r--r--indra/cmake/XmlRpcEpi.cmake12
-rw-r--r--indra/cmake/ZLIBNG.cmake6
-rw-r--r--indra/cmake/xxHash.cmake7
-rw-r--r--indra/llappearance/CMakeLists.txt2
-rw-r--r--indra/llaudio/CMakeLists.txt2
-rwxr-xr-xindra/llaudio/llaudioengine.h1
-rw-r--r--indra/llcharacter/CMakeLists.txt2
-rw-r--r--indra/llcommon/CMakeLists.txt17
-rw-r--r--indra/llcommon/hbxxh.cpp4
-rw-r--r--indra/llcommon/llfasttimer.cpp2
-rw-r--r--indra/llcommon/llfasttimer.h4
-rw-r--r--indra/llcommon/llmemory.h8
-rw-r--r--indra/llcommon/llpreprocessor.h6
-rw-r--r--indra/llcommon/llprocess.h2
-rw-r--r--indra/llcommon/llprocessor.cpp99
-rw-r--r--indra/llcommon/llsdutil.cpp2
-rw-r--r--indra/llcommon/llsys.cpp21
-rw-r--r--indra/llcommon/lltimer.cpp6
-rw-r--r--indra/llcommon/lluuid.cpp4
-rw-r--r--indra/llcommon/stdtypes.h7
-rw-r--r--indra/llcorehttp/CMakeLists.txt8
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp4
-rw-r--r--indra/llcorehttp/httpcommon.cpp2
-rw-r--r--indra/llcrashlogger/CMakeLists.txt2
-rw-r--r--indra/llfilesystem/CMakeLists.txt8
-rw-r--r--indra/llfilesystem/lldir_linux.cpp4
-rw-r--r--indra/llfilesystem/lldir_linux.h2
-rw-r--r--indra/llimage/CMakeLists.txt12
-rw-r--r--indra/llimagej2coj/CMakeLists.txt4
-rw-r--r--indra/llimagej2coj/llimagej2coj.cpp6
-rw-r--r--indra/llinventory/CMakeLists.txt2
-rw-r--r--indra/llinventory/llsettingsbase.cpp1
-rw-r--r--indra/llinventory/llsettingssky.cpp1
-rw-r--r--indra/llinventory/llsettingswater.cpp1
-rw-r--r--indra/llmath/CMakeLists.txt11
-rw-r--r--indra/llmath/llcalcparser.h4
-rw-r--r--indra/llmath/llsimdmath.h6
-rw-r--r--indra/llmeshoptimizer/CMakeLists.txt2
-rw-r--r--indra/llmeshoptimizer/llmeshoptimizer.cpp6
-rw-r--r--indra/llmessage/CMakeLists.txt16
-rw-r--r--indra/llplugin/CMakeLists.txt1
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp8
-rw-r--r--indra/llplugin/llpluginsharedmemory.cpp2
-rw-r--r--indra/llplugin/slplugin/CMakeLists.txt9
-rw-r--r--indra/llplugin/slplugin/slplugin.cpp6
-rw-r--r--indra/llprimitive/CMakeLists.txt8
-rw-r--r--indra/llprimitive/lldaeloader.cpp8
-rw-r--r--indra/llprimitive/lldaeloader.h2
-rw-r--r--indra/llprimitive/llmodel.h2
-rw-r--r--indra/llprimitive/llphysicsextensions/CMakeLists.txt92
-rw-r--r--indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.cpp143
-rw-r--r--indra/llprimitive/llphysicsextensions/LLConvexDecompositionStubImpl.h92
-rw-r--r--indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.cpp107
-rw-r--r--indra/llprimitive/llphysicsextensions/LLPathingLibStubImpl.h78
-rw-r--r--indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.cpp49
-rw-r--r--indra/llprimitive/llphysicsextensions/LLPhysicsExtensionsStubImpl.h46
-rw-r--r--indra/llprimitive/llphysicsextensions/llconvexdecomposition.cpp102
-rw-r--r--indra/llprimitive/llphysicsextensions/llconvexdecomposition.h231
-rw-r--r--indra/llprimitive/llphysicsextensions/llpathinglib.cpp110
-rw-r--r--indra/llprimitive/llphysicsextensions/llpathinglib.h187
-rw-r--r--indra/llprimitive/llphysicsextensions/llphysicsextensions.cpp103
-rw-r--r--indra/llprimitive/llphysicsextensions/llphysicsextensions.h59
-rw-r--r--indra/llprimitive/llprimitive.cpp4
-rw-r--r--indra/llprimitive/llprimtexturelist.cpp6
-rw-r--r--indra/llprimitive/llprimtexturelist.h2
-rw-r--r--indra/llrender/CMakeLists.txt1
-rw-r--r--indra/llrender/llgl.cpp16
-rw-r--r--indra/llrender/llglheaders.h4
-rw-r--r--indra/llrender/llimagegl.cpp6
-rw-r--r--indra/llrender/llrender.cpp6
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llwindow/CMakeLists.txt19
-rw-r--r--indra/llwindow/llkeyboard.cpp8
-rw-r--r--indra/llwindow/llkeyboard.h14
-rw-r--r--indra/llwindow/llkeyboardheadless.cpp4
-rw-r--r--indra/llwindow/llkeyboardheadless.h4
-rw-r--r--indra/llwindow/llkeyboardsdl.cpp84
-rw-r--r--indra/llwindow/llkeyboardsdl.h17
-rw-r--r--indra/llwindow/llwindow.cpp20
-rw-r--r--indra/llwindow/llwindowsdl.cpp311
-rw-r--r--indra/llwindow/llwindowsdl.h19
-rw-r--r--indra/llxml/CMakeLists.txt1
-rw-r--r--indra/media_plugins/CMakeLists.txt6
-rw-r--r--indra/media_plugins/base/CMakeLists.txt1
-rw-r--r--indra/media_plugins/libvlc/CMakeLists.txt4
-rw-r--r--indra/newview/CMakeLists.txt55
-rw-r--r--indra/newview/ViewerInstall.cmake3
-rw-r--r--indra/newview/llappviewer.cpp27
-rw-r--r--indra/newview/llappviewerlinux.cpp6
-rw-r--r--indra/newview/llappviewerlinux.h2
-rw-r--r--indra/newview/llchathistory.cpp2
-rw-r--r--indra/newview/llconversationloglist.cpp4
-rw-r--r--indra/newview/lldirpicker.cpp4
-rw-r--r--indra/newview/lldirpicker.h2
-rw-r--r--indra/newview/llenvironment.h2
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llfeaturemanager.cpp2
-rw-r--r--indra/newview/llfilepicker.cpp29
-rw-r--r--indra/newview/llfloaterregioninfo.cpp2
-rw-r--r--indra/newview/llimview.cpp2
-rw-r--r--indra/newview/lllogchat.cpp2
-rw-r--r--indra/newview/llmanip.cpp2
-rw-r--r--indra/newview/llmediadataclient.cpp4
-rw-r--r--indra/newview/llmodelpreview.cpp2
-rw-r--r--indra/newview/lltoastalertpanel.h2
-rw-r--r--indra/newview/llvoicevivox.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp2
-rw-r--r--indra/newview/skins/default/xui/da/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/da/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/de/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/de/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/en/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/es/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/it/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/language_settings.xml3
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/pl/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/pt/language_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/pt/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/tr/strings.xml4
-rw-r--r--indra/viewer_components/login/CMakeLists.txt14
150 files changed, 2424 insertions, 303 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 205ce402a0..1b13ae4843 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 )
@@ -120,7 +124,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/APR.cmake b/indra/cmake/APR.cmake
index 8a0939c92c..29efa634c1 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/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake
index 55d865392e..a2d5b31e25 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 434b6f0ee8..2e46d1bea8 100644
--- a/indra/cmake/GLEXT.cmake
+++ b/indra/cmake/GLEXT.cmake
@@ -3,6 +3,11 @@ include(Prebuilt)
include(GLH)
add_library( ll::glext INTERFACE IMPORTED )
+
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ return ()
+endif ()
+
if (WINDOWS OR LINUX)
use_system_binary(glext)
use_prebuilt_binary(glext)
diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake
index 0cefc3543a..49c4e3b37a 100644
--- a/indra/cmake/GLH.cmake
+++ b/indra/cmake/GLH.cmake
@@ -3,5 +3,10 @@ include(Prebuilt)
add_library( ll::glh_linear INTERFACE IMPORTED )
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ target_include_directories( ll::glh_linear SYSTEM INTERFACE /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 36821447c9..b2151dc781 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 3d8499cbc3..387cae61d8 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 b36e970560..8cb383d718 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..f4ec34ec1b 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 ()
+ include(FindPkgConfig)
+ if (DARWIN)
+ set(CMAKE_PREFIX_PATH "/opt/local/libexec/vlc3/lib/pkgconfig")
+ pkg_check_modules(Libvlc REQUIRED libvlc)
+ target_link_libraries( ll::libvlc INTERFACE vlccore )
+ else ()
+ pkg_check_modules(Libvlc REQUIRED libvlc vlc-plugin)
+ endif ()
+ 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} )
+ 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..5a55c215ed
--- /dev/null
+++ b/indra/cmake/LibraryInstall.cmake
@@ -0,0 +1,4 @@
+list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt)
+install(FILES ${${PROJECT_NAME}_HEADER_FILES}
+ DESTINATION include/${PROJECT_NAME})
+install(TARGETS ${PROJECT_NAME} DESTINATION lib)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 4a501f420b..14b5e76877 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -64,7 +64,7 @@ elseif (WINDOWS)
dbghelp
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..6cf8343dd6 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 /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..3f86bfd025 100644
--- a/indra/cmake/OpenJPEG.cmake
+++ b/indra/cmake/OpenJPEG.cmake
@@ -4,6 +4,15 @@ include(Prebuilt)
include_guard()
add_library( ll::openjpeg INTERFACE IMPORTED )
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ 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 ()
+
use_system_binary(openjpeg)
use_prebuilt_binary(openjpeg)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 3387c74f45..c9147f1d5e 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -4,8 +4,11 @@ include(Prebuilt)
include_guard()
add_library( ll::openssl INTERFACE IMPORTED )
+if (USE_AUTOBUILD_3P OR USE_CONAN)
use_system_binary(openssl)
use_prebuilt_binary(openssl)
+endif ()
+
if (WINDOWS)
target_link_libraries(ll::openssl INTERFACE libssl libcrypto)
elseif (LINUX)
@@ -13,5 +16,6 @@ elseif (LINUX)
else()
target_link_libraries(ll::openssl INTERFACE ssl crypto)
endif (WINDOWS)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
target_include_directories( ll::openssl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
-
+endif ()
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/UI.cmake b/indra/cmake/UI.cmake
index 8b70192efc..03bdf4e434 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..55b6889836 100644
--- a/indra/cmake/UnixInstall.cmake
+++ b/indra/cmake/UnixInstall.cmake
@@ -6,7 +6,7 @@ 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)
@@ -21,11 +21,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 00f8b77106..52128414c9 100644
--- a/indra/cmake/ViewerMiscLibs.cmake
+++ b/indra/cmake/ViewerMiscLibs.cmake
@@ -1,6 +1,12 @@
# -*- cmake -*-
include(Prebuilt)
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ add_library( ll::fontconfig INTERFACE IMPORTED )
+ use_system_binary(fontconfig)
+ return ()
+endif ()
+
if (LINUX)
#use_prebuilt_binary(libuuid)
add_library( ll::fontconfig INTERFACE IMPORTED )
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 75c0e276eb..e6ca2d753a 100644
--- a/indra/llappearance/CMakeLists.txt
+++ b/indra/llappearance/CMakeLists.txt
@@ -86,3 +86,5 @@ if (BUILD_HEADLESS)
llcommon
)
endif (BUILD_HEADLESS)
+
+include(LibraryInstall)
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/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index a133898969..c045d18c42 100755
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -30,6 +30,7 @@
#include <list>
#include <map>
+#include <array>
#include "v3math.h"
#include "v3dmath.h"
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 ef4899978e..ed7ac8deb7 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)
@@ -156,6 +158,7 @@ set(llcommon_HEADER_FILES
lleventdispatcher.h
lleventfilter.h
llevents.h
+ lleventtimer.h
lleventemitter.h
llexception.h
llfasttimer.h
@@ -179,12 +182,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
@@ -241,7 +246,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
@@ -277,7 +284,17 @@ 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(llsdutil.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-stringop-truncation)
+ endif()
+endif ()
+
+include(LibraryInstall)
if (LL_TESTS)
include(LLAddBuildTest)
diff --git a/indra/llcommon/hbxxh.cpp b/indra/llcommon/hbxxh.cpp
index 388269d6c8..84d215d468 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 2612d0f07c..b30bb110c9 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 || LL_FREEBSD
#include <sys/time.h>
#include <sched.h>
#include "lltimer.h"
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h
index 9bd93d7240..9a5789d719 100644
--- a/indra/llcommon/llfasttimer.h
+++ b/indra/llcommon/llfasttimer.h
@@ -128,7 +128,7 @@ public:
#endif
-#if (LL_LINUX) && !(defined(__i386__) || defined(__amd64__))
+#if (LL_LINUX || LL_DARWIN) && !(defined(__i386__) || defined(__amd64__))
//
// Linux implementation of CPU clock - non-x86.
// This is accurate but SLOW! Only use out of desperation.
@@ -159,7 +159,7 @@ public:
#endif // (LL_LINUX) && !(defined(__i386__) || defined(__amd64__))
-#if (LL_LINUX || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
+#if (LL_LINUX || LL_DARWIN || LL_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 ac6c969d70..dd9867c9b3 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 || LL_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 || LL_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 dc586b0008..3c05fd32da 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(LL_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(LL_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 || LL_FREEBSD
// Different name, same functionality.
#define stricmp strcasecmp
#define strnicmp strncasecmp
diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h
index e3386ad88e..9555df9bba 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 || LL_FREEBSD
#if defined(Status)
#undef Status
#endif
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index 4a1a81f083..cfa85ac2fd 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -792,6 +792,100 @@ private:
}
};
+#elif LL_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 +961,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 +1066,9 @@ LLProcessorInfo::LLProcessorInfo() : mImpl(NULL)
#elif LL_DARWIN
static LLProcessorInfoDarwinImpl the_impl;
mImpl = &the_impl;
+#elif LL_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 f70bee9903..512f630cdc 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 || LL_FREEBSD
# include <arpa/inet.h>
#endif
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 91cb65b815..457ced7fae 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -82,8 +82,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 LL_FREEBSD
+# include <sys/sysctl.h>
+# include <sys/utsname.h>
+#endif
LLCPUInfo gSysCPU;
@@ -350,6 +355,7 @@ LLOSInfo::LLOSInfo() :
boost::regex os_version_parse(OS_VERSION_MATCH_EXPRESSION);
boost::smatch matched;
+#ifdef __GNU__
std::string glibc_version(gnu_get_libc_version());
if ( ll_regex_match(glibc_version, matched, os_version_parse) )
{
@@ -408,6 +414,7 @@ LLOSInfo::LLOSInfo() :
{
LL_WARNS("AppInit") << "glibc version '" << glibc_version << "' cannot be parsed to three numbers; using all zeros" << LL_ENDL;
}
+#endif // __GNU__
#else
@@ -435,6 +442,14 @@ 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
{
@@ -776,10 +791,14 @@ U32Kilobytes LLMemoryInfo::getPhysicalMemoryKB() const
#if LL_WINDOWS
return LLMemoryAdjustKBResult(U32Kilobytes(mStatsMap["Total Physical KB"].asInteger()));
-#elif LL_DARWIN
+#elif LL_DARWIN || LL_FREEBSD
// 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);
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 58bedacf43..8d22d7fa5e 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -32,7 +32,7 @@
#if LL_WINDOWS
# include "llwin32headerslean.h"
-#elif LL_LINUX || LL_DARWIN
+#elif LL_LINUX || LL_DARWIN || LL_FREEBSD
# include <errno.h>
# include <sys/time.h>
#else
@@ -74,7 +74,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
ms_sleep((U32)(us / 1000));
return 0;
}
-#elif LL_LINUX || LL_DARWIN
+#elif LL_LINUX || LL_DARWIN || LL_FREEBSD
static void _sleep_loop(struct timespec& thiswait)
{
struct timespec nextwait;
@@ -192,7 +192,7 @@ F64 calc_clock_frequency()
#endif // LL_WINDOWS
-#if LL_LINUX || LL_DARWIN
+#if LL_LINUX || LL_DARWIN || LL_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 5655e8e2f2..7dfc7e02a1 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 && !LL_FREEBSD
#include <linux/sockios.h>
#endif
#endif
diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h
index 0b43d7ad4b..463e1e832b 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 || LL_FREEBSD
#define S64L(a) (a##LL)
#define U64L(a) (a##ULL)
#endif
@@ -113,6 +114,10 @@ typedef U32 TPACKETID;
#define FALSE (0)
#endif
+#if LL_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/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index ba31290c24..6c408c6687 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -508,7 +508,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
check_curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1);
check_curl_easy_setopt(mCurlHandle, CURLOPT_URL, mReqURL.c_str());
check_curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, getHandle());
- check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
+ //check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
check_curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1);
check_curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT);
@@ -598,7 +598,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
case HOR_POST:
{
check_curl_easy_setopt(mCurlHandle, CURLOPT_POST, 1);
- check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
+ //check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
long data_size(0);
if (mReqBody)
{
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index 61ba83594e..856602e50b 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -289,8 +289,10 @@ CURL *getCurlTemplateHandle()
check_curl_code(result, CURLOPT_NOSIGNAL);
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_NOPROGRESS, 1);
check_curl_code(result, CURLOPT_NOPROGRESS);
+ /*
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_ENCODING, "");
check_curl_code(result, CURLOPT_ENCODING);
+ */
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_AUTOREFERER, 1);
check_curl_code(result, CURLOPT_AUTOREFERER);
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_FOLLOWLOCATION, 1);
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..9a69a833c0 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}\\\""
)
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_linux.cpp b/indra/llfilesystem/lldir_linux.cpp
index 80ad05345a..300cab39d6 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;
diff --git a/indra/llfilesystem/lldir_linux.h b/indra/llfilesystem/lldir_linux.h
index e83a020ba4..8c4d42f025 100644
--- a/indra/llfilesystem/lldir_linux.h
+++ b/indra/llfilesystem/lldir_linux.h
@@ -24,7 +24,7 @@
* $/LicenseInfo$
*/
-#if !LL_LINUX
+#if !LL_LINUX && !LL_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/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt
index cc75c463bc..a6c98d9bd7 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,14 @@ 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)
+ 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 12985c3c7f..a15164858a 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.
+#ifdef LL_USESYSTEMLIBS
+#include <openjpeg-2.5/openjpeg.h>
+#include <openjpeg-2.5/event.h>
+#include <openjpeg-2.5/cio.h>
+#else
#include "openjpeg.h"
#include "event.h"
#include "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 936b166409..7ca9d6b8cc 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -395,6 +395,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 a129f0a6f0..ab88327b83 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -144,6 +144,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 d732032a6c..94dd39170c 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -223,6 +223,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..dfd7491790 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
@@ -99,9 +100,17 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES})
add_library (llmath ${llmath_SOURCE_FILES})
-target_link_libraries(llmath llcommon llmeshoptimizer)
+include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer)
+target_link_libraries(llmath llcommon)
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 dff5bf3af3..e4656d2376 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 54a275633f..a6f57d1853 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/llmeshoptimizer/CMakeLists.txt b/indra/llmeshoptimizer/CMakeLists.txt
index dfac44c296..1511e75b39 100644
--- a/indra/llmeshoptimizer/CMakeLists.txt
+++ b/indra/llmeshoptimizer/CMakeLists.txt
@@ -30,5 +30,7 @@ target_link_libraries(llmeshoptimizer
llmath
ll::meshoptimizer)
+include(LibraryInstall)
+
# Add tests
diff --git a/indra/llmeshoptimizer/llmeshoptimizer.cpp b/indra/llmeshoptimizer/llmeshoptimizer.cpp
index c178348968..ce2b9f99b1 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,
+#ifdef LL_USESYSTEMLIBS
+ 0,
+#endif
result_error
);
}
@@ -332,6 +335,9 @@ U64 LLMeshOptimizer::simplify(U16 *destination,
vertex_positions_stride,
target_index_count,
target_error,
+#ifdef LL_USESYSTEMLIBS
+ 0,
+#endif
result_error
);
}
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 4786956e85..d5db3d8b1b 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)
@@ -130,6 +136,7 @@ set(llmessage_HEADER_FILES
llmessagebuilder.h
llmessageconfig.h
llmessagereader.h
+ llmessagesenderinterface.h
llmessagetemplate.h
llmessagetemplateparser.h
llmessagethrottle.h
@@ -197,6 +204,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 3e72710366..2d19e3df90 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -33,8 +33,10 @@
#include "llpluginmessageclasses.h"
#include "llcontrol.h"
+#ifndef LL_USESYSTEMLIBS
extern LLControlGroup gSavedSettings;
-#if LL_DARWIN
+#endif
+#if LL_DARWIN && !LL_SDL
extern BOOL gHiDPISupport;
#endif
@@ -368,7 +370,7 @@ void LLPluginClassMedia::setSizeInternal(void)
mRequestedMediaHeight = nextPowerOf2(mRequestedMediaHeight);
}
-#if LL_DARWIN
+#if LL_DARWIN && !LL_SDL
if (!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);
+#ifndef LL_USESYSTEMLIBS
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 63ff5085c6..c4e70f51e0 100644
--- a/indra/llplugin/llpluginsharedmemory.cpp
+++ b/indra/llplugin/llpluginsharedmemory.cpp
@@ -47,6 +47,8 @@
#define USE_SHM_OPEN_SHARED_MEMORY 1
#elif LL_LINUX
#define USE_SHM_OPEN_SHARED_MEMORY 1
+#elif LL_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..871d858b58 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 ${APP_LIBEXEC_DIR})
+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 5c54705c71..3e9dc8cd31 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 || LL_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 || LL_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 || LL_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 d69cd958a0..f26ab747af 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -66,6 +66,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 752a850d42..dead788fbe 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -943,12 +943,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 2b211343e1..e99fc51ee9 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/llmodel.h b/indra/llprimitive/llmodel.h
index 4505d6b3b9..6a4a4927b6 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..c204dea264
--- /dev/null
+++ b/indra/llprimitive/llphysicsextensions/CMakeLists.txt
@@ -0,0 +1,92 @@
+# -*- 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})
+install(TARGETS ${PROJECT_NAME}stub DESTINATION lib)
+
+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 67c225d25d..6ee438d181 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -263,7 +263,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++;
}
@@ -742,7 +742,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 f4f08248b8..b50c541488 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 49c636e40f..a5f32bada6 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 c5cf1100d5..ea8947155e 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -102,3 +102,4 @@ target_link_libraries(llrender
OpenGL::GLU
)
+include(LibraryInstall)
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index cfc9ce735d..e96a226115 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -156,7 +156,7 @@ LLMatrix4 gGLObliqueProjectionInverse;
std::list<LLGLUpdate*> LLGLUpdate::sGLQ;
-#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
+#if (LL_WINDOWS || LL_LINUX || LL_FREEBSD) && !LL_MESA_HEADLESS
#if LL_WINDOWS
PFNGLGETSTRINGIPROC glGetStringi = NULL;
@@ -317,7 +317,7 @@ PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = NULL;
#endif
// vertex shader prototypes
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB = NULL;
PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB = NULL;
PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB = NULL;
@@ -344,7 +344,7 @@ PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB = NULL;
PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB = NULL;
PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB = NULL;
PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB = NULL;
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB = NULL;
PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB = NULL;
PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB = NULL;
@@ -616,7 +616,7 @@ bool LLGLManager::initGL()
mIsNVIDIA = TRUE;
}
else if (mGLVendor.find("INTEL") != std::string::npos
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
// The Mesa-based drivers put this in the Renderer string,
// not the Vendor string.
|| mGLRenderer.find("INTEL") != std::string::npos
@@ -1060,7 +1060,7 @@ void LLGLManager::initExtensions()
#endif
#endif
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
LL_INFOS() << "initExtensions() checking shell variables to adjust features..." << LL_ENDL;
// Our extension support for the Linux Client is very young with some
// potential driver gotchas, so offer a semi-secret way to turn it off.
@@ -1180,7 +1180,7 @@ void LLGLManager::initExtensions()
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*) &mGLMaxTextureSize);
-#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS
+#if (LL_WINDOWS || LL_LINUX || LL_FREEBSD) && !LL_MESA_HEADLESS
LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL;
if (mHasVertexBufferObject)
{
@@ -1279,7 +1279,7 @@ void LLGLManager::initExtensions()
glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC) GLH_EXT_GET_PROC_ADDRESS("glDebugMessageCallbackARB");
glGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetDebugMessageLogARB");
}
-#if (!LL_LINUX) || LL_LINUX_NV_GL_HEADERS
+#if (!LL_LINUX && !LL_FREEBSD) || LL_LINUX_NV_GL_HEADERS
// This is expected to be a static symbol on Linux GL implementations, except if we use the nvidia headers - bah
glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)GLH_EXT_GET_PROC_ADDRESS("glDrawRangeElements");
if (!glDrawRangeElements)
@@ -1604,7 +1604,7 @@ void LLGLState::resetTextureStates()
for (S32 j = maxTextureUnits-1; j >=0; j--)
{
gGL.getTexUnit(j)->activate();
- glClientActiveTextureARB(GL_TEXTURE0_ARB+j);
+ glClientActiveTexture(GL_TEXTURE0_ARB+j);
j == 0 ? gGL.getTexUnit(j)->enable(LLTexUnit::TT_TEXTURE) : gGL.getTexUnit(j)->disable();
}
}
diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h
index e1ecc6a6ca..3ad92ed20e 100644
--- a/indra/llrender/llglheaders.h
+++ b/indra/llrender/llglheaders.h
@@ -41,7 +41,7 @@
# include "GL/glh_extensions.h"
# undef __APPLE__
-#elif LL_LINUX
+#elif LL_LINUX || LL_FREEBSD
//----------------------------------------------------------------------------
// LL_LINUX
@@ -53,7 +53,7 @@
#include "GL/glu.h"
-#if LL_LINUX && !LL_MESA_HEADLESS
+#if (LL_LINUX || LL_FREEBSD) && !LL_MESA_HEADLESS
// The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly
# define __APPLE__
# include "GL/glh_extensions.h"
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index 465f30a343..8e83f2b401 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -741,7 +741,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
if (is_compressed)
{
S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
- glCompressedTexImage2DARB(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
+ glCompressedTexImage2D(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
stop_glerror();
}
else
@@ -943,7 +943,7 @@ BOOL LLImageGL::setImage(const U8* data_in, BOOL data_hasmips /* = FALSE */, S32
if (is_compressed)
{
S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
- glCompressedTexImage2DARB(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
+ glCompressedTexImage2D(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
stop_glerror();
}
else
@@ -1837,7 +1837,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
return FALSE ;
}
- glGetCompressedTexImageARB(mTarget, gl_discard, (GLvoid*)(imageraw->getData()));
+ glGetCompressedTexImage(mTarget, gl_discard, (GLvoid*)(imageraw->getData()));
//stop_glerror();
}
else
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 72cca1f2a2..ba776f3b2f 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -122,7 +122,7 @@ void LLTexUnit::refreshState(void)
gGL.flush();
- glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
+ glActiveTexture(GL_TEXTURE0_ARB + mIndex);
if (mCurrTexType != TT_NONE)
{
@@ -143,7 +143,7 @@ void LLTexUnit::activate(void)
if ((S32)gGL.mCurrTextureUnitIndex != mIndex || gGL.mDirty)
{
gGL.flush();
- glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
+ glActiveTexture(GL_TEXTURE0_ARB + mIndex);
gGL.mCurrTextureUnitIndex = mIndex;
}
}
@@ -187,7 +187,7 @@ void LLTexUnit::bindFast(LLTexture* texture)
{
LLImageGL* gl_tex = texture->getGLTexture();
- glActiveTextureARB(GL_TEXTURE0_ARB + mIndex);
+ glActiveTexture(GL_TEXTURE0_ARB + mIndex);
gGL.mCurrTextureUnitIndex = mIndex;
mCurrTexture = gl_tex->getTexName();
if (!mCurrTexture)
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 9108c6143c..06416df09b 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -266,6 +266,8 @@ target_link_libraries(llui
llcommon
)
+include(LibraryInstall)
+
# Add tests
if(LL_TESTS)
include(LLAddBuildTest)
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index ca08e38f77..120fd1213d 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)
@@ -178,8 +181,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 e65cc7563e..ac8c97d34e 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 fb1ae10f50..0cfba78c5b 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
@@ -109,8 +109,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 a1b6b294e0..3ca421f9f9 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 8ed28ace90..929751586c 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 7c9aa1d340..872b58e2ec 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.
@@ -201,34 +201,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 +246,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 +268,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 +277,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 +310,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 02a71425f1..43f8e1ccb4 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 c5725677b4..ece334b8cf 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -74,12 +74,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 +259,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 +273,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 +359,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();
@@ -409,7 +411,7 @@ LLWindow* LLWindowManager::createWindow(
BOOL ignore_pixel_depth,
U32 fsaa_samples)
{
- LLWindow* new_window;
+ LLWindow* new_window = nullptr;
if (use_gl)
{
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 7ea87f5884..293e6ec272 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -51,7 +51,7 @@ extern "C" {
# include "fontconfig/fontconfig.h"
}
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
// not necessarily available on random SDL platforms, so #if LL_LINUX
// for execv(), waitpid(), fork()
# include <unistd.h>
@@ -66,6 +66,33 @@ const S32 MAX_NUM_RESOLUTIONS = 200;
// static variable for ATI mouse cursor crash work-around:
static bool ATIbug = false;
+#if LL_DARWIN
+
+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
+//
+
+#endif
+
//
// LLWindowSDL
//
@@ -119,7 +146,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();
@@ -430,44 +459,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)
+ if (display_mode.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)
- {
- // 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
@@ -487,7 +497,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
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_DOUBLEBUFFER, 1);
@@ -551,19 +561,24 @@ 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 +610,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,10 +627,30 @@ 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;
}
+
+ //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)
+ {
+ // 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_X11
@@ -622,6 +661,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
} 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.
@@ -630,6 +670,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
{
LL_INFOS() << "SDL detected " << gGLManager.mVRAM << "MB VRAM." << LL_ENDL;
}
+ */
}
// If VRAM is not detected, that is handled later
@@ -693,15 +734,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
{
@@ -721,9 +764,11 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B
glDisable(GL_MULTISAMPLE_ARB);
// 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 +941,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 +952,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 +977,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 +996,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 +1013,7 @@ void LLWindowSDL::swapBuffers()
{
if (mWindow)
{
- SDL_GL_SwapBuffers();
+ SDL_GL_SwapWindow(mWindow);
}
}
@@ -990,7 +1035,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 +1046,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 +1084,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 +1118,7 @@ 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);
+ SDL_WarpMouseGlobal(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;
@@ -1146,7 +1216,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 +1258,7 @@ void LLWindowSDL::afterDialog()
// in X11
if (running_x11 && mWindow)
{
- SDL_WM_ToggleFullScreen(mWindow);
+ SDL_SetWindowFullscreen(mWindow, SDL_WINDOW_FULLSCREEN);
}
}
}
@@ -1368,6 +1438,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 +1453,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 +1474,7 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso
}
}
}
- }
+ //}
}
num_resolutions = mNumSupportedResolutions;
@@ -1409,8 +1486,10 @@ BOOL LLWindowSDL::convertCoords(LLCoordGL from, LLCoordWindow *to)
if (!to)
return FALSE;
- to->mX = from.mX;
- to->mY = mWindow->h - from.mY - 1;
+ to->mX = from.mX;
+ int h;
+ SDL_GetWindowSize(mWindow, nullptr, &h);
+ to->mY = h - from.mY - 1;
return TRUE;
}
@@ -1420,8 +1499,10 @@ BOOL LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordGL* to)
if (!to)
return FALSE;
- to->mX = from.mX;
- to->mY = mWindow->h - from.mY - 1;
+ to->mX = from.mX;
+ int h;
+ SDL_GetWindowSize(mWindow, nullptr, &h);
+ to->mY = h - from.mY - 1;
return TRUE;
}
@@ -1482,13 +1563,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 +1593,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 +1604,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 +1620,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 +1631,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 +1836,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 +1843,21 @@ 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:
+ mKeyVirtualKey = *event.text.text;
+ handleUnicodeUTF16(mKeyVirtualKey,
+ gKeyboard->currentMask(FALSE));
+ 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 +1922,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 +1951,22 @@ 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;
-
- S32 width = llmax(event.resize.w, (S32)mMinWindowWidth);
- S32 height = llmax(event.resize.h, (S32)mMinWindowHeight);
-
+ 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.window.data1, (S32)mMinWindowWidth);
+ S32 height = llmax(event.window.data2, (S32)mMinWindowHeight);
+
+ // *FIX: handle this?
// *FIX: I'm not sure this is necessary!
+ /*
mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags);
if (!mWindow)
{
@@ -1889,10 +1980,13 @@ void LLWindowSDL::gatherInput()
}
break;
}
+ */
mCallbacks->handleResize(this, width, height);
+ }
break;
}
+ /*
case SDL_ACTIVEEVENT:
if (event.active.state & SDL_APPINPUTFOCUS)
{
@@ -1929,6 +2023,7 @@ void LLWindowSDL::gatherInput()
}
}
break;
+ */
case SDL_QUIT:
if(mCallbacks->handleCloseRequest(this))
@@ -2467,9 +2562,33 @@ 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;
+}
+
+#endif // LL_DARWIN
+
#endif // LL_GTK
-#if LL_LINUX
+#if LL_LINUX || LL_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 +2644,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 || LL_FREEBSD
# if LL_X11
if (mSDL_Display)
{
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 7193e6f45a..86e238282b 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.
@@ -66,6 +69,10 @@ public:
/*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*/ void *createSharedContext();
+ /*virtual*/ void makeContextCurrent(void* context);
+ /*virtual*/ void destroySharedContext(void* context);
+ /*virtual*/ void toggleVSync(bool enable_vsync);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
/*virtual*/ void showCursor();
@@ -177,7 +184,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 +192,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 +218,7 @@ private:
U32 mKeyScanCode;
U32 mKeyVirtualKey;
- SDLMod mKeyModifiers;
+ Uint16 mKeyModifiers;
};
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index 508c2b919b..748e3e8b61 100644
--- a/indra/llxml/CMakeLists.txt
+++ b/indra/llxml/CMakeLists.txt
@@ -34,6 +34,7 @@ target_link_libraries( llxml
)
target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+include(LibraryInstall)
# tests
diff --git a/indra/media_plugins/CMakeLists.txt b/indra/media_plugins/CMakeLists.txt
index 972bb7dd2d..726ccf90ed 100644
--- a/indra/media_plugins/CMakeLists.txt
+++ b/indra/media_plugins/CMakeLists.txt
@@ -2,6 +2,12 @@
add_subdirectory(base)
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ add_subdirectory(libvlc)
+ add_subdirectory(example)
+ return()
+endif ()
+
if (LINUX)
#add_subdirectory(gstreamer010)
add_subdirectory(example)
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/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index a3c1c4ef99..cdaf3efbfa 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -55,3 +55,7 @@ if (DARWIN)
)
endif (DARWIN)
+
+if (INSTALL)
+ install(TARGETS ${PROJECT_NAME} DESTINATION ${APP_LIBEXEC_DIR}/llplugin)
+endif ()
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index dbd1f1b4ac..226f9a3bda 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)
@@ -37,17 +45,23 @@ include(OpenGL)
include(OpenSSL)
include(PNG)
include(TemplateCheck)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(ThreeJS)
+endif ()
include(Tracy)
include(UI)
include(ViewerMiscLibs)
+if (USE_AUTOBUILD_3P OR USE_CONAN)
include(ViewerManager)
+endif ()
include(VisualLeakDetector)
include(ZLIBNG)
include(URIPARSER)
include(LLPrimitive)
+include(LibVLCPlugin)
+include(UnixInstall)
-if (NOT HAVOK_TPV)
+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
@@ -68,7 +82,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
@@ -1360,12 +1374,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(
@@ -1380,6 +1397,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
@@ -1399,17 +1417,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
@@ -1607,6 +1627,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}
@@ -1901,6 +1925,8 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLPHYSICSEXTENSIONS_LIBRARIES}
ll::bugsplat
ll::tracy
+ ll::libvlc
+ ll::fontconfig
)
if( TARGET ll::intel_memops )
@@ -1914,6 +1940,21 @@ endif()
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set_source_files_properties(llappviewerlinux.cpp PROPERTIES
+ COMPILE_FLAGS -Wno-dangling-gsl
+ )
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set_source_files_properties(
+ llface.cpp
+ llhttpretrypolicy.cpp
+ llpanelface.cpp
+ lltexturefetch.cpp
+ PROPERTIES COMPILE_FLAGS -Wno-maybe-uninitialized)
+ set_source_files_properties(llurl.cpp PROPERTIES COMPILE_FLAGS
+ -Wno-stringop-truncation)
+endif ()
+
if (LINUX)
set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})
@@ -2059,7 +2100,11 @@ if (DARWIN)
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
+ if (USE_AUTOBUILD_3P OR USE_CONAN)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
+ else ()
+ add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc)
+ endif ()
if (ENABLE_SIGNING)
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index ac2247c815..e321d7e563 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -19,7 +19,8 @@ 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
+install(FILES featuretable_linux.txt
+ #featuretable_solaris.txt
DESTINATION ${APP_SHARE_DIR}
)
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 31a87bbde1..777fc4c3a7 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -131,10 +131,12 @@
#include "stringize.h"
#include "llcoros.h"
#include "llexception.h"
-#if !LL_LINUX
+//#if !LL_LINUX
+#ifndef LL_USESYSTEMLIBS
#include "cef/dullahan_version.h"
+#endif
#include "vlc/libvlc_version.h"
-#endif // LL_LINUX
+//#endif // LL_LINUX
#if LL_DARWIN
#include "llwindowmacosx.h"
@@ -262,7 +264,7 @@ using namespace LL;
// define a self-registering event API object
#include "llappviewerlistener.h"
-#if LL_LINUX && LL_GTK
+#if (LL_LINUX || LL_FREEBSD) && LL_GTK
#include "glib.h"
#endif // (LL_LINUX) && LL_GTK
@@ -286,7 +288,7 @@ extern BOOL gRandomizeFramerate;
extern BOOL gPeriodicSlowFrame;
extern BOOL gDebugGL;
-#if LL_DARWIN
+#if LL_DARWIN && !LL_SDL
extern BOOL gHiDPISupport;
#endif
@@ -308,6 +310,8 @@ S32 gLastExecDuration = -1; // (<0 indicates unknown)
# define LL_PLATFORM_KEY "mac"
#elif LL_LINUX
# define LL_PLATFORM_KEY "lnx"
+#elif LL_FREEBSD
+# define LL_PLATFORM_KEY "bsd"
#else
# error "Unknown Platform"
#endif
@@ -564,7 +568,7 @@ static void settings_to_globals()
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
LLWorldMapView::setScaleSetting(gSavedSettings.getF32("MapScale"));
-#if LL_DARWIN
+#if LL_DARWIN && !LL_SDL
LLWindowMacOSX::sUseMultGL = gSavedSettings.getBOOL("RenderAppleUseMultGL");
gHiDPISupport = gSavedSettings.getBOOL("RenderHiDPI");
#endif
@@ -891,7 +895,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 || LL_FREEBSD
mime_types_name = "mime_types_linux.xml";
#else
mime_types_name = "mime_types.xml";
@@ -1756,7 +1760,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 || LL_FREEBSD
// remove any old breakpad minidump files from the log directory
if (! isError())
{
@@ -3311,7 +3315,7 @@ LLSD LLAppViewer::getViewerInfo() const
info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled";
info["TEXTURE_MEMORY"] = gSavedSettings.getS32("TextureMemory");
-#if LL_DARWIN
+#if LL_DARWIN && !LL_SDL
info["HIDPI"] = gHiDPISupport;
#endif
@@ -3341,7 +3345,8 @@ LLSD LLAppViewer::getViewerInfo() const
info["VOICE_VERSION"] = LLTrans::getString("NotConnected");
}
-#if !LL_LINUX
+//#if !LL_LINUX && !LL_FREEBSD && !LL_DARWIN
+#ifndef LL_USESYSTEMLIBS
std::ostringstream cef_ver_codec;
cef_ver_codec << "Dullahan: ";
cef_ver_codec << DULLAHAN_VERSION_MAJOR;
@@ -3371,7 +3376,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 << ".";
@@ -3379,9 +3384,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)
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 9f58f90326..deb876e24d 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 0289c43043..14e481f054 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/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 43dc10ef5f..01b1dd7a88 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -1188,7 +1188,7 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style
LLChatHistoryHeader* header = LLChatHistoryHeader::createInstance(mMessageHeaderFilename);
if (header)
header->setup(chat, style_params, args);
- return header;
+ return header;
}
void LLChatHistory::onClickMoreText()
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 97b16a5e93..4f30ccfa07 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 01790ad19e..f2a027f174 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 || LL_FREEBSD
# include "llfilepicker.h"
#endif
@@ -187,7 +187,7 @@ std::string LLDirPicker::getDirName()
return mFilePicker->getFirstFile();
}
-#elif LL_LINUX
+#elif LL_LINUX || LL_FREEBSD
LLDirPicker::LLDirPicker() :
mFileName(NULL),
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 52febe4523..be37e8f369 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 || LL_FREEBSD
// On Linux we just implement LLDirPicker on top of LLFilePicker
LLFilePicker *mFilePicker;
#endif
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 64fd170e43..1175baa828 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 c3b3ccabb4..e1edc38923 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -924,7 +924,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 c7f3ef3490..1b03ec3e71 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 || LL_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 f1f156c2e0..57874c966e 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 || LL_FREEBSD
#include "llhttpconstants.h" // file picker uses some of thes constants on Linux
#endif
@@ -1053,7 +1053,7 @@ BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter,
}
//END LL_DARWIN
-#elif LL_LINUX
+#elif LL_LINUX || LL_FREEBSD
# if LL_GTK
@@ -1320,6 +1320,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;
@@ -1437,6 +1445,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;
@@ -1499,6 +1516,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;
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index d4eb40ff92..87e87adf9e 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -3855,7 +3855,7 @@ void LLPanelRegionEnvironment::onChkAllowOverride(bool value)
if (LLPanelEstateInfo::isLindenEstate())
notification = "ChangeLindenEstate";
- LLSD args;
+ LLSD args;
args["ESTATENAME"] = LLEstateInfoModel::instance().getName();
LLNotification::Params params(notification);
params.substitutions(args);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6880cf2171..2d22dc8212 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/lllogchat.cpp b/indra/newview/lllogchat.cpp
index ba82ff0b0f..1dd6ac9339 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -41,7 +41,9 @@
#include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/replace.hpp>
+#ifndef LL_USESYSTEMLIBS
#include <boost/regex/v4/match_results.hpp>
+#endif
#include <boost/foreach.hpp>
#if LL_MSVC
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 6589aa477f..f551eea014 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -568,8 +568,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/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 9d0f62a30d..dabbe3a05d 100644
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -204,7 +204,7 @@ bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object)
if (std::find_if(mUnQueuedRequests.begin(), mUnQueuedRequests.end(), upred) != mUnQueuedRequests.end())
return true;
- return false;
+ return false;
}
void LLMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr_t &object)
@@ -829,7 +829,7 @@ bool LLObjectMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &ob
if (std::find_if(mRoundRobinQueue.begin(), mRoundRobinQueue.end(), PredicateMatchRequest(object->getID())) != mRoundRobinQueue.end())
return true;
- return false;
+ return false;
}
void LLObjectMediaDataClient::removeFromQueue(const LLMediaDataClientObject::ptr_t &object)
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 495153981b..cfc30e49a1 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -1715,7 +1715,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
out << "Invalid level of detail: " << which_lod;
LL_WARNS() << out.str() << LL_ENDL;
LLFloaterModelPreview::addStringToLog(out, false);
- assert(lod >= -1 && lod < LLModel::NUM_LODS);
+ assert(which_lod >= -1 && which_lod < LLModel::NUM_LODS);
return;
}
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
index bd34e40642..fc646e6ac2 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/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 3725510b6a..a6002715bb 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -5994,7 +5994,7 @@ LLVivoxVoiceClient::sessionState::~sessionState()
if (mMyIterator != mSession.end())
mSession.erase(mMyIterator);
- removeAllParticipants();
+ removeAllParticipants();
}
bool LLVivoxVoiceClient::sessionState::isCallBackPossible()
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 8d178dbbdc..8baddac121 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -377,7 +377,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/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..d7930d9e81 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
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..3f4adf4d4b 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>
diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml
index d418fc38e3..2e874554a1 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/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 0b19ad1473..09ccc7b8d2 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>
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..36d9b03efc 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>
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..00009b6a05 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>
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..49b2b27668 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>
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..52387a07a8 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グリッド
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..a1ec99ea47 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>
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/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