From fd45c728b24896a7438ba18ca3b38e32d2faf67c Mon Sep 17 00:00:00 2001
From: AndreyL ProductEngine <andreylproductengine@lindenlab.com>
Date: Fri, 12 Jun 2015 11:11:38 +0300
Subject: MAINT-5277 FIXED Viewer is missing MSVCP100.DLL and MSVCR100.DLL

---
 indra/cmake/Copy3rdPartyLibs.cmake | 131 ++++++++++++++++++++-----------------
 indra/newview/viewer_manifest.py   |   4 ++
 2 files changed, 75 insertions(+), 60 deletions(-)

diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 84947adaae..4d4bc2c33c 100755
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -70,76 +70,87 @@ if(WINDOWS)
     # Copy MS C runtime dlls, required for packaging.
     # *TODO - Adapt this to support VC9
     if (MSVC80)
-        set(MSVC_VER 80)
-        set(MSVC_VERDOT 8.0)
+        list(APPEND LMSVC_VER 80)
+        list(APPEND LMSVC_VERDOT 8.0)
     elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010
-        set(MSVC_VER 100)
-        set(MSVC_VERDOT 10.0)
+        MESSAGE(STATUS "MSVC_VERSION ${MSVC_VERSION}")
     elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12
-        set(MSVC_VER 120)
-        set(MSVC_VERDOT 12.0)
+        list(APPEND LMSVC_VER 120)
+        list(APPEND LMSVC_VERDOT 12.0)
     else (MSVC80)
         MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake")
     endif (MSVC80)
 
