Merge viewer-dev-materials and bugfix in LLPanelFace::getState using material instead of mMaterial

master
Graham Madarasz 2013-05-11 20:38:23 -07:00
commit e1c1428569
106 changed files with 2331 additions and 2867 deletions

13
.hgtags
View File

@ -441,3 +441,16 @@ adc360e6bf21390d2665380951d85937cd29a604 3.5.0-release
4b7fa963b80e2056ab648f83a4d61310b3cedb3d DRTVWR-314
65ae89aeb7ea674a555e439e963f17949322ac94 3.5.1-beta3
13149a524874b608aeb76325b35faff113a5ea53 3.5.1-release
78a8fe6abf331944d6b6bb1ce1024a6bc08141f4 DRTVWR-298
50ccc12f38c3c99f03b374e32429cb043b73e2a6 DRTVWR-294
c2b1066514308dff1eeb91162392dfe08bf1c0fe DRTVWR-309
e6b8a92acffd693cd1459e4212e3dff1050acf67 DRTVWR-278
106f19cc011aafdfc9a6d12b641fe8db6e9735a7 3.5.2-beta1
509b97acc4ca1f2644197f1b555773ac0bb6838c 3.5.2-beta2
6cb3689d89c13876ce8fa8faefa7b05e4279502d DRTVWR-316
cfc3e650e5b2063288e7b832e9c9f521bbdacc92 DRTVWR-315
e6e35501f1fea252ef83080adcf30c3cb7c2f75c DRTVWR-299
b6a4ac8f1916ede76e8a023e1cf35c045d0ac707 3.5.2-beta3
a314f1c94374ab1f6633dd2983f7090a68663eb2 3.5.2-beta4
1cfa86d604909dfdb8b372069ff61f9afaa2aac1 MAINT-2647
895628bb5e162410cfdf4bca58f0a57d22ccfcde 3.5.2-beta5

View File

@ -26,40 +26,36 @@ codeticket_since = 3.3.0-release
Linux.gcc_version = /usr/bin/gcc-4.6
Linux.cxx_version = /usr/bin/g++-4.6
# ========================================
# Viewer Development
# ========================================
################################################################
#### Examples of how to set the viewer_channel ####
#
# To build a Release or Release candidate in build bingo:
# bingo.viewer_channel = "Second Life Release"
#
# To build a Beta for the 'Bingo' project in build bingo:
# bingo.viewer_channel = "Second Life Beta Bingo"
#
# To build a Project viewer for the 'Bingo' project in build bingo:
# bingo.viewer_channel = "Second Life Project Bingo"
#
# If left unset, viewer_channel defaults to 'Second Life Test',
# which is appropriate for individual developer builds.
#
# All Linden Lab builds (and only Linden Lab builds)
# should use a viewer_channel that begins with "Second Life"
################################################################
viewer_channel = "Second Life Test"
# Report changes since...
viewer-development.show_changes_since = last_sprint
# Build Settings
viewer-development_coverity.coverity_product = viewer
viewer-development_coverity.run_tests = false
viewer-development.build_debug_release_separately = true
# Notifications - to configure email notices, add a setting like this:
# <username>_<reponame>.email = <email-address>
# =================================================================
# Canonical viewer integration builds - Oz Linden
# =================================================================
integration_viewer-development.viewer_channel = "Second Life Development"
integration_viewer-development.login_channel = "Second Life Development"
integration_viewer-development.build_viewer_update_version_manager = false
integration_viewer-development.email = viewer-development-builds@lists.secondlife.com
integration_viewer-development.build_enforce_coding_policy = false
integration_viewer-development.codeticket_add_context = false
viewer-beta.viewer_channel = "Second Life Beta Viewer"
viewer-beta.login_channel = "Second Life Beta Viewer"
viewer-beta.build_debug_release_separately = true
viewer-beta.build_viewer_update_version_manager = true
viewer-beta.codeticket_add_context = false
viewer-release.viewer_channel = "Second Life Release"
viewer-release.login_channel = "Second Life Release"
viewer-release.build_debug_release_separately = true
viewer-release.build_viewer_update_version_manager = true
viewer-release.codeticket_add_context = false
@ -69,7 +65,6 @@ viewer-release.codeticket_add_context = false
# mesh-development
# ========================================
mesh-development.viewer_channel = "Project Viewer - Mesh"
mesh-development.login_channel = "Project Viewer - Mesh"
mesh-development.viewer_grid = aditi
mesh-development.build_debug_release_separately = true
mesh-development.build_CYGWIN_Debug = false
@ -79,7 +74,6 @@ mesh-development.build_viewer_update_version_manager = false
# mesh-development-release-1-candidate
# ========================================
mesh-development-release-1-candidate.viewer_channel = "Project Viewer - Mesh"
mesh-development-release-1-candidate.login_channel = "Project Viewer - Mesh"
mesh-development-release-1-candidate.viewer_grid = agni
mesh-development-release-1-candidate.build_debug_release_separately = true
mesh-development-release-1-candidate.build_CYGWIN_Debug = false
@ -89,7 +83,6 @@ mesh-development-release-1-candidate.build_viewer_update_version_manager = false
# mesh-development-rc
# ========================================
mesh-development-rc.viewer_channel = "Project Viewer - Mesh"
mesh-development-rc.login_channel = "Project Viewer - Mesh"
mesh-development-rc.viewer_grid = agni
mesh-development-rc.build_debug_release_separately = true
mesh-development-rc.build_CYGWIN_Debug = false
@ -99,7 +92,6 @@ mesh-development-rc.build_viewer_update_version_manager = false
# mesh-asset-deprecation
# ========================================
mesh-asset-deprecation.viewer_channel = "Project Viewer - Mesh Asset Deprecation"
mesh-asset-deprecation.login_channel = "Project Viewer - Mesh Asset Deprecation"
mesh-asset-deprecation.viewer_grid = aditi
mesh-asset-deprecation.build_debug_release_separately = true
mesh-asset-deprecation.build_CYGWIN_Debug = false
@ -117,7 +109,6 @@ viewer-mesh.build_viewer_update_version_manager = false
viewer-mesh.build_Debug = false
viewer-mesh.build_RelWithDebInfo = false
viewer-mesh.viewer_channel = "Project Viewer - Mesh"
viewer-mesh.login_channel = "Project Viewer - Mesh"
viewer-mesh.viewer_grid = aditi
viewer-mesh.email = shining@lists.lindenlab.com
@ -126,7 +117,6 @@ viewer-mesh.email = shining@lists.lindenlab.com
# ========================================
viewer-pathfinding.viewer_channel = "Project Viewer - Pathfinding"
viewer-pathfinding.login_channel = "Project Viewer - Pathfinding"
viewer-pathfinding.viewer_grid = agni
viewer-pathfinding.build_debug_release_separately = true
viewer-pathfinding.build_CYGWIN_Debug = false
@ -157,14 +147,12 @@ viewer-chui.build_viewer_update_version_manager = false
# asset delivery 2010 projects
# =================================================================
viewer-asset-delivery.viewer_channel = "Second Life Development"
viewer-asset-delivery.login_channel = "Second Life Development"
viewer-asset-delivery.build_viewer_update_version_manager = false
viewer-asset-delivery.email = monty@lindenlab.com
viewer-asset-delivery.build_server = false
viewer-asset-delivery.build_server_tests = false
viewer-asset-delivery-metrics.viewer_channel = "Second Life Development"
viewer-asset-delivery-metrics.login_channel = "Second Life Development"
viewer-asset-delivery-metrics.build_viewer_update_version_manager = false
viewer-asset-delivery-metrics.email = monty@lindenlab.com
viewer-asset-delivery-metrics.build_server = false
@ -181,34 +169,29 @@ simon_viewer-dev-private.email_status_this_is_os = false
# Vir
# ========================================
vir-project-1.viewer_channel = "Second Life Release"
vir-project-1.login_channel = "Second Life Release"
# ========================================
# THX-1138 / Runway projects
# ========================================
viewer-thx1138-runway-shared.viewer_channel = "Project Viewer - THX-1138 Runway"
viewer-thx1138-runway-shared.login_channel = "Project Viewer - THX-1138 Runway"
viewer-thx1138-runway-shared.viewer_grid = uma
viewer-thx1138-runway-shared.build_debug_release_separately = true
viewer-thx1138-runway-shared.build_CYGWIN_Debug = false
viewer-thx1138-runway-shared.build_viewer_update_version_manager = false
viewer-thx1138.viewer_channel = "Project Viewer - THX-1138"
viewer-thx1138.login_channel = "Project Viewer - THX-1138"
viewer-thx1138.viewer_grid = uma
viewer-thx1138.build_debug_release_separately = true
viewer-thx1138.build_CYGWIN_Debug = false
viewer-thx1138.build_viewer_update_version_manager = false
runway-merge.viewer_channel = "Project Viewer - Runway Merge"
runway-merge.login_channel = "Project Viewer - Runway Merge"
runway-merge.viewer_grid = agni
runway-merge.build_debug_release_separately = true
runway-merge.build_CYGWIN_Debug = false
runway-merge.build_viewer_update_version_manager = false
runway.viewer_channel = "Project Viewer - Runway"
runway.login_channel = "Project Viewer - Runway"
runway.viewer_grid = agni
runway.build_debug_release_separately = true
runway.build_CYGWIN_Debug = false

View File

@ -186,9 +186,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>ac37d0038c91b0672fa31a02731f0eac</string>
<string>06dd7af75e1eb179aed54fd58d8688af</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Darwin/installer/boost-1.52.0-darwin-20121218.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/270698/arch/Darwin/installer/boost-1.52.0-darwin-20130221.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -198,9 +198,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>146ed8a8c2ef8ab3f0a6c4f214fc5c22</string>
<string>50c8b50b7cced52cc5656fb44e9b12cf</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Linux/installer/boost-1.52.0-linux-20121218.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/270698/arch/Linux/installer/boost-1.52.0-linux-20130222.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -210,9 +210,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>3ea60f17d986b7e8a3351298734bdca4</string>
<string>742fc9675b033df7f9c6f215ff250f6c</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/CYGWIN/installer/boost-1.52.0-windows-20121218.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/270698/arch/CYGWIN/installer/boost-1.52.0-windows-20130221.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>

View File

@ -65,19 +65,16 @@ pre_build()
&& [ -r "$master_message_template_checkout/message_template.msg" ] \
&& template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg"
check_for "Before 'autobuild configure'" ${build_dir}/packages/dictionaries
check_for "Confirm dictionaries are installed before 'autobuild configure'" ${build_dir}/packages/dictionaries
"$AUTOBUILD" configure -c $variant -- \
-DPACKAGE:BOOL=ON \
-DRELEASE_CRASH_REPORTING:BOOL=ON \
-DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \
-DVIEWER_LOGIN_CHANNEL:STRING="\"$viewer_login_channel\"" \
-DGRID:STRING="\"$viewer_grid\"" \
-DLL_TESTS:BOOL="$run_tests" \
-DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url
check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries
end_section "Pre$variant"
}
@ -110,7 +107,6 @@ build()
if $build_viewer
then
begin_section "Viewer$variant"
check_for "Before 'autobuild build'" ${build_dir}/packages/dictionaries
"$AUTOBUILD" build --no-configure -c $variant
build_ok=$?
@ -135,8 +131,6 @@ build()
else
echo false >"$build_dir"/build_ok
fi
check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries
fi
}
@ -171,21 +165,6 @@ fi
# Check to see if we're skipping the platform
eval '$build_'"$arch" || pass
# Run the version number update script
# File no longer exists in code-sep branch, so let's make sure it exists in order to use it.
if test -f scripts/update_version_files.py ; then
begin_section UpdateVer
eval $(python scripts/update_version_files.py \
--channel="$viewer_channel" \
--server_channel="$server_channel" \
--revision=$revision \
--verbose \
| sed -n -e "s,Setting viewer channel/version: '\([^']*\)' / '\([^']*\)',VIEWER_CHANNEL='\1';VIEWER_VERSION='\2',p")\
|| fail update_version_files.py
echo "{\"Type\":\"viewer\",\"Version\":\"${VIEWER_VERSION}\"}" > summary.json
end_section UpdateVer
fi
if [ -z "$AUTOBUILD" ]
then
export autobuild_dir="$here/../../../autobuild/bin/"
@ -209,27 +188,11 @@ then
fi
# load autbuild provided shell functions and variables
# Merov: going back to the previous code that passes even if it fails catching a failure
# TODO: use the correct code here under and fix the llbase import in python code
#if "$AUTOBUILD" source_environment > source_environment
#then
# . source_environment
#else
# dump environment variables for debugging
# env|sort
# record_failure "autobuild source_environment failed"
# cat source_environment >&3
# exit 1
#fi
eval "$("$AUTOBUILD" source_environment)"
# dump environment variables for debugging
env|sort
check_for "Before 'autobuild install'" ${build_dir}/packages/dictionaries
check_for "After 'autobuild install'" ${build_dir}/packages/dictionaries
# Now run the build
succeeded=true
build_processes=
@ -403,7 +366,7 @@ then
do
upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream
done
# Upload the llphysicsextensions_tpv package, if one was produced
# *TODO: Make this an upload-extension
if [ -r "$build_dir/llphysicsextensions_package" ]

View File

@ -1070,10 +1070,12 @@ Sheet Spotter
Shnurui Troughton
Shyotl Kuhr
MAINT-1138
MAINT-2334
Siana Gearz
STORM-960
STORM-1088
MAINT-1138
MAINT-2334
sicarius Thorne
Sicarius Toxx
SignpostMarv Martin
@ -1091,6 +1093,8 @@ SLB Wirefly
Slee Mayo
SEC-1075
snowy Sidran
Sovereign Engineer
MAINT-2334
SpacedOut Frye
VWR-34
VWR-45
@ -1345,3 +1349,4 @@ Zoex Flanagan

View File

@ -3,14 +3,8 @@
# cmake_minimum_required should appear before any
# other commands to guarantee full compatibility
# with the version specified
# The "cmake -E touch" command was released with 2.4.8.
cmake_minimum_required(VERSION 2.4.8 FATAL_ERROR)
# This makes cmake 2.6 not complain about version 2.4 compatibility.
if (COMMAND cmake_policy)
cmake_policy(SET CMP0003 OLD)
endif (COMMAND cmake_policy)
## prior to 2.8, the add_custom_target commands used in setting the version did not work correctly
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
"The root project/makefile/solution name. Defaults to SecondLife.")
@ -19,13 +13,7 @@ project(${ROOT_PROJECT_NAME})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(Variables)
if (DARWIN)
# 2.6.4 fixes a Mac bug in get_target_property(... "SLPlugin" LOCATION):
# before that version it returns "pathname/SLPlugin", whereas the correct
# answer is "pathname/SLPlugin.app/Contents/MacOS/SLPlugin".
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
endif (DARWIN)
include(BuildVersion)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
@ -64,50 +52,49 @@ 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)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
# Legacy C++ tests. Build always, run if LL_TESTS is true.
add_subdirectory(${VIEWER_PREFIX}test)
# Legacy C++ tests. Build always, run if LL_TESTS is true.
add_subdirectory(${VIEWER_PREFIX}test)
# viewer media plugins
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
# viewer media plugins
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
# llplugin testbed code (is this the right way to include it?)
if (LL_TESTS AND NOT LINUX)
add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
endif (LL_TESTS AND NOT LINUX)
# llplugin testbed code (is this the right way to include it?)
if (LL_TESTS AND NOT LINUX)
add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
endif (LL_TESTS AND NOT LINUX)
if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
add_subdirectory(${VIEWER_PREFIX}linux_updater)
if (INSTALL_PROPRIETARY)
include(LLAppearanceUtility)
add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
endif (INSTALL_PROPRIETARY)
add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
elseif (DARWIN)
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
add_subdirectory(${VIEWER_PREFIX}mac_updater)
add_dependencies(viewer mac-updater mac-crash-logger)
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 windows-setup windows-crash-logger)
add_dependencies(viewer windows-updater windows-crash-logger)
elseif (SOLARIS)
add_subdirectory(solaris_crash_logger)
add_dependencies(viewer solaris-crash-logger)
endif (LINUX)
elseif (DARWIN)
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
add_dependencies(viewer mac-crash-logger)
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 windows-setup windows-crash-logger)
add_dependencies(viewer windows-updater windows-crash-logger)
elseif (SOLARIS)
add_subdirectory(solaris_crash_logger)
add_dependencies(viewer solaris-crash-logger)
endif (LINUX)
add_subdirectory(${VIEWER_PREFIX}newview)
add_dependencies(viewer secondlife-bin)
add_subdirectory(${VIEWER_PREFIX}newview)
add_dependencies(viewer secondlife-bin)
if (LL_TESTS)
# Define after the custom targets are created so

View File

@ -153,21 +153,21 @@ if (LINUX)
-pthread
)
add_definitions(-DAPPID=secondlife)
add_definitions(-fvisibility=hidden)
# don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
add_definitions(-DLL_IGNORE_SIGCHLD)
if (WORD_SIZE EQUAL 32)
add_definitions(-march=pentium4)
endif (WORD_SIZE EQUAL 32)
add_definitions(-mfpmath=sse)
#add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
if (NOT STANDALONE)
# this stops us requiring a really recent glibc at runtime
add_definitions(-fno-stack-protector)
# linking can be very memory-hungry, especially the final viewer link
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
endif (NOT STANDALONE)
add_definitions(-DAPPID=secondlife)
add_definitions(-fvisibility=hidden)
# don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway.
add_definitions(-DLL_IGNORE_SIGCHLD)
if (WORD_SIZE EQUAL 32)
add_definitions(-march=pentium4)
endif (WORD_SIZE EQUAL 32)
add_definitions(-mfpmath=sse)
#add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
if (NOT STANDALONE)
# this stops us requiring a really recent glibc at runtime
add_definitions(-fno-stack-protector)
# linking can be very memory-hungry, especially the final viewer link
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
endif (NOT STANDALONE)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
@ -175,12 +175,7 @@ endif (LINUX)
if (DARWIN)
# NOTE (per http://lists.apple.com/archives/darwin-dev/2008/Jan/msg00232.html):
# > Why the bus error? What am I doing wrong?
# This is a known issue where getcontext(3) is writing past the end of the
# ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ).
# As a workaround, define _XOPEN_SOURCE before including ucontext.h.
add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
add_definitions(-DLL_DARWIN=1)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(DARWIN_extra_cstar_flags "-mlong-branch -g")

View File

@ -7,11 +7,12 @@ set(Boost_FIND_REQUIRED ON)
if (STANDALONE)
include(FindBoost)
set(BOOST_CONTEXT_LIBRARY boost_context-mt)
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_SIGNALS_LIBRARY boost_signals-mt)
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
set(BOOST_THREAD_LIBRARY boost_thread-mt)
else (STANDALONE)
use_prebuilt_binary(boost)
@ -20,6 +21,12 @@ else (STANDALONE)
if (WINDOWS)
if(MSVC80)
set(BOOST_CONTEXT_LIBRARY
optimized libboost_context-vc80-mt-${BOOST_VERSION}
debug libboost_context-vc80-mt-gd-${BOOST_VERSION})
set(BOOST_FILESYSTEM_LIBRARY
optimized libboost_filesystem-vc80-mt-${BOOST_VERSION}
debug libboost_filesystem-vc80-mt-gd-${BOOST_VERSION})
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
debug libboost_program_options-vc80-mt-gd-${BOOST_VERSION})
@ -32,59 +39,74 @@ else (STANDALONE)
set(BOOST_SYSTEM_LIBRARY
optimized libboost_system-vc80-mt-${BOOST_VERSION}
debug libboost_system-vc80-mt-gd-${BOOST_VERSION})
set(BOOST_FILESYSTEM_LIBRARY
optimized libboost_filesystem-vc80-mt-${BOOST_VERSION}
debug libboost_filesystem-vc80-mt-gd-${BOOST_VERSION})
set(BOOST_THREAD_LIBRARY
optimized libboost_thread-vc80-mt-${BOOST_VERSION}
debug libboost_thread-vc80-mt-gd-${BOOST_VERSION})
else(MSVC80)
# MSVC 10.0 config
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-mt
debug libboost_program_options-mt-gd)
set(BOOST_REGEX_LIBRARY
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_FILESYSTEM_LIBRARY
optimized libboost_filesystem-mt
debug libboost_filesystem-mt-gd)
set(BOOST_THREAD_LIBRARY
optimized libboost_thread-mt
debug libboost_thread-mt-gd)
endif (MSVC80)
elseif (LINUX)
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_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)
elseif (DARWIN)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt
debug boost_program_options-mt-d)
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_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)

View File

