dessie linden avatar dessie linden committed 32a1da2 Merge

merged .hgtags from viewer-pre-beta

Comments (0)

Files changed (73)

 0630e977504af5ea320c58d33cae4e1ddee793e9 2.6.3-beta2
 7db558aaa7c176f2022b3e9cfe38ac72f6d1fccd DRTVWR-50_2.6.5-beta1
 7db558aaa7c176f2022b3e9cfe38ac72f6d1fccd 2.6.5-beta1
+800cefce8d364ffdd2f383cbecb91294da3ea424 2.6.6-start
 viewer-pre-release.login_channel = "Second Life Release"
 viewer-pre-release.build_debug_release_separately = true
 viewer-pre-release.build_viewer_update_version_manager = true
+#viewer-pre-release.release-viewer.jira = DRTVWR-13
 viewer-pre-release.release-viewer.jira = DRTVWR-46
 
 
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>9b58d1a9c15807a1301e42a313641010</string>
+              <string>9f8a9dc39fd7c3da0fb3533782d1fddf</string>
               <key>url</key>
-              <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/freetype-2.4.4-linux-20110310.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-freetype/rev/226814/arch/Linux/installer/freetype-2.3.9-linux-20110418.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>cc159598ef3fcd34fd33a8a0ef846165</string>
+              <string>3d40be8566fa4b9df9a38e2a0f9ea467</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/223711/arch/Linux/installer/openssl-0.9.8q-linux-20110314.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-openssl/rev/226882/arch/Linux/installer/openssl-1.0.0d-linux-20110418.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
                 <key>options</key>
                 <array>
                   <string>-DCMAKE_BUILD_TYPE:STRING=Debug</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
                   <string>-DWORD_SIZE:STRING=32</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
+                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Debug</string>
             </map>
-            <key>OpenSourceDebug</key>
+            <key>DebugOS</key>
             <map>
               <key>configure</key>
               <map>
                 <key>options</key>
                 <array>
                   <string>-DCMAKE_BUILD_TYPE:STRING=Debug</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
                   <string>-DWORD_SIZE:STRING=32</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
+                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
                 </array>
               </map>
               <key>name</key>
-              <string>OpenSourceDebug</string>
-            </map>
-            <key>OpenSourceRelWithDebInfo</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceRelease</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelease</string>
-            </map>
-            <key>OpenSourceStandAloneDebug</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=Debug</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneDebug</string>
-            </map>
-            <key>OpenSourceStandAloneRelWithDebInfo</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceStandAloneRelease</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelease</string>
+              <string>DebugOS</string>
             </map>
             <key>RelWithDebInfo</key>
             <map>
                 <key>options</key>
                 <array>
                   <string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
                   <string>-DWORD_SIZE:STRING=32</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
+                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>RelWithDebInfo</string>
             </map>
+            <key>RelWithDebInfoOS</key>
+            <map>
+              <key>configure</key>
+              <map>
+                <key>command</key>
+                <string>cmake</string>
+                <key>options</key>
+                <array>
+                  <string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
+                  <string>-DWORD_SIZE:STRING=32</string>
+                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
+                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
+                </array>
+              </map>
+              <key>name</key>
+              <string>RelWithDebInfoOS</string>
+            </map>
             <key>Release</key>
             <map>
               <key>build</key>
                 <key>options</key>
                 <array>
                   <string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
                   <string>-DWORD_SIZE:STRING=32</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
+                  <string>-DUSE_PRECOMPILED_HEADERS=ON</string>
+                  <string>-DLL_RELEASE_FOR_DOWNLOAD:BOOL=TRUE</string>
+                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Release</string>
             </map>
-            <!-- OPEN-1 WORKAROUND begin - to be removed when VC express is detected correctly -->
-            <key>VCexpressRelWithDebInfo</key>
+            <key>ReleaseOS</key>
             <map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>VCexpressRelWithDebInfo</string>
-            </map>
-            <!-- OPEN-1 WORKAROUND end -->
-            <!-- OPEN-1a WORKAROUND begin - to be removed when VC 2010 is detected correctly -->
-            <key>VC10msbuildRelWithDebInfo</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>command</key>
-                <string>cmake</string>
-                <key>options</key>
-                <array>
-                  <string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
-                  <string>-DWORD_SIZE:STRING=32</string>
-                  <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>VC10msbuildRelWithDebInfo</string>
-            </map>
-            <!-- OPEN-1a WORKAROUND end -->
-            <!-- OPEN-1a Release WORKAROUND begin - to be removed when VC 2010 is detected correctly -->
-            <key>VC10msbuildRelease</key>
-            <map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>command</key>
                 <string>cmake</string>
                 <key>options</key>
                 <array>
                   <string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
-                  <string>-DUNATTENDED:BOOL=OFF</string>
                   <string>-DWORD_SIZE:STRING=32</string>
                   <string>-DROOT_PROJECT_NAME:STRING=SecondLife</string>
+                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                  <string>-DLL_RELEASE_FOR_DOWNLOAD:BOOL=YES</string>
+                </array>
+                <key>arguments</key>
+                <array>
+                  <string>../indra</string>
                 </array>
               </map>
               <key>name</key>
-              <string>VC10msbuildRelease</string>
+              <string>ReleaseOS</string>
             </map>
-            <!-- OPEN-1a Release WORKAROUND end -->            
           </map>
           <key>name</key>
           <string>common</string>
                 <array>
                   <string>-G</string>
                   <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Debug</string>
             </map>
-            <key>OpenSourceDebug</key>
+            <key>DebugOS</key>
             <map>
               <key>build</key>
               <map>
               </map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>options</key>
                 <array>
                   <string>-G</string>
                   <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
                 </array>
               </map>
               <key>name</key>