-    FIND_PATH(debug_msvc_redist_path msvcr${MSVC_VER}d.dll
-        PATHS
-        ${MSVC_DEBUG_REDIST_PATH}
-         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
-        NO_DEFAULT_PATH
-        )
-
-    if(EXISTS ${debug_msvc_redist_path})
-        set(debug_msvc_files
-            msvcr${MSVC_VER}d.dll
-            msvcp${MSVC_VER}d.dll
-            )
-
-        copy_if_different(
-            ${debug_msvc_redist_path}
-            "${SHARED_LIB_STAGING_DIR_DEBUG}"
-            out_targets
-            ${debug_msvc_files}
-            )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-
-    endif ()
-
-    FIND_PATH(release_msvc_redist_path msvcr${MSVC_VER}.dll
-        PATHS
-        ${MSVC_REDIST_PATH}
-         [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC${MSVC_VER}.CRT
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
-        [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
-        NO_DEFAULT_PATH
-        )
-
-    if(EXISTS ${release_msvc_redist_path})
-        set(release_msvc_files
-            msvcr${MSVC_VER}.dll
-            msvcp${MSVC_VER}.dll
-            )
-
-        copy_if_different(
-            ${release_msvc_redist_path}
-            "${SHARED_LIB_STAGING_DIR_RELEASE}"
-            out_targets
-            ${release_msvc_files}
+    # try to copy VS2010 redist independently of system version
+    list(APPEND LMSVC_VER 100)
+    list(APPEND LMSVC_VERDOT 10.0)
+    
+    list(LENGTH LMSVC_VER count)
+    math(EXPR count "${count}-1")
+    foreach(i RANGE ${count})
+        list(GET LMSVC_VER ${i} MSVC_VER)
+        list(GET LMSVC_VERDOT ${i} MSVC_VERDOT)
+        MESSAGE(WARNING "!!!===  ${i}   ${MSVC_VER} ${MSVC_VERDOT}")
+        FIND_PATH(debug_msvc_redist_path NAME msvcr${MSVC_VER}d.dll
+            PATHS            
+            [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT
+            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
+            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
+            ${MSVC_DEBUG_REDIST_PATH}
+            NO_DEFAULT_PATH
             )
-        set(third_party_targets ${third_party_targets} ${out_targets})
 
-        copy_if_different(
-            ${release_msvc_redist_path}
-            "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
-            out_targets
-            ${release_msvc_files}
+        if(EXISTS ${debug_msvc_redist_path})
+            set(debug_msvc_files
+                msvcr${MSVC_VER}d.dll
+                msvcp${MSVC_VER}d.dll
+                )
+
+            copy_if_different(
+                ${debug_msvc_redist_path}
+                "${SHARED_LIB_STAGING_DIR_DEBUG}"
+                out_targets
+                ${debug_msvc_files}
+                )
+            set(third_party_targets ${third_party_targets} ${out_targets})
+
+            unset(debug_msvc_redist_path CACHE)
+        endif()
+
+        FIND_PATH(release_msvc_redist_path NAME msvcr${MSVC_VER}.dll
+            PATHS            
+            [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC${MSVC_VER}.CRT
+            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
+            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
+            ${MSVC_REDIST_PATH}
+            NO_DEFAULT_PATH
             )
-        set(third_party_targets ${third_party_targets} ${out_targets})
-          
-    endif ()
 
+        if(EXISTS ${release_msvc_redist_path})
+            set(release_msvc_files
+                msvcr${MSVC_VER}.dll
+                msvcp${MSVC_VER}.dll
+                )
+
+            copy_if_different(
+                ${release_msvc_redist_path}
+                "${SHARED_LIB_STAGING_DIR_RELEASE}"
+                out_targets
+                ${release_msvc_files}
+                )
+            set(third_party_targets ${third_party_targets} ${out_targets})
+
+            copy_if_different(
+                ${release_msvc_redist_path}
+                "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+                out_targets
+                ${release_msvc_files}
+                )
+            set(third_party_targets ${third_party_targets} ${out_targets})
+
+            unset(release_msvc_redist_path CACHE)
+        endif()
+    endforeach()
 
 elseif(DARWIN)
     set(SHARED_LIB_STAGING_DIR_DEBUG            "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 32cf9d3df6..cae6bded9f 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -387,9 +387,13 @@ class Windows_i686_Manifest(ViewerManifest):
             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")
-- 
cgit v1.2.3


From c76e983b03f281d71844e2aad72056e541f3e4bf Mon Sep 17 00:00:00 2001
From: AndreyL ProductEngine <andreylproductengine@lindenlab.com>
Date: Fri, 12 Jun 2015 11:37:17 +0300
Subject: MAINT-2577 Fixed the status message

---
 indra/cmake/Copy3rdPartyLibs.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 4d4bc2c33c..a6fd756c88 100755
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -90,7 +90,7 @@ if(WINDOWS)
     foreach(i RANGE ${count})
         list(GET LMSVC_VER ${i} MSVC_VER)
         list(GET LMSVC_VERDOT ${i} MSVC_VERDOT)
-        MESSAGE(WARNING "!!!===  ${i}   ${MSVC_VER} ${MSVC_VERDOT}")
+        MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VERDOT}")
         FIND_PATH(debug_msvc_redist_path NAME msvcr${MSVC_VER}d.dll
             PATHS            
             [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT
-- 
cgit v1.2.3


From da24b073f488ee476fedf30add7122b0ae93c56f Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 15 Jun 2015 10:51:59 -0400
Subject: Added tag 3.7.30-release for changeset 67edc442c80b

---
 .hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgtags b/.hgtags
index 8db85d9611..209f17c332 100755
--- a/.hgtags
+++ b/.hgtags
@@ -502,3 +502,4 @@ d3d0101e980ec95043e0af9b7903045d3bc447e4 3.7.24-release
 afd8d4756e8eda3c8f760625d1c17a2ad40ad6c8 3.7.27-release
 566874eb5ab26c003ef7fb0e22ce40c5fa0013f4 3.7.28-release
 d07f76c5b9860fb87924d00ca729f7d4532534d6 3.7.29-release
+67edc442c80b8d2fadd2a6c4a7184b469906cdbf 3.7.30-release
-- 
cgit v1.2.3


From e0f5ed29daa3b2803aaec60a77bde8df7df292ee Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 15 Jun 2015 10:51:59 -0400
Subject: increment viewer version to 3.7.31

---
 indra/newview/VIEWER_VERSION.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index ef239df8cd..ca06baa571 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.30
+3.7.31
-- 
cgit v1.2.3