@ -1,18 +1,48 @@
# -*- cmake -*-
# Construct the viewer version number based on the indra/VIEWER_VERSION file
include(Python)
if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/newview/
set(VIEWER_VERSION_BASE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/newview/VIEWER_VERSION.txt")
macro (build_version _target)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py
llversion${_target}.h ${LLCOMMON_INCLUDE_DIRS}
OUTPUT_VARIABLE ${_target}_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
file(STRINGS ${VIEWER_VERSION_BASE_FILE} VIEWER_SHORT_VERSION REGEX "^[0-9]+\\.[0-9]+\\.[0-9]+")
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VIEWER_VERSION_MAJOR ${VIEWER_SHORT_VERSION})
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" VIEWER_VERSION_MINOR ${VIEWER_SHORT_VERSION})
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" VIEWER_VERSION_PATCH ${VIEWER_SHORT_VERSION})
if (${_target}_VERSION)
message(STATUS "Version of ${_target} is ${${_target}_VERSION}")
else (${_target}_VERSION)
message(SEND_ERROR "Could not determine ${_target} version")
endif (${_target}_VERSION)
endmacro (build_version)
if (DEFINED ENV{revision})
set(VIEWER_VERSION_REVISION $ENV{revision})
message("Revision (from environment): ${VIEWER_VERSION_REVISION}")
else (DEFINED ENV{revision})
find_program(MERCURIAL hg)
if (DEFINED MERCURIAL)
execute_process(
COMMAND ${MERCURIAL} parents --template "{rev}"
OUTPUT_VARIABLE VIEWER_VERSION_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (DEFINED VIEWER_VERSION_REVISION)
message("Revision (from hg) ${VIEWER_VERSION_REVISION}")
else (DEFINED VIEWER_VERSION_REVISION)
set(VIEWER_VERSION_REVISION 0 )
message("Revision not set, repository not found, using ${VIEWER_VERSION_REVISION}")
endif (DEFINED VIEWER_VERSION_REVISION)
else (DEFINED MERCURIAL)
set(VIEWER_VERSION_REVISION 0)
message("Revision not set, 'hg' not found (${MERCURIAL}), using ${VIEWER_VERSION_REVISION}")
endif (DEFINED MERCURIAL)
endif (DEFINED ENV{revision})
message("Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
else ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
message(SEND_ERROR "Cannot get viewer version from '${VIEWER_VERSION_BASE_FILE}'")
endif ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
set(VIEWER_CHANNEL_VERSION_DEFINES
"LL_VIEWER_CHANNEL=\"${VIEWER_CHANNEL}\""
"LL_VIEWER_VERSION_MAJOR=${VIEWER_VERSION_MAJOR}"
"LL_VIEWER_VERSION_MINOR=${VIEWER_VERSION_MINOR}"
"LL_VIEWER_VERSION_PATCH=${VIEWER_VERSION_PATCH}"
"LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}"
)
endif (NOT DEFINED VIEWER_SHORT_VERSION)

View File

@ -221,8 +221,10 @@ elseif(DARWIN)
libcollada14dom.dylib
)
# fmod is statically linked on darwin
set(fmod_files "")
if (FMODEX)
set(debug_files ${debug_files} libfmodexL.dylib)
set(release_files ${release_files} libfmodex.dylib)
endif (FMODEX)
elseif(LINUX)
# linux is weird, multiple side by side configurations aren't supported
@ -253,12 +255,13 @@ elseif(LINUX)
libapr-1.so.0
libaprutil-1.so.0
libatk-1.0.so
libboost_context-mt.so.${BOOST_VERSION}.0
libboost_filesystem-mt.so.${BOOST_VERSION}.0
libboost_program_options-mt.so.${BOOST_VERSION}.0
libboost_regex-mt.so.${BOOST_VERSION}.0
libboost_thread-mt.so.${BOOST_VERSION}.0
libboost_filesystem-mt.so.${BOOST_VERSION}.0
libboost_signals-mt.so.${BOOST_VERSION}.0
libboost_system-mt.so.${BOOST_VERSION}.0
libboost_thread-mt.so.${BOOST_VERSION}.0
libcollada14dom.so
libcrypto.so.1.0.0
libdb-5.1.so
@ -365,30 +368,6 @@ copy_if_different(
)
set(third_party_targets ${third_party_targets} ${out_targets})
if (FMOD_SDK_DIR)
copy_if_different(
${FMOD_SDK_DIR}
"${CMAKE_CURRENT_BINARY_DIR}/Debug"
out_targets
${fmod_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${FMOD_SDK_DIR}
"${CMAKE_CURRENT_BINARY_DIR}/Release"
out_targets
${fmod_files}
)
set(all_targets ${all_targets} ${out_targets})
copy_if_different(
${FMOD_SDK_DIR}
"${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo"
out_targets
${fmod_files}
)
set(all_targets ${all_targets} ${out_targets})
endif (FMOD_SDK_DIR)
if(NOT STANDALONE)
add_custom_target(
stage_third_party_libs ALL

View File

@ -170,8 +170,7 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Default deploy grid
set(GRID agni CACHE STRING "Target Grid")
set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
set(VIEWER_CHANNEL "Second Life Test" CACHE STRING "Viewer Channel Name")
if (XCODE_VERSION GREATER 4.2)
set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")

View File

@ -1 +1,5 @@
Wed Nov 7 00:25:19 UTC 2012

View File

@ -84,30 +84,8 @@ def get_default_platform(dummy):
'darwin':'darwin'
}[sys.platform]
def get_default_version(srctree):
# look up llversion.h and parse out the version info
paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
for p in paths:
if os.path.exists(p):
contents = open(p, 'r').read()
major = re.search("LL_VERSION_MAJOR\s=\s([0-9]+)", contents).group(1)
minor = re.search("LL_VERSION_MINOR\s=\s([0-9]+)", contents).group(1)
patch = re.search("LL_VERSION_PATCH\s=\s([0-9]+)", contents).group(1)
build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1)
return major, minor, patch, build
def get_channel(srctree):
# look up llversionserver.h and parse out the version info
paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
for p in paths:
if os.path.exists(p):
contents = open(p, 'r').read()
channel = re.search("LL_CHANNEL\s=\s\"(.+)\";\s*$", contents, flags = re.M).group(1)
return channel
DEFAULT_SRCTREE = os.path.dirname(sys.argv[0])
DEFAULT_CHANNEL = 'Second Life Release'
RELEASE_CHANNEL = 'Second Life Release'
ARGUMENTS=[
dict(name='actions',
@ -140,10 +118,7 @@ ARGUMENTS=[
default=""),
dict(name='channel',
description="""The channel to use for updates, packaging, settings name, etc.""",
default=get_channel),
dict(name='login_channel',
description="""The channel to use for login handshake/updates only.""",
default=None),
default='CHANNEL UNSET'),
dict(name='installer_name',
description=""" The name of the file that the installer should be
packaged up into. Only used on Linux at the moment.""",
@ -164,10 +139,8 @@ ARGUMENTS=[
contain the name of the final package in a form suitable
for use by a .bat file.""",
default=None),
dict(name='version',
description="""This specifies the version of Second Life that is
being packaged up.""",
default=get_default_version),
dict(name='versionfile',
description="""The name of a file containing the full version number."""),
dict(name='signature',
description="""This specifies an identity to sign the viewer with, if any.
If no value is supplied, the default signature will be used, if any. Currently
@ -232,9 +205,14 @@ def main():
args[arg['name']] = default
# fix up version
if isinstance(args.get('version'), str):
args['version'] = args['version'].split('.')
if isinstance(args.get('versionfile'), str):
try: # read in the version string
vf = open(args['versionfile'], 'r')
args['version'] = vf.read().strip().split('.')
except:
print "Unable to read versionfile '%s'" % args['versionfile']
raise
# default and agni are default
if args['grid'] in ['default', 'agni']:
args['grid'] = ''
@ -291,7 +269,7 @@ class LLManifest(object):
def default_grid(self):
return self.args.get('grid', None) == ''
def default_channel(self):
return self.args.get('channel', None) == DEFAULT_CHANNEL
return self.args.get('channel', None) == RELEASE_CHANNEL
def construct(self):
""" Meant to be overriden by LLManifest implementors with code that

View File

@ -305,8 +305,11 @@ void LLAudioEngine_FMODEX::shutdown()
LLAudioEngine::shutdown();
llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl;
if ( mSystem ) // speculative fix for MAINT-2657
{
mSystem->close();
mSystem->release();
}
llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl;
delete mListenerp;

View File

@ -310,7 +310,7 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con
{
mInternetStreamURL = url;
FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_MPEGSEARCH | FMOD_IGNORETAGS, 0, &mInternetStream);
FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_IGNORETAGS, 0, &mInternetStream);
if (result!= FMOD_OK)
{

View File

@ -247,7 +247,6 @@ set(llcommon_HEADER_FILES
lluuid.h
lluuidhashmap.h
llversionserver.h
llversionviewer.h
llworkerthread.h
ll_template_cast.h
metaclass.h

View File

@ -182,8 +182,10 @@ typedef LLAtomic32<S32> LLAtomicS32;
// abbreviated flags
#define LL_APR_R (APR_READ) // "r"
#define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) // "w"
#define LL_APR_A (APR_CREATE|APR_WRITE|APR_APPEND) // "w"
#define LL_APR_RB (APR_READ|APR_BINARY) // "rb"
#define LL_APR_WB (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY) // "wb"
#define LL_APR_AB (APR_CREATE|APR_WRITE|APR_BINARY|APR_APPEND)
#define LL_APR_RPB (APR_READ|APR_WRITE|APR_BINARY) // "r+b"
#define LL_APR_WPB (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY) // "w+b"

View File

@ -115,7 +115,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)
{

View File

@ -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;

View File

@ -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)
{

View File

@ -80,6 +80,7 @@ using namespace llsd;
# include <sys/sysinfo.h>
# include <stdexcept>
const char MEMINFO_FILE[] = "/proc/meminfo";
# include <gnu/libc-version.h>
#elif LL_SOLARIS
# include <stdio.h>
# include <unistd.h>
@ -175,8 +176,41 @@ bool get_shell32_dll_version(DWORD& major, DWORD& minor, DWORD& build_number)
}
#endif // LL_WINDOWS
// Wrap boost::regex_match() with a function that doesn't throw.
template <typename S, typename M, typename R>
static bool regex_match_no_exc(const S& string, M& match, const R& regex)
{
try
{
return boost::regex_match(string, match, regex);
}
catch (const std::runtime_error& e)
{
LL_WARNS("LLMemoryInfo") << "error matching with '" << regex.str() << "': "
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
return false;
}
}
// Wrap boost::regex_search() with a function that doesn't throw.
template <typename S, typename M, typename R>
static bool regex_search_no_exc(const S& string, M& match, const R& regex)
{
try
{
return boost::regex_search(string, match, regex);
}
catch (const std::runtime_error& e)
{
LL_WARNS("LLMemoryInfo") << "error searching with '" << regex.str() << "': "
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
return false;
}
}
LLOSInfo::LLOSInfo() :
mMajorVer(0), mMinorVer(0), mBuild(0)
mMajorVer(0), mMinorVer(0), mBuild(0), mOSVersionString("")
{
#if LL_WINDOWS
@ -412,6 +446,102 @@ LLOSInfo::LLOSInfo() :
mOSString = mOSStringSimple;
}
#elif LL_LINUX
struct utsname un;
if(uname(&un) != -1)
{
mOSStringSimple.append(un.sysname);
mOSStringSimple.append(" ");
mOSStringSimple.append(un.release);
mOSString = mOSStringSimple;
mOSString.append(" ");
mOSString.append(un.version);
mOSString.append(" ");
mOSString.append(un.machine);
// Simplify 'Simple'
std::string ostype = mOSStringSimple.substr(0, mOSStringSimple.find_first_of(" ", 0));
if (ostype == "Linux")
{
// Only care about major and minor Linux versions, truncate at second '.'
std::string::size_type idx1 = mOSStringSimple.find_first_of(".", 0);
std::string::size_type idx2 = (idx1 != std::string::npos) ? mOSStringSimple.find_first_of(".", idx1+1) : std::string::npos;
std::string simple = mOSStringSimple.substr(0, idx2);
if (simple.length() > 0)
mOSStringSimple = simple;
}
}
else
{
mOSStringSimple.append("Unable to collect OS info");
mOSString = mOSStringSimple;
}
const char OS_VERSION_MATCH_EXPRESSION[] = "([0-9]+)\\.([0-9]+)(\\.([0-9]+))?";
boost::regex os_version_parse(OS_VERSION_MATCH_EXPRESSION);
boost::smatch matched;
std::string glibc_version(gnu_get_libc_version());
if ( regex_match_no_exc(glibc_version, matched, os_version_parse) )
{
LL_INFOS("AppInit") << "Using glibc version '" << glibc_version << "' as OS version" << LL_ENDL;
std::string version_value;
if ( matched[1].matched ) // Major version
{
version_value.assign(matched[1].first, matched[1].second);
if (sscanf(version_value.c_str(), "%d", &mMajorVer) != 1)
{
LL_WARNS("AppInit") << "failed to parse major version '" << version_value << "' as a number" << LL_ENDL;
}
}
else
{
LL_ERRS("AppInit")
<< "OS version regex '" << OS_VERSION_MATCH_EXPRESSION
<< "' returned true, but major version [1] did not match"
<< LL_ENDL;
}
if ( matched[2].matched ) // Minor version
{
version_value.assign(matched[2].first, matched[2].second);
if (sscanf(version_value.c_str(), "%d", &mMinorVer) != 1)
{
LL_ERRS("AppInit") << "failed to parse minor version '" << version_value << "' as a number" << LL_ENDL;
}
}
else
{
LL_ERRS("AppInit")
<< "OS version regex '" << OS_VERSION_MATCH_EXPRESSION
<< "' returned true, but minor version [1] did not match"
<< LL_ENDL;
}
if ( matched[4].matched ) // Build version (optional) - note that [3] includes the '.'
{
version_value.assign(matched[4].first, matched[4].second);
if (sscanf(version_value.c_str(), "%d", &mBuild) != 1)
{
LL_ERRS("AppInit") << "failed to parse build version '" << version_value << "' as a number" << LL_ENDL;
}
}
else
{
LL_INFOS("AppInit")
<< "OS build version not provided; using zero"
<< LL_ENDL;
}
}
else
{
LL_WARNS("AppInit") << "glibc version '" << glibc_version << "' cannot be parsed to three numbers; using all zeros" << LL_ENDL;
}
#else
struct utsname un;
@ -444,8 +574,13 @@ LLOSInfo::LLOSInfo() :
mOSStringSimple.append("Unable to collect OS info");
mOSString = mOSStringSimple;
}
#endif
std::stringstream dotted_version_string;
dotted_version_string << mMajorVer << "." << mMinorVer << "." << mBuild;
mOSVersionString.append(dotted_version_string.str());
}
#ifndef LL_WINDOWS
@ -496,6 +631,11 @@ const std::string& LLOSInfo::getOSStringSimple() const
return mOSStringSimple;
}
const std::string& LLOSInfo::getOSVersionString() const
{
return mOSVersionString;
}
const S32 STATUS_SIZE = 8192;
//static
@ -687,38 +827,6 @@ private:
LLSD mStats;
};
// Wrap boost::regex_match() with a function that doesn't throw.
template <typename S, typename M, typename R>
static bool regex_match_no_exc(const S& string, M& match, const R& regex)
{
try
{
return boost::regex_match(string, match, regex);
}
catch (const std::runtime_error& e)
{
LL_WARNS("LLMemoryInfo") << "error matching with '" << regex.str() << "': "
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
return false;
}
}
// Wrap boost::regex_search() with a function that doesn't throw.
template <typename S, typename M, typename R>
static bool regex_search_no_exc(const S& string, M& match, const R& regex)
{
try
{
return boost::regex_search(string, match, regex);
}
catch (const std::runtime_error& e)
{
LL_WARNS("LLMemoryInfo") << "error searching with '" << regex.str() << "': "
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
return false;
}
}
LLMemoryInfo::LLMemoryInfo()
{
refresh();

View File

@ -49,6 +49,8 @@ public:
const std::string& getOSString() const;
const std::string& getOSStringSimple() const;
const std::string& getOSVersionString() const;
S32 mMajorVer;
S32 mMinorVer;
S32 mBuild;
@ -62,6 +64,7 @@ public:
private:
std::string mOSString;
std::string mOSStringSimple;
std::string mOSVersionString;
};

View File

@ -64,10 +64,10 @@
// Boost.Coroutine #include is the *first* #include of the platform header.
// That means that client code must generally #include Boost.Coroutine headers
// before anything else.
#include <boost/coroutine/coroutine.hpp>
#include <boost/dcoroutine/coroutine.hpp>
// Normally, lleventcoro.h obviates future.hpp. We only include this because
// we implement a "by hand" test of future functionality.
#include <boost/coroutine/future.hpp>
#include <boost/dcoroutine/future.hpp>
#include <boost/bind.hpp>
#include <boost/range.hpp>
@ -87,7 +87,7 @@
/*****************************************************************************
* from the banana.cpp example program borrowed for test<1>()
*****************************************************************************/
namespace coroutines = boost::coroutines;
namespace coroutines = boost::dcoroutines;
using coroutines::coroutine;
template<typename Iter>
@ -122,7 +122,7 @@ typedef coroutine<std::string::iterator(void)> match_coroutine_type;
* Test helpers
*****************************************************************************/
// I suspect this will be typical of coroutines used in Linden software
typedef boost::coroutines::coroutine<void()> coroutine_type;
typedef boost::dcoroutines::coroutine<void()> coroutine_type;
/// Simulate an event API whose response is immediate: sent on receipt of the
/// initial request, rather than after some delay. This is the case that
@ -173,10 +173,10 @@ namespace tut
// ... do whatever preliminary stuff must happen ...
// declare the future
boost::coroutines::future<LLSD> future(self);
boost::dcoroutines::future<LLSD> future(self);
// tell the future what to wait for
LLTempBoundListener connection(
LLEventPumps::instance().obtain("source").listen("coro", voidlistener(boost::coroutines::make_callback(future))));
LLEventPumps::instance().obtain("source").listen("coro", voidlistener(boost::dcoroutines::make_callback(future))));
ensure("Not yet", ! future);
// attempting to dereference ("resolve") the future causes the calling
// coroutine to wait for it

View File

@ -530,6 +530,10 @@ typedef enum e_lscript_runtime_permissions
SCRIPT_PERMISSION_TRACK_CAMERA,
SCRIPT_PERMISSION_CONTROL_CAMERA,
SCRIPT_PERMISSION_TELEPORT,
SCRIPT_PERMISSION_EXPERIENCE,
SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT,
SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS,
SCRIPT_PERMISSION_RETURN_OBJECTS,
SCRIPT_PERMISSION_EOF
} LSCRIPTRunTimePermissions;
@ -547,6 +551,10 @@ const U32 LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_EOF] =
(0x1 << 10),// SCRIPT_PERMISSION_TRACK_CAMERA
(0x1 << 11),// SCRIPT_PERMISSION_CONTROL_CAMERA
(0x1 << 12),// SCRIPT_PERMISSION_TELEPORT
(0x1 << 13),// SCRIPT_PERMISSION_EXPERIENCE,
(0x1 << 14),// SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT,
(0x1 << 15),// SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS,
(0x1 << 16),// SCRIPT_PERMISSION_RETURN_OBJECTS,
};
// http_request string constants

View File

@ -1,4 +0,0 @@
{
IBClasses = ();
IBVersion = 1;
}

View File

@ -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>

View File

@ -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&apos;s Owner</string>
<reference idRef="1"/>
<string>Updater</string>
<reference idRef="166"/>
</dictionary>
<unsigned_int name="nextObjectID">194</unsigned_int>
</object>

View File

@ -1,75 +0,0 @@
# -*- cmake -*-
project(mac_updater)
include(00-Common)
include(OpenSSL)
include(CURL)
include(CARes)
include(LLCommon)
include(LLMessage)
include(LLVFS)
include(Linking)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
${CARES_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
${LLMESSAGE_LIBRARIES}
${LLVFS_LIBRARIES}
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${CURL_LIBRARIES}
${CARES_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
)
ll_deploy_sharedlibs_command(mac-updater)

View File

@ -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

View File

@ -1,91 +0,0 @@
/**
* @file mac_updater.h
* @brief
*
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include <iostream>
#include <pthread.h>
#include <boost/filesystem.hpp>
#ifndef LL_MAC_UPDATER_H
#define LL_MAC_UPDATER_H
extern bool gCancelled;
extern bool gFailure;
void *updatethreadproc(void*);
std::string* walkParents( signed int depth, std::string* childpath );
std::string* getUserTrashFolder();
void setProgress(int cur, int max);
void setProgressText(const std::string& str);
void sendProgress(int cur, int max, std::string str);
void sendDone();
void sendStopAlert();
bool isFSRefViewerBundle(const std::string& targetURL);
bool isDirWritable(const std::string& dir_name);
bool mkTempDir(boost::filesystem::path& temp_dir);
bool copyDir(const std::string& src_dir, const std::string& dest_dir);
int oldmain();
class LLMacUpdater
{
public:
LLMacUpdater();
void doUpdate();
const std::string walkParents( signed int depth, const std::string& childpath );
bool isApplication(const std::string& app_str);
void filterFile(const char* filename);
bool findAppBundleOnDiskImage(const boost::filesystem::path& dir_path,
boost::filesystem::path& path_found);
bool verifyDirectory(const boost::filesystem::path* directory, bool isParent=false);
bool getViewerDir(boost::filesystem::path &app_dir);
bool downloadDMG(const std::string& dmgName, boost::filesystem::path* temp_dir);
bool doMount(const std::string& dmgName, char* deviceNode, const boost::filesystem::path& temp_dir);
bool moveApplication (const boost::filesystem::path& app_dir,
const boost::filesystem::path& temp_dir,
boost::filesystem::path& aside_dir);
bool doInstall(const boost::filesystem::path& app_dir,
const boost::filesystem::path& temp_dir,
boost::filesystem::path& mount_dir,
bool replacingTarget);
void* updatethreadproc(void*);
static void* sUpdatethreadproc(void*);
public:
std::string *mUpdateURL;
std::string *mProductName;
std::string *mBundleID;
std::string *mDmgFile;
std::string *mMarkerPath;
std::string *mApplicationPath;
static LLMacUpdater *sInstance;
};
#endif

View File

@ -87,6 +87,7 @@ include_directories(
${OPENAL_LIB_INCLUDE_DIRS}
${LIBS_PREBUILT_DIR}/include/collada/1.4
${LLAPPEARANCE_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)
include_directories(SYSTEM
@ -301,6 +302,7 @@ set(viewer_SOURCE_FILES
llgroupiconctrl.cpp
llgrouplist.cpp
llgroupmgr.cpp
llhasheduniqueid.cpp
llhints.cpp
llhomelocationresponder.cpp
llhudeffect.cpp
@ -882,6 +884,7 @@ set(viewer_HEADER_FILES
llgroupiconctrl.h
llgrouplist.h
llgroupmgr.h
llhasheduniqueid.h
llhints.h
llhomelocationresponder.h
llhudeffect.h
@ -1249,6 +1252,18 @@ set(viewer_HEADER_FILES
source_group("CMake Rules" FILES ViewerInstall.cmake)
add_custom_target(generate_viewer_version ALL
COMMAND echo "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
COMMENT Generating viewer_version.txt for manifest processing
)
set_source_files_properties(
llversioninfo.cpp tests/llversioninfo_test.cpp
PROPERTIES
DEPENDS generate_viewer_version # dummy dependency to force recompile every time
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
)
if (DARWIN)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp)
@ -1326,15 +1341,17 @@ if (WINDOWS)
# Replace the icons with the appropriate ones for the channel
# ('test' is the default)
set(ICON_PATH "test")
set(VIEWER_MACOSX_PHASE "d")
string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
if(channel_lower MATCHES "^second life release")
set(ICON_PATH "release")
elseif(channel_lower MATCHES "^second life beta viewer")
set(VIEWER_MACOSX_PHASE "f")
elseif(channel_lower MATCHES "^second life beta")
set(ICON_PATH "beta")
elseif(channel_lower MATCHES "^second life development")
set(ICON_PATH "development")
elseif(channel_lower MATCHES "project")
set(VIEWER_MACOSX_PHASE "b")
elseif(channel_lower MATCHES "^second life project")
set(ICON_PATH "project")
set(VIEWER_MACOSX_PHASE "a")
endif()
message("Copying icons for ${ICON_PATH}")
execute_process(
@ -1403,11 +1420,18 @@ if (WINDOWS)
set_source_files_properties(${viewer_RESOURCE_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/res/viewerRes.rc
${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
)
set(viewer_RESOURCE_FILES
res/viewerRes.rc
${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
${viewer_RESOURCE_FILES}
)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/viewerRes.rc
PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/res"
)
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
if (NOT STANDALONE)
@ -1710,10 +1734,13 @@ if (WINDOWS)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
--grid=${GRID}
--channel=${VIEWER_CHANNEL}
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
generate_viewer_version
stage_third_party_libs
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
@ -1772,21 +1799,23 @@ if (WINDOWS)
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
--channel=${VIEWER_CHANNEL}
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--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}/touched.bat
DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
${COPY_INPUT_DEPENDENCIES}
)
add_custom_target(package ALL DEPENDS
${CMAKE_CFG_INTDIR}/touched.bat
windows-setup-build-all
generate_viewer_version
)
# temporarily disable packaging of event_host until hg subrepos get
# sorted out on the parabuild cluster...
@ -1838,6 +1867,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${viewer_LIBRARIES}
${BOOST_PROGRAM_OPTIONS_LIBRARY}
${BOOST_REGEX_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${DBUSGLIB_LIBRARIES}
${OPENGL_LIBRARIES}
${FMODWRAPPER_LIBRARY} # must come after LLAudio
@ -1859,14 +1889,11 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLAPPEARANCE_LIBRARIES}
)
build_version(viewer)
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
if (LINUX)
set(product SecondLife-${ARCH}-${viewer_VERSION})
set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})
# These are the generated targets that are copied to package/
set(COPY_INPUT_DEPENDENCIES
@ -1888,20 +1915,22 @@ if (LINUX)
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
--channel=${VIEWER_CHANNEL}
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
--grid=${GRID}
--installer_name=${product}
--login_channel=${VIEWER_LOGIN_CHANNEL}
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
generate_viewer_version
${COPY_INPUT_DEPENDENCIES}
)
if (PACKAGE)
endif (PACKAGE)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched
COMMAND ${PYTHON_EXECUTABLE}
@ -1915,9 +1944,12 @@ if (LINUX)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
--grid=${GRID}
--channel=${VIEWER_CHANNEL}
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
generate_viewer_version
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
)
@ -1934,18 +1966,24 @@ endif (LINUX)
if (DARWIN)
set(product "Second Life")
set_target_properties(
${VIEWER_BINARY_NAME}
PROPERTIES
OUTPUT_NAME "${product}"
MACOSX_BUNDLE_INFO_STRING "info string - localize me"
MACOSX_BUNDLE_INFO_STRING "Second Life Viewer"
MACOSX_BUNDLE_ICON_FILE "secondlife.icns"
MACOSX_BUNDLE_GUI_IDENTIFIER "Second Life"
MACOSX_BUNDLE_LONG_VERSION_STRING "ververver"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.secondlife.indra.viewer"
MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"
MACOSX_BUNDLE_BUNDLE_NAME "Second Life"
MACOSX_BUNDLE_SHORT_VERSION_STRING "asdf"
MACOSX_BUNDLE_BUNDLE_VERSION "asdf"
MACOSX_BUNDLE_COPYRIGHT "copyright linden lab 2007 - localize me and run me through a legal wringer"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}"
MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}"
MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2007"
)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist"
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Info.plist"
)
add_custom_command(
@ -1960,11 +1998,16 @@ if (DARWIN)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
--grid=${GRID}
--channel=${VIEWER_CHANNEL}
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
generate_viewer_version
)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger)
if (ENABLE_SIGNING)
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
@ -1974,6 +2017,7 @@ if (DARWIN)
if (PACKAGE)
add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
add_dependencies(package generate_viewer_version)
add_custom_command(
TARGET package POST_BUILD
@ -1987,12 +2031,14 @@ if (DARWIN)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
--grid=${GRID}
--login_channel=${VIEWER_LOGIN_CHANNEL}
--channel=${VIEWER_CHANNEL}
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
${SIGNING_SETTING}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
generate_viewer_version
)
endif (PACKAGE)
endif (DARWIN)
@ -2017,12 +2063,11 @@ if (PACKAGE)
# *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}/mac_crash_logger/${CMAKE_CFG_INTDIR}")
list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_updater/${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 "'Second Life' SLPlugin mac-updater mac-crash-logger")
set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger")
set(VIEWER_LIB_GLOB "*.dylib")
endif (DARWIN)
if (LINUX)

View File

@ -2,6 +2,6 @@
CFBundleName = "Second Life";
CFBundleShortVersionString = "Second Life version 3.5.1.288888";
CFBundleGetInfoString = "Second Life version 3.5.1.288888, Copyright 2004-2009 Linden Research, Inc.";
CFBundleShortVersionString = "Second Life version %%VERSION%%";
CFBundleGetInfoString = "Second Life version %%VERSION%%, Copyright 2004 Linden Research, Inc.";

View File

@ -60,7 +60,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>3.4.1.264760</string>
<string>${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>

View File

@ -0,0 +1 @@
3.5.3

View File

@ -92,6 +92,9 @@ PERMISSION_CHANGE_LINKS Passed to llRequestPermissions library function to req
PERMISSION_TRACK_CAMERA Passed to llRequestPermissions library function to request permission to track agent's camera
PERMISSION_CONTROL_CAMERA Passed to llRequestPermissions library function to request permission to change agent's camera
PERMISSION_TELEPORT Passed to llRequestPermissions library function to request permission to teleport agent
SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT Passed to llRequestPermissions library function to request permission to silently modify estate access lists
PERMISSION_OVERRIDE_ANIMATIONS Passed to llRequestPermissions library function to request permission to override animations on agent
PERMISSION_RETURN_OBJECTS Passed to llRequestPermissions library function to request permission to return objects
DEBUG_CHANNEL Chat channel reserved for debug and error messages from scripts
PUBLIC_CHANNEL Chat channel that broadcasts to all nearby users

View File

@ -2015,7 +2015,7 @@
<key>Value</key>
<string />
</map>
<key>DebugAvatarAppearanceMessage</key>
<key>DebugAvatarAppearanceMessage</key>
<map>
<key>Comment</key>
<string>Dump a bunch of XML files when handling appearance messages</string>
@ -2070,7 +2070,7 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>DebugAvatarCompositeBaked</key>
<key>DebugAvatarCompositeBaked</key>
<map>
<key>Comment</key>
<string>Colorize avatar meshes based on baked/composite state.</string>
@ -11183,7 +11183,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
<integer>0.0</integer>
<real>0.0</real>
</map>
<key>TextureFetchUpdateSkipLowPriority</key>
<map>

View File

@ -157,8 +157,8 @@ void main()
//spec *= shadow;
//color.rgb += spec * specular;
//color.rgb = atmosTransport(color.rgb);
//color.rgb = scaleSoftClip(color.rgb);
color.rgb = atmosTransport(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
//color.a = spec * sunAngle2;
//wavef.z *= 0.1f;

View File

@ -49,35 +49,35 @@ float wave(vec2 v, float t, float f, vec2 d, float s)
void main()
{
//transform vertex
vec4 pos = vec4(position.xyz, 1.0);
mat4 modelViewProj = modelview_projection_matrix;
vec4 oPosition;
//get view vector
vec3 oEyeVec;
oEyeVec.xyz = position.xyz-eyeVec;
oEyeVec.xyz = pos.xyz-eyeVec;
float d = length(oEyeVec.xy);
float ld = min(d, 2560.0);
vec3 lpos = position;
lpos.xy = eyeVec.xy + oEyeVec.xy/d*ld;
pos.xy = eyeVec.xy + oEyeVec.xy/d*ld;
view.xyz = oEyeVec;
d = clamp(ld/1536.0-0.5, 0.0, 1.0);
d *= d;
oPosition = vec4(lpos, 1.0);
oPosition = vec4(position, 1.0);
oPosition.z = mix(oPosition.z, max(eyeVec.z*0.75, 0.0), d);
oPosition = modelViewProj * oPosition;
refCoord.xyz = oPosition.xyz + vec3(0,0,0.2);
//get wave position parameter (create sweeping horizontal waves)
vec3 v = lpos;
vec3 v = pos.xyz;
v.x += (cos(v.x*0.08/*+time*0.01*/)+sin(v.y*0.02))*6.0;
//push position for further horizon effect.
vec4 pos;
pos.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
pos.w = 1.0;
pos = modelview_matrix*pos;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

View File

@ -122,7 +122,7 @@ export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}"
# Have to deal specially with gridargs.dat; typical contents look like:
# --channel "Second Life Developer" --settings settings_developer.xml
# --channel "Second Life Test" --settings settings_test.xml
# Simply embedding $(<etc/gridargs.dat) into a command line treats each of
# Second, Life and Developer as separate args -- no good. We need bash to
# process quotes using eval.
@ -144,7 +144,7 @@ done
# therefore "${gridargs[@]}" entirely vanishes from the command line below,
# just as we want.
if ! $skip_gridargs ; then
eval gridargs=("$(<etc/gridargs.dat)")
eval gridargs=("$(<etc/gridargs.dat)")
fi
# Run the program.

View File

@ -30,7 +30,6 @@
// Viewer includes
#include "llversioninfo.h"
#include "llversionviewer.h"
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
@ -123,6 +122,7 @@
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>
#if LL_WINDOWS
@ -252,6 +252,7 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance);
// viewer.cpp - these are only used in viewer, should be easily moved.
#if LL_DARWIN
const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
extern void init_apple_menu(const char* product);
#endif // LL_DARWIN
@ -269,6 +270,20 @@ BOOL gShowObjectUpdates = FALSE;
BOOL gUseQuickTime = TRUE;
eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
S32 gLastExecDuration = -1; // (<0 indicates unknown)
#if LL_WINDOWS
# define LL_PLATFORM_KEY "win"
#elif LL_DARWIN
# define LL_PLATFORM_KEY "mac"
#elif LL_LINUX
# define LL_PLATFORM_KEY "lnx"
#elif LL_SOLARIS
# define LL_PLATFORM_KEY "sol"
#else
# error "Unknown Platform"
#endif
const char* gPlatform = LL_PLATFORM_KEY;
LLSD gDebugInfo;
@ -328,8 +343,9 @@ BOOL gLogoutInProgress = FALSE;
////////////////////////////////////////////////////////////
// Internal globals... that should be removed.
static std::string gArgs;
const int MAX_MARKER_LENGTH = 1024;
const std::string MARKER_FILE_NAME("SecondLife.exec_marker");
const std::string START_MARKER_FILE_NAME("SecondLife.start_marker");
const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker");
@ -642,7 +658,7 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL;
LLAppViewer::LLAppViewer() :
mMarkerFile(),
mLogoutMarkerFile(NULL),
mLogoutMarkerFile(),
mReportedCrash(false),
mNumSessions(0),
mPurgeCache(false),
@ -672,6 +688,7 @@ LLAppViewer::LLAppViewer() :
gLoggedInTime.stop();
LLLoginInstance::instance().setUpdaterService(mUpdater.get());
LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
}
LLAppViewer::~LLAppViewer()
@ -1780,7 +1797,7 @@ bool LLAppViewer::cleanup()
llinfos << "Cleaning up Objects" << llendflush;
LLViewerObject::cleanupVOClasses();
LLAvatarAppearance::cleanupClass();
LLAvatarAppearance::cleanupClass();
@ -2108,7 +2125,7 @@ void errorCallback(const std::string &error_string)
LLError::crashAndLoop(error_string);
}
bool LLAppViewer::initLogging()
void LLAppViewer::initLogging()
{
//
// Set up logging defaults for the viewer
@ -2122,17 +2139,46 @@ bool LLAppViewer::initLogging()
"SecondLife.old");
LLFile::remove(old_log_file);
// Rename current log file to ".old"
// Get name of the log file
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"SecondLife.log");
/*
* Before touching any log files, compute the duration of the last run
* by comparing the ctime of the previous start marker file with the ctime
* of the last log file.
*/
std::string start_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, START_MARKER_FILE_NAME);
llstat start_marker_stat;
llstat log_file_stat;
if ( 0 == LLFile::stat(start_marker_file_name, &start_marker_stat)
&& 0 == LLFile::stat(log_file, &log_file_stat)
)
{
int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
// only report a last run time if the last viewer was the same version
// because this stat will be counted against this version
gLastExecDuration = markerIsSameVersion(start_marker_file_name) ? elapsed_seconds : -1;
}
else
{
// at least one of the LLFile::stat calls failed, so we can't compute the run time
gLastExecDuration = -1; // unknown
}
// Create a new start marker file for comparison with log file time for the next run
LLAPRFile start_marker_file ;
start_marker_file.open(start_marker_file_name, LL_APR_W);
if (start_marker_file.getFileHandle())
{
recordMarkerVersion(start_marker_file);
start_marker_file.close();
}
// Rename current log file to ".old"
LLFile::rename(log_file, old_log_file);
// Set the log file to SecondLife.log
LLError::logToFile(log_file);
// *FIX:Mani no error handling here!
return true;
}
bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
@ -2707,15 +2753,11 @@ bool LLAppViewer::initConfiguration()
}
}
if (!gSavedSettings.getBOOL("AllowMultipleViewers"))
{
//
// Check for another instance of the app running
//
mSecondInstance = anotherInstanceRunning();
if (mSecondInstance)
if (mSecondInstance && !gSavedSettings.getBOOL("AllowMultipleViewers"))
{
std::ostringstream msg;
msg << LLTrans::getString("MBAlreadyRunning");
@ -2728,12 +2770,6 @@ bool LLAppViewer::initConfiguration()
initMarkerFile();
checkForCrash();
}
else
{
mSecondInstance = anotherInstanceRunning();
if (mSecondInstance)
{
// This is the second instance of SL. Turn off voice support,
@ -2745,14 +2781,10 @@ bool LLAppViewer::initConfiguration()
disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST);
}
}
initMarkerFile();
if(!mSecondInstance)
else
{
checkForCrash();
}
}
// NextLoginLocation is set from the command line option
std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
@ -2858,25 +2890,46 @@ namespace {
std::string notification_name;
void (*apply_callback)(LLSD const &, LLSD const &) = NULL;
/* Build up the notification name...
* it can be any of these, which are included here for the sake of grep:
* RequiredUpdateDownloadedDialog
* RequiredUpdateDownloadedVerboseDialog
* OtherChannelRequiredUpdateDownloadedDialog
* OtherChannelRequiredUpdateDownloadedVerbose
* DownloadBackgroundTip
* DownloadBackgroundDialog
* OtherChannelDownloadBackgroundTip
* OtherChannelDownloadBackgroundDialog
*/
{
LL_DEBUGS("UpdaterService") << "data = ";
std::ostringstream data_dump;
LLSDSerialize::toNotation(data, data_dump);
LL_CONT << data_dump.str() << LL_ENDL;
}
if(data["channel"].asString() != LLVersionInfo::getChannel())
{
notification_name.append("OtherChannel");
}
if(data["required"].asBoolean())
{
if(LLStartUp::getStartupState() <= STATE_LOGIN_WAIT)
{
// The user never saw the progress bar.
apply_callback = &apply_update_ok_callback;
notification_name = "RequiredUpdateDownloadedVerboseDialog";
notification_name += "RequiredUpdateDownloadedVerboseDialog";
}
else if(LLStartUp::getStartupState() < STATE_WORLD_INIT)
{
// The user is logging in but blocked.
apply_callback = &apply_update_ok_callback;
notification_name = "RequiredUpdateDownloadedDialog";
notification_name += "RequiredUpdateDownloadedDialog";
}
else
{
// The user is already logged in; treat like an optional update.
apply_callback = &apply_update_callback;
notification_name = "DownloadBackgroundTip";
notification_name += "DownloadBackgroundTip";
}
}
else
@ -2886,16 +2939,26 @@ namespace {
{
// CHOP-262 we need to use a different notification
// method prior to login.
notification_name = "DownloadBackgroundDialog";
notification_name += "DownloadBackgroundDialog";
}
else
{
notification_name = "DownloadBackgroundTip";
notification_name += "DownloadBackgroundTip";
}
}
LLSD substitutions;
substitutions["VERSION"] = data["version"];
std::string new_channel = data["channel"].asString();
substitutions["NEW_CHANNEL"] = new_channel;
std::string info_url = data["info_url"].asString();
if ( !info_url.empty() )
{
substitutions["INFO_URL"] = info_url;
}
else
{
LL_WARNS("UpdaterService") << "no info url supplied - defaulting to hard coded release notes pattern" << LL_ENDL;
// truncate version at the rightmost '.'
std::string version_short(data["version"]);
@ -2914,7 +2977,8 @@ namespace {
relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
substitutions["RELEASE_NOTES_FULL_URL"] = relnotes_url.getString();
substitutions["INFO_URL"] = relnotes_url.getString();
}
LLNotificationsUtil::add(notification_name, substitutions, LLSD(), apply_callback);
}
@ -2963,16 +3027,40 @@ void LLAppViewer::initUpdater()
std::string url = gSavedSettings.getString("UpdaterServiceURL");
std::string channel = LLVersionInfo::getChannel();
std::string version = LLVersionInfo::getVersion();
std::string protocol_version = gSavedSettings.getString("UpdaterServiceProtocolVersion");
std::string service_path = gSavedSettings.getString("UpdaterServicePath");
U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod");
bool willing_to_test;
LL_DEBUGS("UpdaterService") << "channel " << channel << LL_ENDL;
static const boost::regex is_test_channel("\\bTest$");
if (boost::regex_search(channel, is_test_channel))
{
LL_INFOS("UpdaterService") << "Test build: overriding willing_to_test by sending testno" << LL_ENDL;
willing_to_test = false;
}
else
{
willing_to_test = gSavedSettings.getBOOL("UpdaterWillingToTest");
}
unsigned char unique_id[MD5HEX_STR_SIZE];
if ( ! llHashedUniqueID(unique_id) )
{
if ( willing_to_test )
{
LL_WARNS("UpdaterService") << "Unable to provide a unique id; overriding willing_to_test by sending testno" << LL_ENDL;
}
willing_to_test = false;
}
mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this));
mUpdater->initialize(protocol_version,
url,
mUpdater->initialize(url,
service_path,
channel,
version);
version,
gPlatform,
getOSInfo().getOSVersionString(),
unique_id,
willing_to_test
);
mUpdater->setCheckPeriod(check_period);
mUpdater->setBandwidthLimit((int)gSavedSettings.getF32("UpdaterMaximumBandwidth") * (1024/8));
gSavedSettings.getControl("UpdaterMaximumBandwidth")->getSignal()->
@ -3230,8 +3318,8 @@ void LLAppViewer::writeSystemInfo()
}
// Dump some debugging info
LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME")
<< " version " << LLVersionInfo::getShortVersion() << LL_ENDL;
LL_INFOS("SystemInfo") << "Application: " << LLTrans::getString("APP_NAME") << LL_ENDL;
LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << LL_ENDL;
// Dump the local time and time zone
time_t now;
@ -3357,22 +3445,27 @@ void LLAppViewer::handleViewerCrash()
//we're already in a crash situation
if (gDirUtilp)
{
std::string crash_file_name;
if(gLLErrorActivated) crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME);
else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
llinfos << "Creating crash marker file " << crash_file_name << llendl;
std::string crash_file_name = ( gLLErrorActivated )
? gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME)
: gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
LL_INFOS("MarkerFile") << "Creating crash marker file " << crash_file_name << LL_ENDL;
LLAPRFile crash_file ;
crash_file.open(crash_file_name, LL_APR_W);
if (crash_file.getFileHandle())
{
LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL;
recordMarkerVersion(crash_file);
}
else
{
LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_file_name << LL_ENDL;
}
}
else
{
LL_WARNS("MarkerFile") << "No gDirUtilp with which to create error marker file name" << LL_ENDL;
}
if (gMessageSystem && gDirUtilp)
{
@ -3424,14 +3517,14 @@ bool LLAppViewer::anotherInstanceRunning()
// If the file is currently locked, that means another process is already running.
std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME);
LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL;
LL_DEBUGS("MarkerFile") << "Checking marker file '"<< marker_file << "' for lock..." << LL_ENDL;
//Freeze case checks
if (LLAPRFile::isExist(marker_file, NULL, LL_APR_RB))
{
// File exists, try opening with write permissions
LLAPRFile outfile ;
outfile.open(marker_file, LL_APR_WB);
outfile.open(marker_file, LL_APR_AB);
apr_file_t* fMarker = outfile.getFileHandle() ;
if (!fMarker)
{
@ -3450,6 +3543,46 @@ bool LLAppViewer::anotherInstanceRunning()
return false;
}
// static
void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file)
{
std::string marker_version(LLVersionInfo::getChannelAndVersion());
if ( marker_version.length() > MAX_MARKER_LENGTH )
{
LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ") greater than maximum: marker matching may be incorrect" << LL_ENDL;
}
// record the viewer version in the marker file
marker_file.write(marker_version.data(), marker_version.length());
}
bool LLAppViewer::markerIsSameVersion(const std::string& marker_name) const
{
bool sameVersion = false;
std::string my_version(LLVersionInfo::getChannelAndVersion());
char marker_version[MAX_MARKER_LENGTH];
S32 marker_version_length;
LLAPRFile marker_file;
marker_file.open(marker_name, LL_APR_RB);
if (marker_file.getFileHandle())
{
marker_version_length = marker_file.read(marker_version, sizeof(marker_version));
LL_DEBUGS("MarkerFile") << "Compare markers: ";
std::string marker_string(marker_version, marker_version_length);
LL_CONT << "\n mine '" << my_version << "'"
<< "\n marker '" << marker_string << "'"
<< LL_ENDL;
if ( 0 == my_version.compare( 0, my_version.length(), marker_version, 0, marker_version_length ) )
{
sameVersion = true;
}
marker_file.close();
}
return sameVersion;
}
void LLAppViewer::initMarkerFile()
{
//First, check for the existence of other files.
@ -3472,27 +3605,55 @@ void LLAppViewer::initMarkerFile()
if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB) && !anotherInstanceRunning())
{
if ( markerIsSameVersion(mMarkerFileName) )
{
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found" << LL_ENDL;
gLastExecEvent = LAST_EXEC_FROZE;
LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL;
}
else
{
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL;
}
}
if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB))
{
if (markerIsSameVersion(logout_marker_file))
{
gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
LL_INFOS("MarkerFile") << "Logout crashed '"<< logout_marker_file << "', setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
}
else
{
LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "' found, but versions did not match" << LL_ENDL;
}
LLAPRFile::remove(logout_marker_file);
}
if(LLAPRFile::isExist(llerror_marker_file, NULL, LL_APR_RB))
{
if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
else gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
if (markerIsSameVersion(llerror_marker_file))
{
gLastExecEvent = ( gLastExecEvent == LAST_EXEC_LOGOUT_FROZE )
? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_LLERROR_CRASH;
LL_INFOS("MarkerFile") << "Last exec LLError '"<< llerror_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
}
else
{
LL_INFOS("MarkerFile") << "Last exec LLError marker '"<< llerror_marker_file << "' found, but versions did not match" << LL_ENDL;
}
LLAPRFile::remove(llerror_marker_file);
}
if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))
{
if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
else gLastExecEvent = LAST_EXEC_OTHER_CRASH;
LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
if (markerIsSameVersion(error_marker_file))
{
gLastExecEvent = (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE)
? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_OTHER_CRASH;
LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
}
else
{
LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL;
}
LLAPRFile::remove(error_marker_file);
}
@ -3508,35 +3669,48 @@ void LLAppViewer::initMarkerFile()
if (s == APR_SUCCESS && mMarkerFile.getFileHandle())
{
LL_DEBUGS("MarkerFile") << "Marker file created." << LL_ENDL;
LL_DEBUGS("MarkerFile") << "Marker file '"<< mMarkerFileName << "' created." << LL_ENDL;
if (APR_SUCCESS == apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE))
{
recordMarkerVersion(mMarkerFile);
LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL;
}
else
{
LL_INFOS("MarkerFile") << "Failed to create marker file." << LL_ENDL;
return;
LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL;
}
}
if (apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
else
{
mMarkerFile.close() ;
LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL;
return;
LL_INFOS("MarkerFile") << "Failed to create marker file '"<< mMarkerFileName << "'." << LL_ENDL;
}
LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL;
}
void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
{
LL_DEBUGS("MarkerFile") << "removeMarkerFile()" << LL_ENDL;
LL_DEBUGS("MarkerFile") << "removeMarkerFile("<<leave_logout_marker<<")" << LL_ENDL;
if (mMarkerFile.getFileHandle())
{
LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"'"<< LL_ENDL;
mMarkerFile.close() ;
LLAPRFile::remove( mMarkerFileName );
}
if (mLogoutMarkerFile != NULL && !leave_logout_marker)
else
{
LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL;
}
if (!leave_logout_marker)
{
if (mLogoutMarkerFile.getFileHandle())
{
LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
mLogoutMarkerFile.close();
}
else
{
LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL;
}
LLAPRFile::remove( mLogoutMarkerFileName );
mLogoutMarkerFile = NULL;
}
}
@ -3584,7 +3758,7 @@ void LLAppViewer::requestQuit()
// Try to send metrics back to the grid
metricsSend(!gDisconnected);
// Try to send last batch of avatar rez metrics.
if (!gDisconnected && isAgentAvatarValid())
{
@ -4756,16 +4930,15 @@ void LLAppViewer::sendLogoutRequest()
mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME);
LLAPRFile outfile ;
outfile.open(mLogoutMarkerFileName, LL_APR_W);
mLogoutMarkerFile = outfile.getFileHandle() ;
if (mLogoutMarkerFile)
mLogoutMarkerFile.open(mLogoutMarkerFileName, LL_APR_W);
if (mLogoutMarkerFile.getFileHandle())
{
llinfos << "Created logout marker file " << mLogoutMarkerFileName << llendl;
apr_file_close(mLogoutMarkerFile);
LL_INFOS("MarkerFile") << "Created logout marker file '"<< mLogoutMarkerFileName << "' " << mLogoutMarkerFileName << LL_ENDL;
recordMarkerVersion(outfile);
}
else
{
llwarns << "Cannot create logout marker file " << mLogoutMarkerFileName << llendl;
LL_WARNS("MarkerFile") << "Cannot create logout marker file " << mLogoutMarkerFileName << LL_ENDL;
}
}
}
@ -5163,16 +5336,8 @@ void LLAppViewer::handleLoginComplete()
void LLAppViewer::launchUpdater()
{
LLSD query_map = LLSD::emptyMap();
// *TODO place os string in a global constant
#if LL_WINDOWS
query_map["os"] = "win";
#elif LL_DARWIN
query_map["os"] = "mac";
#elif LL_LINUX
query_map["os"] = "lnx";
#elif LL_SOLARIS
query_map["os"] = "sol";
#endif
query_map["os"] = gPlatform;
// *TODO change userserver to be grid on both viewer and sim, since
// userserver no longer exists.
query_map["userserver"] = LLGridManager::getInstance()->getGridId();

View File

@ -183,7 +183,7 @@ public:
protected:
virtual bool initWindow(); // Initialize the viewer's window.
virtual bool initLogging(); // Initialize log files, logging system, return false on failure.
virtual void initLogging(); // Initialize log files, logging system
virtual void initConsole() {}; // Initialize OS level debugging console.
virtual bool initHardwareTest() { return true; } // A false result indicates the app should quit.
virtual bool initSLURLHandler();
@ -217,7 +217,9 @@ private:
bool anotherInstanceRunning();
void initMarkerFile();
static void recordMarkerVersion(LLAPRFile& marker_file);
bool markerIsSameVersion(const std::string& marker_name) const;
void idle();
void idleShutdown();
// update avatar SLID and display name caches
@ -237,7 +239,7 @@ private:
LLAPRFile mMarkerFile; // A file created to indicate the app is running.
std::string mLogoutMarkerFileName;
apr_file_t* mLogoutMarkerFile; // A file created to indicate the app is running.
LLAPRFile mLogoutMarkerFile; // A file created to indicate the app is running.
LLOSInfo mSysOSInfo;
@ -321,6 +323,9 @@ typedef enum
} eLastExecEvent;
extern eLastExecEvent gLastExecEvent; // llstartup
extern S32 gLastExecDuration; ///< the duration of the previous run in seconds (<0 indicates unknown)
extern const char* gPlatform;
extern U32 gFrameCount;
extern U32 gForegroundFrameCount;

View File

@ -440,7 +440,7 @@ bool LLAppViewerLinux::beingDebugged()
#endif
}
bool LLAppViewerLinux::initLogging()
void LLAppViewerLinux::initLogging()
{
// Remove the last stack trace, if any
// This file is no longer created, since the move to Google Breakpad
@ -449,7 +449,7 @@ bool LLAppViewerLinux::initLogging()
gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stack_trace.log");
LLFile::remove(old_stack_file);
return LLAppViewer::initLogging();
LLAppViewer::initLogging();
}
bool LLAppViewerLinux::initParseCommandLine(LLCommandLineParser& clp)

View File

@ -63,7 +63,7 @@ protected:
virtual bool restoreErrorTrap();
virtual void handleCrashReporting(bool reportFreeze);
virtual bool initLogging();
virtual void initLogging();
virtual bool initParseCommandLine(LLCommandLineParser& clp);
virtual bool initSLURLHandler();

View File

@ -509,9 +509,9 @@ bool LLAppViewerWin32::cleanup()
return result;
}
bool LLAppViewerWin32::initLogging()
void LLAppViewerWin32::initLogging()
{
return LLAppViewer::initLogging();
LLAppViewer::initLogging();
}
void LLAppViewerWin32::initConsole()

View File

@ -44,7 +44,7 @@ public:
virtual bool cleanup();
protected:
virtual bool initLogging(); // Override to clean stack_trace info.
virtual void initLogging(); // Override to clean stack_trace info.
virtual void initConsole(); // Initialize OS level debugging console.
virtual bool initHardwareTest(); // Win32 uses DX9 to test hardware.
virtual bool initParseCommandLine(LLCommandLineParser& clp);

View File

@ -286,7 +286,6 @@ public:
NEARBY_LIGHT = 0x00200000, // In gPipeline.mNearbyLightSet
BUILT = 0x00400000,
FORCE_INVISIBLE = 0x00800000, // stay invis until CLEAR_INVISIBLE is set (set of orphaned)
CLEAR_INVISIBLE = 0x01000000, // clear FORCE_INVISIBLE next draw frame
REBUILD_SHADOW = 0x02000000,
HAS_ALPHA = 0x04000000,
RIGGED = 0x08000000,

View File

@ -0,0 +1,55 @@
/**
* @file llhasheduniqueid.cpp
* @brief retrieves an obfuscated unique id for the system
*
* $LicenseInfo:firstyear=2013&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2013, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llhasheduniqueid.h"
#include "llviewernetwork.h"
#include "lluuid.h"
#include "llmachineid.h"
bool llHashedUniqueID(unsigned char id[MD5HEX_STR_SIZE])
{
bool idIsUnique = true;
LLMD5 hashed_unique_id;
unsigned char unique_id[MAC_ADDRESS_BYTES];
if ( LLUUID::getNodeID(unique_id)
|| LLMachineID::getUniqueID(unique_id, sizeof(unique_id))
)
{
hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES);
hashed_unique_id.finalize();
hashed_unique_id.hex_digest((char*)id);
LL_INFOS_ONCE("AppInit") << "System ID " << id << LL_ENDL;
}
else
{
idIsUnique = false;
memcpy(id,"00000000000000000000000000000000", MD5HEX_STR_SIZE);
LL_WARNS_ONCE("AppInit") << "Failed to get an id; cannot uniquely identify this machine." << LL_ENDL;
}
return idIsUnique;
}

View File

@ -0,0 +1,34 @@
/**
* @file llhasheduniqueid.h
* @brief retrieves obfuscated but unique id for the system
*
* $LicenseInfo:firstyear=2013&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2013, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_LLHASHEDUNIQUEID_H
#define LL_LLHASHEDUNIQUEID_H
#include "llmd5.h"
/// Get an obfuscated identifier for this system
bool llHashedUniqueID(unsigned char id[MD5HEX_STR_SIZE]);
///< @returns true if the id is considered valid (if false, the id is all zeros)
#endif // LL_LLHASHEDUNIQUEID_H

View File

@ -30,7 +30,6 @@
// llcommon
#include "llevents.h"
#include "llmd5.h"
#include "stringize.h"
// llmessage (!)
@ -40,6 +39,7 @@
#include "lllogin.h"
// newview
#include "llhasheduniqueid.h"
#include "llviewernetwork.h"
#include "llviewercontrol.h"
#include "llversioninfo.h"
@ -202,7 +202,7 @@ MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance,
void MandatoryUpdateMachine::start(void)
{
llinfos << "starting manditory update machine" << llendl;
llinfos << "starting mandatory update machine" << llendl;
if(mUpdaterService.isChecking()) {
switch(mUpdaterService.getState()) {
@ -488,6 +488,13 @@ LLLoginInstance::LLLoginInstance() :
mDispatcher.add("indeterminate", "", boost::bind(&LLLoginInstance::handleIndeterminate, this, _1));
}
void LLLoginInstance::setPlatformInfo(const std::string platform,
const std::string platform_version)
{
mPlatform = platform;
mPlatformVersion = platform_version;
}
LLLoginInstance::~LLLoginInstance()
{
}
@ -579,26 +586,22 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
// (re)initialize the request params with creds.
LLSD request_params = user_credential->getLoginParams();
char hashed_unique_id_string[MD5HEX_STR_SIZE]; /* Flawfinder: ignore */
LLMD5 hashed_unique_id;
unsigned char unique_id[MAC_ADDRESS_BYTES];
if(LLUUID::getNodeID(unique_id) == 0) {
if(LLMachineID::getUniqueID(unique_id, sizeof(unique_id)) == 0) {
llerrs << "Failed to get an id; cannot uniquely identify this machine." << llendl;
}
unsigned char hashed_unique_id_string[MD5HEX_STR_SIZE];
if ( ! llHashedUniqueID(hashed_unique_id_string) )
{
llwarns << "Not providing a unique id in request params" << llendl;
}
hashed_unique_id.update(unique_id, MAC_ADDRESS_BYTES);
hashed_unique_id.finalize();
hashed_unique_id.hex_digest(hashed_unique_id_string);
request_params["start"] = construct_start_string();
request_params["skipoptional"] = mSkipOptionalUpdate;
request_params["agree_to_tos"] = false; // Always false here. Set true in
request_params["read_critical"] = false; // handleTOSResponse
request_params["last_exec_event"] = mLastExecEvent;
request_params["mac"] = hashed_unique_id_string;
request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name
request_params["last_exec_duration"] = mLastExecDuration;
request_params["mac"] = (char*)hashed_unique_id_string;
request_params["version"] = LLVersionInfo::getVersion();
request_params["channel"] = LLVersionInfo::getChannel();
request_params["platform"] = mPlatform;
request_params["platform_version"] = mPlatformVersion;
request_params["id0"] = mSerialNumber;
request_params["host_id"] = gSavedSettings.getString("HostID");
request_params["extended_errors"] = true; // request message_id and message_args
@ -784,20 +787,20 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
LLSD payload;
payload["mandatory"] = mandatory;
/*
We're constructing one of the following 9 strings here:
"DownloadWindowsMandatory"
"DownloadWindowsReleaseForDownload"
"DownloadWindows"
"DownloadMacMandatory"
"DownloadMacReleaseForDownload"
"DownloadMac"
"DownloadLinuxMandatory"
"DownloadLinuxReleaseForDownload"
"DownloadLinux"
I've called them out explicitly in this comment so that they can be grepped for.
*/
/*
* We're constructing one of the following 9 strings here:
* "DownloadWindowsMandatory"
* "DownloadWindowsReleaseForDownload"
* "DownloadWindows"
* "DownloadMacMandatory"
* "DownloadMacReleaseForDownload"
* "DownloadMac"
* "DownloadLinuxMandatory"
* "DownloadLinuxReleaseForDownload"
* "DownloadLinux"
*
* I've called them out explicitly in this comment so that they can be grepped for.
*/
std::string notification_name = "Download";
#if LL_WINDOWS

View File

@ -66,6 +66,8 @@ public:
void setSkipOptionalUpdate(bool state) { mSkipOptionalUpdate = state; }
void setSerialNumber(const std::string& sn) { mSerialNumber = sn; }
void setLastExecEvent(int lee) { mLastExecEvent = lee; }
void setLastExecDuration(S32 duration) { mLastExecDuration = duration; }
void setPlatformInfo(const std::string platform, const std::string platform_version);
void setNotificationsInterface(LLNotificationsInterface* ni) { mNotifications = ni; }
@ -99,6 +101,9 @@ private:
F64 mTransferRate;
std::string mSerialNumber;
int mLastExecEvent;
S32 mLastExecDuration;
std::string mPlatform;
std::string mPlatformVersion;
UpdaterLauncherCallback mUpdaterLauncher;
LLEventDispatcher mDispatcher;
LLUpdaterService * mUpdaterService;

View File

@ -1608,9 +1608,9 @@ void LLPanelFace::getState()
// Shiny (specular)
F32 offset_x, offset_y, repeat_x, repeat_y, rot;
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
texture_ctrl->setImageAssetID(material->getSpecularID());
texture_ctrl->setImageAssetID(mMaterial->getSpecularID());
LLComboBox* combobox_shininess = getChild<LLComboBox>("combobox shininess");
if (!material->getSpecularID().isNull())
if (!mMaterial->getSpecularID().isNull())
{
mMaterial->getSpecularOffset(offset_x,offset_y);
mMaterial->getSpecularRepeat(repeat_x,repeat_y);
@ -1635,7 +1635,7 @@ void LLPanelFace::getState()
// Assert desired colorswatch color to match material AFTER updateShinyControls
// to avoid getting overwritten with the default on some UI state changes.
//
if (!material->getSpecularID().isNull())
if (!mMaterial->getSpecularID().isNull())
{
getChild<LLColorSwatchCtrl>("shinycolorswatch")->setOriginal(mMaterial->getSpecularLightColor());
getChild<LLColorSwatchCtrl>("shinycolorswatch")->set(mMaterial->getSpecularLightColor(),TRUE);
@ -1656,7 +1656,7 @@ void LLPanelFace::getState()
repeat_y *= 2.0f;
}
rot = material->getNormalRotation();
rot = mMaterial->getNormalRotation();
getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y);
getChild<LLUICtrl>("bumpyRot")->setValue(rot*RAD_TO_DEG);

View File

@ -26,6 +26,7 @@
#include "llviewerprecompiledheaders.h"
#include "llappviewer.h"
#include "llstartup.h"
#if LL_WINDOWS
@ -1032,6 +1033,7 @@ bool idle_startup()
login->setSerialNumber(LLAppViewer::instance()->getSerialNumber());
login->setLastExecEvent(gLastExecEvent);
login->setLastExecDuration(gLastExecDuration);
login->setUpdaterLauncher(boost::bind(&LLAppViewer::launchUpdater, LLAppViewer::instance()));
// This call to LLLoginInstance::connect() starts the

View File

@ -26,73 +26,76 @@
*/
#include "llviewerprecompiledheaders.h"
#include <iostream>
#include <sstream>
#include "llversioninfo.h"
#include "llversionviewer.h"
#if ! defined(LL_VIEWER_CHANNEL) \
|| ! defined(LL_VIEWER_VERSION_MAJOR) \
|| ! defined(LL_VIEWER_VERSION_MINOR) \
|| ! defined(LL_VIEWER_VERSION_PATCH) \
|| ! defined(LL_VIEWER_VERSION_BUILD)
#error "Channel or Version information is undefined"
#endif
const char * const LL_CHANNEL = LL_VIEWER_CHANNEL;
//
// Set the version numbers in indra/llcommon/llversionviewer.h
// Set the version numbers in indra/VIEWER_VERSION
//
//static
S32 LLVersionInfo::getMajor()
{
return LL_VERSION_MAJOR;
return LL_VIEWER_VERSION_MAJOR;
}
//static
S32 LLVersionInfo::getMinor()
{
return LL_VERSION_MINOR;
return LL_VIEWER_VERSION_MINOR;
}
//static
S32 LLVersionInfo::getPatch()
{
return LL_VERSION_PATCH;
return LL_VIEWER_VERSION_PATCH;
}
//static
S32 LLVersionInfo::getBuild()
{
return LL_VERSION_BUILD;
return LL_VIEWER_VERSION_BUILD;
}
//static
const std::string &LLVersionInfo::getVersion()
{
static std::string version("");
if (version.empty())
{
// cache the version string
std::ostringstream stream;
stream << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VERSION_BUILD;
stream << LLVersionInfo::getShortVersion() << "." << LLVersionInfo::getBuild();
// cache the version string
version = stream.str();
}
return version;
}
//static
const std::string &LLVersionInfo::getShortVersion()
{
static std::string version("");
if (version.empty())
static std::string short_version("");
if(short_version.empty())
{
// cache the version string
std::ostringstream stream;
stream << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH;
version = stream.str();
stream << LL_VIEWER_VERSION_MAJOR << "."
<< LL_VIEWER_VERSION_MINOR << "."
<< LL_VIEWER_VERSION_PATCH;
short_version = stream.str();
}
return version;
return short_version;
}
namespace
@ -100,7 +103,7 @@ namespace
/// Storage of the channel name the viewer is using.
// The channel name is set by hardcoded constant,
// or by calling LLVersionInfo::resetChannel()
std::string sWorkingChannelName(LL_CHANNEL);
std::string sWorkingChannelName(LL_VIEWER_CHANNEL);
// Storage for the "version and channel" string.
// This will get reset too.
@ -113,11 +116,7 @@ const std::string &LLVersionInfo::getChannelAndVersion()
if (sVersionChannel.empty())
{
// cache the version string
std::ostringstream stream;
stream << LLVersionInfo::getChannel()
<< " "
<< LLVersionInfo::getVersion();
sVersionChannel = stream.str();
sVersionChannel = LLVersionInfo::getChannel() + " " + LLVersionInfo::getVersion();
}
return sVersionChannel;

View File

@ -29,6 +29,7 @@
#define LL_LLVERSIONINFO_H
#include <string>
#include "stdtypes.h"
///
/// This API provides version information for the viewer. This

View File

@ -163,7 +163,11 @@ const std::string SCRIPT_QUESTIONS[SCRIPT_PERMISSION_EOF] =
"ChangePermissions",
"TrackYourCamera",
"ControlYourCamera",
"TeleportYourAgent"
"TeleportYourAgent",
"JoinAnExperience",
"SilentlyManageEstateAccess",
"OverrideYourAnimations",
"ScriptReturnObjects"
};
const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
@ -179,7 +183,11 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
FALSE, // ChangePermissions
FALSE, // TrackYourCamera,
FALSE, // ControlYourCamera
FALSE // TeleportYourAgent
FALSE, // TeleportYourAgent
FALSE, // JoinAnExperience
FALSE, // SilentlyManageEstateAccess
FALSE, // OverrideYourAnimations
FALSE, // ScriptReturnObjects
};
bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
@ -6282,6 +6290,19 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
}
}
void script_question_mute(const LLUUID& item_id, const std::string& object_name);
bool unknown_script_question_cb(const LLSD& notification, const LLSD& response)
{
// Only care if they muted the object here.
if ( response["Mute"] ) // mute
{
LLUUID task_id = notification["payload"]["task_id"].asUUID();
script_question_mute(task_id,notification["payload"]["object_name"].asString());
}
return false;
}
bool script_question_cb(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@ -6332,34 +6353,42 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
if ( response["Mute"] ) // mute
{
LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT));
// purge the message queue of any previously queued requests from the same source. DEV-4879
class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
{
public:
OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
bool matches(const LLNotificationPtr notification) const
{
if (notification->getName() == "ScriptQuestionCaution"
|| notification->getName() == "ScriptQuestion")
{
return (notification->getPayload()["item_id"].asUUID() == blocked_id);
}
return false;
}
private:
const LLUUID& blocked_id;
};
LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id));
script_question_mute(task_id,notification["payload"]["object_name"].asString());
}
return false;
}
void script_question_mute(const LLUUID& task_id, const std::string& object_name)
{
LLMuteList::getInstance()->add(LLMute(task_id, object_name, LLMute::OBJECT));
// purge the message queue of any previously queued requests from the same source. DEV-4879
class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
{
public:
OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
bool matches(const LLNotificationPtr notification) const
{
if (notification->getName() == "ScriptQuestionCaution"
|| notification->getName() == "ScriptQuestion"
|| notification->getName() == "UnknownScriptQuestion")
{
return (notification->getPayload()["task_id"].asUUID() == blocked_id);
}
return false;
}
private:
const LLUUID& blocked_id;
};
LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(task_id));
}
static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb);
static LLNotificationFunctorRegistration script_question_cb_reg_2("ScriptQuestionCaution", script_question_cb);
static LLNotificationFunctorRegistration unknown_script_question_cb_reg("UnknownScriptQuestion", unknown_script_question_cb);
void process_script_question(LLMessageSystem *msg, void **user_data)
{
@ -6424,7 +6453,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
LLSD args;
args["OBJECTNAME"] = object_name;
args["NAME"] = LLCacheName::cleanFullName(owner_name);
S32 known_questions = 0;
BOOL has_not_only_debit = questions ^ LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_DEBIT];
// check the received permission flags against each permission
for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++)
@ -6432,7 +6461,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
if (questions & LSCRIPTRunTimePermissionBits[i])
{
count++;
known_questions |= LSCRIPTRunTimePermissionBits[i];
// check whether permission question should cause special caution dialog
caution |= (SCRIPT_QUESTION_IS_CAUTION[i]);
@ -6442,32 +6471,46 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
script_question += " " + LLTrans::getString(SCRIPT_QUESTIONS[i]) + "\n";
}
}
args["QUESTIONS"] = script_question;
LLSD payload;
payload["task_id"] = taskid;
payload["item_id"] = itemid;
payload["sender"] = sender.getIPandPort();
payload["questions"] = questions;
payload["object_name"] = object_name;
payload["owner_name"] = owner_name;
// check whether cautions are even enabled or not
if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
if (known_questions != questions)
{ // This is in addition to the normal dialog.
LLSD payload;
payload["task_id"] = taskid;
payload["item_id"] = itemid;
payload["object_name"] = object_name;
args["DOWNLOADURL"] = LLTrans::getString("ViewerDownloadURL");
LLNotificationsUtil::add("UnknownScriptQuestion",args,payload);
}
if (known_questions)
{
if (caution)
LLSD payload;
payload["task_id"] = taskid;
payload["item_id"] = itemid;
payload["sender"] = sender.getIPandPort();
payload["questions"] = known_questions;
payload["object_name"] = object_name;
payload["owner_name"] = owner_name;
// check whether cautions are even enabled or not
if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
{
args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : "";
if (caution)
{
args["FOOTERTEXT"] = (count > 1) ? LLTrans::getString("AdditionalPermissionsRequestHeader") + "\n\n" + script_question : "";
}
// display the caution permissions prompt
LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
}
else
{
// fall back to default behavior if cautions are entirely disabled
LLNotificationsUtil::add("ScriptQuestion", args, payload);
}
// display the caution permissions prompt
LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
}
else
{
// fall back to default behavior if cautions are entirely disabled
LLNotificationsUtil::add("ScriptQuestion", args, payload);
}
}
}

View File

@ -2160,7 +2160,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (mDrawable->isState(LLDrawable::FORCE_INVISIBLE) && !mOrphaned)
{
// lldebugs << "Clearing force invisible: " << mID << ":" << getPCodeString() << ":" << getPositionAgent() << llendl;
mDrawable->setState(LLDrawable::CLEAR_INVISIBLE);
mDrawable->clearState(LLDrawable::FORCE_INVISIBLE);
gPipeline.markRebuild( mDrawable, LLDrawable::REBUILD_ALL, TRUE );
}
}
@ -4149,7 +4150,7 @@ S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image)
if (mat)
{
mat->setSpecularID(uuid);
}
}
}
changeTESpecularMap(te, image);
return retval;
@ -4396,11 +4397,11 @@ S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID
// Kitty would like to know if this is necessary?
// Since we should get a setTEMaterialParams that does it anyway?
//
setChanged(TEXTURE);
setChanged(TEXTURE);
if (mDrawable.notNull())
{
gPipeline.markTextured(mDrawable);
}
{
gPipeline.markTextured(mDrawable);
}
return retval;
}
@ -4414,19 +4415,19 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
return 0;
}
retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams);
LL_DEBUGS("Material") << "Changing material params for te " << (S32)te
<< ", object " << mID
<< " (" << retval << ")"
<< LL_ENDL;
setTENormalMap(te, tep->getMaterialParams()->getNormalID());
setTESpecularMap(te, tep->getMaterialParams()->getSpecularID());
retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams);
LL_DEBUGS("Material") << "Changing material params for te " << (S32)te
<< ", object " << mID
<< " (" << retval << ")"
<< LL_ENDL;
setTENormalMap(te, tep->getMaterialParams()->getNormalID());
setTESpecularMap(te, tep->getMaterialParams()->getSpecularID());
setChanged(TEXTURE);
setChanged(TEXTURE);
if (mDrawable.notNull())
{
gPipeline.markTextured(mDrawable);
}
{
gPipeline.markTextured(mDrawable);
}
return retval;
}

View File

@ -2065,8 +2065,9 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
if (childp->mDrawable.notNull())
{
// Make the drawable visible again and set the drawable parent
childp->mDrawable->setState(LLDrawable::CLEAR_INVISIBLE);
childp->mDrawable->clearState(LLDrawable::FORCE_INVISIBLE);
childp->setDrawableParent(objectp->mDrawable); // LLViewerObjectList::findOrphans()
gPipeline.markRebuild( childp->mDrawable, LLDrawable::REBUILD_ALL, TRUE );
}
// Make certain particles, icon and HUD aren't hidden

View File

@ -33,8 +33,6 @@
// in viewer.
// It is used to precompile headers for improved build speed.
#include <boost/coroutine/coroutine.hpp>
#include "linden_common.h"
// Work around stupid Microsoft STL warning

View File

@ -166,6 +166,7 @@ void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count)
void LLViewerStatsRecorder::writeToLog( F32 interval )
{
size_t data_size = 0;
F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime;
S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures;
@ -216,10 +217,10 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
<< "Texture Fetch bps\t"
<< "\n";
size_t data_size = data_msg.str().size();
if ( data_size != fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ))
data_size = data_msg.str().size();
if (fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ) != data_size)
{
llwarns << "Unable to write complete column headings to " << STATS_FILE_NAME << llendl;
llwarns << "failed to write full headers to " << STATS_FILE_NAME << llendl;
}
}
else
@ -253,11 +254,12 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
<< "\t" << (mTextureFetchSize * 8 / delta_time)
<< "\n";
size_t data_size = data_msg.str().size();
data_size = data_msg.str().size();
if ( data_size != fwrite(data_msg.str().c_str(), 1, data_size, mObjectCacheFile ))
{
llwarns << "Unable to write complete column data to " << STATS_FILE_NAME << llendl;
}
clearStats();
}

View File

@ -34,6 +34,7 @@
#include <fstream>
#include <algorithm>
#include <boost/lambda/core.hpp>
#include <boost/regex.hpp>
#include "llagent.h"
#include "llagentcamera.h"
@ -2249,29 +2250,42 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
// no l10n problem because channel is always an english string
std::string channel = LLVersionInfo::getChannel();
bool isProject = (channel.find("Project") != std::string::npos);
static const boost::regex is_beta_channel("\\bBeta\\b");
static const boost::regex is_project_channel("\\bProject\\b");
static const boost::regex is_test_channel("\\bTest$");
// god more important than project, proj more important than grid
if(god_mode && LLGridManager::getInstance()->isInProductionGrid())
if ( god_mode )
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" );
if ( LLGridManager::getInstance()->isInProductionGrid() )
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" );
}
else
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" );
}
}
else if(god_mode && !LLGridManager::getInstance()->isInProductionGrid())
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" );
}
else if (!god_mode && isProject)
else if (boost::regex_search(channel, is_beta_channel))
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBetaBgColor" );
}
else if (boost::regex_search(channel, is_project_channel))
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarProjectBgColor" );
}
else if(!god_mode && !LLGridManager::getInstance()->isInProductionGrid())
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
}
else
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" );
}
}
else if (boost::regex_search(channel, is_test_channel))
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarTestBgColor" );
}
else if(!LLGridManager::getInstance()->isInProductionGrid())
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
}
else
{
new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" );
}
if(gMenuBarView)
{

View File

@ -515,12 +515,12 @@ void LLPipeline::init()
else
{
setAllRenderTypes(); // By default, all rendering types start enabled
// Don't turn on ground when this is set
// Mac Books with intel 950s need this
if(!gSavedSettings.getBOOL("RenderGround"))
{
toggleRenderType(RENDER_TYPE_GROUND);
}
// Don't turn on ground when this is set
// Mac Books with intel 950s need this
if(!gSavedSettings.getBOOL("RenderGround"))
{
toggleRenderType(RENDER_TYPE_GROUND);
}
}
// make sure RenderPerformanceTest persists (hackity hack hack)
@ -3397,11 +3397,6 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
drawablep->setVisible(camera, NULL, FALSE);
}
else if (drawablep->isState(LLDrawable::CLEAR_INVISIBLE))
{
// clear invisible flag here to avoid single frame glitch
drawablep->clearState(LLDrawable::FORCE_INVISIBLE|LLDrawable::CLEAR_INVISIBLE);
}
}
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)

View File

@ -135,8 +135,8 @@ TOOLNO CURSOR "llno.cur"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,4,1,264760
PRODUCTVERSION 3,4,1,264760
FILEVERSION ${VIEWER_VERSION_MAJOR},${VIEWER_VERSION_MINOR},${VIEWER_VERSION_PATCH},${VIEWER_VERSION_REVISION}
PRODUCTVERSION ${VIEWER_VERSION_MAJOR},${VIEWER_VERSION_MINOR},${VIEWER_VERSION_PATCH},${VIEWER_VERSION_REVISION}
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -153,12 +153,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Linden Lab"
VALUE "FileDescription", "Second Life"
VALUE "FileVersion", "3.4.1.264760"
VALUE "FileVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}"
VALUE "InternalName", "Second Life"
VALUE "LegalCopyright", "Copyright <20> 2001-2010, Linden Research, Inc."
VALUE "LegalCopyright", "Copyright <20> 2001, Linden Research, Inc."
VALUE "OriginalFilename", "SecondLife.exe"
VALUE "ProductName", "Second Life"
VALUE "ProductVersion", "3.4.1.264760"
VALUE "ProductVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}"
END
END
BLOCK "VarFileInfo"

View File

@ -101,6 +101,9 @@
<color
name="MdBlue"
value=".07 .38 .51 1" />
<color
name="DkBlue"
value=".06 .06 .3 1" />
<color
name="LtRed"
value="1 0.2 0.2 1" />
@ -110,6 +113,9 @@
<color
name="Red_80"
value="1 0 0 0.8" />
<color
name="DkRed"
value="0.3 0.06 0.06 1" />
<color
name="Green_80"
value="0 1 0 0.8" />
@ -839,9 +845,14 @@
name="ChatTimestampColor"
reference="White" />
<color
name="MenuBarBetaBgColor"
reference="DkBlue" />
<color
name="MenuBarProjectBgColor"
reference="MdBlue" />
<color
name="MenuBarTestBgColor"
reference="DkRed" />
<color
name="MeshImportTableNormalColor"
value="1 1 1 1"/>

View File

@ -116,7 +116,6 @@
<menu_item_call label="Kaufen" name="Menu Object Buy"/>
<menu_item_call label="Nehmen" name="Menu Object Take"/>
<menu_item_call label="Kopie nehmen" name="Take Copy"/>
<menu_item_call label="Objekt wieder in meinem Inventar speichern" name="Save Object Back to My Inventory"/>
<menu_item_call label="Wieder in Objektinhalt speichern" name="Save Object Back to Object Contents"/>
<menu_item_call label="Objekt zurückgeben" name="Return Object back to Owner"/>
</menu>

View File

@ -152,7 +152,7 @@
</text>
<check_box
height="19"
label="Test"
label="World"
layout="topleft"
name="show_world"
top_pad="4"

View File

@ -3480,7 +3480,7 @@ Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
name="RequiredUpdateDownloadedVerboseDialog"
type="alertmodal">
We have downloaded a required software update.
Version [VERSION]
Version [VERSION] [[INFO_URL] Information about this update]
We must restart [APP_NAME] to install the update.
<tag>confirm</tag>
@ -3494,6 +3494,66 @@ We must restart [APP_NAME] to install the update.
name="RequiredUpdateDownloadedDialog"
type="alertmodal">
We must restart [APP_NAME] to install the update.
[[INFO_URL] Information about this update]
<tag>confirm</tag>
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="notify.tga"
name="OtherChannelDownloadBackgroundTip"
type="notify">
We have downloaded an update to your [APP_NAME] installation.
Version [VERSION]
This experimental viewer has been replaced by a [NEW_CHANNEL] viewer;
see [[INFO_URL] for details about this update]
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
notext="Later..."
yestext="Install now and restart [APP_NAME]"/>
</notification>
<notification
icon="alertmodal.tga"
name="OtherChannelDownloadBackgroundDialog"
type="alertmodal">
We have downloaded an update to your [APP_NAME] installation.
Version [VERSION]
This experimental viewer has been replaced by a [NEW_CHANNEL] viewer;
see [[INFO_URL] Information about this update]
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
notext="Later..."
yestext="Install now and restart [APP_NAME]"/>
</notification>
<notification
icon="alertmodal.tga"
name="OtherChannelRequiredUpdateDownloadedVerboseDialog"
type="alertmodal">
We have downloaded a required software update.
Version [VERSION]
This experimental viewer has been replaced by a [NEW_CHANNEL] viewer;
see [[INFO_URL] Information about this update]
We must restart [APP_NAME] to install the update.
<tag>confirm</tag>
<usetemplate
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="OtherChannelRequiredUpdateDownloadedDialog"
type="alertmodal">
We must restart [APP_NAME] to install the update.
This experimental viewer has been replaced by a [NEW_CHANNEL] viewer;
see [[INFO_URL] Information about this update]
<tag>confirm</tag>
<usetemplate
name="okbutton"
@ -6865,6 +6925,28 @@ Do not allow access if you do not fully understand why it wants access to your a
</notification>
<notification
icon="notify.tga"
name="UnknownScriptQuestion"
persist="false"
type="notify">
The runtime script permission requested by &apos;&lt;nolink&gt;[OBJECTNAME]&lt;/nolink&gt;&apos;, an object owned by &apos;[NAME]&apos;, isn&apos;t recognized by the viewer and can&apos;t be granted.
To grant this permission please update your viewer to the latest version from [DOWNLOADURL].
<tag>confirm</tag>
<form name="form">
<button
default="true"
index="1"
name="Deny"
text="Ok"/>
<button
index="2"
name="Mute"
text="Block"/>
</form>
</notification>
<notification
icon="notify.tga"
name="ScriptDialog"
show_toast="false"

View File

@ -232,6 +232,19 @@
name="Install_manual"
value="0" />
</combo_box>
<check_box
top_delta="4"
enabled="true"
follows="left|top"
height="14"
initial_value="true"
control_name="UpdateWillingToTest"
label="Willing to update to release candidates"
left_delta="0"
mouse_opaque="true"
name="update_willing_to_test"
width="400"
top_pad="5"/>
<text
type="string"
length="1"

View File

@ -61,6 +61,7 @@
<string name="Quit">Quit</string>
<string name="create_account_url">http://join.secondlife.com/?sourceid=[sourceid]</string>
<string name="ViewerDownloadURL">http://secondlife.com/download</string>
<string name="LoginFailedViewerNotPermitted">
The viewer you are using can no longer access Second Life. Please visit the following page to download a new viewer:
http://secondlife.com/download
@ -412,6 +413,11 @@ Please try logging in again in a minute.</string>
<string name="NotConnected">Not Connected</string>
<string name="AgentNameSubst">(You)</string> <!-- Substitution for agent name -->
<string name="TeleportYourAgent">Teleport you</string>
<string name="JoinAnExperience">Join an experience</string> <!-- not used -->
<string name="SilentlyManageEstateAccess">Suppress alerts when managing estate access lists</string>
<string name="OverrideYourAnimations">Replace your default animations</string>
<string name="ScriptReturnObjects">Return objects on your behalf</string>
<string name="UnknownScriptPermission">(unknown)!</string>
<!-- Sim Access labels -->
<string name="SIM_ACCESS_PG">General</string>

View File

@ -115,7 +115,6 @@
<menu_item_call label="Comprar" name="Menu Object Buy"/>
<menu_item_call label="Tomar" name="Menu Object Take"/>
<menu_item_call label="Coger una copia" name="Take Copy"/>
<menu_item_call label="Guardar una copia en mi inventario" name="Save Object Back to My Inventory"/>
<menu_item_call label="Guardar una copia del objeto en los contenidos de donde salió" name="Save Object Back to Object Contents"/>
<menu_item_call label="Devolver objeto" name="Return Object back to Owner"/>
</menu>
@ -130,6 +129,7 @@
<menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"/>
<menu_item_call label="Personajes..." name="pathfinding_characters_menu_item"/>
<menu_item_call label="Ver/probar..." name="pathfinding_console_menu_item"/>
<menu_item_call label="Recargar la región" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="Opciones" name="Options">
<menu_item_check label="Mostrar los permisos avanzados" name="DebugPermissions"/>
@ -159,6 +159,13 @@
<menu label="Ayuda" name="Help">
<menu_item_call label="Cómo..." name="How To"/>
<menu_item_call label="Ayuda de [SECOND_LIFE]" name="Second Life Help"/>
<menu_item_call label="Guía del usuario" name="Users guide"/>
<menu_item_call label="Base de Conocimientos" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Foros comunitarios" name="Community Forums"/>
<menu_item_call label="Portal de soporte" name="Support portal"/>
<menu_item_call label="Noticias de [SECOND_LIFE]" name="Second Life News"/>
<menu_item_call label="Blogs de [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Denunciar una infracción" name="Report Abuse"/>
<menu_item_call label="Informar de un fallo" name="Report Bug"/>
<menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/>
@ -336,9 +343,14 @@
<menu_item_call label="Toggle Character Geometry" name="Toggle Character Geometry"/>
<menu_item_check label="Allow Select Avatar" name="Allow Select Avatar"/>
</menu>
<menu label="Velocidad de animación" name="Animation Speed">
<menu_item_call label="Acelerar todas las animaciones un 10%" name="All Animations 10 Faster"/>
<menu_item_call label="Ralentizar todas las animaciones un 10%" name="All Animations 10 Slower"/>
<menu_item_call label="Restablecer la velocidad de todas las animaciones" name="Reset All Animation Speed"/>
<menu_item_check label="Animaciones a cámara lenta" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="Force Params to Default" name="Force Params to Default"/>
<menu_item_check label="Animation Info" name="Animation Info"/>
<menu_item_check label="Slow Motion Animations" name="Slow Motion Animations"/>
<menu_item_check label="Disable Level Of Detail" name="Disable LOD"/>
<menu_item_check label="Show Collision Skeleton" name="Show Collision Skeleton"/>
<menu_item_check label="Display Agent Target" name="Display Agent Target"/>

View File

@ -116,7 +116,6 @@
<menu_item_call label="Acheter" name="Menu Object Buy"/>
<menu_item_call label="Prendre" name="Menu Object Take"/>
<menu_item_call label="Prendre une copie" name="Take Copy"/>
<menu_item_call label="Enregistrer dans mon inventaire" name="Save Object Back to My Inventory"/>
<menu_item_call label="Enregistrer dans le contenu des objets" name="Save Object Back to Object Contents"/>
<menu_item_call label="Renvoi de l&apos;objet" name="Return Object back to Owner"/>
</menu>
@ -131,6 +130,7 @@
<menu_item_call label="Groupes de liens..." name="pathfinding_linksets_menu_item"/>
<menu_item_call label="Personnages..." name="pathfinding_characters_menu_item"/>
<menu_item_call label="Vue / test..." name="pathfinding_console_menu_item"/>
<menu_item_call label="Refiger la région" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="Options" name="Options">
<menu_item_check label="Afficher les droits avancés" name="DebugPermissions"/>
@ -160,6 +160,13 @@
<menu label="Aide" name="Help">
<menu_item_call label="Aide rapide..." name="How To"/>
<menu_item_call label="Aide de [SECOND_LIFE]" name="Second Life Help"/>
<menu_item_call label="Guide de l&apos;utilisateur" name="Users guide"/>
<menu_item_call label="Base de connaissances" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Forums de la communauté" name="Community Forums"/>
<menu_item_call label="Portail d&apos;assistance" name="Support portal"/>
<menu_item_call label="Actualités [SECOND_LIFE]" name="Second Life News"/>
<menu_item_call label="Blogs [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Signaler une infraction" name="Report Abuse"/>
<menu_item_call label="Signaler un bug" name="Report Bug"/>
<menu_item_call label="À propos de [APP_NAME]" name="About Second Life"/>
@ -386,9 +393,14 @@
<menu_item_call label="Test femme" name="Test Female"/>
<menu_item_check label="Autoriser la sélection de l&apos;avatar" name="Allow Select Avatar"/>
</menu>
<menu label="Vitesse d&apos;animation" name="Animation Speed">
<menu_item_call label="Toutes les animations 10 % plus rapides" name="All Animations 10 Faster"/>
<menu_item_call label="Toutes les animations 10 % plus lentes" name="All Animations 10 Slower"/>
<menu_item_call label="Réinitialiser la vitesse de toutes les animations" name="Reset All Animation Speed"/>
<menu_item_check label="Animations au ralenti" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="Forcer les paramètres par défaut" name="Force Params to Default"/>
<menu_item_check label="Infos sur l&apos;animation" name="Animation Info"/>
<menu_item_check label="Animations au ralenti" name="Slow Motion Animations"/>
<menu_item_check label="Afficher la direction du regard" name="Show Look At"/>
<menu_item_check label="Afficher la direction du pointeur" name="Show Point At"/>
<menu_item_check label="Débogages des mises à jour" name="Debug Joint Updates"/>

View File

@ -116,7 +116,6 @@
<menu_item_call label="Acquista" name="Menu Object Buy"/>
<menu_item_call label="Prendi" name="Menu Object Take"/>
<menu_item_call label="Prendi copia" name="Take Copy"/>
<menu_item_call label="Salva nell&apos;inventario" name="Save Object Back to My Inventory"/>
<menu_item_call label="Salva nei contenuti oggetto" name="Save Object Back to Object Contents"/>
<menu_item_call label="Restituisci oggetto" name="Return Object back to Owner"/>
</menu>
@ -131,6 +130,7 @@
<menu_item_call label="Set collegati..." name="pathfinding_linksets_menu_item"/>
<menu_item_call label="Personaggi..." name="pathfinding_characters_menu_item"/>
<menu_item_call label="Visualizza / test..." name="pathfinding_console_menu_item"/>
<menu_item_call label="Rebake regione" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="Opzioni" name="Options">
<menu_item_check label="Mostra autorizzazioni avanzate" name="DebugPermissions"/>
@ -160,6 +160,13 @@
<menu label="Aiuto" name="Help">
<menu_item_call label="Istruzioni..." name="How To"/>
<menu_item_call label="Aiuto di [SECOND_LIFE]" name="Second Life Help"/>
<menu_item_call label="Guida dell&apos;utente" name="Users guide"/>
<menu_item_call label="Base di conoscenza" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Forum della comunità" name="Community Forums"/>
<menu_item_call label="Portale assistenza" name="Support portal"/>
<menu_item_call label="[SECOND_LIFE] Notizie" name="Second Life News"/>
<menu_item_call label="[SECOND_LIFE] Blog" name="Second Life Blogs"/>
<menu_item_call label="Segnala abuso" name="Report Abuse"/>
<menu_item_call label="Segnala bug" name="Report Bug"/>
<menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/>
@ -337,9 +344,14 @@
<menu_item_call label="Alterna la geometria dei personaggi" name="Toggle Character Geometry"/>
<menu_item_check label="Consenti selezione avatar" name="Allow Select Avatar"/>
</menu>
<menu label="Velocità animazione" name="Animation Speed">
<menu_item_call label="Accelera tutte le animazioni del 10%" name="All Animations 10 Faster"/>
<menu_item_call label="Rallenta tutte le animazioni del 10%" name="All Animations 10 Slower"/>
<menu_item_call label="Ripristina la velocità di tutte le animazioni" name="Reset All Animation Speed"/>
<menu_item_check label="Animazioni lente" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="Forza i parametri sui valori predefiniti" name="Force Params to Default"/>
<menu_item_check label="Informazioni sull&apos;animazione" name="Animation Info"/>
<menu_item_check label="Animazioni lente" name="Slow Motion Animations"/>
<menu_item_check label="Disabilita livello di dettaglio" name="Disable LOD"/>
<menu_item_check label="Mostra schemi collisione" name="Show Collision Skeleton"/>
<menu_item_check label="Mostra bersaglio" name="Display Agent Target"/>

View File

@ -116,7 +116,6 @@
<menu_item_call label="買う" name="Menu Object Buy"/>
<menu_item_call label="取る" name="Menu Object Take"/>
<menu_item_call label="コピーを取る" name="Take Copy"/>
<menu_item_call label="マイインベントリに保存" name="Save Object Back to My Inventory"/>
<menu_item_call label="オブジェクトの中身に保存" name="Save Object Back to Object Contents"/>
<menu_item_call label="オブジェクトを返却する" name="Return Object back to Owner"/>
</menu>
@ -131,6 +130,7 @@
<menu_item_call label="リンクセット..." name="pathfinding_linksets_menu_item"/>
<menu_item_call label="キャラクター..." name="pathfinding_characters_menu_item"/>
<menu_item_call label="表示/テスト..." name="pathfinding_console_menu_item"/>
<menu_item_call label="地域の再構築" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="オプション" name="Options">
<menu_item_check label="権限の詳細を表示する" name="DebugPermissions"/>
@ -160,6 +160,13 @@
<menu label="ヘルプ" name="Help">
<menu_item_call label="ハウツー..." name="How To"/>
<menu_item_call label="[SECOND_LIFE] ヘルプ" name="Second Life Help"/>
<menu_item_call label="ユーザーガイド" name="Users guide"/>
<menu_item_call label="ナレッジベース" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="コミュニティフォーラム" name="Community Forums"/>
<menu_item_call label="日本語サポートページ" name="Support portal"/>
<menu_item_call label="[SECOND_LIFE] ニュース" name="Second Life News"/>
<menu_item_call label="[SECOND_LIFE] ブログ" name="Second Life Blogs"/>
<menu_item_call label="嫌がらせを報告する" name="Report Abuse"/>
<menu_item_call label="バグを報告する" name="Report Bug"/>
<menu_item_call label="[APP_NAME] について" name="About Second Life"/>
@ -386,9 +393,14 @@
<menu_item_call label="女性アバターのテスト" name="Test Female"/>
<menu_item_check label="選択アバター許可" name="Allow Select Avatar"/>
</menu>
<menu label="アニメーションのスピード" name="Animation Speed">
<menu_item_call label="すべてのアニメーションのスピードを 10% アップ" name="All Animations 10 Faster"/>
<menu_item_call label="すべてのアニメーションのスピードを 10% ダウン" name="All Animations 10 Slower"/>
<menu_item_call label="すべてのアニメーションのスピードをリセット" name="Reset All Animation Speed"/>
<menu_item_check label="アニメーションをスローモーション" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="パラメータを強制的にデフォルトにする" name="Force Params to Default"/>
<menu_item_check label="アニメーション情報" name="Animation Info"/>
<menu_item_check label="スローモーションのアニメーション" name="Slow Motion Animations"/>
<menu_item_check label="見ているものを表示する" name="Show Look At"/>
<menu_item_check label="クリックした場所を表示する" name="Show Point At"/>
<menu_item_check label="結合部のアップデートのデバッグ" name="Debug Joint Updates"/>

View File

@ -116,7 +116,6 @@
<menu_item_call label="Comprar" name="Menu Object Buy"/>
<menu_item_call label="Pegar" name="Menu Object Take"/>
<menu_item_call label="Pegar uma cópia" name="Take Copy"/>
<menu_item_call label="Salvar no meu inventário" name="Save Object Back to My Inventory"/>
<menu_item_call label="Salvar objeto de volta aos conteúdos do objeto" name="Save Object Back to Object Contents"/>
<menu_item_call label="Devolver objeto" name="Return Object back to Owner"/>
</menu>
@ -131,6 +130,7 @@
<menu_item_call label="Linksets..." name="pathfinding_linksets_menu_item"/>
<menu_item_call label="Personagens..." name="pathfinding_characters_menu_item"/>
<menu_item_call label="Visualização/teste..." name="pathfinding_console_menu_item"/>
<menu_item_call label="Recarregar região" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="Opções" name="Options">
<menu_item_check label="Mostrar permissões avançadas" name="DebugPermissions"/>
@ -160,6 +160,13 @@
<menu label="Ajuda" name="Help">
<menu_item_call label="Como..." name="How To"/>
<menu_item_call label="[SECOND_LIFE] Ajuda" name="Second Life Help"/>
<menu_item_call label="Guia do usuário" name="Users guide"/>
<menu_item_call label="Base de conhecimento" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Fóruns da comunidade" name="Community Forums"/>
<menu_item_call label="Portal de suporte" name="Support portal"/>
<menu_item_call label="Notícias do [SECOND_LIFE]" name="Second Life News"/>
<menu_item_call label="Blogs do [SECOND_LIFE]" name="Second Life Blogs"/>
<menu_item_call label="Denunciar abuso" name="Report Abuse"/>
<menu_item_call label="Relatar bug" name="Report Bug"/>
<menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/>
@ -337,9 +344,14 @@
<menu_item_call label="Toggle Character Geometry" name="Toggle Character Geometry"/>
<menu_item_check label="Allow Select Avatar" name="Allow Select Avatar"/>
</menu>
<menu label="Velocidade de animação" name="Animation Speed">
<menu_item_call label="Todas as animações 10% mais rápidas" name="All Animations 10 Faster"/>
<menu_item_call label="Todas as animações 10% mais lentas" name="All Animations 10 Slower"/>
<menu_item_call label="Redefinir todas as velocidades de animação" name="Reset All Animation Speed"/>
<menu_item_check label="Animações em câmera lenta" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="Force Params to Default" name="Force Params to Default"/>
<menu_item_check label="Dados da animação" name="Animation Info"/>
<menu_item_check label="Mostrar animação de movimento" name="Slow Motion Animations"/>
<menu_item_check label="Disable Level Of Detail" name="Disable LOD"/>
<menu_item_check label="Show Collision Skeleton" name="Show Collision Skeleton"/>
<menu_item_check label="Display Agent Target" name="Display Agent Target"/>

View File

@ -114,7 +114,6 @@
<menu_item_call label="Satın Al" name="Menu Object Buy"/>
<menu_item_call label="Al" name="Menu Object Take"/>
<menu_item_call label="Kopya Al" name="Take Copy"/>
<menu_item_call label="Envanterime Geri Kaydet" name="Save Object Back to My Inventory"/>
<menu_item_call label="Nesne İçeriklerine Geri Kaydet" name="Save Object Back to Object Contents"/>
<menu_item_call label="Nesneyi İade Et" name="Return Object back to Owner"/>
</menu>
@ -129,6 +128,7 @@
<menu_item_call label="Bağlantı kümeleri..." name="pathfinding_linksets_menu_item"/>
<menu_item_call label="Karakterler..." name="pathfinding_characters_menu_item"/>
<menu_item_call label="Görüntüleme / test..." name="pathfinding_console_menu_item"/>
<menu_item_call label="Bölgeyi tekrar kaydet" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="Seçenklr." name="Options">
<menu_item_check label="Gelişmiş İzinleri Göster" name="DebugPermissions"/>
@ -158,6 +158,13 @@
<menu label="Yardım" name="Help">
<menu_item_call label="Nasıl yapılır..." name="How To"/>
<menu_item_call label="[SECOND_LIFE] Yardımı" name="Second Life Help"/>
<menu_item_call label="Kullanıcı kılavuzu" name="Users guide"/>
<menu_item_call label="Bilgi Bankası" name="Knowledge Base"/>
<menu_item_call label="Wiki" name="Wiki"/>
<menu_item_call label="Topluluk Forumları" name="Community Forums"/>
<menu_item_call label="Destek portalı" name="Support portal"/>
<menu_item_call label="[SECOND_LIFE] Haberleri" name="Second Life News"/>
<menu_item_call label="[SECOND_LIFE] Blogları" name="Second Life Blogs"/>
<menu_item_call label="Kötüye Kullanımı Bildir" name="Report Abuse"/>
<menu_item_call label="Hata Bildir" name="Report Bug"/>
<menu_item_call label="[APP_NAME] Hakkında" name="About Second Life"/>
@ -384,9 +391,14 @@
<menu_item_call label="Test Dişisi" name="Test Female"/>
<menu_item_check label="Avatar Seçimine İzin Ver" name="Allow Select Avatar"/>
</menu>
<menu label="Animasyon Hızı" name="Animation Speed">
<menu_item_call label="Tüm Animasyonlar %10 Daha Hızlı" name="All Animations 10 Faster"/>
<menu_item_call label="Tüm Animasyonlar %10 Daha Yavaş" name="All Animations 10 Slower"/>
<menu_item_call label="Tüm Animasyon Hızlarını Sıfırla" name="Reset All Animation Speed"/>
<menu_item_check label="Yavaş Hareket Animasyonları" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="Parametreleri Varsayılana Zorla" name="Force Params to Default"/>
<menu_item_check label="Animasyon Bilgisi" name="Animation Info"/>
<menu_item_check label="Yavaş Hareket Animasyonları" name="Slow Motion Animations"/>
<menu_item_check label="Şuraya Bak&apos;ı Göster" name="Show Look At"/>
<menu_item_check label="Şuraya İşaret Et&apos;i Göster" name="Show Point At"/>
<menu_item_check label="Eklem Güncelleştirmeleri İçin Hata Ayıklama" name="Debug Joint Updates"/>

View File

@ -114,7 +114,6 @@
<menu_item_call label="購買" name="Menu Object Buy"/>
<menu_item_call label="取得" name="Menu Object Take"/>
<menu_item_call label="取得副本" name="Take Copy"/>
<menu_item_call label="回存到我的收納區" name="Save Object Back to My Inventory"/>
<menu_item_call label="回存到物件內容" name="Save Object Back to Object Contents"/>
<menu_item_call label="退回物件" name="Return Object back to Owner"/>
</menu>
@ -129,6 +128,7 @@
<menu_item_call label="聯結集…" name="pathfinding_linksets_menu_item"/>
<menu_item_call label="角色…" name="pathfinding_characters_menu_item"/>
<menu_item_call label="察看 / 測試…" name="pathfinding_console_menu_item"/>
<menu_item_call label="重新產出地區" name="pathfinding_rebake_navmesh_item"/>
</menu>
<menu label="選項" name="Options">
<menu_item_check label="顯示進階權限" name="DebugPermissions"/>
@ -158,6 +158,13 @@
<menu label="幫助" name="Help">
<menu_item_call label="簡易教學…" name="How To"/>
<menu_item_call label="[SECOND_LIFE] 幫助" name="Second Life Help"/>
<menu_item_call label="使用者指南" name="Users guide"/>
<menu_item_call label="知識庫" name="Knowledge Base"/>
<menu_item_call label="維基" name="Wiki"/>
<menu_item_call label="社群論壇" name="Community Forums"/>
<menu_item_call label="支援入口" name="Support portal"/>
<menu_item_call label="[SECOND_LIFE] 最新消息" name="Second Life News"/>
<menu_item_call label="[SECOND_LIFE] 部落格" name="Second Life Blogs"/>
<menu_item_call label="違規舉報" name="Report Abuse"/>
<menu_item_call label="回報臭蟲" name="Report Bug"/>
<menu_item_call label="關於 [APP_NAME]" name="About Second Life"/>
@ -384,9 +391,14 @@
<menu_item_call label="女性測試" name="Test Female"/>
<menu_item_check label="允許選擇化身" name="Allow Select Avatar"/>
</menu>
<menu label="動作速度" name="Animation Speed">
<menu_item_call label="所有動作加快 10%" name="All Animations 10 Faster"/>
<menu_item_call label="所有動作放慢 10%" name="All Animations 10 Slower"/>
<menu_item_call label="將所有動作恢復原速" name="Reset All Animation Speed"/>
<menu_item_check label="慢動作" name="Slow Motion Animations"/>
</menu>
<menu_item_call label="強制參數為預設值" name="Force Params to Default"/>
<menu_item_check label="動作資訊" name="Animation Info"/>
<menu_item_check label="慢動作" name="Slow Motion Animations"/>
<menu_item_check label="顯示注視在" name="Show Look At"/>
<menu_item_check label="顯示指向在" name="Show Point At"/>
<menu_item_check label="除錯旋軸的更新" name="Debug Joint Updates"/>

View File

@ -50,7 +50,7 @@ const std::string VIEWERLOGIN_GRIDLABEL("viewerlogin_grid");
const std::string APPVIEWER_SERIALNUMBER("appviewer_serialno");
const std::string VIEWERLOGIN_CHANNEL("invalid_channel");
const std::string VIEWERLOGIN_VERSION_CHANNEL("invalid_version");
const std::string VIEWERLOGIN_VERSION("invalid_version");
// Link seams.
@ -73,7 +73,7 @@ void LLViewerWindow::setShowProgress(BOOL show) {}
LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; }
LLViewerWindow* gViewerWindow;
class LLLogin::Impl
{
};
@ -183,7 +183,7 @@ void LLUIColorTable::saveUserSettings(void)const {}
//-----------------------------------------------------------------------------
#include "../llversioninfo.h"
const std::string &LLVersionInfo::getChannelAndVersion() { return VIEWERLOGIN_VERSION_CHANNEL; }
const std::string &LLVersionInfo::getVersion() { return VIEWERLOGIN_VERSION; }
const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; }
//-----------------------------------------------------------------------------
@ -208,11 +208,15 @@ std::string const & LLUpdaterService::pumpName(void)
return wakka;
}
bool LLUpdaterService::updateReadyToInstall(void) { return false; }
void LLUpdaterService::initialize(const std::string& protocol_version,
const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version) {}
void LLUpdaterService::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
const unsigned char uniqueid[MD5HEX_STR_SIZE],
const bool& willing_to_test
) {}
void LLUpdaterService::setCheckPeriod(unsigned int seconds) {}
void LLUpdaterService::startChecking(bool install_if_ready) {}
@ -221,6 +225,12 @@ bool LLUpdaterService::isChecking() { return false; }
LLUpdaterService::eUpdaterState LLUpdaterService::getState() { return INITIAL; }
std::string LLUpdaterService::updatedVersion() { return ""; }
bool llHashedUniqueID(unsigned char* id)
{
memcpy( id, "66666666666666666666666666666666", MD5HEX_STR_SIZE );
return true;
}
//-----------------------------------------------------------------------------
#include "llnotifications.h"
#include "llfloaterreg.h"
@ -360,6 +370,7 @@ namespace tut
accountCredential->setCredentialData(identifier, authenticator);
logininstance->setNotificationsInterface(&notifications);
logininstance->setPlatformInfo("win", "1.3.5");
}
LLLoginInstance* logininstance;

View File

@ -28,7 +28,6 @@
#include "../test/lltut.h"
#include "../llversioninfo.h"
#include "llversionviewer.h"
namespace tut
{
@ -38,20 +37,20 @@ namespace tut
: mResetChannel("Reset Channel")
{
std::ostringstream stream;
stream << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VERSION_BUILD;
stream << LL_VIEWER_VERSION_MAJOR << "."
<< LL_VIEWER_VERSION_MINOR << "."
<< LL_VIEWER_VERSION_PATCH << "."
<< LL_VIEWER_VERSION_BUILD;
mVersion = stream.str();
stream.str("");
stream << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH;
stream << LL_VIEWER_VERSION_MAJOR << "."
<< LL_VIEWER_VERSION_MINOR << "."
<< LL_VIEWER_VERSION_PATCH;
mShortVersion = stream.str();
stream.str("");
stream << LL_CHANNEL
stream << LL_VIEWER_CHANNEL
<< " "
<< mVersion;
mVersionAndChannel = stream.str();
@ -78,20 +77,19 @@ namespace tut
{
ensure_equals("Major version",
LLVersionInfo::getMajor(),
LL_VERSION_MAJOR);
LL_VIEWER_VERSION_MAJOR);
ensure_equals("Minor version",
LLVersionInfo::getMinor(),
LL_VERSION_MINOR);
LL_VIEWER_VERSION_MINOR);
ensure_equals("Patch version",
LLVersionInfo::getPatch(),
LL_VERSION_PATCH);
LL_VIEWER_VERSION_PATCH);
ensure_equals("Build version",
LLVersionInfo::getBuild(),
LL_VERSION_BUILD);
LL_VIEWER_VERSION_BUILD);
ensure_equals("Channel version",
LLVersionInfo::getChannel(),
LL_CHANNEL);
LL_VIEWER_CHANNEL);
ensure_equals("Version String",
LLVersionInfo::getVersion(),
mVersion);

View File

@ -160,14 +160,6 @@ class ViewerManifest(LLManifest):
if not self.path2basename(os.path.join(os.pardir, os.pardir), "summary.json"):
print "No summary.json file"
def login_channel(self):
"""Channel reported for login and upgrade purposes ONLY;
used for A/B testing"""
# NOTE: Do not return the normal channel if login_channel
# is not specified, as some code may branch depending on
# whether or not this is present
return self.args.get('login_channel')
def grid(self):
return self.args['grid']
def channel(self):
@ -179,16 +171,24 @@ class ViewerManifest(LLManifest):
def channel_lowerword(self):
return self.channel_oneword().lower()
def app_name(self):
app_suffix='Test'
channel_type=self.channel_lowerword()
if channel_type == 'release' :
app_suffix='Viewer'
elif re.match('^(beta|project).*',channel_type) :
app_suffix=self.channel_unique()
return "Second Life "+app_suffix
def icon_path(self):
icon_path="icons/"
channel_type=self.channel_lowerword()
if channel_type == 'release' \
or channel_type == 'development' \
:
print "Icon channel type '%s'" % channel_type
if channel_type == 'release' :
icon_path += channel_type
elif channel_type == 'betaviewer' :
elif re.match('^beta.*',channel_type) :
icon_path += 'beta'
elif re.match('project.*',channel_type) :
elif re.match('^project.*',channel_type) :
icon_path += 'project'
else :
icon_path += 'test'
@ -205,14 +205,6 @@ class ViewerManifest(LLManifest):
"--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\
{'grid':self.grid()}
# set command line flags for channel
channel_flags = ''
if self.login_channel() and self.login_channel() != self.channel():
# Report a special channel during login, but use default
channel_flags = '--channel "%s"' % (self.login_channel())
elif not self.default_channel():
channel_flags = '--channel "%s"' % self.channel()
# Deal with settings
setting_flags = ''
if not self.default_channel() or not self.default_grid():
@ -223,7 +215,7 @@ class ViewerManifest(LLManifest):
setting_flags = '--settings settings_%s_%s.xml'\
% (self.grid(), self.channel_lowerword())
return " ".join((channel_flags, grid_flags, setting_flags)).strip()
return " ".join((grid_flags, setting_flags)).strip()
def extract_names(self,src):
try:
@ -250,13 +242,13 @@ class ViewerManifest(LLManifest):
class WindowsManifest(ViewerManifest):
def final_exe(self):
if self.default_channel():
if self.default_grid():
return "SecondLife.exe"
else:
return "SecondLifePreview.exe"
else:
return ''.join(self.channel().split()) + '.exe'
app_suffix="Test"
channel_type=self.channel_lowerword()
if channel_type == 'release' :
app_suffix=''
elif re.match('^(beta|project).*',channel_type) :
app_suffix=''.join(self.channel_unique().split())
return "SecondLife"+app_suffix+".exe"
def test_msvcrt_and_copy_action(self, src, dst):
# This is used to test a dll manifest.
@ -304,26 +296,9 @@ class WindowsManifest(ViewerManifest):
else:
print "Doesn't exist:", src
### DISABLED MANIFEST CHECKING for vs2010. we may need to reenable this
# shortly. If this hasn't been reenabled by the 2.9 viewer release then it
# should be deleted -brad
#def enable_crt_manifest_check(self):
# if self.is_packaging_viewer():
# WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
#def enable_no_crt_manifest_check(self):
# if self.is_packaging_viewer():
# WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action
#def disable_manifest_check(self):
# if self.is_packaging_viewer():
# del WindowsManifest.copy_action
def construct(self):
super(WindowsManifest, self).construct()
#self.enable_crt_manifest_check()
if self.is_packaging_viewer():
# Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
@ -333,15 +308,11 @@ class WindowsManifest(ViewerManifest):
'llplugin', 'slplugin', self.args['configuration']),
"slplugin.exe")
#self.disable_manifest_check()
self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat")
# Get shared libs from the shared libs staging directory
if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']),
dst=""):
#self.enable_crt_manifest_check()
# Get llcommon and deps. If missing assume static linkage and continue.
try:
self.path('llcommon.dll')
@ -353,8 +324,6 @@ class WindowsManifest(ViewerManifest):
print err.message
print "Skipping llcommon.dll (assuming llcommon was linked statically)"
#self.disable_manifest_check()
# Mesh 3rd party libs needed for auto LOD and collada reading
try:
if self.args['configuration'].lower() == 'debug':
@ -422,8 +391,6 @@ class WindowsManifest(ViewerManifest):
self.path("featuretable.txt")
self.path("featuretable_xp.txt")
#self.enable_no_crt_manifest_check()
# Media plugins - QuickTime
if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
self.path("media_plugin_quicktime.dll")
@ -503,15 +470,10 @@ class WindowsManifest(ViewerManifest):
self.end_prefix()
#self.disable_manifest_check()
# pull in the crash logger and updater from other projects
# tag:"crash-logger" here as a cue to the exporter
self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
dst="win_crash_logger.exe")
# For CHOP-397, windows updater no longer used.
# self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
# dst="updater.exe")
if not self.is_packaging_viewer():
self.package_file = "copied_deps"
@ -574,6 +536,7 @@ class WindowsManifest(ViewerManifest):
'channel':self.channel(),
'channel_oneword':self.channel_oneword(),
'channel_unique':self.channel_unique(),
'subchannel_underscores':'_'.join(self.channel_unique().split())
}
version_vars = """
@ -595,7 +558,7 @@ class WindowsManifest(ViewerManifest):
Caption "Second Life"
"""
else:
# beta grid viewer
# alternate grid viewer
installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
grid_vars_template = """
OutFile "%(installer_file)s"
@ -607,8 +570,8 @@ class WindowsManifest(ViewerManifest):
Caption "Second Life %(grid)s ${VERSION}"
"""
else:
# some other channel on some grid
installer_file = "Second_Life_%(version_dashes)s_%(channel_oneword)s_Setup.exe"
# some other channel (grid name not used)
installer_file = "Second_Life_%(version_dashes)s_%(subchannel_underscores)s_Setup.exe"
grid_vars_template = """
OutFile "%(installer_file)s"
!define INSTFLAGS "%(flags)s"
@ -670,13 +633,15 @@ class DarwinManifest(ViewerManifest):
self.path(self.args['configuration'] + "/Second Life.app", dst="")
if self.prefix(src="", dst="Contents"): # everything goes in Contents
self.path("Info-SecondLife.plist", dst="Info.plist")
self.path("Info.plist", dst="Info.plist")
# copy additional libs in <bundle>/Contents/MacOS/
self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib")
self.path("../packages/lib/release/libhunspell-1.3.0.dylib", dst="Resources/libhunspell-1.3.0.dylib")
self.path("../viewer_components/updater/scripts/darwin/update_install", "MacOS/update_install")
if self.prefix(dst="MacOS"):
self.path2basename("../viewer_components/updater/scripts/darwin", "*.py")
self.end_prefix()
# most everything goes in the Resources directory
if self.prefix(src="", dst="Resources"):
@ -698,7 +663,11 @@ class DarwinManifest(ViewerManifest):
self.path("SecondLife.nib")
# Translations
self.path("English.lproj")
self.path("English.lproj/language.txt")
self.replace_in(src="English.lproj/InfoPlist.strings",
dst="English.lproj/InfoPlist.strings",
searchdict={'%%VERSION%%':'.'.join(self.args['version'])}
)
self.path("German.lproj")
self.path("Japanese.lproj")
self.path("Korean.lproj")
@ -765,7 +734,6 @@ class DarwinManifest(ViewerManifest):
# our apps
for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
("mac_updater", "mac-updater.app"),
# plugin launcher
(os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
):
@ -811,7 +779,7 @@ class DarwinManifest(ViewerManifest):
def copy_finish(self):
# Force executable permissions to be set for scripts
# see CHOP-223 and http://mercurial.selenic.com/bts/issue1802
for script in 'Contents/MacOS/update_install',:
for script in 'Contents/MacOS/update_install.py',:
self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script))
def package_finish(self):
@ -880,10 +848,7 @@ class DarwinManifest(ViewerManifest):
# Copy everything in to the mounted .dmg
if self.default_channel() and not self.default_grid():
app_name = "Second Life " + self.args['grid']
else:
app_name = channel_standin.strip()
app_name = self.app_name()
# Hack:
# Because there is no easy way to coerce the Finder into positioning
@ -1068,13 +1033,13 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libaprutil-1.so")
self.path("libaprutil-1.so.0")
self.path("libaprutil-1.so.0.4.1")
self.path("libboost_context-mt.so.*")
self.path("libboost_filesystem-mt.so.*")
self.path("libboost_program_options-mt.so.*")
self.path("libboost_regex-mt.so.*")
self.path("libboost_thread-mt.so.*")
self.path("libboost_filesystem-mt.so.*")
self.path("libboost_signals-mt.so.*")
self.path("libboost_system-mt.so.*")
#self.path("libbreakpad_client.a")
self.path("libboost_thread-mt.so.*")
self.path("libcollada14dom.so")
self.path("libdb*.so")
self.path("libcrypto.so.*")

View File

@ -1158,7 +1158,7 @@ namespace tut
// pump for a bit and make sure all 3 chains are running
pump_loop(mPump,0.1f);
count = mPump->runningChains();
ensure_equals("client chain onboard", count, 3);
// ensure_equals("client chain onboard", count, 3); commented out because it fails frequently - appears to be timing sensitive
lldebugs << "** request should have been sent." << llendl;
// pump for long enough the the client socket closes, and the

View File

@ -9,6 +9,7 @@ endif(LL_TESTS)
include(LLCommon)
include(LLMath)
include(LLXML)
include(Boost)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@ -44,12 +45,18 @@ target_link_libraries(lllogin
${LLCOMMON_LIBRARIES}
${LLMATH_LIBRARIES}
${LLXML_LIBRARIES}
${BOOST_CONTEXT_LIBRARY}
)
if(LL_TESTS)
SET(lllogin_TEST_SOURCE_FILES
lllogin.cpp
)
set_source_files_properties(
lllogin.cpp
PROPERTIES
LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_CONTEXT_LIBRARY}"
)
LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}")
endif(LL_TESTS)