-              <string>OpenSourceDebug</string>
-            </map>
-            <key>OpenSourceRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>xcodebuild</string>
-                <key>options</key>
-                <array>
-                  <string>-configuration RelWithDebInfo</string>
-                  <string>-project SecondLife.xcodeproj</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>xcodebuild</string>
-                <key>options</key>
-                <array>
-                  <string>-configuration Release</string>
-                  <string>-project SecondLife.xcodeproj</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelease</string>
-            </map>
-            <key>OpenSourceStandAloneDebug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>xcodebuild</string>
-                <key>options</key>
-                <array>
-                  <string>-configuration Debug</string>
-                  <string>-project SecondLife.xcodeproj</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneDebug</string>
-            </map>
-            <key>OpenSourceStandAloneRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>xcodebuild</string>
-                <key>options</key>
-                <array>
-                  <string>-configuration RelWithDebInfo</string>
-                  <string>-project SecondLife.xcodeproj</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceStandAloneRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>xcodebuild</string>
-                <key>options</key>
-                <array>
-                  <string>-configuration Release</string>
-                  <string>-project SecondLife.xcodeproj</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelease</string>
+              <string>DebugOS</string>
             </map>
             <key>RelWithDebInfo</key>
             <map>
                 <array>
                   <string>-G</string>
                   <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>default</key>
               <key>name</key>
               <string>RelWithDebInfo</string>
             </map>
+            <key>RelWithDebInfoOS</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>xcodebuild</string>
+                <key>options</key>
+                <array>
+                  <string>-configuration RelWithDebInfo</string>
+                  <string>-project SecondLife.xcodeproj</string>
+                </array>
+              </map>
+              <key>configure</key>
+              <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>'Xcode'</string>
+                </array>
+              </map>
+              <key>name</key>
+              <string>RelWithDebInfoOS</string>
+            </map>
             <key>Release</key>
             <map>
               <key>build</key>
                 <array>
                   <string>-G</string>
                   <string>'Xcode'</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Release</string>
             </map>
+            <key>ReleaseOS</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>xcodebuild</string>
+                <key>options</key>
+                <array>
+                  <string>-configuration Release</string>
+                  <string>-project SecondLife.xcodeproj</string>
+                </array>
+              </map>
+              <key>configure</key>
+              <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>'Xcode'</string>
+                </array>
+              </map>
+              <key>name</key>
+              <string>ReleaseOS</string>
+            </map>
           </map>
           <key>name</key>
           <string>darwin</string>
                 <array>
                   <string>-G</string>
                   <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Debug</string>
             </map>
-            <key>OpenSourceDebug</key>
+            <key>DebugOS</key>
             <map>
               <key>build</key>
               <map>
                 <string>make</string>
                 <key>options</key>
                 <array>
-                  <string>-j 12</string>
+                  <string>-j 2</string>
                 </array>
               </map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
                 <key>options</key>
                 <array>
                   <string>-G</string>
                   <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
                 </array>
               </map>
               <key>name</key>
-              <string>OpenSourceDebug</string>
-            </map>
-            <key>OpenSourceRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>make</string>
-                <key>options</key>
-                <array>
-                  <string>-j 12</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>make</string>
-                <key>options</key>
-                <array>
-                  <string>-j 12</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelease</string>
-            </map>
-            <key>OpenSourceStandAloneDebug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>make</string>
-                <key>options</key>
-                <array>
-                  <string>-j 12</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneDebug</string>
-            </map>
-            <key>OpenSourceStandAloneRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>make</string>
-                <key>options</key>
-                <array>
-                  <string>-j 12</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceStandAloneRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>make</string>
-                <key>options</key>
-                <array>
-                  <string>-j 12</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelease</string>
+              <string>DebugOS</string>
             </map>
             <key>RelWithDebInfo</key>
             <map>
                 <array>
                   <string>-G</string>
                   <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>default</key>
               <key>name</key>
               <string>RelWithDebInfo</string>
             </map>
+            <key>RelWithDebInfoOS</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>make</string>
+                <key>options</key>
+                <array>
+                  <string>-j 2</string>
+                </array>
+              </map>
+              <key>configure</key>
+              <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>'Unix Makefiles'</string>
+                </array>
+              </map>
+              <key>name</key>
+              <string>RelWithDebInfoOS</string>
+            </map>
             <key>Release</key>
             <map>
               <key>build</key>
                 <array>
                   <string>-G</string>
                   <string>'Unix Makefiles'</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Release</string>
             </map>
+            <key>ReleaseOS</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>command</key>
+                <string>make</string>
+                <key>options</key>
+                <array>
+                  <string>-j 2</string>
+                </array>
+              </map>
+              <key>configure</key>
+              <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>'Unix Makefiles'</string>
+                </array>
+              </map>
+              <key>name</key>
+              <string>ReleaseOS</string>
+            </map>
             <key>default</key>
             <map>
               <key>build</key>
                 <array>
                   <string>-G</string>
                   <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Debug</string>
             </map>
-            <key>OpenSourceDebug</key>
+            <key>DebugOS</key>
             <map>
               <key>build</key>
               <map>
                   <string>SecondLife.sln</string>
                 </array>
                 <key>command</key>
-                <string>devenv.com</string>
+                <string>msbuild.exe</string>
                 <key>options</key>
                 <array>
-                  <string>/build</string>
-                  <string>Debug</string>
+                  <string>/p:Configuration=Debug</string>
+                  <string>/p:Platform=Win32</string>
+                  <string>/t:Build</string>
+                  <string>/p:useenv=true</string>
+                  <string>/verbosity:minimal</string>
+                  <string>/toolsversion:4.0</string>
+                  <string>/p:"VCBuildAdditionalOptions= /incremental"</string>
                 </array>
               </map>
               <key>configure</key>
               <map>
