diff --git a/.gitignore b/.gitignore
index 5d51756c32..a8c150ae66 100755
--- a/.gitignore
+++ b/.gitignore
@@ -51,6 +51,8 @@ indra/newview/pilot.txt
indra/newview/pilot.xml
indra/newview/res-sdl/ll_icon.*
indra/newview/res/ll_icon.*
+indra/newview/res-sdl/firestorm_icon.*
+indra/newview/res/firestorm_icon.*
indra/newview/search_history.txt
indra/newview/teleport_history.txt
indra/newview/typed_locations.txt
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 30f8794577..c0652e556c 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -103,10 +103,26 @@ if(WINDOWS)
set(MSVC_VER 120)
elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017
set(MSVC_VER 140)
+ set(MSVC_TOOLSET_VER 141)
+ elseif (MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930) # Visual Studio 2019
+ set(MSVC_VER 140)
+ set(MSVC_TOOLSET_VER 142)
else (MSVC80)
MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake")
endif (MSVC80)
+ # Try using the VC runtime redistributables that came with the VS installation first
+ if (MSVC_TOOLSET_VER AND DEFINED ENV{VCTOOLSREDISTDIR})
+ if(ADDRESS_SIZE EQUAL 32)
+ set(redist_find_path "$ENV{VCTOOLSREDISTDIR}x86\\Microsoft.VC${MSVC_TOOLSET_VER}.CRT")
+ else(ADDRESS_SIZE EQUAL 32)
+ set(redist_find_path "$ENV{VCTOOLSREDISTDIR}x64\\Microsoft.VC${MSVC_TOOLSET_VER}.CRT")
+ endif(ADDRESS_SIZE EQUAL 32)
+ get_filename_component(redist_path "${redist_find_path}" ABSOLUTE)
+ MESSAGE(STATUS "VC Runtime redist path: ${redist_path}")
+ endif (MSVC_TOOLSET_VER AND DEFINED ENV{VCTOOLSREDISTDIR})
+ #
+
if(ADDRESS_SIZE EQUAL 32)
# this folder contains the 32bit DLLs.. (yes really!)
set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64")
@@ -125,10 +141,19 @@ if(WINDOWS)
# Check each of them.
foreach(release_msvc_file
msvcp${MSVC_VER}.dll
- msvcr${MSVC_VER}.dll
+ #msvcr${MSVC_VER}.dll # Can't build with older VS versions anyway - no need trying to copy this file
vcruntime${MSVC_VER}.dll
)
- if(EXISTS "${registry_path}/${release_msvc_file}")
+ # Try using the VC runtime redistributables that came with the VS installation first
+ if(redist_path AND EXISTS "${redist_path}/${release_msvc_file}")
+ MESSAGE(STATUS "Copying redist file from ${redist_path}/${release_msvc_file}")
+ to_staging_dirs(
+ ${redist_path}
+ third_party_targets
+ ${release_msvc_file})
+ #
+ elseif(EXISTS "${registry_path}/${release_msvc_file}")
+ MESSAGE(STATUS "Copying redist file from ${registry_path}/${release_msvc_file}")
to_staging_dirs(
${registry_path}
third_party_targets
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index a11378259f..3835d6649e 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -1276,6 +1276,58 @@ std::string LLStringUtil::getLocale(void)
template<>
void LLStringUtil::formatNumber(std::string& numStr, std::string decimals)
{
+// Windows does not/cannot use UTF8 in char strings(1). So to get valid conversions we need to widen the strings to wchar_t(2) do the formatting in std::wstring, then convert
+// down to UTF8 again.
+// 1: Since Win 10 Build 17134 (April 2018 Update) Windows can work with UTF8, so using a codepage like Linux/OSX (lang_region.uf8) via (for example) de_DE.UTF-8
+// in language_settings.xml could work.
+// 2: The LL way would be to use llwachr/LLWString and thus in UTF32. But std::basic_string< llwchar > is unusable to what seems
+// a crt bug (https://stackoverflow.com/questions/48716223/compile-error-for-char-based-stl-stream-containers-in-visual-studio)
+// A workaround would be using std::basic_stringstream< char32_t > then using later std::transform to static_cast each code point from char32_t to llwchar (u32) and thus create a LLWString from
+// a std::basic_string< char32_t >.
+//
+// For Linux/OSX the old routinewith std::stringstream should be fine. Those systems use a UTF8 codepage.
+#if LL_WINDOWS
+ std::wstringstream strStream;
+ S32 intDecimals = 0;
+
+ std::wstring wDecimals = utf8str_to_utf16str(decimals);
+ std::wstring wNumStr = utf8str_to_utf16str(numStr);
+ LLStringUtilBase::convertToS32 (wDecimals, intDecimals);
+ if (!sLocale.empty())
+ {
+ // std::locale() throws if the locale is unknown! (EXT-7926)
+ try
+ {
+ // Use user's system locale setting for number formatting
+ //strStream.imbue(std::locale(sLocale.c_str()));
+ strStream.imbue(std::locale(""));
+ } catch (const std::exception &)
+ {
+ LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL;
+ }
+ }
+
+ if (!intDecimals)
+ {
+ S32 intStr;
+
+ if (LLStringUtilBase::convertToS32(wNumStr, intStr))
+ {
+ strStream << intStr;
+ numStr = wstring_to_utf8str( strStream.str() );
+ }
+ }
+ else
+ {
+ F32 floatStr;
+
+ if (LLStringUtilBase::convertToF32(wNumStr, floatStr))
+ {
+ strStream << std::fixed << std::showpoint << std::setprecision(intDecimals) << floatStr;
+ numStr = wstring_to_utf8str( strStream.str() );
+ }
+ }
+#else
std::stringstream strStream;
S32 intDecimals = 0;
@@ -1285,7 +1337,7 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals)
// std::locale() throws if the locale is unknown! (EXT-7926)
try
{
- // FIRE-6070: Use user's system locale setting for number formatting
+ // Use user's system locale setting for number formatting
//strStream.imbue(std::locale(sLocale.c_str()));
strStream.imbue(std::locale(""));
} catch (const std::exception &)
@@ -1302,11 +1354,6 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals)
{
strStream << intStr;
numStr = strStream.str();
- // FIRE-6070: Fix random symbols in formatted numbers in some locales
-#ifdef LL_WINDOWS
- numStr = ll_convert_string_to_utf8_string(numStr);
-#endif
- //
}
}
else
@@ -1317,13 +1364,9 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals)
{
strStream << std::fixed << std::showpoint << std::setprecision(intDecimals) << floatStr;
numStr = strStream.str();
- // FIRE-6070: Fix random symbols in formatted numbers in some locales
-#ifdef LL_WINDOWS
- numStr = ll_convert_string_to_utf8_string(numStr);
-#endif
- //
}
}
+#endif
}
// static
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 120001e29c..5ebfe1f607 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -178,6 +178,10 @@ public:
static bool isSpace(char elem) { return isspace((unsigned char)elem) != 0; }
static bool isSpace(llwchar elem) { return iswspace(elem) != 0; }
+ // Specialisation needed for correct number formatting
+#if LL_WINDOWS
+ static bool isSpace(wchar_t elem) { return iswspace(elem) != 0; }
+#endif
static bool isUpper(char elem) { return isupper((unsigned char)elem) != 0; }
static bool isUpper(llwchar elem) { return iswupper(elem) != 0; }
diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp
index c9047f48f9..ec4aec10d9 100644
--- a/indra/llinventory/llfoldertype.cpp
+++ b/indra/llinventory/llfoldertype.cpp
@@ -102,6 +102,8 @@ LLFolderDictionary::LLFolderDictionary()
addEntry(LLFolderType::FT_SETTINGS, new FolderEntry("settings", TRUE));
+ addEntry(LLFolderType::FT_MY_SUITCASE, new FolderEntry("suitcase", TRUE)); // OpenSim HG-support
+
addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE));
};
diff --git a/indra/llinventory/llfoldertype.h b/indra/llinventory/llfoldertype.h
index cda18e2237..0f231a76dd 100644
--- a/indra/llinventory/llfoldertype.h
+++ b/indra/llinventory/llfoldertype.h
@@ -99,6 +99,8 @@ public:
FT_RLV = 59,
// Folder types for our own virtual system folders
+ FT_MY_SUITCASE = 100, // OpenSim HG-support
+
FT_COUNT,
FT_NONE = -1
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 7c0e54a973..f1ad9fed5f 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -430,6 +430,7 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
memset(mCurrentGammaRamp, 0, sizeof(mCurrentGammaRamp));
memset(mPrevGammaRamp, 0, sizeof(mPrevGammaRamp));
mCustomGammaSet = FALSE;
+ mWindowHandle = NULL; // Initialize...
if (!SystemParametersInfo(SPI_GETMOUSEVANISH, 0, &mMouseVanish, 0))
{
@@ -1141,7 +1142,9 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
<< " Height: " << (window_rect.bottom - window_rect.top)
<< " Fullscreen: " << mFullscreen
<< LL_ENDL;
- if (!destroy_window_handler(mWindowHandle))
+ // Only try destroying an existing window
+ //if (!destroy_window_handler(mWindowHandle))
+ if (mWindowHandle && !destroy_window_handler(mWindowHandle))
{
LL_WARNS("Window") << "Failed to properly close window before recreating it!" << LL_ENDL;
}
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 54a1778485..be7149a090 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1796,6 +1796,29 @@ if (LINUX)
SET_SOURCE_FILES_PROPERTIES(llviewermenu.cpp PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments)
endif()
#
+
+ # Replace the icons with the appropriate ones for the channel
+ # ('test' is the default)
+ set(ICON_PATH "private")
+ string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
+ if(channel_lower MATCHES "release")
+ set(ICON_PATH "release")
+ elseif(channel_lower MATCHES "beta")
+ set(ICON_PATH "beta")
+ elseif(channel_lower MATCHES "project")
+ set(ICON_PATH "project")
+ endif()
+
+ if (OPENSIM)
+ set(ICON_PATH "${ICON_PATH}-os")
+ endif (OPENSIM)
+
+ message(STATUS "Copying icons for ${ICON_PATH}")
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_PATH}/firestorm_256.bmp"
+ "${CMAKE_CURRENT_SOURCE_DIR}/res-sdl/firestorm_icon.BMP"
+ )
endif (LINUX)
if (WINDOWS)
@@ -1836,18 +1859,25 @@ if (WINDOWS)
# Replace the icons with the appropriate ones for the channel
# ('test' is the default)
set(ICON_PATH "private")
- set(VIEWER_MACOSX_PHASE "d")
+ #set(VIEWER_MACOSX_PHASE "d") # Moved to OSX section
string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
if(channel_lower MATCHES "release")
set(ICON_PATH "release")
- set(VIEWER_MACOSX_PHASE "f")
+ #set(VIEWER_MACOSX_PHASE "f") # Moved to OSX section
elseif(channel_lower MATCHES "beta")
set(ICON_PATH "beta")
- set(VIEWER_MACOSX_PHASE "b")
+ #set(VIEWER_MACOSX_PHASE "b") # Moved to OSX section
elseif(channel_lower MATCHES "project")
set(ICON_PATH "project")
- set(VIEWER_MACOSX_PHASE "a")
+ #set(VIEWER_MACOSX_PHASE "a") # Moved to OSX section
endif()
+
+ # FIRE-24335: Use different icon for OpenSim version
+ if (OPENSIM)
+ set(ICON_PATH "${ICON_PATH}-os")
+ endif (OPENSIM)
+ #
+
message(STATUS "Copying icons for ${ICON_PATH}")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different
@@ -2585,6 +2615,18 @@ endif (NOT ENABLE_MEDIA_PLUGINS)
endif (LINUX)
if (DARWIN)
+ # Moved from Windows section
+ set(VIEWER_MACOSX_PHASE "d")
+ string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
+ if(channel_lower MATCHES "release")
+ set(VIEWER_MACOSX_PHASE "f")
+ elseif(channel_lower MATCHES "beta")
+ set(VIEWER_MACOSX_PHASE "b")
+ elseif(channel_lower MATCHES "project")
+ set(VIEWER_MACOSX_PHASE "a")
+ endif()
+ #
+
# These all get set with PROPERTIES. It's not that the property names are
# magically known to CMake -- it's that these names are referenced in the
# Info-SecondLife.plist file in the configure_file() directive below.
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index d613169e88..0438a6cd91 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.4.12
+6.4.13
diff --git a/indra/newview/app_settings/graphic_preset_controls.xml b/indra/newview/app_settings/graphic_preset_controls.xml
index 91888f04c1..303463aa3c 100644
--- a/indra/newview/app_settings/graphic_preset_controls.xml
+++ b/indra/newview/app_settings/graphic_preset_controls.xml
@@ -7,6 +7,11 @@
CameraFocusTransitionTime
CameraFNumber
FramePerSecondLimit
+ FSAllowWaterDistortionOcclusion
+ FSDynamicTextureMemory
+ FSDynamicTextureMemoryCacheReserve
+ FSDynamicTextureMemoryGPUReserve
+ FSDynamicTextureMemoryMinTextureMemory
FSLimitFramerate
FSRenderDoFUnderwater
FSRenderVignette
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 89f5bc2cd0..dbb53bbe34 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -210,6 +210,19 @@
Value
1
+
+ FSAvatarTurnSpeed
+
+
FSUseLegacyClienttags
+ FSOpenSimAlwaysForceShowGrid
+
ForceMandatoryUpdate
+ FSMeshUploadAutoEnableWeights
+
+ FSMeshUploadAutoShowWeightsWhenEnabled
+
MeshPreviewCanvasColor
+ FSFocusPointLocked
+
+ FSFocusPointFollowsPointer
+
CameraDoFResScale