Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git
This commit is contained in:
4
README
4
README
@@ -15,8 +15,8 @@ Singularity Viewer is a SecondLife(tm) protocol compatible client application.
|
||||
It can be used to access SecondLife services as well as a number of others such
|
||||
as those based upon the OpenSim platform.
|
||||
|
||||
Singulariy is maintained by a small group of volunteers who can be contacted
|
||||
both, in-world (SingularityViewer group) as well on IRC (#SingularityViewer
|
||||
Singularity is maintained by a small group of volunteers who can be contacted
|
||||
both, in-world (SingularityViewer group) as well as on IRC (#SingularityViewer
|
||||
@ FreeNode). Bug requests and features requests can be submitted through our
|
||||
Issue Tracker (http://code.google.com/p/singularity-viewer/issues/list or from
|
||||
the viewer menu: Help --> Bug Reporting --> Singularity Issue Tracker...)
|
||||
|
||||
@@ -75,7 +75,6 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
||||
endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
|
||||
|
||||
add_custom_target(viewer)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
||||
|
||||
@@ -87,28 +86,6 @@ add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
|
||||
# add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
|
||||
#endif (NOT LINUX)
|
||||
|
||||
if (LINUX)
|
||||
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
|
||||
add_dependencies(viewer linux-crash-logger-strip-target)
|
||||
elseif (DARWIN)
|
||||
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
||||
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
|
||||
add_dependencies(viewer mac-crash-logger)
|
||||
#add_dependencies(viewer mac-updater)
|
||||
elseif (WINDOWS)
|
||||
add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
|
||||
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
|
||||
if (EXISTS ${VIEWER_DIR}win_setup)
|
||||
add_subdirectory(${VIEWER_DIR}win_setup)
|
||||
endif (EXISTS ${VIEWER_DIR}win_setup)
|
||||
add_subdirectory(${VIEWER_PREFIX}win_updater)
|
||||
add_dependencies(viewer windows-updater)
|
||||
add_dependencies(viewer windows-crash-logger)
|
||||
elseif (SOLARIS)
|
||||
add_subdirectory(solaris_crash_logger)
|
||||
add_dependencies(viewer solaris-crash-logger)
|
||||
endif (LINUX)
|
||||
|
||||
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
|
||||
add_subdirectory(${VIEWER_PREFIX}newview)
|
||||
add_dependencies(viewer secondlife-bin)
|
||||
|
||||
@@ -202,7 +202,7 @@ char const* HelloWorld::state_str_impl(state_type run_state) const
|
||||
// with that state.
|
||||
// multiplex_impl() may never reentrant (cause itself to be called).
|
||||
// multiplex_impl() should end by callling either one of:
|
||||
// idle(current_state), yield*(), finish() [or abort()].
|
||||
// idle(), yield*(), finish() [or abort()].
|
||||
// Leaving multiplex_impl() without calling any of those might result in an
|
||||
// immediate reentry, which could lead to 100% CPU usage unless the state
|
||||
// is changed with set_state().
|
||||
@@ -212,7 +212,7 @@ char const* HelloWorld::state_str_impl(state_type run_state) const
|
||||
// the call back passed to run() will be called.
|
||||
// Upon return from the call back, the state machine object might be destructed
|
||||
// (see below).
|
||||
// If idle(current_state) was called, and the state was (still) current_state,
|
||||
// If idle() was called, and the state was (still) current_state,
|
||||
// then multiplex_impl() will not be called again until the state is
|
||||
// advanced, or cont() is called.
|
||||
//
|
||||
@@ -245,10 +245,9 @@ char const* HelloWorld::state_str_impl(state_type run_state) const
|
||||
// following functions can be called:
|
||||
//
|
||||
// - set_state(new_state) --> Force the state to new_state. This voids any previous call to set_state() or idle().
|
||||
// - idle(current_state) --> If the current state is still current_state (if there was no call to advance_state()
|
||||
// since the last call to set_state(current_state)) then go idle (do nothing until
|
||||
// cont() or advance_state() is called). If the current state is not current_state,
|
||||
// then multiplex_impl shall be reentered immediately upon return.
|
||||
// - idle() --> If there was no call to advance_state() since the last call to set_state(current_state))
|
||||
// then go idle (do nothing until cont() or advance_state() is called). If the current
|
||||
// state is not current_state, then multiplex_impl shall be reentered immediately upon return.
|
||||
// - finish() --> Disables any scheduled runs.
|
||||
// --> finish_impl --> [optional] kill()
|
||||
// --> call back
|
||||
|
||||
@@ -12,11 +12,25 @@ include(Variables)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
|
||||
"-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
||||
"-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
|
||||
|
||||
# Configure crash reporting
|
||||
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
|
||||
set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
|
||||
|
||||
if(RELEASE_CRASH_REPORTING)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1")
|
||||
endif()
|
||||
|
||||
if(NON_RELEASE_CRASH_REPORTING)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
|
||||
endif()
|
||||
|
||||
|
||||
# Don't bother with a MinSizeRel build.
|
||||
|
||||
|
||||
@@ -8,34 +8,77 @@ if (STANDALONE)
|
||||
include(FindBoost)
|
||||
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
find_package(Boost 1.40.0 COMPONENTS date_time filesystem program_options regex system thread wave)
|
||||
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
|
||||
set(Boost_VERSION "1.52")
|
||||
|
||||
if (WINDOWS)
|
||||
set(BOOST_VERSION 1_45)
|
||||
set(BOOST_OPTIM_SUFFIX mt)
|
||||
set(BOOST_DEBUG_SUFFIX mt-gd)
|
||||
|
||||
set(Boost_CONTEXT_LIBRARY
|
||||
optimized libboost_context-mt
|
||||
debug libboost_context-mt-gd)
|
||||
set(Boost_FILESYSTEM_LIBRARY
|
||||
optimized libboost_filesystem-mt
|
||||
debug libboost_filesystem-mt-gd)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
optimized libboost_program_options-mt
|
||||
debug libboost_program_options-mt-gd)
|
||||
set(Boost_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
|
||||
elseif (DARWIN)
|
||||
set(Boost_FILESYSTEM_LIBRARY boost_filesystem)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
|
||||
set(Boost_REGEX_LIBRARY boost_regex)
|
||||
set(Boost_SYSTEM_LIBRARY boost_system)
|
||||
set(Boost_DATE_TIME_LIBRARY boost_date_time)
|
||||
optimized libboost_regex-mt
|
||||
debug libboost_regex-mt-gd)
|
||||
set(Boost_SIGNALS_LIBRARY
|
||||
optimized libboost_signals-mt
|
||||
debug libboost_signals-mt-gd)
|
||||
set(Boost_SYSTEM_LIBRARY
|
||||
optimized libboost_system-mt
|
||||
debug libboost_system-mt-gd)
|
||||
set(Boost_THREAD_LIBRARY
|
||||
optimized libboost_thread-mt
|
||||
debug libboost_thread-mt-gd)
|
||||
elseif (LINUX)
|
||||
set(Boost_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(Boost_REGEX_LIBRARY boost_regex-mt)
|
||||
set(Boost_SYSTEM_LIBRARY boost_system-mt)
|
||||
set(Boost_DATE_TIME_LIBRARY boost_date_time-mt)
|
||||
set(Boost_CONTEXT_LIBRARY
|
||||
optimized boost_context-mt.a
|
||||
debug boost_context-mt-d.a)
|
||||
set(Boost_FILESYSTEM_LIBRARY
|
||||
optimized boost_filesystem-mt.a
|
||||
debug boost_filesystem-mt-d.a)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized boost_program_options-mt.a
|
||||
debug boost_program_options-mt-d.a)
|
||||
set(Boost_REGEX_LIBRARY
|
||||
optimized boost_regex-mt.a
|
||||
debug boost_regex-mt-d.a)
|
||||
set(Boost_SIGNALS_LIBRARY
|
||||
optimized boost_signals-mt.a
|
||||
debug boost_signals-mt-d.a)
|
||||
set(Boost_SYSTEM_LIBRARY
|
||||
optimized boost_system-mt.a
|
||||
debug boost_system-mt-d.a)
|
||||
set(Boost_THREAD_LIBRARY
|
||||
optimized boost_thread-mt.a
|
||||
debug boost_thread-mt-d.a)
|
||||
elseif (DARWIN)
|
||||
set(Boost_CONTEXT_LIBRARY
|
||||
optimized boost_context-mt
|
||||
debug boost_context-mt-d)
|
||||
set(Boost_FILESYSTEM_LIBRARY
|
||||
optimized boost_filesystem-mt
|
||||
debug boost_filesystem-mt-d)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized boost_program_options-mt
|
||||
debug boost_program_options-mt-d)
|
||||
set(Boost_REGEX_LIBRARY
|
||||
optimized boost_regex-mt
|
||||
debug boost_regex-mt-d)
|
||||
set(Boost_SIGNALS_LIBRARY
|
||||
optimized boost_signals-mt
|
||||
debug boost_signals-mt-d)
|
||||
set(Boost_SYSTEM_LIBRARY
|
||||
optimized boost_system-mt
|
||||
debug boost_system-mt-d)
|
||||
set(Boost_THREAD_LIBRARY
|
||||
optimized boost_thread-mt
|
||||
debug boost_thread-mt-d)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -37,6 +37,7 @@ set(cmake_SOURCE_FILES
|
||||
FindColladadom.cmake
|
||||
FindELFIO.cmake
|
||||
FindGLOD.cmake
|
||||
FindGoogleBreakpad.cmake
|
||||
FindGooglePerfTools.cmake
|
||||
FindHunSpell.cmake
|
||||
FindJsonCpp.cmake
|
||||
@@ -50,6 +51,7 @@ set(cmake_SOURCE_FILES
|
||||
GStreamer010Plugin.cmake
|
||||
Glui.cmake
|
||||
Glut.cmake
|
||||
GoogleBreakpad.cmake
|
||||
GooglePerfTools.cmake
|
||||
Hunspell.cmake
|
||||
JPEG.cmake
|
||||
@@ -59,7 +61,6 @@ set(cmake_SOURCE_FILES
|
||||
LLAudio.cmake
|
||||
LLCharacter.cmake
|
||||
LLCommon.cmake
|
||||
LLCrashLogger.cmake
|
||||
LLImage.cmake
|
||||
LLImageJ2COJ.cmake
|
||||
LLInventory.cmake
|
||||
@@ -69,6 +70,7 @@ set(cmake_SOURCE_FILES
|
||||
LLPlugin.cmake
|
||||
LLPrimitive.cmake
|
||||
LLPhysicsExtensions.cmake
|
||||
LLSharedLibs.cmake
|
||||
LLQtWebkit.cmake
|
||||
LLRender.cmake
|
||||
LLUI.cmake
|
||||
|
||||
@@ -10,9 +10,9 @@ if (STANDALONE)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(colladadom)
|
||||
|
||||
if (NOT WINDOWS)
|
||||
if (NOT WINDOWS AND NOT LINUX)
|
||||
use_prebuilt_binary(pcre)
|
||||
endif (NOT WINDOWS)
|
||||
endif (NOT WINDOWS AND NOT LINUX)
|
||||
|
||||
if (NOT DARWIN AND NOT WINDOWS)
|
||||
use_prebuilt_binary(libxml)
|
||||
@@ -28,18 +28,12 @@ else (STANDALONE)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
debug libcollada14dom22-d
|
||||
optimized libcollada14dom22
|
||||
debug libboost_filesystem-vc100-mt-gd-1_45.lib
|
||||
optimized libboost_filesystem-vc100-mt-1_45.lib
|
||||
debug libboost_system-vc100-mt-gd-1_45.lib
|
||||
optimized libboost_system-vc100-mt-1_45.lib
|
||||
)
|
||||
else (WINDOWS)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
collada14dom
|
||||
minizip
|
||||
xml2
|
||||
pcrecpp
|
||||
pcre
|
||||
)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -14,7 +14,7 @@ IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
|
||||
else (WORD_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 (WORD_SIZE EQUAL 32)
|
||||
|
||||
|
||||
@@ -1,18 +1,55 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
include(Variables)
|
||||
|
||||
if (WINDOWS)
|
||||
find_path(DIRECTX_INCLUDE_DIR dxdiag.h
|
||||
"$ENV{DXSDK_DIR}/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include"
|
||||
"C:/DX90SDK/Include"
|
||||
"$ENV{PROGRAMFILES}/DX90SDK/Include"
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set (DIRECTX_ARCHITECTURE x86)
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
set (DIRECTX_ARCHITECTURE x64)
|
||||
else (WORD_SIZE EQUAL 32)
|
||||
set (DIRECTX_ARCHITECTURE x86)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
|
||||
find_path(DIRECTX_ROOT_DIR Include/dxdiag.h
|
||||
PATHS
|
||||
"$ENV{DXSDK_DIR}"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (June 2010)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (June 2010)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (February 2010)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (February 2010)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (March 2009)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (March 2009)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (August 2008)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (August 2008)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (June 2008)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (June 2008)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (March 2008)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (March 2008)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (November 2007)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (November 2007)"
|
||||
"$ENV{ProgramFiles}/Microsoft DirectX SDK (August 2007)"
|
||||
"$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (August 2007)"
|
||||
)
|
||||
|
||||
if (DIRECTX_ROOT_DIR)
|
||||
set (DIRECTX_INCLUDE_DIR "${DIRECTX_ROOT_DIR}/Include")
|
||||
set (DIRECTX_LIBRARY_DIR "${DIRECTX_ROOT_DIR}/Lib/${DIRECTX_ARCHITECTURE}")
|
||||
else (DIRECTX_ROOT_DIR)
|
||||
find_path (WIN_KIT_ROOT_DIR Include/um/windows.h
|
||||
PATHS
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.1"
|
||||
"$ENV{ProgramFiles(x86)}/Windows Kits/8.1"
|
||||
"$ENV{ProgramFiles}/Windows Kits/8.0"
|
||||
"$ENV{ProgramFiles(x86)}/Windows Kits/8.0"
|
||||
)
|
||||
|
||||
if (WIN_KIT_ROOT_DIR)
|
||||
set (DIRECTX_INCLUDE_DIR "${WIN_KIT_ROOT_DIR}/Include/um" "${WIN_KIT_ROOT_DIR}/Include/shared")
|
||||
set (DIRECTX_LIBRARY_DIR "${WIN_KIT_ROOT_DIR}/Lib/Win8/um/${DIRECTX_ARCHITECTURE}")
|
||||
endif (WIN_KIT_ROOT_DIR)
|
||||
endif (DIRECTX_ROOT_DIR)
|
||||
|
||||
if (DIRECTX_INCLUDE_DIR)
|
||||
include_directories(${DIRECTX_INCLUDE_DIR})
|
||||
if (DIRECTX_FIND_QUIETLY)
|
||||
@@ -22,19 +59,6 @@ if (WINDOWS)
|
||||
message(FATAL_ERROR "Could not find DirectX SDK Include")
|
||||
endif (DIRECTX_INCLUDE_DIR)
|
||||
|
||||
|
||||
find_path(DIRECTX_LIBRARY_DIR dxguid.lib
|
||||
"$ENV{DXSDK_DIR}/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86"
|
||||
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86"
|
||||
"C:/DX90SDK/Lib"
|
||||
"$ENV{PROGRAMFILES}/DX90SDK/Lib"
|
||||
)
|
||||
if (DIRECTX_LIBRARY_DIR)
|
||||
if (DIRECTX_FIND_QUIETLY)
|
||||
message(STATUS "Found DirectX include: ${DIRECTX_LIBRARY_DIR}")
|
||||
|
||||
40
indra/cmake/FindGoogleBreakpad.cmake
Normal file
40
indra/cmake/FindGoogleBreakpad.cmake
Normal file
@@ -0,0 +1,40 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# - Find Google BreakPad
|
||||
# Find the Google BreakPad includes and library
|
||||
# This module defines
|
||||
# BREAKPAD_INCLUDE_DIRECTORIES, where to find the Goole BreakPad includes.
|
||||
# BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad.
|
||||
# BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad.
|
||||
# also defined, but not for general use are
|
||||
# BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library.
|
||||
|
||||
FIND_PATH(BREAKPAD_INCLUDE_DIRECTORIES common/using_std_string.h PATH_SUFFIXES google_breakpad)
|
||||
|
||||
SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client)
|
||||
FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY
|
||||
NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES}
|
||||
)
|
||||
|
||||
IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
|
||||
SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY})
|
||||
SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES")
|
||||
ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
|
||||
SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO")
|
||||
ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_INCLUDE_DIRECTORIES)
|
||||
|
||||
|
||||
IF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
|
||||
IF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Google BreakPad: ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}")
|
||||
ENDIF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY)
|
||||
ELSE (BREAKPAD_EXCEPTION_HANDLER_FOUND)
|
||||
IF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find Google BreakPad library")
|
||||
ENDIF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED)
|
||||
ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
BREAKPAD_EXCEPTION_HANDLER_LIBRARY
|
||||
BREAKPAD_INCLUDE_DIRECTORIES
|
||||
)
|
||||
21
indra/cmake/GoogleBreakpad.cmake
Normal file
21
indra/cmake/GoogleBreakpad.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (STANDALONE)
|
||||
set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON)
|
||||
include(FindGoogleBreakpad)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(google_breakpad)
|
||||
if (DARWIN)
|
||||
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler)
|
||||
endif (DARWIN)
|
||||
if (LINUX)
|
||||
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client)
|
||||
endif (LINUX)
|
||||
if (WINDOWS)
|
||||
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client crash_generation_server common)
|
||||
endif (WINDOWS)
|
||||
# yes, this does look dumb, no, it's not incorrect
|
||||
# I think it's incorrect: the second one should go --Aleric
|
||||
set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad/google_breakpad")
|
||||
endif (STANDALONE)
|
||||
@@ -159,3 +159,23 @@ MACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
|
||||
## MESSAGE(STATUS "ADD_VIEWER_COMM_BUILD_TEST ${name} wrapper = ${wrapper}")
|
||||
ADD_COMM_BUILD_TEST("${name}" "${parent}" "${wrapper}" llviewerprecompiledheaders.cpp)
|
||||
ENDMACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
|
||||
MACRO(SET_TEST_PATH LISTVAR)
|
||||
IF(WINDOWS)
|
||||
# We typically build/package only Release variants of third-party
|
||||
# libraries, so append the Release staging dir in case the library being
|
||||
# sought doesn't have a debug variant.
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release)
|
||||
ELSEIF(DARWIN)
|
||||
# We typically build/package only Release variants of third-party
|
||||
# libraries, so append the Release staging dir in case the library being
|
||||
# sought doesn't have a debug variant.
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
|
||||
ELSE(WINDOWS)
|
||||
# Linux uses a single staging directory anyway.
|
||||
IF (STANDALONE)
|
||||
set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib)
|
||||
ELSE (STANDALONE)
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
|
||||
ENDIF (STANDALONE)
|
||||
ENDIF(WINDOWS)
|
||||
ENDMACRO(SET_TEST_PATH)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
set(LLCRASHLOGGER_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llcrashlogger
|
||||
)
|
||||
|
||||
set(LLCRASHLOGGER_LIBRARIES llcrashlogger)
|
||||
73
indra/cmake/LLSharedLibs.cmake
Normal file
73
indra/cmake/LLSharedLibs.cmake
Normal file
@@ -0,0 +1,73 @@
|
||||
# ll_deploy_sharedlibs_command
|
||||
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
||||
macro(ll_deploy_sharedlibs_command target_exe)
|
||||
get_target_property(TARGET_LOCATION ${target_exe} LOCATION)
|
||||
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
|
||||
|
||||
if(DARWIN)
|
||||
SET_TEST_PATH(SEARCH_DIRS)
|
||||
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
|
||||
if(IS_BUNDLE)
|
||||
# If its a bundle the exe is not in the target location, this should find it.
|
||||
get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME)
|
||||
set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS)
|
||||
set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
|
||||
set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
|
||||
endif(IS_BUNDLE)
|
||||
elseif(WINDOWS)
|
||||
SET_TEST_PATH(SEARCH_DIRS)
|
||||
LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32")
|
||||
elseif(LINUX)
|
||||
SET_TEST_PATH(SEARCH_DIRS)
|
||||
set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
|
||||
endif(DARWIN)
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${target_exe} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
"-DBIN_NAME=\"${TARGET_LOCATION}\""
|
||||
"-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
|
||||
"-DDST_PATH=\"${OUTPUT_PATH}\""
|
||||
"-P"
|
||||
"${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake"
|
||||
)
|
||||
|
||||
endmacro(ll_deploy_sharedlibs_command)
|
||||
|
||||
# ll_stage_sharedlib
|
||||
# Performs config and adds a copy command for a sharedlib target.
|
||||
macro(ll_stage_sharedlib DSO_TARGET)
|
||||
# target gets written to the DLL staging directory.
|
||||
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
||||
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
||||
if(NOT WINDOWS)
|
||||
get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
|
||||
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
||||
if(DARWIN)
|
||||
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
||||
else(DARWIN)
|
||||
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
|
||||
endif(DARWIN)
|
||||
|
||||
# *TODO - maybe make this a symbolic link? -brad
|
||||
add_custom_command(
|
||||
TARGET ${DSO_TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
-E
|
||||
copy_if_different
|
||||
${DSO_PATH}
|
||||
${SHARED_LIB_STAGING_DIR_CONFIG}/${DSO_FILE}
|
||||
COMMENT "Copying llcommon to the staging folder."
|
||||
)
|
||||
endif(NOT WINDOWS)
|
||||
|
||||
if (DARWIN)
|
||||
set_target_properties(${DSO_TARGET} PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH 1
|
||||
INSTALL_NAME_DIR "@executable_path/../Resources"
|
||||
)
|
||||
endif(DARWIN)
|
||||
|
||||
endmacro(ll_stage_sharedlib)
|
||||
@@ -679,7 +679,7 @@ namespace HACD
|
||||
{
|
||||
if ((!condition1) && m_callBack)
|
||||
{
|
||||
sprintf(msg, "\n-> %lu\t%f\t%f\t%f\n", m_pqueue.size(), m_graph.m_vertices[v1].m_surf*100.0/m_area, m_graph.m_vertices[v2].m_surf*100.0/m_area, m_graph.m_edges[currentEdge.m_name].m_concavity);
|
||||
sprintf(msg, "\n-> %zu\t%f\t%f\t%f\n", m_pqueue.size(), m_graph.m_vertices[v1].m_surf*100.0/m_area, m_graph.m_vertices[v2].m_surf*100.0/m_area, m_graph.m_edges[currentEdge.m_name].m_concavity);
|
||||
(*m_callBack)(msg, progress, globalConcavity, m_graph.GetNVertices());
|
||||
}
|
||||
globalConcavity = std::max<double>(globalConcavity ,m_graph.m_edges[currentEdge.m_name].m_concavity);
|
||||
@@ -879,7 +879,7 @@ namespace HACD
|
||||
if (m_callBack)
|
||||
{
|
||||
char msg[1024];
|
||||
sprintf(msg, "\t CH(%lu) \t %lu \t %lf \t %lu \t %f \t %lu\n", v, static_cast<unsigned long>(p), m_graph.m_vertices[v].m_concavity, m_graph.m_vertices[v].m_distPoints.Size(), m_graph.m_vertices[v].m_surf*100.0/m_area, m_graph.m_vertices[v].m_ancestors.size());
|
||||
sprintf(msg, "\t CH(%zu) \t %zu \t %lf \t %zu \t %f \t %zu\n", v, static_cast<unsigned long>(p), m_graph.m_vertices[v].m_concavity, m_graph.m_vertices[v].m_distPoints.Size(), m_graph.m_vertices[v].m_surf*100.0/m_area, m_graph.m_vertices[v].m_ancestors.size());
|
||||
(*m_callBack)(msg, 0.0, 0.0, m_nClusters);
|
||||
p++;
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(linux_crash_logger)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLCrashLogger)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLVFS)
|
||||
include(LLXML)
|
||||
include(Linking)
|
||||
include(UI)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLCRASHLOGGER_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLVFS_INCLUDE_DIRS}
|
||||
${LLXML_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(linux_crash_logger_SOURCE_FILES
|
||||
linux_crash_logger.cpp
|
||||
llcrashloggerlinux.cpp
|
||||
)
|
||||
|
||||
set(linux_crash_logger_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
llcrashloggerlinux.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${linux_crash_logger_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND linux_crash_logger_SOURCE_FILES
|
||||
${linux_crash_logger_HEADER_FILES}
|
||||
)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
|
||||
|
||||
add_executable(linux-crash-logger ${linux_crash_logger_SOURCE_FILES})
|
||||
|
||||
target_link_libraries(linux-crash-logger
|
||||
${LLCRASHLOGGER_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
${LLMESSAGE_LIBRARIES}
|
||||
${LLUI_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${UI_LIBRARIES}
|
||||
${DB_LIBRARIES}
|
||||
${XMLRPCEPI_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${APRUTIL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
rt
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT linux-crash-logger-stripped
|
||||
COMMAND strip
|
||||
ARGS --strip-debug -o linux-crash-logger-stripped linux-crash-logger
|
||||
DEPENDS linux-crash-logger
|
||||
)
|
||||
|
||||
add_custom_target(linux-crash-logger-strip-target ALL
|
||||
DEPENDS linux-crash-logger-stripped)
|
||||
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* @file linux_crash_logger.cpp
|
||||
* @brief Linux crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llcrashloggerlinux.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
LLCrashLoggerLinux app;
|
||||
app.parseCommandOptions(argc, argv);
|
||||
app.init();
|
||||
app.mainLoop();
|
||||
app.cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
/**
|
||||
* @file llcrashloggerlinux.cpp
|
||||
* @brief Linux crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llcrashloggerlinux.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "boost/tokenizer.hpp"
|
||||
|
||||
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
|
||||
#include "llerror.h"
|
||||
#include "llfile.h"
|
||||
#include "lltimer.h"
|
||||
#include "llstring.h"
|
||||
#include "lldir.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#if LL_GTK
|
||||
# include "gtk/gtk.h"
|
||||
#endif // LL_GTK
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
// These need to be localized.
|
||||
static const char dialog_text[] =
|
||||
"Second Life appears to have crashed or frozen last time it ran.\n"
|
||||
"This crash reporter collects information about your computer's hardware, operating system, and some Second Life logs, all of which are used for debugging purposes only.\n"
|
||||
"\n"
|
||||
"Send crash report?";
|
||||
|
||||
static const char dialog_title[] =
|
||||
"Second Life Crash Logger";
|
||||
|
||||
#if LL_GTK
|
||||
static void response_callback (GtkDialog *dialog,
|
||||
gint arg1,
|
||||
gpointer user_data)
|
||||
{
|
||||
gint *response = (gint*)user_data;
|
||||
*response = arg1;
|
||||
gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||
gtk_main_quit();
|
||||
}
|
||||
#endif // LL_GTK
|
||||
|
||||
static BOOL do_ask_dialog(void)
|
||||
{
|
||||
#if LL_GTK
|
||||
gtk_disable_setlocale();
|
||||
if (!gtk_init_check(NULL, NULL)) {
|
||||
llinfos << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *win = NULL;
|
||||
GtkDialogFlags flags = GTK_DIALOG_MODAL;
|
||||
GtkMessageType messagetype = GTK_MESSAGE_QUESTION;
|
||||
GtkButtonsType buttons = GTK_BUTTONS_YES_NO;
|
||||
gint response = GTK_RESPONSE_NONE;
|
||||
|
||||
win = gtk_message_dialog_new(NULL,
|
||||
flags, messagetype, buttons,
|
||||
"%s", dialog_text);
|
||||
gtk_window_set_type_hint(GTK_WINDOW(win),
|
||||
GDK_WINDOW_TYPE_HINT_DIALOG);
|
||||
gtk_window_set_title(GTK_WINDOW(win), dialog_title);
|
||||
g_signal_connect (win,
|
||||
"response",
|
||||
G_CALLBACK (response_callback),
|
||||
&response);
|
||||
gtk_widget_show_all (win);
|
||||
gtk_main();
|
||||
|
||||
return (GTK_RESPONSE_OK == response ||
|
||||
GTK_RESPONSE_YES == response ||
|
||||
GTK_RESPONSE_APPLY == response);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif // LL_GTK
|
||||
}
|
||||
|
||||
LLCrashLoggerLinux::LLCrashLoggerLinux(void)
|
||||
{
|
||||
}
|
||||
|
||||
LLCrashLoggerLinux::~LLCrashLoggerLinux(void)
|
||||
{
|
||||
}
|
||||
|
||||
void LLCrashLoggerLinux::gatherPlatformSpecificFiles()
|
||||
{
|
||||
mFileMap["CrashLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log").c_str();
|
||||
}
|
||||
|
||||
bool LLCrashLoggerLinux::mainLoop()
|
||||
{
|
||||
bool send_logs = true;
|
||||
if(CRASH_BEHAVIOR_ASK == getCrashBehavior())
|
||||
{
|
||||
send_logs = do_ask_dialog();
|
||||
}
|
||||
else if(CRASH_BEHAVIOR_NEVER_SEND == getCrashBehavior())
|
||||
{
|
||||
send_logs = false;
|
||||
}
|
||||
|
||||
if(send_logs)
|
||||
{
|
||||
sendCrashLogs();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLCrashLoggerLinux::updateApplication(const std::string& message)
|
||||
{
|
||||
LLCrashLogger::updateApplication(message);
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* @file llcrashloggerlinux.h
|
||||
* @brief Linux crash logger definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLCRASHLOGGERLINUX_H
|
||||
#define LLCRASHLOGGERLINUX_H
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llcrashlogger.h"
|
||||
#include "llstring.h"
|
||||
|
||||
class LLCrashLoggerLinux : public LLCrashLogger
|
||||
{
|
||||
public:
|
||||
LLCrashLoggerLinux(void);
|
||||
~LLCrashLoggerLinux(void);
|
||||
virtual bool mainLoop();
|
||||
virtual void updateApplication(const std::string& = LLStringUtil::null);
|
||||
virtual void gatherPlatformSpecificFiles();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -104,6 +104,7 @@ LLWearableDictionary::LLWearableDictionary()
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||
// [/SL:KB]
|
||||
|
||||
addEntry(LLWearableType::WT_UNKNOWN, new WearableEntry("unknown", "Clothing", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNKNOWN, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
}
|
||||
|
||||
@@ -61,7 +61,10 @@ public:
|
||||
WT_ALPHA = 13,
|
||||
WT_TATTOO = 14,
|
||||
WT_PHYSICS = 15,
|
||||
WT_COUNT = 16,
|
||||
WT_UNKNOWN = 16, // Singu note: used for corrupt wearables that do not have their type set in the inventory database.
|
||||
// While all the above values are serialized and stored in the database, this value is local only:
|
||||
// When a new item with value 16 is added by upstream, just increase this value to 17 (and WT_COUNT to 18).
|
||||
WT_COUNT = 17,
|
||||
|
||||
WT_INVALID = 255,
|
||||
WT_NONE = -1,
|
||||
|
||||
@@ -323,7 +323,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
|
||||
//Also add sources that might be able to start playing to a priority queue.
|
||||
//Only sources without channels, or are waiting for a syncmaster, should be added to this queue.
|
||||
std::priority_queue<audio_source_t,std::vector<audio_source_t,boost::pool_allocator<audio_source_t> >,SourcePriorityComparator> queue;
|
||||
for (source_map::iterator iter = mAllSources.begin(); iter != mAllSources.end(); ++iter)
|
||||
for (source_map::iterator iter = mAllSources.begin(); iter != mAllSources.end();)
|
||||
{
|
||||
LLAudioSource *sourcep = iter->second;
|
||||
|
||||
@@ -339,6 +339,9 @@ void LLAudioEngine::idle(F32 max_decode_time)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Increment iter here (it is not used anymore), so we can use continue below to move on to the next source.
|
||||
++iter;
|
||||
|
||||
LLAudioData *adp = sourcep->getCurrentData();
|
||||
//If there is no current data at all, or if it hasn't loaded, we must skip this source.
|
||||
if (!adp || !adp->getBuffer())
|
||||
|
||||
@@ -215,7 +215,16 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
if (!target.isFinite())
|
||||
{
|
||||
llwarns << "Non finite target in editing motion with target distance of " << target_dist <<
|
||||
" and focus point " << focus_pt << " and pointAtPt: " << *pointAtPt << llendl;
|
||||
" and focus point " << focus_pt << " and pointAtPt: ";
|
||||
if (pointAtPt)
|
||||
{
|
||||
llcont << *pointAtPt;
|
||||
}
|
||||
else
|
||||
{
|
||||
llcont << "NULL";
|
||||
}
|
||||
llcont << llendl;
|
||||
}
|
||||
|
||||
mTarget.setPosition( target + mParentJoint.getPosition());
|
||||
|
||||
@@ -280,7 +280,7 @@ BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask)
|
||||
avatar_movement_dir.normalize();
|
||||
|
||||
// planted foot speed is avatar velocity - foot slip amount along avatar movement direction
|
||||
F32 foot_speed = speed - ((foot_slip_vector * avatar_movement_dir) / delta_time);
|
||||
F32 foot_speed = llmax(0.f, speed - ((foot_slip_vector * avatar_movement_dir) / delta_time));
|
||||
|
||||
// multiply animation playback rate so that foot speed matches avatar speed
|
||||
F32 min_speed_multiplier = clamp_rescale(speed, 0.f, 1.f, 0.f, 0.1f);
|
||||
|
||||
@@ -7,11 +7,13 @@ include(00-Common)
|
||||
include(LLCommon)
|
||||
include(APR)
|
||||
include(Linking)
|
||||
include(GoogleBreakpad)
|
||||
|
||||
include_directories(
|
||||
${EXPAT_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${BREAKPAD_INCLUDE_DIRECTORIES}
|
||||
)
|
||||
|
||||
set(llcommon_SOURCE_FILES
|
||||
@@ -266,11 +268,13 @@ add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
|
||||
add_dependencies(llcommon prepare)
|
||||
target_link_libraries(
|
||||
llcommon
|
||||
${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}
|
||||
${APRUTIL_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${Boost_CONTEXT_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${CORESERVICES_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -149,6 +149,14 @@ const char WATER_LAYER_CODE = 'W';
|
||||
const char WIND_LAYER_CODE = '7';
|
||||
const char CLOUD_LAYER_CODE = '8';
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
// Extended land layer for Aurora Sim
|
||||
const char AURORA_LAND_LAYER_CODE = 'M';
|
||||
const char AURORA_WATER_LAYER_CODE = 'X';
|
||||
const char AURORA_WIND_LAYER_CODE = '9';
|
||||
const char AURORA_CLOUD_LAYER_CODE = ':';
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// keys
|
||||
// Bit masks for various keyboard modifier keys.
|
||||
const MASK MASK_NONE = 0x0000;
|
||||
|
||||
@@ -116,14 +116,14 @@ void LLAlignedArray<T, alignment>::resize(U32 size)
|
||||
template <class T, U32 alignment>
|
||||
T& LLAlignedArray<T, alignment>::operator[](int idx)
|
||||
{
|
||||
llassert(idx < mElementCount);
|
||||
llassert((U32)idx < mElementCount);
|
||||
return mArray[idx];
|
||||
}
|
||||
|
||||
template <class T, U32 alignment>
|
||||
const T& LLAlignedArray<T, alignment>::operator[](int idx) const
|
||||
{
|
||||
llassert(idx < mElementCount);
|
||||
llassert((U32)idx < mElementCount);
|
||||
return mArray[idx];
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,14 @@
|
||||
#include "linden_common.h"
|
||||
#include "llapp.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef LL_DARWIN
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#include "llcommon.h"
|
||||
#include "llapr.h"
|
||||
#include "llerrorcontrol.h"
|
||||
@@ -35,7 +43,9 @@
|
||||
#include "lllivefile.h"
|
||||
#include "llmemory.h"
|
||||
#include "llstl.h" // for DeletePointer()
|
||||
#include "llstring.h"
|
||||
#include "lleventtimer.h"
|
||||
#include "exception_handler.h"
|
||||
|
||||
//
|
||||
// Signal handling
|
||||
@@ -43,13 +53,34 @@
|
||||
// Windows uses structured exceptions, so it's handled a bit differently.
|
||||
//
|
||||
#if LL_WINDOWS
|
||||
#include "windows.h"
|
||||
|
||||
LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop);
|
||||
BOOL ConsoleCtrlHandler(DWORD fdwCtrlType);
|
||||
bool windows_post_minidump_callback(const wchar_t* dump_path,
|
||||
const wchar_t* minidump_id,
|
||||
void* context,
|
||||
EXCEPTION_POINTERS* exinfo,
|
||||
MDRawAssertionInfo* assertion,
|
||||
bool succeeded);
|
||||
#else
|
||||
# include <signal.h>
|
||||
# include <unistd.h> // for fork()
|
||||
void setup_signals();
|
||||
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
||||
|
||||
#if LL_LINUX
|
||||
#include "client/linux/handler/minidump_descriptor.h"
|
||||
static bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc,
|
||||
void* context,
|
||||
bool succeeded);
|
||||
#else
|
||||
// Called by breakpad exception handler after the minidump has been generated.
|
||||
bool unix_post_minidump_callback(const char *dump_dir,
|
||||
const char *minidump_id,
|
||||
void *context, bool succeeded);
|
||||
#endif
|
||||
|
||||
# if LL_DARWIN
|
||||
/* OSX doesn't support SIGRT* */
|
||||
S32 LL_SMACKDOWN_SIGNAL = SIGUSR1;
|
||||
@@ -79,7 +110,6 @@ BOOL LLApp::sLogInSignal = FALSE;
|
||||
// static
|
||||
LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status
|
||||
LLAppErrorHandler LLApp::sErrorHandler = NULL;
|
||||
LLAppErrorHandler LLApp::sSyncErrorHandler = NULL;
|
||||
BOOL LLApp::sErrorThreadRunning = FALSE;
|
||||
#if !LL_WINDOWS
|
||||
LLApp::child_map LLApp::sChildMap;
|
||||
@@ -100,14 +130,6 @@ void LLApp::commonCtor()
|
||||
|
||||
LLCommon::initClass();
|
||||
|
||||
#if !LL_WINDOWS
|
||||
// This must be initialized before the error handler.
|
||||
sSigChildCount = new LLAtomicU32(0);
|
||||
#endif
|
||||
|
||||
// Setup error handling
|
||||
setupErrorHandling();
|
||||
|
||||
// initialize the options structure. We need to make this an array
|
||||
// because the structured data will not auto-allocate if we
|
||||
// reference an invalid location with the [] operator.
|
||||
@@ -118,8 +140,19 @@ void LLApp::commonCtor()
|
||||
mOptions.append(sd);
|
||||
}
|
||||
|
||||
// Make sure we clean up APR when we exit
|
||||
// Don't need to do this if we're cleaning up APR in the destructor
|
||||
//atexit(ll_cleanup_apr);
|
||||
|
||||
// Set the application to this instance.
|
||||
sApplication = this;
|
||||
|
||||
mExceptionHandler = 0;
|
||||
|
||||
// initialize the buffer to write the minidump filename to
|
||||
// (this is used to avoid allocating memory in the crash handler)
|
||||
memset(mMinidumpPath, 0, MAX_MINDUMP_PATH_LENGTH);
|
||||
mCrashReportPipeStr = L"\\\\.\\pipe\\LLCrashReporterPipe";
|
||||
}
|
||||
|
||||
LLApp::LLApp(LLErrorThread *error_thread) :
|
||||
@@ -131,10 +164,6 @@ LLApp::LLApp(LLErrorThread *error_thread) :
|
||||
|
||||
LLApp::~LLApp()
|
||||
{
|
||||
#if !LL_WINDOWS
|
||||
delete sSigChildCount;
|
||||
sSigChildCount = NULL;
|
||||
#endif
|
||||
|
||||
// reclaim live file memory
|
||||
std::for_each(mLiveFiles.begin(), mLiveFiles.end(), DeletePointer());
|
||||
@@ -148,6 +177,8 @@ LLApp::~LLApp()
|
||||
delete mThreadErrorp;
|
||||
mThreadErrorp = NULL;
|
||||
}
|
||||
|
||||
if(mExceptionHandler != 0) delete mExceptionHandler;
|
||||
|
||||
LLCommon::cleanupClass();
|
||||
}
|
||||
@@ -207,6 +238,20 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
|
||||
}
|
||||
++ii;
|
||||
value.assign(argv[ii]);
|
||||
|
||||
#if LL_WINDOWS
|
||||
//Windows changed command line parsing. Deal with it.
|
||||
S32 slen = value.length() - 1;
|
||||
S32 start = 0;
|
||||
S32 end = slen;
|
||||
if (argv[ii][start]=='"')start++;
|
||||
if (argv[ii][end]=='"')end--;
|
||||
if (start!=0 || end!=slen)
|
||||
{
|
||||
value = value.substr (start,end);
|
||||
}
|
||||
#endif
|
||||
|
||||
commands[name] = value;
|
||||
}
|
||||
setOptionData(PRIORITY_COMMAND_LINE, commands);
|
||||
@@ -254,14 +299,60 @@ void LLApp::setupErrorHandling()
|
||||
// What we do is install an unhandled exception handler, which will try to do the right thing
|
||||
// in the case of an error (generate a minidump)
|
||||
|
||||
// Disable this until the viewer gets ported so server crashes can be JIT debugged.
|
||||
//LPTOP_LEVEL_EXCEPTION_FILTER prev_filter;
|
||||
//prev_filter = SetUnhandledExceptionFilter(default_windows_exception_handler);
|
||||
|
||||
#if LL_SEND_CRASH_REPORTS
|
||||
// This sets a callback to handle w32 signals to the console window.
|
||||
// The viewer shouldn't be affected, sicne its a windowed app.
|
||||
SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE);
|
||||
|
||||
// Install the Google Breakpad crash handler for Windows
|
||||
if(mExceptionHandler == 0)
|
||||
{
|
||||
llwarns << "adding breakpad exception handler" << llendl;
|
||||
|
||||
std::wostringstream ws;
|
||||
ws << mCrashReportPipeStr << getPid();
|
||||
std::wstring wpipe_name = ws.str();
|
||||
std::string ptmp = std::string(wpipe_name.begin(), wpipe_name.end());
|
||||
|
||||
::Sleep(2000); //HACK hopefully a static wait won't blow up in my face before google fixes their implementation.
|
||||
|
||||
//HACK this for loop is ueless. Breakpad dumbly returns success when the OOP handler isn't initialized.
|
||||
for (int retries=0;retries<5;++retries)
|
||||
{
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(
|
||||
L"",
|
||||
NULL, //No filter
|
||||
windows_post_minidump_callback,
|
||||
0,
|
||||
google_breakpad::ExceptionHandler::HANDLER_ALL,
|
||||
MiniDumpNormal, //Generate a 'normal' minidump.
|
||||
(WCHAR *)wpipe_name.c_str(),
|
||||
NULL); //No custom client info.
|
||||
if (mExceptionHandler)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
::Sleep(100); //Wait a tick and try again.
|
||||
}
|
||||
}
|
||||
if (!mExceptionHandler)
|
||||
{
|
||||
llwarns << "Failed to initialize OOP exception handler. Defaulting to In Process handling" << llendl;
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(
|
||||
std::wstring(mDumpPath.begin(),mDumpPath.end()), //Dump path
|
||||
0, //dump filename
|
||||
windows_post_minidump_callback,
|
||||
0,
|
||||
google_breakpad::ExceptionHandler::HANDLER_ALL);
|
||||
}
|
||||
if (mExceptionHandler)
|
||||
{
|
||||
mExceptionHandler->set_handle_debug_exceptions(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
//
|
||||
// Start up signal handling.
|
||||
@@ -271,9 +362,61 @@ void LLApp::setupErrorHandling()
|
||||
//
|
||||
|
||||
setup_signals();
|
||||
|
||||
// Add google breakpad exception handler configured for Darwin/Linux.
|
||||
bool installHandler = true;
|
||||
#if LL_DARWIN
|
||||
// For the special case of Darwin, we do not want to install the handler if
|
||||
// the process is being debugged as the app will exit with value ABRT (6) if
|
||||
// we do. Unfortunately, the code below which performs that test relies on
|
||||
// the structure kinfo_proc which has been tagged by apple as an unstable
|
||||
// API. We disable this test for shipping versions to avoid conflicts with
|
||||
// future releases of Darwin. This test is really only needed for developers
|
||||
// starting the app from a debugger anyway.
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
int mib[4];
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_PROC;
|
||||
mib[2] = KERN_PROC_PID;
|
||||
mib[3] = getpid();
|
||||
|
||||
struct kinfo_proc info;
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
||||
size_t size = sizeof(info);
|
||||
int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
|
||||
if((result == 0) || (errno == ENOMEM))
|
||||
{
|
||||
// P_TRACED flag is set, so this process is being debugged; do not install
|
||||
// the handler
|
||||
if(info.kp_proc.p_flag & P_TRACED) installHandler = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Failed to discover if the process is being debugged; default to
|
||||
// installing the handler.
|
||||
installHandler = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(installHandler && (mExceptionHandler == 0))
|
||||
{
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(mDumpPath, 0, &unix_post_minidump_callback, 0, true, 0);
|
||||
}
|
||||
#elif LL_LINUX
|
||||
if(installHandler && (mExceptionHandler == 0))
|
||||
{
|
||||
if (mDumpPath.empty())
|
||||
{
|
||||
mDumpPath = "/tmp";
|
||||
}
|
||||
google_breakpad::MinidumpDescriptor desc(mDumpPath);
|
||||
//mExceptionHandler = new google_breakpad::ExceptionHandler(desc, 0, unix_minidump_callback, 0, true, 0);
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(desc, NULL, unix_minidump_callback, NULL, true, -1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLApp::startErrorThread()
|
||||
@@ -311,20 +454,6 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler)
|
||||
}
|
||||
|
||||
|
||||
void LLApp::setSyncErrorHandler(LLAppErrorHandler handler)
|
||||
{
|
||||
LLApp::sSyncErrorHandler = handler;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLApp::runSyncErrorHandler()
|
||||
{
|
||||
if (LLApp::sSyncErrorHandler)
|
||||
{
|
||||
LLApp::sSyncErrorHandler();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLApp::runErrorHandler()
|
||||
{
|
||||
@@ -348,15 +477,46 @@ void LLApp::setStatus(EAppStatus status)
|
||||
// static
|
||||
void LLApp::setError()
|
||||
{
|
||||
if (!isError())
|
||||
{
|
||||
// perform any needed synchronous error-handling
|
||||
runSyncErrorHandler();
|
||||
// set app status to ERROR so that the LLErrorThread notices
|
||||
setStatus(APP_STATUS_ERROR);
|
||||
}
|
||||
// set app status to ERROR so that the LLErrorThread notices
|
||||
setStatus(APP_STATUS_ERROR);
|
||||
}
|
||||
|
||||
void LLApp::setMiniDumpDir(const std::string &path)
|
||||
{
|
||||
if (path.empty())
|
||||
{
|
||||
mDumpPath = "/tmp";
|
||||
}
|
||||
else
|
||||
{
|
||||
mDumpPath = path;
|
||||
}
|
||||
|
||||
if(mExceptionHandler == 0) return;
|
||||
#ifdef LL_WINDOWS
|
||||
wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
|
||||
mbstowcs(buffer, mDumpPath.c_str(), MAX_MINDUMP_PATH_LENGTH);
|
||||
mExceptionHandler->set_dump_path(std::wstring(buffer));
|
||||
#elif LL_LINUX
|
||||
//google_breakpad::MinidumpDescriptor desc("/tmp"); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
|
||||
google_breakpad::MinidumpDescriptor desc(mDumpPath); //path works in debug fails in production inside breakpad lib so linux gets a little less stack reporting until it is patched.
|
||||
mExceptionHandler->set_minidump_descriptor(desc);
|
||||
#else
|
||||
mExceptionHandler->set_dump_path(mDumpPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLApp::setDebugFileNames(const std::string &path)
|
||||
{
|
||||
mStaticDebugFileName = path + "static_debug_info.log";
|
||||
mDynamicDebugFileName = path + "dynamic_debug_info.log";
|
||||
}
|
||||
|
||||
void LLApp::writeMiniDump()
|
||||
{
|
||||
if(mExceptionHandler == 0) return;
|
||||
mExceptionHandler->WriteMinidump();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLApp::setQuitting()
|
||||
@@ -413,6 +573,12 @@ bool LLApp::isExiting()
|
||||
void LLApp::disableCrashlogger()
|
||||
{
|
||||
// Disable Breakpad exception handler.
|
||||
if (mExceptionHandler != 0)
|
||||
{
|
||||
delete mExceptionHandler;
|
||||
mExceptionHandler = 0;
|
||||
}
|
||||
|
||||
sDisableCrashlogger = TRUE;
|
||||
}
|
||||
|
||||
@@ -787,4 +953,149 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
|
||||
}
|
||||
}
|
||||
|
||||
#if LL_LINUX
|
||||
bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, void* context, bool succeeded)
|
||||
{
|
||||
// Copy minidump file path into fixed buffer in the app instance to avoid
|
||||
// heap allocations in a crash handler.
|
||||
|
||||
// path format: <dump_dir>/<minidump_id>.dmp
|
||||
|
||||
//HACK: *path points to the buffer in getMiniDumpFilename which has already allocated space
|
||||
//to avoid doing allocation during crash.
|
||||
char * path = LLApp::instance()->getMiniDumpFilename();
|
||||
int dir_path_len = strlen(path);
|
||||
|
||||
// The path must not be truncated.
|
||||
S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH - dir_path_len;
|
||||
|
||||
llassert( (remaining - strlen(minidump_desc.path())) > 5);
|
||||
|
||||
path += dir_path_len;
|
||||
|
||||
if (dir_path_len > 0 && path[-1] != '/')
|
||||
{
|
||||
*path++ = '/';
|
||||
--remaining;
|
||||
}
|
||||
|
||||
strncpy(path, minidump_desc.path(), remaining);
|
||||
|
||||
llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl;
|
||||
LLApp::runErrorHandler();
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
clear_signals();
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool unix_post_minidump_callback(const char *dump_dir,
|
||||
const char *minidump_id,
|
||||
void *context, bool succeeded)
|
||||
{
|
||||
// Copy minidump file path into fixed buffer in the app instance to avoid
|
||||
// heap allocations in a crash handler.
|
||||
|
||||
// path format: <dump_dir>/<minidump_id>.dmp
|
||||
int dirPathLength = strlen(dump_dir);
|
||||
int idLength = strlen(minidump_id);
|
||||
|
||||
// The path must not be truncated.
|
||||
llassert((dirPathLength + idLength + 5) <= LLApp::MAX_MINDUMP_PATH_LENGTH);
|
||||
|
||||
char * path = LLApp::instance()->getMiniDumpFilename();
|
||||
S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH;
|
||||
strncpy(path, dump_dir, remaining);
|
||||
remaining -= dirPathLength;
|
||||
path += dirPathLength;
|
||||
if (remaining > 0 && dirPathLength > 0 && path[-1] != '/')
|
||||
{
|
||||
*path++ = '/';
|
||||
--remaining;
|
||||
}
|
||||
if (remaining > 0)
|
||||
{
|
||||
strncpy(path, minidump_id, remaining);
|
||||
remaining -= idLength;
|
||||
path += idLength;
|
||||
strncpy(path, ".dmp", remaining);
|
||||
}
|
||||
|
||||
llinfos << "generated minidump: " << path << llendl;
|
||||
LLApp::runErrorHandler();
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
clear_signals();
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
#endif // !WINDOWS
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
bool windows_post_minidump_callback(const wchar_t* dump_path,
|
||||
const wchar_t* minidump_id,
|
||||
void* context,
|
||||
EXCEPTION_POINTERS* exinfo,
|
||||
MDRawAssertionInfo* assertion,
|
||||
bool succeeded)
|
||||
{
|
||||
char * path = LLApp::instance()->getMiniDumpFilename();
|
||||
S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH;
|
||||
size_t bytesUsed;
|
||||
|
||||
bytesUsed = wcstombs(path, dump_path, static_cast<size_t>(remaining));
|
||||
remaining -= bytesUsed;
|
||||
path += bytesUsed;
|
||||
if(remaining > 0 && bytesUsed > 0 && path[-1] != '\\')
|
||||
{
|
||||
*path++ = '\\';
|
||||
--remaining;
|
||||
}
|
||||
if(remaining > 0)
|
||||
{
|
||||
bytesUsed = wcstombs(path, minidump_id, static_cast<size_t>(remaining));
|
||||
remaining -= bytesUsed;
|
||||
path += bytesUsed;
|
||||
}
|
||||
if(remaining > 0)
|
||||
{
|
||||
strncpy(path, ".dmp", remaining);
|
||||
}
|
||||
|
||||
llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl;
|
||||
// *NOTE:Mani - this code is stolen from LLApp, where its never actually used.
|
||||
//OSMessageBox("Attach Debugger Now", "Error", OSMB_OK);
|
||||
// *TODO: Translate the signals/exceptions into cross-platform stuff
|
||||
// Windows implementation
|
||||
llinfos << "Entering Windows Exception Handler..." << llendl;
|
||||
|
||||
if (LLApp::isError())
|
||||
{
|
||||
llwarns << "Got another fatal signal while in the error handler, die now!" << llendl;
|
||||
}
|
||||
|
||||
// Flag status to error, so thread_error starts its work
|
||||
LLApp::setError();
|
||||
|
||||
// Block in the exception handler until the app has stopped
|
||||
// This is pretty sketchy, but appears to work just fine
|
||||
while (!LLApp::isStopped())
|
||||
{
|
||||
ms_sleep(10);
|
||||
}
|
||||
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -37,14 +37,10 @@ template <typename Type> class LLAtomic32;
|
||||
typedef LLAtomic32<U32> LLAtomicU32;
|
||||
class LLErrorThread;
|
||||
class LLLiveFile;
|
||||
|
||||
|
||||
#if LL_LINUX
|
||||
#include <signal.h>
|
||||
//typedef struct siginfo siginfo_t; //Removed as per changes in glibc 2.16 - Drake Arconis
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef void (*LLAppErrorHandler)();
|
||||
typedef void (*LLAppChildCallback)(int pid, bool exited, int status);
|
||||
|
||||
@@ -64,6 +60,10 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
namespace google_breakpad {
|
||||
class ExceptionHandler; // See exception_handler.h
|
||||
}
|
||||
|
||||
class LL_COMMON_API LLApp : public LLOptionInterface
|
||||
{
|
||||
friend class LLErrorThread;
|
||||
@@ -212,11 +212,43 @@ public:
|
||||
#endif
|
||||
static int getPid();
|
||||
|
||||
//
|
||||
// Error handling methods
|
||||
//
|
||||
/** @name Error handling methods */
|
||||
//@{
|
||||
/**
|
||||
* @brief Do our generic platform-specific error-handling setup --
|
||||
* signals on unix, structured exceptions on windows.
|
||||
*
|
||||
* DO call this method if your app will either spawn children or be
|
||||
* spawned by a launcher.
|
||||
* Call just after app object construction.
|
||||
* (Otherwise your app will crash when getting signals,
|
||||
* and will not core dump.)
|
||||
*
|
||||
* DO NOT call this method if your application has specialized
|
||||
* error handling code.
|
||||
*/
|
||||
void setupErrorHandling();
|
||||
|
||||
void setErrorHandler(LLAppErrorHandler handler);
|
||||
void setSyncErrorHandler(LLAppErrorHandler handler);
|
||||
static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
|
||||
//@}
|
||||
|
||||
// the maximum length of the minidump filename returned by getMiniDumpFilename()
|
||||
static const U32 MAX_MINDUMP_PATH_LENGTH = 256;
|
||||
|
||||
// change the directory where Breakpad minidump files are written to
|
||||
void setMiniDumpDir(const std::string &path);
|
||||
void setDebugFileNames(const std::string &path);
|
||||
|
||||
// Return the Google Breakpad minidump filename after a crash.
|
||||
char *getMiniDumpFilename() { return mMinidumpPath; }
|
||||
std::string* getStaticDebugFile() { return &mStaticDebugFileName; }
|
||||
std::string* getDynamicDebugFile() { return &mDynamicDebugFileName; }
|
||||
|
||||
// Write out a Google Breakpad minidump file.
|
||||
void writeMiniDump();
|
||||
|
||||
|
||||
#if !LL_WINDOWS
|
||||
//
|
||||
// Child process handling (Unix only for now)
|
||||
@@ -236,6 +268,7 @@ public:
|
||||
pid_t fork();
|
||||
#endif
|
||||
|
||||
|
||||
public:
|
||||
typedef std::map<std::string, std::string> string_map;
|
||||
string_map mOptionMap; // Contains all command-line options and arguments in a map
|
||||
@@ -246,6 +279,9 @@ protected:
|
||||
static EAppStatus sStatus; // Reflects current application status
|
||||
static BOOL sErrorThreadRunning; // Set while the error thread is running
|
||||
static BOOL sDisableCrashlogger; // Let the OS handle crashes for us.
|
||||
std::wstring mCrashReportPipeStr; //Name of pipe to use for crash reporting.
|
||||
|
||||
std::string mDumpPath; //output path for google breakpad. Dependency workaround.
|
||||
|
||||
#if !LL_WINDOWS
|
||||
static LLAtomicU32* sSigChildCount; // Number of SIGCHLDs received.
|
||||
@@ -254,26 +290,25 @@ protected:
|
||||
static LLAppChildCallback sDefaultChildCallback;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ brief This method is called once as soon as logging is initialized.
|
||||
*/
|
||||
void startErrorThread();
|
||||
|
||||
/**
|
||||
* @brief This method is called at the end, just prior to deinitializing curl.
|
||||
*/
|
||||
void stopErrorThread();
|
||||
|
||||
private:
|
||||
void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions)
|
||||
static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
|
||||
static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread.
|
||||
// Contains the filename of the minidump file after a crash.
|
||||
char mMinidumpPath[MAX_MINDUMP_PATH_LENGTH];
|
||||
|
||||
std::string mStaticDebugFileName;
|
||||
std::string mDynamicDebugFileName;
|
||||
|
||||
// *NOTE: On Windows, we need a routine to reset the structured
|
||||
// exception handler when some evil driver has taken it over for
|
||||
// their own purposes
|
||||
typedef int(*signal_handler_func)(int signum);
|
||||
static LLAppErrorHandler sErrorHandler;
|
||||
static LLAppErrorHandler sSyncErrorHandler;
|
||||
|
||||
// Default application threads
|
||||
LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback
|
||||
@@ -291,6 +326,7 @@ private:
|
||||
private:
|
||||
// the static application instance if it was created.
|
||||
static LLApp* sApplication;
|
||||
google_breakpad::ExceptionHandler * mExceptionHandler;
|
||||
|
||||
|
||||
#if !LL_WINDOWS
|
||||
|
||||
@@ -80,7 +80,7 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
|
||||
mDisplayName = sd[DISPLAY_NAME].asString();
|
||||
mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString();
|
||||
mLegacyLastName = sd[LEGACY_LAST_NAME].asString();
|
||||
mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean();
|
||||
mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean() || mUsername == mDisplayName;
|
||||
LLDate expires = sd[DISPLAY_NAME_EXPIRES];
|
||||
mExpires = expires.secondsSinceEpoch();
|
||||
LLDate next_update = sd[DISPLAY_NAME_NEXT_UPDATE];
|
||||
|
||||
@@ -39,7 +39,12 @@
|
||||
#include "llerror.h"
|
||||
#include "stringize.h"
|
||||
|
||||
LLCoros::LLCoros()
|
||||
LLCoros::LLCoros():
|
||||
// MAINT-2724: default coroutine stack size too small on Windows.
|
||||
// Previously we used
|
||||
// boost::context::guarded_stack_allocator::default_stacksize();
|
||||
// empirically this is 64KB on Windows and Linux. Try quadrupling.
|
||||
mStackSize(256*1024)
|
||||
{
|
||||
// Register our cleanup() method for "mainloop" ticks
|
||||
LLEventPumps::instance().obtain("mainloop").listen(
|
||||
@@ -55,7 +60,7 @@ bool LLCoros::cleanup(const LLSD&)
|
||||
// since last tick?
|
||||
if (mi->second->exited())
|
||||
{
|
||||
LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL;
|
||||
LL_INFOS("LLCoros") << "LLCoros: cleaning up coroutine " << mi->first << LL_ENDL;
|
||||
// The erase() call will invalidate its passed iterator value --
|
||||
// so increment mi FIRST -- but pass its original value to
|
||||
// erase(). This is what postincrement is all about.
|
||||
@@ -89,7 +94,7 @@ std::string LLCoros::generateDistinctName(const std::string& prefix) const
|
||||
{
|
||||
if (mCoros.find(name) == mCoros.end())
|
||||
{
|
||||
LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL;
|
||||
LL_INFOS("LLCoros") << "LLCoros: launching coroutine " << name << LL_ENDL;
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -115,7 +120,7 @@ std::string LLCoros::getNameByID(const void* self_id) const
|
||||
// passed to us comes.
|
||||
for (CoroMap::const_iterator mi(mCoros.begin()), mend(mCoros.end()); mi != mend; ++mi)
|
||||
{
|
||||
namespace coro_private = boost::coroutines::detail;
|
||||
namespace coro_private = boost::dcoroutines::detail;
|
||||
if (static_cast<void*>(coro_private::coroutine_accessor::get_impl(const_cast<coro&>(*mi->second)).get())
|
||||
== self_id)
|
||||
{
|
||||
@@ -125,6 +130,12 @@ std::string LLCoros::getNameByID(const void* self_id) const
|
||||
return "";
|
||||
}
|
||||
|
||||
void LLCoros::setStackSize(S32 stacksize)
|
||||
{
|
||||
LL_INFOS("LLCoros") << "Setting coroutine stack size to " << stacksize << LL_ENDL;
|
||||
mStackSize = stacksize;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* MUST BE LAST
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#if ! defined(LL_LLCOROS_H)
|
||||
#define LL_LLCOROS_H
|
||||
|
||||
#include <boost/coroutine/coroutine.hpp>
|
||||
#include <boost/dcoroutine/coroutine.hpp>
|
||||
#include "llsingleton.h"
|
||||
#include <boost/ptr_container/ptr_map.hpp>
|
||||
#include <string>
|
||||
@@ -78,8 +78,8 @@
|
||||
class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
|
||||
{
|
||||
public:
|
||||
/// Canonical boost::coroutines::coroutine signature we use
|
||||
typedef boost::coroutines::coroutine<void()> coro;
|
||||
/// Canonical boost::dcoroutines::coroutine signature we use
|
||||
typedef boost::dcoroutines::coroutine<void()> coro;
|
||||
/// Canonical 'self' type
|
||||
typedef coro::self self;
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
template <typename CALLABLE>
|
||||
std::string launch(const std::string& prefix, const CALLABLE& callable)
|
||||
{
|
||||
return launchImpl(prefix, new coro(callable));
|
||||
return launchImpl(prefix, new coro(callable, mStackSize));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,6 +152,9 @@ public:
|
||||
/// getName() by self.get_id()
|
||||
std::string getNameByID(const void* self_id) const;
|
||||
|
||||
/// for delayed initialization
|
||||
void setStackSize(S32 stacksize);
|
||||
|
||||
private:
|
||||
friend class LLSingleton<LLCoros>;
|
||||
LLCoros();
|
||||
@@ -159,6 +162,7 @@ private:
|
||||
std::string generateDistinctName(const std::string& prefix) const;
|
||||
bool cleanup(const LLSD&);
|
||||
|
||||
S32 mStackSize;
|
||||
typedef boost::ptr_map<std::string, coro> CoroMap;
|
||||
CoroMap mCoros;
|
||||
};
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
#if ! defined(LL_LLEVENTCORO_H)
|
||||
#define LL_LLEVENTCORO_H
|
||||
|
||||
#include <boost/coroutine/coroutine.hpp>
|
||||
#include <boost/coroutine/future.hpp>
|
||||
#include <boost/dcoroutine/coroutine.hpp>
|
||||
#include <boost/dcoroutine/future.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
@@ -206,13 +206,13 @@ LLSD postAndWait(SELF& self, const LLSD& event, const LLEventPumpOrPumpName& req
|
||||
const LLEventPumpOrPumpName& replyPump, const LLSD& replyPumpNamePath=LLSD())
|
||||
{
|
||||
// declare the future
|
||||
boost::coroutines::future<LLSD> future(self);
|
||||
boost::dcoroutines::future<LLSD> future(self);
|
||||
// make a callback that will assign a value to the future, and listen on
|
||||
// the specified LLEventPump with that callback
|
||||
std::string listenerName(LLEventDetail::listenerNameForCoro(self));
|
||||
LLTempBoundListener connection(
|
||||
replyPump.getPump().listen(listenerName,
|
||||
voidlistener(boost::coroutines::make_callback(future))));
|
||||
voidlistener(boost::dcoroutines::make_callback(future))));
|
||||
// skip the "post" part if requestPump is default-constructed
|
||||
if (requestPump)
|
||||
{
|
||||
@@ -257,7 +257,7 @@ namespace LLEventDetail
|
||||
* This helper is specifically for the two-pump version of waitForEventOn().
|
||||
* We use a single future object, but we want to listen on two pumps with it.
|
||||
* Since we must still adapt from (the callable constructed by)
|
||||
* boost::coroutines::make_callback() (void return) to provide an event
|
||||
* boost::dcoroutines::make_callback() (void return) to provide an event
|
||||
* listener (bool return), we've adapted LLVoidListener for the purpose. The
|
||||
* basic idea is that we construct a distinct instance of WaitForEventOnHelper
|
||||
* -- binding different instance data -- for each of the pumps. Then, when a
|
||||
@@ -331,16 +331,16 @@ LLEventWithID postAndWait2(SELF& self, const LLSD& event,
|
||||
const LLSD& replyPump1NamePath=LLSD())
|
||||
{
|
||||
// declare the future
|
||||
boost::coroutines::future<LLEventWithID> future(self);
|
||||
boost::dcoroutines::future<LLEventWithID> future(self);
|
||||
// either callback will assign a value to this future; listen on
|
||||
// each specified LLEventPump with a callback
|
||||
std::string name(LLEventDetail::listenerNameForCoro(self));
|
||||
LLTempBoundListener connection0(
|
||||
replyPump0.getPump().listen(name + "a",
|
||||
LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 0)));
|
||||
LLEventDetail::wfeoh(boost::dcoroutines::make_callback(future), 0)));
|
||||
LLTempBoundListener connection1(
|
||||
replyPump1.getPump().listen(name + "b",
|
||||
LLEventDetail::wfeoh(boost::coroutines::make_callback(future), 1)));
|
||||
LLEventDetail::wfeoh(boost::dcoroutines::make_callback(future), 1)));
|
||||
// skip the "post" part if requestPump is default-constructed
|
||||
if (requestPump)
|
||||
{
|
||||
|
||||
@@ -127,6 +127,7 @@ public:
|
||||
mRunning = false;
|
||||
}
|
||||
|
||||
void resetWithExpiry(F32 expiration) { reset(); setTimerExpirySec(expiration); }
|
||||
void pause(); // Mark elapsed time so far.
|
||||
void unpause(); // Move 'start' time in order to decrement time between pause and unpause from ElapsedTime.
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ class LLInstanceTracker : public LLInstanceTrackerBase
|
||||
{
|
||||
typedef LLInstanceTracker<T, KEY> MyT;
|
||||
typedef typename std::map<KEY, T*> InstanceMap;
|
||||
typedef typename InstanceMap::iterator::difference_type difference_type;
|
||||
struct StaticData: public StaticBase
|
||||
{
|
||||
InstanceMap sMap;
|
||||
@@ -115,6 +116,11 @@ public:
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
void increment() { mIterator++; }
|
||||
void decrement() { --mIterator; }
|
||||
difference_type distance_to(instance_iter const& other) const
|
||||
{
|
||||
return std::distance(mIterator, other.mIterator);
|
||||
}
|
||||
bool equal(instance_iter const& other) const
|
||||
{
|
||||
return mIterator == other.mIterator;
|
||||
@@ -155,6 +161,11 @@ public:
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
void increment() { mIterator++; }
|
||||
void decrement() { --mIterator; }
|
||||
difference_type distance_to(instance_iter const& other) const
|
||||
{
|
||||
return std::distance(mIterator, other.mIterator);
|
||||
}
|
||||
bool equal(key_iter const& other) const
|
||||
{
|
||||
return mIterator == other.mIterator;
|
||||
|
||||
@@ -176,7 +176,7 @@ void LLMemory::logMemoryInfo(BOOL update)
|
||||
|
||||
llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ;
|
||||
llinfos << "Current allocated page size (KB): " << sAllocatedPageSizeInKB << llendl ;
|
||||
llinfos << "Current availabe physical memory(KB): " << sAvailPhysicalMemInKB << llendl ;
|
||||
llinfos << "Current available physical memory(KB): " << sAvailPhysicalMemInKB << llendl ;
|
||||
llinfos << "Current max usable memory(KB): " << sMaxPhysicalMemInKB << llendl ;
|
||||
|
||||
llinfos << "--- private pool information -- " << llendl ;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
const S32 LL_VERSION_MAJOR = 1;
|
||||
const S32 LL_VERSION_MINOR = 8;
|
||||
const S32 LL_VERSION_PATCH = 0;
|
||||
const S32 LL_VERSION_PATCH = 3;
|
||||
const S32 LL_VERSION_BUILD = ${vBUILD};
|
||||
|
||||
const char * const LL_CHANNEL = "${VIEWER_CHANNEL}";
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(llcrashlogger)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLVFS)
|
||||
include(LLXML)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLMESSAGE_INCLUDE_DIRS}
|
||||
${LLVFS_INCLUDE_DIRS}
|
||||
${LLXML_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llcrashlogger_SOURCE_FILES
|
||||
llcrashlogger.cpp
|
||||
)
|
||||
|
||||
set(llcrashlogger_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
llcrashlogger.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llcrashlogger_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES})
|
||||
|
||||
add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES})
|
||||
add_dependencies(llcrashlogger prepare)
|
||||
@@ -1,425 +0,0 @@
|
||||
/**
|
||||
* @file llcrashlogger.cpp
|
||||
* @brief Crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
|
||||
#include "llcrashlogger.h"
|
||||
#include "llstring.h"
|
||||
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
|
||||
#include "llerror.h"
|
||||
#include "lltimer.h"
|
||||
#include "lldir.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lliopipe.h"
|
||||
#include "llpumpio.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llcurl.h"
|
||||
#include "aistatemachine.h"
|
||||
|
||||
LLPumpIO* gServicePump;
|
||||
BOOL gBreak = false;
|
||||
BOOL gSent = false;
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
extern AIHTTPTimeoutPolicy crashLoggerResponder_timeout;
|
||||
extern void startEngineThread(void);
|
||||
|
||||
class LLCrashLoggerResponder : public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
public:
|
||||
LLCrashLoggerResponder()
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
{
|
||||
gBreak = true;
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
{
|
||||
gBreak = true;
|
||||
gSent = true;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return crashLoggerResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLCrashLoggerResponder"; }
|
||||
};
|
||||
|
||||
bool LLCrashLoggerText::mainLoop()
|
||||
{
|
||||
std::cout << "Entering main loop" << std::endl;
|
||||
sendCrashLogs();
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLCrashLoggerText::updateApplication(const std::string& message)
|
||||
{
|
||||
LLCrashLogger::updateApplication(message);
|
||||
std::cout << message << std::endl;
|
||||
}
|
||||
|
||||
LLCrashLogger::LLCrashLogger() :
|
||||
mCrashBehavior(CRASH_BEHAVIOR_ASK),
|
||||
mCrashInPreviousExec(false),
|
||||
mSentCrashLogs(false),
|
||||
mCrashHost(""),
|
||||
mCrashSettings("CrashSettings")
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LLCrashLogger::~LLCrashLogger()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// TRIM_SIZE must remain larger than LINE_SEARCH_SIZE.
|
||||
const int TRIM_SIZE = 128000;
|
||||
const int LINE_SEARCH_DIST = 500;
|
||||
const std::string SKIP_TEXT = "\n ...Skipping... \n";
|
||||
void trimSLLog(std::string& sllog)
|
||||
{
|
||||
if(sllog.length() > TRIM_SIZE * 2)
|
||||
{
|
||||
std::string::iterator head = sllog.begin() + TRIM_SIZE;
|
||||
std::string::iterator tail = sllog.begin() + sllog.length() - TRIM_SIZE;
|
||||
std::string::iterator new_head = std::find(head, head - LINE_SEARCH_DIST, '\n');
|
||||
if(new_head != head - LINE_SEARCH_DIST)
|
||||
{
|
||||
head = new_head;
|
||||
}
|
||||
|
||||
std::string::iterator new_tail = std::find(tail, tail + LINE_SEARCH_DIST, '\n');
|
||||
if(new_tail != tail + LINE_SEARCH_DIST)
|
||||
{
|
||||
tail = new_tail;
|
||||
}
|
||||
|
||||
sllog.erase(head, tail);
|
||||
sllog.insert(head, SKIP_TEXT.begin(), SKIP_TEXT.end());
|
||||
}
|
||||
}
|
||||
|
||||
std::string getStartupStateFromLog(std::string& sllog)
|
||||
{
|
||||
std::string startup_state = "STATE_FIRST";
|
||||
std::string startup_token = "Startup state changing from ";
|
||||
|
||||
int index = sllog.rfind(startup_token);
|
||||
if (index < 0 || index + startup_token.length() > sllog.length()) {
|
||||
return startup_state;
|
||||
}
|
||||
|
||||
// find new line
|
||||
char cur_char = sllog[index + startup_token.length()];
|
||||
std::string::size_type newline_loc = index + startup_token.length();
|
||||
while(cur_char != '\n' && newline_loc < sllog.length())
|
||||
{
|
||||
newline_loc++;
|
||||
cur_char = sllog[newline_loc];
|
||||
}
|
||||
|
||||
// get substring and find location of " to "
|
||||
std::string state_line = sllog.substr(index, newline_loc - index);
|
||||
std::string::size_type state_index = state_line.find(" to ");
|
||||
startup_state = state_line.substr(state_index + 4, state_line.length() - state_index - 4);
|
||||
|
||||
return startup_state;
|
||||
}
|
||||
|
||||
void LLCrashLogger::gatherFiles()
|
||||
{
|
||||
|
||||
/*
|
||||
//TODO:This function needs to be reimplemented somewhere in here...
|
||||
if(!previous_crash && is_crash_log)
|
||||
{
|
||||
// Make sure the file isn't too old.
|
||||
double age = difftime(gLaunchTime, stat_data.st_mtimespec.tv_sec);
|
||||
|
||||
// llinfos << "age is " << age << llendl;
|
||||
|
||||
if(age > 60.0)
|
||||
{
|
||||
// The file was last modified more than 60 seconds before the crash reporter was launched. Assume it's stale.
|
||||
llwarns << "File " << mFilename << " is too old!" << llendl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
updateApplication("Gathering logs...");
|
||||
|
||||
// Figure out the filename of the debug log
|
||||
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log");
|
||||
std::ifstream debug_log_file(db_file_name.c_str());
|
||||
|
||||
// Look for it in the debug_info.log file
|
||||
if (debug_log_file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(mDebugLog, debug_log_file);
|
||||
|
||||
mCrashInPreviousExec = mDebugLog["CrashNotHandled"].asBoolean();
|
||||
|
||||
mFileMap["SecondLifeLog"] = mDebugLog["SLLog"].asString();
|
||||
mFileMap["SettingsXml"] = mDebugLog["SettingsFilename"].asString();
|
||||
if(mDebugLog.has("CAFilename"))
|
||||
{
|
||||
LLCurl::setCAFile(mDebugLog["CAFilename"].asString());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLCurl::setCAFile(gDirUtilp->getCAFile());
|
||||
}
|
||||
|
||||
llinfos << "Using log file from debug log " << mFileMap["SecondLifeLog"] << llendl;
|
||||
llinfos << "Using settings file from debug log " << mFileMap["SettingsXml"] << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Figure out the filename of the second life log
|
||||
LLCurl::setCAFile(gDirUtilp->getCAFile());
|
||||
mFileMap["SecondLifeLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.log");
|
||||
mFileMap["SettingsXml"] = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings.xml");
|
||||
}
|
||||
|
||||
#if !LL_DARWIN
|
||||
if(mCrashInPreviousExec)
|
||||
#else
|
||||
#endif
|
||||
{
|
||||
// Replace the log file ext with .old, since the
|
||||
// instance that launched this process has overwritten
|
||||
// SecondLife.log
|
||||
std::string log_filename = mFileMap["SecondLifeLog"];
|
||||
log_filename.replace(log_filename.size() - 4, 4, ".old");
|
||||
mFileMap["SecondLifeLog"] = log_filename;
|
||||
}
|
||||
|
||||
gatherPlatformSpecificFiles();
|
||||
|
||||
//Use the debug log to reconstruct the URL to send the crash report to
|
||||
if(mDebugLog.has("CurrentSimHost"))
|
||||
{
|
||||
mCrashHost = "https://";
|
||||
mCrashHost += mDebugLog["CurrentSimHost"].asString();
|
||||
mCrashHost += ":12043/crash/report";
|
||||
}
|
||||
else if(mDebugLog.has("GridName"))
|
||||
{
|
||||
// This is a 'little' hacky, but its the best simple solution.
|
||||
std::string grid_host = mDebugLog["GridName"].asString();
|
||||
LLStringUtil::toLower(grid_host);
|
||||
|
||||
mCrashHost = "https://login.";
|
||||
mCrashHost += grid_host;
|
||||
mCrashHost += ".lindenlab.com:12043/crash/report";
|
||||
}
|
||||
|
||||
// Use login servers as the alternate, since they are already load balanced and have a known name
|
||||
mAltCrashHost = "https://login.agni.lindenlab.com:12043/crash/report";
|
||||
|
||||
mCrashInfo["DebugLog"] = mDebugLog;
|
||||
mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log");
|
||||
mFileMap["StackTrace"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log");
|
||||
|
||||
updateApplication("Encoding files...");
|
||||
|
||||
for(std::map<std::string, std::string>::iterator itr = mFileMap.begin(); itr != mFileMap.end(); ++itr)
|
||||
{
|
||||
std::ifstream f((*itr).second.c_str());
|
||||
if(!f.is_open())
|
||||
{
|
||||
std::cout << "Can't find file " << (*itr).second << std::endl;
|
||||
continue;
|
||||
}
|
||||
std::stringstream s;
|
||||
s << f.rdbuf();
|
||||
|
||||
std::string crash_info = s.str();
|
||||
if(itr->first == "SecondLifeLog")
|
||||
{
|
||||
if(!mCrashInfo["DebugLog"].has("StartupState"))
|
||||
{
|
||||
mCrashInfo["DebugLog"]["StartupState"] = getStartupStateFromLog(crash_info);
|
||||
}
|
||||
trimSLLog(crash_info);
|
||||
}
|
||||
|
||||
mCrashInfo[(*itr).first] = rawstr_to_utf8(crash_info);
|
||||
}
|
||||
}
|
||||
|
||||
LLSD LLCrashLogger::constructPostData()
|
||||
{
|
||||
LLSD ret;
|
||||
return mCrashInfo;
|
||||
}
|
||||
|
||||
S32 LLCrashLogger::loadCrashBehaviorSetting()
|
||||
{
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
|
||||
|
||||
mCrashSettings.loadFromFile(filename);
|
||||
|
||||
S32 value = mCrashSettings.getS32(CRASH_BEHAVIOR_SETTING);
|
||||
|
||||
if (value < CRASH_BEHAVIOR_ASK || CRASH_BEHAVIOR_NEVER_SEND < value) return CRASH_BEHAVIOR_ASK;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
|
||||
{
|
||||
if (crash_behavior != CRASH_BEHAVIOR_ASK && crash_behavior != CRASH_BEHAVIOR_ALWAYS_SEND) return false;
|
||||
|
||||
mCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior);
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
|
||||
|
||||
mCrashSettings.saveToFile(filename, FALSE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg, int retries)
|
||||
{
|
||||
gBreak = false;
|
||||
std::string status_message;
|
||||
for(int i = 0; i < retries; ++i)
|
||||
{
|
||||
status_message = llformat("%s, try %d...", msg.c_str(), i+1);
|
||||
LLHTTPClient::post(host, data, new LLCrashLoggerResponder);
|
||||
while(!gBreak)
|
||||
{
|
||||
updateApplication(status_message);
|
||||
}
|
||||
if(gSent)
|
||||
{
|
||||
return gSent;
|
||||
}
|
||||
}
|
||||
return gSent;
|
||||
}
|
||||
|
||||
bool LLCrashLogger::sendCrashLogs()
|
||||
{
|
||||
gatherFiles();
|
||||
|
||||
LLSD post_data;
|
||||
post_data = constructPostData();
|
||||
|
||||
updateApplication("Sending reports...");
|
||||
|
||||
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
"SecondLifeCrashReport");
|
||||
std::string report_file = dump_path + ".log";
|
||||
|
||||
std::ofstream out_file(report_file.c_str());
|
||||
LLSDSerialize::toPrettyXML(post_data, out_file);
|
||||
out_file.close();
|
||||
|
||||
bool sent = false;
|
||||
|
||||
// *TODO: Translate
|
||||
if(mCrashHost != "")
|
||||
{
|
||||
sent = runCrashLogPost(mCrashHost, post_data, std::string("Sending to server"), 3);
|
||||
}
|
||||
|
||||
if(!sent)
|
||||
{
|
||||
sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3);
|
||||
}
|
||||
|
||||
mSentCrashLogs = sent;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLCrashLogger::updateApplication(const std::string& message)
|
||||
{
|
||||
gServicePump->pump();
|
||||
gServicePump->callback();
|
||||
gMainThreadEngine.mainloop();
|
||||
}
|
||||
|
||||
bool LLCrashLogger::init()
|
||||
{
|
||||
// Initialize curl
|
||||
AICurlInterface::initCurl();
|
||||
|
||||
// Initialize state machine engines.
|
||||
AIEngine::setMaxCount(100); // StateMachineMaxTime
|
||||
|
||||
// Start state machine thread.
|
||||
startEngineThread();
|
||||
|
||||
// We assume that all the logs we're looking for reside on the current drive
|
||||
gDirUtilp->initAppDirs("SecondLife");
|
||||
|
||||
// Default to the product name "Second Life" (this is overridden by the -name argument)
|
||||
mProductName = "Second Life";
|
||||
|
||||
mCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes "
|
||||
"(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)");
|
||||
|
||||
llinfos << "Loading crash behavior setting" << llendl;
|
||||
mCrashBehavior = loadCrashBehaviorSetting();
|
||||
|
||||
// If user doesn't want to send, bail out
|
||||
if (mCrashBehavior == CRASH_BEHAVIOR_NEVER_SEND)
|
||||
{
|
||||
llinfos << "Crash behavior is never_send, quitting" << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Start curl thread.
|
||||
AICurlInterface::startCurlThread(&mCrashSettings);
|
||||
|
||||
gServicePump = new LLPumpIO;
|
||||
|
||||
//If we've opened the crash logger, assume we can delete the marker file if it exists
|
||||
if( gDirUtilp )
|
||||
{
|
||||
std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.exec_marker");
|
||||
LLAPRFile::remove( marker_file );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/**
|
||||
* @file llcrashlogger.h
|
||||
* @brief Crash Logger Definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#ifndef LLCRASHLOGGER_H
|
||||
#define LLCRASHLOGGER_H
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "llapp.h"
|
||||
#include "llsd.h"
|
||||
#include "llcontrol.h"
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
|
||||
class LLCrashLogger : public LLApp
|
||||
{
|
||||
public:
|
||||
LLCrashLogger();
|
||||
virtual ~LLCrashLogger();
|
||||
S32 loadCrashBehaviorSetting();
|
||||
void gatherFiles();
|
||||
virtual void gatherPlatformSpecificFiles() {}
|
||||
bool saveCrashBehaviorSetting(S32 crash_behavior);
|
||||
bool sendCrashLogs();
|
||||
LLSD constructPostData();
|
||||
virtual void updateApplication(const std::string& message = LLStringUtil::null);
|
||||
virtual bool init();
|
||||
virtual bool mainLoop() = 0;
|
||||
virtual bool cleanup() { return true; }
|
||||
void setUserText(const std::string& text) { mCrashInfo["UserNotes"] = text; }
|
||||
S32 getCrashBehavior() { return mCrashBehavior; }
|
||||
bool runCrashLogPost(std::string host, LLSD data, std::string msg, int retries);
|
||||
protected:
|
||||
S32 mCrashBehavior;
|
||||
BOOL mCrashInPreviousExec;
|
||||
std::map<std::string, std::string> mFileMap;
|
||||
std::string mGridName;
|
||||
LLControlGroup mCrashSettings;
|
||||
std::string mProductName;
|
||||
LLSD mCrashInfo;
|
||||
std::string mCrashHost;
|
||||
std::string mAltCrashHost;
|
||||
LLSD mDebugLog;
|
||||
bool mSentCrashLogs;
|
||||
};
|
||||
|
||||
class LLCrashLoggerText : public LLCrashLogger
|
||||
{
|
||||
public:
|
||||
LLCrashLoggerText(void) {}
|
||||
~LLCrashLoggerText(void) {}
|
||||
|
||||
virtual bool mainLoop();
|
||||
virtual void updateApplication(const std::string& message = LLStringUtil::null);
|
||||
};
|
||||
|
||||
|
||||
#endif //LLCRASHLOGGER_H
|
||||
@@ -1150,6 +1150,40 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd)
|
||||
{
|
||||
mFlags = sd[w].asInteger();
|
||||
}
|
||||
|
||||
//<singu>
|
||||
// Define a few magic constants that are not accessible otherwise, from here.
|
||||
// mInventoryType:
|
||||
static U32 IT_WEARABLE = 18; // LLInventoryType::IT_WEARABLE
|
||||
// mType, these are the two asset types that are IT_WEARABLE:
|
||||
static U32 AT_BODYPART = 13; // LLAssetType::AT_BODYPART
|
||||
// Viewer local values:
|
||||
static U32 WT_UNKNOWN = 16; // LLWearableType::WT_UNKNOWN
|
||||
static U32 WT_COUNT = 17; // LLWearableType::WT_COUNT
|
||||
// The last 8 bits of mFlags contain the wearable type.
|
||||
static U32 II_FLAGS_WEARABLES_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK
|
||||
|
||||
// The wearable type is stored in the lower 8 bits of mFlags.
|
||||
U32 wt = mFlags & II_FLAGS_WEARABLES_MASK;
|
||||
|
||||
// Because WT_UNKNOWN now has locally a special meaning, make sure we don't receive it from the server.
|
||||
if (wt == WT_UNKNOWN)
|
||||
{
|
||||
llwarns << "Received inventory item with wearable type WT_UNKNOWN from server! You should upgrade your viewer." << llendl;
|
||||
// Change this new wearable type to WT_COUNT, as if when we had not inserted WT_UNKNOWN locally.
|
||||
mFlags += 1;
|
||||
wt = WT_COUNT;
|
||||
}
|
||||
|
||||
// Detect possible problematic items.
|
||||
if (wt == 0 && mInventoryType == IT_WEARABLE && mType != AT_BODYPART)
|
||||
{
|
||||
// This is not possible, and therefore is probably an item creatd by a pre-multiwear viewer (or Second Inventory, etc).
|
||||
// The wearable type is NOT a shape (0) in that case of course, but we don't know what it is without downloading the
|
||||
// asset.
|
||||
mFlags |= WT_UNKNOWN;
|
||||
}
|
||||
//</singu>
|
||||
}
|
||||
w = INV_NAME_LABEL;
|
||||
if (sd.has(w))
|
||||
|
||||
@@ -108,6 +108,7 @@ public:
|
||||
ICONNAME_LINKFOLDER,
|
||||
ICONNAME_MESH,
|
||||
|
||||
ICONNAME_CLOTHING_UNKNOWN,
|
||||
ICONNAME_INVALID,
|
||||
ICONNAME_COUNT,
|
||||
ICONNAME_NONE = -1
|
||||
|
||||
@@ -1099,8 +1099,11 @@ LLPermissions ll_permissions_from_sd(const LLSD& sd_perm)
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool LLPermissions::allowExportBy(LLUUID const& requester, bool supports_export) const
|
||||
bool LLPermissions::allowExportBy(LLUUID const& requester, ExportPolicy export_policy) const
|
||||
{
|
||||
return !mIsGroupOwned && requester == mOwner && (requester == mCreator || (supports_export && (mMaskEveryone & PERM_EXPORT)));
|
||||
return !mIsGroupOwned && requester == mOwner && // Must be owner.
|
||||
(requester == mCreator || // Export is allowed for all export policies when creator.
|
||||
(export_policy == ep_export_bit && (mMaskEveryone & PERM_EXPORT)) || // If not creator, only allow export when PERM_EXPORT bit is set.
|
||||
(export_policy == ep_full_perm && (mMaskOwner & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)); // If not creator, only allow export when item is full perm.
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ extern void mask_to_string(U32 mask, char* str);
|
||||
extern std::string mask_to_string(U32 mask);
|
||||
template<class T> class LLMetaClassT;
|
||||
|
||||
enum ExportPolicy {
|
||||
ep_creator_only, // Used for SecondLife: only allow export when being creator.
|
||||
ep_full_perm, // Used on non-SL grids that do not support the PERM_EXPORT bit: allow exporting of full perm objects.
|
||||
ep_export_bit // Used on opensim grids that support the PERM_EXPORT bit.
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLPermissions
|
||||
//
|
||||
@@ -280,7 +286,7 @@ public:
|
||||
// has that bit set and allow exporting even when this function returns false,
|
||||
// or pass supports_export as true, which causes to perform that check using
|
||||
// these permissions.
|
||||
bool allowExportBy(LLUUID const& requester, bool supports_export = false) const;
|
||||
bool allowExportBy(LLUUID const& requester, ExportPolicy export_policy) const;
|
||||
|
||||
// This somewhat specialized function is meant for testing if the
|
||||
// current owner is allowed to transfer to the specified agent id.
|
||||
|
||||
@@ -623,6 +623,9 @@ public:
|
||||
child->insert(data);
|
||||
}
|
||||
}
|
||||
// Singu note: now that we allow wider range in octree, discard them here
|
||||
// if they fall out of range
|
||||
#if 0
|
||||
else
|
||||
{
|
||||
//it's not in here, give it to the root
|
||||
@@ -641,6 +644,7 @@ public:
|
||||
node->insert(data);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1010,7 +1014,7 @@ public:
|
||||
}
|
||||
|
||||
LLVector4a MAX_MAG;
|
||||
MAX_MAG.splat(1024.f*1024.f);
|
||||
MAX_MAG.splat(1024.f * 1024.f);
|
||||
|
||||
const LLVector4a& v = data->getPositionGroup();
|
||||
|
||||
|
||||
@@ -1262,7 +1262,8 @@ std::string CurlEasyRequest::getLowercaseHostname(void) const
|
||||
//-----------------------------------------------------------------------------
|
||||
// BufferedCurlEasyRequest
|
||||
|
||||
static int const HTTP_REDIRECTS_DEFAULT = 10;
|
||||
static int const HTTP_REDIRECTS_DEFAULT = 16; // Singu note: I've seen up to 10 redirects, so setting the limit to 10 is cutting it.
|
||||
// This limit is only here to avoid a redirect loop (infinite redirections).
|
||||
|
||||
LLChannelDescriptors const BufferedCurlEasyRequest::sChannels;
|
||||
LLMutex BufferedCurlEasyRequest::sResponderCallbackMutex;
|
||||
@@ -1411,8 +1412,8 @@ void BufferedCurlEasyRequest::prepRequest(AICurlEasyRequest_wat& curl_easy_reque
|
||||
curl_easy_request_w->setHeaderCallback(&curlHeaderCallback, lockobj);
|
||||
|
||||
bool allow_cookies = headers.hasHeader("Cookie");
|
||||
// Allow up to ten redirects.
|
||||
if (responder->followRedir())
|
||||
// Allow up to sixteen redirects.
|
||||
if (!responder->pass_redirect_status())
|
||||
{
|
||||
curl_easy_request_w->setopt(CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_easy_request_w->setopt(CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT);
|
||||
@@ -1436,6 +1437,7 @@ void BufferedCurlEasyRequest::prepRequest(AICurlEasyRequest_wat& curl_easy_reque
|
||||
mResponder = responder;
|
||||
// Cache capability type, because it will be needed even after the responder was removed.
|
||||
mCapabilityType = responder->capability_type();
|
||||
mIsEventPoll = responder->is_event_poll();
|
||||
|
||||
// Send header events to responder if needed.
|
||||
if (mResponder->needsHeaders())
|
||||
|
||||
@@ -116,6 +116,15 @@ void AICurlEasyRequestStateMachine::multiplex_impl(state_type run_state)
|
||||
{
|
||||
set_state(AICurlEasyRequestStateMachine_waitAdded);
|
||||
idle(); // Wait till AICurlEasyRequestStateMachine::added_to_multi_handle() is called.
|
||||
|
||||
// This is a work around for the case that this request had a bad url, in order to avoid a crash later on.
|
||||
bool empty_url = AICurlEasyRequest_rat(*mCurlEasyRequest)->getLowercaseServicename().empty();
|
||||
if (empty_url)
|
||||
{
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
// Only AFTER going idle, add request to curl thread; this is needed because calls to set_state() are
|
||||
// ignored when the statemachine is not idle, and theoretically the callbacks could be called
|
||||
// immediately after this call.
|
||||
|
||||
@@ -75,6 +75,7 @@ AIPerService::AIPerService(void) :
|
||||
mConcurrentConnections(CurlConcurrentConnectionsPerService),
|
||||
mApprovedRequests(0),
|
||||
mTotalAdded(0),
|
||||
mEventPolls(0),
|
||||
mEstablishedConnections(0),
|
||||
mUsedCT(0),
|
||||
mCTInUse(0)
|
||||
@@ -214,7 +215,7 @@ std::string AIPerService::extract_canonical_servicename(std::string const& url)
|
||||
}
|
||||
++p;
|
||||
}
|
||||
// Strip of any trailing ":80".
|
||||
// Strip off any trailing ":80".
|
||||
if (p - 3 == port_colon && p[-1] == '0' && p[-2] == '8')
|
||||
{
|
||||
return servicename.substr(0, p - hostname - 3);
|
||||
@@ -335,24 +336,70 @@ bool AIPerService::throttled(AICapabilityType capability_type) const
|
||||
mCapabilityType[capability_type].mAdded >= mCapabilityType[capability_type].mConcurrentConnections;
|
||||
}
|
||||
|
||||
void AIPerService::added_to_multi_handle(AICapabilityType capability_type)
|
||||
void AIPerService::added_to_multi_handle(AICapabilityType capability_type, bool event_poll)
|
||||
{
|
||||
if (event_poll)
|
||||
{
|
||||
llassert(capability_type == cap_other);
|
||||
// We want to mark this service as unused when only long polls have been added, because they
|
||||
// are not counted towards the maximum number of connection for this service and therefore
|
||||
// should not cause another capability type to get less connections.
|
||||
// For example, if - like on opensim - Textures and Other capability types use the same
|
||||
// service then it is nonsense to reserve 4 connections Other and only give 4 connections
|
||||
// to Textures, only because there is a long poll connection (or any number of long poll
|
||||
// connections). What we want is to see: 0-0-0,{0/7,0} for textures when Other is ONLY in
|
||||
// use for the Event Poll.
|
||||
//
|
||||
// This translates to that, since we're adding an event_poll and are about to remove it from
|
||||
// either the command queue OR the request queue, that when mAdded == 1 at the end of this function
|
||||
// (and the rest of the pipeline is empty) we want to mark this capability type as unused.
|
||||
//
|
||||
// If mEventPolls > 0 at this point then mAdded will not be incremented.
|
||||
// If mEventPolls == 0 then mAdded will be incremented and thus should be 0 now.
|
||||
// In other words, if the number of mAdded requests is equal to the number of (counted)
|
||||
// mEventPoll requests right now, then that will still be the case after we added another
|
||||
// event poll request (the transition from used to unused only being necessary because
|
||||
// event poll requests in the pipe line ARE counted; not because that is necessary but
|
||||
// because it would be more complex to not do so).
|
||||
//
|
||||
// Moreover, when we get here then the request that is being added is still counted as being in
|
||||
// the command queue, or the request queue, so that pipelined_requests() will return 1 more than
|
||||
// the actual count.
|
||||
U16 counted_event_polls = (mEventPolls == 0) ? 0 : 1;
|
||||
if (mCapabilityType[capability_type].mAdded == counted_event_polls &&
|
||||
mCapabilityType[capability_type].pipelined_requests() == counted_event_polls + 1)
|
||||
{
|
||||
mark_unused(capability_type);
|
||||
}
|
||||
if (++mEventPolls > 1)
|
||||
{
|
||||
// This only happens on megaregions. Do not count the additional long poll connections against the maximum handles for this service.
|
||||
return;
|
||||
}
|
||||
}
|
||||
++mCapabilityType[capability_type].mAdded;
|
||||
++mTotalAdded;
|
||||
}
|
||||
|
||||
void AIPerService::removed_from_multi_handle(AICapabilityType capability_type, bool downloaded_something, bool success)
|
||||
void AIPerService::removed_from_multi_handle(AICapabilityType capability_type, bool event_poll, bool downloaded_something, bool success)
|
||||
{
|
||||
CapabilityType& ct(mCapabilityType[capability_type]);
|
||||
llassert(mTotalAdded > 0 && ct.mAdded > 0);
|
||||
bool done = --ct.mAdded == 0;
|
||||
llassert(mTotalAdded > 0 && ct.mAdded > 0 && (!event_poll || mEventPolls));
|
||||
if (!event_poll || --mEventPolls == 0)
|
||||
{
|
||||
--ct.mAdded;
|
||||
--mTotalAdded;
|
||||
}
|
||||
if (downloaded_something)
|
||||
{
|
||||
llassert(ct.mDownloading > 0);
|
||||
--ct.mDownloading;
|
||||
}
|
||||
--mTotalAdded;
|
||||
if (done && ct.pipelined_requests() == 0)
|
||||
// If the number of added request handles is equal to the number of counted event poll handles,
|
||||
// in other words, when there are only long poll connections left, then mark the capability type
|
||||
// as unused.
|
||||
U16 counted_event_polls = (capability_type != cap_other || mEventPolls == 0) ? 0 : 1;
|
||||
if (ct.mAdded == counted_event_polls && ct.pipelined_requests() == counted_event_polls)
|
||||
{
|
||||
mark_unused(capability_type);
|
||||
}
|
||||
@@ -467,6 +514,9 @@ void AIPerService::add_queued_to(curlthread::MultiHandle* multi_handle, bool onl
|
||||
break;
|
||||
}
|
||||
// Request was added, remove it from the queue.
|
||||
// Note: AIPerService::added_to_multi_handle (called from add_easy_request above) relies on the fact that
|
||||
// we first add the easy handle and then remove it from the request queue (which is necessary to avoid
|
||||
// that another thread adds one just in between).
|
||||
ct.mQueuedRequests.pop_front();
|
||||
// Mark that at least one request of this CT was successfully added.
|
||||
success |= mask;
|
||||
|
||||
@@ -145,7 +145,8 @@ class AIPerService {
|
||||
|
||||
queued_request_type mQueuedRequests; // Waiting (throttled) requests.
|
||||
U16 mApprovedRequests; // The number of approved requests for this CT by approveHTTPRequestFor that were not added to the command queue yet.
|
||||
U16 mQueuedCommands; // Number of add commands (minus remove commands), for this service, in the command queue.
|
||||
S16 mQueuedCommands; // Number of add commands (minus remove commands), for this service, in the command queue.
|
||||
// This value can temporarily become negative when remove commands are added to the queue for add requests that were already processed.
|
||||
U16 mAdded; // Number of active easy handles with this service.
|
||||
U16 mFlags; // ctf_empty: Set to true when the queue becomes precisely empty.
|
||||
// ctf_full : Set to true when the queue is popped and then still isn't empty;
|
||||
@@ -169,6 +170,7 @@ class AIPerService {
|
||||
int mConcurrentConnections; // The maximum number of allowed concurrent connections to this service.
|
||||
int mApprovedRequests; // The number of approved requests for this service by approveHTTPRequestFor that were not added to the command queue yet.
|
||||
int mTotalAdded; // Number of active easy handles with this service.
|
||||
int mEventPolls; // Number of active event poll handles with this service.
|
||||
int mEstablishedConnections; // Number of connected sockets to this service.
|
||||
|
||||
U32 mUsedCT; // Bit mask with one bit per capability type. A '1' means the capability was in use since the last resetUsedCT().
|
||||
@@ -267,9 +269,10 @@ class AIPerService {
|
||||
|
||||
public:
|
||||
void added_to_command_queue(AICapabilityType capability_type) { ++mCapabilityType[capability_type].mQueuedCommands; mark_inuse(capability_type); }
|
||||
void removed_from_command_queue(AICapabilityType capability_type) { --mCapabilityType[capability_type].mQueuedCommands; llassert(mCapabilityType[capability_type].mQueuedCommands >= 0); }
|
||||
void added_to_multi_handle(AICapabilityType capability_type); // Called when an easy handle for this service has been added to the multi handle.
|
||||
void removed_from_multi_handle(AICapabilityType capability_type, bool downloaded_something, bool success); // Called when an easy handle for this service is removed again from the multi handle.
|
||||
void removed_from_command_queue(AICapabilityType capability_type) { --mCapabilityType[capability_type].mQueuedCommands; }
|
||||
void added_to_multi_handle(AICapabilityType capability_type, bool event_poll); // Called when an easy handle for this service has been added to the multi handle.
|
||||
void removed_from_multi_handle(AICapabilityType capability_type, bool event_poll,
|
||||
bool downloaded_something, bool success); // Called when an easy handle for this service is removed again from the multi handle.
|
||||
void download_started(AICapabilityType capability_type) { ++mCapabilityType[capability_type].mDownloading; }
|
||||
bool throttled(AICapabilityType capability_type) const; // Returns true if the maximum number of allowed requests for this service/capability type have been added to the multi handle.
|
||||
bool nothing_added(AICapabilityType capability_type) const { return mCapabilityType[capability_type].mAdded == 0; }
|
||||
|
||||
@@ -418,6 +418,7 @@ class BufferedCurlEasyRequest : public CurlEasyRequest {
|
||||
buffer_ptr_t mOutput;
|
||||
LLHTTPClient::ResponderPtr mResponder;
|
||||
AICapabilityType mCapabilityType;
|
||||
bool mIsEventPoll;
|
||||
//U32 mBodyLimit; // From the old LLURLRequestDetail::mBodyLimit, but never used.
|
||||
U32 mStatus; // HTTP status, decoded from the first header line.
|
||||
std::string mReason; // The "reason" from the same header line.
|
||||
@@ -466,6 +467,7 @@ class BufferedCurlEasyRequest : public CurlEasyRequest {
|
||||
|
||||
// Return the capability type of this request.
|
||||
AICapabilityType capability_type(void) const { llassert(mCapabilityType != number_of_capability_types); return mCapabilityType; }
|
||||
bool is_event_poll(void) const { return mIsEventPoll; }
|
||||
|
||||
// Return true if any data was received.
|
||||
bool received_data(void) const { return mTotalRawBytes > 0; }
|
||||
|
||||
@@ -1312,7 +1312,7 @@ void AICurlThread::process_commands(AICurlMultiHandle_wat const& multi_handle_w)
|
||||
*command_being_processed_w = command_queue_w->commands.front();
|
||||
command = command_being_processed_w->command();
|
||||
}
|
||||
// Update the size: the number netto number of pending requests in the command queue.
|
||||
// Update the size: the netto number of pending requests in the command queue.
|
||||
command_queue_w->commands.pop_front();
|
||||
if (command == cmd_add)
|
||||
{
|
||||
@@ -1340,6 +1340,9 @@ void AICurlThread::process_commands(AICurlMultiHandle_wat const& multi_handle_w)
|
||||
break;
|
||||
case cmd_add:
|
||||
{
|
||||
// Note: AIPerService::added_to_multi_handle (called from add_easy_request) relies on the fact that
|
||||
// we first add the easy handle and then remove it from the command queue (which is necessary to
|
||||
// avoid that another thread adds one just in between).
|
||||
multi_handle_w->add_easy_request(AICurlEasyRequest(command_being_processed_r->easy_request()), false);
|
||||
PerService_wat(*per_service)->removed_from_command_queue(capability_type);
|
||||
break;
|
||||
@@ -1747,10 +1750,12 @@ bool MultiHandle::add_easy_request(AICurlEasyRequest const& easy_request, bool f
|
||||
{
|
||||
bool throttled = true; // Default.
|
||||
AICapabilityType capability_type;
|
||||
bool event_poll;
|
||||
AIPerServicePtr per_service;
|
||||
{
|
||||
AICurlEasyRequest_wat curl_easy_request_w(*easy_request);
|
||||
capability_type = curl_easy_request_w->capability_type();
|
||||
event_poll = curl_easy_request_w->is_event_poll();
|
||||
per_service = curl_easy_request_w->getPerServicePtr();
|
||||
if (!from_queue)
|
||||
{
|
||||
@@ -1782,7 +1787,7 @@ bool MultiHandle::add_easy_request(AICurlEasyRequest const& easy_request, bool f
|
||||
curl_easy_request_w->set_timeout_opts();
|
||||
if (curl_easy_request_w->add_handle_to_multi(curl_easy_request_w, mMultiHandle) == CURLM_OK)
|
||||
{
|
||||
per_service_w->added_to_multi_handle(capability_type); // (About to be) added to mAddedEasyRequests.
|
||||
per_service_w->added_to_multi_handle(capability_type, event_poll); // (About to be) added to mAddedEasyRequests.
|
||||
throttled = false; // Fall through...
|
||||
}
|
||||
}
|
||||
@@ -1841,6 +1846,7 @@ CURLMcode MultiHandle::remove_easy_request(addedEasyRequests_type::iterator cons
|
||||
{
|
||||
CURLMcode res;
|
||||
AICapabilityType capability_type;
|
||||
bool event_poll;
|
||||
AIPerServicePtr per_service;
|
||||
{
|
||||
AICurlEasyRequest_wat curl_easy_request_w(**iter);
|
||||
@@ -1848,8 +1854,9 @@ CURLMcode MultiHandle::remove_easy_request(addedEasyRequests_type::iterator cons
|
||||
bool success = curl_easy_request_w->success();
|
||||
res = curl_easy_request_w->remove_handle_from_multi(curl_easy_request_w, mMultiHandle);
|
||||
capability_type = curl_easy_request_w->capability_type();
|
||||
event_poll = curl_easy_request_w->is_event_poll();
|
||||
per_service = curl_easy_request_w->getPerServicePtr();
|
||||
PerService_wat(*per_service)->removed_from_multi_handle(capability_type, downloaded_something, success); // (About to be) removed from mAddedEasyRequests.
|
||||
PerService_wat(*per_service)->removed_from_multi_handle(capability_type, event_poll, downloaded_something, success); // (About to be) removed from mAddedEasyRequests.
|
||||
#ifdef SHOW_ASSERT
|
||||
curl_easy_request_w->mRemovedPerCommand = as_per_command;
|
||||
#endif
|
||||
@@ -2062,7 +2069,7 @@ void BufferedCurlEasyRequest::setStatusAndReason(U32 status, std::string const&
|
||||
// Sanity check. If the server replies with a redirect status then we better have that option turned on!
|
||||
if ((status >= 300 && status < 400) && mResponder && !mResponder->redirect_status_ok())
|
||||
{
|
||||
llerrs << "Received " << status << " (" << reason << ") for responder \"" << mResponder->getName() << "\" which has no followRedir()!" << llendl;
|
||||
llerrs << "Received " << status << " (" << reason << ") for responder \"" << mResponder->getName() << "\" which does not allow redirection!" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -922,7 +922,6 @@ P(charactersResponder);
|
||||
P(checkAgentAppearanceServiceResponder);
|
||||
P(classifiedStatsResponder);
|
||||
P(consoleResponder);
|
||||
P2(crashLoggerResponder, transfer_22s_connect_10s);
|
||||
P(createInventoryCategoryResponder);
|
||||
P(emeraldDicDownloader);
|
||||
P(environmentApplyResponder);
|
||||
@@ -993,4 +992,4 @@ P(webProfileResponders);
|
||||
P(wholeModelFeeResponder);
|
||||
P(wholeModelUploadResponder);
|
||||
P2(XMLRPCResponder, connect_40s);
|
||||
|
||||
P2(crashLoggerResponder, transfer_300s);
|
||||
@@ -59,11 +59,12 @@ LLHost::LLHost(const std::string& ip_and_port)
|
||||
mIP = ip_string_to_u32(ip_str.c_str());
|
||||
mPort = atol(port_str.c_str());
|
||||
}
|
||||
mHostNotFound = 0;
|
||||
}
|
||||
|
||||
std::string LLHost::getString() const
|
||||
{
|
||||
return llformat("%s:%u", u32_to_ip_string(mIP), mPort);
|
||||
return llformat("%s:%hu", u32_to_ip_string(mIP), mPort);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,16 +88,27 @@ std::string LLHost::getHostName() const
|
||||
llwarns << "LLHost::getHostName() : Invalid IP address" << llendl;
|
||||
return std::string();
|
||||
}
|
||||
if (mHostNotFound)
|
||||
{
|
||||
// We already checked this... avoid freezing the viewer 5 seconds again and again.
|
||||
llwarns << "LLHost::getHostName() : Returning cached HOST_NOT_FOUND." << llendl;
|
||||
return std::string();
|
||||
}
|
||||
he = gethostbyaddr((char *)&mIP, sizeof(mIP), AF_INET);
|
||||
if (!he)
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: "
|
||||
<< WSAGetLastError() << llendl;
|
||||
int err = WSAGetLastError();
|
||||
int err_host_not_found = WSAHOST_NOT_FOUND;
|
||||
#else
|
||||
llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: "
|
||||
<< h_errno << llendl;
|
||||
int err = h_errno;
|
||||
int err_host_not_found = HOST_NOT_FOUND;
|
||||
#endif
|
||||
llwarns << "LLHost::getHostName() : Couldn't find host name for address " << mIP << ", Error: " << err << llendl;
|
||||
if (err == err_host_not_found)
|
||||
{
|
||||
mHostNotFound = 1;
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
else
|
||||
@@ -125,6 +137,7 @@ BOOL LLHost::setHostByName(const std::string& hostname)
|
||||
if (he)
|
||||
{
|
||||
mIP = *(U32 *)he->h_addr_list[0];
|
||||
mHostNotFound = 0;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -38,7 +38,8 @@ const U32 INVALID_HOST_IP_ADDRESS = 0x0;
|
||||
|
||||
class LLHost {
|
||||
protected:
|
||||
U32 mPort;
|
||||
U16 mPort;
|
||||
mutable U16 mHostNotFound; // Singularity addition; caches a failed IP -> hostname lookup.
|
||||
U32 mIP;
|
||||
public:
|
||||
|
||||
@@ -47,17 +48,20 @@ public:
|
||||
// CREATORS
|
||||
LLHost()
|
||||
: mPort(INVALID_PORT),
|
||||
mHostNotFound(1),
|
||||
mIP(INVALID_HOST_IP_ADDRESS)
|
||||
{ } // STL's hash_map expect this T()
|
||||
|
||||
LLHost( U32 ipv4_addr, U32 port )
|
||||
: mPort( port )
|
||||
: mPort(port),
|
||||
mHostNotFound(0)
|
||||
{
|
||||
mIP = ipv4_addr;
|
||||
}
|
||||
|
||||
LLHost( const std::string& ipv4_addr, U32 port )
|
||||
: mPort( port )
|
||||
: mPort(port),
|
||||
mHostNotFound(0)
|
||||
{
|
||||
mIP = ip_string_to_u32(ipv4_addr.c_str());
|
||||
}
|
||||
@@ -68,6 +72,7 @@ public:
|
||||
U32 port = (U32)(ip_port & (U64)0xFFFFFFFF);
|
||||
mIP = ip;
|
||||
mPort = port;
|
||||
mHostNotFound = 0;
|
||||
}
|
||||
|
||||
explicit LLHost(const std::string& ip_and_port);
|
||||
@@ -76,15 +81,15 @@ public:
|
||||
{ }
|
||||
|
||||
// MANIPULATORS
|
||||
void set( U32 ip, U32 port ) { mIP = ip; mPort = port; }
|
||||
void set( const std::string& ipstr, U32 port ) { mIP = ip_string_to_u32(ipstr.c_str()); mPort = port; }
|
||||
void setAddress( const std::string& ipstr ) { mIP = ip_string_to_u32(ipstr.c_str()); }
|
||||
void setAddress( U32 ip ) { mIP = ip; }
|
||||
void set( U32 ip, U32 port ) { mIP = ip; mPort = port; mHostNotFound = 0; }
|
||||
void set( const std::string& ipstr, U32 port ) { mIP = ip_string_to_u32(ipstr.c_str()); mPort = port; mHostNotFound = 0; }
|
||||
void setAddress( const std::string& ipstr ) { mIP = ip_string_to_u32(ipstr.c_str()); mHostNotFound = 0; }
|
||||
void setAddress( U32 ip ) { mIP = ip; mHostNotFound = 0; }
|
||||
void setPort( U32 port ) { mPort = port; }
|
||||
BOOL setHostByName(const std::string& hname);
|
||||
|
||||
LLHost& operator=(const LLHost &rhs);
|
||||
void invalidate() { mIP = INVALID_HOST_IP_ADDRESS; mPort = INVALID_PORT;};
|
||||
void invalidate() { mIP = INVALID_HOST_IP_ADDRESS; mPort = INVALID_PORT; mHostNotFound = 1; }
|
||||
|
||||
// READERS
|
||||
U32 getAddress() const { return mIP; }
|
||||
|
||||
@@ -221,12 +221,15 @@ public:
|
||||
// The default is to keep connections open for possible reuse.
|
||||
virtual bool forbidReuse(void) const { return false; }
|
||||
|
||||
// A derived class should return true if curl should follow redirections.
|
||||
// The default is not to follow redirections.
|
||||
virtual bool followRedir(void) const { return false; }
|
||||
// A derived class should return true if curl should not follow redirections, but instead pass redirection status codes to the responder.
|
||||
// The default is to follow redirections and not pass them to the responder.
|
||||
virtual bool pass_redirect_status(void) const { return false; }
|
||||
|
||||
// If this function returns false then we generate an error when a redirect status (300..399) is received.
|
||||
virtual bool redirect_status_ok(void) const { return followRedir(); }
|
||||
virtual bool redirect_status_ok(void) const { return true; }
|
||||
|
||||
// Overridden by LLEventPollResponder to return true.
|
||||
virtual bool is_event_poll(void) const { return false; }
|
||||
|
||||
// Returns the capability type used by this responder.
|
||||
virtual AICapabilityType capability_type(void) const { return cap_other; }
|
||||
@@ -259,7 +262,6 @@ public:
|
||||
class ResponderHeadersOnly : public ResponderBase {
|
||||
private:
|
||||
/*virtual*/ bool needsHeaders(void) const { return true; }
|
||||
/*virtual*/ bool followRedir(void) const { return true; }
|
||||
|
||||
protected:
|
||||
// ResponderBase event
|
||||
|
||||
@@ -37,8 +37,6 @@ F32 const gPrehashVersionNumber = 2.000f;
|
||||
char const* const _PREHASH_X = LLMessageStringTable::getInstance()->getString("X");
|
||||
char const* const _PREHASH_Y = LLMessageStringTable::getInstance()->getString("Y");
|
||||
char const* const _PREHASH_Z = LLMessageStringTable::getInstance()->getString("Z");
|
||||
char const* const _PREHASH_SizeX = LLMessageStringTable::getInstance()->getString("SizeX");
|
||||
char const* const _PREHASH_SizeY = LLMessageStringTable::getInstance()->getString("SizeY");
|
||||
char const* const _PREHASH_AddFlags = LLMessageStringTable::getInstance()->getString("AddFlags");
|
||||
char const* const _PREHASH_FailureInfo = LLMessageStringTable::getInstance()->getString("FailureInfo");
|
||||
char const* const _PREHASH_MapData = LLMessageStringTable::getInstance()->getString("MapData");
|
||||
@@ -1386,3 +1384,10 @@ char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->
|
||||
char const* const _PREHASH_AppearanceData = LLMessageStringTable::getInstance()->getString("AppearanceData");
|
||||
char const* const _PREHASH_AppearanceVersion = LLMessageStringTable::getInstance()->getString("AppearanceVersion");
|
||||
char const* const _PREHASH_CofVersion = LLMessageStringTable::getInstance()->getString("CofVersion");
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
char const* const _PREHASH_RegionSizeX = LLMessageStringTable::getInstance()->getString("RegionSizeX");
|
||||
char const* const _PREHASH_RegionSizeY = LLMessageStringTable::getInstance()->getString("RegionSizeY");
|
||||
char const* const _PREHASH_SizeX = LLMessageStringTable::getInstance()->getString("SizeX");
|
||||
char const* const _PREHASH_SizeY = LLMessageStringTable::getInstance()->getString("SizeY");
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
@@ -37,8 +37,6 @@ extern F32 const gPrehashVersionNumber;
|
||||
extern char const* const _PREHASH_X;
|
||||
extern char const* const _PREHASH_Y;
|
||||
extern char const* const _PREHASH_Z;
|
||||
extern char const* const _PREHASH_SizeX;
|
||||
extern char const* const _PREHASH_SizeY;
|
||||
extern char const* const _PREHASH_AddFlags;
|
||||
extern char const* const _PREHASH_FailureInfo;
|
||||
extern char const* const _PREHASH_MapData;
|
||||
@@ -1386,4 +1384,11 @@ extern char const* const _PREHASH_GroupAVSounds;
|
||||
extern char const* const _PREHASH_AppearanceData;
|
||||
extern char const* const _PREHASH_AppearanceVersion;
|
||||
extern char const* const _PREHASH_CofVersion;
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
extern char const* const _PREHASH_RegionSizeX;
|
||||
extern char const* const _PREHASH_RegionSizeY;
|
||||
extern char const* const _PREHASH_SizeX;
|
||||
extern char const* const _PREHASH_SizeY;
|
||||
// <FS:CR> Aurora Sim
|
||||
#endif
|
||||
|
||||
@@ -229,7 +229,10 @@ void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp)
|
||||
gPatchSize = gopp->patch_size;
|
||||
}
|
||||
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
||||
// <FS:CR> Aurora Sim
|
||||
//void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, bool b_large_patch)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
U8 retvalu8;
|
||||
|
||||
@@ -268,15 +271,33 @@ void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
|
||||
#endif
|
||||
ph->range = retvalu16;
|
||||
|
||||
retvalu16 = 0;
|
||||
// <FS:CR> Aurora Sim
|
||||
//retvalu16 = 0;
|
||||
retvalu32 = 0;
|
||||
#ifdef LL_BIG_ENDIAN
|
||||
ret = (U8 *)&retvalu16;
|
||||
bitpack.bitUnpack(&(ret[1]), 8);
|
||||
bitpack.bitUnpack(&(ret[0]), 2);
|
||||
//ret = (U8 *)&retvalu16;
|
||||
ret = (U8*)&retvalu32;
|
||||
// </FS:CR> Aurora Sim
|
||||
if (b_large_patch)
|
||||
{
|
||||
bitpack.bitUnpack(&(ret[3]), 8);
|
||||
bitpack.bitUnpack(&(ret[2]), 8);
|
||||
bitpack.bitUnpack(&(ret[1]), 8);
|
||||
bitpack.bitUnpack(&(ret[0]), 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
bitpack.bitUnpack(&(ret[1]), 8);
|
||||
bitpack.bitUnpack(&(ret[0]), 2);
|
||||
}
|
||||
#else
|
||||
bitpack.bitUnpack((U8 *)&retvalu16, 10);
|
||||
// <FS:CR> Aurora Sim
|
||||
//bitpack.bitUnpack((U8 *)&retvalu16, 10);
|
||||
bitpack.bitUnpack((U8*)&retvalu32, b_large_patch ? 32 : 10);
|
||||
#endif
|
||||
ph->patchids = retvalu16;
|
||||
//ph->patchids = retvalu16;
|
||||
ph->patchids = retvalu32;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
gWordBits = (ph->quant_wbits & 0xf) + 2;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,10 @@ void end_patch_coding(LLBitPack &bitpack);
|
||||
|
||||
void init_patch_decoding(LLBitPack &bitpack);
|
||||
void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp);
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph);
|
||||
// <FS:CR> Aurora Sim
|
||||
//void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph);
|
||||
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, bool b_large_patch = false);
|
||||
// </FS:CR> Aurora Sim
|
||||
void decode_patch(LLBitPack &bitpack, S32 *patches);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,10 @@ public:
|
||||
F32 dc_offset; // 4 bytes
|
||||
U16 range; // 2 = 7 ((S16) FP range (breaks if we need > 32K meters in 1 patch)
|
||||
U8 quant_wbits; // 1 = 8 (upper 4 bits is quant - 2, lower 4 bits is word bits - 2)
|
||||
U16 patchids; // 2 = 10 (actually only uses 10 bits, 5 for each)
|
||||
// <FS:CR> Aurora Sim
|
||||
//U16 patchids; // 2 = 10 (actually only uses 10 bits, 5 for each)
|
||||
U32 patchids;
|
||||
// </FS:CR> Aurora Sim
|
||||
};
|
||||
|
||||
// Compression routines
|
||||
|
||||
@@ -174,6 +174,8 @@ bool checkExceptionHandler()
|
||||
}
|
||||
#endif
|
||||
|
||||
bool self_test = false;
|
||||
|
||||
// If this application on Windows platform is a console application, a console is always
|
||||
// created which is bad. Making it a Windows "application" via CMake settings but not
|
||||
// adding any code to explicitly create windows does the right thing.
|
||||
@@ -220,21 +222,29 @@ int main(int argc, char **argv)
|
||||
LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL;
|
||||
}
|
||||
|
||||
U32 port = 0;
|
||||
if(!LLStringUtil::convertToU32(argv[1], port))
|
||||
U32 port = 61916; // Test port.
|
||||
if (strcmp(argv[1], "TESTPLUGIN") == 0)
|
||||
{
|
||||
std::cout << "Running self test..." << std::endl;
|
||||
self_test = true;
|
||||
}
|
||||
else if (!LLStringUtil::convertToU32(argv[1], port))
|
||||
{
|
||||
LL_ERRS("slplugin") << "port number must be numeric" << LL_ENDL;
|
||||
}
|
||||
|
||||
// Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown.
|
||||
signal(SIGILL, &crash_handler); // illegal instruction
|
||||
if (!self_test)
|
||||
{
|
||||
// Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown.
|
||||
signal(SIGILL, &crash_handler); // illegal instruction
|
||||
# if LL_DARWIN
|
||||
signal(SIGEMT, &crash_handler); // emulate instruction executed
|
||||
signal(SIGEMT, &crash_handler); // emulate instruction executed
|
||||
# endif // LL_DARWIN
|
||||
signal(SIGFPE, &crash_handler); // floating-point exception
|
||||
signal(SIGBUS, &crash_handler); // bus error
|
||||
signal(SIGSEGV, &crash_handler); // segmentation violation
|
||||
signal(SIGSYS, &crash_handler); // non-existent system call invoked
|
||||
signal(SIGFPE, &crash_handler); // floating-point exception
|
||||
signal(SIGBUS, &crash_handler); // bus error
|
||||
signal(SIGSEGV, &crash_handler); // segmentation violation
|
||||
signal(SIGSYS, &crash_handler); // non-existent system call invoked
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LL_DARWIN
|
||||
@@ -247,7 +257,7 @@ int main(int argc, char **argv)
|
||||
plugin->init(port);
|
||||
|
||||
#if LL_DARWIN
|
||||
deleteAutoReleasePool();
|
||||
deleteAutoReleasePool();
|
||||
#endif
|
||||
|
||||
LLTimer timer;
|
||||
|
||||
@@ -630,25 +630,41 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
||||
if (v)
|
||||
{
|
||||
U32 v_idx = idx[j*stride+v_offset]*3;
|
||||
v_idx = llclamp(v_idx, (U32) 0, (U32) v->getCount());
|
||||
vert.getPosition().set(v->get(v_idx),
|
||||
v->get(v_idx+1),
|
||||
v->get(v_idx+2));
|
||||
}
|
||||
|
||||
if (n)
|
||||
//bounds check n and t lookups because some FBX to DAE converters
|
||||
//use negative indices and empty arrays to indicate data does not exist
|
||||
//for a particular channel
|
||||
if (n && n->getCount() > 0)
|
||||
{
|
||||
U32 n_idx = idx[j*stride+n_offset]*3;
|
||||
n_idx = llclamp(n_idx, (U32) 0, (U32) n->getCount());
|
||||
vert.getNormal().set(n->get(n_idx),
|
||||
n->get(n_idx+1),
|
||||
n->get(n_idx+2));
|
||||
}
|
||||
else
|
||||
{
|
||||
vert.getNormal().clear();
|
||||
}
|
||||
|
||||
if (t)
|
||||
|
||||
if (t && t->getCount() > 0)
|
||||
{
|
||||
U32 t_idx = idx[j*stride+t_offset]*2;
|
||||
t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());
|
||||
vert.mTexCoord.setVec(t->get(t_idx),
|
||||
t->get(t_idx+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
vert.mTexCoord.clear();
|
||||
}
|
||||
|
||||
|
||||
verts.push_back(vert);
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
|
||||
// Check if dimensions are a power of two!
|
||||
if (!checkSize(width,height))
|
||||
{
|
||||
llerrs << llformat("Texture has non power of two dimension: %dx%d",width,height) << llendl;
|
||||
llwarns << llformat("Texture has non power of two dimension: %dx%d",width,height) << " Unless on Aurora-Sim, beware." << llendl;
|
||||
}
|
||||
|
||||
if (mTexName)
|
||||
|
||||
@@ -56,14 +56,7 @@ LLShaderMgr::LLShaderMgr()
|
||||
{
|
||||
{
|
||||
const std::string dumpdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"shader_dump")+gDirUtilp->getDirDelimiter();
|
||||
try
|
||||
{
|
||||
boost::filesystem::remove_all(dumpdir);
|
||||
}
|
||||
catch(const boost::filesystem::filesystem_error& e)
|
||||
{
|
||||
llinfos << "boost::filesystem::remove_all(\""+dumpdir+"\") failed: '" + e.code().message() + "'" << llendl;
|
||||
}
|
||||
gDirUtilp->deleteDirAndContents(dumpdir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,6 @@ public:
|
||||
virtual BOOL canSaveAs() const { return FALSE; }
|
||||
|
||||
virtual void saveAs() {}
|
||||
virtual void saveAsType(BOOL type=false) {}
|
||||
|
||||
void setSnapTarget(LLHandle<LLFloater> handle) { mSnappedTo = handle; }
|
||||
void clearSnapTarget() { mSnappedTo.markDead(); }
|
||||
|
||||
@@ -860,6 +860,32 @@ void LLLineEditor::removeChar()
|
||||
}
|
||||
}
|
||||
|
||||
// Remove a word (set of characters up to next space/punctuation) from the text
|
||||
void LLLineEditor::removeWord(bool prev)
|
||||
{
|
||||
const U32 pos(getCursor());
|
||||
if (prev ? pos > 0 : static_cast<S32>(pos) < getLength())
|
||||
{
|
||||
U32 new_pos(prev ? prevWordPos(pos) : nextWordPos(pos));
|
||||
if (new_pos == pos) // Other character we don't jump over
|
||||
new_pos = prev ? prevWordPos(new_pos-1) : nextWordPos(new_pos+1);
|
||||
|
||||
const U32 diff(labs(pos - new_pos));
|
||||
if (prev)
|
||||
{
|
||||
mText.erase(new_pos, diff);
|
||||
setCursor(new_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
mText.erase(pos, diff);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reportBadKeystroke();
|
||||
}
|
||||
}
|
||||
|
||||
void LLLineEditor::addChar(const llwchar uni_char)
|
||||
{
|
||||
@@ -1318,7 +1344,10 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
||||
else
|
||||
if( 0 < getCursor() )
|
||||
{
|
||||
removeChar();
|
||||
if (mask == MASK_CONTROL)
|
||||
removeWord(true);
|
||||
else
|
||||
removeChar();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1328,6 +1357,14 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
|
||||
handled = TRUE;
|
||||
break;
|
||||
|
||||
case KEY_DELETE:
|
||||
if (!mReadOnly && mask == MASK_CONTROL)
|
||||
{
|
||||
removeWord(false);
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_PAGE_UP:
|
||||
case KEY_HOME:
|
||||
if (!mIgnoreArrowKeys)
|
||||
|
||||
@@ -266,6 +266,7 @@ private:
|
||||
void pasteHelper(bool is_primary);
|
||||
|
||||
void removeChar();
|
||||
void removeWord(bool prev);
|
||||
void addChar(const llwchar c);
|
||||
void setCursorAtLocalPos(S32 local_mouse_x);
|
||||
S32 calculateCursorFromMouse(S32 local_mouse_x);
|
||||
|
||||
@@ -174,7 +174,7 @@ U32 LLScrollListText::sCount = 0;
|
||||
LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
|
||||
: LLScrollListCell(p),
|
||||
mText(p.value().asString()),
|
||||
mFont(p.font.isProvided() ? LLResMgr::getInstance()->getRes(p.font) : LLFontGL::getFontSansSerifSmall()),
|
||||
mFont(LLFontGL::getFontSansSerifSmall()),
|
||||
mColor(p.color),
|
||||
mUseColor(p.color.isProvided()),
|
||||
mFontStyle(LLFontGL::getStyleFromString(p.font_style)),
|
||||
@@ -187,6 +187,19 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)
|
||||
|
||||
mTextWidth = getWidth();
|
||||
|
||||
if (p.font.isProvided())
|
||||
{
|
||||
if (const LLFontGL* font = LLResMgr::getInstance()->getRes(p.font)) // Common CAPITALIZED font name?
|
||||
mFont = font;
|
||||
else // Less common camelCase font?
|
||||
{
|
||||
LLFontDescriptor font_desc;
|
||||
font_desc.setName(p.font);
|
||||
if (const LLFontGL* font = LLFontGL::getFont(font_desc))
|
||||
mFont = font;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize rounded rect image
|
||||
if (!mRoundedRectImage)
|
||||
{
|
||||
@@ -225,8 +238,11 @@ BOOL LLScrollListText::needsToolTip() const
|
||||
if (LLScrollListCell::needsToolTip())
|
||||
return LLScrollListCell::needsToolTip();
|
||||
|
||||
/* Singu Note: To maintain legacy behavior, show tooltips for any text
|
||||
// ...otherwise, show tooltips for truncated text
|
||||
return mFont->getWidth(mText.getString()) > getWidth();
|
||||
*/
|
||||
return !mText.empty();
|
||||
}
|
||||
|
||||
//virtual
|
||||
@@ -422,13 +438,14 @@ void LLScrollListCheck::setEnabled(BOOL enable)
|
||||
|
||||
LLScrollListDate::LLScrollListDate( const LLScrollListCell::Params& p)
|
||||
: LLScrollListText(p),
|
||||
mFormat(p.format),
|
||||
mDate(p.value().asDate())
|
||||
{}
|
||||
|
||||
void LLScrollListDate::setValue(const LLSD& value)
|
||||
{
|
||||
mDate = value.asDate();
|
||||
LLScrollListText::setValue(mDate.asRFC1123());
|
||||
LLScrollListText::setValue(mFormat.empty() ? mDate.asRFC1123() : mDate.toHTTPDateString(mFormat));
|
||||
}
|
||||
|
||||
const LLSD LLScrollListDate::getValue() const
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
Optional<void*> userdata;
|
||||
Optional<LLSD> value;
|
||||
Optional<std::string> tool_tip;
|
||||
Optional<std::string> format;
|
||||
|
||||
Optional<std::string> font;
|
||||
Optional<LLColor4> font_color;
|
||||
@@ -77,6 +78,7 @@ public:
|
||||
visible("visible", true),
|
||||
value("value"),
|
||||
tool_tip("tool_tip", ""),
|
||||
format("format", ""),
|
||||
font("font"/*, LLFontGL::getFontSansSerifSmall()*/),
|
||||
font_color("font_color", LLColor4::black),
|
||||
font_style("font-style"),
|
||||
@@ -230,6 +232,7 @@ public:
|
||||
virtual const LLSD getValue() const;
|
||||
|
||||
private:
|
||||
std::string mFormat;
|
||||
LLDate mDate;
|
||||
};
|
||||
|
||||
|
||||
@@ -1814,6 +1814,33 @@ void LLTextEditor::removeChar()
|
||||
}
|
||||
}
|
||||
|
||||
// Remove a word (set of characters up to next space/punctuation) from the text
|
||||
void LLTextEditor::removeWord(bool prev)
|
||||
{
|
||||
const U32 pos(mCursorPos);
|
||||
if (prev ? pos > 0 : static_cast<S32>(pos) < getLength())
|
||||
{
|
||||
U32 new_pos(prev ? prevWordPos(pos) : nextWordPos(pos));
|
||||
if (new_pos == pos) // Other character we don't jump over
|
||||
new_pos = prev ? prevWordPos(new_pos-1) : nextWordPos(new_pos+1);
|
||||
|
||||
const U32 diff(labs(pos - new_pos));
|
||||
if (prev)
|
||||
{
|
||||
remove(new_pos, diff, false);
|
||||
setCursorPos(new_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
remove(pos, diff, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reportBadKeystroke();
|
||||
}
|
||||
}
|
||||
|
||||
// Add a single character to the text
|
||||
S32 LLTextEditor::addChar(S32 pos, llwchar wc)
|
||||
{
|
||||
@@ -2447,7 +2474,10 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask, BOOL* return
|
||||
else
|
||||
if( 0 < mCursorPos )
|
||||
{
|
||||
removeCharOrTab();
|
||||
if (mask == MASK_CONTROL)
|
||||
removeWord(true);
|
||||
else
|
||||
removeCharOrTab();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2455,6 +2485,12 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask, BOOL* return
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_DELETE:
|
||||
if (getEnabled() && mask == MASK_CONTROL)
|
||||
{
|
||||
removeWord(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY_RETURN:
|
||||
if (mask == MASK_NONE)
|
||||
|
||||
@@ -408,6 +408,7 @@ protected:
|
||||
S32 overwriteChar(S32 pos, llwchar wc);
|
||||
void removeChar();
|
||||
S32 removeChar(S32 pos);
|
||||
void removeWord(bool prev);
|
||||
S32 insert(const S32 pos, const LLWString &wstr, const BOOL group_with_next_op);
|
||||
S32 remove(const S32 pos, const S32 length, const BOOL group_with_next_op);
|
||||
S32 append(const LLWString &wstr, const BOOL group_with_next_op);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
/**
|
||||
* @file lldir.cpp
|
||||
* @brief implementation of directory utilities base class
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
#include "lldiriterator.h"
|
||||
#include "stringize.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
@@ -69,6 +71,8 @@ LLDir_Linux gDirUtil;
|
||||
|
||||
LLDir *gDirUtilp = (LLDir *)&gDirUtil;
|
||||
|
||||
static const char* const empty = "";
|
||||
std::string LLDir::sDumpDir = "";
|
||||
LLDir::LLDir()
|
||||
: mAppName(""),
|
||||
mExecutablePathAndName(""),
|
||||
@@ -89,7 +93,32 @@ LLDir::~LLDir()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> LLDir::getFilesInDir(const std::string &dirname)
|
||||
{
|
||||
//Returns a vector of fullpath filenames.
|
||||
|
||||
boost::filesystem::path p (dirname);
|
||||
std::vector<std::string> v;
|
||||
|
||||
if (exists(p))
|
||||
{
|
||||
if (is_directory(p))
|
||||
{
|
||||
boost::filesystem::directory_iterator end_iter;
|
||||
for (boost::filesystem::directory_iterator dir_itr(p);
|
||||
dir_itr != end_iter;
|
||||
++dir_itr)
|
||||
{
|
||||
if (boost::filesystem::is_regular_file(dir_itr->status()))
|
||||
{
|
||||
v.push_back(dir_itr->path().filename().string());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
{
|
||||
S32 count = 0;
|
||||
@@ -104,50 +133,76 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
llassert(!"Invalid file mask");
|
||||
}
|
||||
|
||||
LLDirIterator iter(dirname, mask);
|
||||
while (iter.next(filename))
|
||||
try
|
||||
{
|
||||
fullpath = add(dirname, filename);
|
||||
|
||||
if(LLFile::isdir(fullpath))
|
||||
LLDirIterator iter(dirname, mask);
|
||||
while (iter.next(filename))
|
||||
{
|
||||
// skipping directory traversal filenames
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
fullpath = add(dirname, filename);
|
||||
|
||||
S32 retry_count = 0;
|
||||
while (retry_count < 5)
|
||||
{
|
||||
if (0 != LLFile::remove(fullpath))
|
||||
if(LLFile::isdir(fullpath))
|
||||
{
|
||||
retry_count++;
|
||||
result = errno;
|
||||
llwarns << "Problem removing " << fullpath << " - errorcode: "
|
||||
// skipping directory traversal filenames
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
|
||||
S32 retry_count = 0;
|
||||
while (retry_count < 5)
|
||||
{
|
||||
if (0 != LLFile::remove(fullpath))
|
||||
{
|
||||
retry_count++;
|
||||
result = errno;
|
||||
llwarns << "Problem removing " << fullpath << " - errorcode: "
|
||||
<< result << " attempt " << retry_count << llendl;
|
||||
|
||||
if(retry_count >= 5)
|
||||
{
|
||||
llwarns << "Failed to remove " << fullpath << llendl ;
|
||||
return count ;
|
||||
}
|
||||
if(retry_count >= 5)
|
||||
{
|
||||
llwarns << "Failed to remove " << fullpath << llendl ;
|
||||
return count ;
|
||||
}
|
||||
|
||||
ms_sleep(100);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (retry_count)
|
||||
{
|
||||
llwarns << "Successfully removed " << fullpath << llendl;
|
||||
ms_sleep(100);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (retry_count)
|
||||
{
|
||||
llwarns << "Successfully removed " << fullpath << llendl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
count++;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
llwarns << "Unable to remove some files from " + dirname << llendl;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
U32 LLDir::deleteDirAndContents(const std::string& dir_name)
|
||||
{
|
||||
//Removes the directory and its contents. Returns number of files removed.
|
||||
// Singu Note: boost::filesystem throws exceptions
|
||||
S32 res = 0;
|
||||
|
||||
try
|
||||
{
|
||||
res = boost::filesystem::remove_all(dir_name);
|
||||
}
|
||||
catch(const boost::filesystem::filesystem_error& e)
|
||||
{
|
||||
llwarns << "boost::filesystem::remove_all(\"" + dir_name + "\") failed: '" + e.code().message() + "'" << llendl;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
const std::string LLDir::findFile(const std::string &filename,
|
||||
const std::string& searchPath1,
|
||||
const std::string& searchPath2,
|
||||
@@ -235,6 +290,34 @@ const std::string &LLDir::getChatLogsDir() const
|
||||
return mChatLogsDir;
|
||||
}
|
||||
|
||||
void LLDir::setDumpDir( const std::string& path )
|
||||
{
|
||||
LLDir::sDumpDir = path;
|
||||
if (! sDumpDir.empty() && sDumpDir.rbegin() == mDirDelimiter.rbegin() )
|
||||
{
|
||||
sDumpDir.erase(sDumpDir.size() -1);
|
||||
}
|
||||
}
|
||||
|
||||
const std::string &LLDir::getDumpDir() const
|
||||
{
|
||||
if (sDumpDir.empty() )
|
||||
{
|
||||
/* Singu Note: don't generate a different dump dir each time
|
||||
LLUUID uid;
|
||||
uid.generate();
|
||||
|
||||
sDumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "")
|
||||
+ "dump-" + uid.asString();
|
||||
*/
|
||||
|
||||
sDumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "") + "singularity-debug";
|
||||
dir_exists_or_crash(sDumpDir);
|
||||
}
|
||||
|
||||
return LLDir::sDumpDir;
|
||||
}
|
||||
|
||||
const std::string &LLDir::getPerAccountChatLogsDir() const
|
||||
{
|
||||
return mPerAccountChatLogsDir;
|
||||
@@ -396,12 +479,29 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
|
||||
prefix = getCacheDir();
|
||||
break;
|
||||
|
||||
case LL_PATH_DUMP:
|
||||
prefix=getDumpDir();
|
||||
break;
|
||||
|
||||
case LL_PATH_USER_SETTINGS:
|
||||
prefix = add(getOSUserAppDir(), "user_settings");
|
||||
break;
|
||||
|
||||
case LL_PATH_PER_SL_ACCOUNT:
|
||||
prefix = getLindenUserDir();
|
||||
if (prefix.empty())
|
||||
{
|
||||
// if we're asking for the per-SL-account directory but we haven't
|
||||
// logged in yet (or otherwise don't know the account name from
|
||||
// which to build this string), then intentionally return a blank
|
||||
// string to the caller and skip the below warning about a blank
|
||||
// prefix.
|
||||
LL_DEBUGS("LLDir") << "getLindenUserDir() not yet set: "
|
||||
<< ELLPathToString(location)
|
||||
<< ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename
|
||||
<< "' => ''" << LL_ENDL;
|
||||
return std::string();
|
||||
}
|
||||
break;
|
||||
|
||||
case LL_PATH_CHAT_LOGS:
|
||||
|
||||
@@ -53,6 +53,7 @@ typedef enum ELLPath
|
||||
LL_PATH_EXECUTABLE = 16,
|
||||
LL_PATH_DEFAULT_SKIN = 17,
|
||||
LL_PATH_FONTS = 18,
|
||||
LL_PATH_DUMP = 19,
|
||||
LL_PATH_LAST
|
||||
} ELLPath;
|
||||
|
||||
@@ -71,7 +72,8 @@ class LLDir
|
||||
const std::string& app_read_only_data_dir = "") = 0;
|
||||
|
||||
virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
|
||||
|
||||
U32 deleteDirAndContents(const std::string& dir_name);
|
||||
std::vector<std::string> getFilesInDir(const std::string &dirname);
|
||||
// pure virtual functions
|
||||
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0;
|
||||
|
||||
@@ -94,6 +96,7 @@ class LLDir
|
||||
const std::string &getOSUserAppDir() const; // Location of the os-specific user app dir
|
||||
const std::string &getLindenUserDir(bool empty_ok = false) const; // Location of the Linden user dir.
|
||||
const std::string &getChatLogsDir() const; // Location of the chat logs dir.
|
||||
const std::string &getDumpDir() const; // Location of the per-run dump dir.
|
||||
const std::string &getPerAccountChatLogsDir() const; // Location of the per account chat logs dir.
|
||||
const std::string &getTempDir() const; // Common temporary directory
|
||||
const std::string getCacheDir(bool get_default = false) const; // Location of the cache.
|
||||
@@ -128,6 +131,7 @@ class LLDir
|
||||
// For producing safe download file names from potentially unsafe ones
|
||||
static std::string getScrubbedFileName(const std::string uncleanFileName);
|
||||
static std::string getForbiddenFileChars();
|
||||
void setDumpDir( const std::string& path );
|
||||
|
||||
virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir
|
||||
virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory.
|
||||
@@ -173,6 +177,7 @@ protected:
|
||||
std::string mDefaultSkinDir; // Location for default skin info.
|
||||
std::string mUserSkinDir; // Location for user-modified skin info.
|
||||
std::string mLLPluginDir; // Location for plugins and plugin shell
|
||||
static std::string sDumpDir; // Per-run crash report subdir of log directory.
|
||||
};
|
||||
|
||||
void dir_exists_or_crash(const std::string &dir_name);
|
||||
|
||||
@@ -71,10 +71,10 @@ glh_linear.h
|
||||
#define GLH_EPSILON GLH_REAL(10e-6)
|
||||
#define GLH_PI GLH_REAL(3.1415926535897932384626433832795)
|
||||
|
||||
#define equivalent(a,b) (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)
|
||||
|
||||
namespace glh
|
||||
{
|
||||
inline bool equivalent(GLH_REAL a, GLH_REAL b) { return b - GLH_EPSILON < a && a < b + GLH_EPSILON; }
|
||||
|
||||
inline GLH_REAL to_degrees(GLH_REAL radians) { return radians*GLH_RAD_TO_DEG; }
|
||||
inline GLH_REAL to_radians(GLH_REAL degrees) { return degrees*GLH_DEG_TO_RAD; }
|
||||
|
||||
@@ -75,6 +75,9 @@ static bool ATIbug = false;
|
||||
|
||||
#if LL_X11
|
||||
# include <X11/Xutil.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <boost/regex.hpp>
|
||||
#endif //LL_X11
|
||||
|
||||
// TOFU HACK -- (*exactly* the same hack as LLWindowMacOSX for a similar
|
||||
@@ -270,57 +273,41 @@ static SDL_Surface *Load_BMP_Resource(const char *basename)
|
||||
}
|
||||
|
||||
#if LL_X11
|
||||
// This is an XFree86/XOrg-specific hack for detecting the amount of Video RAM
|
||||
// on this machine. It works by searching /var/log/var/log/Xorg.?.log or
|
||||
// /var/log/XFree86.?.log for a ': (VideoRAM ?|Memory): (%d+) kB' regex, where
|
||||
// '?' is the X11 display number derived from $DISPLAY
|
||||
static int x11_detect_VRAM_kb_fp(FILE *fp, const char *prefix_str)
|
||||
{
|
||||
const int line_buf_size = 1000;
|
||||
char line_buf[line_buf_size];
|
||||
while (fgets(line_buf, line_buf_size, fp))
|
||||
{
|
||||
//lldebugs << "XLOG: " << line_buf << llendl;
|
||||
|
||||
// Why the ad-hoc parser instead of using a regex? Our
|
||||
// favourite regex implementation - libboost_regex - is
|
||||
// quite a heavy and troublesome dependency for the client, so
|
||||
// it seems a shame to introduce it for such a simple task.
|
||||
// *FIXME: libboost_regex is a dependency now anyway, so we may
|
||||
// as well use it instead of this hand-rolled nonsense.
|
||||
const char *part1_template = prefix_str;
|
||||
const char part2_template[] = " kB";
|
||||
char *part1 = strstr(line_buf, part1_template);
|
||||
if (part1) // found start of matching line
|
||||
{
|
||||
part1 = &part1[strlen(part1_template)]; // -> after
|
||||
char *part2 = strstr(part1, part2_template);
|
||||
if (part2) // found end of matching line
|
||||
{
|
||||
// now everything between part1 and part2 is
|
||||
// supposed to be numeric, describing the
|
||||
// number of kB of Video RAM supported
|
||||
int rtn = 0;
|
||||
for (; part1 < part2; ++part1)
|
||||
{
|
||||
if (*part1 < '0' || *part1 > '9')
|
||||
{
|
||||
// unexpected char, abort parse
|
||||
rtn = 0;
|
||||
break;
|
||||
}
|
||||
rtn *= 10;
|
||||
rtn += (*part1) - '0';
|
||||
}
|
||||
if (rtn > 0)
|
||||
{
|
||||
// got the kB number. return it now.
|
||||
return rtn;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0; // 'could not detect'
|
||||
// This function scrapes the Xorg log to determine the amount of VRAM available to the system.
|
||||
// Believe it or not, this is the most reliable way at present to detect VRAM on Linux (until
|
||||
// some angelic being ports the whole viewer to SDL 2.0 or something).
|
||||
//
|
||||
// Returns -1 if it couldn't open the file,
|
||||
// 0 if it could open the file but couldn't detect the amount of VRAM, or
|
||||
// >0 if it open the file and detect the amount of VRAM present.
|
||||
// In that case, the number will be the amount of available VRAM in kilobytes.
|
||||
//
|
||||
//
|
||||
static int x11_detect_VRAM_kb_br(std::string filename) {
|
||||
boost::regex pattern(".*?(VRAM|Memory|Video\\s?RAM)\\D*(\\d+)\\s?([kK]B?)");
|
||||
std::string line;
|
||||
std::ifstream in(filename.c_str());
|
||||
int matched = -1;
|
||||
if(in.is_open()) {
|
||||
matched = 0;
|
||||
while (getline(in, line))
|
||||
{
|
||||
// lldebugs << "Processing line: " << line << llendl;
|
||||
boost::cmatch match;
|
||||
if(boost::regex_search(line.c_str(), match, pattern))
|
||||
{
|
||||
matched = atoi(std::string(match[2]).c_str());
|
||||
lldebugs << "VRAM found: " << matched << llendl;
|
||||
lldebugs << "Line matched: " << line << llendl;
|
||||
}
|
||||
}
|
||||
in.close();
|
||||
}
|
||||
else // We couldn't open the file, so bow out.
|
||||
{
|
||||
lldebugs << "Couldn't open logfile " << filename << llendl;
|
||||
}
|
||||
return matched;
|
||||
}
|
||||
|
||||
static int x11_detect_VRAM_kb()
|
||||
@@ -335,9 +322,16 @@ static int x11_detect_VRAM_kb()
|
||||
std::string fname;
|
||||
int rtn = 0; // 'could not detect'
|
||||
int display_num = 0;
|
||||
FILE *fp;
|
||||
char *display_env = getenv("DISPLAY"); // e.g. :0 or :0.0 or :1.0 etc
|
||||
// parse DISPLAY number so we can go grab the right log file
|
||||
char *display_env = getenv("VGL_DISPLAY"); // e.g. :0 or :0.0 or :1.0 etc
|
||||
// We parse $VGL_DISPLAY first so we can grab the right Xorg filename
|
||||
// if we're using VirtualGL (like Optimus systems do).
|
||||
|
||||
if (display_env == NULL) {
|
||||
// if $VGL_DISPLAY doesn't exist, then we're in a single-card setup
|
||||
display_env = getenv("DISPLAY");
|
||||
}
|
||||
|
||||
// parse display number so we can go grab the right log file
|
||||
if (display_env[0] == ':' &&
|
||||
display_env[1] >= '0' && display_env[1] <= '9')
|
||||
{
|
||||
@@ -345,40 +339,16 @@ static int x11_detect_VRAM_kb()
|
||||
}
|
||||
|
||||
// *TODO: we could be smarter and see which of Xorg/XFree86 has the
|
||||
// freshest time-stamp.
|
||||
// freshest time-stamp. (...but would it work with VirtualGL?)
|
||||
|
||||
// Try Xorg log first
|
||||
fname = x_log_location;
|
||||
fname += "Xorg.";
|
||||
fname += ('0' + display_num);
|
||||
fname += ".log";
|
||||
fp = fopen(fname.c_str(), "r");
|
||||
if (fp)
|
||||
{
|
||||
llinfos << "Looking in " << fname
|
||||
<< " for VRAM info..." << llendl;
|
||||
rtn = x11_detect_VRAM_kb_fp(fp, ": VideoRAM: ");
|
||||
fclose(fp);
|
||||
if (0 == rtn)
|
||||
{
|
||||
fp = fopen(fname.c_str(), "r");
|
||||
if (fp)
|
||||
{
|
||||
rtn = x11_detect_VRAM_kb_fp(fp, ": Video RAM: ");
|
||||
fclose(fp);
|
||||
if (0 == rtn)
|
||||
{
|
||||
fp = fopen(fname.c_str(), "r");
|
||||
if (fp)
|
||||
{
|
||||
rtn = x11_detect_VRAM_kb_fp(fp, ": Memory: ");
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
llinfos << "Looking in " << fname << " for VRAM info..." << llendl;
|
||||
rtn = x11_detect_VRAM_kb_br(fname);
|
||||
if(rtn == -1) // we couldn't read the Xorg file
|
||||
{
|
||||
llinfos << "Could not open " << fname
|
||||
<< " - skipped." << llendl;
|
||||
@@ -387,29 +357,17 @@ static int x11_detect_VRAM_kb()
|
||||
fname += "XFree86.";
|
||||
fname += ('0' + display_num);
|
||||
fname += ".log";
|
||||
fp = fopen(fname.c_str(), "r");
|
||||
if (fp)
|
||||
{
|
||||
llinfos << "Looking in " << fname
|
||||
<< " for VRAM info..." << llendl;
|
||||
rtn = x11_detect_VRAM_kb_fp(fp, ": VideoRAM: ");
|
||||
fclose(fp);
|
||||
if (0 == rtn)
|
||||
{
|
||||
fp = fopen(fname.c_str(), "r");
|
||||
if (fp)
|
||||
{
|
||||
rtn = x11_detect_VRAM_kb_fp(fp, ": Memory: ");
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
llinfos << "Looking in " << fname << " for VRAM info..." << llendl;
|
||||
rtn = x11_detect_VRAM_kb_br(fname);
|
||||
if(rtn == -1) // couldn't read old X log file either
|
||||
{
|
||||
llinfos << "Could not open " << fname
|
||||
<< " - skipped." << llendl;
|
||||
//stumped here, return 0
|
||||
rtn = 0;
|
||||
}
|
||||
}
|
||||
llinfos << "Amount of VRAM detected: "<< rtn << " KB" << llendl;
|
||||
return rtn;
|
||||
#endif // LL_SOLARIS
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(mac_crash_logger)
|
||||
|
||||
include(00-Common)
|
||||
include(LLCommon)
|
||||
include(LLCrashLogger)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLVFS)
|
||||
include(LLXML)
|
||||
include(Linking)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLCRASHLOGGER_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLVFS_INCLUDE_DIRS}
|
||||
${LLXML_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(mac_crash_logger_SOURCE_FILES
|
||||
mac_crash_logger.cpp
|
||||
llcrashloggermac.cpp
|
||||
)
|
||||
|
||||
set(mac_crash_logger_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
llcrashloggermac.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${mac_crash_logger_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
list(APPEND mac_crash_logger_SOURCE_FILES ${mac_crash_logger_HEADER_FILES})
|
||||
|
||||
set(mac_crash_logger_RESOURCE_FILES
|
||||
CrashReporter.nib/
|
||||
)
|
||||
set_source_files_properties(
|
||||
${mac_crash_logger_RESOURCE_FILES}
|
||||
PROPERTIES
|
||||
HEADER_FILE_ONLY TRUE
|
||||
)
|
||||
SOURCE_GROUP("Resources" FILES ${mac_crash_logger_RESOURCE_FILES})
|
||||
list(APPEND mac_crash_logger_SOURCE_FILES ${mac_crash_logger_RESOURCE_FILES})
|
||||
|
||||
add_executable(mac-crash-logger
|
||||
MACOSX_BUNDLE
|
||||
${mac_crash_logger_SOURCE_FILES})
|
||||
|
||||
set_target_properties(mac-crash-logger
|
||||
PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
|
||||
)
|
||||
|
||||
target_link_libraries(mac-crash-logger
|
||||
${LLCRASHLOGGER_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
${LLMESSAGE_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET mac-crash-logger POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
-E
|
||||
copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CrashReporter.nib
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-crash-logger.app/Contents/Resources/CrashReporter.nib
|
||||
)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
18
indra/mac_crash_logger/CrashReporter.nib/info.nib
generated
18
indra/mac_crash_logger/CrashReporter.nib/info.nib
generated
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>629</string>
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../../build-darwin-i386/SecondLife.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array/>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9E17</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCarbonFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
<object class="NSIBObjectData">
|
||||
<object name="rootObject" class="NSCustomObject" id="1">
|
||||
</object>
|
||||
<array count="7" name="allObjects">
|
||||
<object class="IBCarbonButton" id="182">
|
||||
<ostype name="command">ok </ostype>
|
||||
<string name="title">Send Report</string>
|
||||
<string name="bounds">414 273 434 378 </string>
|
||||
</object>
|
||||
<object class="IBCarbonButton" id="183">
|
||||
<ostype name="command">not!</ostype>
|
||||
<int name="buttonType">2</int>
|
||||
<string name="title">Don't Send</string>
|
||||
<string name="bounds">414 390 434 487 </string>
|
||||
</object>
|
||||
<object class="IBCarbonStaticText" id="181">
|
||||
<string name="title">Second Life appears to have crashed or frozen the last time it ran. This crash reporter collects information about your computer's hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only. In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help! This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/ If you don't wish to send Linden Lab a crash report, press Cancel. </string>
|
||||
<string name="bounds">20 20 231 487 </string>
|
||||
</object>
|
||||
<object class="IBCarbonWindow" id="166">
|
||||
<int name="carbonWindowClass">2</int>
|
||||
<int name="themeBrush">3</int>
|
||||
<int name="windowPosition">7</int>
|
||||
<string name="title">Second Life Crash Logger</string>
|
||||
<object name="rootControl" class="IBCarbonRootControl" id="167">
|
||||
<array count="5" name="subviews">
|
||||
<reference idRef="181"/>
|
||||
<reference idRef="182"/>
|
||||
<reference idRef="183"/>
|
||||
<object class="IBCarbonEditText" id="185">
|
||||
<ostype name="controlSignature">text</ostype>
|
||||
<boolean name="isUnicode">TRUE</boolean>
|
||||
<string name="bounds">242 23 391 484 </string>
|
||||
</object>
|
||||
<object class="IBCarbonCheckBox" id="193">
|
||||
<ostype name="controlSignature">remb</ostype>
|
||||
<string name="title">Remember This Choice</string>
|
||||
<string name="bounds">415 20 433 186 </string>
|
||||
</object>
|
||||
</array>
|
||||
<string name="bounds">0 0 454 507 </string>
|
||||
</object>
|
||||
<string name="windowRect">257 653 711 1160 </string>
|
||||
<string name="ScreenRectAtEncodeTime">0 0 768 1024 </string>
|
||||
</object>
|
||||
<reference idRef="185"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="193"/>
|
||||
</array>
|
||||
<array count="7" name="allParents">
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="1"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="166"/>
|
||||
<reference idRef="167"/>
|
||||
</array>
|
||||
<dictionary count="2" name="nameTable">
|
||||
<string>CrashReporter</string>
|
||||
<reference idRef="166"/>
|
||||
<string>File's Owner</string>
|
||||
<reference idRef="1"/>
|
||||
</dictionary>
|
||||
<string name="targetFramework">IBCarbonFramework</string>
|
||||
<unsigned_int name="nextObjectID">194</unsigned_int>
|
||||
</object>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>mac-crash-logger</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.secondlife.indra.crashreporter</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,345 +0,0 @@
|
||||
/**
|
||||
* @file llcrashloggermac.cpp
|
||||
* @brief Mac OSX crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llcrashloggermac.h"
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "boost/tokenizer.hpp"
|
||||
|
||||
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
|
||||
#include "llerror.h"
|
||||
#include "llfile.h"
|
||||
#include "lltimer.h"
|
||||
#include "llstring.h"
|
||||
#include "lldir.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#define MAX_LOADSTRING 100
|
||||
const char* const SETTINGS_FILE_HEADER = "version";
|
||||
const S32 SETTINGS_FILE_VERSION = 101;
|
||||
|
||||
// Windows Message Handlers
|
||||
|
||||
BOOL gFirstDialog = TRUE; // Are we currently handling the Send/Don't Send dialog?
|
||||
LLFILE *gDebugFile = NULL;
|
||||
|
||||
WindowRef gWindow = NULL;
|
||||
EventHandlerRef gEventHandler = NULL;
|
||||
std::string gUserNotes = "";
|
||||
bool gSendReport = false;
|
||||
bool gRememberChoice = false;
|
||||
IBNibRef nib = NULL;
|
||||
|
||||
OSStatus dialogHandler(EventHandlerCallRef handler, EventRef event, void *userdata)
|
||||
{
|
||||
OSStatus result = eventNotHandledErr;
|
||||
OSStatus err;
|
||||
UInt32 evtClass = GetEventClass(event);
|
||||
UInt32 evtKind = GetEventKind(event);
|
||||
if((evtClass == kEventClassCommand) && (evtKind == kEventCommandProcess))
|
||||
{
|
||||
HICommand cmd;
|
||||
err = GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(cmd), NULL, &cmd);
|
||||
|
||||
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
//Get the value of the checkbox
|
||||
ControlID id;
|
||||
ControlRef checkBox = NULL;
|
||||
id.signature = 'remb';
|
||||
id.id = 0;
|
||||
err = GetControlByID(gWindow, &id, &checkBox);
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
if(GetControl32BitValue(checkBox) == kControlCheckBoxCheckedValue)
|
||||
{
|
||||
gRememberChoice = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
gRememberChoice = false;
|
||||
}
|
||||
}
|
||||
switch(cmd.commandID)
|
||||
{
|
||||
case kHICommandOK:
|
||||
{
|
||||
char buffer[65535]; /* Flawfinder: ignore */
|
||||
Size size = sizeof(buffer) - 1;
|
||||
ControlRef textField = NULL;
|
||||
|
||||
id.signature = 'text';
|
||||
id.id = 0;
|
||||
|
||||
err = GetControlByID(gWindow, &id, &textField);
|
||||
if(err == noErr)
|
||||
{
|
||||
// Get the user response text
|
||||
err = GetControlData(textField, kControlNoPart, kControlEditTextTextTag, size, (Ptr)buffer, &size);
|
||||
}
|
||||
if(err == noErr)
|
||||
{
|
||||
// Make sure the string is terminated.
|
||||
buffer[size] = 0;
|
||||
gUserNotes = buffer;
|
||||
|
||||
llinfos << buffer << llendl;
|
||||
}
|
||||
|
||||
// Send the report.
|
||||
|
||||
QuitAppModalLoopForWindow(gWindow);
|
||||
gSendReport = true;
|
||||
result = noErr;
|
||||
}
|
||||
break;
|
||||
|
||||
case kHICommandCancel:
|
||||
QuitAppModalLoopForWindow(gWindow);
|
||||
result = noErr;
|
||||
break;
|
||||
default:
|
||||
result = eventNotHandledErr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
LLCrashLoggerMac::LLCrashLoggerMac(void)
|
||||
{
|
||||
}
|
||||
|
||||
LLCrashLoggerMac::~LLCrashLoggerMac(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool LLCrashLoggerMac::init(void)
|
||||
{
|
||||
bool ok = LLCrashLogger::init();
|
||||
if(!ok) return false;
|
||||
if(mCrashBehavior != CRASH_BEHAVIOR_ASK) return true;
|
||||
|
||||
// Real UI...
|
||||
OSStatus err;
|
||||
|
||||
err = CreateNibReference(CFSTR("CrashReporter"), &nib);
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
err = CreateWindowFromNib(nib, CFSTR("CrashReporter"), &gWindow);
|
||||
}
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
// Set focus to the edit text area
|
||||
ControlRef textField = NULL;
|
||||
ControlID id;
|
||||
|
||||
id.signature = 'text';
|
||||
id.id = 0;
|
||||
|
||||
// Don't set err if any of this fails, since it's non-critical.
|
||||
if(GetControlByID(gWindow, &id, &textField) == noErr)
|
||||
{
|
||||
SetKeyboardFocus(gWindow, textField, kControlFocusNextPart);
|
||||
}
|
||||
}
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
ShowWindow(gWindow);
|
||||
}
|
||||
|
||||
if(err == noErr)
|
||||
{
|
||||
// Set up an event handler for the window.
|
||||
EventTypeSpec handlerEvents[] =
|
||||
{
|
||||
{ kEventClassCommand, kEventCommandProcess }
|
||||
};
|
||||
|
||||
InstallWindowEventHandler(
|
||||
gWindow,
|
||||
NewEventHandlerUPP(dialogHandler),
|
||||
GetEventTypeCount (handlerEvents),
|
||||
handlerEvents,
|
||||
0,
|
||||
&gEventHandler);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLCrashLoggerMac::gatherPlatformSpecificFiles()
|
||||
{
|
||||
updateApplication("Gathering hardware information...");
|
||||
char path[MAX_PATH];
|
||||
FSRef folder;
|
||||
|
||||
if(FSFindFolder(kUserDomain, kLogsFolderType, false, &folder) == noErr)
|
||||
{
|
||||
// folder is an FSRef to ~/Library/Logs/
|
||||
if(FSRefMakePath(&folder, (UInt8*)&path, sizeof(path)) == noErr)
|
||||
{
|
||||
struct stat dw_stat;
|
||||
std::string mBuf;
|
||||
bool isLeopard = false;
|
||||
// Try the 10.3 path first...
|
||||
std::string dw_file_name = std::string(path) + std::string("/CrashReporter/Second Life.crash.log");
|
||||
int res = stat(dw_file_name.c_str(), &dw_stat);
|
||||
|
||||
if (res)
|
||||
{
|
||||
// Try the 10.2 one next...
|
||||
dw_file_name = std::string(path) + std::string("/Second Life.crash.log");
|
||||
res = stat(dw_file_name.c_str(), &dw_stat);
|
||||
}
|
||||
|
||||
if(res)
|
||||
{
|
||||
//10.5: Like 10.3+, except it puts the crash time in the file instead of dividing it up
|
||||
//using asterisks. Get a directory listing, search for files starting with second life,
|
||||
//use the last one found.
|
||||
std::string old_file_name, current_file_name, pathname, mask;
|
||||
pathname = std::string(path) + std::string("/CrashReporter/");
|
||||
mask = "Second Life*";
|
||||
while(gDirUtilp->getNextFileInDir(pathname, mask, current_file_name, false))
|
||||
{
|
||||
old_file_name = current_file_name;
|
||||
}
|
||||
if(old_file_name != "")
|
||||
{
|
||||
dw_file_name = pathname + old_file_name;
|
||||
res=stat(dw_file_name.c_str(), &dw_stat);
|
||||
isLeopard = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!res)
|
||||
{
|
||||
std::ifstream fp(dw_file_name.c_str());
|
||||
std::stringstream str;
|
||||
if(!fp.is_open()) return;
|
||||
str << fp.rdbuf();
|
||||
mBuf = str.str();
|
||||
|
||||
if(!isLeopard)
|
||||
{
|
||||
// Crash logs consist of a number of entries, one per crash.
|
||||
// Each entry is preceeded by "**********" on a line by itself.
|
||||
// We want only the most recent (i.e. last) one.
|
||||
const char *sep = "**********";
|
||||
const char *start = mBuf.c_str();
|
||||
const char *cur = start;
|
||||
const char *temp = strstr(cur, sep);
|
||||
|
||||
while(temp != NULL)
|
||||
{
|
||||
// Skip past the marker we just found
|
||||
cur = temp + strlen(sep); /* Flawfinder: ignore */
|
||||
|
||||
// and try to find another
|
||||
temp = strstr(cur, sep);
|
||||
}
|
||||
|
||||
// If there's more than one entry in the log file, strip all but the last one.
|
||||
if(cur != start)
|
||||
{
|
||||
mBuf.erase(0, cur - start);
|
||||
}
|
||||
}
|
||||
mCrashInfo["CrashLog"] = mBuf;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Couldn't find any CrashReporter files..." << llendl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LLCrashLoggerMac::mainLoop()
|
||||
{
|
||||
OSStatus err = noErr;
|
||||
|
||||
if(err == noErr && mCrashBehavior == CRASH_BEHAVIOR_ASK)
|
||||
{
|
||||
RunAppModalLoopForWindow(gWindow);
|
||||
}
|
||||
else if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND)
|
||||
{
|
||||
gSendReport = true;
|
||||
}
|
||||
|
||||
if(gRememberChoice)
|
||||
{
|
||||
if(gSendReport) saveCrashBehaviorSetting(CRASH_BEHAVIOR_ALWAYS_SEND);
|
||||
else saveCrashBehaviorSetting(CRASH_BEHAVIOR_NEVER_SEND);
|
||||
}
|
||||
|
||||
if(gSendReport)
|
||||
{
|
||||
setUserText(gUserNotes);
|
||||
sendCrashLogs();
|
||||
}
|
||||
|
||||
if(gWindow != NULL)
|
||||
{
|
||||
DisposeWindow(gWindow);
|
||||
}
|
||||
|
||||
if(nib != NULL)
|
||||
{
|
||||
DisposeNibReference(nib);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void LLCrashLoggerMac::updateApplication(const std::string& message)
|
||||
{
|
||||
LLCrashLogger::updateApplication();
|
||||
}
|
||||
|
||||
bool LLCrashLoggerMac::cleanup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* @file llcrashloggermac.h
|
||||
* @brief Mac OSX crash logger definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLCRASHLOGGERMAC_H
|
||||
#define LLCRASHLOGGERMAC_H
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llcrashlogger.h"
|
||||
#include "llstring.h"
|
||||
|
||||
class LLCrashLoggerMac : public LLCrashLogger
|
||||
{
|
||||
public:
|
||||
LLCrashLoggerMac(void);
|
||||
~LLCrashLoggerMac(void);
|
||||
virtual bool init();
|
||||
virtual bool mainLoop();
|
||||
virtual void updateApplication(const std::string& message = LLStringUtil::null);
|
||||
virtual bool cleanup();
|
||||
virtual void gatherPlatformSpecificFiles();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* @file mac_crash_logger.cpp
|
||||
* @brief Mac OSX crash logger implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2003-2009, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llcrashloggermac.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//time(&gLaunchTime);
|
||||
|
||||
llinfos << "Starting Second Life Viewer Crash Reporter" << llendl;
|
||||
|
||||
LLCrashLoggerMac app;
|
||||
app.parseCommandOptions(argc, argv);
|
||||
if(!app.init())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
app.mainLoop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
4
indra/mac_updater/AutoUpdater.nib/classes.nib
generated
4
indra/mac_updater/AutoUpdater.nib/classes.nib
generated
@@ -1,4 +0,0 @@
|
||||
{
|
||||
IBClasses = ();
|
||||
IBVersion = 1;
|
||||
}
|
||||
14
indra/mac_updater/AutoUpdater.nib/info.nib
generated
14
indra/mac_updater/AutoUpdater.nib/info.nib
generated
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>103 138 356 240 0 0 1280 1002 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>362.0</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7D24</string>
|
||||
<key>targetFramework</key>
|
||||
<string>IBCarbonFramework</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
<object class="NSIBObjectData">
|
||||
<string name="targetFramework">IBCarbonFramework</string>
|
||||
<object name="rootObject" class="NSCustomObject" id="1">
|
||||
<string name="customClass">NSApplication</string>
|
||||
</object>
|
||||
<array count="5" name="allObjects">
|
||||
<object class="IBCarbonWindow" id="166">
|
||||
<string name="windowRect">405 222 533 663 </string>
|
||||
<string name="title">Second Life Updater</string>
|
||||
<object name="rootControl" class="IBCarbonRootControl" id="167">
|
||||
<string name="bounds">0 0 128 441 </string>
|
||||
<array count="3" name="subviews">
|
||||
<object class="IBCarbonStaticText" id="181">
|
||||
<string name="bounds">20 20 44 421 </string>
|
||||
<ostype name="controlSignature">what</ostype>
|
||||
<string name="title">Initializing…</string>
|
||||
</object>
|
||||
<object class="IBCarbonButton" id="183">
|
||||
<string name="bounds">88 351 108 421 </string>
|
||||
<string name="title">Cancel</string>
|
||||
<ostype name="command">not!</ostype>
|
||||
<int name="buttonType">2</int>
|
||||
</object>
|
||||
<object class="IBCarbonProgressBar" id="193">
|
||||
<string name="bounds">51 19 70 422 </string>
|
||||
<ostype name="controlSignature">prog</ostype>
|
||||
<int name="initialValue">50</int>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<boolean name="isResizable">FALSE</boolean>
|
||||
<int name="carbonWindowClass">2</int>
|
||||
<int name="themeBrush">3</int>
|
||||
<int name="windowPosition">7</int>
|
||||
</object>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="181"/>
|
||||
<reference idRef="183"/>
|
||||
<reference idRef="193"/>
|
||||
</array>
|
||||
<array count="5" name="allParents">
|
||||
<reference idRef="1"/>
|
||||
<reference idRef="166"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="167"/>
|
||||
<reference idRef="167"/>
|
||||
</array>
|
||||
<dictionary count="2" name="nameTable">
|
||||
<string>File's Owner</string>
|
||||
<reference idRef="1"/>
|
||||
<string>Updater</string>
|
||||
<reference idRef="166"/>
|
||||
</dictionary>
|
||||
<unsigned_int name="nextObjectID">194</unsigned_int>
|
||||
</object>
|
||||
@@ -1,66 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
project(mac_updater)
|
||||
|
||||
include(00-Common)
|
||||
include(CURL)
|
||||
include(LLCommon)
|
||||
include(LLVFS)
|
||||
include(Linking)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLVFS_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(mac_updater_SOURCE_FILES
|
||||
mac_updater.cpp
|
||||
)
|
||||
|
||||
set(mac_updater_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
)
|
||||
|
||||
set_source_files_properties(${mac_updater_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND mac_updater_SOURCE_FILES ${mac_updater_HEADER_FILES})
|
||||
|
||||
|
||||
set(mac_updater_RESOURCE_FILES
|
||||
AutoUpdater.nib/
|
||||
)
|
||||
set_source_files_properties(
|
||||
${mac_updater_RESOURCE_FILES}
|
||||
PROPERTIES
|
||||
HEADER_FILE_ONLY TRUE
|
||||
)
|
||||
SOURCE_GROUP("Resources" FILES ${mac_updater_RESOURCE_FILES})
|
||||
list(APPEND mac_updater_SOURCE_FILES ${mac_updater_RESOURCE_FILES})
|
||||
|
||||
add_executable(mac-updater
|
||||
MACOSX_BUNDLE
|
||||
${mac_updater_SOURCE_FILES})
|
||||
|
||||
set_target_properties(mac-updater
|
||||
PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
|
||||
)
|
||||
|
||||
target_link_libraries(mac-updater
|
||||
${LLVFS_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
TARGET mac-updater POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
-E
|
||||
copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/AutoUpdater.nib
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-updater.app/Contents/Resources/AutoUpdater.nib
|
||||
)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>mac-updater</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.secondlife.indra.autoupdater</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -101,6 +101,7 @@ set(viewer_SOURCE_FILES
|
||||
hippopanelgrids.cpp
|
||||
importtracker.cpp
|
||||
jcfloaterareasearch.cpp
|
||||
lffloaterinvpanel.cpp
|
||||
lfsimfeaturehandler.cpp
|
||||
lggdicdownload.cpp
|
||||
lgghunspell_wrapper.cpp
|
||||
@@ -139,6 +140,7 @@ set(viewer_SOURCE_FILES
|
||||
llcompilequeue.cpp
|
||||
llconfirmationmanager.cpp
|
||||
llconsole.cpp
|
||||
llcrashlogger.cpp
|
||||
llcurrencyuimanager.cpp
|
||||
llcylinder.cpp
|
||||
lldaycyclemanager.cpp
|
||||
@@ -615,6 +617,7 @@ set(viewer_HEADER_FILES
|
||||
hippopanelgrids.h
|
||||
importtracker.h
|
||||
jcfloaterareasearch.h
|
||||
lffloaterinvpanel.h
|
||||
lfsimfeaturehandler.h
|
||||
lggdicdownload.h
|
||||
lgghunspell_wrapper.h
|
||||
@@ -654,6 +657,7 @@ set(viewer_HEADER_FILES
|
||||
llcompilequeue.h
|
||||
llconfirmationmanager.h
|
||||
llconsole.h
|
||||
llcrashlogger.h
|
||||
llcurrencyuimanager.h
|
||||
llcylinder.h
|
||||
lldaycyclemanager.h
|
||||
@@ -1526,11 +1530,33 @@ if (WINDOWS)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--actions=copy
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
||||
--grid=${GRID}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
|
||||
${MANIFEST_LIBRARIES}
|
||||
DEPENDS
|
||||
${VIEWER_BINARY_NAME}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
COMMENT "Performing viewer_manifest copy"
|
||||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker winmm_shim)
|
||||
|
||||
if (PACKAGE)
|
||||
add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat)
|
||||
add_dependencies(package windows-updater windows-crash-logger)
|
||||
endif (PACKAGE)
|
||||
endif (WINDOWS)
|
||||
|
||||
@@ -1563,6 +1589,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${NDOF_LIBRARY}
|
||||
${viewer_LIBRARIES}
|
||||
${Boost_CONTEXT_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
@@ -1628,11 +1655,36 @@ if (LINUX)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--arch=${ARCH}
|
||||
--actions=copy
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--buildtype=${CMAKE_BUILD_TYPE}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
|
||||
--grid=${GRID}
|
||||
--installer_name=${product}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--standalone=${STANDALONE}
|
||||
${MANIFEST_LIBRARIES}
|
||||
DEPENDS
|
||||
secondlife-stripped
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 media_plugin_webkit basic_plugin_filepicker)
|
||||
add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
|
||||
|
||||
if (PACKAGE)
|
||||
add_custom_target(package ALL DEPENDS ${product}.tar.bz2)
|
||||
add_dependencies(package linux-crash-logger-strip-target)
|
||||
add_dependencies(package copy_l_viewer_manifest)
|
||||
endif (PACKAGE)
|
||||
endif (LINUX)
|
||||
|
||||
@@ -1682,7 +1734,6 @@ if (DARWIN)
|
||||
|
||||
if (PACKAGE)
|
||||
add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
|
||||
add_dependencies(package mac-updater mac-crash-logger)
|
||||
|
||||
add_custom_command(
|
||||
TARGET package POST_BUILD
|
||||
@@ -1732,6 +1783,64 @@ if (INSTALL)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake)
|
||||
endif (INSTALL)
|
||||
|
||||
if (PACKAGE)
|
||||
|
||||
set(SYMBOL_SEARCH_DIRS "")
|
||||
if (WINDOWS)
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows.tar.bz2")
|
||||
# slplugin.exe failing symbols dump - need to debug, might have to do with updated version of google breakpad
|
||||
# set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX} slplugin.exe")
|
||||
set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}")
|
||||
set(VIEWER_COPY_MANIFEST copy_w_viewer_manifest)
|
||||
endif (WINDOWS)
|
||||
if (DARWIN)
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||
# *TODO: Generate these search dirs in the cmake files related to each binary.
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}")
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}")
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}")
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}")
|
||||
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2")
|
||||
set(VIEWER_EXE_GLOBS "'Singularity' SLPlugin")
|
||||
set(VIEWER_LIB_GLOB "*.dylib")
|
||||
endif (DARWIN)
|
||||
if (LINUX)
|
||||
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged")
|
||||
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2")
|
||||
set(VIEWER_EXE_GLOBS "singularity-do-not-run-directly SLPlugin")
|
||||
set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*")
|
||||
set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest)
|
||||
endif (LINUX)
|
||||
|
||||
if(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
|
||||
if(CMAKE_CFG_INTDIR STREQUAL ".")
|
||||
set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
|
||||
else(CMAKE_CFG_INTDIR STREQUAL ".")
|
||||
# set LLBUILD_CONFIG to be a shell variable evaluated at build time
|
||||
# reflecting the configuration we are currently building.
|
||||
set(LLBUILD_CONFIG ${CMAKE_CFG_INTDIR})
|
||||
endif(CMAKE_CFG_INTDIR STREQUAL ".")
|
||||
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
|
||||
COMMAND "${PYTHON_EXECUTABLE}"
|
||||
ARGS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py"
|
||||
"${LLBUILD_CONFIG}"
|
||||
"${SYMBOL_SEARCH_DIRS}"
|
||||
"${VIEWER_EXE_GLOBS}"
|
||||
"${VIEWER_LIB_GLOB}"
|
||||
"${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/bin/dump_syms"
|
||||
"${VIEWER_SYMBOL_FILE}"
|
||||
DEPENDS generate_breakpad_symbols.py
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
|
||||
add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
|
||||
add_dependencies(package generate_breakpad_symbols)
|
||||
endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
|
||||
endif (PACKAGE)
|
||||
|
||||
# Add tests
|
||||
if (LL_TESTS)
|
||||
ADD_VIEWER_BUILD_TEST(llagentaccess viewer)
|
||||
|
||||
@@ -80,6 +80,7 @@ void AIServiceBar::draw()
|
||||
U32 is_used;
|
||||
U32 is_inuse;
|
||||
int total_added;
|
||||
int event_polls;
|
||||
int established_connections;
|
||||
int concurrent_connections;
|
||||
size_t bandwidth;
|
||||
@@ -88,6 +89,7 @@ void AIServiceBar::draw()
|
||||
is_used = per_service_r->is_used();
|
||||
is_inuse = per_service_r->is_inuse();
|
||||
total_added = per_service_r->mTotalAdded;
|
||||
event_polls = per_service_r->mEventPolls;
|
||||
established_connections = per_service_r->mEstablishedConnections;
|
||||
concurrent_connections = per_service_r->mConcurrentConnections;
|
||||
bandwidth = per_service_r->bandwidth().truncateData(AIHTTPView::getTime_40ms());
|
||||
@@ -107,14 +109,14 @@ void AIServiceBar::draw()
|
||||
{
|
||||
if (col < 2)
|
||||
{
|
||||
text = llformat(" | %hu-%hu-%lu,{%hu/%hu,%u}/%u",
|
||||
text = llformat(" | %hu-%hd-%lu,{%hu/%hu,%u}/%u",
|
||||
ct.mApprovedRequests, ct.mQueuedCommands, ct.mQueuedRequests.size(),
|
||||
ct.mAdded, ct.mConcurrentConnections, ct.mDownloading,
|
||||
ct.mMaxPipelinedRequests);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = llformat(" | --%hu-%lu,{%hu/%hu,%u}",
|
||||
text = llformat(" | --%hd-%lu,{%hu/%hu,%u}",
|
||||
ct.mQueuedCommands, ct.mQueuedRequests.size(),
|
||||
ct.mAdded, ct.mConcurrentConnections, ct.mDownloading);
|
||||
}
|
||||
@@ -148,7 +150,7 @@ void AIServiceBar::draw()
|
||||
}
|
||||
start = mHTTPView->updateColumn(mc_col, start);
|
||||
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||
text = llformat(" | %d,%d/%d", total_added, established_connections, concurrent_connections);
|
||||
text = llformat(" | %d,%d,%d/%d", total_added, event_polls, established_connections, concurrent_connections);
|
||||
#else
|
||||
text = llformat(" | %d/%d", total_added, concurrent_connections);
|
||||
#endif
|
||||
@@ -227,6 +229,7 @@ void AIGLHTTPHeaderBar::draw(void)
|
||||
height -= sLineHeight;
|
||||
start = h_offset;
|
||||
text = "Service (host:port)";
|
||||
// This must match AICapabilityType!
|
||||
static char const* caption[number_of_capability_types] = {
|
||||
" | Textures", " | Inventory", " | Mesh", " | Other"
|
||||
};
|
||||
@@ -288,9 +291,14 @@ AIHTTPView::~AIHTTPView()
|
||||
mGLHTTPHeaderBar = NULL;
|
||||
}
|
||||
|
||||
U32 AIHTTPView::updateColumn(int col, U32 start)
|
||||
U32 AIHTTPView::updateColumn(U32 col, U32 start)
|
||||
{
|
||||
llassert(col <= mStartColumn.size());
|
||||
if (col > mStartColumn.size())
|
||||
{
|
||||
// This happens when AIGLHTTPHeaderBar::draw is called before AIServiceBar::draw, which
|
||||
// happens when there are no services (visible) at the moment the HTTP console is opened.
|
||||
return start;
|
||||
}
|
||||
if (col == mStartColumn.size())
|
||||
{
|
||||
mStartColumn.push_back(start);
|
||||
|
||||
@@ -52,7 +52,7 @@ class AIHTTPView : public LLContainerView
|
||||
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
|
||||
|
||||
U32 updateColumn(int col, U32 start);
|
||||
U32 updateColumn(U32 col, U32 start);
|
||||
void setWidth(S32 width) { mWidth = width; }
|
||||
|
||||
private:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@
|
||||
<!--Default for now-->
|
||||
<RenderTerrainLODFactor value="1.0"/>
|
||||
<!--Default for now-->
|
||||
<RenderTreeLODFactor value="0.5"/>
|
||||
<RenderTreeLODFactor value="0.75"/>
|
||||
<!--Try Impostors-->
|
||||
<RenderUseImpostors value="TRUE"/>
|
||||
<!--Default for now-->
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<!--Default for now-->
|
||||
<RenderTerrainLODFactor value="1.0"/>
|
||||
<!--Default for now-->
|
||||
<RenderTreeLODFactor value="0.5"/>
|
||||
<RenderTreeLODFactor value="1.0"/>
|
||||
<!--Try Impostors-->
|
||||
<RenderUseImpostors value="TRUE"/>
|
||||
<!--Default for now-->
|
||||
|
||||
@@ -674,10 +674,34 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LiruGridInTitle</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show grid name in the viewer window title (takes effect upon next login)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LiruGroupNoticeTimes</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Append timestamp to date in the lists of past group notices</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>LiruItalicizeActions</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When enabled, /me chat will be italicized.</string>
|
||||
<string>When enabled, /me chat will be italicized.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -707,6 +731,17 @@
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LiruLegacyLogLaunch</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When opening a chat log, open in an external text editor instead of a browser floater(Windows Only).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>LiruLegacyOutfitStoreObjChanges</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -718,6 +753,28 @@
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LiruLegacySpeakerNames</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether all lists of speakers use legacy names, or your desired way of displaying names.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LiruLocalTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether or not to display system time in the top bar instead of server time.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>LiruMapShowAvCount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -740,6 +797,32 @@
|
||||
<key>Value</key>
|
||||
<integer>20000</integer>
|
||||
</map>
|
||||
<key>LiruNewMessageSound</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Sound ID to play when ding is on for an IM session and an IM comes in.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>67cc2844-00f3-2b3c-b991-6418d01e1bb7</string>
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LiruNewMessageSoundForSystemMessages</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Sound ID to play when ding is on for an IM session and a system message comes through, like when the correspondent starts typing or logs off. (Defaults to off)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LiruNoTransactionClutter</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -785,6 +868,41 @@ Found in Advanced->Rendering->Info Displays</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SLBShowFPS</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show FPS</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SLBDisplayClientTagOnNewLine</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Display the client tag on a new line</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LogShowHistoryLines</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Lines of history to load from log file if LogShowHistory is true.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>32</integer>
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>ContactsUseHorizontalButtons</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -918,6 +1036,28 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<real>60.0</real>
|
||||
</map>
|
||||
<key>NewIMsPerConversation</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The New IMs button in the bottom left will show the count of unread conversations instead of the total count of unread IMs if this is true.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>NewIMsPerConversationReset</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When NewIMsPerConversation is on, this determines when the New IMs button becomes visible while the communicate floater is closed. True will wait until a new IM is received, false displays as long as a conversation is unread.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>ResetFocusOnSelfClick</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -929,6 +1069,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>ResetViewTurnsAvatar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When true, resetting view by hitting escape or using the menu entry will turn your avatar to the direction the camera was pointed</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ShowDisplayNameChanges</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -951,6 +1102,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ShowUnreadIMsCounts</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show the count of unread IMs in the communicate flyout list</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>StatusBarPositionBeforeParcel</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -962,16 +1124,16 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MoyFastMiniMap</key>
|
||||
<key>ShowMiniMapObjects</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Don't show buildings on mini-map</string>
|
||||
<string>Show buildings and megaprims on the mini-map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>BeauchampFloaterGroupTitlesRect</key>
|
||||
<map>
|
||||
@@ -1308,6 +1470,28 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AntiSpamNotFriend</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When true, dialogs from friends will not be blocked unless the _NACL_Antispam is true.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AntiSpamNotMine</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When true, dialogs from your own objects will not be blocked unless the _NACL_Antispam is true.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AntiSpamNotify</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -2017,6 +2201,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<!-- Standard SL options (To my knowledge) -->
|
||||
<key>CrashHostUrl</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>A URL pointing to a crash report handler; overrides cluster negotiation to locate crash handler.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://crash.singularityviewer.org/report.php</string>>
|
||||
</map>
|
||||
<key>AFKTimeout</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -5728,6 +5923,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DoubleClickTeleportMap</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable double-click-teleport for the map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>DoubleClickTeleportMiniMap</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -5896,7 +6102,7 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>EnableGestureSoundsSelf</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Play sounds from your gestures when EnableGestureSounds is false. (Useless otherewise)</string>
|
||||
<string>Play sounds from your gestures when EnableGestureSounds is false. (Useless otherwise)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -6736,22 +6942,6 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<integer>100</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>FloaterIMRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for IM window</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>160</integer>
|
||||
<integer>500</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>FloaterInspectRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -6784,6 +6974,22 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>FloaterInvPanelRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for new inventory windows a folder is opened in</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>400</integer>
|
||||
<integer>300</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>FloaterJoystickRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -9835,6 +10041,28 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>MiniMapPrimMaxAltitudeDelta</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Max allowed altitude difference between your avatar and prims others own for them to be displayed on the minimap (0 means unlimited).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<real>256</real>
|
||||
</map>
|
||||
<key>MiniMapPrimMaxAltitudeDeltaOwn</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Max allowed altitude difference between your avatar and prims you own for them to be displayed on the minimap (0 means unlimited).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
<key>MiniMapPrimMaxRadius</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -9868,6 +10096,87 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>MiniMapWhisperRing</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Display whisper distance ring on mini map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MiniMapWhisperRingColor</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Color for whisper distance ring on mini map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Color4</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>MiniMapChatRing</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Display chat distance ring on mini map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MiniMapChatRingColor</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Color for chat distance ring on mini map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Color4</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>MiniMapShoutRing</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Display shout distance ring on mini map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MiniMapShoutRingColor</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Color for shout distance ring on mini map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Color4</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>MiniMapScale</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -10529,7 +10838,7 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>PerAccountSettingsFile</key>
|
||||
<map>
|
||||
@@ -12043,7 +12352,7 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<!--<key>RenderAnimateTrees</key>
|
||||
<key>RenderAnimateTrees</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use GL matrix ops to animate tree branches.</string>
|
||||
@@ -12053,7 +12362,7 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>-->
|
||||
</map>
|
||||
<key>RenderNoAlpha</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -13509,7 +13818,7 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>128</integer>
|
||||
<integer>32</integer>
|
||||
</map>
|
||||
<key>RunBtnState</key>
|
||||
<map>
|
||||
@@ -17346,6 +17655,88 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<real>1280.0</real>
|
||||
</map>
|
||||
<key>ColladaExportFloaterRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Collada floater position</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>DAEExportConsolidateMaterials</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Combine faces with same texture</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>DAEExportSkipTransparent</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Skip exporting faces with default transparent texture or full transparent</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DAEExportTextures</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Export textures when exporting Collada</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>DAEExportTextureParams</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Apply texture params suchs as repeats to the exported UV map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>DAEExportTexturesType</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Image file format to use when exporting Collada</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>CrashSubmitBehavior</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AscentShowOthersTag</key>
|
||||
<map>
|
||||
@@ -620,6 +620,28 @@
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>SinguDefaultEaseIn</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Amount of time (in seconds) over which uploaded bvh animation blends in by default.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
<key>SinguDefaultEaseOut</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Amount of time (in seconds) over which uploaded bvh animation blends out by default.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
<key>SinguMotionResetsCamera</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -204,6 +204,24 @@
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>MapAvatar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Color for map dots of residents who don't qualify for any color else.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Color4</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>ColorFriendChat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -9,39 +9,6 @@
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>2</integer>
|
||||
</map>
|
||||
<key>CurlMaxTotalConcurrentConnections</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Maximum total number of simultaneous curl connections</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>64</integer>
|
||||
</map>
|
||||
<key>CurlConcurrentConnectionsPerService</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Maximum number of simultaneous curl connections per host:port service</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>8</integer>
|
||||
</map>
|
||||
<key>NoVerifySSLCert</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Do not verify SSL certificates.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
|
||||
@@ -588,7 +588,7 @@
|
||||
<key>LogFileNamewithDate</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Add Date Stamp to chat and IM Logs with format chat-YYYY-MM-DD and 'IM file name'-YYYY-MM. To view old logs goto ..\Second Life\[login name]</string>
|
||||
<string>Add Date Stamp to local chat log as specified by LogFileLocalChatDateFormat and IM logs as specified by LogFileIMsDateFormat. To view old logs goto ..\Second Life\[login name]</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -596,6 +596,28 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LogFileLocalChatDateFormat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When LogFileNamewithDate is true, this is the format used append the date to the log name for Local Chat (Default is -%Y-%m-%d resulting in chat-YYYY-MM-DD)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>-%Y-%m-%d</string>
|
||||
</map>
|
||||
<key>LogFileIMsDateFormat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When LogFileNamewithDate is true, this is the format used append the date to the log names for IMs (Default is -%Y-%m resulting in 'IM file name'-YYYY-MM)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>-%Y-%m</string>
|
||||
</map>
|
||||
|
||||
<key>KeywordsChangeColor</key>
|
||||
<map>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user