Commits

si...@Simon-PC.lindenlab.com  committed 6414ecd Merge

Merge pull from lindenlab/viewer-development as requested by Oz for DRTVWR-148

  • Participants
  • Parent commits 116f2e2, 46548a4
  • Tags DRTVWR-148

Comments (0)

Files changed (447)

 syntax: glob
 
+
 # WinMerge temp files
 *.bak
 # Compiled python bytecode
 glob:indra/newview/avatar_icons_cache.txt
 glob:indra/newview/avatar_lad.log
 glob:*.diff
+*.rej
 a01ef9bed28627f4ca543fbc1d70c79cc297a90f DRTVWR-118_3.2.9-beta2
 a01ef9bed28627f4ca543fbc1d70c79cc297a90f 3.2.9-beta2
 987425b1acf4752379b2e1eb20944b4b35d67a85 3.2.8-beta2
+d5f263687f43f278107363365938f0a214920a4b DRTVWR-119
+d5f263687f43f278107363365938f0a214920a4b 3.3.0-beta1
+5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate
+5e8d2662f38a66eca6c591295f5880d47afc73f7 3.3.0-release
 d5f263687f43f278107363365938f0a214920a4b 3.3.0-start
 dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate
 d5f263687f43f278107363365938f0a214920a4b DRTVWR-119
 d5f263687f43f278107363365938f0a214920a4b 3.3.0-beta1
 5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate
 5e8d2662f38a66eca6c591295f5880d47afc73f7 3.3.0-release
-dffd0457ee0745de65bf95f0642a5c9e46b8e2f0 viewer-beta-candidate
-3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate
-3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 viewer-beta-candidate
+28b95a6a28dca3338d9a1f4f204b96678df9f6a5 viewer-beta-candidate
+b43cd25be49e3984ff5361cefad020e069131d98 3.3.1-start
+3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 DRTVWR-125
+3e2fca4ed1a0dc9fe6d8a6664e71098bb035a367 3.3.1-start
+28b95a6a28dca3338d9a1f4f204b96678df9f6a5 3.3.1-beta1
 1dc545e44617975da2a4a32fe303386c687a6ca1 viewer-beta-candidate
 1dc545e44617975da2a4a32fe303386c687a6ca1 3.3.1-beta2
 1dc545e44617975da2a4a32fe303386c687a6ca1 DRTVWR-139
 5e8d2662f38a66eca6c591295f5880d47afc73f7 viewer-release-candidate
 c623bbc854b6f7ee1b33a3718f76715046aa2937 viewer-release-candidate
 c623bbc854b6f7ee1b33a3718f76715046aa2937 3.3.1-release
+d29a260119f8d5a5d168e25fed0c7ea6b3f40161 3.3.2-beta1
+675668bd24d3bea570814f71762a2a806f7e1b8d 3.3.2-beta2
+c623bbc854b6f7ee1b33a3718f76715046aa2937 viewer-release-candidate
+675668bd24d3bea570814f71762a2a806f7e1b8d viewer-release-candidate
+675668bd24d3bea570814f71762a2a806f7e1b8d 3.3.2-release
+675668bd24d3bea570814f71762a2a806f7e1b8d viewer-release-candidate
+15e90b52dc0297921b022b90d10d797436b8a1bd viewer-release-candidate
 # Notifications - to configure email notices, add a setting like this:
 # <username>_<reponame>.email = <email-address>
 
+
 # =================================================================
 # Canonical viewer integration builds - Oz Linden
 # =================================================================
 vir-project-1.viewer_channel = "Second Life Release"
 vir-project-1.login_channel = "Second Life Release"
 
+# ========================================
+# THX-1138 / Runway projects
+# ========================================
+viewer-thx1138-runway-shared.viewer_channel = "Project Viewer - THX-1138 Runway"
+viewer-thx1138-runway-shared.login_channel = "Project Viewer - THX-1138 Runway"
+viewer-thx1138-runway-shared.viewer_grid = uma
+viewer-thx1138-runway-shared.build_debug_release_separately = true
+viewer-thx1138-runway-shared.build_CYGWIN_Debug = false
+viewer-thx1138-runway-shared.build_viewer_update_version_manager = false
+
+viewer-thx1138.viewer_channel = "Project Viewer - THX-1138"
+viewer-thx1138.login_channel = "Project Viewer - THX-1138"
+viewer-thx1138.viewer_grid = uma
+viewer-thx1138.build_debug_release_separately = true
+viewer-thx1138.build_CYGWIN_Debug = false
+viewer-thx1138.build_viewer_update_version_manager = false
+
+runway-merge.viewer_channel = "Project Viewer - Runway Merge"
+runway-merge.login_channel = "Project Viewer - Runway Merge"
+runway-merge.viewer_grid = agni
+runway-merge.build_debug_release_separately = true
+runway-merge.build_CYGWIN_Debug = false
+runway-merge.build_viewer_update_version_manager = false
+
+runway.viewer_channel = "Project Viewer - Runway"
+runway.login_channel = "Project Viewer - Runway"
+runway.viewer_grid = agni
+runway.build_debug_release_separately = true
+runway.build_CYGWIN_Debug = false
+runway.build_viewer_update_version_manager = false
+
 # eof

File autobuild.xml

             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>9868bfa0b6954e4884c49c6f30068c80</string>
+              <string>1fe7c2121916b2c5ff75073742442e2a</string>
               <key>url</key>