-                <key>arguments</key>
-                <array>
-                  <string>..\indra</string>
-                  <string>&amp;&amp;</string>
-                  <string>..\indra\tools\vstool\VSTool.exe</string>
-                  <string>--solution</string>
-                  <string>SecondLife.sln</string>
-                  <string>--config</string>
-                  <string>Debug</string>
-                  <string>--startup</string>
-                  <string>secondlife-bin</string>
-                </array>
                 <key>options</key>
                 <array>
                   <string>-G</string>
                   <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                  <string>-DUNATTENDED:BOOL=ON</string>
+                  <string>-DUSE_PRECOMPILED_HEADERS=ON</string>
+                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
+                  <string>-DUSE_KDU=FALSE</string>
                   <string>-DFMOD=FALSE</string>
                 </array>
               </map>
               <key>name</key>
-              <string>OpenSourceDebug</string>
-            </map>
-            <key>OpenSourceRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                </array>
-                <key>command</key>
-                <string>devenv.com</string>
-                <key>options</key>
-                <array>
-                  <string>/build</string>
-                  <string>RelWithDebInfo</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                </array>
-                <key>command</key>
-                <string>devenv.com</string>
-                <key>options</key>
-                <array>
-                  <string>/build</string>
-                  <string>Release</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceRelease</string>
-            </map>
-            <key>OpenSourceStandAloneDebug</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                </array>
-                <key>command</key>
-                <string>devenv.com</string>
-                <key>options</key>
-                <array>
-                  <string>/build</string>
-                  <string>Debug</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>..\indra</string>
-                  <string>&amp;&amp;</string>
-                  <string>..\indra\tools\vstool\VSTool.exe</string>
-                  <string>--solution</string>
-                  <string>SecondLife.sln</string>
-                  <string>--config</string>
-                  <string>RelWithDebInfo</string>
-                  <string>--startup</string>
-                  <string>secondlife-bin</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneDebug</string>
-            </map>
-            <key>OpenSourceStandAloneRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                </array>
-                <key>command</key>
-                <string>devenv.com</string>
-                <key>options</key>
-                <array>
-                  <string>/build</string>
-                  <string>RelWithDebInfo</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelWithDebInfo</string>
-            </map>
-            <key>OpenSourceStandAloneRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                </array>
-                <key>command</key>
-                <string>devenv.com</string>
-                <key>options</key>
-                <array>
-                  <string>/build</string>
-                  <string>Release</string>
-                </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>arguments</key>
-                <array>
-                  <string>../indra</string>
-                </array>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=TRUE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>OpenSourceStandAloneRelease</string>
+              <string>DebugOS</string>
             </map>
             <key>RelWithDebInfo</key>
             <map>
                 <array>
                   <string>-G</string>
                   <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>default</key>
               <key>name</key>
               <string>RelWithDebInfo</string>
             </map>
+            <key>RelWithDebInfoOS</key>
+            <map>
+              <key>build</key>
+              <map>
+                <key>arguments</key>
+                <array>
+                  <string>SecondLife.sln</string>
+                </array>
+                <key>command</key>
+                <string>msbuild.exe</string>
+                <key>options</key>
+                <array>
+                  <string>/p:Configuration=RelWithDebInfo</string>
+                  <string>/p:Platform=Win32</string>
+                  <string>/t:Build</string>
+                  <string>/p:useenv=true</string>
+                  <string>/verbosity:minimal</string>
+                  <string>/toolsversion:4.0</string>
+                  <string>/p:"VCBuildAdditionalOptions= /incremental"</string>
+                </array>
+              </map>
+              <key>configure</key>
+              <map>
+                <key>options</key>
+                <array>
+                  <string>-G</string>
+                  <string>"Visual Studio 10"</string>
+                  <string>-DUNATTENDED:BOOL=ON</string>
+                  <string>-DUSE_PRECOMPILED_HEADERS=ON</string>
+                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
+                  <string>-DUSE_KDU=FALSE</string>
+                  <string>-DFMOD=FALSE</string>
+                </array>
+              </map>
+              <key>name</key>
+              <string>RelWithDebInfoOS</string>
+            </map>
             <key>Release</key>
             <map>
               <key>build</key>
                 <array>
                   <string>-G</string>
                   <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=OFF</string>
-                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
-                  <string>-DFMOD=TRUE</string>
                 </array>
               </map>
               <key>name</key>
               <string>Release</string>
             </map>
-            <!-- OPEN-1 WORKAROUND begin - to be removed when VC express is detected correctly -->
-            <key>VCexpressRelWithDebInfo</key>
+            <key>ReleaseOS</key>
             <map>
               <key>build</key>
               <map>
                 <key>arguments</key>
                 <array>
-                  <string>"RelWithDebInfo|Win32"</string>
+                  <string>SecondLife.sln</string>
                 </array>
                 <key>command</key>
-                <string>vcbuild.exe</string>
+                <string>msbuild.exe</string>
                 <key>options</key>
                 <array>
-                  <string>/u</string>
-                  <string>SecondLife.sln</string>
+                  <string>/p:Configuration=Release</string>
+                  <string>/p:Platform=Win32</string>
+                  <string>/t:Build</string>
+                  <string>/p:useenv=true</string>
+                  <string>/verbosity:minimal</string>
+                  <string>/toolsversion:4.0</string>
+                  <string>/p:"VCBuildAdditionalOptions= /incremental"</string>
                 </array>
               </map>
               <key>configure</key>
                 <array>
                   <string>-G</string>
                   <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
+                  <string>-DUNATTENDED:BOOL=ON</string>
+                  <string>-DUSE_PRECOMPILED_HEADERS=ON</string>
+                  <string>-DINSTALL_PROPRIETARY=TRUE</string>
+                  <string>-DUSE_KDU=FALSE</string>
                   <string>-DFMOD=FALSE</string>
                 </array>
               </map>
               <key>name</key>