View File

@ -23,7 +23,6 @@
* $/LicenseInfo$
*/
#include <boost/coroutine/coroutine.hpp>
#include "linden_common.h"
#include "llsd.h"
#include "llsdutil.h"

View File

@ -19,6 +19,7 @@ include_directories(
${LLPLUGIN_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/newview
)
include_directories(SYSTEM
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
@ -41,6 +42,12 @@ set(updater_service_HEADER_FILES
set_source_files_properties(${updater_service_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties(
llupdaterservice.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
)
list(APPEND
updater_service_SOURCE_FILES
${updater_service_HEADER_FILES}

View File

@ -62,10 +62,16 @@ LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client):
}
void LLUpdateChecker::checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
std::string const & servicePath, std::string channel, std::string version)
void LLUpdateChecker::checkVersion(std::string const & hostUrl,
std::string const & servicePath,
std::string const & channel,
std::string const & version,
std::string const & platform,
std::string const & platform_version,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test)
{
mImplementation->checkVersion(protocolVersion, hostUrl, servicePath, channel, version);
mImplementation->checkVersion(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
}
@ -74,12 +80,14 @@ void LLUpdateChecker::checkVersion(std::string const & protocolVersion, std::str
//-----------------------------------------------------------------------------
const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.0";
const char * LLUpdateChecker::Implementation::sLegacyProtocolVersion = "v1.0";
const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.1";
LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client):
mClient(client),
mInProgress(false)
mInProgress(false),
mProtocol(sProtocolVersion)
{
; // No op.
}
@ -91,41 +99,93 @@ LLUpdateChecker::Implementation::~Implementation()
}
void LLUpdateChecker::Implementation::checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
std::string const & servicePath, std::string channel, std::string version)
void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
std::string const & servicePath,
std::string const & channel,
std::string const & version,
std::string const & platform,
std::string const & platform_version,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test)
{
llassert(!mInProgress);
if(protocolVersion != sProtocolVersion) throw CheckError("unsupported protocol");
mInProgress = true;
mVersion = version;
std::string checkUrl = buildUrl(protocolVersion, hostUrl, servicePath, channel, version);
LL_INFOS("UpdateCheck") << "checking for updates at " << checkUrl << llendl;
mHostUrl = hostUrl;
mServicePath = servicePath;
mChannel = channel;
mVersion = version;
mPlatform = platform;
mPlatformVersion = platform_version;
memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
mWillingToTest = willing_to_test;
mProtocol = sProtocolVersion;
std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
mHttpClient.get(checkUrl, this);
}
void LLUpdateChecker::Implementation::completed(U32 status,
const std::string & reason,
const LLSD & content)
const std::string & reason,
const LLSD & content)
{
mInProgress = false;
if(status != 200) {
LL_WARNS("UpdateCheck") << "html error " << status << " (" << reason << ")" << llendl;
mClient.error(reason);
} else if(!content.asBoolean()) {
LL_INFOS("UpdateCheck") << "up to date" << llendl;
mClient.upToDate();
} else if(content["required"].asBoolean()) {
LL_INFOS("UpdateCheck") << "version invalid" << llendl;
LLURI uri(content["url"].asString());
mClient.requiredUpdate(content["version"].asString(), uri, content["hash"].asString());
} else {
LL_INFOS("UpdateCheck") << "newer version " << content["version"].asString() << " available" << llendl;
LLURI uri(content["url"].asString());
mClient.optionalUpdate(content["version"].asString(), uri, content["hash"].asString());
if(status != 200)
{
std::string server_error;
if ( content.has("error_code") )
{
server_error += content["error_code"].asString();
}
if ( content.has("error_text") )
{
server_error += server_error.empty() ? "" : ": ";
server_error += content["error_text"].asString();
}
if (status == 404)
{
if (mProtocol == sProtocolVersion)
{
mProtocol = sLegacyProtocolVersion;
std::string retryUrl = buildUrl(mHostUrl, mServicePath, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
LL_WARNS("UpdaterService")
<< "update response using " << sProtocolVersion
<< " was HTTP 404 (" << server_error
<< "); retry with legacy protocol " << mProtocol
<< "\n at " << retryUrl
<< LL_ENDL;
mHttpClient.get(retryUrl, this);
}
else
{
LL_WARNS("UpdaterService")
<< "update response using " << sLegacyProtocolVersion
<< " was 404 (" << server_error
<< "); request failed"
<< LL_ENDL;
mClient.error(reason);
}
}
else
{
LL_WARNS("UpdaterService") << "response error " << status
<< " " << reason
<< " (" << server_error << ")"
<< LL_ENDL;
mClient.error(reason);
}
}
else
{
mClient.response(content);
}
}
@ -133,38 +193,31 @@ void LLUpdateChecker::Implementation::completed(U32 status,
void LLUpdateChecker::Implementation::error(U32 status, const std::string & reason)
{
mInProgress = false;
LL_WARNS("UpdateCheck") << "update check failed; " << reason << llendl;
LL_WARNS("UpdaterService") << "update check failed; " << reason << LL_ENDL;
mClient.error(reason);
}
std::string LLUpdateChecker::Implementation::buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
std::string const & servicePath, std::string channel, std::string version)
std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUrl,
std::string const & servicePath,
std::string const & channel,
std::string const & version,
std::string const & platform,
std::string const & platform_version,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test)
{
#ifdef LL_WINDOWS
static const char * platform = "win";
#elif LL_DARWIN
long versMin;
Gestalt(gestaltSystemVersionMinor, &versMin);
static const char *platform;
if (versMin == 5) //OS 10.5
{
platform = "mac_legacy";
}
else
{
platform = "mac";
}
#else
static const char * platform = "lnx";
#endif
LLSD path;
path.append(servicePath);
path.append(protocolVersion);
path.append(mProtocol);
path.append(channel);
path.append(version);
path.append(platform);
if (mProtocol != sLegacyProtocolVersion)
{
path.append(platform_version);
path.append(willing_to_test ? "testok" : "testno");
path.append((char*)uniqueid);
}
return LLURI::buildHTTP(hostUrl, path).asString();
}

View File

@ -29,6 +29,7 @@
#include <boost/shared_ptr.hpp>
#include "llmd5.h"
#include "llhttpclient.h"
//
@ -37,15 +38,20 @@
class LLUpdateChecker {
public:
class Client;
class Implementation:
public LLHTTPClient::Responder
class Implementation: public LLHTTPClient::Responder
{
public:
Implementation(Client & client);
~Implementation();
void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
std::string const & servicePath, std::string channel, std::string version);
void checkVersion(std::string const & hostUrl,
std::string const & servicePath,
std::string const & channel,
std::string const & version,
std::string const & platform,
std::string const & platform_version,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test
);
// Responder:
virtual void completed(U32 status,
@ -54,15 +60,30 @@ public:
virtual void error(U32 status, const std::string & reason);
private:
static const char * sLegacyProtocolVersion;
static const char * sProtocolVersion;
const char* mProtocol;
Client & mClient;
LLHTTPClient mHttpClient;
bool mInProgress;
std::string mVersion;
std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
std::string const & servicePath, std::string channel, std::string version);
bool mInProgress;
std::string mVersion;
std::string mHostUrl;
std::string mServicePath;
std::string mChannel;
std::string mPlatform;
std::string mPlatformVersion;
unsigned char mUniqueId[MD5HEX_STR_SIZE];
bool mWillingToTest;
std::string buildUrl(std::string const & hostUrl,
std::string const & servicePath,
std::string const & channel,
std::string const & version,
std::string const & platform,
std::string const & platform_version,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test);
LOG_CLASS(LLUpdateChecker::Implementation);
};
@ -74,8 +95,14 @@ public:
LLUpdateChecker(Client & client);
// Check status of current app on the given host for the channel and version provided.
void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
std::string const & servicePath, std::string channel, std::string version);
void checkVersion(std::string const & hostUrl,
std::string const & servicePath,
std::string const & channel,
std::string const & version,
std::string const & platform,
std::string const & platform_version,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test);
private:
LLPointer<Implementation> mImplementation;
@ -94,18 +121,8 @@ public:
// An error occurred while checking for an update.
virtual void error(std::string const & message) = 0;
// A newer version is available, but the current version may still be used.
virtual void optionalUpdate(std::string const & newVersion,
LLURI const & uri,
std::string const & hash) = 0;
// A newer version is available, and the current version is no longer valid.
virtual void requiredUpdate(std::string const & newVersion,
LLURI const & uri,
std::string const & hash) = 0;
// The checked version is up to date; no newer version exists.
virtual void upToDate(void) = 0;
// A successful response was received from the viewer version manager
virtual void response(LLSD const & content) = 0;
};

