diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-05-22 21:30:26 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-05-22 21:30:26 -0400 |
commit | fe64db61d6f10a9b31191090e2318aebc2d53b29 (patch) | |
tree | 635d4a6bee25c1e4ef55421f147e9e06bf5faeb3 /indra/newview | |
parent | 48af8529a80052e9bc42f81f36896739f8aff861 (diff) | |
parent | b92ab8f7e659de66140cc6f538c74c1fc81e6a73 (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/newview')
69 files changed, 904 insertions, 825 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b4e930d062..e54c81991c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -13,7 +13,6 @@ include(DragDrop) include(EXPAT) include(FMODEX) include(GLOD) -include(GooglePerfTools) include(Hunspell) include(JsonCpp) include(LLAppearance) @@ -1439,7 +1438,7 @@ if (WINDOWS) set(ICON_PATH "project") set(VIEWER_MACOSX_PHASE "a") endif() - message("Copying icons for ${ICON_PATH}") + message(STATUS "Copying icons for ${ICON_PATH}") execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_PATH}/secondlife.ico" @@ -1690,7 +1689,7 @@ if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES # *TODO -reenable this once we get server usage sorted out - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) @@ -1710,20 +1709,8 @@ if (WINDOWS) # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py # and have the build deps get tracked *please* tell me about it. - if(USE_TCMALLOC) - # Configure a var for tcmalloc location, if used. - # Note the need to specify multiple names explicitly. - set(GOOGLE_PERF_TOOLS_SOURCE - ${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll - ${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll - ) - endif(USE_TCMALLOC) - - set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. - #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll @@ -1762,10 +1749,11 @@ if (WINDOWS) ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll + ${viewer_APPSETTINGS_FILES} SLPlugin - media_plugin_quicktime media_plugin_cef media_plugin_libvlc + media_plugin_example winmm_shim windows-crash-logger ) @@ -1791,7 +1779,7 @@ if (WINDOWS) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} --grid=${GRID} - --channel=${VIEWER_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}/copy_touched.bat @@ -1854,7 +1842,7 @@ if (WINDOWS) --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} @@ -1965,7 +1953,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLLOGIN_LIBRARIES} ${LLPHYSICS_LIBRARIES} ${LLPHYSICSEXTENSIONS_LIBRARIES} - ${TCMALLOC_LIBRARIES} ${LLAPPEARANCE_LIBRARIES} ) @@ -1994,7 +1981,7 @@ if (LINUX) --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged @@ -2022,7 +2009,7 @@ if (LINUX) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged --grid=${GRID} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS @@ -2081,7 +2068,7 @@ if (DARWIN) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --grid=${GRID} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS @@ -2089,7 +2076,7 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_libvlc media_plugin_cef mac-crash-logger) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef mac-crash-logger) add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger) if (ENABLE_SIGNING) @@ -2110,11 +2097,10 @@ if (DARWIN) --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --channel=${VIEWER_CHANNEL} --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --grid=${GRID} - --channel=${VIEWER_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 @@ -2131,9 +2117,10 @@ endif (INSTALL) if (PACKAGE) set(SYMBOL_SEARCH_DIRS "") + # Note that the path to VIEWER_SYMBOL_FILE must match that in ../../build.sh if (WINDOWS) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") - set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows.tar.bz2") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") # slplugin.exe failing symbols dump - need to debug, might have to do with updated version of google breakpad # set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX} slplugin.exe") set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX}") @@ -2146,15 +2133,14 @@ if (PACKAGE) 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}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") - list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") - set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") set(VIEWER_EXE_GLOBS "'Second Life' mac-crash-logger") set(VIEWER_LIB_GLOB "*.dylib") endif (DARWIN) if (LINUX) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") - set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index c20c645d7e..831446cbd2 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -5.0.6 +5.1.0 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f490551406..de31425c27 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2044,11 +2044,11 @@ <key>Comment</key> <string>Size (in bytes) for each coroutine stack</string> <key>Persist</key> - <integer>0</integer> + <integer>1</integer> <key>Type</key> <string>S32</string> <key>Value</key> - <integer>262144</integer> + <integer>524288</integer> </map> <key>CrashOnStartup</key> <map> @@ -6419,17 +6419,6 @@ <key>Value</key> <integer>512</integer> </map> - <key>MemProfiling</key> - <map> - <key>Comment</key> - <string>You want to use tcmalloc's memory profiling options.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>MenuAccessKeyTime</key> <map> <key>Comment</key> @@ -10133,28 +10122,28 @@ <key>Value</key> <integer>0</integer> </map> - <key>RenderUseFarClip</key> - <map> - <key>Comment</key> - <string>If false, frustum culling will ignore far clip plane.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>RenderUseImpostors</key> - <map> - <key>Comment</key> + <key>RenderUseFarClip</key> + <map> + <key>Comment</key> + <string>If false, frustum culling will ignore far clip plane.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>RenderUseImpostors</key> + <map> + <key>Comment</key> <string>OBSOLETE and UNUSED. See RenderAvatarMaxNonImpostors and RenderAvatarMaxComplexity.</string> - <key>Persist</key> + <key>Persist</key> <integer>0</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> <integer>0</integer> - </map> + </map> <key>RenderAutoMuteByteLimit</key> <map> <key>Comment</key> diff --git a/indra/newview/installers/darwin/fix_application_icon_position.sh b/indra/newview/installers/darwin/fix_application_icon_position.sh index 618e34820c..62abcdd07e 100755 --- a/indra/newview/installers/darwin/fix_application_icon_position.sh +++ b/indra/newview/installers/darwin/fix_application_icon_position.sh @@ -1,17 +1,23 @@ -# just run this script each time after you change the installer's name to fix the icon misalignment #!/bin/bash -cp -r ../../../../build-darwin-i386/newview/*.dmg ~/Desktop/TempBuild.dmg -hdid ~/Desktop/TempBuild.dmg -open -a finder /Volumes/Second\ Life\ Installer -osascript dmg-cleanup.applescript -umount /Volumes/Second\ Life\ Installer/ -hdid ~/Desktop/TempBuild.dmg -open -a finder /Volumes/Second\ Life\ Installer -#cp /Volumes/Second\ Life\ Installer/.DS_Store ~/Desktop/_DS_Store +# just run this script each time after you change the installer's name to fix the icon misalignment +mydir="$(dirname "$0")" +# If there's more than one DMG in more than one build directory, pick the most +# recent one. +dmgfile="$(ls -t "$mydir/../../../../build-darwin-*/newview/*.dmg" | head -n 1)" +dmgwork="$HOME/Desktop/TempBuild.dmg" +mounted="/Volumes/Second Life Installer" +cp -r "$dmgfile" "$dmgwork" +hdid "$dmgwork" +open -a finder "$mounted" +osascript "$mydir/dmg-cleanup.applescript" +umount "$mounted"/ +hdid "$dmgwork" +open -a finder "$mounted" +#cp "$mounted"/.DS_Store ~/Desktop/_DS_Store #chflags nohidden ~/Desktop/_DS_Store -#cp ~/Desktop/_DS_Store ./firstlook-dmg/_DS_Store -#cp ~/Desktop/_DS_Store ./publicnightly-dmg/_DS_Store -#cp ~/Desktop/_DS_Store ./release-dmg/_DS_Store -#cp ~/Desktop/_DS_Store ./releasecandidate-dmg/_DS_Store -#umount /Volumes/Second\ Life\ Installer/ -#rm ~/Desktop/_DS_Store ~/Desktop/TempBuild.dmg +#cp ~/Desktop/_DS_Store "$mydir/firstlook-dmg/_DS_Store" +#cp ~/Desktop/_DS_Store "$mydir/publicnightly-dmg/_DS_Store" +#cp ~/Desktop/_DS_Store "$mydir/release-dmg/_DS_Store" +#cp ~/Desktop/_DS_Store "$mydir/releasecandidate-dmg/_DS_Store" +#umount "$mounted"/ +#rm ~/Desktop/_DS_Store "$dmgwork" diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 89317f2793..71a33a0dc0 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -90,8 +90,11 @@ InstProgressFlags smooth colored # New colored smooth look SetOverwrite on # Overwrite files by default
AutoCloseWindow true # After all files install, close window
-InstallDir "$PROGRAMFILES\${INSTNAME}"
-InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
+# initial location of install (default when not already installed)
+# note: Now we defer looking for existing install until onInit when we
+# are able to engage the 32/64 registry function
+InstallDir "%%PROGRAMFILES%%\${INSTNAME}"
+
UninstallText $(UninstallTextMsg)
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
Page directory dirPre
@@ -118,6 +121,8 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !insertmacro GetParameters
!insertmacro GetOptions
!include WinVer.nsh # For OS and SP detection
+!include 'LogicLib.nsh' # for value comparison
+!include "x64.nsh" # for 64bit detection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Pre-directory page callback
@@ -136,6 +141,21 @@ FunctionEnd ;; entry to the language ID selector below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInit
+
+%%ENGAGEREGISTRY%%
+
+# read the current location of the install for this version
+# if $0 is empty, this is the first time for this viewer name
+ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\\Linden Research, Inc.\\${INSTNAME}" ""
+
+# viewer with this name not installed before
+${If} $0 == ""
+ # nothing to do here
+${Else}
+ # use the value we got from registry as install location
+ StrCpy $INSTDIR $0
+${EndIf}
+
Call CheckCPUFlags # Make sure we have SSE2 support
Call CheckWindowsVersion # Don't install On unsupported systems
Push $0
@@ -194,6 +214,9 @@ FunctionEnd ;; Prep Uninstaller Section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.onInit
+
+%%ENGAGEREGISTRY%%
+
# Read language from registry and set for uninstaller. Key will be removed on successful uninstall
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
IfErrors lbl_end
@@ -318,6 +341,10 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}"
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB
+
+# from FS:Ansariel
+WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayIcon" '"$INSTDIR\$INSTEXE"'
+
# BUG-2707 Disable SEHOP for installed viewer.
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1
@@ -559,7 +586,7 @@ FunctionEnd Function RemoveProgFilesOnInst
# Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575
-Delete "$INSTDIR\SecondLife.exe"
+Delete "$INSTDIR\$INSTEXE"
# Remove old shader files first so fallbacks will work. See DEV-5663
RMDir /r "$INSTDIR\app_settings\shaders"
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 8188c6c3f9..aebae4c434 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -97,7 +97,7 @@ callWindowUnhide(); } -- (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender +- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender { // run one frame to assess state if (!pumpMainLoop()) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f53ba01d37..a26ee2204b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -125,10 +125,8 @@ #include "llcoros.h" #include "llexception.h" #if !LL_LINUX -#include "cef/llceflib.h" -#if LL_WINDOWS +#include "cef/dullahan.h" #include "vlc/libvlc_version.h" -#endif // LL_WINDOWS #endif // LL_LINUX // Third party library includes @@ -334,10 +332,10 @@ BOOL gDisconnected = FALSE; // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; -BOOL gUseWireframe = FALSE; +bool gUseWireframe = FALSE; //use for remember deferred mode in wireframe switch -BOOL gInitialDeferredModeForWireframe = FALSE; +bool gInitialDeferredModeForWireframe = FALSE; // VFS globals - see llappviewer.h LLVFS* gStaticVFS = NULL; @@ -740,10 +738,7 @@ LLAppViewer::LLAppViewer() LLAppViewer::~LLAppViewer() { delete mSettingsLocationList; - LLViewerEventRecorder::deleteSingleton(); - LLLoginInstance::instance().setUpdaterService(0); - destroyMainloopTimeout(); // If we got to this destructor somehow, the app didn't hang. @@ -1104,7 +1099,7 @@ bool LLAppViewer::init() minSpecs += "\n"; unsupported = true; } - if(gSysMemory.getPhysicalMemoryClamped() < minRAM) + if(gSysMemory.getPhysicalMemoryKB() < minRAM) { minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM"); minSpecs += "\n"; @@ -2112,20 +2107,15 @@ bool LLAppViewer::cleanup() // realtime, or might throw an exception. LLSingletonBase::cleanupAll(); + // The logging subsystem depends on an LLSingleton. Any logging after + // LLSingletonBase::deleteAll() won't be recorded. + LL_INFOS() << "Goodbye!" << LL_ENDL; + // This calls every remaining LLSingleton's deleteSingleton() method. // No class destructor should perform any cleanup that might take // significant realtime, or throw an exception. - // LLSingleton machinery includes a last-gasp implicit deleteAll() call, - // so this explicit call shouldn't strictly be necessary. However, by the - // time the runtime engages that implicit call, it may already have - // destroyed things like std::cerr -- so the implicit deleteAll() refrains - // from logging anything. Since both cleanupAll() and deleteAll() call - // their respective cleanup methods in computed dependency order, it's - // probably useful to be able to log that order. LLSingletonBase::deleteAll(); - LL_INFOS() << "Goodbye!" << LL_ENDL; - removeDumpDir(); // return 0; @@ -3114,7 +3104,12 @@ void LLAppViewer::initUpdater() mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this)); mUpdater->initialize(channel, version, +// DRTVWR-418 transitional: query using "win64" until VMP is in place +#if LL_WINDOWS && (ADDRESS_SIZE == 64) + "win64", +#else gPlatform, +#endif getOSInfo().getOSVersionString(), unique_id, willing_to_test @@ -3301,6 +3296,7 @@ LLSD LLAppViewer::getViewerInfo() const info["VIEWER_VERSION"] = version; info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); info["CHANNEL"] = LLVersionInfo::getChannel(); + info["ADDRESS_SIZE"] = ADDRESS_SIZE; std::string build_config = LLVersionInfo::getBuildConfig(); if (build_config != "Release") { @@ -3392,20 +3388,33 @@ LLSD LLAppViewer::getViewerInfo() const } #if !LL_LINUX - info["LLCEFLIB_VERSION"] = LLCEFLIB_VERSION; -#else - info["LLCEFLIB_VERSION"] = "Undefined"; + std::ostringstream cef_ver_codec; + cef_ver_codec << "Dullahan: "; + cef_ver_codec << DULLAHAN_VERSION_MAJOR; + cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_MINOR; + cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_BUILD; + + cef_ver_codec << " / CEF: "; + cef_ver_codec << CEF_VERSION; + cef_ver_codec << " / Chrome: "; + cef_ver_codec << CHROME_VERSION_MAJOR; + + info["LIBCEF_VERSION"] = cef_ver_codec.str(); +#else + info["LIBCEF_VERSION"] = "Undefined"; #endif -#if LL_WINDOWS - std::ostringstream ver_codec; - ver_codec << LIBVLC_VERSION_MAJOR; - ver_codec << "."; - ver_codec << LIBVLC_VERSION_MINOR; - ver_codec << "."; - ver_codec << LIBVLC_VERSION_REVISION; - info["LIBVLC_VERSION"] = ver_codec.str(); +#if !LL_LINUX + std::ostringstream vlc_ver_codec; + vlc_ver_codec << LIBVLC_VERSION_MAJOR; + vlc_ver_codec << "."; + vlc_ver_codec << LIBVLC_VERSION_MINOR; + vlc_ver_codec << "."; + vlc_ver_codec << LIBVLC_VERSION_REVISION; + info["LIBVLC_VERSION"] = vlc_ver_codec.str(); #else info["LIBVLC_VERSION"] = "Undefined"; #endif @@ -3732,11 +3741,10 @@ void LLAppViewer::handleViewerCrash() { gDebugInfo["Dynamic"]["ParcelMediaURL"] = parcel->getMediaURL(); } - - + gDebugInfo["Dynamic"]["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds()); - gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = (LLSD::Integer) LLMemory::getCurrentRSS() >> 10; - + gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = LLSD::Integer(LLMemory::getCurrentRSS() / 1024); + if(gLogoutInProgress) { gDebugInfo["Dynamic"]["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 7bb3c32c51..16a00c8cee 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -389,8 +389,8 @@ extern BOOL gDisconnected; extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; -extern BOOL gUseWireframe; -extern BOOL gInitialDeferredModeForWireframe; +extern bool gUseWireframe; +extern bool gInitialDeferredModeForWireframe; // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 4fe1e31668..d472f8926b 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -260,7 +260,7 @@ bool LLAppViewerMacOSX::restoreErrorTrap() unsigned int reset_count = 0; #define SET_SIG(S) sigaction(SIGABRT, &act, &old_act); \ - if((unsigned int)act.sa_sigaction != (unsigned int) old_act.sa_sigaction) \ + if(act.sa_sigaction != old_act.sa_sigaction) \ ++reset_count; // Synchronous signals SET_SIG(SIGABRT) @@ -302,7 +302,8 @@ void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze) std::string appname = gDirUtilp->getExecutableFilename(); std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() }; std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) ); - LL_WARNS() << "about to launch mac-crash-logger" << pid_str << " " << logdir << " " << appname << LL_ENDL; + LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str() + << " " << logdir << " " << appname << LL_ENDL; launchApplication(&command_str, &args); } diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 5107030476..d6039f6d7f 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -502,7 +502,8 @@ bool LLAppViewerWin32::init() disableWinErrorReporting(); #ifndef LL_RELEASE_FOR_DOWNLOAD - LLWinDebug::instance().init(); + // Merely requesting the LLSingleton instance initializes it. + LLWinDebug::instance(); #endif #if LL_WINDOWS @@ -526,10 +527,6 @@ bool LLAppViewerWin32::cleanup() gDXHardware.cleanup(); -#ifndef LL_RELEASE_FOR_DOWNLOAD - LLWinDebug::instance().cleanup(); -#endif - if (mIsConsoleAllocated) { FreeConsole(); diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index 12c3070474..fa1c3b983e 100644 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -35,6 +35,22 @@ #include "llwaterparammanager.h" #include "llwlhandlers.h" #include "llwlparammanager.h" +#include "lltrans.h" + +std::string LLWLParamKey::toString() const +{ + switch (scope) + { + case SCOPE_LOCAL: + return name + std::string(" (") + LLTrans::getString("Local") + std::string(")"); + break; + case SCOPE_REGION: + return name + std::string(" (") + LLTrans::getString("Region") + std::string(")"); + break; + default: + return name + " (?)"; + } +} std::string LLEnvPrefs::getWaterPresetName() const { diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h index 6a0a267f4e..54bbf85e86 100644 --- a/indra/newview/llenvmanager.h +++ b/indra/newview/llenvmanager.h @@ -48,6 +48,87 @@ public: } EScope; }; +struct LLWLParamKey : LLEnvKey +{ +public: + // scope and source of a param set (WL sky preset) + std::string name; + EScope scope; + + // for conversion from LLSD + static const int NAME_IDX = 0; + static const int SCOPE_IDX = 1; + + inline LLWLParamKey(const std::string& n, EScope s) + : name(n), scope(s) + { + } + + inline LLWLParamKey(LLSD llsd) + : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger())) + { + } + + inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort + : name(""), scope(SCOPE_LOCAL) + { + } + + inline LLWLParamKey(std::string& stringVal) + { + size_t len = stringVal.length(); + if (len > 0) + { + name = stringVal.substr(0, len - 1); + scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str()); + } + } + + inline std::string toStringVal() const + { + std::stringstream str; + str << name << scope; + return str.str(); + } + + inline LLSD toLLSD() const + { + LLSD llsd = LLSD::emptyArray(); + llsd.append(LLSD(name)); + llsd.append(LLSD(scope)); + return llsd; + } + + inline void fromLLSD(const LLSD& llsd) + { + name = llsd[NAME_IDX].asString(); + scope = EScope(llsd[SCOPE_IDX].asInteger()); + } + + inline bool operator <(const LLWLParamKey other) const + { + if (name < other.name) + { + return true; + } + else if (name > other.name) + { + return false; + } + else + { + return scope < other.scope; + } + } + + inline bool operator ==(const LLWLParamKey other) const + { + return (name == other.name) && (scope == other.scope); + } + + std::string toString() const; +}; + class LLEnvironmentSettings { public: diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3d5e2d356e..50a4925c37 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2133,7 +2133,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLVector4a src; U32 vec[4]; - vec[0] = vec[1] = vec[2] = vec[3] = color.mAll; + vec[0] = vec[1] = vec[2] = vec[3] = color.asRGBA(); src.loadua((F32*) vec); @@ -2169,7 +2169,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLColor4U glow4u = LLColor4U(0,0,0,glow); - U32 glow32 = glow4u.mAll; + U32 glow32 = glow4u.asRGBA(); U32 vec[4]; vec[0] = vec[1] = vec[2] = vec[3] = glow32; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index d4ba230feb..ad048f6668 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -789,7 +789,7 @@ void LLFeatureManager::applyBaseMasks() maskFeatures(gpustr); // now mask cpu type ones - if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256)) + if (gSysMemory.getPhysicalMemoryKB() <= U32Megabytes(256)) { maskFeatures("RAM256MB"); } diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 316294a477..cf38a00499 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -66,13 +66,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) std::string name = check->getName(); if(name == "touch_only") { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); + LLPipeline::toggleRenderScriptedTouchBeacons(); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. if ( - LLPipeline::getRenderScriptedTouchBeacons(NULL) && - LLPipeline::getRenderScriptedBeacons(NULL) ) + LLPipeline::getRenderScriptedTouchBeacons() && + LLPipeline::getRenderScriptedBeacons() ) { - LLPipeline::setRenderScriptedBeacons(FALSE); + LLPipeline::setRenderScriptedBeacons(false); getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE)); getChild<LLCheckBoxCtrl>("scripted")->setValue(FALSE); getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline @@ -81,13 +81,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) } else if(name == "scripted") { - LLPipeline::toggleRenderScriptedBeacons(NULL); + LLPipeline::toggleRenderScriptedBeacons(); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. if ( - LLPipeline::getRenderScriptedTouchBeacons(NULL) && - LLPipeline::getRenderScriptedBeacons(NULL) ) + LLPipeline::getRenderScriptedTouchBeacons() && + LLPipeline::getRenderScriptedBeacons() ) { - LLPipeline::setRenderScriptedTouchBeacons(FALSE); + LLPipeline::setRenderScriptedTouchBeacons(false); getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE)); getChild<LLCheckBoxCtrl>("touch_only")->setValue(FALSE); getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline @@ -100,13 +100,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) else if(name == "moapbeacon") LLPipeline::setRenderMOAPBeacons(check->get()); else if(name == "highlights") { - LLPipeline::toggleRenderHighlights(NULL); + LLPipeline::toggleRenderHighlights(); // Don't allow both to be OFF at the same time. Toggle the other one on if both now off. if ( - !LLPipeline::getRenderBeacons(NULL) && - !LLPipeline::getRenderHighlights(NULL) ) + !LLPipeline::getRenderBeacons() && + !LLPipeline::getRenderHighlights() ) { - LLPipeline::setRenderBeacons(TRUE); + LLPipeline::setRenderBeacons(true); getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE)); getChild<LLCheckBoxCtrl>("beacons")->setValue(TRUE); getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline @@ -115,13 +115,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) } else if(name == "beacons") { - LLPipeline::toggleRenderBeacons(NULL); + LLPipeline::toggleRenderBeacons(); // Don't allow both to be OFF at the same time. Toggle the other one on if both now off. if ( - !LLPipeline::getRenderBeacons(NULL) && - !LLPipeline::getRenderHighlights(NULL) ) + !LLPipeline::getRenderBeacons() && + !LLPipeline::getRenderHighlights() ) { - LLPipeline::setRenderHighlights(TRUE); + LLPipeline::setRenderHighlights(true); getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE)); getChild<LLCheckBoxCtrl>("highlights")->setValue(TRUE); getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 957c91b226..33e4c7cd5f 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -184,7 +184,7 @@ void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y) std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar"; mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg)); - mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID)); + mPopupMenu->setItemEnabled(std::string("Zoom In"), bool(gObjectList.findObject(mItemUUID))); ((LLContextMenu*)mPopupMenu)->show(x, y); LLMenuGL::showPopup(ctrl, mPopupMenu, x, y); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 7895a5ff48..7bf4516d8c 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -282,7 +282,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked() LLFloaterIMSessionTab::onTearOffClicked(); // see CHUI-170: Save torn-off state of the nearby chat between sessions - BOOL in_the_multifloater = (BOOL)getHost(); + bool in_the_multifloater(getHost()); gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); } diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 333ff863e5..fc2da772f3 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -119,7 +119,7 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask) LLVector3d pos_global = mMap->viewPosToGlobal(x, y); - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); if (world_map) { diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index c0bd9b1c23..83f268818e 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -558,7 +558,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string& } else { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } setDefaultBtn("Teleport"); } @@ -602,7 +602,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) } else { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } setDefaultBtn("Teleport"); } @@ -628,7 +628,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) if (!sim_info) { // We haven't found a region for that point yet, leave the tracking to the world map - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); LLWorldMap::getInstance()->setTracking(pos_global); S32 world_x = S32(pos_global.mdV[0] / 256); S32 world_y = S32(pos_global.mdV[1] / 256); @@ -644,7 +644,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) { // Down region. Show the blue circle of death! // i.e. let the world map that this and tell it it's invalid - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); LLWorldMap::getInstance()->setTracking(pos_global); LLWorldMap::getInstance()->setTrackingInvalid(); setDefaultBtn(""); @@ -863,7 +863,7 @@ void LLFloaterWorldMap::friendsChanged() (buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) || gAgent.isGodlike()) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } } } @@ -1070,7 +1070,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( ) if( current_choice.isNull() || !list->setCurrentByID( current_choice ) ) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } } @@ -1080,7 +1080,7 @@ void LLFloaterWorldMap::onComboTextEntry() // Reset the tracking whenever we start typing into any of the search fields, // so that hitting <enter> does an auto-complete versus teleporting us to the // previously selected landmark/friend. - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } void LLFloaterWorldMap::onSearchTextEntry( ) @@ -1103,7 +1103,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit() LLUUID asset_id; LLUUID item_id = list->getCurrentID(); - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); //RN: stopTracking() clears current combobox selection, need to reassert it here list->setCurrentByID(item_id); @@ -1158,7 +1158,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( ) if( !list->setCurrentByID( current_choice ) || current_choice.isNull() ) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } } @@ -1271,7 +1271,7 @@ void LLFloaterWorldMap::onCoordinatesCommit() void LLFloaterWorldMap::onClearBtn() { mTrackedStatus = LLTracker::TRACKING_NOTHING; - LLTracker::stopTracking((void *)(intptr_t)TRUE); + LLTracker::stopTracking(true); LLWorldMap::getInstance()->cancelTracking(); mSLURL = LLSLURL(); // Clear the SLURL since it's invalid mSetToUserPosition = TRUE; // Revert back to the current user position diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 5abd99d36f..c535fc1cdf 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -951,7 +951,7 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params //possibly a case of complex object names consisting of 3+ words if (!has_name) { - U32 divider_pos = stuff.find(NAME_TEXT_DIVIDER); + std::string::size_type divider_pos = stuff.find(NAME_TEXT_DIVIDER); if (divider_pos != std::string::npos && divider_pos < (stuff.length() - NAME_TEXT_DIVIDER.length())) { im[LL_IM_FROM] = LLURI::unescape(stuff.substr(0, divider_pos)); diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index b4d0bb6823..a49a9ca840 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -606,6 +606,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia request_params["channel"] = LLVersionInfo::getChannel(); request_params["platform"] = mPlatform; request_params["platform_version"] = mPlatformVersion; + request_params["address_size"] = ADDRESS_SIZE; request_params["id0"] = mSerialNumber; request_params["host_id"] = gSavedSettings.getString("HostID"); request_params["extended_errors"] = true; // request message_id and message_args diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index f996557c17..ccbe13fb50 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -531,7 +531,7 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content) LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL; for (LLSD::array_const_iterator faceIter = response_data.beginArray(); faceIter != response_data.endArray(); ++faceIter) { -# ifndef LL_RELEASE_FOR_DOWNLOAD +# ifdef SHOW_ASSERT // same condition that controls llassert() const LLSD& face_data = *faceIter; // conditional to avoid unused variable warning # endif llassert(face_data.isMap()); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 5fc73c67d1..248c361ca4 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -735,7 +735,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = px + py * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } // top line @@ -748,7 +748,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = px + py * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } } else @@ -770,7 +770,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = p_x + p_y * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } } } @@ -988,6 +988,6 @@ void LLNetMap::handleStopTracking (const LLSD& userdata) if (mPopupMenu) { mPopupMenu->setItemEnabled ("Stop Tracking", false); - LLTracker::stopTracking ((void*)LLTracker::isTracking(NULL)); + LLTracker::stopTracking (LLTracker::isTracking(NULL)); } } diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 32ec4930ab..0fdb9a57f3 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -39,6 +39,8 @@ #include "llagent.h" #include "lltextbox.h" #include "lltrans.h" +#include "llsdutil.h" +#include <boost/foreach.hpp> static LLPanelInjector<LLPanelExperienceListEditor> t_panel_experience_list_editor("panel_experience_list_editor"); @@ -94,7 +96,12 @@ void LLPanelExperienceListEditor::addExperienceIds( const uuid_vec_t& experience void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids ) { mExperienceIds.clear(); - mExperienceIds.insert(experience_ids.beginArray(), experience_ids.endArray()); + BOOST_FOREACH(LLSD uuid, llsd::inArray(experience_ids)) + { + // Using insert(range) doesn't work here because the conversion from + // LLSD to LLUUID is ambiguous: have to specify asUUID() for each entry. + mExperienceIds.insert(uuid.asUUID()); + } onItems(); } diff --git a/indra/newview/llparcelselection.cpp b/indra/newview/llparcelselection.cpp index 4d1901adc9..5c62159b93 100644 --- a/indra/newview/llparcelselection.cpp +++ b/indra/newview/llparcelselection.cpp @@ -31,13 +31,6 @@ #include "llparcel.h" -// static -LLPointer<LLParcelSelection> LLParcelSelection::sNullSelection; - -template<> - const LLSafeHandle<LLParcelSelection>::NullFunc - LLSafeHandle<LLParcelSelection>::sNullFunc = LLParcelSelection::getNullParcelSelection; - // // LLParcelSelection // @@ -87,14 +80,3 @@ bool LLParcelSelection::hasOthersSelected() const { return mSelectedOtherCount != 0; } - -// static -LLParcelSelection* LLParcelSelection::getNullParcelSelection() -{ - if (sNullSelection.isNull()) - { - sNullSelection = new LLParcelSelection; - } - - return sNullSelection; -} diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h index 1cbdfc6f74..06d9141efb 100644 --- a/indra/newview/llparcelselection.h +++ b/indra/newview/llparcelselection.h @@ -35,6 +35,7 @@ class LLParcel; class LLParcelSelection : public LLRefCount { friend class LLViewerParcelMgr; + friend class LLSafeHandle<LLParcelSelection>; protected: ~LLParcelSelection(); @@ -61,8 +62,6 @@ public: // Is the entire parcel selected, or just a part? BOOL getWholeParcelSelected() const; - static LLParcelSelection* getNullParcelSelection(); - private: void setParcel(LLParcel* parcel) { mParcel = parcel; } @@ -73,8 +72,6 @@ private: S32 mSelectedSelfCount; S32 mSelectedOtherCount; S32 mSelectedPublicCount; - - static LLPointer<LLParcelSelection> sNullSelection; }; typedef LLSafeHandle<LLParcelSelection> LLParcelSelectionHandle; diff --git a/indra/newview/llpipelinelistener.cpp b/indra/newview/llpipelinelistener.cpp index 20759239bf..dfbe689f56 100644 --- a/indra/newview/llpipelinelistener.cpp +++ b/indra/newview/llpipelinelistener.cpp @@ -48,7 +48,7 @@ namespace { U32 render_type = render_type_from_string( iter->asString() ); if ( render_type != 0 ) { - LLPipeline::toggleRenderTypeControl( (void*) render_type ); + LLPipeline::toggleRenderTypeControl( render_type ); } } } @@ -59,7 +59,7 @@ namespace { U32 render_type = render_type_from_string( request["type"].asString() ); if ( render_type != 0 ) { - response["value"] = LLPipeline::hasRenderTypeControl( (void*) render_type ); + response["value"] = LLPipeline::hasRenderTypeControl( render_type ); } else { @@ -87,7 +87,7 @@ namespace { U32 render_feature = feature_from_string( iter->asString() ); if ( render_feature != 0 ) { - LLPipeline::toggleRenderDebugControl( (void*) render_feature ); + LLPipeline::toggleRenderDebugControl( render_feature ); } } } @@ -126,7 +126,7 @@ namespace { U32 info_display = info_display_from_string( iter->asString() ); if ( info_display != 0 ) { - LLPipeline::toggleRenderDebug( (void*) info_display ); + LLPipeline::toggleRenderDebug( info_display ); } } } diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index f40b3e0295..76d721ecdc 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -165,8 +165,8 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n } else if(PRESETS_CAMERA == subdirectory) { - name_list = boost::assign::list_of - ("Placeholder"); + name_list.clear(); + name_list.push_back("Placeholder"); } else { diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp index 0ea05a03d6..449e0080f0 100644 --- a/indra/newview/llsearchhistory.cpp +++ b/indra/newview/llsearchhistory.cpp @@ -116,26 +116,26 @@ void LLSearchHistory::addEntry(const std::string& search_query) mSearchHistory.push_front(item); } -bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right) +bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right) const { S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query); return result < 0; } -bool LLSearchHistory::LLSearchHistoryItem::operator > (const LLSearchHistory::LLSearchHistoryItem& right) +bool LLSearchHistory::LLSearchHistoryItem::operator > (const LLSearchHistory::LLSearchHistoryItem& right) const { S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query); return result > 0; } -bool LLSearchHistory::LLSearchHistoryItem::operator==(const LLSearchHistory::LLSearchHistoryItem& right) +bool LLSearchHistory::LLSearchHistoryItem::operator==(const LLSearchHistory::LLSearchHistoryItem& right) const { return 0 == LLStringUtil::compareInsensitive(search_query, right.search_query); } -bool LLSearchHistory::LLSearchHistoryItem::operator==(const std::string& right) +bool LLSearchHistory::LLSearchHistoryItem::operator==(const std::string& right) const { return 0 == LLStringUtil::compareInsensitive(search_query, right); } diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h index 5aab5e6765..4ae6122396 100644 --- a/indra/newview/llsearchhistory.h +++ b/indra/newview/llsearchhistory.h @@ -99,16 +99,16 @@ public: /** * Allows std::list sorting */ - bool operator < (const LLSearchHistory::LLSearchHistoryItem& right); + bool operator < (const LLSearchHistory::LLSearchHistoryItem& right) const; /** * Allows std::list sorting */ - bool operator > (const LLSearchHistory::LLSearchHistoryItem& right); + bool operator > (const LLSearchHistory::LLSearchHistoryItem& right) const; - bool operator==(const LLSearchHistoryItem& right); + bool operator==(const LLSearchHistoryItem& right) const; - bool operator==(const std::string& right); + bool operator==(const std::string& right) const; /** * Serializes search history item to LLSD diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 983a7ca1ae..c44aca6fa5 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -133,11 +133,6 @@ LLColor4 LLSelectMgr::sHighlightParentColor; LLColor4 LLSelectMgr::sHighlightChildColor; LLColor4 LLSelectMgr::sContextSilhouetteColor; -static LLObjectSelection *get_null_object_selection(); -template<> - const LLSafeHandle<LLObjectSelection>::NullFunc - LLSafeHandle<LLObjectSelection>::sNullFunc = get_null_object_selection; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // struct LLDeRezInfo // @@ -157,27 +152,15 @@ struct LLDeRezInfo // -static LLPointer<LLObjectSelection> sNullSelection; - // // Functions // void LLSelectMgr::cleanupGlobals() { - sNullSelection = NULL; LLSelectMgr::getInstance()->clearSelections(); } -LLObjectSelection *get_null_object_selection() -{ - if (sNullSelection.isNull()) - { - sNullSelection = new LLObjectSelection; - } - return sNullSelection; -} - // Build time optimization, generate this function once here template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance(); //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 7ef0032645..e965dd80d5 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -233,6 +233,7 @@ protected: class LLObjectSelection : public LLRefCount { friend class LLSelectMgr; + friend class LLSafeHandle<LLObjectSelection>; protected: ~LLObjectSelection(); diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index cf09f6f978..dba690242a 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -122,7 +122,7 @@ void LLSkinningUtil::initSkinningMatrixPalette( // static void LLSkinningUtil::checkSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin) { -#ifndef LL_RELEASE_FOR_DOWNLOAD +#ifdef SHOW_ASSERT // same condition that controls llassert() const S32 max_joints = skin->mJointNames.size(); for (U32 j=0; j<num_vertices; j++) { diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 0fd36766b3..94b838e829 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -61,9 +61,6 @@ extern bool gShiftFrame; static U32 sZombieGroups = 0; U32 LLSpatialGroup::sNodeCount = 0; -U32 gOctreeMaxCapacity; -F32 gOctreeMinSize; - BOOL LLSpatialGroup::sNoDelete = FALSE; static F32 sLastMaxTexPriority = 1.f; diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index b015cde45d..2ec5c41b88 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -100,9 +100,8 @@ LLTracker::~LLTracker() // static -void LLTracker::stopTracking(void* userdata) +void LLTracker::stopTracking(bool clear_ui) { - BOOL clear_ui = ((BOOL)(intptr_t)userdata); instance()->stopTrackingAll(clear_ui); } @@ -183,7 +182,7 @@ void LLTracker::render3D() F32 dist = gFloaterWorldMap->getDistanceToDestination(pos_global, 0.5f); if (dist < DESTINATION_REACHED_RADIUS) { - instance()->stopTrackingLocation(FALSE,TRUE); + instance()->stopTrackingLocation(false,true); } else { @@ -606,7 +605,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global, } -void LLTracker::stopTrackingAll(BOOL clear_ui) +void LLTracker::stopTrackingAll(bool clear_ui) { switch (mTrackingStatus) { @@ -626,7 +625,7 @@ void LLTracker::stopTrackingAll(BOOL clear_ui) } -void LLTracker::stopTrackingAvatar(BOOL clear_ui) +void LLTracker::stopTrackingAvatar(bool clear_ui) { LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); if( !av_tracker.getAvatarID().isNull() ) @@ -640,7 +639,7 @@ void LLTracker::stopTrackingAvatar(BOOL clear_ui) } -void LLTracker::stopTrackingLandmark(BOOL clear_ui) +void LLTracker::stopTrackingLandmark(bool clear_ui) { purgeBeaconText(); mTrackedLandmarkAssetID.setNull(); @@ -655,7 +654,7 @@ void LLTracker::stopTrackingLandmark(BOOL clear_ui) } -void LLTracker::stopTrackingLocation(BOOL clear_ui, BOOL dest_reached) +void LLTracker::stopTrackingLocation(bool clear_ui, bool dest_reached) { purgeBeaconText(); mTrackedLocationName.assign(""); diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index a1c5052c1b..4a6f10b767 100644 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -74,8 +74,8 @@ public: // these are static so that they can be used a callbacks static ETrackingStatus getTrackingStatus() { return instance()->mTrackingStatus; } static ETrackingLocationType getTrackedLocationType() { return instance()->mTrackingLocationType; } - static BOOL isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; } - static void stopTracking(void*); + static bool isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; } + static void stopTracking(bool); static void clearFocus(); static const LLUUID& getTrackedLandmarkAssetID() { return instance()->mTrackedLandmarkAssetID; } @@ -114,10 +114,10 @@ protected: LLHUDText* hud_textp, const std::string& label ); - void stopTrackingAll(BOOL clear_ui = FALSE); - void stopTrackingAvatar(BOOL clear_ui = FALSE); - void stopTrackingLocation(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); - void stopTrackingLandmark(BOOL clear_ui = FALSE); + void stopTrackingAll(bool clear_ui = false); + void stopTrackingAvatar(bool clear_ui = false); + void stopTrackingLocation(bool clear_ui = false, bool dest_reached = false); + void stopTrackingLandmark(bool clear_ui = false); void drawMarker(const LLVector3d& pos_global, const LLColor4& color); void setLandmarkVisited(); diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index a0ca91672a..375dce485d 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -99,10 +99,16 @@ const std::string &LLVersionInfo::getShortVersion() namespace { + // LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The + // macro expands to the string name of the channel, but without quotes. We + // need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) + /// 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_VIEWER_CHANNEL); + std::string sWorkingChannelName(stringize_outer(LL_VIEWER_CHANNEL)); // Storage for the "version and channel" string. // This will get reset too. diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index afa00e3e6e..960a36a251 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -220,9 +220,9 @@ void display_stats() F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency"); if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq) { - gMemoryAllocated = (U64Bytes)LLMemory::getCurrentRSS(); + gMemoryAllocated = U64Bytes(LLMemory::getCurrentRSS()); U32Megabytes memory = gMemoryAllocated; - LL_INFOS() << llformat("MEMORY: %d MB", memory.value()) << LL_ENDL; + LL_INFOS() << "MEMORY: " << memory << LL_ENDL; LLMemory::logMemoryInfo(TRUE) ; gRecentMemoryTime.reset(); } @@ -1107,7 +1107,7 @@ void render_hud_attachments() bool has_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); if (has_ui) { - gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI); + gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } S32 use_occlusion = LLPipeline::sUseOcclusion; @@ -1152,7 +1152,7 @@ void render_hud_attachments() if (has_ui) { - gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI); + gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } LLPipeline::sUseOcclusion = use_occlusion; LLPipeline::sRenderingHUDs = FALSE; @@ -1230,13 +1230,13 @@ bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model) return get_hud_matrices(whole_screen, proj, model); } -BOOL setup_hud_matrices() +bool setup_hud_matrices() { LLRect whole_screen = get_whole_screen_region(); return setup_hud_matrices(whole_screen); } -BOOL setup_hud_matrices(const LLRect& screen_region) +bool setup_hud_matrices(const LLRect& screen_region) { glh::matrix4f proj, model; bool result = get_hud_matrices(screen_region, proj, model); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9f05ee61bd..900075488f 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -604,7 +604,9 @@ void LLViewerMedia::updateMedia(void *dummy_arg) LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); // HACK: we always try to keep a spare running webkit plugin around to improve launch times. - createSpareBrowserMediaSource(); + // 2017-04-19 Removed CP - this doesn't appear to buy us much and consumes a lot of resources so + // removing it for now. + //createSpareBrowserMediaSource(); sAnyMediaShowing = false; sAnyMediaPlaying = false; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c68f6b8a15..bae619c66d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -794,7 +794,7 @@ class LLAdvancedToggleRenderType : public view_listener_t U32 render_type = render_type_from_string( userdata.asString() ); if ( render_type != 0 ) { - LLPipeline::toggleRenderTypeControl( (void*)render_type ); + LLPipeline::toggleRenderTypeControl( render_type ); } return true; } @@ -810,7 +810,7 @@ class LLAdvancedCheckRenderType : public view_listener_t if ( render_type != 0 ) { - new_value = LLPipeline::hasRenderTypeControl( (void*)render_type ); + new_value = LLPipeline::hasRenderTypeControl( render_type ); } return new_value; @@ -869,7 +869,7 @@ class LLAdvancedToggleFeature : public view_listener_t U32 feature = feature_from_string( userdata.asString() ); if ( feature != 0 ) { - LLPipeline::toggleRenderDebugFeature( (void*)feature ); + LLPipeline::toggleRenderDebugFeature( feature ); } return true; } @@ -884,7 +884,7 @@ class LLAdvancedCheckFeature : public view_listener_t if ( feature != 0 ) { - new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature ); + new_value = LLPipeline::toggleRenderDebugFeatureControl( feature ); } return new_value; @@ -925,7 +925,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF; } @@ -933,7 +933,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_CURRENT; } @@ -941,7 +941,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } gPipeline.setRenderDebugFeatureControl(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY, true); LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_DESIRED; @@ -950,7 +950,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_FULL; } @@ -1093,7 +1093,7 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t if ( info_display != 0 ) { - LLPipeline::toggleRenderDebug( (void*)info_display ); + LLPipeline::toggleRenderDebug( info_display ); } return true; @@ -1110,7 +1110,7 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t if ( info_display != 0 ) { - new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display ); + new_value = LLPipeline::toggleRenderDebugControl( info_display ); } return new_value; @@ -1224,7 +1224,7 @@ class LLAdvancedToggleWireframe : public view_listener_t gPipeline.resetVertexBuffers(); - if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != gInitialDeferredModeForWireframe && gPipeline.isInit()) + if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != bool(gInitialDeferredModeForWireframe) && gPipeline.isInit()) { LLPipeline::refreshCachedSettings(); gPipeline.releaseGLBuffers(); @@ -8141,66 +8141,66 @@ class LLViewToggleBeacon : public view_listener_t std::string beacon = userdata.asString(); if (beacon == "scriptsbeacon") { - LLPipeline::toggleRenderScriptedBeacons(NULL); - gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); + LLPipeline::toggleRenderScriptedBeacons(); + gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons() ); // toggle the other one off if it's on - if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) + if (LLPipeline::getRenderScriptedBeacons() && LLPipeline::getRenderScriptedTouchBeacons()) { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); - gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); + LLPipeline::toggleRenderScriptedTouchBeacons(); + gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons() ); } } else if (beacon == "physicalbeacon") { - LLPipeline::toggleRenderPhysicalBeacons(NULL); - gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) ); + LLPipeline::toggleRenderPhysicalBeacons(); + gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons() ); } else if (beacon == "moapbeacon") { - LLPipeline::toggleRenderMOAPBeacons(NULL); - gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons(NULL) ); + LLPipeline::toggleRenderMOAPBeacons(); + gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons() ); } else if (beacon == "soundsbeacon") { - LLPipeline::toggleRenderSoundBeacons(NULL); - gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) ); + LLPipeline::toggleRenderSoundBeacons(); + gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons() ); } else if (beacon == "particlesbeacon") { - LLPipeline::toggleRenderParticleBeacons(NULL); - gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) ); + LLPipeline::toggleRenderParticleBeacons(); + gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons() ); } else if (beacon == "scripttouchbeacon") { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); - gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); + LLPipeline::toggleRenderScriptedTouchBeacons(); + gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons() ); // toggle the other one off if it's on - if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) + if (LLPipeline::getRenderScriptedBeacons() && LLPipeline::getRenderScriptedTouchBeacons()) { - LLPipeline::toggleRenderScriptedBeacons(NULL); - gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); + LLPipeline::toggleRenderScriptedBeacons(); + gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons() ); } } else if (beacon == "renderbeacons") { - LLPipeline::toggleRenderBeacons(NULL); - gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); + LLPipeline::toggleRenderBeacons(); + gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons() ); // toggle the other one on if it's not - if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) + if (!LLPipeline::getRenderBeacons() && !LLPipeline::getRenderHighlights()) { - LLPipeline::toggleRenderHighlights(NULL); - gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); + LLPipeline::toggleRenderHighlights(); + gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights() ); } } else if (beacon == "renderhighlights") { - LLPipeline::toggleRenderHighlights(NULL); - gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); + LLPipeline::toggleRenderHighlights(); + gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights() ); // toggle the other one on if it's not - if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) + if (!LLPipeline::getRenderBeacons() && !LLPipeline::getRenderHighlights()) { - LLPipeline::toggleRenderBeacons(NULL); - gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); + LLPipeline::toggleRenderBeacons(); + gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons() ); } } @@ -8279,7 +8279,7 @@ class LLViewCheckRenderType : public view_listener_t bool new_value = false; if (type == "hideparticles") { - new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); + new_value = LLPipeline::toggleRenderTypeControlNegated(LLPipeline::RENDER_TYPE_PARTICLES); } return new_value; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 507087d1ae..9d02ec8a9a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2618,7 +2618,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // The group notice packet does not have an AgentID. Obtain one from the name cache. // If last name is "Resident" strip it out so the cache name lookup works. - U32 index = original_name.find(" Resident"); + std::string::size_type index = original_name.find(" Resident"); if (index != std::string::npos) { original_name = original_name.substr(0, index); @@ -4220,7 +4220,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0); if (beacon_dir.magVecSquared() < 25.f) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero()) { diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index a61181bada..f4d14a39fe 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -2463,7 +2463,6 @@ void sanitize_corners(const LLVector3d &corner1, void LLViewerParcelMgr::cleanupGlobals() { - LLParcelSelection::sNullSelection = NULL; } LLViewerTexture* LLViewerParcelMgr::getBlockedImage() const diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f52c82dab7..8ff735a8c1 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -307,7 +307,8 @@ U32Bytes gTotalWorldData, U32 gSimPingCount = 0; U32Bits gObjectData; F32Milliseconds gAvgSimPing(0.f); -U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)}; +// rely on default initialization +U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY]; extern U32 gVisCompared; extern U32 gVisTested; @@ -491,6 +492,7 @@ void send_stats() system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB().value(); system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); + system["address_size"] = ADDRESS_SIZE; unsigned char MACAddress[MAC_ADDRESS_BYTES]; LLUUID::getNodeID(MACAddress); std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index d7080051da..0a3012ffef 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1341,9 +1341,9 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage // Returns min setting for TextureMemory (in MB) S32Megabytes LLViewerTextureList::getMinVideoRamSetting() { - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + U32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); //min texture mem sets to 64M if total physical mem is more than 1.5GB - return (system_ram > S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; + return (system_ram > U32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; } //static @@ -1386,7 +1386,7 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); // In MB //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL; if (get_recommended) max_texmem = llmin(max_texmem, system_ram/2); @@ -1439,7 +1439,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem) } //system mem - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); //minimum memory reserved for non-texture use. //if system_raw >= 1GB, reserve at least 512MB for non-texture use; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2d3b48bab3..feed5ba43d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -53,6 +53,7 @@ #include "llrender.h" #include "llvoiceclient.h" // for push-to-talk button handling +#include "stringize.h" // // TODO: Many of these includes are unnecessary. Remove them. @@ -394,7 +395,8 @@ public: #if LL_WINDOWS if (gSavedSettings.getBOOL("DebugShowMemory")) { - addText(xpos, ypos, llformat("Memory: %d (KB)", LLMemory::getWorkingSetSize() / 1024)); + addText(xpos, ypos, + STRINGIZE("Memory: " << (LLMemory::getCurrentRSS() / 1024) << " (KB)")); ypos += y_inc; } #endif @@ -748,45 +750,45 @@ public: } // only display these messages if we are actually rendering beacons at this moment - if (LLPipeline::getRenderBeacons(NULL) && LLFloaterReg::instanceVisible("beacons")) + if (LLPipeline::getRenderBeacons() && LLFloaterReg::instanceVisible("beacons")) { - if (LLPipeline::getRenderMOAPBeacons(NULL)) + if (LLPipeline::getRenderMOAPBeacons()) { addText(xpos, ypos, "Viewing media beacons (white)"); ypos += y_inc; } - if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES)) + if (LLPipeline::toggleRenderTypeControlNegated(LLPipeline::RENDER_TYPE_PARTICLES)) { addText(xpos, ypos, particle_hiding); ypos += y_inc; } - if (LLPipeline::getRenderParticleBeacons(NULL)) + if (LLPipeline::getRenderParticleBeacons()) { addText(xpos, ypos, "Viewing particle beacons (blue)"); ypos += y_inc; } - if (LLPipeline::getRenderSoundBeacons(NULL)) + if (LLPipeline::getRenderSoundBeacons()) { addText(xpos, ypos, "Viewing sound beacons (yellow)"); ypos += y_inc; } - if (LLPipeline::getRenderScriptedBeacons(NULL)) + if (LLPipeline::getRenderScriptedBeacons()) { addText(xpos, ypos, beacon_scripted); ypos += y_inc; } else - if (LLPipeline::getRenderScriptedTouchBeacons(NULL)) + if (LLPipeline::getRenderScriptedTouchBeacons()) { addText(xpos, ypos, beacon_scripted_touch); ypos += y_inc; } - if (LLPipeline::getRenderPhysicalBeacons(NULL)) + if (LLPipeline::getRenderPhysicalBeacons()) { addText(xpos, ypos, "Viewing physical object beacons (green)"); ypos += y_inc; @@ -4517,7 +4519,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if ( prev_draw_ui != show_ui) { - LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI); + LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } BOOL hide_hud = !gSavedSettings.getBOOL("RenderHUDInSnapshot") && LLPipeline::sShowHUDAttachments; @@ -4740,7 +4742,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // POST SNAPSHOT if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI); + LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } if (hide_hud) diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 4dab213fa0..6b4a450e6f 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -283,7 +283,7 @@ void LLSkyTex::create(const F32 brightness) S32 offset = basic_offset * sComponents; U32* pix = (U32*)(data + offset); LLColor4U temp = LLColor4U(mSkyData[basic_offset]); - *pix = temp.mAll; + *pix = temp.asRGBA(); } } createGLImage(sCurrent); diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index ee8e91fb71..9cfb9773bd 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -171,7 +171,7 @@ protected: { S32 offset = (i * sResolution + j) * sComponents; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); - *pix = col.mAll; + *pix = col.asRGBA(); } LLColor4U getPixel(const S32 i, const S32 j) @@ -179,7 +179,7 @@ protected: LLColor4U col; S32 offset = (i * sResolution + j) * sComponents; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); - col.mAll = *pix; + col.fromRGBA( *pix ); return col; } diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index eff70ca0b2..92c80ce534 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -90,7 +90,7 @@ LONG NTAPI vectoredHandler(PEXCEPTION_POINTERS exception_infop) } // static -void LLWinDebug::init() +void LLWinDebug::initSingleton() { static bool s_first_run = true; // Load the dbghelp dll now, instead of waiting for the crash. @@ -135,7 +135,7 @@ void LLWinDebug::init() } } -void LLWinDebug::cleanup () +void LLWinDebug::cleanupSingleton() { gEmergencyMemoryReserve.release(); } diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h index 90882cf04a..7e5818ba1c 100644 --- a/indra/newview/llwindebug.h +++ b/indra/newview/llwindebug.h @@ -36,9 +36,9 @@ class LLWinDebug: { LLSINGLETON_EMPTY_CTOR(LLWinDebug); public: - static void init(); + void initSingleton(); static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void cleanup(); + void cleanupSingleton(); private: static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); }; diff --git a/indra/newview/llwlanimator.h b/indra/newview/llwlanimator.h index 810f4cf7e5..e2e49c7305 100644 --- a/indra/newview/llwlanimator.h +++ b/indra/newview/llwlanimator.h @@ -28,12 +28,11 @@ #define LL_WL_ANIMATOR_H #include "llwlparamset.h" +#include "llenvmanager.h" #include "llwaterparamset.h" #include <string> #include <map> -struct LLWLParamKey; - class LLWLAnimator { public: typedef enum e_time diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h index a8029839a7..61f86b747f 100644 --- a/indra/newview/llwlparammanager.h +++ b/indra/newview/llwlparammanager.h @@ -115,100 +115,6 @@ struct WLFloatControl { } }; -struct LLWLParamKey : LLEnvKey -{ -public: - // scope and source of a param set (WL sky preset) - std::string name; - EScope scope; - - // for conversion from LLSD - static const int NAME_IDX = 0; - static const int SCOPE_IDX = 1; - - inline LLWLParamKey(const std::string& n, EScope s) - : name(n), scope(s) - { - } - - inline LLWLParamKey(LLSD llsd) - : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger())) - { - } - - inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort - : name(""), scope(SCOPE_LOCAL) - { - } - - inline LLWLParamKey(std::string& stringVal) - { - size_t len = stringVal.length(); - if (len > 0) - { - name = stringVal.substr(0, len - 1); - scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str()); - } - } - - inline std::string toStringVal() const - { - std::stringstream str; - str << name << scope; - return str.str(); - } - - inline LLSD toLLSD() const - { - LLSD llsd = LLSD::emptyArray(); - llsd.append(LLSD(name)); - llsd.append(LLSD(scope)); - return llsd; - } - - inline void fromLLSD(const LLSD& llsd) - { - name = llsd[NAME_IDX].asString(); - scope = EScope(llsd[SCOPE_IDX].asInteger()); - } - - inline bool operator <(const LLWLParamKey other) const - { - if (name < other.name) - { - return true; - } - else if (name > other.name) - { - return false; - } - else - { - return scope < other.scope; - } - } - - inline bool operator ==(const LLWLParamKey other) const - { - return (name == other.name) && (scope == other.scope); - } - - inline std::string toString() const - { - switch (scope) - { - case SCOPE_LOCAL: - return name + std::string(" (") + LLTrans::getString("Local") + std::string(")"); - break; - case SCOPE_REGION: - return name + std::string(" (") + LLTrans::getString("Region") + std::string(")"); - break; - default: - return name + " (?)"; - } - } -}; - /// WindLight parameter manager class - what controls all the wind light shaders class LLWLParamManager : public LLSingleton<LLWLParamManager> { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 19487c3230..c38dafee53 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -130,26 +130,26 @@ bool gShiftFrame = false; //cached settings -BOOL LLPipeline::RenderAvatarVP; -BOOL LLPipeline::VertexShaderEnable; -BOOL LLPipeline::WindLightUseAtmosShaders; -BOOL LLPipeline::RenderDeferred; +bool LLPipeline::RenderAvatarVP; +bool LLPipeline::VertexShaderEnable; +bool LLPipeline::WindLightUseAtmosShaders; +bool LLPipeline::RenderDeferred; F32 LLPipeline::RenderDeferredSunWash; U32 LLPipeline::RenderFSAASamples; U32 LLPipeline::RenderResolutionDivisor; -BOOL LLPipeline::RenderUIBuffer; +bool LLPipeline::RenderUIBuffer; S32 LLPipeline::RenderShadowDetail; -BOOL LLPipeline::RenderDeferredSSAO; +bool LLPipeline::RenderDeferredSSAO; F32 LLPipeline::RenderShadowResolutionScale; -BOOL LLPipeline::RenderLocalLights; -BOOL LLPipeline::RenderDelayCreation; -BOOL LLPipeline::RenderAnimateRes; -BOOL LLPipeline::FreezeTime; +bool LLPipeline::RenderLocalLights; +bool LLPipeline::RenderDelayCreation; +bool LLPipeline::RenderAnimateRes; +bool LLPipeline::FreezeTime; S32 LLPipeline::DebugBeaconLineWidth; F32 LLPipeline::RenderHighlightBrightness; LLColor4 LLPipeline::RenderHighlightColor; F32 LLPipeline::RenderHighlightThickness; -BOOL LLPipeline::RenderSpotLightsInNondeferred; +bool LLPipeline::RenderSpotLightsInNondeferred; LLColor4 LLPipeline::PreviewAmbientColor; LLColor4 LLPipeline::PreviewDiffuse0; LLColor4 LLPipeline::PreviewSpecular0; @@ -169,8 +169,8 @@ S32 LLPipeline::RenderGlowResolutionPow; S32 LLPipeline::RenderGlowIterations; F32 LLPipeline::RenderGlowWidth; F32 LLPipeline::RenderGlowStrength; -BOOL LLPipeline::RenderDepthOfField; -BOOL LLPipeline::RenderDepthOfFieldInEditMode; +bool LLPipeline::RenderDepthOfField; +bool LLPipeline::RenderDepthOfFieldInEditMode; F32 LLPipeline::CameraFocusTransitionTime; F32 LLPipeline::CameraFNumber; F32 LLPipeline::CameraFocalLength; @@ -191,7 +191,7 @@ F32 LLPipeline::RenderEdgeDepthCutoff; F32 LLPipeline::RenderEdgeNormCutoff; LLVector3 LLPipeline::RenderShadowGaussian; F32 LLPipeline::RenderShadowBlurDistFactor; -BOOL LLPipeline::RenderDeferredAtmospheric; +bool LLPipeline::RenderDeferredAtmospheric; S32 LLPipeline::RenderReflectionDetail; F32 LLPipeline::RenderHighlightFadeTime; LLVector3 LLPipeline::RenderShadowClipPlanes; @@ -201,7 +201,7 @@ F32 LLPipeline::RenderFarClip; LLVector3 LLPipeline::RenderShadowSplitExponent; F32 LLPipeline::RenderShadowErrorCutoff; F32 LLPipeline::RenderShadowFOVCutoff; -BOOL LLPipeline::CameraOffset; +bool LLPipeline::CameraOffset; F32 LLPipeline::CameraMaxCoF; F32 LLPipeline::CameraDoFResScale; F32 LLPipeline::RenderAutoHideSurfaceAreaLimit; @@ -216,9 +216,9 @@ extern S32 gBoxFrame; extern BOOL gDisplaySwapBuffers; extern BOOL gDebugGL; -BOOL gAvatarBacklight = FALSE; +bool gAvatarBacklight = false; -BOOL gDebugPipeline = FALSE; +bool gDebugPipeline = false; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; @@ -359,45 +359,45 @@ void display_update_camera(); S32 LLPipeline::sCompiles = 0; -BOOL LLPipeline::sPickAvatar = TRUE; -BOOL LLPipeline::sDynamicLOD = TRUE; -BOOL LLPipeline::sShowHUDAttachments = TRUE; -BOOL LLPipeline::sRenderMOAPBeacons = FALSE; -BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; -BOOL LLPipeline::sRenderScriptedBeacons = FALSE; -BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; -BOOL LLPipeline::sRenderParticleBeacons = FALSE; -BOOL LLPipeline::sRenderSoundBeacons = FALSE; -BOOL LLPipeline::sRenderBeacons = FALSE; -BOOL LLPipeline::sRenderHighlight = TRUE; +bool LLPipeline::sPickAvatar = true; +bool LLPipeline::sDynamicLOD = true; +bool LLPipeline::sShowHUDAttachments = true; +bool LLPipeline::sRenderMOAPBeacons = false; +bool LLPipeline::sRenderPhysicalBeacons = true; +bool LLPipeline::sRenderScriptedBeacons = false; +bool LLPipeline::sRenderScriptedTouchBeacons = true; +bool LLPipeline::sRenderParticleBeacons = false; +bool LLPipeline::sRenderSoundBeacons = false; +bool LLPipeline::sRenderBeacons = false; +bool LLPipeline::sRenderHighlight = true; LLRender::eTexIndex LLPipeline::sRenderHighlightTextureChannel = LLRender::DIFFUSE_MAP; -BOOL LLPipeline::sForceOldBakedUpload = FALSE; +bool LLPipeline::sForceOldBakedUpload = false; S32 LLPipeline::sUseOcclusion = 0; -BOOL LLPipeline::sDelayVBUpdate = TRUE; -BOOL LLPipeline::sAutoMaskAlphaDeferred = TRUE; -BOOL LLPipeline::sAutoMaskAlphaNonDeferred = FALSE; -BOOL LLPipeline::sDisableShaders = FALSE; -BOOL LLPipeline::sRenderBump = TRUE; -BOOL LLPipeline::sBakeSunlight = FALSE; -BOOL LLPipeline::sNoAlpha = FALSE; -BOOL LLPipeline::sUseTriStrips = TRUE; -BOOL LLPipeline::sUseFarClip = TRUE; -BOOL LLPipeline::sShadowRender = FALSE; -BOOL LLPipeline::sWaterReflections = FALSE; -BOOL LLPipeline::sRenderGlow = FALSE; -BOOL LLPipeline::sReflectionRender = FALSE; -BOOL LLPipeline::sImpostorRender = FALSE; -BOOL LLPipeline::sImpostorRenderAlphaDepthPass = FALSE; -BOOL LLPipeline::sUnderWaterRender = FALSE; -BOOL LLPipeline::sTextureBindTest = FALSE; -BOOL LLPipeline::sRenderFrameTest = FALSE; -BOOL LLPipeline::sRenderAttachedLights = TRUE; -BOOL LLPipeline::sRenderAttachedParticles = TRUE; -BOOL LLPipeline::sRenderDeferred = FALSE; -BOOL LLPipeline::sMemAllocationThrottled = FALSE; +bool LLPipeline::sDelayVBUpdate = true; +bool LLPipeline::sAutoMaskAlphaDeferred = true; +bool LLPipeline::sAutoMaskAlphaNonDeferred = false; +bool LLPipeline::sDisableShaders = false; +bool LLPipeline::sRenderBump = true; +bool LLPipeline::sBakeSunlight = false; +bool LLPipeline::sNoAlpha = false; +bool LLPipeline::sUseTriStrips = true; +bool LLPipeline::sUseFarClip = true; +bool LLPipeline::sShadowRender = false; +bool LLPipeline::sWaterReflections = false; +bool LLPipeline::sRenderGlow = false; +bool LLPipeline::sReflectionRender = false; +bool LLPipeline::sImpostorRender = false; +bool LLPipeline::sImpostorRenderAlphaDepthPass = false; +bool LLPipeline::sUnderWaterRender = false; +bool LLPipeline::sTextureBindTest = false; +bool LLPipeline::sRenderFrameTest = false; +bool LLPipeline::sRenderAttachedLights = true; +bool LLPipeline::sRenderAttachedParticles = true; +bool LLPipeline::sRenderDeferred = false; +bool LLPipeline::sMemAllocationThrottled = false; S32 LLPipeline::sVisibleLightCount = 0; F32 LLPipeline::sMinRenderSize = 0.f; -BOOL LLPipeline::sRenderingHUDs; +bool LLPipeline::sRenderingHUDs; // EventHost API LLPipeline listener. static LLPipelineListener sPipelineListener; @@ -414,14 +414,14 @@ bool addDeferredAttachments(LLRenderTarget& target) } LLPipeline::LLPipeline() : - mBackfaceCull(FALSE), + mBackfaceCull(false), mMatrixOpCount(0), mTextureMatrixOps(0), mNumVisibleNodes(0), mNumVisibleFaces(0), - mInitialized(FALSE), - mVertexShadersEnabled(FALSE), + mInitialized(false), + mVertexShadersEnabled(false), mVertexShadersLoaded(0), mTransformFeedbackPrimitives(0), mRenderDebugFeatureMask(0), @@ -486,7 +486,7 @@ void LLPipeline::init() sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); - mInitialized = TRUE; + mInitialized = true; stop_glerror(); @@ -539,7 +539,7 @@ void LLPipeline::init() mOldRenderDebugMask = mRenderDebugMask; - mBackfaceCull = TRUE; + mBackfaceCull = true; stop_glerror(); @@ -724,7 +724,7 @@ void LLPipeline::cleanup() mMovedBridge.clear(); - mInitialized = FALSE; + mInitialized = false; mDeferredVB = NULL; @@ -760,7 +760,7 @@ void LLPipeline::destroyGL() static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); //static -void LLPipeline::throttleNewMemoryAllocation(BOOL disable) +void LLPipeline::throttleNewMemoryAllocation(bool disable) { if(sMemAllocationThrottled != disable) { @@ -933,7 +933,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (LLPipeline::sRenderDeferred) { S32 shadow_detail = RenderShadowDetail; - BOOL ssao = RenderDeferredSSAO; + bool ssao = RenderDeferredSSAO; const U32 occlusion_divisor = 3; @@ -1059,19 +1059,19 @@ void LLPipeline::updateRenderBump() //static void LLPipeline::updateRenderDeferred() { - BOOL deferred = ((RenderDeferred && + bool deferred = (bool(RenderDeferred && LLRenderTarget::sUseFBO && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && LLPipeline::sRenderBump && VertexShaderEnable && RenderAvatarVP && - WindLightUseAtmosShaders) ? TRUE : FALSE) && + WindLightUseAtmosShaders)) && !gUseWireframe; sRenderDeferred = deferred; if (deferred) { //must render glow when rendering deferred since post effect pass is needed to present any lighting at all - sRenderGlow = TRUE; + sRenderGlow = true; } } @@ -1414,7 +1414,7 @@ void LLPipeline::restoreGL() } -BOOL LLPipeline::canUseVertexShaders() +bool LLPipeline::canUseVertexShaders() { static const std::string vertex_shader_enable_feature_string = "VertexShaderEnable"; @@ -1424,30 +1424,30 @@ BOOL LLPipeline::canUseVertexShaders() !LLFeatureManager::getInstance()->isFeatureAvailable(vertex_shader_enable_feature_string) || (assertInitialized() && mVertexShadersLoaded != 1) ) { - return FALSE; + return false; } else { - return TRUE; + return true; } } -BOOL LLPipeline::canUseWindLightShaders() const +bool LLPipeline::canUseWindLightShaders() const { return (!LLPipeline::sDisableShaders && gWLSkyProgram.mProgramObject != 0 && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT) > 1); } -BOOL LLPipeline::canUseWindLightShadersOnObjects() const +bool LLPipeline::canUseWindLightShadersOnObjects() const { return (canUseWindLightShaders() && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0); } -BOOL LLPipeline::canUseAntiAliasing() const +bool LLPipeline::canUseAntiAliasing() const { - return TRUE; + return true; } void LLPipeline::unloadShaders() @@ -1464,7 +1464,7 @@ void LLPipeline::assertInitializedDoError() //============================================================================ -void LLPipeline::enableShadows(const BOOL enable_shadows) +void LLPipeline::enableShadows(const bool enable_shadows) { //should probably do something here to wrangle shadows.... } @@ -2002,7 +2002,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) { LLDrawable::drawable_vector_t::iterator curiter = iter++; LLDrawable *drawablep = *curiter; - BOOL done = TRUE; + bool done = true; if (!drawablep->isDead() && (!drawablep->isState(LLDrawable::EARLY_MOVE))) { done = drawablep->updateMove(); @@ -2330,7 +2330,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) } -BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera) +bool LLPipeline::visibleObjectsInFrustum(LLCamera& camera) { for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -2346,17 +2346,17 @@ BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera) { if (part->visibleObjectsInFrustum(camera)) { - return TRUE; + return true; } } } } } - return FALSE; + return false; } -BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max) +bool LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max) { const F32 X = 65536.f; @@ -2366,7 +2366,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& LLViewerCamera::eCameraID saved_camera_id = LLViewerCamera::sCurCameraID; LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; - BOOL res = TRUE; + bool res = true; for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -2382,7 +2382,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& { if (!part->getVisibleExtents(camera, min, max)) { - res = FALSE; + res = false; } } } @@ -2409,7 +2409,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl sCull->clear(); - BOOL to_texture = LLPipeline::sUseOcclusion > 1 && + bool to_texture = LLPipeline::sUseOcclusion > 1 && !hasRenderType(LLPipeline::RENDER_TYPE_HUD) && LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD && gPipeline.canUseVertexShaders() && @@ -2789,9 +2789,9 @@ void LLPipeline::doOcclusion(LLCamera& camera) } } -BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) +bool LLPipeline::updateDrawableGeom(LLDrawable* drawablep, bool priority) { - BOOL update_complete = drawablep->updateGeometry(priority); + bool update_complete = drawablep->updateGeometry(priority); if (update_complete && assertInitialized()) { drawablep->setState(LLDrawable::BUILT); @@ -3078,7 +3078,7 @@ void LLPipeline::updateGeom(F32 max_dtime) last_group = drawablep->getSpatialGroup(); last_bridge = bridge; - BOOL update_complete = TRUE; + bool update_complete = true; if (!drawablep->isDead()) { update_complete = updateDrawableGeom(drawablep, FALSE); @@ -3135,7 +3135,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) } } -void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) +void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion) { if (!drawablep) { @@ -3169,7 +3169,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) } drawablep->setState(LLDrawable::ON_MOVE_LIST); } - if (damped_motion == FALSE) + if (! damped_motion) { drawablep->setState(LLDrawable::MOVE_UNDAMPED); // UNDAMPED trumps DAMPED } @@ -3209,7 +3209,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) assertInitialized(); glClear(GL_DEPTH_BUFFER_BIT); - gDepthDirty = TRUE; + gDepthDirty = true; LLVector4a offseta; offseta.load3(offset.mV); @@ -3307,13 +3307,13 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) mMeshDirtyGroup.push_back(group); } -void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) +void LLPipeline::markRebuild(LLSpatialGroup* group, bool priority) { if (group && !group->isDead() && group->getSpatialPartition()) { if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) { - priority = TRUE; + priority = true; } if (priority) @@ -3346,13 +3346,13 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) } } -void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority) +void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, bool priority) { if (drawablep && !drawablep->isDead() && assertInitialized()) { if (!drawablep->isState(LLDrawable::BUILT)) { - priority = TRUE; + priority = true; } if (priority) { @@ -3721,17 +3721,17 @@ void renderMOAPBeacons(LLDrawable* drawablep) if(!vobj || vobj->isAvatar()) return; - BOOL beacon=FALSE; + bool beacon=false; U8 tecount=vobj->getNumTEs(); for(int x=0;x<tecount;x++) { if(vobj->getTE(x)->hasMedia()) { - beacon=TRUE; + beacon=true; break; } } - if(beacon==TRUE) + if(beacon) { if (gPipeline.sRenderBeacons) { @@ -4310,7 +4310,7 @@ void LLPipeline::renderHighlights() //debug use U32 LLPipeline::sCurRenderPoolType = 0 ; -void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) +void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate) { LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY); @@ -4367,13 +4367,13 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) // Toggle backface culling for debugging LLGLEnable cull_face(mBackfaceCull ? GL_CULL_FACE : 0); // Set fog - BOOL use_fog = hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG); + bool use_fog = hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG); LLGLEnable fog_enable(use_fog && !gPipeline.canUseWindLightShadersOnObjects() ? GL_FOG : 0); gSky.updateFog(camera.getFar()); if (!use_fog) { - sUnderWaterRender = FALSE; + sUnderWaterRender = false; } gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sDefaultImagep); @@ -4410,7 +4410,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) setupHWLights(NULL); } - BOOL occlude = sUseOcclusion > 1; + bool occlude = sUseOcclusion > 1; U32 cur_type = 0; pool_set_t::iterator iter1 = mPools.begin(); @@ -4425,7 +4425,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) if (occlude && cur_type >= LLDrawPool::POOL_GRASS) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -4490,7 +4490,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) if (occlude) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -4673,7 +4673,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) gGL.setColorMask(true, false); pool_set_t::iterator iter1 = mPools.begin(); - BOOL occlude = LLPipeline::sUseOcclusion > 1 && do_occlusion; + bool occlude = LLPipeline::sUseOcclusion > 1 && do_occlusion; while ( iter1 != mPools.end() ) { @@ -4683,7 +4683,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) if (occlude && cur_type >= LLDrawPool::POOL_GRASS) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -4743,7 +4743,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) if (occlude) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -5885,7 +5885,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) case LLDrawPool::POOL_TREE: #ifdef _DEBUG { - BOOL found = mTreePools.erase( (uintptr_t)poolp->getTexture() ); + bool found = mTreePools.erase( (uintptr_t)poolp->getTexture() ); llassert( found ); } #else @@ -5896,7 +5896,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) case LLDrawPool::POOL_TERRAIN: #ifdef _DEBUG { - BOOL found = mTerrainPools.erase( (uintptr_t)poolp->getTexture() ); + bool found = mTerrainPools.erase( (uintptr_t)poolp->getTexture() ); llassert( found ); } #else @@ -5959,7 +5959,7 @@ void LLPipeline::resetDrawOrders() // Once-per-frame setup of hardware lights, // including sun/moon, avatar backlight, and up to 6 local lights -void LLPipeline::setupAvatarLights(BOOL for_edit) +void LLPipeline::setupAvatarLights(bool for_edit) { assertInitialized(); @@ -6064,7 +6064,7 @@ static F32 calc_light_dist(LLVOVolume* light, const LLVector3& cam_pos, F32 max_ return max_dist; } F32 radius = light->getLightRadius(); - BOOL selected = light->isSelected(); + bool selected = light->isSelected(); LLVector3 dpos = light->getRenderPosition() - cam_pos; F32 dist2 = dpos.lengthSquared(); if (!selected && dist2 > (max_dist + radius)*(max_dist + radius)) @@ -6659,9 +6659,9 @@ void LLPipeline::findReferences(LLDrawable *drawablep) } } -BOOL LLPipeline::verify() +bool LLPipeline::verify() { - BOOL ok = assertInitialized(); + bool ok = assertInitialized(); if (ok) { for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter) @@ -6669,7 +6669,7 @@ BOOL LLPipeline::verify() LLDrawPool *poolp = *iter; if (!poolp->verify()) { - ok = FALSE; + ok = false; } } } @@ -6714,7 +6714,7 @@ BOOL LLPipeline::verify() bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon) { - BOOL Inside = TRUE; + bool Inside = true; LLVector3 MinB = center - size; LLVector3 MaxB = center + size; LLVector3 MaxT; @@ -6726,7 +6726,7 @@ bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& if(origin.mV[i] < MinB.mV[i]) { coord.mV[i] = MinB.mV[i]; - Inside = FALSE; + Inside = false; // Calculate T distances to candidate planes if(IR(dir.mV[i])) MaxT.mV[i] = (MinB.mV[i] - origin.mV[i]) / dir.mV[i]; @@ -6734,7 +6734,7 @@ bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& else if(origin.mV[i] > MaxB.mV[i]) { coord.mV[i] = MaxB.mV[i]; - Inside = FALSE; + Inside = false; // Calculate T distances to candidate planes if(IR(dir.mV[i])) MaxT.mV[i] = (MaxB.mV[i] - origin.mV[i]) / dir.mV[i]; @@ -6780,7 +6780,7 @@ bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& // // -void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light) +void LLPipeline::setLight(LLDrawable *drawablep, bool is_light) { if (drawablep && assertInitialized()) { @@ -6808,9 +6808,8 @@ void LLPipeline::toggleRenderType(U32 type) } //static -void LLPipeline::toggleRenderTypeControl(void* data) +void LLPipeline::toggleRenderTypeControl(U32 type) { - U32 type = (U32)(intptr_t)data; U32 bit = (1<<type); if (gPipeline.hasRenderType(type)) { @@ -6824,24 +6823,21 @@ void LLPipeline::toggleRenderTypeControl(void* data) } //static -BOOL LLPipeline::hasRenderTypeControl(void* data) +bool LLPipeline::hasRenderTypeControl(U32 type) { - U32 type = (U32)(intptr_t)data; return gPipeline.hasRenderType(type); } // Allows UI items labeled "Hide foo" instead of "Show foo" //static -BOOL LLPipeline::toggleRenderTypeControlNegated(void* data) +bool LLPipeline::toggleRenderTypeControlNegated(S32 type) { - S32 type = (S32)(intptr_t)data; return !gPipeline.hasRenderType(type); } //static -void LLPipeline::toggleRenderDebug(void* data) +void LLPipeline::toggleRenderDebug(U32 bit) { - U32 bit = (U32)(intptr_t)data; if (gPipeline.hasRenderDebugMask(bit)) { LL_INFOS() << "Toggling render debug mask " << std::hex << bit << " off" << std::dec << LL_ENDL; @@ -6855,24 +6851,21 @@ void LLPipeline::toggleRenderDebug(void* data) //static -BOOL LLPipeline::toggleRenderDebugControl(void* data) +bool LLPipeline::toggleRenderDebugControl(U32 bit) { - U32 bit = (U32)(intptr_t)data; return gPipeline.hasRenderDebugMask(bit); } //static -void LLPipeline::toggleRenderDebugFeature(void* data) +void LLPipeline::toggleRenderDebugFeature(U32 bit) { - U32 bit = (U32)(intptr_t)data; gPipeline.mRenderDebugFeatureMask ^= bit; } //static -BOOL LLPipeline::toggleRenderDebugFeatureControl(void* data) +bool LLPipeline::toggleRenderDebugFeatureControl(U32 bit) { - U32 bit = (U32)(intptr_t)data; return gPipeline.hasRenderDebugFeatureMask(bit); } @@ -6905,145 +6898,145 @@ void LLPipeline::popRenderDebugFeatureMask() } // static -void LLPipeline::setRenderScriptedBeacons(BOOL val) +void LLPipeline::setRenderScriptedBeacons(bool val) { sRenderScriptedBeacons = val; } // static -void LLPipeline::toggleRenderScriptedBeacons(void*) +void LLPipeline::toggleRenderScriptedBeacons() { sRenderScriptedBeacons = !sRenderScriptedBeacons; } // static -BOOL LLPipeline::getRenderScriptedBeacons(void*) +bool LLPipeline::getRenderScriptedBeacons() { return sRenderScriptedBeacons; } // static -void LLPipeline::setRenderScriptedTouchBeacons(BOOL val) +void LLPipeline::setRenderScriptedTouchBeacons(bool val) { sRenderScriptedTouchBeacons = val; } // static -void LLPipeline::toggleRenderScriptedTouchBeacons(void*) +void LLPipeline::toggleRenderScriptedTouchBeacons() { sRenderScriptedTouchBeacons = !sRenderScriptedTouchBeacons; } // static -BOOL LLPipeline::getRenderScriptedTouchBeacons(void*) +bool LLPipeline::getRenderScriptedTouchBeacons() { return sRenderScriptedTouchBeacons; } // static -void LLPipeline::setRenderMOAPBeacons(BOOL val) +void LLPipeline::setRenderMOAPBeacons(bool val) { sRenderMOAPBeacons = val; } // static -void LLPipeline::toggleRenderMOAPBeacons(void*) +void LLPipeline::toggleRenderMOAPBeacons() { sRenderMOAPBeacons = !sRenderMOAPBeacons; } // static -BOOL LLPipeline::getRenderMOAPBeacons(void*) +bool LLPipeline::getRenderMOAPBeacons() { return sRenderMOAPBeacons; } // static -void LLPipeline::setRenderPhysicalBeacons(BOOL val) +void LLPipeline::setRenderPhysicalBeacons(bool val) { sRenderPhysicalBeacons = val; } // static -void LLPipeline::toggleRenderPhysicalBeacons(void*) +void LLPipeline::toggleRenderPhysicalBeacons() { sRenderPhysicalBeacons = !sRenderPhysicalBeacons; } // static -BOOL LLPipeline::getRenderPhysicalBeacons(void*) +bool LLPipeline::getRenderPhysicalBeacons() { return sRenderPhysicalBeacons; } // static -void LLPipeline::setRenderParticleBeacons(BOOL val) +void LLPipeline::setRenderParticleBeacons(bool val) { sRenderParticleBeacons = val; } // static -void LLPipeline::toggleRenderParticleBeacons(void*) +void LLPipeline::toggleRenderParticleBeacons() { sRenderParticleBeacons = !sRenderParticleBeacons; } // static -BOOL LLPipeline::getRenderParticleBeacons(void*) +bool LLPipeline::getRenderParticleBeacons() { return sRenderParticleBeacons; } // static -void LLPipeline::setRenderSoundBeacons(BOOL val) +void LLPipeline::setRenderSoundBeacons(bool val) { sRenderSoundBeacons = val; } // static -void LLPipeline::toggleRenderSoundBeacons(void*) +void LLPipeline::toggleRenderSoundBeacons() { sRenderSoundBeacons = !sRenderSoundBeacons; } // static -BOOL LLPipeline::getRenderSoundBeacons(void*) +bool LLPipeline::getRenderSoundBeacons() { return sRenderSoundBeacons; } // static -void LLPipeline::setRenderBeacons(BOOL val) +void LLPipeline::setRenderBeacons(bool val) { sRenderBeacons = val; } // static -void LLPipeline::toggleRenderBeacons(void*) +void LLPipeline::toggleRenderBeacons() { sRenderBeacons = !sRenderBeacons; } // static -BOOL LLPipeline::getRenderBeacons(void*) +bool LLPipeline::getRenderBeacons() { return sRenderBeacons; } // static -void LLPipeline::setRenderHighlights(BOOL val) +void LLPipeline::setRenderHighlights(bool val) { sRenderHighlight = val; } // static -void LLPipeline::toggleRenderHighlights(void*) +void LLPipeline::toggleRenderHighlights() { sRenderHighlight = !sRenderHighlight; } // static -BOOL LLPipeline::getRenderHighlights(void*) +bool LLPipeline::getRenderHighlights() { return sRenderHighlight; } @@ -7097,8 +7090,8 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, } LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, + bool pick_transparent, + bool pick_rigged, S32* face_hit, LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -7112,7 +7105,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLVector4a position; - sPickAvatar = FALSE; //LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE; + sPickAvatar = false; //! LLToolMgr::getInstance()->inBuildMode(); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -7178,7 +7171,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const F32 ATTACHMENT_OVERRIDE_DIST = 0.1f; //check against avatars - sPickAvatar = TRUE; + sPickAvatar = true; for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -7250,7 +7243,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, } LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + bool pick_transparent, S32* face_hit, LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -7265,11 +7258,11 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c { LLViewerRegion* region = *iter; - BOOL toggle = FALSE; + bool toggle = false; if (!hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { toggleRenderType(LLPipeline::RENDER_TYPE_HUD); - toggle = TRUE; + toggle = true; } LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD); @@ -7418,7 +7411,7 @@ void LLPipeline::doResetVertexBuffers(bool forced) LLVOPartGroup::restoreGL(); } -void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) +void LLPipeline::renderObjects(U32 type, U32 mask, bool texture, bool batch_texture) { assertInitialized(); gGL.loadMatrix(gGLModelView); @@ -7428,7 +7421,7 @@ void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_text gGLLastMatrix = NULL; } -void LLPipeline::renderMaskedObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) +void LLPipeline::renderMaskedObjects(U32 type, U32 mask, bool texture, bool batch_texture) { assertInitialized(); gGL.loadMatrix(gGLModelView); @@ -7501,7 +7494,7 @@ void LLPipeline::bindScreenToTexture() static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom"); -void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) +void LLPipeline::renderBloom(bool for_snapshot, F32 zoom_factor, int subfield) { if (!(gPipeline.canUseVertexShaders() && sRenderGlow)) @@ -8617,7 +8610,7 @@ void LLPipeline::renderDeferredLighting() gPipeline.popRenderTypeMask(); } - BOOL render_local = RenderLocalLights; + bool render_local = RenderLocalLights; if (render_local) { @@ -9170,7 +9163,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) gPipeline.popRenderTypeMask(); } - BOOL render_local = RenderLocalLights; + bool render_local = RenderLocalLights; if (render_local) { @@ -9729,10 +9722,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) { if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { - BOOL skip_avatar_update = FALSE; + bool skip_avatar_update = false; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) { - skip_avatar_update = TRUE; + skip_avatar_update = true; } if (!skip_avatar_update) @@ -9747,7 +9740,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLCamera camera = camera_in; camera.setFar(camera.getFar()*0.87654321f); - LLPipeline::sReflectionRender = TRUE; + LLPipeline::sReflectionRender = true; gPipeline.pushRenderTypeMask(); @@ -9933,7 +9926,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) camera.setOrigin(camera_in.getOrigin()); //render distortion map - static BOOL last_update = TRUE; + static bool last_update = true; if (last_update) { camera.setFar(camera_in.getFar()); @@ -9943,7 +9936,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) END_RENDER_TYPES); stop_glerror(); - LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE; + LLPipeline::sUnderWaterRender = ! LLViewerCamera::getInstance()->cameraUnderWater(); if (LLPipeline::sUnderWaterRender) { @@ -10005,12 +9998,12 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } mWaterDis.flush(); - LLPipeline::sUnderWaterRender = FALSE; + LLPipeline::sUnderWaterRender = false; } last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate; - LLPipeline::sReflectionRender = FALSE; + LLPipeline::sReflectionRender = false; if (!LLRenderTarget::sUseFBO) { @@ -10105,7 +10098,7 @@ static LLTrace::BlockTimerStatHandle FTM_SHADOW_RENDER("Render Shadows"); static LLTrace::BlockTimerStatHandle FTM_SHADOW_ALPHA("Alpha Shadow"); static LLTrace::BlockTimerStatHandle FTM_SHADOW_SIMPLE("Simple Shadow"); -void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) +void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, bool use_shader, bool use_occlusion, U32 target_width) { LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER); @@ -10115,7 +10108,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera { LLPipeline::sUseOcclusion = 0; } - LLPipeline::sShadowRender = TRUE; + LLPipeline::sShadowRender = true; U32 types[] = { LLRenderPass::PASS_SIMPLE, @@ -10258,18 +10251,18 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera gGLLastMatrix = NULL; LLPipeline::sUseOcclusion = occlude; - LLPipeline::sShadowRender = FALSE; + LLPipeline::sShadowRender = false; } static LLTrace::BlockTimerStatHandle FTM_VISIBLE_CLOUD("Visible Cloud"); -BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir) +bool LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir) { LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD); //get point cloud of intersection of frust and min, max if (getVisibleExtents(camera, min, max)) { - return FALSE; + return false; } //get set of planes on bounding box @@ -10427,10 +10420,10 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector if (fp.empty()) { - return FALSE; + return false; } - return TRUE; + return true; } void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade) @@ -10522,11 +10515,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera) LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW); - BOOL skip_avatar_update = FALSE; + bool skip_avatar_update = false; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) { - skip_avatar_update = TRUE; + skip_avatar_update = true; } if (!skip_avatar_update) @@ -11286,7 +11279,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } } -void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture) +void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, bool texture) { for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) { @@ -11372,10 +11365,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) S32 occlusion = sUseOcclusion; sUseOcclusion = 0; - sReflectionRender = sRenderDeferred ? FALSE : TRUE; + sReflectionRender = ! sRenderDeferred; - sShadowRender = TRUE; - sImpostorRender = TRUE; + sShadowRender = true; + sImpostorRender = true; LLViewerCamera* viewer_camera = LLViewerCamera::getInstance(); @@ -11624,9 +11617,9 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLVOAvatar::sUseImpostors = true; // @TODO ??? sUseOcclusion = occlusion; - sReflectionRender = FALSE; - sImpostorRender = FALSE; - sShadowRender = FALSE; + sReflectionRender = false; + sImpostorRender = false; + sShadowRender = false; popRenderTypeMask(); gGL.matrixMode(LLRender::MM_PROJECTION); @@ -11643,7 +11636,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLGLState::checkClientArrays(); } -BOOL LLPipeline::hasRenderBatches(const U32 type) const +bool LLPipeline::hasRenderBatches(const U32 type) const { return sCull->getRenderMapSize(type) > 0; } @@ -11668,12 +11661,12 @@ LLCullResult::sg_iterator LLPipeline::endAlphaGroups() return sCull->endAlphaGroups(); } -BOOL LLPipeline::hasRenderType(const U32 type) const +bool LLPipeline::hasRenderType(const U32 type) const { // STORM-365 : LLViewerJointAttachment::setAttachmentVisibility() is setting type to 0 to actually mean "do not render" - // We then need to test that value here and return FALSE to prevent attachment to render (in mouselook for instance) - // TODO: reintroduce RENDER_TYPE_NONE in LLRenderTypeMask and initialize its mRenderTypeEnabled[RENDER_TYPE_NONE] to FALSE explicitely - return (type == 0 ? FALSE : mRenderTypeEnabled[type]); + // We then need to test that value here and return false to prevent attachment to render (in mouselook for instance) + // TODO: reintroduce RENDER_TYPE_NONE in LLRenderTypeMask and initialize its mRenderTypeEnabled[RENDER_TYPE_NONE] to false explicitely + return (type == 0 ? false : mRenderTypeEnabled[type]); } void LLPipeline::setRenderTypeMask(U32 type, ...) @@ -11683,7 +11676,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...) va_start(args, type); while (type < END_RENDER_TYPES) { - mRenderTypeEnabled[type] = TRUE; + mRenderTypeEnabled[type] = true; type = va_arg(args, U32); } va_end(args); @@ -11694,7 +11687,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...) } } -BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const +bool LLPipeline::hasAnyRenderType(U32 type, ...) const { va_list args; @@ -11703,7 +11696,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const { if (mRenderTypeEnabled[type]) { - return TRUE; + return true; } type = va_arg(args, U32); } @@ -11714,7 +11707,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const LL_ERRS() << "Invalid render type." << LL_ENDL; } - return FALSE; + return false; } void LLPipeline::pushRenderTypeMask() @@ -11739,10 +11732,10 @@ void LLPipeline::andRenderTypeMask(U32 type, ...) { va_list args; - BOOL tmp[NUM_RENDER_TYPES]; + bool tmp[NUM_RENDER_TYPES]; for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) { - tmp[i] = FALSE; + tmp[i] = false; } va_start(args, type); @@ -11750,7 +11743,7 @@ void LLPipeline::andRenderTypeMask(U32 type, ...) { if (mRenderTypeEnabled[type]) { - tmp[type] = TRUE; + tmp[type] = true; } type = va_arg(args, U32); @@ -11776,7 +11769,7 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...) va_start(args, type); while (type < END_RENDER_TYPES) { - mRenderTypeEnabled[type] = FALSE; + mRenderTypeEnabled[type] = false; type = va_arg(args, U32); } @@ -11792,7 +11785,7 @@ void LLPipeline::setAllRenderTypes() { for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) { - mRenderTypeEnabled[i] = TRUE; + mRenderTypeEnabled[i] = true; } } @@ -11800,7 +11793,7 @@ void LLPipeline::clearAllRenderTypes() { for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) { - mRenderTypeEnabled[i] = FALSE; + mRenderTypeEnabled[i] = false; } } @@ -11867,7 +11860,7 @@ void LLPipeline::restorePermanentObjects( const std::vector<U32>& restoreList ) skipRenderingOfTerrain( false ); } -void LLPipeline::skipRenderingOfTerrain( BOOL flag ) +void LLPipeline::skipRenderingOfTerrain( bool flag ) { pool_set_t::iterator iter = mPools.begin(); while ( iter != mPools.end() ) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index bba36351d9..c9670a60f2 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -57,10 +57,10 @@ typedef enum e_avatar_skinning_method SKIN_METHOD_VERTEX_PROGRAM } EAvatarSkinningMethod; -BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn't be defined here! +bool compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn't be defined here! bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0); -BOOL setup_hud_matrices(); // use whole screen to render hud -BOOL setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking) +bool setup_hud_matrices(); // use whole screen to render hud +bool setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking) glh::matrix4f glh_copy_matrix(F32* src); glh::matrix4f glh_get_current_modelview(); void glh_set_current_modelview(const glh::matrix4f& mat); @@ -133,11 +133,11 @@ public: void resetVertexBuffers(LLDrawable* drawable); void generateImpostor(LLVOAvatar* avatar); void bindScreenToTexture(); - void renderBloom(BOOL for_snapshot, F32 zoom_factor = 1.f, int subfield = 0); + void renderBloom(bool for_snapshot, F32 zoom_factor = 1.f, int subfield = 0); void init(); void cleanup(); - BOOL isInit() { return mInitialized; }; + bool isInit() { return mInitialized; }; /// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture. /// @return Draw pool, or NULL if not found. @@ -171,19 +171,19 @@ public: void doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderTarget& dest, LLRenderTarget* scratch_space = NULL); void doOcclusion(LLCamera& camera); void markNotCulled(LLSpatialGroup* group, LLCamera &camera); - void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE); + void markMoved(LLDrawable *drawablep, bool damped_motion = false); void markShift(LLDrawable *drawablep); void markTextured(LLDrawable *drawablep); void markGLRebuild(LLGLUpdate* glu); - void markRebuild(LLSpatialGroup* group, BOOL priority = FALSE); - void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE); + void markRebuild(LLSpatialGroup* group, bool priority = false); + void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, bool priority = false); void markPartitionMove(LLDrawable* drawablep); void markMeshDirty(LLSpatialGroup* group); //get the object between start and end that's closest to start. LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, + bool pick_transparent, + bool pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -197,7 +197,7 @@ public: LLViewerObject* lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + bool pick_transparent, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -212,20 +212,20 @@ public: U32 addObject(LLViewerObject *obj); - void enableShadows(const BOOL enable_shadows); + void enableShadows(const bool enable_shadows); -// void setLocalLighting(const BOOL local_lighting); -// BOOL isLocalLightingEnabled() const; +// void setLocalLighting(const bool local_lighting); +// bool isLocalLightingEnabled() const; S32 setLightingDetail(S32 level); S32 getLightingDetail() const { return mLightingDetail; } S32 getMaxLightingDetail() const; - void setUseVertexShaders(BOOL use_shaders); - BOOL getUseVertexShaders() const { return mVertexShadersEnabled; } - BOOL canUseVertexShaders(); - BOOL canUseWindLightShaders() const; - BOOL canUseWindLightShadersOnObjects() const; - BOOL canUseAntiAliasing() const; + void setUseVertexShaders(bool use_shaders); + bool getUseVertexShaders() const { return mVertexShadersEnabled; } + bool canUseVertexShaders(); + bool canUseWindLightShaders() const; + bool canUseWindLightShadersOnObjects() const; + bool canUseAntiAliasing() const; // phases void resetFrameStats(); @@ -234,9 +234,9 @@ public: void updateMoveNormalAsync(LLDrawable* drawablep); void updateMovedList(LLDrawable::drawable_vector_t& move_list); void updateMove(); - BOOL visibleObjectsInFrustum(LLCamera& camera); - BOOL getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max); - BOOL getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir = LLVector3(0,0,0)); + bool visibleObjectsInFrustum(LLCamera& camera); + bool getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max); + bool getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector<LLVector3>& fp, LLVector3 light_dir = LLVector3(0,0,0)); void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0, LLPlane* plane = NULL); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane void createObjects(F32 max_dtime); void createObject(LLViewerObject* vobj); @@ -259,10 +259,10 @@ public: void postSort(LLCamera& camera); void forAllVisibleDrawables(void (*func)(LLDrawable*)); - void renderObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE); - void renderMaskedObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE); + void renderObjects(U32 type, U32 mask, bool texture = true, bool batch_texture = false); + void renderMaskedObjects(U32 type, U32 mask, bool texture = true, bool batch_texture = false); - void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture); + void renderGroups(LLRenderPass* pass, U32 type, U32 mask, bool texture); void grabReferences(LLCullResult& result); void clearReferences(); @@ -274,7 +274,7 @@ public: void checkReferences(LLSpatialGroup* group); - void renderGeom(LLCamera& camera, BOOL forceVBOUpdate = FALSE); + void renderGeom(LLCamera& camera, bool forceVBOUpdate = false); void renderGeomDeferred(LLCamera& camera); void renderGeomPostDeferred(LLCamera& camera, bool do_occlusion=true); void renderGeomShadow(LLCamera& camera); @@ -292,7 +292,7 @@ public: void setHighlightObject(LLDrawable* obj) { mHighlightObject = obj; } - void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader, BOOL use_occlusion, U32 target_width); + void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool use_shader, bool use_occlusion, U32 target_width); void renderHighlights(); void renderDebug(); void renderPhysicsDisplay(); @@ -300,13 +300,13 @@ public: void rebuildPools(); // Rebuild pools void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object - BOOL verify(); // Verify that all data in the pipeline is "correct" + bool verify(); // Verify that all data in the pipeline is "correct" S32 getLightCount() const { return mLights.size(); } void calcNearbyLights(LLCamera& camera); void setupHWLights(LLDrawPool* pool); - void setupAvatarLights(BOOL for_edit = FALSE); + void setupAvatarLights(bool for_edit = false); void enableLights(U32 mask); void enableLightsStatic(); void enableLightsDynamic(); @@ -318,9 +318,9 @@ public: void shiftObjects(const LLVector3 &offset); - void setLight(LLDrawable *drawablep, BOOL is_light); + void setLight(LLDrawable *drawablep, bool is_light); - BOOL hasRenderBatches(const U32 type) const; + bool hasRenderBatches(const U32 type) const; LLCullResult::drawinfo_iterator beginRenderMap(U32 type); LLCullResult::drawinfo_iterator endRenderMap(U32 type); LLCullResult::sg_iterator beginAlphaGroups(); @@ -329,15 +329,15 @@ public: void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES); - BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; } - BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; } + bool hasRenderDebugFeatureMask(const U32 mask) const { return bool(mRenderDebugFeatureMask & mask); } + bool hasRenderDebugMask(const U32 mask) const { return bool(mRenderDebugMask & mask); } void setAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0xffffffff; } void clearAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0x0; } void setAllRenderDebugDisplays() { mRenderDebugMask = 0xffffffff; } void clearAllRenderDebugDisplays() { mRenderDebugMask = 0x0; } - BOOL hasRenderType(const U32 type) const; - BOOL hasAnyRenderType(const U32 type, ...) const; + bool hasRenderType(const U32 type) const; + bool hasAnyRenderType(const U32 type, ...) const; void setRenderTypeMask(U32 type, ...); // This is equivalent to 'setRenderTypeMask' @@ -356,53 +356,53 @@ public: static void toggleRenderType(U32 type); // For UI control of render features - static BOOL hasRenderTypeControl(void* data); - static void toggleRenderDebug(void* data); - static void toggleRenderDebugFeature(void* data); - static void toggleRenderTypeControl(void* data); - static BOOL toggleRenderTypeControlNegated(void* data); - static BOOL toggleRenderDebugControl(void* data); - static BOOL toggleRenderDebugFeatureControl(void* data); + static bool hasRenderTypeControl(U32 data); + static void toggleRenderDebug(U32 data); + static void toggleRenderDebugFeature(U32 data); + static void toggleRenderTypeControl(U32 data); + static bool toggleRenderTypeControlNegated(S32 data); + static bool toggleRenderDebugControl(U32 data); + static bool toggleRenderDebugFeatureControl(U32 data); static void setRenderDebugFeatureControl(U32 bit, bool value); - static void setRenderParticleBeacons(BOOL val); - static void toggleRenderParticleBeacons(void* data); - static BOOL getRenderParticleBeacons(void* data); + static void setRenderParticleBeacons(bool val); + static void toggleRenderParticleBeacons(); + static bool getRenderParticleBeacons(); - static void setRenderSoundBeacons(BOOL val); - static void toggleRenderSoundBeacons(void* data); - static BOOL getRenderSoundBeacons(void* data); + static void setRenderSoundBeacons(bool val); + static void toggleRenderSoundBeacons(); + static bool getRenderSoundBeacons(); - static void setRenderMOAPBeacons(BOOL val); - static void toggleRenderMOAPBeacons(void * data); - static BOOL getRenderMOAPBeacons(void * data); + static void setRenderMOAPBeacons(bool val); + static void toggleRenderMOAPBeacons(); + static bool getRenderMOAPBeacons(); - static void setRenderPhysicalBeacons(BOOL val); - static void toggleRenderPhysicalBeacons(void* data); - static BOOL getRenderPhysicalBeacons(void* data); + static void setRenderPhysicalBeacons(bool val); + static void toggleRenderPhysicalBeacons(); + static bool getRenderPhysicalBeacons(); - static void setRenderScriptedBeacons(BOOL val); - static void toggleRenderScriptedBeacons(void* data); - static BOOL getRenderScriptedBeacons(void* data); + static void setRenderScriptedBeacons(bool val); + static void toggleRenderScriptedBeacons(); + static bool getRenderScriptedBeacons(); - static void setRenderScriptedTouchBeacons(BOOL val); - static void toggleRenderScriptedTouchBeacons(void* data); - static BOOL getRenderScriptedTouchBeacons(void* data); + static void setRenderScriptedTouchBeacons(bool val); + static void toggleRenderScriptedTouchBeacons(); + static bool getRenderScriptedTouchBeacons(); - static void setRenderBeacons(BOOL val); - static void toggleRenderBeacons(void* data); - static BOOL getRenderBeacons(void* data); + static void setRenderBeacons(bool val); + static void toggleRenderBeacons(); + static bool getRenderBeacons(); - static void setRenderHighlights(BOOL val); - static void toggleRenderHighlights(void* data); - static BOOL getRenderHighlights(void* data); + static void setRenderHighlights(bool val); + static void toggleRenderHighlights(); + static bool getRenderHighlights(); static void setRenderHighlightTextureChannel(LLRender::eTexIndex channel); // sets which UV setup to display in highlight overlay static void updateRenderBump(); static void updateRenderDeferred(); static void refreshCachedSettings(); - static void throttleNewMemoryAllocation(BOOL disable); + static void throttleNewMemoryAllocation(bool disable); @@ -410,7 +410,7 @@ public: void hidePermanentObjects( std::vector<U32>& restoreList ); void restorePermanentObjects( const std::vector<U32>& restoreList ); - void skipRenderingOfTerrain( BOOL flag ); + void skipRenderingOfTerrain( bool flag ); void hideObject( const LLUUID& id ); void restoreHiddenObject( const LLUUID& id ); @@ -418,7 +418,7 @@ private: void unloadShaders(); void addToQuickLookup( LLDrawPool* new_poolp ); void removeFromQuickLookup( LLDrawPool* poolp ); - BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority); + bool updateDrawableGeom(LLDrawable* drawable, bool priority); void assertInitializedDoError(); bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; }; void connectRefreshCachedSettingsSafe(const std::string name); @@ -539,12 +539,12 @@ public: LLSpatialPartition* getSpatialPartition(LLViewerObject* vobj); - void updateCamera(BOOL reset = FALSE); + void updateCamera(bool reset = false); LLVector3 mFlyCamPosition; LLQuaternion mFlyCamRotation; - BOOL mBackfaceCull; + bool mBackfaceCull; S32 mMatrixOpCount; S32 mTextureMatrixOps; S32 mNumVisibleNodes; @@ -557,36 +557,36 @@ public: static S32 sCompiles; - static BOOL sShowHUDAttachments; - static BOOL sForceOldBakedUpload; // If true will not use capabilities to upload baked textures. + static bool sShowHUDAttachments; + static bool sForceOldBakedUpload; // If true will not use capabilities to upload baked textures. static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write - static BOOL sDelayVBUpdate; - static BOOL sAutoMaskAlphaDeferred; - static BOOL sAutoMaskAlphaNonDeferred; - static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders - static BOOL sRenderBump; - static BOOL sBakeSunlight; - static BOOL sNoAlpha; - static BOOL sUseTriStrips; - static BOOL sUseFarClip; - static BOOL sShadowRender; - static BOOL sWaterReflections; - static BOOL sDynamicLOD; - static BOOL sPickAvatar; - static BOOL sReflectionRender; - static BOOL sImpostorRender; - static BOOL sImpostorRenderAlphaDepthPass; - static BOOL sUnderWaterRender; - static BOOL sRenderGlow; - static BOOL sTextureBindTest; - static BOOL sRenderFrameTest; - static BOOL sRenderAttachedLights; - static BOOL sRenderAttachedParticles; - static BOOL sRenderDeferred; - static BOOL sMemAllocationThrottled; + static bool sDelayVBUpdate; + static bool sAutoMaskAlphaDeferred; + static bool sAutoMaskAlphaNonDeferred; + static bool sDisableShaders; // if true, rendering will be done without shaders + static bool sRenderBump; + static bool sBakeSunlight; + static bool sNoAlpha; + static bool sUseTriStrips; + static bool sUseFarClip; + static bool sShadowRender; + static bool sWaterReflections; + static bool sDynamicLOD; + static bool sPickAvatar; + static bool sReflectionRender; + static bool sImpostorRender; + static bool sImpostorRenderAlphaDepthPass; + static bool sUnderWaterRender; + static bool sRenderGlow; + static bool sTextureBindTest; + static bool sRenderFrameTest; + static bool sRenderAttachedLights; + static bool sRenderAttachedParticles; + static bool sRenderDeferred; + static bool sMemAllocationThrottled; static S32 sVisibleLightCount; static F32 sMinRenderSize; - static BOOL sRenderingHUDs; + static bool sRenderingHUDs; static LLTrace::EventStatHandle<S64> sStatBatchSize; @@ -659,13 +659,13 @@ public: LLVector3 mSunDir; LLVector3 mTransformedSunDir; - BOOL mInitialized; - BOOL mVertexShadersEnabled; + bool mInitialized; + bool mVertexShadersEnabled; S32 mVertexShadersLoaded; // 0 = no, 1 = yes, -1 = failed U32 mTransformFeedbackPrimitives; //number of primitives expected to be generated by transform feedback protected: - BOOL mRenderTypeEnabled[NUM_RENDER_TYPES]; + bool mRenderTypeEnabled[NUM_RENDER_TYPES]; std::stack<std::string> mRenderTypeEnableStack; U32 mRenderDebugFeatureMask; @@ -843,15 +843,15 @@ protected: U32 mLightMovingMask; S32 mLightingDetail; - static BOOL sRenderPhysicalBeacons; - static BOOL sRenderMOAPBeacons; - static BOOL sRenderScriptedTouchBeacons; - static BOOL sRenderScriptedBeacons; - static BOOL sRenderParticleBeacons; - static BOOL sRenderSoundBeacons; + static bool sRenderPhysicalBeacons; + static bool sRenderMOAPBeacons; + static bool sRenderScriptedTouchBeacons; + static bool sRenderScriptedBeacons; + static bool sRenderParticleBeacons; + static bool sRenderSoundBeacons; public: - static BOOL sRenderBeacons; - static BOOL sRenderHighlight; + static bool sRenderBeacons; + static bool sRenderHighlight; // Determines which set of UVs to use in highlight display // @@ -861,26 +861,26 @@ public: static U32 sCurRenderPoolType ; //cached settings - static BOOL WindLightUseAtmosShaders; - static BOOL VertexShaderEnable; - static BOOL RenderAvatarVP; - static BOOL RenderDeferred; + static bool WindLightUseAtmosShaders; + static bool VertexShaderEnable; + static bool RenderAvatarVP; + static bool RenderDeferred; static F32 RenderDeferredSunWash; static U32 RenderFSAASamples; static U32 RenderResolutionDivisor; - static BOOL RenderUIBuffer; + static bool RenderUIBuffer; static S32 RenderShadowDetail; - static BOOL RenderDeferredSSAO; + static bool RenderDeferredSSAO; static F32 RenderShadowResolutionScale; - static BOOL RenderLocalLights; - static BOOL RenderDelayCreation; - static BOOL RenderAnimateRes; - static BOOL FreezeTime; + static bool RenderLocalLights; + static bool RenderDelayCreation; + static bool RenderAnimateRes; + static bool FreezeTime; static S32 DebugBeaconLineWidth; static F32 RenderHighlightBrightness; static LLColor4 RenderHighlightColor; static F32 RenderHighlightThickness; - static BOOL RenderSpotLightsInNondeferred; + static bool RenderSpotLightsInNondeferred; static LLColor4 PreviewAmbientColor; static LLColor4 PreviewDiffuse0; static LLColor4 PreviewSpecular0; @@ -900,8 +900,8 @@ public: static S32 RenderGlowIterations; static F32 RenderGlowWidth; static F32 RenderGlowStrength; - static BOOL RenderDepthOfField; - static BOOL RenderDepthOfFieldInEditMode; + static bool RenderDepthOfField; + static bool RenderDepthOfFieldInEditMode; static F32 CameraFocusTransitionTime; static F32 CameraFNumber; static F32 CameraFocalLength; @@ -922,7 +922,7 @@ public: static F32 RenderEdgeNormCutoff; static LLVector3 RenderShadowGaussian; static F32 RenderShadowBlurDistFactor; - static BOOL RenderDeferredAtmospheric; + static bool RenderDeferredAtmospheric; static S32 RenderReflectionDetail; static F32 RenderHighlightFadeTime; static LLVector3 RenderShadowClipPlanes; @@ -932,7 +932,7 @@ public: static LLVector3 RenderShadowSplitExponent; static F32 RenderShadowErrorCutoff; static F32 RenderShadowFOVCutoff; - static BOOL CameraOffset; + static bool CameraOffset; static F32 CameraMaxCoF; static F32 CameraDoFResScale; static F32 RenderAutoHideSurfaceAreaLimit; @@ -942,7 +942,7 @@ void render_bbox(const LLVector3 &min, const LLVector3 &max); void render_hud_elements(); extern LLPipeline gPipeline; -extern BOOL gDebugPipeline; +extern bool gDebugPipeline; extern const LLMatrix4* gGLLastMatrix; #endif diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 779b168ae0..7654f0dcd6 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -24,7 +24,7 @@ Grafik kort: [GRAPHICS_CARD] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] +CEF Version: [LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] </floater.string> diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index ec3e68ce33..198dee0a1a 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -38,7 +38,7 @@ Grafikinitialisierung fehlgeschlagen. Bitte aktualisieren Sie Ihren Grafiktreiber. </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -79,7 +79,7 @@ Erstellungszeit VFS (Cache): [VFS_TIME] <string name="AboutLibs"> J2C-Decoderversion: [J2C_VERSION] Audiotreiberversion: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF-Version: [LLCEFLIB_VERSION] +CEF-Version: [LIBCEF_VERSION] LibVLC-Version: [LIBVLC_VERSION] Voice-Server-Version: [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 8d8d546b24..8a810f32a6 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -133,18 +133,29 @@ media_plugin_libvlc </impl> </scheme> - <scheme name="libvlc"> - <label name="libvlc_label"> - LibVLC supported media - </label> - <widgettype> - movie - </widgettype> - <impl> - media_plugin_libvlc - </impl> - </scheme> - <mimetype name="blank"> + <scheme name="example"> + <label name="example_label"> + Example Plugin scheme trigger + </label> + <widgettype> + movie + </widgettype> + <impl> + media_plugin_example + </impl> + </scheme> + <scheme name="libvlc"> + <label name="libvlc_label"> + LibVLC supported media + </label> + <widgettype> + movie + </widgettype> + <impl> + media_plugin_libvlc + </impl> + </scheme> + <mimetype name="blank"> <label name="blank_label"> - None - </label> diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml index f71c24b2e4..2d96708b86 100644 --- a/indra/newview/skins/default/xui/en/mime_types_mac.xml +++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml @@ -130,7 +130,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </scheme> <mimetype name="blank"> @@ -141,7 +141,7 @@ none </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="none/none"> @@ -163,7 +163,7 @@ audio </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="video/*"> @@ -174,7 +174,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="image/*"> @@ -196,7 +196,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="application/javascript"> @@ -218,7 +218,7 @@ audio </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="application/pdf"> @@ -295,7 +295,7 @@ audio </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="audio/mpeg"> @@ -306,7 +306,7 @@ audio </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="audio/x-aiff"> @@ -317,7 +317,7 @@ audio </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="audio/x-wav"> @@ -328,7 +328,7 @@ audio </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype menu="1" name="image/bmp"> @@ -438,7 +438,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="video/mp4"> @@ -449,7 +449,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype menu="1" name="video/quicktime"> @@ -460,7 +460,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="video/x-ms-asf"> @@ -471,7 +471,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype name="video/x-ms-wmv"> @@ -482,7 +482,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> <mimetype menu="1" name="video/x-msvideo"> @@ -493,7 +493,7 @@ movie </widgettype> <impl> - media_plugin_quicktime + media_plugin_libvlc </impl> </mimetype> </mimetypes> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c9be141427..f47f8e3dfa 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -22,7 +22,7 @@ <!-- about dialog/support string--> <string name="AboutHeader"> -[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) +[CHANNEL] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig">Build Configuration [BUILD_CONFIG]</string> @@ -61,7 +61,7 @@ VFS (cache) creation time: [VFS_TIME] <string name="AboutLibs"> J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] +[LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 7cbd969ca0..67e45076e1 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -29,7 +29,7 @@ Error de inicialización de gráficos. Actualiza tu controlador de gráficos. </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -70,8 +70,8 @@ Tiempo de creación de VFS (caché): [VFS_TIME] <string name="AboutLibs"> Versión de J2C Decoder: [J2C_VERSION] Versión de Audio Driver: [AUDIO_DRIVER_VERSION] -Versión de LLCEFLib/CEF: [LLCEFLIB_VERSION] -Versión de LibVLC: [LLCEFLIB_VERSION] +Versión de CEF: [LIBCEF_VERSION] +Versión de LibVLC: [LIBVLC_VERSION] Versión de Voice Server: [VOICE_VERSION] </string> <string name="AboutTraffic"> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 6f95039aea..c0cb0f9f69 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -38,7 +38,7 @@ Échec d'initialisation des graphiques. Veuillez mettre votre pilote graphique à jour. </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [Notes de version]] </string> <string name="BuildConfig"> @@ -79,7 +79,7 @@ Durée de création VFS (cache) : [VFS_TIME] <string name="AboutLibs"> Version J2C Decoder : [J2C_VERSION] Version Audio Driver : [AUDIO_DRIVER_VERSION] -Version LLCEFLib/CEF : [LLCEFLIB_VERSION] +Version CEF : [LIBCEF_VERSION] Version LibVLC : [LIBVLC_VERSION] Version serveur vocal : [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index e7dbc7d817..85dfd96173 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -35,7 +35,7 @@ Inizializzazione grafica non riuscita. Aggiorna il driver della scheda grafica! </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -76,7 +76,7 @@ Data/ora creazione VFS (cache): [VFS_TIME] <string name="AboutLibs"> Versione J2C Decoder: [J2C_VERSION] Versione Driver audio: [AUDIO_DRIVER_VERSION] -Versione LLCEFLib/CEF: [LLCEFLIB_VERSION] +Versione CEF: [LIBCEF_VERSION] Versione LibVLC: [LIBVLC_VERSION] Versione Server voice: [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index f3b3823e28..0e08c4fafa 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -38,7 +38,7 @@ グラフィックを初期化できませんでした。グラフィックドライバを更新してください。 </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -79,7 +79,7 @@ VFS(キャッシュ)作成時間: [VFS_TIME] <string name="AboutLibs"> J2C デコーダバージョン:[J2C_VERSION] オーディオドライババージョン:[AUDIO_DRIVER_VERSION] -LLCEFLib/CEF バージョン: [LLCEFLIB_VERSION] +CEF バージョン: [LIBCEF_VERSION] LibVLC バージョン: [LIBVLC_VERSION] ボイスサーバーバージョン:[VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index e9dd18043d..9aece1221d 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -43,7 +43,7 @@ Wersja OpenGL: [OPENGL_VERSION] Wersja dekodera J2C: [J2C_VERSION] Wersja sterownika dźwięku (Audio Driver): [AUDIO_DRIVER_VERSION] -Wersja LLCEFLib/CEF: [LLCEFLIB_VERSION] +Wersja CEF: [LIBCEF_VERSION] Wersja LibVLC: [LIBVLC_VERSION] Wersja serwera głosu (Voice Server): [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 0d50722cc5..6cae93e2ea 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -29,7 +29,7 @@ Falha na inicialização dos gráficos. Atualize seu driver gráfico! </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -70,7 +70,7 @@ Tempo de criação de VFS (cache): [VFS_TIME] <string name="AboutLibs"> Versão do J2C Decoder: [J2C_VERSION] Versão do driver de áudio: [AUDIO_DRIVER_VERSION] -Versão de LLCEFLib/CEF: [LLCEFLIB_VERSION] +Versão de CEF: [LIBCEF_VERSION] Versão da LibVLC: [LIBVLC_VERSION] Versão do servidor de voz: [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 86ef6298ac..c8ab07bd43 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -38,7 +38,7 @@ Ошибка инициализации графики. Обновите графический драйвер! </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -79,7 +79,7 @@ SLURL: <nolink>[SLURL]</nolink> <string name="AboutLibs"> Версия декодера J2C: [J2C_VERSION] Версия драйвера звука: [AUDIO_DRIVER_VERSION] -Версия LLCEFLib/CEF: [LLCEFLIB_VERSION] +Версия CEF: [LIBCEF_VERSION] Версия LibVLC: [LIBVLC_VERSION] Версия голосового сервера: [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index 1b9ce23900..3064520b10 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -38,7 +38,7 @@ Grafik başlatma başarılamadı. Lütfen grafik sürücünüzü güncelleştirin! </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -79,7 +79,7 @@ VFS (önbellek) oluşturma zamanı: [VFS_TIME] <string name="AboutLibs"> J2C Kod Çözücü Sürümü: [J2C_VERSION] Ses Sürücüsü Sürümü: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Sürümü: [LLCEFLIB_VERSION] +CEF Sürümü: [LIBCEF_VERSION] LibVLC Sürümü: [LIBVLC_VERSION] Ses Sunucusu Sürümü: [VOICE_VERSION] </string> diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index c640c12143..7490c01cc1 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -38,7 +38,7 @@ 顯像初始化失敗。 請更新你的顯像卡驅動程式! </string> <string name="AboutHeader"> - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] </string> <string name="BuildConfig"> @@ -79,7 +79,7 @@ VFS(快取)建立時間:[VFS_TIME] <string name="AboutLibs"> J2C 解碼器版本: [J2C_VERSION] 音效驅動程式版本: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF版本:[LLCEFLIB_VERSION] +CEF版本:[LIBCEF_VERSION] LibVLC版本:[LIBVLC_VERSION]N] 語音伺服器版本: [VOICE_VERSION] </string> diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index 6b0be29c2d..f1f69f33f1 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -29,6 +29,13 @@ #include "../llversioninfo.h" +// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The +// macro expands to the string name of the channel, but without quotes. We +// need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) +#define ll_viewer_channel stringize_outer(LL_VIEWER_CHANNEL) + namespace tut { struct versioninfo @@ -50,7 +57,7 @@ namespace tut mShortVersion = stream.str(); stream.str(""); - stream << LL_VIEWER_CHANNEL + stream << ll_viewer_channel << " " << mVersion; mVersionAndChannel = stream.str(); @@ -89,7 +96,7 @@ namespace tut LL_VIEWER_VERSION_BUILD); ensure_equals("Channel version", LLVersionInfo::getChannel(), - LL_VIEWER_CHANNEL); + ll_viewer_channel); ensure_equals("Version String", LLVersionInfo::getVersion(), mVersion); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 66d730d1ac..142951da25 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -41,10 +41,7 @@ viewer_dir = os.path.dirname(__file__) # indra.util.llmanifest under their system Python! sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python")) from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError -try: - from llbase import llsd -except ImportError: - from indra.base import llsd +from llbase import llsd class ViewerManifest(LLManifest): def is_packaging_viewer(self): @@ -287,7 +284,8 @@ class ViewerManifest(LLManifest): random.shuffle(names) return ', '.join(names) -class Windows_i686_Manifest(ViewerManifest): + +class WindowsManifest(ViewerManifest): def final_exe(self): return self.app_name_oneword()+".exe" @@ -338,7 +336,7 @@ class Windows_i686_Manifest(ViewerManifest): print "Doesn't exist:", src def construct(self): - super(Windows_i686_Manifest, self).construct() + super(WindowsManifest, self).construct() pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") @@ -378,31 +376,24 @@ class Windows_i686_Manifest(ViewerManifest): # Get fmodex dll, continue if missing try: - if self.args['configuration'].lower() == 'debug': - self.path("fmodexL.dll") + if(self.args['arch'].lower() == 'x86_64'): + self.path("fmodex64.dll") else: self.path("fmodex.dll") except: print "Skipping fmodex audio library(assuming other audio engine)" # For textures - if self.args['configuration'].lower() == 'debug': - self.path("openjpegd.dll") - else: - self.path("openjpeg.dll") + self.path("openjpeg.dll") # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx if self.args['configuration'].lower() == 'debug': self.path("msvcr120d.dll") self.path("msvcp120d.dll") - self.path("msvcr100d.dll") - self.path("msvcp100d.dll") else: self.path("msvcr120.dll") self.path("msvcp120.dll") - self.path("msvcr100.dll") - self.path("msvcp100.dll") # Vivox runtimes self.path("SLVoice.exe") @@ -434,11 +425,6 @@ class Windows_i686_Manifest(ViewerManifest): self.path("featuretable.txt") self.path("featuretable_xp.txt") - # Media plugins - QuickTime - if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"): - self.path("media_plugin_quicktime.dll") - self.end_prefix() - # Media plugins - CEF if self.prefix(src='../media_plugins/cef/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_cef.dll") @@ -449,38 +435,39 @@ class Windows_i686_Manifest(ViewerManifest): self.path("media_plugin_libvlc.dll") self.end_prefix() - # winmm.dll shim - if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""): - self.path("winmm.dll") - self.end_prefix() + # Media plugins - Example (useful for debugging - not shipped with release viewer) + if self.channel_type() != 'release': + if self.prefix(src='../media_plugins/example/%s' % self.args['configuration'], dst="llplugin"): + self.path("media_plugin_example.dll") + self.end_prefix() # CEF runtime files - debug if self.args['configuration'].lower() == 'debug': if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): + self.path("chrome_elf.dll") self.path("d3dcompiler_43.dll") self.path("d3dcompiler_47.dll") self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("llceflib_host.exe") + self.path("dullahan_host.exe") self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") - self.path("wow_helper.exe") self.end_prefix() else: # CEF runtime files - not debug (release, relwithdebinfo etc.) if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): + self.path("chrome_elf.dll") self.path("d3dcompiler_43.dll") self.path("d3dcompiler_47.dll") self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("llceflib_host.exe") + self.path("dullahan_host.exe") self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") - self.path("wow_helper.exe") self.end_prefix() # MSVC DLLs needed for CEF and have to be in same directory as plugin @@ -648,6 +635,13 @@ class Windows_i686_Manifest(ViewerManifest): Caption "%(caption)s" """ + if(self.args['arch'].lower() == 'x86_64'): + engage_registry="SetRegView 64" + program_files="$PROGRAMFILES64" + else: + engage_registry="SetRegView 32" + program_files="$PROGRAMFILES32" + tempfile = "secondlife_setup_tmp.nsi" # the following replaces strings in the nsi template # it also does python-style % substitution @@ -656,6 +650,8 @@ class Windows_i686_Manifest(ViewerManifest): "%%SOURCE%%":self.get_src_prefix(), "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), + "%%PROGRAMFILES%%":program_files, + "%%ENGAGEREGISTRY%%":engage_registry, "%%DELETE_FILES%%":self.nsi_file_commands(False)}) # We use the Unicode version of NSIS, available from @@ -671,7 +667,7 @@ class Windows_i686_Manifest(ViewerManifest): while (not installer_created) and (nsis_attempts > 0): try: nsis_attempts-=1; - self.run_command('"' + NSIS_path + '" ' + self.dst_path_of(tempfile)) + self.run_command('"' + NSIS_path + '" /V2 ' + self.dst_path_of(tempfile)) installer_created=True # if no exception was raised, the codesign worked except ManifestError, err: if nsis_attempts: @@ -699,7 +695,17 @@ class Windows_i686_Manifest(ViewerManifest): self.package_file = installer_file -class Darwin_i386_Manifest(ViewerManifest): +class Windows_i686_Manifest(WindowsManifest): + # specialize when we must + pass + + +class Windows_x86_64_Manifest(WindowsManifest): + # specialize when we must + pass + + +class DarwinManifest(ViewerManifest): def is_packaging_viewer(self): # darwin requires full app bundle packaging even for debugging. return True @@ -725,7 +731,7 @@ class Darwin_i386_Manifest(ViewerManifest): # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): - super(Darwin_i386_Manifest, self).construct() + super(DarwinManifest, self).construct() if self.prefix("cursors_mac"): self.path("*.tif") @@ -793,7 +799,7 @@ class Darwin_i386_Manifest(ViewerManifest): "libapr-1.0.dylib", "libaprutil-1.0.dylib", "libcollada14dom.dylib", - "libexpat.1.5.2.dylib", + "libexpat.1.dylib", "libexception_handler.dylib", "libGLOD.dylib", ): @@ -844,24 +850,58 @@ class Darwin_i386_Manifest(ViewerManifest): except OSError as err: print "Can't symlink %s -> %s: %s" % (src, dst, err) - # LLCefLib helper apps go inside SLPlugin.app + # Dullahan helper apps go inside SLPlugin.app if self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"): - for helperappfile in ('LLCefLib Helper.app', - 'LLCefLib Helper EH.app'): + for helperappfile in ('DullahanHelper.app'): self.path2basename(relpkgdir, helperappfile) pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework'); + # Putting a Frameworks directory under Contents/MacOS + # isn't canonical, but the path baked into Dullahan + # Helper.app/Contents/MacOS/DullahanHelper is: + # @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework + # (notice, not @executable_path/../Frameworks/etc.) + # So we'll create a symlink (below) from there back to the + # Frameworks directory nested under SLPlugin.app. + helperframeworkpath = \ + self.dst_path_of('DullahanHelper.app/Contents/MacOS/' + 'Frameworks/Chromium Embedded Framework.framework') self.end_prefix() + helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') + self.run_command('install_name_tool -change ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' + '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) + # SLPlugin plugins if self.prefix(src="", dst="llplugin"): - self.path2basename("../media_plugins/quicktime/" + self.args['configuration'], - "media_plugin_quicktime.dylib") self.path2basename("../media_plugins/cef/" + self.args['configuration'], "media_plugin_cef.dylib") + + # copy LibVLC plugin itself + self.path2basename("../media_plugins/libvlc/" + self.args['configuration'], + "media_plugin_libvlc.dylib") + + # copy LibVLC dynamic libraries + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release' ), dst="lib"): + self.path( "libvlc*.dylib*" ) + self.end_prefix() + + # copy LibVLC plugins folder + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="lib"): + self.path( "*.dylib" ) + self.path( "plugins.dat" ) + self.end_prefix() + self.end_prefix("llplugin") + # do this install_name_tool *after* media plugin is copied over + dylibexecutablepath = self.dst_path_of('llplugin/media_plugin_cef.dylib') + self.run_command('install_name_tool -change ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' + '"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % dylibexecutablepath) + self.end_prefix("Resources") # CEF framework goes inside Second Life.app/Contents/Frameworks @@ -879,16 +919,36 @@ class Darwin_i386_Manifest(ViewerManifest): # this symlink, Second Life web media can't possibly work. # Real Framework folder: # Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/ - # Location of symlink and why it'ds relative + # Location of symlink and why it's relative # Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/ # Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative) # <top level>.app/Contents/Frameworks/Chromium Embedded Framework.framework/ # <top level>.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -> - frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework") + # It might seem simpler just to create a symlink Frameworks to + # the parent of Chromimum Embedded Framework.framework. But + # that would create a symlink cycle, which breaks our + # packaging step. So make a symlink from Chromium Embedded + # Framework.framework to the directory of the same name, which + # is NOT an ancestor of the symlink. + frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, + os.pardir, "Frameworks", + "Chromium Embedded Framework.framework") try: - symlinkf(frameworkpath, pluginframeworkpath) + # from SLPlugin.app/Contents/Frameworks/Chromium Embedded + # Framework.framework back to Second + # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework + origin, target = pluginframeworkpath, frameworkpath + symlinkf(target, origin) + # from SLPlugin.app/Contents/Frameworks/Dullahan + # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded + # Framework.framework back to + # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework + self.cmakedirs(os.path.dirname(helperframeworkpath)) + origin = helperframeworkpath + target = os.path.join(os.pardir, frameworkpath) + symlinkf(target, origin) except OSError as err: - print "Can't symlink %s -> %s: %s" % (frameworkpath, pluginframeworkpath, err) + print "Can't symlink %s -> %s: %s" % (origin, target, err) raise self.end_prefix("Contents") @@ -922,7 +982,7 @@ class Darwin_i386_Manifest(ViewerManifest): # make sure we don't have stale files laying about self.remove(sparsename, finalname) - self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1000 -layout SPUD' % { + self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1300 -layout SPUD' % { 'sparse':sparsename, 'vol':volname}) @@ -1052,6 +1112,20 @@ class Darwin_i386_Manifest(ViewerManifest): self.package_file = finalname self.remove(sparsename) + +class Darwin_i386_Manifest(DarwinManifest): + pass + + +class Darwin_i686_Manifest(DarwinManifest): + """alias in case arch is passed as i686 instead of i386""" + pass + + +class Darwin_x86_64_Manifest(DarwinManifest): + pass + + class LinuxManifest(ViewerManifest): def construct(self): super(LinuxManifest, self).construct() |