-              <string>VCexpressRelWithDebInfo</string>
+              <string>ReleaseOS</string>
             </map>
-            <!-- OPEN-1 WORKAROUND end -->
-            <!-- OPEN-1a WORKAROUND begin - to be removed when VC 2010 is detected correctly -->
-           <key>VC10msbuildRelWithDebInfo</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>msbuild.exe</string>
-                <key>options</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                  <string>/verbosity:minimal</string>
-                  <string>/t:build</string>
-                  <string>/p:Configuration=RelWithDebInfo</string>
-                  <string>/p:Platform=Win32</string>
-                  <string>/p:"VCBuildAdditionalOptions= /useenv"</string>
-                  <string>/p:"VCBuildAdditionalOptions= /incremental"</string>
-                  </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>VC10msbuildRelWithDebInfo</string>
-            </map>
-           <!-- OPEN-1a WORKAROUND end -->
-            <!-- OPEN-1a Release WORKAROUND begin - to be removed when VC 2010 is detected correctly -->
-           <key>VC10msbuildRelease</key>
-            <map>
-              <key>build</key>
-              <map>
-                <key>command</key>
-                <string>msbuild.exe</string>
-                <key>options</key>
-                <array>
-                  <string>SecondLife.sln</string>
-                  <string>/t:build</string>
-                  <string>/p:Configuration=Release</string>
-                  <string>/p:Platform=Win32</string>
-                  <string>/p:"VCBuildAdditionalOptions= /useenv"</string>
-                  <string>/p:"VCBuildAdditionalOptions= /incremental"</string>
-                  </array>
-              </map>
-              <key>configure</key>
-              <map>
-                <key>options</key>
-                <array>
-                  <string>-G</string>
-                  <string>"Visual Studio 10"</string>
-                  <string>-DSTANDALONE:BOOL=FALSE</string>
-                  <string>-DINSTALL_PROPRIETARY=FALSE</string>
-                  <string>-DFMOD=FALSE</string>
-                </array>
-              </map>
-              <key>name</key>
-              <string>VC10msbuildRelease</string>
-            </map>
-           <!-- OPEN-1a WORKAROUND end -->
           </map>
           <key>name</key>
           <string>windows</string>

doc/contributions.txt

 	STORM-1094
 	STORM-1077
 	STORM-953
+	STORM-1095
 Kage Pixel
 	VWR-11
 Ken March
 	VWR-2684
 Nicky Perian
 	OPEN-1
-	OPEN-1087
+	STORM-1087
 	STORM-1090
 Nounouch Hapmouche
 	VWR-238
 	STORM-422
 	STORM-960
 	STORM-1019
+	STORM-1095
 	VWR-2488
 	VWR-9557
 	VWR-10579

indra/cmake/Copy3rdPartyLibs.cmake

         libaprutil-1.so.0
         libatk-1.0.so
         libbreakpad_client.so.0
-        libcrypto.so.0.9.8
+        libcrypto.so.1.0.0
         libdb-5.1.so
         libexpat.so
         libexpat.so.1
         libtcmalloc.so
         libuuid.so.16
         libuuid.so.16.0.22
-        libssl.so.0.9.8
+        libssl.so.1.0.0
         libfontconfig.so.1.4.4
        )
 

indra/cmake/Variables.cmake

   set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
   set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
   set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.2")
-  set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "DWARF with dSYM File")
+  set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
 
   # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
   # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'
 
 set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
+set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.")
 
 if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
     set(SERVER ON CACHE BOOL "Build Second Life server software.")

indra/integration_tests/llimage_libtest/llimage_libtest.cpp

 " -o, --output <file1 .. file2> OR <type>\n"
 "        List of image files to create (assumes same order as for input files)\n"
 "        OR 3 letters file type extension to convert each input file into.\n"
+" -r, --region <x0, y0, x1, y1>\n"
+"        Crop region applied to the input files in pixels.\n"
+"        Only used for j2c images. Default is no region cropping.\n"
+" -d, --discard_level <n>\n"
+"        Discard level max used on input. 0 is highest resolution. Max discard level is 5.\n"
+"        This allows the input image to be clamped in resolution when loading.\n"
+"        Only valid for j2c images. Default is no discard.\n"
+" -p, --precincts <n>\n"
+"        Dimension of precincts in pixels. Precincts are assumed square and identical for\n"
+"        all levels. Note that this option also add PLT and tile markers to the codestream, \n"
+"        and uses RPCL order. Power of 2 must be used.\n"
+"        Only valid for output j2c images. Default is no precincts used.\n"
+" -b, --blocks <n>\n"
+"        Dimension of coding blocks in pixels. Blocks are assumed square. Power of 2 must\n"
+"        be used. Blocks must be smaller than precincts. Like precincts, this option adds\n"
+"        PLT, tile markers and uses RPCL.\n"
+"        Only valid for output j2c images. Default is 64.\n"
+" -rev, --reversible\n"
+"        Set the compression to be lossless (reversible in j2c parlance).\n"
+"        Only valid for output j2c images.\n"
 " -log, --logmetrics <metric>\n"
 "        Log performance data for <metric>. Results in <metric>.slp\n"
 "        Note: so far, only ImageCompressionTester has been tested.\n"
-" -r, --analyzeperformance\n"
+" -a, --analyzeperformance\n"
 "        Create a report comparing <metric>_baseline.slp with current <metric>.slp\n"