-              <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/apr_suite-1.4.2-darwin-20110217.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-apr/rev/257886/arch/Darwin/installer/apr_suite-1.4.5-darwin-20120523.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>ff62946c518a247c86e1066c1e9a5855</string>
+              <string>eac7926a7caa121144c911434a01b680</string>
               <key>url</key>
-              <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/apr_suite-1.4.2-linux-20110309.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-apr/rev/257886/arch/Linux/installer/apr_suite-1.4.5-linux-20120523.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>73785c200a5b4ef74a1230b028bb680d</string>
+              <string>8789d952a33ce3e8b87be8cbf94bc6ba</string>
               <key>url</key>
-              <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/apr_suite-1.4.2-windows-20110217.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-apr/rev/257886/arch/CYGWIN/installer/apr_suite-1.4.5-windows-20120523.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>26aa7c367ffadd573f61a6a96f820f80</string>
+              <string>4a98d727561cd1f4ac5ee02907411df1</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/245988/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111201.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/250147/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20120228.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>c05a33ee8b6f253b5a744596dfc3707d</string>
+              <string>f50e5f0cc880c55b3f0f7e67dc8f7221</string>
               <key>url</key>
-              <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-qt4.6-20101013.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/250147/arch/Linux/installer/llqtwebkit-4.7.1-linux-20120228.tar.bz2</string>
             </map>
             <key>name</key>
             <string>linux</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>270db8568a0c4bab266d98e1a820aec4</string>
+              <string>5e3cd6af397e853a963a6de40d440ff4</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/245988/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111201.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/250147/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20120228.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>
   end_section UpdateVer
 fi
 
-# Now retrieve the version for use in the version manager
-# First three parts only, $revision will be appended automatically.
-build_viewer_update_version_manager_version=`python scripts/get_version.py --viewer-version | sed 's/\.[0-9]*$//'`
-
 if [ -z "$AUTOBUILD" ]
 then
   export autobuild_dir="$here/../../../autobuild/bin/"
 env|sort
 
 
-# Install packages.
-"$AUTOBUILD" install --skip-license-check
-
 # Now run the build
 succeeded=true
 build_processes=
   begin_section "Do$variant"
   build_dir=`build_dir_$arch $variant`
   build_dir_stubs="$build_dir/win_setup/$variant"
+
+  begin_section "PreClean"
   rm -rf "$build_dir"
+  end_section "PreClean"
+
   mkdir -p "$build_dir"
   mkdir -p "$build_dir/tmp"
-  #export TMP="$build_dir/tmp"
+
+  # Install packages.
+  begin_section "AutobuildInstall" 
+  "$AUTOBUILD" install --verbose --skip-license-check
+  end_section "AutobuildInstall" 
+
   if pre_build "$variant" "$build_dir" >> "$build_log" 2>&1
   then
     if $build_link_parallel

File doc/contributions.txt

 Boroondas Gupte
 	OPEN-29
 	OPEN-39
-	OPEN-39
+	OPEN-54
 	OPEN-99
 	SNOW-278
 	SNOW-503
 Fury Rosewood
 Gaberoonie Zanzibar
 Ganymedes Costagravas
+Geenz Spad
+	STORM-1823
 Gene Frostbite
 GeneJ Composer
 Geneko Nemeth
 	STORM-1796
 	STORM-1807
 	STORM-1808
+	STORM-637
+	STORM-1822
 	STORM-1809
 	STORM-1793
 	STORM-1810
 	OPEN-1
 	STORM-1087
 	STORM-1090
+	STORM-1828
 Nicoladie Gymnast
 Nounouch Hapmouche
 	VWR-238
 	CTS-411
 	STORM-546
 	VWR-24509
-    STORM-1684
 	SH-2477
 	STORM-1684
+	STORM-1819
 Tony Kembia
 Torben Trautman
 TouchaHoney Perhaps
 UsikuFarasi Kanarik
 Vadim Bigbear
 	VWR-2681
+Vaalith Jinn
+    STORM-64
 Vector Hastings
 	VWR-8726
 Veritas Raymaker

File indra/CMakeLists.txt

   add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
   add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
   add_subdirectory(${LIBS_OPEN_PREFIX}llui)
-  add_subdirectory(${LIBS_OPEN_PREFIX}llxuixml)
   add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
 
   # Legacy C++ tests. Build always, run if LL_TESTS is true.

File indra/cmake/JsonCpp.cmake

   elseif (LINUX)
     set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a)
   endif (WINDOWS)
-  set(JSONCPP_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
+  set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
 endif (STANDALONE)

File indra/cmake/LLTestCommand.cmake

   FOREACH(dir ${LD_LIBRARY_PATH})
     LIST(APPEND value "-l${dir}")
   ENDFOREACH(dir)
+  # Enough different tests want to be able to find CMake's PYTHON_EXECUTABLE
+  # that we should just pop it into the environment for everybody.
+  LIST(APPEND value "-DPYTHON=${PYTHON_EXECUTABLE}")
   LIST(APPEND value ${ARGN})
   SET(${OUTVAR} ${value})
 ##IF(LL_TEST_VERBOSE)

File indra/cmake/Linking.cmake

   set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
 elseif (DARWIN)
   set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
-  set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)")
+  set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
 endif (WINDOWS)
 
 # Autobuild packages must provide 'release' versions of libraries, but may provide versions for
   set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
 endif(WINDOWS OR DARWIN)
 