View File

@ -50,7 +50,9 @@ public:
void cancel(void);
void download(LLURI const & uri,
std::string const & hash,
std::string const & updateChannel,
std::string const & updateVersion,
std::string const & info_url,
bool required);
bool isDownloading(void);
size_t onHeader(void * header, size_t size);
@ -125,10 +127,12 @@ void LLUpdateDownloader::cancel(void)
void LLUpdateDownloader::download(LLURI const & uri,
std::string const & hash,
std::string const & updateChannel,
std::string const & updateVersion,
std::string const & info_url,
bool required)
{
mImplementation->download(uri, hash, updateVersion, required);
mImplementation->download(uri, hash, updateChannel, updateVersion, info_url, required);
}
@ -222,18 +226,28 @@ void LLUpdateDownloader::Implementation::cancel(void)
void LLUpdateDownloader::Implementation::download(LLURI const & uri,
std::string const & hash,
std::string const & updateChannel,
std::string const & updateVersion,
std::string const & info_url,
bool required)
{
{
if(isDownloading()) mClient.downloadError("download in progress");
mDownloadRecordPath = downloadMarkerPath();
mDownloadData = LLSD();
mDownloadData["required"] = required;
mDownloadData["update_channel"] = updateChannel;
mDownloadData["update_version"] = updateVersion;
try {
if (!info_url.empty())
{
mDownloadData["info_url"] = info_url;
}
try
{
startDownloading(uri, hash);
} catch(DownloadError const & e) {
}
catch(DownloadError const & e)
{
mClient.downloadError(e.what());
}
}
@ -249,47 +263,65 @@ void LLUpdateDownloader::Implementation::resume(void)
{
mCancelled = false;
if(isDownloading()) {
if(isDownloading())
{
mClient.downloadError("download in progress");
}
mDownloadRecordPath = downloadMarkerPath();
llifstream dataStream(mDownloadRecordPath);
if(!dataStream) {
if(!dataStream)
{
mClient.downloadError("no download marker");
return;
}
LLSDSerialize::fromXMLDocument(mDownloadData, dataStream);
if(!mDownloadData.asBoolean()) {
if(!mDownloadData.asBoolean())
{
mClient.downloadError("no download information in marker");
return;
}
std::string filePath = mDownloadData["path"].asString();
try {
if(LLFile::isfile(filePath)) {
try
{
if(LLFile::isfile(filePath))
{
llstat fileStatus;
LLFile::stat(filePath, &fileStatus);
if(fileStatus.st_size != mDownloadData["size"].asInteger()) {
if(fileStatus.st_size != mDownloadData["size"].asInteger())
{
resumeDownloading(fileStatus.st_size);
} else if(!validateDownload()) {
}
else if(!validateDownload())
{
LLFile::remove(filePath);
download(LLURI(mDownloadData["url"].asString()),
mDownloadData["hash"].asString(),
mDownloadData["update_channel"].asString(),
mDownloadData["update_version"].asString(),
mDownloadData["info_url"].asString(),
mDownloadData["required"].asBoolean());
} else {
}
else
{
mClient.downloadComplete(mDownloadData);
}
} else {
}
else
{
download(LLURI(mDownloadData["url"].asString()),
mDownloadData["hash"].asString(),
mDownloadData["update_channel"].asString(),
mDownloadData["update_version"].asString(),
mDownloadData["info_url"].asString(),
mDownloadData["required"].asBoolean());
}
} catch(DownloadError & e) {
}
catch(DownloadError & e)
{
mClient.downloadError(e.what());
}
}
@ -297,13 +329,18 @@ void LLUpdateDownloader::Implementation::resume(void)
void LLUpdateDownloader::Implementation::setBandwidthLimit(U64 bytesPerSecond)
{
if((mBandwidthLimit != bytesPerSecond) && isDownloading() && !mDownloadData["required"].asBoolean()) {
if((mBandwidthLimit != bytesPerSecond) && isDownloading() && !mDownloadData["required"].asBoolean())
{
llassert(mCurl != 0);
mBandwidthLimit = bytesPerSecond;
CURLcode code = curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, &mBandwidthLimit);
if(code != CURLE_OK) LL_WARNS("UpdateDownload") <<
"unable to change dowload bandwidth" << LL_ENDL;
} else {
if(code != CURLE_OK)
{
LL_WARNS("UpdaterService") << "unable to change dowload bandwidth" << LL_ENDL;
}
}
else
{
mBandwidthLimit = bytesPerSecond;
}
}
@ -322,13 +359,13 @@ size_t LLUpdateDownloader::Implementation::onHeader(void * buffer, size_t size)
size_t lastDigitPos = header.find_last_of("0123456789");
std::string contentLength = header.substr(firstDigitPos, lastDigitPos - firstDigitPos + 1);
size_t size = boost::lexical_cast<size_t>(contentLength);
LL_INFOS("UpdateDownload") << "download size is " << size << LL_ENDL;
LL_INFOS("UpdaterService") << "download size is " << size << LL_ENDL;
mDownloadData["size"] = LLSD(LLSD::Integer(size));
llofstream odataStream(mDownloadRecordPath);
LLSDSerialize::toPrettyXML(mDownloadData, odataStream);
} catch (std::exception const & e) {
LL_WARNS("UpdateDownload") << "unable to read content length ("
LL_WARNS("UpdaterService") << "unable to read content length ("
<< e.what() << ")" << LL_ENDL;
}
} else {
@ -368,7 +405,7 @@ int LLUpdateDownloader::Implementation::onProgress(double downloadSize, double b
event["payload"] = payload;
LLEventPumps::instance().obtain("mainlooprepeater").post(event);
LL_INFOS("UpdateDownload") << "progress event " << payload << LL_ENDL;
LL_INFOS("UpdaterService") << "progress event " << payload << LL_ENDL;
} else {
; // Keep events to a reasonalbe number.
}
@ -381,29 +418,44 @@ void LLUpdateDownloader::Implementation::run(void)
{
CURLcode code = curl_easy_perform(mCurl);
mDownloadStream.close();
if(code == CURLE_OK) {
if(code == CURLE_OK)
{
LLFile::remove(mDownloadRecordPath);
if(validateDownload()) {
LL_INFOS("UpdateDownload") << "download successful" << LL_ENDL;
if(validateDownload())
{
LL_INFOS("UpdaterService") << "download successful" << LL_ENDL;
mClient.downloadComplete(mDownloadData);
} else {
LL_INFOS("UpdateDownload") << "download failed hash check" << LL_ENDL;
}
else
{
LL_INFOS("UpdaterService") << "download failed hash check" << LL_ENDL;
std::string filePath = mDownloadData["path"].asString();
if(filePath.size() != 0) LLFile::remove(filePath);
if(filePath.size() != 0)
{
LLFile::remove(filePath);
}
mClient.downloadError("failed hash check");
}
} else if(mCancelled && (code == CURLE_WRITE_ERROR)) {
LL_INFOS("UpdateDownload") << "download canceled by user" << LL_ENDL;
}
else if(mCancelled && (code == CURLE_WRITE_ERROR))
{
LL_INFOS("UpdaterService") << "download canceled by user" << LL_ENDL;
// Do not call back client.
} else {
LL_WARNS("UpdateDownload") << "download failed with error '" <<
}
else
{
LL_WARNS("UpdaterService") << "download failed with error '" <<
curl_easy_strerror(code) << "'" << LL_ENDL;
LLFile::remove(mDownloadRecordPath);
if(mDownloadData.has("path")) LLFile::remove(mDownloadData["path"].asString());
if(mDownloadData.has("path"))
{
LLFile::remove(mDownloadData["path"].asString());
}
mClient.downloadError("curl error");
}
if(mHeaderList) {
if(mHeaderList)
{
curl_slist_free_all(mHeaderList);
mHeaderList = 0;
}
@ -421,13 +473,16 @@ void LLUpdateDownloader::Implementation::initializeCurlGet(std::string const & u
curl_easy_reset(mCurl);
}
if(mCurl == 0) throw DownloadError("failed to initialize curl");
if(mCurl == 0)
{
throw DownloadError("failed to initialize curl");
}
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_NOSIGNAL, true));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_FOLLOWLOCATION, true));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_WRITEFUNCTION, &write_function));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_WRITEDATA, this));
if(processHeader) {
if(processHeader)
{
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_HEADERFUNCTION, &header_function));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_HEADERDATA, this));
}
@ -446,7 +501,7 @@ void LLUpdateDownloader::Implementation::initializeCurlGet(std::string const & u
void LLUpdateDownloader::Implementation::resumeDownloading(size_t startByte)
{
LL_INFOS("UpdateDownload") << "resuming download from " << mDownloadData["url"].asString()
LL_INFOS("UpdaterService") << "resuming download from " << mDownloadData["url"].asString()
<< " at byte " << startByte << LL_ENDL;
initializeCurlGet(mDownloadData["url"].asString(), false);
@ -456,7 +511,10 @@ void LLUpdateDownloader::Implementation::resumeDownloading(size_t startByte)
boost::format rangeHeaderFormat("Range: bytes=%u-");
rangeHeaderFormat % startByte;
mHeaderList = curl_slist_append(mHeaderList, rangeHeaderFormat.str().c_str());
if(mHeaderList == 0) throw DownloadError("cannot add Range header");
if(mHeaderList == 0)
{
throw DownloadError("cannot add Range header");
}
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_HTTPHEADER, mHeaderList));
mDownloadStream.open(mDownloadData["path"].asString(),
@ -476,9 +534,9 @@ void LLUpdateDownloader::Implementation::startDownloading(LLURI const & uri, std
std::string filePath = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, fileName);
mDownloadData["path"] = filePath;
LL_INFOS("UpdateDownload") << "downloading " << filePath
LL_INFOS("UpdaterService") << "downloading " << filePath
<< " from " << uri.asString() << LL_ENDL;
LL_INFOS("UpdateDownload") << "hash of file is " << hash << LL_ENDL;
LL_INFOS("UpdaterService") << "hash of file is " << hash << LL_ENDL;
llofstream dataStream(mDownloadRecordPath);
LLSDSerialize::toPrettyXML(mDownloadData, dataStream);
@ -508,19 +566,26 @@ bool LLUpdateDownloader::Implementation::validateDownload(void)
{
std::string filePath = mDownloadData["path"].asString();
llifstream fileStream(filePath, std::ios_base::in | std::ios_base::binary);
if(!fileStream) return false;
if(!fileStream)
{
return false;
}
std::string hash = mDownloadData["hash"].asString();
if(hash.size() != 0) {
LL_INFOS("UpdateDownload") << "checking hash..." << LL_ENDL;
if(hash.size() != 0)
{
LL_INFOS("UpdaterService") << "checking hash..." << LL_ENDL;
char digest[33];
LLMD5(fileStream).hex_digest(digest);
if(hash != digest) {
LL_WARNS("UpdateDownload") << "download hash mismatch; expeted " << hash <<
if(hash != digest)
{
LL_WARNS("UpdaterService") << "download hash mismatch; expected " << hash <<
" but download is " << digest << LL_ENDL;
}
return hash == digest;
} else {
}
else
{
return true; // No hash check provided.
}
}

View File

@ -54,7 +54,9 @@ public:
// Start a new download.
void download(LLURI const & uri,
std::string const & hash,
std::string const & updateChannel,
std::string const & updateVersion,
std::string const & info_url,
bool required=false);
// Returns true if a download is in progress.

View File

@ -75,7 +75,7 @@ int ll_install_update(std::string const & script,
llassert(!"unpossible copy mode");
}
llinfos << "UpdateInstaller: installing " << updatePath << " using " <<
LL_INFOS("Updater") << "UpdateInstaller: installing " << updatePath << " using " <<
actualScriptPath << LL_ENDL;
LLProcess::Params params;

View File

@ -32,7 +32,6 @@
#include "lltimer.h"
#include "llupdatechecker.h"
#include "llupdateinstaller.h"
#include "llversionviewer.h"
#include <boost/scoped_ptr.hpp>
#include <boost/weak_ptr.hpp>
@ -44,6 +43,12 @@
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
#endif
#if ! defined(LL_VIEWER_VERSION_MAJOR) \
|| ! defined(LL_VIEWER_VERSION_MINOR) \
|| ! defined(LL_VIEWER_VERSION_PATCH) \
|| ! defined(LL_VIEWER_VERSION_BUILD)
#error "Version information is undefined"
#endif
namespace
{
@ -60,6 +65,8 @@ namespace
{
#ifdef LL_WINDOWS
std::string scriptFile = "update_install.bat";
#elif LL_DARWIN
std::string scriptFile = "update_install.py";
#else
std::string scriptFile = "update_install";
#endif
@ -71,6 +78,8 @@ namespace
#ifdef LL_WINDOWS
return LL_COPY_INSTALL_SCRIPT_TO_TEMP;
#else
// This is important on Mac because update_install.py looks at its own
// script pathname to discover the viewer app bundle to update.
return LL_RUN_INSTALL_SCRIPT_IN_PLACE;
#endif
};
@ -83,11 +92,15 @@ class LLUpdaterServiceImpl :
{
static const std::string sListenerName;
std::string mProtocolVersion;
std::string mUrl;
std::string mPath;
std::string mChannel;
std::string mVersion;
std::string mProtocolVersion;
std::string mUrl;
std::string mPath;
std::string mChannel;
std::string mVersion;
std::string mPlatform;
std::string mPlatformVersion;
unsigned char mUniqueId[MD5HEX_STR_SIZE];
bool mWillingToTest;
unsigned int mCheckPeriod;
bool mIsChecking;
@ -107,11 +120,15 @@ public:
LLUpdaterServiceImpl();
virtual ~LLUpdaterServiceImpl();
void initialize(const std::string& protocol_version,
const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version);
void initialize(const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
const unsigned char uniqueid[MD5HEX_STR_SIZE],
const bool& willing_to_test
);
void setCheckPeriod(unsigned int seconds);
void setBandwidthLimit(U64 bytesPerSecond);
@ -129,13 +146,9 @@ public:
// LLUpdateChecker::Client:
virtual void error(std::string const & message);
virtual void optionalUpdate(std::string const & newVersion,
LLURI const & uri,
std::string const & hash);
virtual void requiredUpdate(std::string const & newVersion,
LLURI const & uri,
std::string const & hash);
virtual void upToDate(void);
// A successful response was received from the viewer version manager
virtual void response(LLSD const & content);
// LLUpdateDownloader::Client
void downloadComplete(LLSD const & data);
@ -144,6 +157,7 @@ public:
bool onMainLoop(LLSD const & event);
private:
std::string mNewChannel;
std::string mNewVersion;
void restartTimer(unsigned int seconds);
@ -169,11 +183,14 @@ LLUpdaterServiceImpl::~LLUpdaterServiceImpl()
LLEventPumps::instance().obtain("mainloop").stopListening(sListenerName);
}
void LLUpdaterServiceImpl::initialize(const std::string& protocol_version,
const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version)
void LLUpdaterServiceImpl::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
const unsigned char uniqueid[MD5HEX_STR_SIZE],
const bool& willing_to_test)
{
if(mIsChecking || mIsDownloading)
{
@ -181,11 +198,22 @@ void LLUpdaterServiceImpl::initialize(const std::string& protocol_version,
"while updater is running.");
}
mProtocolVersion = protocol_version;
mUrl = url;
mPath = path;
mChannel = channel;
mVersion = version;
mPlatform = platform;
mPlatformVersion = platform_version;
memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
mWillingToTest = willing_to_test;
LL_DEBUGS("UpdaterService")
<< "\n url: " << mUrl
<< "\n path: " << mPath
<< "\n channel: " << mChannel
<< "\n version: " << mVersion
<< "\n uniqueid: " << mUniqueId
<< "\n willing: " << ( mWillingToTest ? "testok" : "testno" )
<< LL_ENDL;
}
void LLUpdaterServiceImpl::setCheckPeriod(unsigned int seconds)
@ -284,7 +312,7 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
// the update. Do not install this update.
if(!path.asString().empty())
{
llinfos << "ignoring update dowloaded by different client version" << llendl;
LL_INFOS("UpdaterService") << "ignoring update dowloaded by different client version" << LL_ENDL;;
LLFile::remove(path.asString());
LLFile::remove(update_marker_path());
}
@ -311,9 +339,13 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
if((result == 0) && mAppExitCallback)
{
mAppExitCallback();
} else if(result != 0) {
llwarns << "failed to run update install script" << LL_ENDL;
} else {
}
else if(result != 0)
{
LL_WARNS("UpdaterService") << "failed to run update install script" << LL_ENDL;
}
else
{
; // No op.
}
}
@ -341,15 +373,19 @@ bool LLUpdaterServiceImpl::checkForResume()
{
mIsDownloading = true;
mNewVersion = download_info["update_version"].asString();
mNewChannel = download_info["update_channel"].asString();
mUpdateDownloader.resume();
result = true;
}
else
{
// The viewer that started this download is not the same as this viewer; ignore.
llinfos << "ignoring partial download from different viewer version" << llendl;
LL_INFOS("UpdaterService") << "ignoring partial download from different viewer version" << LL_ENDL;;
std::string path = download_info["path"].asString();
if(!path.empty()) LLFile::remove(path);
if(!path.empty())
{
LLFile::remove(path);
}
LLFile::remove(download_marker_path);
}
}
@ -366,36 +402,43 @@ void LLUpdaterServiceImpl::error(std::string const & message)
}
}
void LLUpdaterServiceImpl::optionalUpdate(std::string const & newVersion,
LLURI const & uri,
std::string const & hash)
// A successful response was received from the viewer version manager
void LLUpdaterServiceImpl::response(LLSD const & content)
{
stopTimer();
mNewVersion = newVersion;
mIsDownloading = true;
setState(LLUpdaterService::DOWNLOADING);
mUpdateDownloader.download(uri, hash, newVersion, false);
}
void LLUpdaterServiceImpl::requiredUpdate(std::string const & newVersion,
LLURI const & uri,
std::string const & hash)
{
stopTimer();
mNewVersion = newVersion;
mIsDownloading = true;
setState(LLUpdaterService::DOWNLOADING);
mUpdateDownloader.download(uri, hash, newVersion, true);
}
void LLUpdaterServiceImpl::upToDate(void)
{
if(mIsChecking)
if(!content.asBoolean()) // an empty response means "no update"
{
restartTimer(mCheckPeriod);
}
LL_INFOS("UpdaterService") << "up to date" << LL_ENDL;
if(mIsChecking)
{
restartTimer(mCheckPeriod);
}
setState(LLUpdaterService::UP_TO_DATE);
setState(LLUpdaterService::UP_TO_DATE);
}
else
{
// there is an update available...
stopTimer();
mNewChannel = content["channel"].asString();
if (mNewChannel.empty())
{
LL_INFOS("UpdaterService") << "no channel supplied, assuming current channel" << LL_ENDL;
mNewChannel = mChannel;
}
mNewVersion = content["version"].asString();
mIsDownloading = true;
setState(LLUpdaterService::DOWNLOADING);
BOOL required = content["required"].asBoolean();
LLURI url(content["url"].asString());
std::string more_info = content["more_info"].asString();
LL_DEBUGS("UpdaterService")
<< "Starting download of "
<< ( required ? "required" : "optional" ) << " update"
<< " to channel '" << mNewChannel << "' version " << mNewVersion
<< " more info '" << more_info << "'"
<< LL_ENDL;
mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required);
}
}
void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
@ -413,9 +456,19 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
payload["type"] = LLSD(LLUpdaterService::DOWNLOAD_COMPLETE);
payload["required"] = data["required"];
payload["version"] = mNewVersion;
payload["channel"] = mNewChannel;
payload["info_url"] = data["info_url"];
event["payload"] = payload;
LL_DEBUGS("UpdaterService")
<< "Download complete "
<< ( data["required"].asBoolean() ? "required" : "optional" )
<< " channel " << mNewChannel
<< " version " << mNewVersion
<< " info " << data["info_url"].asString()
<< LL_ENDL;
LLEventPumps::instance().obtain("mainlooprepeater").post(event);
setState(LLUpdaterService::TERMINAL);
}
@ -489,15 +542,18 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
// Check for failed install.
if(LLFile::isfile(ll_install_failed_marker_path()))
{
LL_DEBUGS("UpdaterService") << "found marker " << ll_install_failed_marker_path() << LL_ENDL;;
int requiredValue = 0;
{
llifstream stream(ll_install_failed_marker_path());
stream >> requiredValue;
if(stream.fail()) requiredValue = 0;
if(stream.fail())
{
requiredValue = 0;
}
}
// TODO: notify the user.
llinfos << "found marker " << ll_install_failed_marker_path() << llendl;
llinfos << "last install attempt failed" << llendl;
LL_WARNS("UpdaterService") << "last install attempt failed" << LL_ENDL;;
LLFile::remove(ll_install_failed_marker_path());
LLSD event;
@ -509,7 +565,7 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
}
else
{
mUpdateChecker.checkVersion(mProtocolVersion, mUrl, mPath, mChannel, mVersion);
mUpdateChecker.checkVersion(mUrl, mPath, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
setState(LLUpdaterService::CHECKING_FOR_UPDATE);
}
}
@ -554,13 +610,17 @@ LLUpdaterService::~LLUpdaterService()
{
}
void LLUpdaterService::initialize(const std::string& protocol_version,
const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version)
void LLUpdaterService::initialize(const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
const unsigned char uniqueid[MD5HEX_STR_SIZE],
const bool& willing_to_test
)
{
mImpl->initialize(protocol_version, url, path, channel, version);
mImpl->initialize(url, path, channel, version, platform, platform_version, uniqueid, willing_to_test);
}
void LLUpdaterService::setCheckPeriod(unsigned int seconds)
@ -609,10 +669,10 @@ std::string const & ll_get_version(void) {
if (version.empty()) {
std::ostringstream stream;
stream << LL_VERSION_MAJOR << "."
<< LL_VERSION_MINOR << "."
<< LL_VERSION_PATCH << "."
<< LL_VERSION_BUILD;
stream << LL_VIEWER_VERSION_MAJOR << "."
<< LL_VIEWER_VERSION_MINOR << "."
<< LL_VIEWER_VERSION_PATCH << "."
<< LL_VIEWER_VERSION_BUILD;
version = stream.str();
}

View File

@ -28,6 +28,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include "llhasheduniqueid.h"
class LLUpdaterServiceImpl;
@ -70,11 +71,15 @@ public:
LLUpdaterService();
~LLUpdaterService();
void initialize(const std::string& protocol_version,
const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version);
void initialize(const std::string& url,
const std::string& path,
const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
const unsigned char uniqueid[MD5HEX_STR_SIZE],
const bool& willing_to_test
);
void setCheckPeriod(unsigned int seconds);
void setBandwidthLimit(U64 bytesPerSecond);

View File

@ -0,0 +1,133 @@
#!/usr/bin/python
"""\
@file janitor.py
@author Nat Goodspeed
@date 2011-09-14
@brief Janitor class to clean up arbitrary resources
2013-01-04 cloned from vita because it's exactly what update_install.py needs.
$LicenseInfo:firstyear=2011&license=viewerlgpl$
Copyright (c) 2011, Linden Research, Inc.
$/LicenseInfo$
"""
import sys
import functools
import itertools
class Janitor(object):
"""
Usage:
Basic:
self.janitor = Janitor(sys.stdout) # report cleanup actions on stdout
...
self.janitor.later(os.remove, some_temp_file)
self.janitor.later(os.remove, some_other_file)
...
self.janitor.cleanup() # perform cleanup actions
Context Manager:
with Janitor() as janitor: # clean up quietly
...
janitor.later(shutil.rmtree, some_temp_directory)
...
# exiting 'with' block performs cleanup
Test Class:
class TestMySoftware(unittest.TestCase, Janitor):
def __init__(self):
Janitor.__init__(self) # quiet cleanup
...
def setUp(self):
...
self.later(os.rename, saved_file, original_location)
...
def tearDown(self):
Janitor.tearDown(self) # calls cleanup()
...
# Or, if you have no other tearDown() logic for
# TestMySoftware, you can omit the TestMySoftware.tearDown()
# def entirely and let it inherit Janitor.tearDown().
"""
def __init__(self, stream=None):
"""
If you pass stream= (e.g.) sys.stdout or sys.stderr, Janitor will
report its cleanup operations as it performs them. If you don't, it
will perform them quietly -- unless one or more of the actions throws
an exception, in which case you'll get output on stderr.
"""
self.stream = stream
self.cleanups = []
def later(self, func, *args, **kwds):
"""
Pass the callable you want to call at cleanup() time, plus any
positional or keyword args you want to pass it.
"""
# Get a name string for 'func'
try:
# A free function has a __name__
name = func.__name__
except AttributeError:
try:
# A class object (even builtin objects like ints!) support
# __class__.__name__
name = func.__class__.__name__
except AttributeError:
# Shrug! Just use repr() to get a string describing this func.
name = repr(func)
# Construct a description of this operation in Python syntax from
# args, kwds.
desc = "%s(%s)" % \
(name, ", ".join(itertools.chain((repr(a) for a in args),
("%s=%r" % (k, v) for (k, v) in kwds.iteritems()))))
# Use functools.partial() to bind passed args and keywords to the
# passed func so we get a nullary callable that does what caller
# wants.
bound = functools.partial(func, *args, **kwds)
self.cleanups.append((desc, bound))
def cleanup(self):
"""
Perform all the actions saved with later() calls.
"""
# Typically one allocates resource A, then allocates resource B that
# depends on it. In such a scenario it's appropriate to delete B
# before A -- so perform cleanup actions in reverse order. (This is
# the same strategy used by atexit().)
while self.cleanups:
# Until our list is empty, pop the last pair.
desc, bound = self.cleanups.pop(-1)
# If requested, report the action.
if self.stream is not None:
print >>self.stream, desc
try:
# Call the bound callable
bound()
except Exception, err:
# This is cleanup. Report the problem but continue.
print >>(self.stream or sys.stderr), "Calling %s\nraised %s: %s" % \
(desc, err.__class__.__name__, err)
def tearDown(self):
"""
If a unittest.TestCase subclass (or a nose test class) adds Janitor as
one of its base classes, and has no other tearDown() logic, let it
inherit Janitor.tearDown().
"""
self.cleanup()
def __enter__(self):
return self
def __exit__(self, type, value, tb):
# Perform cleanup no matter how we exit this 'with' statement
self.cleanup()
# Propagate any exception from the 'with' statement, don't swallow it
return False

Some files were not shown because too many files have changed in this diff Show More