-"        Results in <metric>_report.csv"
+"        Results in <metric>_report.csv\n"
 " -s, --image-stats\n"
 "        Output stats for each input and output image.\n"
 "\n";
 // Create an empty formatted image instance of the correct type from the filename
 LLPointer<LLImageFormatted> create_image(const std::string &filename)
 {
-	std::string exten = gDirUtilp->getExtension(filename);
-	U32 codec = LLImageBase::getCodecFromExtension(exten);
-	
-	LLPointer<LLImageFormatted> image;
-	switch (codec)
-	{
-		case IMG_CODEC_BMP:
-			image = new LLImageBMP();
-			break;
-		case IMG_CODEC_TGA:
-			image = new LLImageTGA();
-			break;
-		case IMG_CODEC_JPEG:
-			image = new LLImageJPEG();
-			break;
-		case IMG_CODEC_J2C:
-			image = new LLImageJ2C();
-			break;
-		case IMG_CODEC_PNG:
-			image = new LLImagePNG();
-			break;
-		default:
-			return NULL;
-	}
-	
+	std::string exten = gDirUtilp->getExtension(filename);	
+	LLPointer<LLImageFormatted> image = LLImageFormatted::createFromExtension(exten);
 	return image;
 }
 
 }
 
 // Load an image from file and return a raw (decompressed) instance of its data
-LLPointer<LLImageRaw> load_image(const std::string &src_filename, bool output_stats)
+LLPointer<LLImageRaw> load_image(const std::string &src_filename, int discard_level, int* region, bool output_stats)
 {
 	LLPointer<LLImageFormatted> image = create_image(src_filename);
-
+	
+	// This just loads the image file stream into a buffer. No decoding done.
 	if (!image->load(src_filename))
 	{
 		return NULL;
 	}
 	
 	LLPointer<LLImageRaw> raw_image = new LLImageRaw;
+	
+	// Set the image restriction on load in the case of a j2c image
+	if ((image->getCodec() == IMG_CODEC_J2C) && ((discard_level != -1) || (region != NULL)))
+	{
+		// That method doesn't exist (and likely, doesn't make sense) for any other image file format
+		// hence the required cryptic cast.
+		((LLImageJ2C*)(image.get()))->initDecode(*raw_image, discard_level, region);
+	}
+	
 	if (!image->decode(raw_image, 0.0f))
 	{
 		return NULL;
 }
 
 // Save a raw image instance into a file
-bool save_image(const std::string &dest_filename, LLPointer<LLImageRaw> raw_image, bool output_stats)
+bool save_image(const std::string &dest_filename, LLPointer<LLImageRaw> raw_image, int blocks_size, int precincts_size, bool reversible, bool output_stats)
 {
 	LLPointer<LLImageFormatted> image = create_image(dest_filename);
 	
+	// Set the image codestream parameters on output in the case of a j2c image
+	if (image->getCodec() == IMG_CODEC_J2C)
+	{
+		// That method doesn't exist (and likely, doesn't make sense) for any other image file format
+		// hence the required cryptic cast.
+		if ((blocks_size != -1) || (precincts_size != -1))
+		{
+			((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size);
+		}
+		((LLImageJ2C*)(image.get()))->setReversible(reversible);
+	}
+	
 	if (!image->encode(raw_image, 0.0f))
 	{
 		return false;
 	// List of input and output files
 	std::list<std::string> input_filenames;
 	std::list<std::string> output_filenames;
+	// Other optional parsed arguments
 	bool analyze_performance = false;
 	bool image_stats = false;
+	int* region = NULL;
+	int discard_level = -1;
+	int precincts_size = -1;
+	int blocks_size = -1;
+	bool reversible = false;
 
 	// Init whatever is necessary
 	ll_init_apr();
 				file_name = argv[arg+1];	// Next argument and loop over
 			}
 		}
+		else if ((!strcmp(argv[arg], "--region") || !strcmp(argv[arg], "-r")) && arg < argc-1)
+		{
+			std::string value_str = argv[arg+1];
+			int index = 0;
+			region = new int[4];
+			while (value_str[0] != '-')		// if arg starts with '-', it's the next option
+			{
+				int value = atoi(value_str.c_str());
+				region[index++] = value;
+				arg += 1;					// Definitely skip that arg now we know it's a number
+				if ((arg + 1) == argc)		// Break out of the loop if we reach the end of the arg list
+					break;
+				if (index == 4)				// Break out of the loop if we captured 4 values already
+					break;
+				value_str = argv[arg+1];	// Next argument and loop over
+			}
+			if (index != 4)
+			{
+				std::cout << "--region arguments invalid" << std::endl;
+				delete [] region;
+				region = NULL;
+			}
+		}
+		else if (!strcmp(argv[arg], "--discard_level") || !strcmp(argv[arg], "-d"))
+		{
+			std::string value_str;
+			if ((arg + 1) < argc)
+			{
+				value_str = argv[arg+1];
+			}
+			if (((arg + 1) >= argc) || (value_str[0] == '-'))
+			{
+				std::cout << "No valid --discard_level argument given, discard_level ignored" << std::endl;
+			}
+			else
+			{
+				discard_level = atoi(value_str.c_str());
+				// Clamp to the values accepted by the viewer
+				discard_level = llclamp(discard_level,0,5);
+			}
+		}
+		else if (!strcmp(argv[arg], "--precincts") || !strcmp(argv[arg], "-p"))
+		{
+			std::string value_str;
+			if ((arg + 1) < argc)
+			{
+				value_str = argv[arg+1];
+			}
+			if (((arg + 1) >= argc) || (value_str[0] == '-'))
+			{
+				std::cout << "No valid --precincts argument given, precincts ignored" << std::endl;
+			}
+			else
+			{
+				precincts_size = atoi(value_str.c_str());
+				// *TODO: make sure precincts_size is a power of 2
+			}
+		}
+		else if (!strcmp(argv[arg], "--blocks") || !strcmp(argv[arg], "-b"))
+		{
+			std::string value_str;
+			if ((arg + 1) < argc)
+			{
+				value_str = argv[arg+1];
+			}
+			if (((arg + 1) >= argc) || (value_str[0] == '-'))
+			{
+				std::cout << "No valid --blocks argument given, blocks ignored" << std::endl;
+			}
+			else
+			{
+				blocks_size = atoi(value_str.c_str());
+				// *TODO: make sure blocks_size is a power of 2
+			}
+		}
+		else if (!strcmp(argv[arg], "--reversible") || !strcmp(argv[arg], "-rev"))
+		{
+			reversible = true;
+		}
 		else if (!strcmp(argv[arg], "--logmetrics") || !strcmp(argv[arg], "-log"))
 		{
 			// '--logmetrics' needs to be specified with a named test metric argument
 					break;
 			}
 		}
-		else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-r"))
+		else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-a"))
 		{
 			analyze_performance = true;
 		}
 	}
 	if (analyze_performance && !LLFastTimer::sMetricLog)
 	{
-		std::cout << "Cannot create perf report if no perf gathered (i.e. use argument -log <perf> with -r) -> exit" << std::endl;
+		std::cout << "Cannot create perf report if no perf gathered (i.e. use argument -log <perf> with -a) -> exit" << std::endl;
 		return 0;
 	}
 	
 	std::list<std::string>::iterator out_file = output_filenames.begin();
 	std::list<std::string>::iterator in_end = input_filenames.end();
 	std::list<std::string>::iterator out_end = output_filenames.end();