-list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
+if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+  # When we're building something other than Release, append the
+  # packages/lib/release directory to deal with autobuild packages that don't
+  # provide (e.g.) lib/debug libraries.
+  list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
+  message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
+endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
 link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
 
 if (LINUX)

File indra/cmake/VisualLeakDetector.cmake

+# -*- cmake -*-
+
+if (VIEWER)
+
+  set(INCLUDE_VLD_CMAKE OFF CACHE BOOL "Build the Windows viewer with Visual Leak Detector turned on or off")
+
+  if (INCLUDE_VLD_CMAKE)
+
+    if (WINDOWS)
+      add_definitions(-DINCLUDE_VLD=1)
+    endif (WINDOWS)
+
+  endif (INCLUDE_VLD_CMAKE)
+
+endif (VIEWER)

File indra/cmake/WebKitLibPlugin.cmake

         QtNetwork
         QtGui
         QtCore
-        qgif
-        qjpeg
-        jpeg
+        jscore
+#        qgif
+#        qjpeg
+#        jpeg
         fontconfig
         X11
         Xrender

File indra/cmake/run_build_test.py

 
 import os
 import sys
+import signal
 import subprocess
 
 def main(command, libpath=[], vars={}):
     sys.stdout.flush()
     return subprocess.call(command)
 
+# swiped from vita, sigh, seems like a Bad Idea to introduce dependency
+def translate_rc(rc):
+    """
+    Accept an rc encoded as for subprocess.Popen.returncode:
+    None means still running
+    int >= 0 means terminated voluntarily with specified rc
+    int <  0 means terminated by signal (-rc)
+
+    Return a string explaining the outcome. In case of a signal, try to
+    name the corresponding symbol from the 'signal' module.
+    """
+    if rc is None:
+        return "still running"
+    
+    if rc >= 0:
+        return "terminated with rc %s" % rc
+
+    # Negative rc means the child was terminated by signal -rc.
+    rc = -rc
+    for attr in dir(signal):
+        if attr.startswith('SIG') and getattr(signal, attr) == rc:
+            strc = attr
+            break
+    else:
+        strc = str(rc)
+    return "terminated by signal %s" % strc
+
 if __name__ == "__main__":
     from optparse import OptionParser
     parser = OptionParser(usage="usage: %prog [options] command args...")
               vars=dict([(pair.split('=', 1) + [""])[:2] for pair in opts.vars]))
     if rc not in (None, 0):
         print >>sys.stderr, "Failure running: %s" % " ".join(args)
-        print >>sys.stderr, "Error: %s" % rc
+        print >>sys.stderr, "Error %s: %s" % (rc, translate_rc(rc))
     sys.exit((rc < 0) and 255 or rc)

File indra/edit-me-to-trigger-new-build.txt

Empty file added.

File 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"
+" -load, --load_size <n>\n"
+"        Portion of the input file to load, in bytes."
+"        If (load == 0), it will load the whole file."
+"        If (load == -1), it will load the size relevant to reach the requested discard level (see -d)."
+"        Only valid for j2c images. Default is 0 (load whole file).\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"
 	// Print out some statistical data on the image
 	std::cout << "Image stats for : " << filename << ", extension : " << image->getExtension() << std::endl;
 
-	std::cout << "    with : " << (int)(image->getWidth())       << ", height : " << (int)(image->getHeight())       << std::endl;
-	std::cout << "    comp : " << (int)(image->getComponents())  << ", levels : " << (int)(image->getDiscardLevel()) << std::endl;
-	std::cout << "    head : " << (int)(image->calcHeaderSize()) << ",   data : " << (int)(image->getDataSize())     << std::endl;
+	std::cout << "    with : " << (int)(image->getWidth())       << ", height : " << (int)(image->getHeight())   << std::endl;
+	std::cout << "    comp : " << (int)(image->getComponents())  << ", levels : " << (int)(image->getLevels())   << std::endl;
+	std::cout << "    head : " << (int)(image->calcHeaderSize()) << ",   data : " << (int)(image->getDataSize()) << std::endl;
 
 	return;
 }
 
 // Load an image from file and return a raw (decompressed) instance of its data
-LLPointer<LLImageRaw> load_image(const std::string &src_filename, int discard_level, int* region, bool output_stats)
+LLPointer<LLImageRaw> load_image(const std::string &src_filename, int discard_level, int* region, int load_size, 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))
+	// We support partial loading only for j2c images
+	if (image->getCodec() == IMG_CODEC_J2C)
 	{
-		return NULL;
+		// Load the header
+		if (!image->load(src_filename, 600))
+		{
+			return NULL;
+		}
+		S32 h = ((LLImageJ2C*)(image.get()))->calcHeaderSize();
+		S32 d = (load_size > 0 ? ((LLImageJ2C*)(image.get()))->calcDiscardLevelBytes(load_size) : 0);
+		S8  r = ((LLImageJ2C*)(image.get()))->getRawDiscardLevel();
+		std::cout << "Merov debug : header = " << h << ", load_size = " << load_size << ", discard level = " << d << ", raw discard level = " << r << std::endl;
+		for (d = 0; d < MAX_DISCARD_LEVEL; d++)
+		{
+			S32 data_size = ((LLImageJ2C*)(image.get()))->calcDataSize(d);
+			std::cout << "Merov debug : discard_level = " << d << ", data_size = " << data_size << std::endl;
+		}
+		if (load_size < 0)
+		{
+			load_size = (discard_level != -1 ? ((LLImageJ2C*)(image.get()))->calcDataSize(discard_level) : 0);
+		}
+		// Load the requested byte range
+		if (!image->load(src_filename, load_size))
+		{
+			return NULL;
+		}
+	}
+	else 
+	{
+		// This just loads the image file stream into a buffer. No decoding done.
+		if (!image->load(src_filename))
+		{
+			return NULL;
+		}
 	}
 	
 	if(	(image->getComponents() != 3) && (image->getComponents() != 4) )
 	bool image_stats = false;
 	int* region = NULL;
 	int discard_level = -1;