-	for (; in_file != in_end; ++in_file)
+	for (; in_file != in_end; ++in_file, ++out_file)
 	{
 		// Load file
-		LLPointer<LLImageRaw> raw_image = load_image(*in_file, image_stats);
+		LLPointer<LLImageRaw> raw_image = load_image(*in_file, discard_level, region, image_stats);
 		if (!raw_image)
 		{
 			std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl;
 		// Save file
 		if (out_file != out_end)
 		{
-			if (!save_image(*out_file, raw_image, image_stats))
+			if (!save_image(*out_file, raw_image, blocks_size, precincts_size, reversible, image_stats))
 			{
 				std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl;
 			}
 			{
 				std::cout << *in_file << " -> " << *out_file << std::endl;
 			}
-			++out_file;
 		}
 	}
 
+	// Output perf data if requested by user
+	if (analyze_performance)
+	{
+		std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp";
+		std::string current_name  = LLFastTimer::sLogName + ".slp"; 
+		std::string report_name   = LLFastTimer::sLogName + "_report.csv";
+		
+		std::cout << "Analyzing performance, check report in : " << report_name << std::endl;
+
+		LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline_name, current_name, report_name);
+	}
+	
 	// Stop the perf gathering system if needed
 	if (LLFastTimer::sMetricLog)
 	{
 		sAllDone = true;
 	}
 	
-	// Output perf data if requested by user
-	if (analyze_performance)
-	{
-		std::cout << "Analyzing performance" << std::endl;
-		
-		std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp";
-		std::string current_name  = LLFastTimer::sLogName + ".slp"; 
-		std::string report_name   = LLFastTimer::sLogName + "_report.csv";
-		
-		LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline_name, current_name, report_name);
-	}
-	
 	// Cleanup and exit
 	LLImage::cleanupClass();
 	if (fast_timer_log_thread)

indra/llcommon/llversionviewer.h

 
 const S32 LL_VERSION_MAJOR = 2;
 const S32 LL_VERSION_MINOR = 6;
-const S32 LL_VERSION_PATCH = 5;
+const S32 LL_VERSION_PATCH = 6;
 const S32 LL_VERSION_BUILD = 0;
 
 const char * const LL_CHANNEL = "Second Life Developer";

indra/llimage/llimage.cpp

 		return false;
 	}
 	
-	LLPointer<LLImageFormatted> image;
-	switch(codec)
-	{
-	  //case IMG_CODEC_RGB:
-	  case IMG_CODEC_BMP:
-		image = new LLImageBMP();
-		break;
-	  case IMG_CODEC_TGA:
-		image = new LLImageTGA();
-		break;
-	  case IMG_CODEC_JPEG:
-		image = new LLImageJPEG();
-		break;
-	  case IMG_CODEC_J2C:
-		image = new LLImageJ2C();
-		break;
-	  case IMG_CODEC_DXT:
-		image = new LLImageDXT();
-		break;
-	  default:
-		return false;
-	}
+	LLPointer<LLImageFormatted> image = LLImageFormatted::createFromType(codec);
 	llassert(image.notNull());
 
 	U8 *buffer = image->allocateData(length);

indra/llimage/llimagej2c.cpp

 	return res;
 }
 
+BOOL LLImageJ2C::initDecode(LLImageRaw &raw_image, int discard_level, int* region)
+{
+	return mImpl->initDecode(*this,raw_image,discard_level,region);
+}
+
+BOOL LLImageJ2C::initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size)
+{
+	return mImpl->initEncode(*this,raw_image,blocks_size,precincts_size);
+}
 
 BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
 {
 //static
 S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 rate)
 {
+	// Note: this only provides an *estimate* of the size in bytes of an image level
+	// *TODO: find a way to read the true size (when available) and convey the fact
+	// that the result is an estimate in the other cases
 	if (rate <= 0.f) rate = .125f;
 	while (discard_level > 0)
 	{

indra/llimage/llimagej2c.h

 	/*virtual*/ void resetLastError();
 	/*virtual*/ void setLastError(const std::string& message, const std::string& filename = std::string());
 	
+	BOOL initDecode(LLImageRaw &raw_image, int discard_level, int* region);
+	BOOL initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size);
 	
 	// Encode with comment text 
 	BOOL encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time=0.0);
 	virtual BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) = 0;
 	virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
 							BOOL reversible=FALSE) = 0;
+	virtual BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL) = 0;
+	virtual BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1) = 0;
 
 	friend class LLImageJ2C;
 };

indra/llimagej2coj/llimagej2coj.cpp

 {
 }
 
+BOOL LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level, int* region)
+{
+	// No specific implementation for this method in the OpenJpeg case
+	return FALSE;
+}
+
+BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size)
+{
+	// No specific implementation for this method in the OpenJpeg case
+	return FALSE;
+}
 
 BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count)
 {

indra/llimagej2coj/llimagej2coj.h

 	/*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count);
 	/*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
 								BOOL reversible = FALSE);
+	/*virtual*/ BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL);
+	/*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1);
 };
 
 #endif

indra/llkdu/llimagej2ckdu.cpp

 
 class kdc_flow_control {
 	
-public: // Member functions
-    kdc_flow_control(kdu_image_in_base *img_in, kdu_codestream codestream);
-    ~kdc_flow_control();
-    bool advance_components();
-    void process_components();
+public:
+	kdc_flow_control(kdu_image_in_base *img_in, kdu_codestream codestream);
+	~kdc_flow_control();
+	bool advance_components();
+	void process_components();
 	
-private: // Data
-    
-    struct kdc_component_flow_control {
-    public: // Data
-        kdu_image_in_base *reader;
-        int vert_subsampling;
-        int ratio_counter;  /*  Initialized to 0, decremented by `count_delta';
+private:
+	
+	struct kdc_component_flow_control {
+	public:
+		kdu_image_in_base *reader;
+		int vert_subsampling;
+		int ratio_counter;  /*  Initialized to 0, decremented by `count_delta';
                                 when < 0, a new line must be processed, after
                                 which it is incremented by `vert_subsampling'.  */
-        int initial_lines;
-        int remaining_lines;
-        kdu_line_buf *line;
-    };
-    
-    kdu_codestream codestream;
-    kdu_dims valid_tile_indices;
-    kdu_coords tile_idx;
-    kdu_tile tile;
-    int num_components;
-    kdc_component_flow_control *components;
-    int count_delta; // Holds the minimum of the `vert_subsampling' fields
-    kdu_multi_analysis engine;
-    kdu_long max_buffer_memory;
+		int initial_lines;
+		int remaining_lines;
+		kdu_line_buf *line;
+	};
+	
+	kdu_codestream codestream;
+	kdu_dims valid_tile_indices;
+	kdu_coords tile_idx;
+	kdu_tile tile;
+	int num_components;
+	kdc_component_flow_control *components;
+	int count_delta; // Holds the minimum of the `vert_subsampling' fields
+	kdu_multi_analysis engine;
+	kdu_long max_buffer_memory;
 };
 
 //
 
 const char* engineInfoLLImageJ2CKDU()
 {
-	return "KDU v6.4.1";
+	std::string version = llformat("KDU %s", KDU_CORE_VERSION);
+	return version.c_str();
 }
 
 LLImageJ2CKDU* createLLImageJ2CKDU()
 class LLKDUDecodeState
 {
 public:
+	LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap);
+	~LLKDUDecodeState();
+	BOOL processTileDecode(F32 decode_time, BOOL limit_time = TRUE);
 
+private:
 	S32 mNumComponents;
 	BOOL mUseYCC;
 	kdu_dims mDims;
 	kdu_tile_comp mComps[4];
 	kdu_line_buf mLines[4];
 	kdu_pull_ifc mEngines[4];
-	bool mReversible[4]; // Some components may be reversible and others not.
-	int mBitDepths[4]; // Original bit-depth may be quite different from 8.
-
+	bool mReversible[4]; // Some components may be reversible and others not
+	int mBitDepths[4];   // Original bit-depth may be quite different from 8
+	
 	kdu_tile mTile;
 	kdu_byte *mBuf;
 	S32 mRowGap;
-
-	LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap);
-	~LLKDUDecodeState();
-	BOOL processTileDecode(F32 decode_time, BOOL limit_time = TRUE);
-
-public:
-	int *AssignLayerBytes(siz_params *siz, int &num_specs);
-
-	void setupCodeStream(BOOL keep_codestream, LLImageJ2CKDU::ECodeStreamMode mode);
-	BOOL initDecode(LLImageRaw &raw_image, F32 decode_time, LLImageJ2CKDU::ECodeStreamMode mode, S32 first_channel, S32 max_channel_count );
 };
 
 void ll_kdu_error( void )
 public:
 	/*virtual*/ void put_text(const char *s);
 	/*virtual*/ void put_text(const kdu_uint16 *s);