+	int load_size = 0;
 	int precincts_size = -1;
 	int blocks_size = -1;
 	int levels = 0;
 				discard_level = llclamp(discard_level,0,5);
 			}
 		}
+		else if (!strcmp(argv[arg], "--load_size") || !strcmp(argv[arg], "-load"))
+		{
+			std::string value_str;
+			if ((arg + 1) < argc)
+			{
+				value_str = argv[arg+1];
+			}
+			if (((arg + 1) >= argc) || (value_str[0] == '-'))
+			{
+				std::cout << "No valid --load_size argument given, load_size ignored" << std::endl;
+			}
+			else
+			{
+				load_size = atoi(value_str.c_str());
+			}
+		}
 		else if (!strcmp(argv[arg], "--precincts") || !strcmp(argv[arg], "-p"))
 		{
 			std::string value_str;
 	for (; in_file != in_end; ++in_file, ++out_file)
 	{
 		// Load file
-		LLPointer<LLImageRaw> raw_image = load_image(*in_file, discard_level, region, image_stats);
+		LLPointer<LLImageRaw> raw_image = load_image(*in_file, discard_level, region, load_size, image_stats);
 		if (!raw_image)
 		{
 			std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl;

File indra/integration_tests/llui_libtest/CMakeLists.txt

 include(LLUI)
 include(LLVFS)        # ugh, needed for LLDir
 include(LLXML)
-include(LLXUIXML)
 include(Linking)
 # include(Tut)
 
     ${LLVFS_INCLUDE_DIRS}
     ${LLWINDOW_INCLUDE_DIRS}
     ${LLXML_INCLUDE_DIRS}
-    ${LLXUIXML_INCLUDE_DIRS}
     )
 
 set(llui_libtest_SOURCE_FILES

File indra/lib/python/indra/util/llmanifest.py

 import errno
 import subprocess
 
+class ManifestError(RuntimeError):
+    """Use an exception more specific than generic Python RuntimeError"""
+    pass
+
+class MissingError(ManifestError):
+    """You specified a file that doesn't exist"""
+    pass
+
 def path_ancestors(path):
     drive, path = os.path.splitdrive(os.path.normpath(path))
     result = []
             arg['description'] % nd)
 
 def main():
+##  import itertools
+##  print ' '.join((("'%s'" % item) if ' ' in item else item)
+##                 for item in itertools.chain([sys.executable], sys.argv))
     option_names = [arg['name'] + '=' for arg in ARGUMENTS]
     option_names.append('help')
     options, remainder = getopt.getopt(sys.argv[1:], "", option_names)
         child.stdout.close()
         status = child.wait()
         if status:
-            raise RuntimeError(
+            raise ManifestError(
                 "Command %s returned non-zero status (%s) \noutput:\n%s"
                 % (command, status, output) )
         return output
           a) verify that you really have created it
           b) schedule it for cleanup"""
         if not os.path.exists(path):
-            raise RuntimeError, "Should be something at path " + path
+            raise ManifestError, "Should be something at path " + path
         self.created_paths.append(path)
 
     def put_in_file(self, contents, dst):
             except (IOError, os.error), why:
                 errors.append((srcname, dstname, why))
         if errors:
-            raise RuntimeError, errors
+            raise ManifestError, errors
 
 
     def cmakedirs(self, path):
 
     def check_file_exists(self, path):
         if not os.path.exists(path) and not os.path.islink(path):
-            raise RuntimeError("Path %s doesn't exist" % (
-                os.path.normpath(os.path.join(os.getcwd(), path)),))
+            raise MissingError("Path %s doesn't exist" % (os.path.abspath(path),))
 
 
-    wildcard_pattern = re.compile('\*')
+    wildcard_pattern = re.compile(r'\*')
     def expand_globs(self, src, dst):
         src_list = glob.glob(src)
         src_re, d_template = self.wildcard_regex(src.replace('\\', '/'),
         sys.stdout.write("Processing %s => %s ... " % (src, dst))
         sys.stdout.flush()
         if src == None:
-            raise RuntimeError("No source file, dst is " + dst)
+            raise ManifestError("No source file, dst is " + dst)
         if dst == None:
             dst = src
         dst = os.path.join(self.get_dst_prefix(), dst)
                 else:
                     count += self.process_file(src, dst)
             return count
-        try:
-            count = try_path(os.path.join(self.get_src_prefix(), src))
-        except RuntimeError:
+
+        for pfx in self.get_src_prefix(), self.get_artwork_prefix(), self.get_build_prefix():
             try:
-                count = try_path(os.path.join(self.get_artwork_prefix(), src))
-            except RuntimeError:
-                count = try_path(os.path.join(self.get_build_prefix(), src))
+                count = try_path(os.path.join(pfx, src))
+            except MissingError:
+                # If src isn't a wildcard, and if that file doesn't exist in
+                # this pfx, try next pfx.
+                count = 0
+                continue
+
+            # Here try_path() didn't raise MissingError. Did it process any files?
+            if count:
+                break
+            # Even though try_path() didn't raise MissingError, it returned 0
+            # files. src is probably a wildcard meant for some other pfx. Loop
+            # back to try the next.
+
         print "%d files" % count
 
     def do(self, *actions):

File indra/linux_updater/CMakeLists.txt

 include(LLCommon)
 include(LLVFS)
 include(LLXML)
-include(LLXUIXML)
+include(LLUI)
 include(Linking)
 
 include_directories(
     ${LLCOMMON_INCLUDE_DIRS}
     ${LLVFS_INCLUDE_DIRS}
     ${LLXML_INCLUDE_DIRS}
-    ${LLXUIXML_INCLUDE_DIRS}
+    ${LLUI_INCLUDE_DIRS}
     ${CURL_INCLUDE_DIRS}
     ${CARES_INCLUDE_DIRS}
     ${OPENSSL_INCLUDE_DIRS}
     ${CRYPTO_LIBRARIES}
     ${UI_LIBRARIES}
     ${LLXML_LIBRARIES}
-    ${LLXUIXML_LIBRARIES}
+    ${LLUI_LIBRARIES}
     ${LLVFS_LIBRARIES}
     ${LLCOMMON_LIBRARIES}
     )

File indra/llcommon/CMakeLists.txt

     llformat.cpp
     llframetimer.cpp
     llheartbeat.cpp
+    llinitparam.cpp
     llinstancetracker.cpp
+    llleap.cpp
+    llleaplistener.cpp
     llliveappconfig.cpp
     lllivefile.cpp
     lllog.cpp
     llmortician.cpp
     lloptioninterface.cpp
     llptrto.cpp 
-    llprocesslauncher.cpp
+    llprocess.cpp
     llprocessor.cpp
     llqueuedthread.cpp
     llrand.cpp
     llrefcount.cpp
     llrun.cpp
     llsd.cpp
+    llsdparam.cpp
     llsdserialize.cpp
     llsdserialize_xml.cpp
     llsdutil.cpp
     llsingleton.cpp
     llstat.cpp
     llstacktrace.cpp
+    llstreamqueue.cpp
     llstreamtools.cpp
     llstring.cpp
     llstringtable.cpp
     llheartbeat.h
     llhttpstatuscodes.h
     llindexedqueue.h
+    llinitparam.h
     llinstancetracker.h
     llkeythrottle.h
     lllazy.h
+    llleap.h
+    llleaplistener.h
     lllistenerwrapper.h
     lllinkedqueue.h
     llliveappconfig.h
     llpointer.h
     llpreprocessor.h
     llpriqueuemap.h
-    llprocesslauncher.h
+    llprocess.h
     llprocessor.h
     llptrskiplist.h
     llptrskipmap.h
     llqueuedthread.h
     llrand.h
     llrefcount.h
+    llregistry.h
     llrun.h
     llrefcount.h
     llsafehandle.h
     llsd.h
+    llsdparam.h
     llsdserialize.h
     llsdserialize_xml.h
     llsdutil.h
     llsingleton.h
     llskiplist.h
     llskipmap.h
+    llsortedvector.h
     llstack.h
     llstacktrace.h
     llstat.h
     llstatenums.h
     llstl.h
+    llstreamqueue.h
     llstreamtools.h
     llstrider.h
     llstring.h
     llthreadsafequeue.h
     lltimer.h
     lltreeiterators.h
+    lltypeinfolookup.h
     lluri.h
     lluuid.h
     lluuidhashmap.h
   LL_ADD_INTEGRATION_TEST(lllazy "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llprocessor "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llrand "" "${test_libs}")
-  LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}"
-                          "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/tests/setpython.py")
+  LL_ADD_INTEGRATION_TEST(llsdserialize "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(llsingleton "" "${test_libs}")                          
   LL_ADD_INTEGRATION_TEST(llstring "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lltreeiterators "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(reflection "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(stringize "" "${test_libs}")
   LL_ADD_INTEGRATION_TEST(lleventdispatcher "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(llprocess "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(llleap "" "${test_libs}")
+  LL_ADD_INTEGRATION_TEST(llstreamqueue "" "${test_libs}")
 
   # *TODO - reenable these once tcmalloc libs no longer break the build.
   #ADD_BUILD_TEST(llallocator llcommon)

File indra/llcommon/llerror.cpp

 		g.invalidateCallSites();
 		s.tagLevelMap[tag_name] = level;
 	}
-}
 
-namespace {
 	LLError::ELevel decodeLevel(std::string name)
 	{
 		static LevelMap level_names;
 		
 		return i->second;
 	}
-	
+}
+
+namespace {
 	void setLevels(LevelMap& map, const LLSD& list, LLError::ELevel level)
 	{
 		LLSD::array_const_iterator i, end;

File indra/llcommon/llerrorcontrol.h

-/** 
+/**
  * @file llerrorcontrol.h
  * @date   December 2006
  * @brief error message system control
  * $LicenseInfo:firstyear=2007&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2010, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 	This is the part of the LLError namespace that manages the messages
 	produced by the logging.  The logging support is defined in llerror.h.
 	Most files do not need to include this.
-	
+
 	These implementations are in llerror.cpp.
 */
 
 		Settings that control what is logged.
 		Setting a level means log messages at that level or above.
 	*/
-	
+
 	LL_COMMON_API void setPrintLocation(bool);
 	LL_COMMON_API void setDefaultLevel(LLError::ELevel);
 	LL_COMMON_API ELevel getDefaultLevel();
 	LL_COMMON_API void setClassLevel(const std::string& class_name, LLError::ELevel);
 	LL_COMMON_API void setFileLevel(const std::string& file_name, LLError::ELevel);
 	LL_COMMON_API void setTagLevel(const std::string& file_name, LLError::ELevel);
-	
+
+	LL_COMMON_API LLError::ELevel decodeLevel(std::string name);
 	LL_COMMON_API void configure(const LLSD&);
 		// the LLSD can configure all of the settings
 		// usually read automatically from the live errorlog.xml file
 		// (by, for example, setting a class level to LEVEL_NONE), will keep
 		// the that message from causing the fatal funciton to be invoked.
 
-    LL_COMMON_API FatalFunction getFatalFunction();
-        // Retrieve the previously-set FatalFunction
+	LL_COMMON_API FatalFunction getFatalFunction();
+		// Retrieve the previously-set FatalFunction
 
-    /// temporarily override the FatalFunction for the duration of a
-    /// particular scope, e.g. for unit tests
-    class LL_COMMON_API OverrideFatalFunction
-    {
-    public:
-        OverrideFatalFunction(const FatalFunction& func):
-            mPrev(getFatalFunction())
-        {
-            setFatalFunction(func);
-        }
-        ~OverrideFatalFunction()
-        {
-            setFatalFunction(mPrev);
-        }
+	/// temporarily override the FatalFunction for the duration of a
+	/// particular scope, e.g. for unit tests
+	class LL_COMMON_API OverrideFatalFunction
+	{
+	public:
+		OverrideFatalFunction(const FatalFunction& func):
+			mPrev(getFatalFunction())
+		{
+			setFatalFunction(func);
+		}
+		~OverrideFatalFunction()
+		{
+			setFatalFunction(mPrev);
+		}
 
-    private:
-        FatalFunction mPrev;
-    };
+	private:
+		FatalFunction mPrev;
+	};
 
 	typedef std::string (*TimeFunction)();
 	LL_COMMON_API std::string utcTime();
-	
+
 	LL_COMMON_API void setTimeFunction(TimeFunction);
 		// The function is use to return the current time, formatted for
 		// display by those error recorders that want the time included.
 		// An object that handles the actual output or error messages.
 	public:
 		virtual ~Recorder();
-		
+
 		virtual void recordMessage(LLError::ELevel, const std::string& message) = 0;
 			// use the level for better display, not for filtering
-			
+
 		virtual bool wantsTime(); // default returns false
 			// override and return true if the recorder wants the time string
 			// included in the text of the message
 	};
-	
+
+	/**
+	 * @NOTE: addRecorder() conveys ownership to the underlying Settings
+	 * object -- when destroyed, it will @em delete the passed Recorder*!
+	 */
 	LL_COMMON_API void addRecorder(Recorder*);
+	/**
+	 * @NOTE: removeRecorder() reclaims ownership of the Recorder*: its
+	 * lifespan becomes the caller's problem.
+	 */
 	LL_COMMON_API void removeRecorder(Recorder*);
 		// each error message is passed to each recorder via recordMessage()
-	
+
 	LL_COMMON_API void logToFile(const std::string& filename);
 	LL_COMMON_API void logToFixedBuffer(LLLineBuffer*);
 		// Utilities to add recorders for logging to a file or a fixed buffer
 	class Settings;
 	LL_COMMON_API Settings* saveAndResetSettings();
 	LL_COMMON_API void restoreSettings(Settings *);
-		
+
 	LL_COMMON_API std::string abbreviateFile(const std::string& filePath);
 	LL_COMMON_API int shouldLogCallCount();
-	
 };
 
 #endif // LL_LLERRORCONTROL_H

File indra/llcommon/llerrorthread.cpp

 #if !LL_WINDOWS
 	U32 last_sig_child_count = 0;
 #endif
-	while (1)
+	while (! (LLApp::isError() || LLApp::isStopped()))
 	{
-		if (LLApp::isError() || LLApp::isStopped())
-		{
-			// The application has stopped running, time to take action (maybe)
-			break;
-		}
 #if !LL_WINDOWS
 		// Check whether or not the main thread had a sig child we haven't handled.
 		U32 current_sig_child_count = LLApp::getSigChildCount();

File indra/llcommon/llfile.cpp

-/** 
+/**
  * @file llfile.cpp
  * @author Michael Schlachter
  * @date 2006-03-23
  * $LicenseInfo:firstyear=2006&license=viewerlgpl$
  * Second Life Viewer Source Code
  * Copyright (C) 2010, Linden Research, Inc.
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation;
  * version 2.1 of the License only.
- * 
+ *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- * 
+ *
  * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
  * $/LicenseInfo$
  */
 
 #if LL_WINDOWS
 #include <windows.h>
+#include <stdlib.h>                 // Windows errno
+#else
+#include <errno.h>
 #endif
 
 #include "linden_common.h"
 #include "llfile.h"
 #include "llstring.h"
 #include "llerror.h"
+#include "stringize.h"
 
 using namespace std;
 
+static std::string empty;
+
+// Many of the methods below use OS-level functions that mess with errno. Wrap
+// variants of strerror() to report errors.
+
+#if LL_WINDOWS
+// On Windows, use strerror_s().
+std::string strerr(int errn)
+{
+	char buffer[256];
+	strerror_s(buffer, errn);       // infers sizeof(buffer) -- love it!
+	return buffer;
+}
+
+#else
+// On Posix we want to call strerror_r(), but alarmingly, there are two
+// different variants. The one that returns int always populates the passed
+// buffer (except in case of error), whereas the other one always returns a
+// valid char* but might or might not populate the passed buffer. How do we
+// know which one we're getting? Define adapters for each and let the compiler
+// select the applicable adapter.
+
+// strerror_r() returns char*
+std::string message_from(int /*orig_errno*/, const char* /*buffer*/, size_t /*bufflen*/,
+						 const char* strerror_ret)
+{
+	return strerror_ret;
+}
+
+// strerror_r() returns int
+std::string message_from(int orig_errno, const char* buffer, size_t bufflen,
+						 int strerror_ret)
+{
+	if (strerror_ret == 0)
+	{
+		return buffer;
+	}
+	// Here strerror_r() has set errno. Since strerror_r() has already failed,
+	// seems like a poor bet to call it again to diagnose its own error...
+	int stre_errno = errno;
+	if (stre_errno == ERANGE)
+	{
+		return STRINGIZE("strerror_r() can't explain errno " << orig_errno
+						 << " (" << bufflen << "-byte buffer too small)");
+	}
+	if (stre_errno == EINVAL)
+	{
+		return STRINGIZE("unknown errno " << orig_errno);
+	}
+	// Here we don't even understand the errno from strerror_r()!
+	return STRINGIZE("strerror_r() can't explain errno " << orig_errno
+					 << " (error " << stre_errno << ')');
+}
+
+std::string strerr(int errn)
+{
+	char buffer[256];
+	// Select message_from() function matching the strerror_r() we have on hand.
+	return message_from(errn, buffer, sizeof(buffer),
+						strerror_r(errn, buffer, sizeof(buffer)));
+}
+#endif	// ! LL_WINDOWS
+
+// On either system, shorthand call just infers global 'errno'.
+std::string strerr()
+{
+	return strerr(errno);
+}
+
+int warnif(const std::string& desc, const std::string& filename, int rc, int accept=0)
+{
+	if (rc < 0)
+	{
+		// Capture errno before we start emitting output
+		int errn = errno;
+		// For certain operations, a particular errno value might be
+		// acceptable -- e.g. stat() could permit ENOENT, mkdir() could permit
+		// EEXIST. Don't warn if caller explicitly says this errno is okay.
+		if (errn != accept)
+		{
+			LL_WARNS("LLFile") << "Couldn't " << desc << " '" << filename
+							   << "' (errno " << errn << "): " << strerr(errn) << LL_ENDL;
+		}
+#if 0 && LL_WINDOWS                 // turn on to debug file-locking problems
+		// If the problem is "Permission denied," maybe it's because another
+		// process has the file open. Try to find out.
+		if (errn == EACCES)         // *not* EPERM
+		{
+			// Only do any of this stuff (before LL_ENDL) if it will be logged.
+			LL_DEBUGS("LLFile") << empty;
+			const char* TEMP = getenv("TEMP");
+			if (! TEMP)
+			{
+				LL_CONT << "No $TEMP, not running 'handle'";
+			}
+			else
+			{
+				std::string tf(TEMP);
+				tf += "\\handle.tmp";
+				// http://technet.microsoft.com/en-us/sysinternals/bb896655
+				std::string cmd(STRINGIZE("handle \"" << filename
+										  // "openfiles /query /v | fgrep -i \"" << filename
+										  << "\" > \"" << tf << '"'));
+				LL_CONT << cmd;
+				if (system(cmd.c_str()) != 0)
+				{
+					LL_CONT << "\nDownload 'handle.exe' from http://technet.microsoft.com/en-us/sysinternals/bb896655";
+				}
+				else
+				{
+					std::ifstream inf(tf);
+					std::string line;
+					while (std::getline(inf, line))
+					{
+						LL_CONT << '\n' << line;
+					}
+				}
+				LLFile::remove(tf);
+			}
+			LL_CONT << LL_ENDL;
+		}
+#endif  // LL_WINDOWS hack to identify processes holding file open
+	}
+	return rc;
+}
+
 // static
 int	LLFile::mkdir(const std::string& dirname, int perms)
 {
-#if LL_WINDOWS	
+#if LL_WINDOWS
 	// permissions are ignored on Windows
 	std::string utf8dirname = dirname;
 	llutf16string utf16dirname = utf8str_to_utf16str(utf8dirname);
-	return _wmkdir(utf16dirname.c_str());
+	int rc = _wmkdir(utf16dirname.c_str());
 #else
-	return ::mkdir(dirname.c_str(), (mode_t)perms);
+	int rc = ::mkdir(dirname.c_str(), (mode_t)perms);
 #endif
+	// We often use mkdir() to ensure the existence of a directory that might
+	// already exist. Don't spam the log if it does.
+	return warnif("mkdir", dirname, rc, EEXIST);
 }
 
 // static
 int	LLFile::rmdir(const std::string& dirname)
 {
-#if LL_WINDOWS	
+#if LL_WINDOWS
 	// permissions are ignored on Windows
 	std::string utf8dirname = dirname;
 	llutf16string utf16dirname = utf8str_to_utf16str(utf8dirname);
-	return _wrmdir(utf16dirname.c_str());
+	int rc = _wrmdir(utf16dirname.c_str());
 #else
-	return ::rmdir(dirname.c_str());
+	int rc = ::rmdir(dirname.c_str());
 #endif
+	return warnif("rmdir", dirname, rc);
 }
 
 // static
 #if	LL_WINDOWS
 	std::string utf8filename = filename;
 	llutf16string utf16filename = utf8str_to_utf16str(utf8filename);
-	return _wremove(utf16filename.c_str());
+	int rc = _wremove(utf16filename.c_str());
 #else
-	return ::remove(filename.c_str());
+	int rc = ::remove(filename.c_str());
 #endif
+	return warnif("remove", filename, rc);
 }
 
 int	LLFile::rename(const std::string& filename, const std::string& newname)
 	std::string utf8newname = newname;
 	llutf16string utf16filename = utf8str_to_utf16str(utf8filename);
 	llutf16string utf16newname = utf8str_to_utf16str(utf8newname);
-	return _wrename(utf16filename.c_str(),utf16newname.c_str());
+	int rc = _wrename(utf16filename.c_str(),utf16newname.c_str());
 #else
-	return ::rename(filename.c_str(),newname.c_str());
+	int rc = ::rename(filename.c_str(),newname.c_str());
 #endif
+	return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc);
 }
 
 int	LLFile::stat(const std::string& filename, llstat* filestatus)
 #if LL_WINDOWS
 	std::string utf8filename = filename;
 	llutf16string utf16filename = utf8str_to_utf16str(utf8filename);
-	return _wstat(utf16filename.c_str(),filestatus);
+	int rc = _wstat(utf16filename.c_str(),filestatus);
 #else
-	return ::stat(filename.c_str(),filestatus);
+	int rc = ::stat(filename.c_str(),filestatus);
 #endif
+	// We use stat() to determine existence (see isfile(), isdir()).
+	// Don't spam the log if the subject pathname doesn't exist.
+	return warnif("stat", filename, rc, ENOENT);
 }
 
 bool LLFile::isdir(const std::string& filename)
 {
 	llstat st;
-	
+
 	return stat(filename, &st) == 0 && S_ISDIR(st.st_mode);
 }
 
 bool LLFile::isfile(const std::string& filename)
 {
 	llstat st;
-	
+
 	return stat(filename, &st) == 0 && S_ISREG(st.st_mode);
 }
 
 	ios_base::openmode _Mode,
 	int _Prot)
 {	// open a C stream with specified mode
-	
+
 	LLFILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::in, _Prot);
 	if(filep == NULL)
 	{
 	return false;
 }
 llifstream::~llifstream()
-{	
+{
 	if (_ShouldClose)
 	{
 		close();
 
 void llofstream::open(const std::string& _Filename,	/* Flawfinder: ignore */
 	ios_base::openmode _Mode,
-	int _Prot)	
+	int _Prot)
 {	// open a C stream with specified mode
 
 	LLFILE* filep = LLFile::_Fiopen(_Filename,_Mode | ios_base::out, _Prot);
 
 llofstream::llofstream(const std::string& _Filename,
 	std::ios_base::openmode _Mode,
-	int _Prot) 
+	int _Prot)
 		: std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL),_ShouldClose(false)
 {	// construct with named file and specified mode
 	open(_Filename, _Mode , _Prot);	/* Flawfinder: ignore */
 }
 
 llofstream::~llofstream()
-{	
+{
 	// destroy the object
 	if (_ShouldClose)
 	{

File indra/llcommon/llinitparam.cpp

+/** 
+ * @file llinitparam.cpp
+ * @brief parameter block abstraction for creating complex objects and 
+ * parsing construction parameters from xml and LLSD
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ * 
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include "llinitparam.h"
+
+
+namespace LLInitParam
+{
+	//
+	// Param
+	//
+	Param::Param(BaseBlock* enclosing_block)
+	:	mIsProvided(false)
+	{
+		const U8* my_addr = reinterpret_cast<const U8*>(this);
+		const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
+		mEnclosingBlockOffset = 0x7FFFffff & (U32)(my_addr - block_addr);
+	}
+
+	//
+	// ParamDescriptor
+	//
+	ParamDescriptor::ParamDescriptor(param_handle_t p, 
+									merge_func_t merge_func, 
+									deserialize_func_t deserialize_func, 
+									serialize_func_t serialize_func,
+									validation_func_t validation_func,
+									inspect_func_t inspect_func,
+									S32 min_count,
+									S32 max_count)
+	:	mParamHandle(p),
+		mMergeFunc(merge_func),
+		mDeserializeFunc(deserialize_func),
+		mSerializeFunc(serialize_func),
+		mValidationFunc(validation_func),
+		mInspectFunc(inspect_func),
+		mMinCount(min_count),
+		mMaxCount(max_count),
+		mUserData(NULL)
+	{}
+
+	ParamDescriptor::ParamDescriptor()
+	:	mParamHandle(0),
+		mMergeFunc(NULL),
+		mDeserializeFunc(NULL),
+		mSerializeFunc(NULL),
+		mValidationFunc(NULL),
+		mInspectFunc(NULL),
+		mMinCount(0),
+		mMaxCount(0),
+		mUserData(NULL)
+	{}
+
+	ParamDescriptor::~ParamDescriptor()
+	{
+		delete mUserData;
+	}
+
+	//
+	// Parser
+	//
+	Parser::~Parser()
+	{}
+
+	void Parser::parserWarning(const std::string& message)
+	{
+		if (mParseSilently) return;
+		llwarns << message << llendl;
+	}
+	
+	void Parser::parserError(const std::string& message)
+	{
+		if (mParseSilently) return;