-	/*virtual*/ void flush(bool end_of_message=false);
+	/*virtual*/ void flush(bool end_of_message = false);
 	static LLKDUMessageError sDefaultMessage;
 };
 
 
 void LLKDUMessageError::flush(bool end_of_message)
 {
-	if( end_of_message ) 
+	if (end_of_message) 
 	{
 		throw "KDU throwing an exception";
 	}
 mTPosp(NULL),
 mTileIndicesp(NULL),
 mRawImagep(NULL),
-mDecodeState(NULL)
+mDecodeState(NULL),
+mBlocksSize(-1),
+mPrecinctsSize(-1)
 {
 }
 
 void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECodeStreamMode mode)
 {
 	S32 data_size = base.getDataSize();
-	S32 max_bytes = base.getMaxBytes() ? base.getMaxBytes() : data_size;
+	S32 max_bytes = (base.getMaxBytes() ? base.getMaxBytes() : data_size);
 
 	//
 	//  Initialization
 	// Set the maximum number of bytes to use from the codestream
 	mCodeStreamp->set_max_bytes(max_bytes);
 
-	//    If you want to flip or rotate the image for some reason, change
+	//	If you want to flip or rotate the image for some reason, change
 	// the resolution, or identify a restricted region of interest, this is
 	// the place to do it.  You may use "kdu_codestream::change_appearance"
 	// and "kdu_codestream::apply_input_restrictions" for this purpose.
-	//    If you wish to truncate the code-stream prior to decompression, you
+	//	If you wish to truncate the code-stream prior to decompression, you
 	// may use "kdu_codestream::set_max_bytes".
-	//    If you wish to retain all compressed data so that the material
+	//	If you wish to retain all compressed data so that the material
 	// can be decompressed multiple times, possibly with different appearance
 	// parameters, you should call "kdu_codestream::set_persistent" here.
-	//    There are a variety of other features which must be enabled at
+	//	There are a variety of other features which must be enabled at
 	// this point if you want to take advantage of them.  See the
 	// descriptions appearing with the "kdu_codestream" interface functions
 	// in "kdu_compressed.h" for an itemized account of these capabilities.
 
-	switch( mode )
+	switch (mode)
 	{
 	case MODE_FAST:
 		mCodeStreamp->set_fast();
 	mTileIndicesp = NULL;
 }
 
-BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count )
+BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level, int* region)
+{
+	return initDecode(base,raw_image,0.0f,MODE_FAST,0,4,discard_level,region);
+}
+
+BOOL LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size)
+{
+	mBlocksSize = blocks_size;
+	mPrecinctsSize = precincts_size;
+	return TRUE;
+}
+
+BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count, int discard_level, int* region)
 {
 	base.resetLastError();
 
 
 		mRawImagep = &raw_image;
 		mCodeStreamp->change_appearance(false, true, false);
-		mCodeStreamp->apply_input_restrictions(first_channel,max_channel_count,base.getRawDiscardLevel(),0,NULL);
 
+		// Apply loading discard level and cropping if required
+		kdu_dims* region_kdu = NULL;
+		if (region != NULL)
+		{
+			region_kdu = new kdu_dims;
+			region_kdu->pos.x  = region[0];
+			region_kdu->pos.y  = region[1];
+			region_kdu->size.x = region[2] - region[0];
+			region_kdu->size.y = region[3] - region[1];
+		}
+		int discard = (discard_level != -1 ? discard_level : base.getRawDiscardLevel());
+		
+		// Apply loading restrictions
+		mCodeStreamp->apply_input_restrictions( first_channel, max_channel_count, discard, 0, region_kdu);
+		
+		// Clean-up
+		if (region_kdu)
+		{
+			delete region_kdu;
+			region_kdu = NULL;
+		}
+
+		// Resize raw_image according to the image to be decoded
 		kdu_dims dims; mCodeStreamp->get_dims(0,dims);
 		S32 channels = base.getComponents() - first_channel;
-		if( channels > max_channel_count )
-		{
-			channels = max_channel_count;
-		}
+		channels = llmin(channels,max_channel_count);
 		raw_image.resize(dims.size.x, dims.size.y, channels);
+		//	llinfos << "Resizing raw_image to " << dims.size.x << ":" << dims.size.y << llendl;
 
-		//	llinfos << "Resizing to " << dims.size.x << ":" << dims.size.y << llendl;
 		if (!mTileIndicesp)
 		{
 			mTileIndicesp = new kdu_dims;
 					// canvas coordinate system.  Comparing the two tells
 					// us where the current tile is in the buffer.
 					S32 channels = base.getComponents() - first_channel;
-					if( channels > max_channel_count )
+					if (channels > max_channel_count)
 					{
 						channels = max_channel_count;
 					}
 					return FALSE;
 				}
 			}
-			catch( const char* msg )
+			catch (const char* msg)
 			{
 				base.setLastError(ll_safe_string(msg));
 				base.decodeFailed();
 				cleanupCodeStream();
 				return TRUE; // done
 			}
-			catch( ... )
+			catch (...)
 			{
 				base.setLastError( "Unknown J2C error" );
 				base.decodeFailed();
 
 BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible)
 {
-	// Collect simple arguments.
-	bool transpose, vflip, hflip;
-	bool allow_rate_prediction, mem, quiet, no_weights;
-	int cpu_iterations;
-	std::ostream *record_stream;
-
-	transpose = false;
-	record_stream = NULL;
-	allow_rate_prediction = true;
-	no_weights = false;
-	cpu_iterations = -1;
-	mem = false;
-	quiet = false;
-	vflip = true;
-	hflip = false;
+	// Declare and set simple arguments
+	bool transpose = false;
+	bool vflip = true;
+	bool hflip = false;
 
 	try
 	{
-		// Set up input image files.
+		// Set up input image files
 		siz_params siz;
 		
-		// Should set rate someplace here.
+		// Should set rate someplace here
 		LLKDUMemIn mem_in(raw_image.getData(),
 			raw_image.getDataSize(),
 			raw_image.getWidth(),
 		siz.set(Sprecision,0,0,8);  // Image samples have original bit-depth of 8
 		siz.set(Ssigned,0,0,false); // Image samples are originally unsigned
 
-		kdu_params *siz_ref = &siz; siz_ref->finalize();
-		siz_params transformed_siz; // Use this one to construct code-strea
+		kdu_params *siz_ref = &siz; 
+		siz_ref->finalize();
+		siz_params transformed_siz; // Use this one to construct code-stream
 		transformed_siz.copy_from(&siz,-1,-1,-1,0,transpose,false,false);
 
-		// Construct the `kdu_codestream' object and parse all remaining arguments.
-
+		// Construct the `kdu_codestream' object and parse all remaining arguments
 		U32 max_output_size = base.getWidth()*base.getHeight()*base.getComponents();