diff --git a/installers/WinInstaller/scons-local/scons-LICENSE b/installers/WinInstaller/scons-local/scons-LICENSE
index 4df86d1d480dd5117d82f34dfef4e113b5f5d419..bd5632d16c5aa28436e086780b3d2a1a51cd4b77 100644
--- a/installers/WinInstaller/scons-local/scons-LICENSE
+++ b/installers/WinInstaller/scons-local/scons-LICENSE
@@ -3,7 +3,7 @@
         This copyright and license do not apply to any other software
         with which this software may have been included.
 
-Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+Copyright (c) 2001 - 2015 The SCons Foundation
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
diff --git a/installers/WinInstaller/scons-local/scons-README b/installers/WinInstaller/scons-local/scons-README
index f1d59d4b4287c3b3ee6cf9c38362e2b60e09f1b6..40a1a194d18bffdb557da13ce14b62a48c4072a2 100644
--- a/installers/WinInstaller/scons-local/scons-README
+++ b/installers/WinInstaller/scons-local/scons-README
@@ -1,4 +1,4 @@
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 
                  SCons - a software construction tool
 
@@ -202,3 +202,4 @@ With plenty of help from the SCons Development team:
         Anthony Roach
         Terrel Shumway
 
+
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/posix.py b/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/posix.py
deleted file mode 100644
index cff1f93a422112641eefb1f8ccfc777b1dd839e7..0000000000000000000000000000000000000000
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/posix.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""SCons.Platform.posix
-
-Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems.
-
-There normally shouldn't be any need to import this module directly.  It
-will usually be imported through the generic SCons.Platform.Platform()
-selection method.
-"""
-
-#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "src/engine/SCons/Platform/posix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
-
-import errno
-import os
-import os.path
-import subprocess
-import sys
-import select
-
-import SCons.Util
-from SCons.Platform import TempFileMunge
-
-exitvalmap = {
-    2 : 127,
-    13 : 126,
-}
-
-def escape(arg):
-    "escape shell special characters"
-    slash = '\\'
-    special = '"$()'
-
-    arg = arg.replace(slash, slash+slash)
-    for c in special:
-        arg = arg.replace(c, slash+c)
-
-    return '"' + arg + '"'
-
-def exec_system(l, env):
-    stat = os.system(' '.join(l))
-    if stat & 0xff:
-        return stat | 0x80
-    return stat >> 8
-
-def exec_spawnvpe(l, env):
-    stat = os.spawnvpe(os.P_WAIT, l[0], l, env)
-    # os.spawnvpe() returns the actual exit code, not the encoding
-    # returned by os.waitpid() or os.system().
-    return stat
-
-def exec_fork(l, env): 
-    pid = os.fork()
-    if not pid:
-        # Child process.
-        exitval = 127
-        try:
-            os.execvpe(l[0], l, env)
-        except OSError, e:
-            exitval = exitvalmap.get(e[0], e[0])
-            sys.stderr.write("scons: %s: %s\n" % (l[0], e[1]))
-        os._exit(exitval)
-    else:
-        # Parent process.
-        pid, stat = os.waitpid(pid, 0)
-        if stat & 0xff:
-            return stat | 0x80
-        return stat >> 8
-
-def _get_env_command(sh, escape, cmd, args, env):
-    s = ' '.join(args)
-    if env:
-        l = ['env', '-'] + \
-            [escape(t[0])+'='+escape(t[1]) for t in env.items()] + \
-            [sh, '-c', escape(s)]
-        s = ' '.join(l)
-    return s
-
-def env_spawn(sh, escape, cmd, args, env):
-    return exec_system([_get_env_command( sh, escape, cmd, args, env)], env)
-
-def spawnvpe_spawn(sh, escape, cmd, args, env):
-    return exec_spawnvpe([sh, '-c', ' '.join(args)], env)
-
-def fork_spawn(sh, escape, cmd, args, env):
-    return exec_fork([sh, '-c', ' '.join(args)], env)
-
-def process_cmd_output(cmd_stdout, cmd_stderr, stdout, stderr):
-    stdout_eof = stderr_eof = 0
-    while not (stdout_eof and stderr_eof):
-        try:
-            (i,o,e) = select.select([cmd_stdout, cmd_stderr], [], [])
-            if cmd_stdout in i:
-                str = cmd_stdout.read()
-                if len(str) == 0:
-                    stdout_eof = 1
-                elif stdout is not None:
-                    stdout.write(str)
-            if cmd_stderr in i:
-                str = cmd_stderr.read()
-                if len(str) == 0:
-                    #sys.__stderr__.write( "stderr_eof=1\n" )
-                    stderr_eof = 1
-                else:
-                    #sys.__stderr__.write( "str(stderr) = %s\n" % str )
-                    stderr.write(str)
-        except select.error, (_errno, _strerror):
-            if _errno != errno.EINTR:
-                raise
-
-def exec_popen3(l, env, stdout, stderr):
-    proc = subprocess.Popen(' '.join(l),
-                            stdout=stdout,
-                            stderr=stderr,
-                            shell=True)
-    stat = proc.wait()
-    if stat & 0xff:
-        return stat | 0x80
-    return stat >> 8
-
-def exec_piped_fork(l, env, stdout, stderr):
-    # spawn using fork / exec and providing a pipe for the command's
-    # stdout / stderr stream
-    if stdout != stderr:
-        (rFdOut, wFdOut) = os.pipe()
-        (rFdErr, wFdErr) = os.pipe()
-    else:
-        (rFdOut, wFdOut) = os.pipe()
-        rFdErr = rFdOut
-        wFdErr = wFdOut
-    # do the fork
-    pid = os.fork()
-    if not pid:
-        # Child process
-        os.close( rFdOut )
-        if rFdOut != rFdErr:
-            os.close( rFdErr )
-        os.dup2( wFdOut, 1 ) # is there some symbolic way to do that ?
-        os.dup2( wFdErr, 2 )
-        os.close( wFdOut )
-        if stdout != stderr:
-            os.close( wFdErr )
-        exitval = 127
-        try:
-            os.execvpe(l[0], l, env)
-        except OSError, e:
-            exitval = exitvalmap.get(e[0], e[0])
-            stderr.write("scons: %s: %s\n" % (l[0], e[1]))
-        os._exit(exitval)
-    else:
-        # Parent process
-        pid, stat = os.waitpid(pid, 0)
-        os.close( wFdOut )
-        if stdout != stderr:
-            os.close( wFdErr )
-        childOut = os.fdopen( rFdOut )
-        if stdout != stderr:
-            childErr = os.fdopen( rFdErr )
-        else:
-            childErr = childOut
-        process_cmd_output(childOut, childErr, stdout, stderr)
-        os.close( rFdOut )
-        if stdout != stderr:
-            os.close( rFdErr )
-        if stat & 0xff:
-            return stat | 0x80
-        return stat >> 8
-
-def piped_env_spawn(sh, escape, cmd, args, env, stdout, stderr):
-    # spawn using Popen3 combined with the env command
-    # the command name and the command's stdout is written to stdout
-    # the command's stderr is written to stderr
-    return exec_popen3([_get_env_command(sh, escape, cmd, args, env)],
-                       env, stdout, stderr)
-
-def piped_fork_spawn(sh, escape, cmd, args, env, stdout, stderr):
-    # spawn using fork / exec and providing a pipe for the command's
-    # stdout / stderr stream
-    return exec_piped_fork([sh, '-c', ' '.join(args)],
-                           env, stdout, stderr)
-
-
-
-def generate(env):
-    # If os.spawnvpe() exists, we use it to spawn commands.  Otherwise
-    # if the env utility exists, we use os.system() to spawn commands,
-    # finally we fall back on os.fork()/os.exec().  
-    #
-    # os.spawnvpe() is prefered because it is the most efficient.  But
-    # for Python versions without it, os.system() is prefered because it
-    # is claimed that it works better with threads (i.e. -j) and is more
-    # efficient than forking Python.
-    #
-    # NB: Other people on the scons-users mailing list have claimed that
-    # os.fork()/os.exec() works better than os.system().  There may just
-    # not be a default that works best for all users.
-
-    if 'spawnvpe' in os.__dict__:
-        spawn = spawnvpe_spawn
-    elif env.Detect('env'):
-        spawn = env_spawn
-    else:
-        spawn = fork_spawn
-
-    if env.Detect('env'):
-        pspawn = piped_env_spawn
-    else:
-        pspawn = piped_fork_spawn
-
-    if 'ENV' not in env:
-        env['ENV']        = {}
-    env['ENV']['PATH']    = '/usr/local/bin:/opt/bin:/bin:/usr/bin'
-    env['OBJPREFIX']      = ''
-    env['OBJSUFFIX']      = '.o'
-    env['SHOBJPREFIX']    = '$OBJPREFIX'
-    env['SHOBJSUFFIX']    = '$OBJSUFFIX'
-    env['PROGPREFIX']     = ''
-    env['PROGSUFFIX']     = ''
-    env['LIBPREFIX']      = 'lib'
-    env['LIBSUFFIX']      = '.a'
-    env['SHLIBPREFIX']    = '$LIBPREFIX'
-    env['SHLIBSUFFIX']    = '.so'
-    env['LIBPREFIXES']    = [ '$LIBPREFIX' ]
-    env['LIBSUFFIXES']    = [ '$LIBSUFFIX', '$SHLIBSUFFIX' ]
-    env['PSPAWN']         = pspawn
-    env['SPAWN']          = spawn
-    env['SHELL']          = 'sh'
-    env['ESCAPE']         = escape
-    env['TEMPFILE']       = TempFileMunge
-    env['TEMPFILEPREFIX'] = '@'
-    #Based on LINUX: ARG_MAX=ARG_MAX=131072 - 3000 for environment expansion
-    #Note: specific platforms might rise or lower this value
-    env['MAXLINELENGTH']  = 128072
-
-    # This platform supports RPATH specifications.
-    env['__RPATH'] = '$_RPATH'
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dmd.py b/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dmd.py
deleted file mode 100644
index 839020f0cc39a18fd3dd31c6d55d9615cde19f8a..0000000000000000000000000000000000000000
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dmd.py
+++ /dev/null
@@ -1,240 +0,0 @@
-"""SCons.Tool.dmd
-
-Tool-specific initialization for the Digital Mars D compiler.
-(http://digitalmars.com/d)
-
-Coded by Andy Friesen (andy@ikagames.com)
-15 November 2003
-
-Amended by Russel Winder (russel@russel.org.uk)
-2010-02-07
-
-There are a number of problems with this script at this point in time.
-The one that irritates me the most is the Windows linker setup.  The D
-linker doesn't have a way to add lib paths on the commandline, as far
-as I can see.  You have to specify paths relative to the SConscript or
-use absolute paths.  To hack around it, add '#/blah'.  This will link
-blah.lib from the directory where SConstruct resides.
-
-Compiler variables:
-    DC - The name of the D compiler to use.  Defaults to dmd or gdmd,
-    whichever is found.
-    DPATH - List of paths to search for import modules.
-    DVERSIONS - List of version tags to enable when compiling.
-    DDEBUG - List of debug tags to enable when compiling.
-
-Linker related variables:
-    LIBS - List of library files to link in.
-    DLINK - Name of the linker to use.  Defaults to dmd or gdmd.
-    DLINKFLAGS - List of linker flags.
-
-Lib tool variables:
-    DLIB - Name of the lib tool to use.  Defaults to lib.
-    DLIBFLAGS - List of flags to pass to the lib tool.
-    LIBS - Same as for the linker. (libraries to pull into the .lib)
-"""
-
-#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "src/engine/SCons/Tool/dmd.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
-
-import os
-
-import SCons.Action
-import SCons.Builder
-import SCons.Defaults
-import SCons.Scanner.D
-import SCons.Tool
-
-# Adapted from c++.py
-def isD(source):
-    if not source:
-        return 0
-
-    for s in source:
-        if s.sources:
-            ext = os.path.splitext(str(s.sources[0]))[1]
-            if ext == '.d':
-                return 1
-    return 0
-
-smart_link = {}
-
-smart_lib = {}
-
-def generate(env):
-    global smart_link
-    global smart_lib
-
-    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
-
-    DAction = SCons.Action.Action('$DCOM', '$DCOMSTR')
-
-    static_obj.add_action('.d', DAction)
-    shared_obj.add_action('.d', DAction)
-    static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter)
-    shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter)
-
-    dc = env.Detect(['dmd', 'gdmd'])
-    env['DC'] = dc
-    env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of$TARGET $SOURCES'
-    env['_DINCFLAGS'] = '$( ${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}  $)'
-    env['_DVERFLAGS'] = '$( ${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}  $)'
-    env['_DDEBUGFLAGS'] = '$( ${_concat(DDEBUGPREFIX, DDEBUG, DDEBUGSUFFIX, __env__)} $)'
-    env['_DFLAGS'] = '$( ${_concat(DFLAGPREFIX, DFLAGS, DFLAGSUFFIX, __env__)} $)'
-
-    env['DPATH'] = ['#/']
-    env['DFLAGS'] = []
-    env['DVERSIONS'] = []
-    env['DDEBUG'] = []
-
-    if dc:
-        # Add the path to the standard library.
-        # This is merely for the convenience of the dependency scanner.
-        dmd_path = env.WhereIs(dc)
-        if dmd_path:
-            x = dmd_path.rindex(dc)
-            phobosDir = dmd_path[:x] + '/../src/phobos'
-            if os.path.isdir(phobosDir):
-                env.Append(DPATH = [phobosDir])
-
-    env['DINCPREFIX'] = '-I'
-    env['DINCSUFFIX'] = ''
-    env['DVERPREFIX'] = '-version='
-    env['DVERSUFFIX'] = ''
-    env['DDEBUGPREFIX'] = '-debug='
-    env['DDEBUGSUFFIX'] = ''
-    env['DFLAGPREFIX'] = '-'
-    env['DFLAGSUFFIX'] = ''
-    env['DFILESUFFIX'] = '.d'
-
-    # Need to use the Digital Mars linker/lib on windows.
-    # *nix can just use GNU link.
-    if env['PLATFORM'] == 'win32':
-        env['DLINK'] = '$DC'
-        env['DLINKCOM'] = '$DLINK -of$TARGET $SOURCES $DFLAGS $DLINKFLAGS $_DLINKLIBFLAGS'
-        env['DLIB'] = 'lib'
-        env['DLIBCOM'] = '$DLIB $_DLIBFLAGS -c $TARGET $SOURCES $_DLINKLIBFLAGS'
-
-        env['_DLINKLIBFLAGS'] = '$( ${_concat(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
-        env['_DLIBFLAGS'] = '$( ${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)} $)'
-        env['DLINKFLAGS'] = []
-        env['DLIBLINKPREFIX'] = ''
-        env['DLIBLINKSUFFIX'] = '.lib'
-        env['DLIBFLAGPREFIX'] = '-'
-        env['DLIBFLAGSUFFIX'] = ''
-        env['DLINKFLAGPREFIX'] = '-'
-        env['DLINKFLAGSUFFIX'] = ''
-
-        SCons.Tool.createStaticLibBuilder(env)
-
-        # Basically, we hijack the link and ar builders with our own.
-        # these builders check for the presence of D source, and swap out
-        # the system's defaults for the Digital Mars tools.  If there's no D
-        # source, then we silently return the previous settings.
-        linkcom = env.get('LINKCOM')
-        try:
-            env['SMART_LINKCOM'] = smart_link[linkcom]
-        except KeyError:
-            def _smartLink(source, target, env, for_signature,
-                           defaultLinker=linkcom):
-                if isD(source):
-                    # XXX I'm not sure how to add a $DLINKCOMSTR variable
-                    # so that it works with this _smartLink() logic,
-                    # and I don't have a D compiler/linker to try it out,
-                    # so we'll leave it alone for now.
-                    return '$DLINKCOM'
-                else:
-                    return defaultLinker
-            env['SMART_LINKCOM'] = smart_link[linkcom] = _smartLink
-
-        arcom = env.get('ARCOM')
-        try:
-            env['SMART_ARCOM'] = smart_lib[arcom]
-        except KeyError:
-            def _smartLib(source, target, env, for_signature,
-                         defaultLib=arcom):
-                if isD(source):
-                    # XXX I'm not sure how to add a $DLIBCOMSTR variable
-                    # so that it works with this _smartLib() logic, and
-                    # I don't have a D compiler/archiver to try it out,
-                    # so we'll leave it alone for now.
-                    return '$DLIBCOM'
-                else:
-                    return defaultLib
-            env['SMART_ARCOM'] = smart_lib[arcom] = _smartLib
-
-        # It is worth noting that the final space in these strings is
-        # absolutely pivotal.  SCons sees these as actions and not generators
-        # if it is not there. (very bad)
-        env['ARCOM'] = '$SMART_ARCOM '
-        env['LINKCOM'] = '$SMART_LINKCOM '
-    else: # assuming linux
-        linkcom = env.get('LINKCOM')
-        try:
-            env['SMART_LINKCOM'] = smart_link[linkcom]
-        except KeyError:
-            def _smartLink(source, target, env, for_signature,
-                           defaultLinker=linkcom, dc=dc):
-                if isD(source):
-                    try:
-                        libs = env['LIBS']
-                    except KeyError:
-                        libs = []
-                    if dc == 'dmd':
-                        # TODO: This assumes that the dmd executable is in the
-                        # bin directory and that the libraries are in a peer
-                        # directory lib.  This true of the Digital Mars
-                        # distribution but . . .
-                        import glob
-                        dHome = env.WhereIs(dc).replace('/dmd' , '/..')
-                        if glob.glob(dHome + '/lib/*phobos2*'):
-                            if 'phobos2' not in libs:
-                                env.Append(LIBPATH = [dHome + '/lib'])
-                                env.Append(LIBS = ['phobos2'])
-                                # TODO: Find out when there will be a
-                                # 64-bit version of D.
-                                env.Append(LINKFLAGS = ['-m32'])
-                        else:
-                            if 'phobos' not in libs:
-                                env.Append(LIBS = ['phobos'])
-                    elif dc is 'gdmd':
-                        env.Append(LIBS = ['gphobos'])
-                    if 'pthread' not in libs:
-                        env.Append(LIBS = ['pthread'])
-                    if 'm' not in libs:
-                        env.Append(LIBS = ['m'])
-                return defaultLinker
-            env['SMART_LINKCOM'] = smart_link[linkcom] = _smartLink
-
-        env['LINKCOM'] = '$SMART_LINKCOM '
-
-def exists(env):
-    return env.Detect(['dmd', 'gdmd'])
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/link.py b/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/link.py
deleted file mode 100644
index 13a671d767e1379bb0be28e24a626537fb0400bf..0000000000000000000000000000000000000000
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/link.py
+++ /dev/null
@@ -1,122 +0,0 @@
-"""SCons.Tool.link
-
-Tool-specific initialization for the generic Posix linker.
-
-There normally shouldn't be any need to import this module directly.
-It will usually be imported through the generic SCons.Tool.Tool()
-selection method.
-
-"""
-
-#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "src/engine/SCons/Tool/link.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
-
-import SCons.Defaults
-import SCons.Tool
-import SCons.Util
-import SCons.Warnings
-
-from SCons.Tool.FortranCommon import isfortran
-
-cplusplus = __import__('c++', globals(), locals(), [])
-
-issued_mixed_link_warning = False
-
-def smart_link(source, target, env, for_signature):
-    has_cplusplus = cplusplus.iscplusplus(source)
-    has_fortran = isfortran(env, source)
-    if has_cplusplus and has_fortran:
-        global issued_mixed_link_warning
-        if not issued_mixed_link_warning:
-            msg = "Using $CXX to link Fortran and C++ code together.\n\t" + \
-              "This may generate a buggy executable if the '%s'\n\t" + \
-              "compiler does not know how to deal with Fortran runtimes."
-            SCons.Warnings.warn(SCons.Warnings.FortranCxxMixWarning,
-                                msg % env.subst('$CXX'))
-            issued_mixed_link_warning = True
-        return '$CXX'
-    elif has_fortran:
-        return '$FORTRAN'
-    elif has_cplusplus:
-        return '$CXX'
-    return '$CC'
-
-def shlib_emitter(target, source, env):
-    for tgt in target:
-        tgt.attributes.shared = 1
-    return (target, source)
-
-def generate(env):
-    """Add Builders and construction variables for gnulink to an Environment."""
-    SCons.Tool.createSharedLibBuilder(env)
-    SCons.Tool.createProgBuilder(env)
-
-    env['SHLINK']      = '$LINK'
-    env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
-    env['SHLINKCOM']   = '$SHLINK -o $TARGET $SHLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
-    # don't set up the emitter, cause AppendUnique will generate a list
-    # starting with None :-(
-    env.Append(SHLIBEMITTER = [shlib_emitter])
-    env['SMARTLINK']   = smart_link
-    env['LINK']        = "$SMARTLINK"
-    env['LINKFLAGS']   = SCons.Util.CLVar('')
-    # __RPATH is only set to something ($_RPATH typically) on platforms that support it.
-    env['LINKCOM']     = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
-    env['LIBDIRPREFIX']='-L'
-    env['LIBDIRSUFFIX']=''
-    env['_LIBFLAGS']='${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}'
-    env['LIBLINKPREFIX']='-l'
-    env['LIBLINKSUFFIX']=''
-
-    if env['PLATFORM'] == 'hpux':
-        env['SHLIBSUFFIX'] = '.sl'
-    elif env['PLATFORM'] == 'aix':
-        env['SHLIBSUFFIX'] = '.a'
-
-    # For most platforms, a loadable module is the same as a shared
-    # library.  Platforms which are different can override these, but
-    # setting them the same means that LoadableModule works everywhere.
-    SCons.Tool.createLoadableModuleBuilder(env)
-    env['LDMODULE'] = '$SHLINK'
-    # don't set up the emitter, cause AppendUnique will generate a list
-    # starting with None :-(
-    env.Append(LDMODULEEMITTER='$SHLIBEMITTER')
-    env['LDMODULEPREFIX'] = '$SHLIBPREFIX' 
-    env['LDMODULESUFFIX'] = '$SHLIBSUFFIX' 
-    env['LDMODULEFLAGS'] = '$SHLINKFLAGS'
-    env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
-
-
-
-def exists(env):
-    # This module isn't really a Tool on its own, it's common logic for
-    # other linkers.
-    return None
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Action.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Action.py
similarity index 97%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Action.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Action.py
index a648c6937614c5eeb3946c3e76fe834317b7da2d..7acde466dc5dd2ac34ef6aba28779284ffae1180 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Action.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Action.py
@@ -76,7 +76,7 @@ way for wrapping up the functions.
 
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -97,9 +97,7 @@ way for wrapping up the functions.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Action.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
-
-import SCons.compat
+__revision__ = "src/engine/SCons/Action.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import dis
 import os
@@ -109,9 +107,9 @@ import re
 import sys
 import subprocess
 
+import SCons.Debug
 from SCons.Debug import logInstanceCreation
 import SCons.Errors
-import SCons.Executor
 import SCons.Util
 import SCons.Subst
 
@@ -336,7 +334,7 @@ def _do_create_keywords(args, kw):
                 'You must either pass a string or a callback which '
                 'accepts (target, source, env) as parameters.')
         if len(args) > 1:
-            kw['varlist'] = args[1:] + kw['varlist']
+            kw['varlist'] = tuple(SCons.Util.flatten(args[1:])) + kw['varlist']
     if kw.get('strfunction', _null) is not _null \
                       and kw.get('cmdstr', _null) is not _null:
         raise SCons.Errors.UserError(
@@ -356,21 +354,6 @@ def _do_create_action(act, kw):
     if isinstance(act, ActionBase):
         return act
 
-    if is_List(act):
-        return CommandAction(act, **kw)
-
-    if callable(act):
-        try:
-            gen = kw['generator']
-            del kw['generator']
-        except KeyError:
-            gen = 0
-        if gen:
-            action_type = CommandGeneratorAction
-        else:
-            action_type = FunctionAction
-        return action_type(act, kw)
-
     if is_String(act):
         var=SCons.Util.get_environment_var(act)
         if var:
@@ -387,6 +370,22 @@ def _do_create_action(act, kw):
         # The list of string commands may include a LazyAction, so we
         # reprocess them via _do_create_list_action.
         return _do_create_list_action(commands, kw)
+    
+    if is_List(act):
+        return CommandAction(act, **kw)
+
+    if callable(act):
+        try:
+            gen = kw['generator']
+            del kw['generator']
+        except KeyError:
+            gen = 0
+        if gen:
+            action_type = CommandGeneratorAction
+        else:
+            action_type = FunctionAction
+        return action_type(act, kw)
+
     # Catch a common error case with a nice message:
     if isinstance(act, int) or isinstance(act, float):
         raise TypeError("Don't know how to create an Action from a number (%s)"%act)
@@ -439,7 +438,8 @@ class ActionBase(object):
         vl = self.get_varlist(target, source, env)
         if is_String(vl): vl = (vl,)
         for v in vl:
-            result.append(env.subst('${'+v+'}'))
+            # do the subst this way to ignore $(...$) parts:
+            result.append(env.subst_target_source('${'+v+'}', SCons.Subst.SUBST_SIG, target, source))
         return ''.join(result)
 
     def __add__(self, other):
@@ -540,7 +540,7 @@ class _ActionAction(ActionBase):
         if chdir:
             save_cwd = os.getcwd()
             try:
-                chdir = str(chdir.abspath)
+                chdir = str(chdir.get_abspath())
             except AttributeError:
                 if not is_String(chdir):
                     if executor:
@@ -677,12 +677,13 @@ def _subproc(scons_env, cmd, error = 'ignore', **kw):
         # return a dummy Popen instance that only returns error
         class dummyPopen(object):
             def __init__(self, e): self.exception = e
-            def communicate(self): return ('','')
+            def communicate(self,input=None): return ('','')
             def wait(self): return -self.exception.errno
             stdin = None
             class f(object):
                 def read(self): return ''
                 def readline(self): return ''
+                def __iter__(self): return iter(())
             stdout = stderr = f()
         return dummyPopen(e)
 
@@ -698,7 +699,7 @@ class CommandAction(_ActionAction):
         # factory above does).  cmd will be passed to
         # Environment.subst_list() for substituting environment
         # variables.
-        if __debug__: logInstanceCreation(self, 'Action.CommandAction')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.CommandAction')
 
         _ActionAction.__init__(self, **kw)
         if is_List(cmd):
@@ -855,7 +856,7 @@ class CommandAction(_ActionAction):
 class CommandGeneratorAction(ActionBase):
     """Class for command-generator actions."""
     def __init__(self, generator, kw):
-        if __debug__: logInstanceCreation(self, 'Action.CommandGeneratorAction')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.CommandGeneratorAction')
         self.generator = generator
         self.gen_kw = kw
         self.varlist = kw.get('varlist', ())
@@ -944,7 +945,7 @@ class CommandGeneratorAction(ActionBase):
 class LazyAction(CommandGeneratorAction, CommandAction):
 
     def __init__(self, var, kw):
-        if __debug__: logInstanceCreation(self, 'Action.LazyAction')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.LazyAction')
         #FUTURE CommandAction.__init__(self, '${'+var+'}', **kw)
         CommandAction.__init__(self, '${'+var+'}', **kw)
         self.var = SCons.Util.to_String(var)
@@ -986,7 +987,7 @@ class FunctionAction(_ActionAction):
     """Class for Python function actions."""
 
     def __init__(self, execfunction, kw):
-        if __debug__: logInstanceCreation(self, 'Action.FunctionAction')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.FunctionAction')
 
         self.execfunction = execfunction
         try:
@@ -1108,7 +1109,7 @@ class FunctionAction(_ActionAction):
 class ListAction(ActionBase):
     """Class for lists of other actions."""
     def __init__(self, actionlist):
-        if __debug__: logInstanceCreation(self, 'Action.ListAction')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.ListAction')
         def list_of_actions(x):
             if isinstance(x, ActionBase):
                 return x
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Builder.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Builder.py
similarity index 97%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Builder.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Builder.py
index 5a8aff1aacff8610facd1016718ce8066b18de0b..4c68d5c3a2ed8f207ddd17be0c13b87e0eac0092 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Builder.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Builder.py
@@ -76,7 +76,7 @@ There are the following methods for internal use within this module:
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -97,17 +97,16 @@ There are the following methods for internal use within this module:
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Builder.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Builder.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import collections
 
 import SCons.Action
+import SCons.Debug
 from SCons.Debug import logInstanceCreation
 from SCons.Errors import InternalError, UserError
 import SCons.Executor
 import SCons.Memoize
-import SCons.Node
-import SCons.Node.FS
 import SCons.Util
 import SCons.Warnings
 
@@ -225,7 +224,7 @@ class OverrideWarner(collections.UserDict):
     """
     def __init__(self, dict):
         collections.UserDict.__init__(self, dict)
-        if __debug__: logInstanceCreation(self, 'Builder.OverrideWarner')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Builder.OverrideWarner')
         self.already_warned = None
     def warn(self):
         if self.already_warned:
@@ -353,11 +352,6 @@ class BuilderBase(object):
     nodes (files) from input nodes (files).
     """
 
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
-    memoizer_counters = []
-
     def __init__(self,  action = None,
                         prefix = '',
                         suffix = '',
@@ -376,7 +370,7 @@ class BuilderBase(object):
                         src_builder = None,
                         ensure_suffix = False,
                         **overrides):
-        if __debug__: logInstanceCreation(self, 'Builder.BuilderBase')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Builder.BuilderBase')
         self._memo = {}
         self.action = action
         self.multi = multi
@@ -759,8 +753,7 @@ class BuilderBase(object):
     def _get_src_builders_key(self, env):
         return id(env)
 
-    memoizer_counters.append(SCons.Memoize.CountDict('get_src_builders', _get_src_builders_key))
-
+    @SCons.Memoize.CountDictCall(_get_src_builders_key)
     def get_src_builders(self, env):
         """
         Returns the list of source Builders for this Builder.
@@ -796,8 +789,7 @@ class BuilderBase(object):
     def _subst_src_suffixes_key(self, env):
         return id(env)
 
-    memoizer_counters.append(SCons.Memoize.CountDict('subst_src_suffixes', _subst_src_suffixes_key))
-
+    @SCons.Memoize.CountDictCall(_subst_src_suffixes_key)
     def subst_src_suffixes(self, env):
         """
         The suffix list may contain construction variable expansions,
@@ -847,7 +839,7 @@ class CompositeBuilder(SCons.Util.Proxy):
     """
 
     def __init__(self, builder, cmdgen):
-        if __debug__: logInstanceCreation(self, 'Builder.CompositeBuilder')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Builder.CompositeBuilder')
         SCons.Util.Proxy.__init__(self, builder)
 
         # cmdgen should always be an instance of DictCmdGenerator.
@@ -861,7 +853,7 @@ class CompositeBuilder(SCons.Util.Proxy):
         self.set_src_suffix(self.cmdgen.src_suffixes())
 
 def is_a_Builder(obj):
-    """"Returns True iff the specified obj is one of our Builder classes.
+    """"Returns True if the specified obj is one of our Builder classes.
 
     The test is complicated a bit by the fact that CompositeBuilder
     is a proxy, not a subclass of BuilderBase.
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/CacheDir.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/CacheDir.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/CacheDir.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/CacheDir.py
index ec7e9eebfc7a40977948674421faa6c308847d1f..9e3ec6b229e7143a9d4c004cd8ad52b65ddf271d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/CacheDir.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/CacheDir.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/CacheDir.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/CacheDir.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """
 CacheDir support
@@ -37,6 +37,7 @@ cache_enabled = True
 cache_debug = False
 cache_force = False
 cache_show = False
+cache_readonly = False
 
 def CacheRetrieveFunc(target, source, env):
     t = target[0]
@@ -49,11 +50,11 @@ def CacheRetrieveFunc(target, source, env):
     cd.CacheDebug('CacheRetrieve(%s):  retrieving from %s\n', t, cachefile)
     if SCons.Action.execute_actions:
         if fs.islink(cachefile):
-            fs.symlink(fs.readlink(cachefile), t.path)
+            fs.symlink(fs.readlink(cachefile), t.get_internal_path())
         else:
-            env.copy_from_cache(cachefile, t.path)
+            env.copy_from_cache(cachefile, t.get_internal_path())
         st = fs.stat(cachefile)
-        fs.chmod(t.path, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
+        fs.chmod(t.get_internal_path(), stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
     return 0
 
 def CacheRetrieveString(target, source, env):
@@ -62,7 +63,7 @@ def CacheRetrieveString(target, source, env):
     cd = env.get_CacheDir()
     cachedir, cachefile = cd.cachepath(t)
     if t.fs.exists(cachefile):
-        return "Retrieved `%s' from cache" % t.path
+        return "Retrieved `%s' from cache" % t.get_internal_path()
     return None
 
 CacheRetrieve = SCons.Action.Action(CacheRetrieveFunc, CacheRetrieveString)
@@ -70,6 +71,8 @@ CacheRetrieve = SCons.Action.Action(CacheRetrieveFunc, CacheRetrieveString)
 CacheRetrieveSilent = SCons.Action.Action(CacheRetrieveFunc, None)
 
 def CachePushFunc(target, source, env):
+    if cache_readonly: return
+
     t = target[0]
     if t.nocache:
         return
@@ -103,12 +106,12 @@ def CachePushFunc(target, source, env):
                 raise SCons.Errors.EnvironmentError(msg)
 
     try:
-        if fs.islink(t.path):
-            fs.symlink(fs.readlink(t.path), tempfile)
+        if fs.islink(t.get_internal_path()):
+            fs.symlink(fs.readlink(t.get_internal_path()), tempfile)
         else:
-            fs.copy2(t.path, tempfile)
+            fs.copy2(t.get_internal_path(), tempfile)
         fs.rename(tempfile, cachefile)
-        st = fs.stat(t.path)
+        st = fs.stat(t.get_internal_path())
         fs.chmod(cachefile, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
     except EnvironmentError:
         # It's possible someone else tried writing the file at the
@@ -150,6 +153,9 @@ class CacheDir(object):
     def is_enabled(self):
         return (cache_enabled and not self.path is None)
 
+    def is_readonly(self):
+        return cache_readonly
+
     def cachepath(self, node):
         """
         """
@@ -201,7 +207,7 @@ class CacheDir(object):
         return False
 
     def push(self, node):
-        if not self.is_enabled():
+        if self.is_readonly() or not self.is_enabled():
             return
         return CachePush(node, [], node.get_build_env())
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Conftest.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Conftest.py
similarity index 99%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Conftest.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Conftest.py
index d4662780c609ed63596dff33d7e1aedefb20df28..e9702ff000dd72fba79b651fb168e5687080e7cc 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Conftest.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Conftest.py
@@ -156,7 +156,7 @@ def CheckCC(context):
     too, so that it can test against non working flags.
 
     """
-    context.Display("Checking whether the C compiler works")
+    context.Display("Checking whether the C compiler works... ")
     text = """
 int main()
 {
@@ -176,7 +176,7 @@ def CheckSHCC(context):
     too, so that it can test against non working flags.
 
     """
-    context.Display("Checking whether the (shared) C compiler works")
+    context.Display("Checking whether the (shared) C compiler works... ")
     text = """
 int foo()
 {
@@ -196,7 +196,7 @@ def CheckCXX(context):
     too, so that it can test against non working flags.
 
     """
-    context.Display("Checking whether the C++ compiler works")
+    context.Display("Checking whether the C++ compiler works... ")
     text = """
 int main()
 {
@@ -216,7 +216,7 @@ def CheckSHCXX(context):
     too, so that it can test against non working flags.
 
     """
-    context.Display("Checking whether the (shared) C++ compiler works")
+    context.Display("Checking whether the (shared) C++ compiler works... ")
     text = """
 int main()
 {
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Debug.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Debug.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Debug.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Debug.py
index 5f1b87c13290625258841093a99538202c521cda..0aa077d1ab1cbd20787cec5a881f66fc0c1070ca 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Debug.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Debug.py
@@ -6,7 +6,7 @@ needed by most users.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -28,13 +28,18 @@ needed by most users.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Debug.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Debug.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import sys
 import time
 import weakref
+import inspect
 
+# Global variable that gets set to 'True' by the Main script,
+# when the creation of class instances should get tracked.
+track_instances = False
+# List of currently tracked classes
 tracked_classes = {}
 
 def logInstanceCreation(instance, name=None):
@@ -42,7 +47,12 @@ def logInstanceCreation(instance, name=None):
         name = instance.__class__.__name__
     if name not in tracked_classes:
         tracked_classes[name] = []
-    tracked_classes[name].append(weakref.ref(instance))
+    if hasattr(instance, '__dict__'):
+        tracked_classes[name].append(weakref.ref(instance))
+    else:
+        # weakref doesn't seem to work when the instance
+        # contains only slots...
+        tracked_classes[name].append(instance)
 
 def string_to_classes(s):
     if s == '*':
@@ -62,7 +72,10 @@ def listLoggedInstances(classes, file=sys.stdout):
     for classname in string_to_classes(classes):
         file.write('\n%s:\n' % classname)
         for ref in tracked_classes[classname]:
-            obj = ref()
+            if inspect.isclass(ref):
+                obj = ref()
+            else:
+                obj = ref
             if obj is not None:
                 file.write('    %s\n' % repr(obj))
 
@@ -109,14 +122,15 @@ else:
             return res[4]
 
 # returns caller's stack
-def caller_stack(*backlist):
+def caller_stack():
     import traceback
-    if not backlist:
-        backlist = [0]
+    tb = traceback.extract_stack()
+    # strip itself and the caller from the output
+    tb = tb[:-2]
     result = []
-    for back in backlist:
-        tb = traceback.extract_stack(limit=3+back)
-        key = tb[0][:3]
+    for back in tb:
+        # (filename, line number, function name, text)
+        key = back[:3]
         result.append('%s:%d(%s)' % func_shorten(key))
     return result
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Defaults.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Defaults.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Defaults.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Defaults.py
index 96760cedc7e543c65a6c8e176b0caebad7a52c90..b4cbb9a094401acbfab0b8b7b399e69b48c38369 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Defaults.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Defaults.py
@@ -10,7 +10,7 @@ from distutils.msvccompiler.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ from distutils.msvccompiler.
 #
 from __future__ import division
 
-__revision__ = "src/engine/SCons/Defaults.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Defaults.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 
 import os
@@ -144,6 +144,9 @@ ShCAction = SCons.Action.Action("$SHCCCOM", "$SHCCCOMSTR")
 CXXAction = SCons.Action.Action("$CXXCOM", "$CXXCOMSTR")
 ShCXXAction = SCons.Action.Action("$SHCXXCOM", "$SHCXXCOMSTR")
 
+DAction = SCons.Action.Action("$DCOM", "$DCOMSTR")
+ShDAction = SCons.Action.Action("$SHDCOM", "$SHDCOMSTR")
+
 ASAction = SCons.Action.Action("$ASCOM", "$ASCOMSTR")
 ASPPAction = SCons.Action.Action("$ASPPCOM", "$ASPPCOMSTR")
 
@@ -178,20 +181,36 @@ def chmod_strfunc(dest, mode):
 
 Chmod = ActionFactory(chmod_func, chmod_strfunc)
 
-def copy_func(dest, src):
+def copy_func(dest, src, symlinks=True):
+    """
+    If symlinks (is true), then a symbolic link will be
+    shallow copied and recreated as a symbolic link; otherwise, copying
+    a symbolic link will be equivalent to copying the symbolic link's
+    final target regardless of symbolic link depth.
+    """
+
+    dest = str(dest)
+    src = str(src)
+
     SCons.Node.FS.invalidate_node_memos(dest)
     if SCons.Util.is_List(src) and os.path.isdir(dest):
         for file in src:
             shutil.copy2(file, dest)
         return 0
+    elif os.path.islink(src):
+        if symlinks:
+            return os.symlink(os.readlink(src), dest)
+        else:
+            return copy_func(dest, os.path.realpath(src))
     elif os.path.isfile(src):
         return shutil.copy2(src, dest)
     else:
-        return shutil.copytree(src, dest, 1)
+        return shutil.copytree(src, dest, symlinks)
 
-Copy = ActionFactory(copy_func,
-                     lambda dest, src: 'Copy("%s", "%s")' % (dest, src),
-                     convert=str)
+Copy = ActionFactory(
+    copy_func,
+    lambda dest, src, symlinks=True: 'Copy("%s", "%s")' % (dest, src)
+)
 
 def delete_func(dest, must_exist=0):
     SCons.Node.FS.invalidate_node_memos(dest)
@@ -321,7 +340,7 @@ def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
     where it finds them.  This is used by tools (like the GNU linker)
     that need to turn something like 'libfoo.a' into '-lfoo'.
     """
-    
+
     if not itms:
         return itms
 
@@ -335,7 +354,7 @@ def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
             c = env_c
         else:
             c = _concat_ixes
-    
+
     stripprefixes = list(map(env.subst, SCons.Util.flatten(stripprefixes)))
     stripsuffixes = list(map(env.subst, SCons.Util.flatten(stripsuffixes)))
 
@@ -413,7 +432,7 @@ def _defines(prefix, defs, suffix, env, c=_concat_ixes):
     """
 
     return c(prefix, env.subst_path(processDefines(defs)), suffix, env)
-    
+
 class NullCmdGenerator(object):
     """This is a callable class that can be used in place of other
     command generators if you don't want them to do anything.
@@ -449,7 +468,7 @@ class Variable_Method_Caller(object):
         self.method = method
     def __call__(self, *args, **kw):
         try: 1//0
-        except ZeroDivisionError: 
+        except ZeroDivisionError:
             # Don't start iterating with the current stack-frame to
             # prevent creating reference cycles (f_back is safe).
             frame = sys.exc_info()[2].tb_frame.f_back
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Environment.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Environment.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Environment.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Environment.py
index addf782a338a58560079552bd49ec5e653014a38..865c821640e90d7592db033a97d21f779660973b 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Environment.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Environment.py
@@ -10,7 +10,7 @@ Environment
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ Environment
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Environment.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Environment.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 
 import copy
@@ -43,6 +43,7 @@ from collections import UserDict
 
 import SCons.Action
 import SCons.Builder
+import SCons.Debug
 from SCons.Debug import logInstanceCreation
 import SCons.Defaults
 import SCons.Errors
@@ -364,13 +365,10 @@ class SubstitutionEnvironment(object):
     class actually becomes useful.)
     """
 
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
     def __init__(self, **kw):
         """Initialization of an underlying SubstitutionEnvironment class.
         """
-        if __debug__: logInstanceCreation(self, 'Environment.SubstitutionEnvironment')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Environment.SubstitutionEnvironment')
         self.fs = SCons.Node.FS.get_default_fs()
         self.ans = SCons.Node.Alias.default_ans
         self.lookup_list = SCons.Node.arg2nodes_lookups
@@ -704,7 +702,7 @@ class SubstitutionEnvironment(object):
             #  -symbolic       (linker global binding)
             #  -R dir          (deprecated linker rpath)
             # IBM compilers may also accept -qframeworkdir=foo
-    
+
             params = shlex.split(arg)
             append_next_arg_to = None   # for multi-word args
             for arg in params:
@@ -718,6 +716,9 @@ class SubstitutionEnvironment(object):
                        t = ('-isysroot', arg)
                        dict['CCFLAGS'].append(t)
                        dict['LINKFLAGS'].append(t)
+                   elif append_next_arg_to == '-isystem':
+                       t = ('-isystem', arg)
+                       dict['CCFLAGS'].append(t)
                    elif append_next_arg_to == '-arch':
                        t = ('-arch', arg)
                        dict['CCFLAGS'].append(t)
@@ -790,11 +791,11 @@ class SubstitutionEnvironment(object):
                 elif arg[0] == '+':
                     dict['CCFLAGS'].append(arg)
                     dict['LINKFLAGS'].append(arg)
-                elif arg in ['-include', '-isysroot', '-arch']:
+                elif arg in ['-include', '-isysroot', '-isystem', '-arch']:
                     append_next_arg_to = arg
                 else:
                     dict['CCFLAGS'].append(arg)
-    
+
         for arg in flags:
             do_parse(arg)
         return dict
@@ -858,7 +859,7 @@ class SubstitutionEnvironment(object):
 
 #     def MergeShellPaths(self, args, prepend=1):
 #         """
-#         Merge the dict in args into the shell environment in env['ENV'].  
+#         Merge the dict in args into the shell environment in env['ENV'].
 #         Shell path elements are appended or prepended according to prepend.
 
 #         Uses Pre/AppendENVPath, so it always appends or prepends uniquely.
@@ -898,8 +899,6 @@ class Base(SubstitutionEnvironment):
     Environment.
     """
 
-    memoizer_counters = []
-
     #######################################################################
     # This is THE class for interacting with the SCons build engine,
     # and it contains a lot of stuff, so we're going to try to keep this
@@ -931,7 +930,7 @@ class Base(SubstitutionEnvironment):
         initialize things in a very specific order that doesn't work
         with the much simpler base class initialization.
         """
-        if __debug__: logInstanceCreation(self, 'Environment.Base')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Environment.Base')
         self._memo = {}
         self.fs = SCons.Node.FS.get_default_fs()
         self.ans = SCons.Node.Alias.default_ans
@@ -961,14 +960,14 @@ class Base(SubstitutionEnvironment):
             platform = SCons.Platform.Platform(platform)
         self._dict['PLATFORM'] = str(platform)
         platform(self)
-        
+
         self._dict['HOST_OS']      = self._dict.get('HOST_OS',None)
         self._dict['HOST_ARCH']    = self._dict.get('HOST_ARCH',None)
-        
+
         # Now set defaults for TARGET_{OS|ARCH}
-        self._dict['TARGET_OS']      = self._dict.get('HOST_OS',None)
-        self._dict['TARGET_ARCH']    = self._dict.get('HOST_ARCH',None)
-        
+        self._dict['TARGET_OS']      = self._dict.get('TARGET_OS',None)
+        self._dict['TARGET_ARCH']    = self._dict.get('TARGET_ARCH',None)
+
 
         # Apply the passed-in and customizable variables to the
         # environment before calling the tools, because they may use
@@ -1067,8 +1066,7 @@ class Base(SubstitutionEnvironment):
             factory = getattr(self.fs, name)
         return factory
 
-    memoizer_counters.append(SCons.Memoize.CountValue('_gsm'))
-
+    @SCons.Memoize.CountMethodCall
     def _gsm(self):
         try:
             return self._memo['_gsm']
@@ -1157,7 +1155,7 @@ class Base(SubstitutionEnvironment):
             # "continue" statements whenever we finish processing an item,
             # but Python 1.5.2 apparently doesn't let you use "continue"
             # within try:-except: blocks, so we have to nest our code.
-            try:                
+            try:
                 if key == 'CPPDEFINES' and SCons.Util.is_String(self._dict[key]):
                     self._dict[key] = [self._dict[key]]
                 orig = self._dict[key]
@@ -1205,10 +1203,16 @@ class Base(SubstitutionEnvironment):
                     # based on what we think the value looks like.
                     if SCons.Util.is_List(val):
                         if key == 'CPPDEFINES':
-                            orig = orig.items()
+                            tmp = []
+                            for (k, v) in orig.iteritems():
+                                if v is not None:
+                                    tmp.append((k, v))
+                                else:
+                                    tmp.append((k,))
+                            orig = tmp
                             orig += val
                             self._dict[key] = orig
-                        else:    
+                        else:
                             for v in val:
                                 orig[v] = None
                     else:
@@ -1231,7 +1235,7 @@ class Base(SubstitutionEnvironment):
             path = str(self.fs.Dir(path))
         return path
 
-    def AppendENVPath(self, name, newpath, envname = 'ENV', 
+    def AppendENVPath(self, name, newpath, envname = 'ENV',
                       sep = os.pathsep, delete_existing=1):
         """Append path elements to the path 'name' in the 'ENV'
         dictionary for this environment.  Will only add any particular
@@ -1285,11 +1289,18 @@ class Base(SubstitutionEnvironment):
                         else:
                             tmp.append((i,))
                     val = tmp
+                    # Construct a list of (key, value) tuples.
                     if SCons.Util.is_Dict(dk):
-                        dk = dk.items()
+                        tmp = []
+                        for (k, v) in dk.iteritems():
+                            if v is not None:
+                                tmp.append((k, v))
+                            else:
+                                tmp.append((k,))
+                        dk = tmp
                     elif SCons.Util.is_String(dk):
                         dk = [(dk,)]
-                    else:                    
+                    else:
                         tmp = []
                         for i in dk:
                             if SCons.Util.is_List(i):
@@ -1326,15 +1337,22 @@ class Base(SubstitutionEnvironment):
                             else:
                                 tmp.append((i,))
                         dk = tmp
+                        # Construct a list of (key, value) tuples.
                         if SCons.Util.is_Dict(val):
-                            val = val.items()
+                            tmp = []
+                            for (k, v) in val.iteritems():
+                                if v is not None:
+                                    tmp.append((k, v))
+                                else:
+                                    tmp.append((k,))
+                            val = tmp
                         elif SCons.Util.is_String(val):
                             val = [(val,)]
                         if delete_existing:
                             dk = filter(lambda x, val=val: x not in val, dk)
                             self._dict[key] = dk + val
                         else:
-                            dk = [x for x in dk if x not in val]                
+                            dk = [x for x in dk if x not in val]
                             self._dict[key] = dk + val
                     else:
                         # By elimination, val is not a list.  Since dk is a
@@ -1350,7 +1368,13 @@ class Base(SubstitutionEnvironment):
                         if SCons.Util.is_String(dk):
                             dk = [dk]
                         elif SCons.Util.is_Dict(dk):
-                            dk = dk.items()
+                            tmp = []
+                            for (k, v) in dk.iteritems():
+                                if v is not None:
+                                    tmp.append((k, v))
+                                else:
+                                    tmp.append((k,))
+                            dk = tmp
                         if SCons.Util.is_String(val):
                             if val in dk:
                                 val = []
@@ -1377,11 +1401,9 @@ class Base(SubstitutionEnvironment):
         (like a function).  There are no references to any mutable
         objects in the original Environment.
         """
-        try:
-            builders = self._dict['BUILDERS']
-        except KeyError:
-            pass
-            
+
+        builders = self._dict.get('BUILDERS', {})
+
         clone = copy.copy(self)
         # BUILDERS is not safe to do a simple copy
         clone._dict = semi_deepcopy_dict(self._dict, ['BUILDERS'])
@@ -1409,12 +1431,12 @@ class Base(SubstitutionEnvironment):
         apply_tools(clone, tools, toolpath)
 
         # apply them again in case the tools overwrote them
-        clone.Replace(**new)        
+        clone.Replace(**new)
 
         # Finally, apply any flags to be merged in
         if parse_flags: clone.MergeFlags(parse_flags)
 
-        if __debug__: logInstanceCreation(self, 'Environment.EnvironmentClone')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Environment.EnvironmentClone')
         return clone
 
     def Copy(self, *args, **kw):
@@ -1500,8 +1522,8 @@ class Base(SubstitutionEnvironment):
 
     def Dump(self, key = None):
         """
-        Using the standard Python pretty printer, dump the contents of the
-        scons build environment to stdout.
+        Using the standard Python pretty printer, return the contents of the
+        scons build environment as a string.
 
         If the key passed in is anything other than None, then that will
         be used as an index into the build environment dictionary and
@@ -1774,7 +1796,7 @@ class Base(SubstitutionEnvironment):
         self.Replace(**kw)
 
     def _find_toolpath_dir(self, tp):
-        return self.fs.Dir(self.subst(tp)).srcnode().abspath
+        return self.fs.Dir(self.subst(tp)).srcnode().get_abspath()
 
     def Tool(self, tool, toolpath=None, **kw):
         if SCons.Util.is_String(tool):
@@ -1802,8 +1824,8 @@ class Base(SubstitutionEnvironment):
                 pass
         elif SCons.Util.is_String(pathext):
             pathext = self.subst(pathext)
-        prog = self.subst(prog)
-        path = SCons.Util.WhereIs(prog, path, pathext, reject)
+        prog = SCons.Util.CLVar(self.subst(prog)) # support "program --with-args"
+        path = SCons.Util.WhereIs(prog[0], path, pathext, reject)
         if path: return path
         return None
 
@@ -2052,8 +2074,8 @@ class Base(SubstitutionEnvironment):
         else:
             return result[0]
 
-    def Glob(self, pattern, ondisk=True, source=False, strings=False):
-        return self.fs.Glob(self.subst(pattern), ondisk, source, strings)
+    def Glob(self, pattern, ondisk=True, source=False, strings=False, exclude=None):
+        return self.fs.Glob(self.subst(pattern), ondisk, source, strings, exclude)
 
     def Ignore(self, target, dependency):
         """Ignore a dependency."""
@@ -2086,6 +2108,14 @@ class Base(SubstitutionEnvironment):
             t.set_precious()
         return tlist
 
+    def Pseudo(self, *targets):
+        tlist = []
+        for t in targets:
+            tlist.extend(self.arg2nodes(t, self.fs.Entry))
+        for t in tlist:
+            t.set_pseudo()
+        return tlist
+
     def Repository(self, *dirs, **kw):
         dirs = self.arg2nodes(list(dirs), self.fs.Dir)
         self.fs.Repository(*dirs, **kw)
@@ -2140,7 +2170,7 @@ class Base(SubstitutionEnvironment):
     def SourceCode(self, entry, builder):
         """Arrange for a source code builder for (part of) a tree."""
         msg = """SourceCode() has been deprecated and there is no replacement.
-\tIf you need this function, please contact dev@scons.tigris.org."""
+\tIf you need this function, please contact scons-dev@scons.org"""
         SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceCodeWarning, msg)
         entries = self.arg2nodes(entry, self.fs.Entry)
         for entry in entries:
@@ -2247,6 +2277,7 @@ class Base(SubstitutionEnvironment):
             install._UNIQUE_INSTALLED_FILES = SCons.Util.uniquer_hashables(install._INSTALLED_FILES)
         return install._UNIQUE_INSTALLED_FILES
 
+
 class OverrideEnvironment(Base):
     """A proxy that overrides variables in a wrapped construction
     environment by returning values from an overrides dictionary in
@@ -2269,7 +2300,7 @@ class OverrideEnvironment(Base):
     """
 
     def __init__(self, subject, overrides={}):
-        if __debug__: logInstanceCreation(self, 'Environment.OverrideEnvironment')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Environment.OverrideEnvironment')
         self.__dict__['__subject'] = subject
         self.__dict__['overrides'] = overrides
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Errors.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Errors.py
similarity index 97%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Errors.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Errors.py
index 8541c68ab4c967118772e24231142015d364dd8b..998a70d9f9e9bcd869c69d30a3056a67e0d85c08 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Errors.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Errors.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ and user errors in SCons.
 
 """
 
-__revision__ = "src/engine/SCons/Errors.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Errors.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Executor.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Executor.py
similarity index 84%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Executor.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Executor.py
index 9ea6e631d47425ecc5d7684b7f95222065ace4ee..3211fd11d2c1e2fe37baabad21f447106446b251 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Executor.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Executor.py
@@ -6,7 +6,7 @@ Nodes.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,10 +27,11 @@ Nodes.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Executor.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Executor.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import collections
 
+import SCons.Debug
 from SCons.Debug import logInstanceCreation
 import SCons.Errors
 import SCons.Memoize
@@ -39,6 +40,10 @@ import SCons.Memoize
 class Batch(object):
     """Remembers exact association between targets
     and sources of executor."""
+    
+    __slots__ = ('targets',
+                 'sources')
+    
     def __init__(self, targets=[], sources=[]):
         self.targets = targets
         self.sources = sources
@@ -108,6 +113,48 @@ def rfile(node):
         return rfile()
 
 
+def execute_nothing(obj, target, kw):
+    return 0
+
+def execute_action_list(obj, target, kw):
+    """Actually execute the action list."""
+    env = obj.get_build_env()
+    kw = obj.get_kw(kw)
+    status = 0
+    for act in obj.get_action_list():
+        #args = (self.get_all_targets(), self.get_all_sources(), env)
+        args = ([], [], env)
+        status = act(*args, **kw)
+        if isinstance(status, SCons.Errors.BuildError):
+            status.executor = obj
+            raise status
+        elif status:
+            msg = "Error %s" % status
+            raise SCons.Errors.BuildError(
+                errstr=msg, 
+                node=obj.batches[0].targets,
+                executor=obj, 
+                action=act)
+    return status
+
+_do_execute_map = {0 : execute_nothing,
+                   1 : execute_action_list}
+
+
+def execute_actions_str(obj):
+    env = obj.get_build_env()
+    return "\n".join([action.genstring(obj.get_all_targets(),
+                                       obj.get_all_sources(),
+                                       env)
+                      for action in obj.get_action_list()])
+
+def execute_null_str(obj):
+    return ''
+
+_execute_str_map = {0 : execute_null_str,
+                    1 : execute_actions_str}
+
+
 class Executor(object):
     """A class for controlling instances of executing an action.
 
@@ -116,14 +163,25 @@ class Executor(object):
     and sources for later processing as needed.
     """
 
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
-    memoizer_counters = []
+    __slots__ = ('pre_actions',
+                 'post_actions',
+                 'env',
+                 'overridelist',
+                 'batches',
+                 'builder_kw',
+                 '_memo',
+                 'lvars',
+                 '_changed_sources_list',
+                 '_changed_targets_list',
+                 '_unchanged_sources_list',
+                 '_unchanged_targets_list',
+                 'action_list',
+                 '_do_execute',
+                 '_execute_str')
 
     def __init__(self, action, env=None, overridelist=[{}],
                  targets=[], sources=[], builder_kw={}):
-        if __debug__: logInstanceCreation(self, 'Executor.Executor')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Executor.Executor')
         self.set_action_list(action)
         self.pre_actions = []
         self.post_actions = []
@@ -134,6 +192,8 @@ class Executor(object):
         else:
             self.batches = []
         self.builder_kw = builder_kw
+        self._do_execute = 1
+        self._execute_str = 1
         self._memo = {}
 
     def get_lvars(self):
@@ -229,6 +289,8 @@ class Executor(object):
         self.action_list = action
 
     def get_action_list(self):
+        if self.action_list is None:
+            return []
         return self.pre_actions + self.action_list + self.post_actions
 
     def get_all_targets(self):
@@ -267,7 +329,8 @@ class Executor(object):
         """
         result = SCons.Util.UniqueList([])
         for target in self.get_all_targets():
-            result.extend(target.prerequisites)
+            if target.prerequisites is not None:
+                result.extend(target.prerequisites)
         return result
 
     def get_action_side_effects(self):
@@ -280,8 +343,7 @@ class Executor(object):
             result.extend(target.side_effects)
         return result
 
-    memoizer_counters.append(SCons.Memoize.CountValue('get_build_env'))
-
+    @SCons.Memoize.CountMethodCall
     def get_build_env(self):
         """Fetch or create the appropriate build Environment
         for this Executor.
@@ -326,36 +388,12 @@ class Executor(object):
         result['executor'] = self
         return result
 
-    def do_nothing(self, target, kw):
-        return 0
-
-    def do_execute(self, target, kw):
-        """Actually execute the action list."""
-        env = self.get_build_env()
-        kw = self.get_kw(kw)
-        status = 0
-        for act in self.get_action_list():
-            #args = (self.get_all_targets(), self.get_all_sources(), env)
-            args = ([], [], env)
-            status = act(*args, **kw)
-            if isinstance(status, SCons.Errors.BuildError):
-                status.executor = self
-                raise status
-            elif status:
-                msg = "Error %s" % status
-                raise SCons.Errors.BuildError(
-                    errstr=msg, 
-                    node=self.batches[0].targets,
-                    executor=self, 
-                    action=act)
-        return status
-
     # use extra indirection because with new-style objects (Python 2.2
     # and above) we can't override special methods, and nullify() needs
     # to be able to do this.
 
     def __call__(self, target, **kw):
-        return self.do_execute(target, kw)
+        return _do_execute_map[self._do_execute](self, target, kw)
 
     def cleanup(self):
         self._memo = {}
@@ -399,24 +437,15 @@ class Executor(object):
 
     # another extra indirection for new-style objects and nullify...
 
-    def my_str(self):
-        env = self.get_build_env()
-        return "\n".join([action.genstring(self.get_all_targets(),
-                                           self.get_all_sources(),
-                                           env)
-                          for action in self.get_action_list()])
-
-
     def __str__(self):
-        return self.my_str()
+        return _execute_str_map[self._execute_str](self)
 
     def nullify(self):
         self.cleanup()
-        self.do_execute = self.do_nothing
-        self.my_str     = lambda: ''
-
-    memoizer_counters.append(SCons.Memoize.CountValue('get_contents'))
+        self._do_execute = 0
+        self._execute_str = 0
 
+    @SCons.Memoize.CountMethodCall
     def get_contents(self):
         """Fetch the signature contents.  This is the main reason this
         class exists, so we can compute this once and cache it regardless
@@ -489,8 +518,7 @@ class Executor(object):
     def _get_unignored_sources_key(self, node, ignore=()):
         return (node,) + tuple(ignore)
 
-    memoizer_counters.append(SCons.Memoize.CountDict('get_unignored_sources', _get_unignored_sources_key))
-
+    @SCons.Memoize.CountDictCall(_get_unignored_sources_key)
     def get_unignored_sources(self, node, ignore=()):
         key = (node,) + tuple(ignore)
         try:
@@ -550,19 +578,20 @@ def AddBatchExecutor(key, executor):
 nullenv = None
 
 
+import SCons.Util
+class NullEnvironment(SCons.Util.Null):
+    import SCons.CacheDir
+    _CacheDir_path = None
+    _CacheDir = SCons.CacheDir.CacheDir(None)
+    def get_CacheDir(self):
+        return self._CacheDir
+
+
 def get_NullEnvironment():
     """Use singleton pattern for Null Environments."""
     global nullenv
 
-    import SCons.Util
-    class NullEnvironment(SCons.Util.Null):
-        import SCons.CacheDir
-        _CacheDir_path = None
-        _CacheDir = SCons.CacheDir.CacheDir(None)
-        def get_CacheDir(self):
-            return self._CacheDir
-
-    if not nullenv:
+    if nullenv is None:
         nullenv = NullEnvironment()
     return nullenv
 
@@ -570,12 +599,29 @@ class Null(object):
     """A null Executor, with a null build Environment, that does
     nothing when the rest of the methods call it.
 
-    This might be able to disapper when we refactor things to
+    This might be able to disappear when we refactor things to
     disassociate Builders from Nodes entirely, so we're not
     going to worry about unit tests for this--at least for now.
     """
+    
+    __slots__ = ('pre_actions',
+                 'post_actions',
+                 'env',
+                 'overridelist',
+                 'batches',
+                 'builder_kw',
+                 '_memo',
+                 'lvars',
+                 '_changed_sources_list',
+                 '_changed_targets_list',
+                 '_unchanged_sources_list',
+                 '_unchanged_targets_list',
+                 'action_list',
+                 '_do_execute',
+                 '_execute_str')
+    
     def __init__(self, *args, **kw):
-        if __debug__: logInstanceCreation(self, 'Executor.Null')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Executor.Null')
         self.batches = [Batch(kw['targets'][:], [])]
     def get_build_env(self):
         return get_NullEnvironment()
@@ -625,7 +671,6 @@ class Null(object):
         self._morph()
         self.set_action_list(action)
 
-
 # Local Variables:
 # tab-width:4
 # indent-tabs-mode:nil
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Job.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Job.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Job.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Job.py
index 342f55e98b375f6f85976fcb9ce5dcdde83b17a8..60aa0ae1385bb2f3d44c2dbeffe6277ceb73cbbf 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Job.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Job.py
@@ -7,7 +7,7 @@ stop, and wait on jobs.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ stop, and wait on jobs.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Job.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Job.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.compat
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Memoize.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Memoize.py
similarity index 60%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Memoize.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Memoize.py
index 9850a841f4649eac43cbd93d9c4e9eee1860b47c..77a8e161e2ea0fb71933f64f176d93e7674e9979 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Memoize.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Memoize.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,21 +21,21 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Memoize.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Memoize.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Memoizer
 
-A metaclass implementation to count hits and misses of the computed
+A decorator-based implementation to count hits and misses of the computed
 values that various methods cache in memory.
 
 Use of this modules assumes that wrapped methods be coded to cache their
-values in a consistent way.  Here is an example of wrapping a method
-that returns a computed value, with no input parameters:
+values in a consistent way. In particular, it requires that the class uses a
+dictionary named "_memo" to store the cached values.
 
-    memoizer_counters = []                                      # Memoization
-
-    memoizer_counters.append(SCons.Memoize.CountValue('foo'))   # Memoization
+Here is an example of wrapping a method that returns a computed value,
+with no input parameters:
 
+    @SCons.Memoize.CountMethodCall
     def foo(self):
 
         try:                                                    # Memoization
@@ -55,8 +55,7 @@ based on one or more input arguments:
     def _bar_key(self, argument):                               # Memoization
         return argument                                         # Memoization
 
-    memoizer_counters.append(SCons.Memoize.CountDict('bar', _bar_key)) # Memoization
-
+    @SCons.Memoize.CountDictCall(_bar_key)
     def bar(self, argument):
 
         memo_key = argument                                     # Memoization
@@ -77,10 +76,6 @@ based on one or more input arguments:
 
         return result
 
-At one point we avoided replicating this sort of logic in all the methods
-by putting it right into this module, but we've moved away from that at
-present (see the "Historical Note," below.).
-
 Deciding what to cache is tricky, because different configurations
 can have radically different performance tradeoffs, and because the
 tradeoffs involved are often so non-obvious.  Consequently, deciding
@@ -102,51 +97,37 @@ cache return values from a method that's being called a lot:
         input arguments, you don't need to use all of the arguments
         if some of them don't affect the return values.
 
-Historical Note:  The initial Memoizer implementation actually handled
-the caching of values for the wrapped methods, based on a set of generic
-algorithms for computing hashable values based on the method's arguments.
-This collected caching logic nicely, but had two drawbacks:
-
-    Running arguments through a generic key-conversion mechanism is slower
-    (and less flexible) than just coding these things directly.  Since the
-    methods that need memoized values are generally performance-critical,
-    slowing them down in order to collect the logic isn't the right
-    tradeoff.
-
-    Use of the memoizer really obscured what was being called, because
-    all the memoized methods were wrapped with re-used generic methods.
-    This made it more difficult, for example, to use the Python profiler
-    to figure out how to optimize the underlying methods.
 """
 
-import types
-
 # A flag controlling whether or not we actually use memoization.
 use_memoizer = None
 
-CounterList = []
+# Global list of counter objects
+CounterList = {}
 
 class Counter(object):
     """
     Base class for counting memoization hits and misses.
 
-    We expect that the metaclass initialization will have filled in
-    the .name attribute that represents the name of the function
-    being counted.
+    We expect that the initialization in a matching decorator will
+    fill in the correct class name and method name that represents
+    the name of the function being counted.
     """
-    def __init__(self, method_name):
+    def __init__(self, cls_name, method_name):
         """
         """
+        self.cls_name = cls_name
         self.method_name = method_name
         self.hit = 0
         self.miss = 0
-        CounterList.append(self)
+    def key(self):
+        return self.cls_name+'.'+self.method_name
     def display(self):
         fmt = "    %7d hits %7d misses    %s()"
-        print fmt % (self.hit, self.miss, self.name)
+        print fmt % (self.hit, self.miss, self.key())
     def __cmp__(self, other):
         try:
-            return cmp(self.name, other.name)
+            return cmp(self.key(), other.key())
         except AttributeError:
             return 0
 
@@ -154,45 +135,39 @@ class CountValue(Counter):
     """
     A counter class for simple, atomic memoized values.
 
-    A CountValue object should be instantiated in a class for each of
+    A CountValue object should be instantiated in a decorator for each of
     the class's methods that memoizes its return value by simply storing
     the return value in its _memo dictionary.
-
-    We expect that the metaclass initialization will fill in the
-    .underlying_method attribute with the method that we're wrapping.
-    We then call the underlying_method method after counting whether
-    its memoized value has already been set (a hit) or not (a miss).
     """
-    def __call__(self, *args, **kw):
+    def count(self, *args, **kw):
+        """ Counts whether the memoized value has already been
+            set (a hit) or not (a miss).
+        """
         obj = args[0]
         if self.method_name in obj._memo:
             self.hit = self.hit + 1
         else:
             self.miss = self.miss + 1
-        return self.underlying_method(*args, **kw)
 
 class CountDict(Counter):
     """
     A counter class for memoized values stored in a dictionary, with
     keys based on the method's input arguments.
 
-    A CountDict object is instantiated in a class for each of the
+    A CountDict object is instantiated in a decorator for each of the
     class's methods that memoizes its return value in a dictionary,
     indexed by some key that can be computed from one or more of
     its input arguments.
-
-    We expect that the metaclass initialization will fill in the
-    .underlying_method attribute with the method that we're wrapping.
-    We then call the underlying_method method after counting whether the
-    computed key value is already present in the memoization dictionary
-    (a hit) or not (a miss).
     """
-    def __init__(self, method_name, keymaker):
+    def __init__(self, cls_name, method_name, keymaker):
         """
         """
-        Counter.__init__(self, method_name)
+        Counter.__init__(self, cls_name, method_name)
         self.keymaker = keymaker
-    def __call__(self, *args, **kw):
+    def count(self, *args, **kw):
+        """ Counts whether the computed key value is already present
+           in the memoization dictionary (a hit) or not (a miss).
+        """
         obj = args[0]
         try:
             memo_dict = obj._memo[self.method_name]
@@ -204,39 +179,65 @@ class CountDict(Counter):
                 self.hit = self.hit + 1
             else:
                 self.miss = self.miss + 1
-        return self.underlying_method(*args, **kw)
-
-class Memoizer(object):
-    """Object which performs caching of method calls for its 'primary'
-    instance."""
-
-    def __init__(self):
-        pass
 
 def Dump(title=None):
+    """ Dump the hit/miss count for all the counters
+        collected so far.
+    """
     if title:
         print title
-    CounterList.sort()
-    for counter in CounterList:
-        counter.display()
-
-class Memoized_Metaclass(type):
-    def __init__(cls, name, bases, cls_dict):
-        super(Memoized_Metaclass, cls).__init__(name, bases, cls_dict)
-
-        for counter in cls_dict.get('memoizer_counters', []):
-            method_name = counter.method_name
-
-            counter.name = cls.__name__ + '.' + method_name
-            counter.underlying_method = cls_dict[method_name]
-
-            replacement_method = types.MethodType(counter, None, cls)
-            setattr(cls, method_name, replacement_method)
+    for counter in sorted(CounterList):
+        CounterList[counter].display()
 
 def EnableMemoization():
     global use_memoizer
     use_memoizer = 1
 
+def CountMethodCall(fn):
+    """ Decorator for counting memoizer hits/misses while retrieving
+        a simple value in a class method. It wraps the given method
+        fn and uses a CountValue object to keep track of the
+        caching statistics.
+        Wrapping gets enabled by calling EnableMemoization().
+    """
+    if use_memoizer:
+        def wrapper(self, *args, **kwargs):
+            global CounterList
+            key = self.__class__.__name__+'.'+fn.__name__
+            if key not in CounterList:
+                CounterList[key] = CountValue(self.__class__.__name__, fn.__name__)
+            CounterList[key].count(self, *args, **kwargs)
+            return fn(self, *args, **kwargs)
+        wrapper.__name__= fn.__name__
+        return wrapper
+    else:
+        return fn
+
+def CountDictCall(keyfunc):
+    """ Decorator for counting memoizer hits/misses while accessing
+        dictionary values with a key-generating function. Like
+        CountMethodCall above, it wraps the given method
+        fn and uses a CountDict object to keep track of the
+        caching statistics. The dict-key function keyfunc has to
+        get passed in the decorator call and gets stored in the
+        CountDict instance.
+        Wrapping gets enabled by calling EnableMemoization().
+    """
+    def decorator(fn):
+        if use_memoizer:
+            def wrapper(self, *args, **kwargs):
+                global CounterList
+                key = self.__class__.__name__+'.'+fn.__name__
+                if key not in CounterList:
+                    CounterList[key] = CountDict(self.__class__.__name__, fn.__name__, keyfunc)
+                CounterList[key].count(self, *args, **kwargs)
+                return fn(self, *args, **kwargs)
+            wrapper.__name__= fn.__name__
+            return wrapper
+        else:
+            return fn
+    return decorator
+
 # Local Variables:
 # tab-width:4
 # indent-tabs-mode:nil
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/Alias.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/Alias.py
similarity index 73%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/Alias.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/Alias.py
index fbef1fdd14793f99cce56f0df18b1ab4e7ce4f6a..7e13b00d879413e27de16ee2590b2e77c7ae1f56 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/Alias.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/Alias.py
@@ -8,7 +8,7 @@ This creates a hash of global Aliases (dummy targets).
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets).
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Node/Alias.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Node/Alias.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import collections
 
@@ -56,13 +56,47 @@ class AliasNameSpace(collections.UserDict):
             return None
 
 class AliasNodeInfo(SCons.Node.NodeInfoBase):
-    current_version_id = 1
+    __slots__ = ('csig',)
+    current_version_id = 2
     field_list = ['csig']
     def str_to_node(self, s):
         return default_ans.Alias(s)
 
+    def __getstate__(self):
+        """
+        Return all fields that shall be pickled. Walk the slots in the class
+        hierarchy and add those to the state dictionary. If a '__dict__' slot is
+        available, copy all entries to the dictionary. Also include the version
+        id, which is fixed for all instances of a class.
+        """
+        state = getattr(self, '__dict__', {}).copy()
+        for obj in type(self).mro():
+            for name in getattr(obj,'__slots__',()):
+                if hasattr(self, name):
+                    state[name] = getattr(self, name)
+
+        state['_version_id'] = self.current_version_id
+        try:
+            del state['__weakref__']
+        except KeyError:
+            pass
+
+        return state
+
+    def __setstate__(self, state):
+        """
+        Restore the attributes from a pickled state.
+        """
+        # TODO check or discard version
+        del state['_version_id']
+        for key, value in state.items():
+            if key not in ('__weakref__',):
+                setattr(self, key, value)
+          
+
 class AliasBuildInfo(SCons.Node.BuildInfoBase):
-    current_version_id = 1
+    __slots__ = ()
+    current_version_id = 2
 
 class Alias(SCons.Node.Node):
 
@@ -72,7 +106,9 @@ class Alias(SCons.Node.Node):
     def __init__(self, name):
         SCons.Node.Node.__init__(self)
         self.name = name
-
+        self.changed_since_last_build = 1
+        self.store_info = 0
+        
     def str_for_display(self):
         return '"' + self.__str__() + '"'
 
@@ -105,13 +141,6 @@ class Alias(SCons.Node.Node):
     #
     #
 
-    def changed_since_last_build(self, target, prev_ni):
-        cur_csig = self.get_csig()
-        try:
-            return cur_csig != prev_ni.csig
-        except AttributeError:
-            return 1
-
     def build(self):
         """A "builder" for aliases."""
         pass
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/FS.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/FS.py
similarity index 82%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/FS.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/FS.py
index 3f3cf2870c1fcebc94e8728202a1e80b355a474f..b6a1bb52a2cdc4fe452a5979bf9dcc2ec4429409 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/FS.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/FS.py
@@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Node/FS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Node/FS.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import fnmatch
 import os
@@ -44,6 +44,7 @@ import time
 import codecs
 
 import SCons.Action
+import SCons.Debug
 from SCons.Debug import logInstanceCreation
 import SCons.Errors
 import SCons.Memoize
@@ -55,10 +56,23 @@ import SCons.Warnings
 
 from SCons.Debug import Trace
 
-do_store_info = True
 print_duplicate = 0
 
 
+def sconsign_none(node):
+    raise NotImplementedError
+
+def sconsign_dir(node):
+    """Return the .sconsign file info for this directory,
+    creating it first if necessary."""
+    if not node._sconsign:
+        import SCons.SConsign
+        node._sconsign = SCons.SConsign.ForDirectory(node)
+    return node._sconsign
+
+_sconsign_map = {0 : sconsign_none,
+                 1 : sconsign_dir}
+
 class EntryProxyAttributeError(AttributeError):
     """
     An AttributeError subclass for recording and displaying the name
@@ -267,8 +281,8 @@ def LinkFunc(target, source, env):
     # who want to move their soft-linked src-trees around. Those
     # people should use the 'hard-copy' mode, softlinks cannot be
     # used for that; at least I have no idea how ...
-    src = source[0].abspath
-    dest = target[0].abspath
+    src = source[0].get_abspath()
+    dest = target[0].get_abspath()
     dir, file = os.path.split(dest)
     if dir and not target[0].fs.isdir(dir):
         os.makedirs(dir)
@@ -301,7 +315,7 @@ LocalCopy = SCons.Action.Action(LinkFunc, LocalString)
 
 def UnlinkFunc(target, source, env):
     t = target[0]
-    t.fs.unlink(t.abspath)
+    t.fs.unlink(t.get_abspath())
     return 0
 
 Unlink = SCons.Action.Action(UnlinkFunc, None)
@@ -309,7 +323,7 @@ Unlink = SCons.Action.Action(UnlinkFunc, None)
 def MkdirFunc(target, source, env):
     t = target[0]
     if not t.exists():
-        t.fs.mkdir(t.abspath)
+        t.fs.mkdir(t.get_abspath())
     return 0
 
 Mkdir = SCons.Action.Action(MkdirFunc, None, presub=None)
@@ -402,7 +416,7 @@ def do_diskcheck_match(node, predicate, errorfmt):
     except (AttributeError, KeyError):
         pass
     if result:
-        raise TypeError(errorfmt % node.abspath)
+        raise TypeError(errorfmt % node.get_abspath())
 
 def ignore_diskcheck_match(node, predicate, errorfmt):
     pass
@@ -572,7 +586,20 @@ class Base(SCons.Node.Node):
     object identity comparisons.
     """
 
-    memoizer_counters = []
+    __slots__ = ['name',
+                 'fs',
+                 '_abspath',
+                 '_labspath',
+                 '_path',
+                 '_tpath',
+                 '_path_elements',
+                 'dir',
+                 'cwd',
+                 'duplicate',
+                 '_local',
+                 'sbuilder',
+                 '_proxy',
+                 '_func_sconsign']
 
     def __init__(self, name, directory, fs):
         """Initialize a generic Node.FS.Base object.
@@ -581,7 +608,7 @@ class Base(SCons.Node.Node):
         our relative and absolute paths, identify our parent
         directory, and indicate that this node should use
         signatures."""
-        if __debug__: logInstanceCreation(self, 'Node.FS.Base')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.FS.Base')
         SCons.Node.Node.__init__(self)
 
         # Filenames and paths are probably reused and are intern'ed to
@@ -590,27 +617,26 @@ class Base(SCons.Node.Node):
         #: Filename with extension as it was specified when the object was
         #: created; to obtain filesystem path, use Python str() function
         self.name = SCons.Util.silent_intern(name)
-        #: Cached filename extension
-        self.suffix = SCons.Util.silent_intern(SCons.Util.splitext(name)[1])
         self.fs = fs #: Reference to parent Node.FS object
 
         assert directory, "A directory must be provided"
 
-        self.abspath = SCons.Util.silent_intern(directory.entry_abspath(name))
-        self.labspath = SCons.Util.silent_intern(directory.entry_labspath(name))
-        if directory.path == '.':
-            self.path = SCons.Util.silent_intern(name)
-        else:
-            self.path = SCons.Util.silent_intern(directory.entry_path(name))
-        if directory.tpath == '.':
-            self.tpath = SCons.Util.silent_intern(name)
-        else:
-            self.tpath = SCons.Util.silent_intern(directory.entry_tpath(name))
-        self.path_elements = directory.path_elements + [self]
+        self._abspath = None
+        self._labspath = None
+        self._path = None
+        self._tpath = None
+        self._path_elements = None
 
         self.dir = directory
         self.cwd = None # will hold the SConscript directory for target nodes
         self.duplicate = directory.duplicate
+        self.changed_since_last_build = 2
+        self._func_sconsign = 0
+        self._func_exists = 2
+        self._func_rexists = 2
+        self._func_get_contents = 0
+        self._func_target_from_source = 1
+        self.store_info = 1
 
     def str_for_display(self):
         return '"' + self.__str__() + '"'
@@ -623,17 +649,38 @@ class Base(SCons.Node.Node):
         if isinstance(self, klass) or klass is Entry:
             return
         raise TypeError("Tried to lookup %s '%s' as a %s." %\
-              (self.__class__.__name__, self.path, klass.__name__))
+              (self.__class__.__name__, self.get_internal_path(), klass.__name__))
 
     def get_dir(self):
         return self.dir
 
     def get_suffix(self):
-        return self.suffix
+        return SCons.Util.splitext(self.name)[1]
 
     def rfile(self):
         return self
 
+    def __getattr__(self, attr):
+        """ Together with the node_bwcomp dict defined below,
+            this method provides a simple backward compatibility
+            layer for the Node attributes 'abspath', 'labspath',
+            'path', 'tpath', 'suffix' and 'path_elements'. These Node
+            attributes used to be directly available in v2.3 and earlier, but
+            have been replaced by getter methods that initialize the
+            single variables lazily when required, in order to save memory.
+            The redirection to the getters lets older Tools and
+            SConstruct continue to work without any additional changes,
+            fully transparent to the user. 
+            Note, that __getattr__ is only called as fallback when the
+            requested attribute can't be found, so there should be no
+            speed performance penalty involved for standard builds.
+        """
+        if attr in node_bwcomp:
+            return node_bwcomp[attr](self)
+        
+        raise AttributeError("%r object has no attribute %r" %
+                         (self.__class__, attr))
+
     def __str__(self):
         """A Node.FS.Base object's string representation is its path
         name."""
@@ -642,8 +689,7 @@ class Base(SCons.Node.Node):
             return self._save_str()
         return self._get_str()
 
-    memoizer_counters.append(SCons.Memoize.CountValue('_save_str'))
-
+    @SCons.Memoize.CountMethodCall
     def _save_str(self):
         try:
             return self._memo['_save_str']
@@ -680,21 +726,20 @@ class Base(SCons.Node.Node):
 
     rstr = __str__
 
-    memoizer_counters.append(SCons.Memoize.CountValue('stat'))
-
+    @SCons.Memoize.CountMethodCall
     def stat(self):
         try: return self._memo['stat']
         except KeyError: pass
-        try: result = self.fs.stat(self.abspath)
+        try: result = self.fs.stat(self.get_abspath())
         except os.error: result = None
         self._memo['stat'] = result
         return result
 
     def exists(self):
-        return self.stat() is not None
+        return SCons.Node._exists_map[self._func_exists](self)
 
     def rexists(self):
-        return self.rfile().exists()
+        return SCons.Node._rexists_map[self._func_rexists](self)
 
     def getmtime(self):
         st = self.stat()
@@ -716,7 +761,7 @@ class Base(SCons.Node.Node):
 
     if hasattr(os, 'symlink'):
         def islink(self):
-            try: st = self.fs.lstat(self.abspath)
+            try: st = self.fs.lstat(self.get_abspath())
             except os.error: return 0
             return stat.S_ISLNK(st[stat.ST_MODE])
     else:
@@ -751,7 +796,7 @@ class Base(SCons.Node.Node):
             dir = self.fs.getcwd()
         if self == dir:
             return '.'
-        path_elems = self.path_elements
+        path_elems = self.get_path_elements()
         pathname = ''
         try: i = path_elems.index(dir)
         except ValueError: 
@@ -784,7 +829,26 @@ class Base(SCons.Node.Node):
 
     def get_abspath(self):
         """Get the absolute path of the file."""
-        return self.abspath
+        return self.dir.entry_abspath(self.name)
+
+    def get_labspath(self):
+        """Get the absolute path of the file."""
+        return self.dir.entry_labspath(self.name)
+
+    def get_internal_path(self):
+        if self.dir._path == '.':
+            return self.name
+        else:
+            return self.dir.entry_path(self.name)
+        
+    def get_tpath(self):
+        if self.dir._tpath == '.':
+            return self.name
+        else:
+            return self.dir.entry_tpath(self.name)
+        
+    def get_path_elements(self):
+        return self.dir._path_elements + [self]
 
     def for_signature(self):
         # Return just our name.  Even an absolute path would not work,
@@ -810,13 +874,12 @@ class Base(SCons.Node.Node):
         files that need different behavior.  See Tool/swig.py for
         an example.
         """
-        return self.dir.Entry(prefix + splitext(self.name)[0] + suffix)
+        return SCons.Node._target_from_source_map[self._func_target_from_source](self, prefix, suffix, splitext)
 
     def _Rfindalldirs_key(self, pathlist):
         return pathlist
 
-    memoizer_counters.append(SCons.Memoize.CountDict('Rfindalldirs', _Rfindalldirs_key))
-
+    @SCons.Memoize.CountDictCall(_Rfindalldirs_key)
     def Rfindalldirs(self, pathlist):
         """
         Return all of the directories for a given path list, including
@@ -855,8 +918,7 @@ class Base(SCons.Node.Node):
         cwd = self.cwd or self.fs._cwd
         return cwd.Rfindalldirs(pathlist)
 
-    memoizer_counters.append(SCons.Memoize.CountValue('rentry'))
-
+    @SCons.Memoize.CountMethodCall
     def rentry(self):
         try:
             return self._memo['rentry']
@@ -877,6 +939,17 @@ class Base(SCons.Node.Node):
 
     def _glob1(self, pattern, ondisk=True, source=False, strings=False):
         return []
+    
+# Dict that provides a simple backward compatibility
+# layer for the Node attributes 'abspath', 'labspath',
+# 'path', 'tpath' and 'path_elements'.
+# @see Base.__getattr__ above
+node_bwcomp = {'abspath' : Base.get_abspath,
+               'labspath' : Base.get_labspath,
+               'path' : Base.get_internal_path,
+               'tpath' : Base.get_tpath,
+               'path_elements' : Base.get_path_elements,
+               'suffix' : Base.get_suffix}
 
 class Entry(Base):
     """This is the class for generic Node.FS entries--that is, things
@@ -886,6 +959,28 @@ class Entry(Base):
     time comes, and then call the same-named method in the transformed
     class."""
 
+    __slots__ = ['scanner_paths',
+                 'cachedir_csig',
+                 'cachesig',
+                 'repositories',
+                 'srcdir',
+                 'entries',
+                 'searched',
+                 '_sconsign',
+                 'variant_dirs',
+                 'root',
+                 'dirname',
+                 'on_disk_entries',
+                 'sccs_dir',
+                 'rcs_dir',
+                 'released_target_info',
+                 'contentsig']
+
+    def __init__(self, name, directory, fs):
+        Base.__init__(self, name, directory, fs)
+        self._func_exists = 3
+        self._func_get_contents = 1 
+
     def diskcheck_match(self):
         pass
 
@@ -916,7 +1011,7 @@ class Entry(Base):
                 self.__class__ = Dir
                 self._morph()
             elif must_exist:
-                msg = "No such file or directory: '%s'" % self.abspath
+                msg = "No such file or directory: '%s'" % self.get_abspath()
                 raise SCons.Errors.UserError(msg)
             else:
                 self.__class__ = File
@@ -938,17 +1033,7 @@ class Entry(Base):
     def get_contents(self):
         """Fetch the contents of the entry.  Returns the exact binary
         contents of the file."""
-        try:
-            self = self.disambiguate(must_exist=1)
-        except SCons.Errors.UserError:
-            # There was nothing on disk with which to disambiguate
-            # this entry.  Leave it as an Entry, but return a null
-            # string so calls to get_contents() in emitters and the
-            # like (e.g. in qt.py) don't have to disambiguate by hand
-            # or catch the exception.
-            return ''
-        else:
-            return self.get_contents()
+        return SCons.Node._get_contents_map[self._func_get_contents](self)
 
     def get_text_contents(self):
         """Fetch the decoded text contents of a Unicode encoded Entry.
@@ -988,10 +1073,7 @@ class Entry(Base):
     # to make various tests pass.
 
     def exists(self):
-        """Return if the Entry exists.  Check the file system to see
-        what we should turn into first.  Assume a file if there's no
-        directory."""
-        return self.disambiguate().exists()
+        return SCons.Node._exists_map[self._func_exists](self)
 
     def rel_path(self, other):
         d = self.disambiguate()
@@ -1002,9 +1084,6 @@ class Entry(Base):
     def new_ninfo(self):
         return self.disambiguate().new_ninfo()
 
-    def changed_since_last_build(self, target, prev_ni):
-        return self.disambiguate().changed_since_last_build(target, prev_ni)
-
     def _glob1(self, pattern, ondisk=True, source=False, strings=False):
         return self.disambiguate()._glob1(pattern, ondisk, source, strings)
 
@@ -1018,9 +1097,6 @@ _classEntry = Entry
 
 class LocalFS(object):
 
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
     # This class implements an abstraction layer for operations involving
     # a local file system.  Essentially, this wraps any function in
     # the os, os.path or shutil modules that we use to actually go do
@@ -1100,8 +1176,6 @@ class LocalFS(object):
 
 class FS(LocalFS):
 
-    memoizer_counters = []
-
     def __init__(self, path = None):
         """Initialize the Node.FS subsystem.
 
@@ -1111,7 +1185,7 @@ class FS(LocalFS):
 
         The path argument must be a valid absolute path.
         """
-        if __debug__: logInstanceCreation(self, 'Node.FS')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.FS')
 
         self._memo = {}
 
@@ -1127,8 +1201,8 @@ class FS(LocalFS):
         self.defaultDrive = _my_normcase(_my_splitdrive(self.pathTop)[0])
 
         self.Top = self.Dir(self.pathTop)
-        self.Top.path = '.'
-        self.Top.tpath = '.'
+        self.Top._path = '.'
+        self.Top._tpath = '.'
         self._cwd = self.Top
 
         DirNodeInfo.fs = self
@@ -1159,7 +1233,7 @@ class FS(LocalFS):
             if dir is not None:
                 self._cwd = dir
                 if change_os_dir:
-                    os.chdir(dir.abspath)
+                    os.chdir(dir.get_abspath())
         except OSError:
             self._cwd = curr
             raise
@@ -1248,9 +1322,9 @@ class FS(LocalFS):
             
             # The path is relative to the top-level SCons directory.
             if p in ('', '.'):
-                p = directory.labspath
+                p = directory.get_labspath()
             else:
-                p = directory.labspath + '/' + p
+                p = directory.get_labspath() + '/' + p
         else:
             if do_splitdrive:
                 drive, p = _my_splitdrive(p)
@@ -1284,9 +1358,9 @@ class FS(LocalFS):
                     directory = self._cwd
 
                 if p in ('', '.'):
-                    p = directory.labspath
+                    p = directory.get_labspath()
                 else:
-                    p = directory.labspath + '/' + p
+                    p = directory.get_labspath() + '/' + p
 
                 if drive:
                     root = self.get_root(drive)
@@ -1392,7 +1466,7 @@ class FS(LocalFS):
                 if start_dir.is_under(bd):
                     # If already in the build-dir location, don't reflect
                     return [orig], fmt % str(orig)
-                p = os.path.join(bd.path, *tail)
+                p = os.path.join(bd._path, *tail)
                 targets.append(self.Entry(p))
             tail = [dir.name] + tail
             dir = dir.up()
@@ -1400,7 +1474,7 @@ class FS(LocalFS):
             message = fmt % ' '.join(map(str, targets))
         return targets, message
 
-    def Glob(self, pathname, ondisk=True, source=True, strings=False, cwd=None):
+    def Glob(self, pathname, ondisk=True, source=True, strings=False, exclude=None, cwd=None):
         """
         Globs
 
@@ -1408,11 +1482,12 @@ class FS(LocalFS):
         """
         if cwd is None:
             cwd = self.getcwd()
-        return cwd.glob(pathname, ondisk, source, strings)
+        return cwd.glob(pathname, ondisk, source, strings, exclude)
 
 class DirNodeInfo(SCons.Node.NodeInfoBase):
+    __slots__ = ()
     # This should get reset by the FS initialization.
-    current_version_id = 1
+    current_version_id = 2
 
     fs = None
 
@@ -1424,11 +1499,12 @@ class DirNodeInfo(SCons.Node.NodeInfoBase):
             if drive:
                 root = self.fs.get_root(drive)
         if not os.path.isabs(s):
-            s = top.labspath + '/' + s
+            s = top.get_labspath() + '/' + s
         return root._lookup_abs(s, Entry)
 
 class DirBuildInfo(SCons.Node.BuildInfoBase):
-    current_version_id = 1
+    __slots__ = ()
+    current_version_id = 2
 
 glob_magic_check = re.compile('[*?[]')
 
@@ -1439,13 +1515,28 @@ class Dir(Base):
     """A class for directories in a file system.
     """
 
-    memoizer_counters = []
+    __slots__ = ['scanner_paths',
+                 'cachedir_csig',
+                 'cachesig',
+                 'repositories',
+                 'srcdir',
+                 'entries',
+                 'searched',
+                 '_sconsign',
+                 'variant_dirs',
+                 'root',
+                 'dirname',
+                 'on_disk_entries',
+                 'sccs_dir',
+                 'rcs_dir',
+                 'released_target_info',
+                 'contentsig']
 
     NodeInfo = DirNodeInfo
     BuildInfo = DirBuildInfo
 
     def __init__(self, name, directory, fs):
-        if __debug__: logInstanceCreation(self, 'Node.FS.Dir')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.FS.Dir')
         Base.__init__(self, name, directory, fs)
         self._morph()
 
@@ -1469,6 +1560,22 @@ class Dir(Base):
         self._sconsign = None
         self.variant_dirs = []
         self.root = self.dir.root
+        self.changed_since_last_build = 3
+        self._func_sconsign = 1
+        self._func_exists = 2
+        self._func_get_contents = 2
+        
+        self._abspath = SCons.Util.silent_intern(self.dir.entry_abspath(self.name))
+        self._labspath = SCons.Util.silent_intern(self.dir.entry_labspath(self.name))
+        if self.dir._path == '.':
+            self._path = SCons.Util.silent_intern(self.name)
+        else:
+            self._path = SCons.Util.silent_intern(self.dir.entry_path(self.name))
+        if self.dir._tpath == '.':
+            self._tpath = SCons.Util.silent_intern(self.name)
+        else:
+            self._tpath = SCons.Util.silent_intern(self.dir.entry_tpath(self.name))
+        self._path_elements = self.dir._path_elements + [self]
 
         # For directories, we make a difference between the directory
         # 'name' and the directory 'dirname'. The 'name' attribute is
@@ -1561,8 +1668,7 @@ class Dir(Base):
             return self.srcdir.get_all_rdirs() + self.repositories
         return self.repositories
 
-    memoizer_counters.append(SCons.Memoize.CountValue('get_all_rdirs'))
-
+    @SCons.Memoize.CountMethodCall
     def get_all_rdirs(self):
         try:
             return list(self._memo['get_all_rdirs'])
@@ -1588,7 +1694,7 @@ class Dir(Base):
     def addRepository(self, dir):
         if dir != self and not dir in self.repositories:
             self.repositories.append(dir)
-            dir.tpath = '.'
+            dir._tpath = '.'
             self.__clearRepositoryCache()
 
     def up(self):
@@ -1597,8 +1703,7 @@ class Dir(Base):
     def _rel_path_key(self, other):
         return str(other)
 
-    memoizer_counters.append(SCons.Memoize.CountDict('rel_path', _rel_path_key))
-
+    @SCons.Memoize.CountDictCall(_rel_path_key)
     def rel_path(self, other):
         """Return a path to "other" relative to this directory.
         """
@@ -1627,7 +1732,7 @@ class Dir(Base):
         if self is other:
             result = '.'
 
-        elif not other in self.path_elements:
+        elif not other in self._path_elements:
             try:
                 other_dir = other.get_dir()
             except AttributeError:
@@ -1642,10 +1747,10 @@ class Dir(Base):
                     else:
                         result = dir_rel_path + OS_SEP + other.name
         else:
-            i = self.path_elements.index(other) + 1
+            i = self._path_elements.index(other) + 1
 
-            path_elems = ['..'] * (len(self.path_elements) - i) \
-                         + [n.name for n in other.path_elements[i:]]
+            path_elems = ['..'] * (len(self._path_elements) - i) \
+                         + [n.name for n in other._path_elements[i:]]
              
             result = OS_SEP.join(path_elems)
 
@@ -1712,7 +1817,7 @@ class Dir(Base):
             if p is None:
                 # Don't use while: - else: for this condition because
                 # if so, then parent is None and has no .path attribute.
-                raise SCons.Errors.StopError(parent.path)
+                raise SCons.Errors.StopError(parent._path)
             parent = p
         listDirs.reverse()
         for dirnode in listDirs:
@@ -1752,10 +1857,7 @@ class Dir(Base):
     def get_contents(self):
         """Return content signatures and names of all our children
         separated by new-lines. Ensure that the nodes are sorted."""
-        contents = []
-        for node in sorted(self.children(), key=lambda t: t.name):
-            contents.append('%s %s\n' % (node.get_csig(), node.name))
-        return ''.join(contents)
+        return SCons.Node._get_contents_map[self._func_get_contents](self)
 
     def get_csig(self):
         """Compute the content signature for Directory nodes. In
@@ -1769,8 +1871,6 @@ class Dir(Base):
     def do_duplicate(self, src):
         pass
 
-    changed_since_last_build = SCons.Node.Node.state_has_changed
-
     def is_up_to_date(self):
         """If any child is not up-to-date, then this directory isn't,
         either."""
@@ -1794,12 +1894,8 @@ class Dir(Base):
         return self
 
     def sconsign(self):
-        """Return the .sconsign file info for this directory,
-        creating it first if necessary."""
-        if not self._sconsign:
-            import SCons.SConsign
-            self._sconsign = SCons.SConsign.ForDirectory(self)
-        return self._sconsign
+        """Return the .sconsign file info for this directory. """
+        return _sconsign_map[self._func_sconsign](self)
 
     def srcnode(self):
         """Dir has a special need for srcnode()...if we
@@ -1816,45 +1912,94 @@ class Dir(Base):
                 stamp = kid.get_timestamp()
         return stamp
 
+    def get_abspath(self):
+        """Get the absolute path of the file."""
+        return self._abspath
+
+    def get_labspath(self):
+        """Get the absolute path of the file."""
+        return self._labspath
+
+    def get_internal_path(self):
+        return self._path
+        
+    def get_tpath(self):
+        return self._tpath
+        
+    def get_path_elements(self):
+        return self._path_elements
+
     def entry_abspath(self, name):
-        return self.abspath + OS_SEP + name
+        return self._abspath + OS_SEP + name
 
     def entry_labspath(self, name):
-        return self.labspath + '/' + name
+        return self._labspath + '/' + name
 
     def entry_path(self, name):
-        return self.path + OS_SEP + name
+        return self._path + OS_SEP + name
 
     def entry_tpath(self, name):
-        return self.tpath + OS_SEP + name
+        return self._tpath + OS_SEP + name
 
     def entry_exists_on_disk(self, name):
+        """ Searches through the file/dir entries of the current
+            directory, and returns True if a physical entry with the given
+            name could be found.
+            
+            @see rentry_exists_on_disk
+        """
         try:
             d = self.on_disk_entries
         except AttributeError:
             d = {}
             try:
-                entries = os.listdir(self.abspath)
+                entries = os.listdir(self._abspath)
             except OSError:
                 pass
             else:
                 for entry in map(_my_normcase, entries):
                     d[entry] = True
             self.on_disk_entries = d
-        if sys.platform == 'win32':
+        if sys.platform == 'win32' or sys.platform == 'cygwin':
             name = _my_normcase(name)
             result = d.get(name)
             if result is None:
                 # Belt-and-suspenders for Windows:  check directly for
                 # 8.3 file names that don't show up in os.listdir().
-                result = os.path.exists(self.abspath + OS_SEP + name)
+                result = os.path.exists(self._abspath + OS_SEP + name)
                 d[name] = result
             return result
         else:
             return name in d
 
-    memoizer_counters.append(SCons.Memoize.CountValue('srcdir_list'))
+    def rentry_exists_on_disk(self, name):
+        """ Searches through the file/dir entries of the current
+            *and* all its remote directories (repos), and returns
+            True if a physical entry with the given name could be found.
+            The local directory (self) gets searched first, so
+            repositories take a lower precedence regarding the
+            searching order.
+            
+            @see entry_exists_on_disk
+        """
+        
+        rentry_exists = self.entry_exists_on_disk(name)
+        if not rentry_exists:
+            # Search through the repository folders
+            norm_name = _my_normcase(name)
+            for rdir in self.get_all_rdirs():
+                try:
+                    node = rdir.entries[norm_name]
+                    if node:
+                        rentry_exists = True
+                        break
+                except KeyError:
+                    if rdir.entry_exists_on_disk(name):
+                        rentry_exists = True
+                        break
+        return rentry_exists
 
+    @SCons.Memoize.CountMethodCall
     def srcdir_list(self):
         try:
             return self._memo['srcdir_list']
@@ -1895,8 +2040,7 @@ class Dir(Base):
     def _srcdir_find_file_key(self, filename):
         return filename
 
-    memoizer_counters.append(SCons.Memoize.CountDict('srcdir_find_file', _srcdir_find_file_key))
-
+    @SCons.Memoize.CountDictCall(_srcdir_find_file_key)
     def srcdir_find_file(self, filename):
         try:
             memo_dict = self._memo['srcdir_find_file']
@@ -1986,7 +2130,7 @@ class Dir(Base):
         for dirname in [n for n in names if isinstance(entries[n], Dir)]:
             entries[dirname].walk(func, arg)
 
-    def glob(self, pathname, ondisk=True, source=False, strings=False):
+    def glob(self, pathname, ondisk=True, source=False, strings=False, exclude=None):
         """
         Returns a list of Nodes (or strings) matching a specified
         pathname pattern.
@@ -2014,24 +2158,31 @@ class Dir(Base):
         The "strings" argument, when true, returns the matches as strings,
         not Nodes.  The strings are path names relative to this directory.
 
+        The "exclude" argument, if not None, must be a pattern or a list
+        of patterns following the same UNIX shell semantics.
+        Elements matching a least one pattern of this list will be excluded
+        from the result.
+
         The underlying algorithm is adapted from the glob.glob() function
         in the Python library (but heavily modified), and uses fnmatch()
         under the covers.
         """
         dirname, basename = os.path.split(pathname)
         if not dirname:
-            return sorted(self._glob1(basename, ondisk, source, strings),
-                          key=lambda t: str(t))
-        if has_glob_magic(dirname):
-            list = self.glob(dirname, ondisk, source, strings=False)
+            result = self._glob1(basename, ondisk, source, strings)
         else:
-            list = [self.Dir(dirname, create=True)]
-        result = []
-        for dir in list:
-            r = dir._glob1(basename, ondisk, source, strings)
-            if strings:
-                r = [os.path.join(str(dir), x) for x in r]
-            result.extend(r)
+            if has_glob_magic(dirname):
+                list = self.glob(dirname, ondisk, source, False, exclude)
+            else:
+                list = [self.Dir(dirname, create=True)]
+            result = []
+            for dir in list:
+                r = dir._glob1(basename, ondisk, source, strings)
+                if strings:
+                    r = [os.path.join(str(dir), x) for x in r]
+                result.extend(r)
+        if exclude:
+            result = filter(lambda x: not any(fnmatch.fnmatch(str(x), e) for e in SCons.Util.flatten(exclude)), result)
         return sorted(result, key=lambda a: str(a))
 
     def _glob1(self, pattern, ondisk=True, source=False, strings=False):
@@ -2064,7 +2215,7 @@ class Dir(Base):
                 for name in node_names: selfEntry(name)
             if ondisk:
                 try:
-                    disk_names = os.listdir(dir.abspath)
+                    disk_names = os.listdir(dir._abspath)
                 except os.error:
                     continue
                 names.extend(disk_names)
@@ -2094,14 +2245,12 @@ class Dir(Base):
 
         names = set(names)
         if pattern[0] != '.':
-            #names = [ n for n in names if n[0] != '.' ]
             names = [x for x in names if x[0] != '.']
         names = fnmatch.filter(names, pattern)
 
         if strings:
             return names
 
-        #return [ self.entries[_my_normcase(n)] for n in names ]
         return [self.entries[_my_normcase(n)] for n in names]
 
 class RootDir(Dir):
@@ -2112,18 +2261,12 @@ class RootDir(Dir):
     add a separator when creating the path names of entries within
     this directory.
     """
+    
+    __slots__ = ['_lookupDict']
+    
     def __init__(self, drive, fs):
-        if __debug__: logInstanceCreation(self, 'Node.FS.RootDir')
-        # We're going to be our own parent directory (".." entry and .dir
-        # attribute) so we have to set up some values so Base.__init__()
-        # won't gag won't it calls some of our methods.
-        self.abspath = ''
-        self.labspath = ''
-        self.path = ''
-        self.tpath = ''
-        self.path_elements = []
-        self.duplicate = 0
-        self.root = self
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.FS.RootDir')
+        SCons.Node.Node.__init__(self)
 
         # Handle all the types of drives:
         if drive == '':
@@ -2139,33 +2282,85 @@ class RootDir(Dir):
             name = drive
             dirname = drive + OS_SEP
 
-        Base.__init__(self, name, self, fs)
+        #: Filename with extension as it was specified when the object was
+        #: created; to obtain filesystem path, use Python str() function
+        self.name = SCons.Util.silent_intern(name)
+        self.fs = fs #: Reference to parent Node.FS object
+
+        self._path_elements = [self]
+        self.dir = self
+        self._func_rexists = 2
+        self._func_target_from_source = 1
+        self.store_info = 1
 
         # Now set our paths to what we really want them to be. The
         # name should already contain any necessary separators, such
         # as the initial drive letter (the name) plus the directory
         # separator, except for the "lookup abspath," which does not
         # have the drive letter.
-        self.abspath = dirname
-        self.labspath = ''
-        self.path = dirname
-        self.tpath = dirname
-        self._morph()
-
-        # Must be reset after Dir._morph() is invoked...
+        self._abspath = dirname
+        self._labspath = ''
+        self._path = dirname
+        self._tpath = dirname
         self.dirname = dirname
 
+        self._morph()
+
+        self.duplicate = 0
         self._lookupDict = {}
 
         self._lookupDict[''] = self
         self._lookupDict['/'] = self
-
+        self.root = self
         # The // entry is necessary because os.path.normpath()
         # preserves double slashes at the beginning of a path on Posix
         # platforms.
         if not has_unc:
             self._lookupDict['//'] = self
 
+    def _morph(self):
+        """Turn a file system Node (either a freshly initialized directory
+        object or a separate Entry object) into a proper directory object.
+
+        Set up this directory's entries and hook it into the file
+        system tree.  Specify that directories (this Node) don't use
+        signatures for calculating whether they're current.
+        """
+
+        self.repositories = []
+        self.srcdir = None
+
+        self.entries = {}
+        self.entries['.'] = self
+        self.entries['..'] = self.dir
+        self.cwd = self
+        self.searched = 0
+        self._sconsign = None
+        self.variant_dirs = []
+        self.changed_since_last_build = 3
+        self._func_sconsign = 1
+        self._func_exists = 2
+        self._func_get_contents = 2
+        
+        # Don't just reset the executor, replace its action list,
+        # because it might have some pre-or post-actions that need to
+        # be preserved.
+        #
+        # But don't reset the executor if there is a non-null executor
+        # attached already. The existing executor might have other
+        # targets, in which case replacing the action list with a
+        # Mkdir action is a big mistake.
+        if not hasattr(self, 'executor'):
+            self.builder = get_MkdirBuilder()
+            self.get_executor().set_action_list(self.builder.action)
+        else:
+            # Prepend MkdirBuilder action to existing action list
+            l = self.get_executor().action_list
+            a = get_MkdirBuilder().action
+            l.insert(0, a) 
+            self.get_executor().set_action_list(l)
+      
+
     def must_be_same(self, klass):
         if klass is Dir:
             return
@@ -2196,17 +2391,7 @@ class RootDir(Dir):
                 raise SCons.Errors.UserError(msg)
             # There is no Node for this path name, and we're allowed
             # to create it.
-            # (note: would like to use p.rsplit('/',1) here but
-            # that's not in python 2.3)
-            # e.g.: dir_name, file_name = p.rsplit('/',1)
-            last_slash = p.rindex('/')
-            if (last_slash >= 0):
-                dir_name  = p[:last_slash]
-                file_name = p[last_slash+1:]
-            else:
-                dir_name  = p         # shouldn't happen, just in case
-                file_name = ''
-
+            dir_name, file_name = p.rsplit('/',1)
             dir_node = self._lookup_abs(dir_name, Dir)
             result = klass(file_name, dir_node, self.fs)
 
@@ -2224,19 +2409,19 @@ class RootDir(Dir):
         return result
 
     def __str__(self):
-        return self.abspath
+        return self._abspath
 
     def entry_abspath(self, name):
-        return self.abspath + name
+        return self._abspath + name
 
     def entry_labspath(self, name):
         return '/' + name
 
     def entry_path(self, name):
-        return self.path + name
+        return self._path + name
 
     def entry_tpath(self, name):
-        return self.tpath + name
+        return self._tpath + name
 
     def is_under(self, dir):
         if self is dir:
@@ -2254,7 +2439,8 @@ class RootDir(Dir):
         return _null
 
 class FileNodeInfo(SCons.Node.NodeInfoBase):
-    current_version_id = 1
+    __slots__ = ('csig', 'timestamp', 'size')
+    current_version_id = 2
 
     field_list = ['csig', 'timestamp', 'size']
 
@@ -2269,11 +2455,43 @@ class FileNodeInfo(SCons.Node.NodeInfoBase):
             if drive:
                 root = self.fs.get_root(drive)
         if not os.path.isabs(s):
-            s = top.labspath + '/' + s
+            s = top.get_labspath() + '/' + s
         return root._lookup_abs(s, Entry)
 
+    def __getstate__(self):
+        """
+        Return all fields that shall be pickled. Walk the slots in the class
+        hierarchy and add those to the state dictionary. If a '__dict__' slot is
+        available, copy all entries to the dictionary. Also include the version
+        id, which is fixed for all instances of a class.
+        """
+        state = getattr(self, '__dict__', {}).copy()
+        for obj in type(self).mro():
+            for name in getattr(obj,'__slots__',()):
+                if hasattr(self, name):
+                    state[name] = getattr(self, name)
+
+        state['_version_id'] = self.current_version_id
+        try:
+            del state['__weakref__']
+        except KeyError:
+            pass
+
+        return state
+
+    def __setstate__(self, state):
+        """
+        Restore the attributes from a pickled state.
+        """
+        # TODO check or discard version
+        del state['_version_id']
+        for key, value in state.items():
+            if key not in ('__weakref__',):
+                setattr(self, key, value)
+
 class FileBuildInfo(SCons.Node.BuildInfoBase):
-    current_version_id = 1
+    __slots__ = ()
+    current_version_id = 2
 
     def convert_to_sconsign(self):
         """
@@ -2288,7 +2506,7 @@ class FileBuildInfo(SCons.Node.BuildInfoBase):
         else:
             def node_to_str(n):
                 try:
-                    s = n.path
+                    s = n.get_internal_path()
                 except AttributeError:
                     s = str(n)
                 else:
@@ -2329,6 +2547,8 @@ class FileBuildInfo(SCons.Node.BuildInfoBase):
                 nodeinfos = getattr(self, sattr)
             except AttributeError:
                 continue
+            if strings is None or nodeinfos is None:
+                continue
             nodes = []
             for s, ni in zip(strings, nodeinfos):
                 if not isinstance(s, SCons.Node.Node):
@@ -2342,6 +2562,8 @@ class FileBuildInfo(SCons.Node.BuildInfoBase):
         for bkid, bkidsig in zip(bkids, bkidsigs):
             result.append(str(bkid) + ': ' +
                           ' '.join(bkidsig.format(names=names)))
+        if not hasattr(self,'bact'):
+            self.bact = "none"
         result.append('%s [%s]' % (self.bactsig, self.bact))
         return '\n'.join(result)
 
@@ -2349,7 +2571,22 @@ class File(Base):
     """A class for files in a file system.
     """
 
-    memoizer_counters = []
+    __slots__ = ['scanner_paths',
+                 'cachedir_csig',
+                 'cachesig',
+                 'repositories',
+                 'srcdir',
+                 'entries',
+                 'searched',
+                 '_sconsign',
+                 'variant_dirs',
+                 'root',
+                 'dirname',
+                 'on_disk_entries',
+                 'sccs_dir',
+                 'rcs_dir',
+                 'released_target_info',
+                 'contentsig']
 
     NodeInfo = FileNodeInfo
     BuildInfo = FileBuildInfo
@@ -2361,7 +2598,7 @@ class File(Base):
                         "Directory %s found where file expected.")
 
     def __init__(self, name, directory, fs):
-        if __debug__: logInstanceCreation(self, 'Node.FS.File')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.FS.File')
         Base.__init__(self, name, directory, fs)
         self._morph()
 
@@ -2397,7 +2634,17 @@ class File(Base):
         self.scanner_paths = {}
         if not hasattr(self, '_local'):
             self._local = 0
+        if not hasattr(self, 'released_target_info'):
+            self.released_target_info = False
 
+        self.store_info = 1
+        self._func_exists = 4
+        self._func_get_contents = 3
+        
+        # Initialize this Node's decider function to decide_source() because
+        # every file is a source file until it has a Builder attached...
+        self.changed_since_last_build = 4
+        
         # If there was already a Builder set on this entry, then
         # we need to make sure we call the target-decider function,
         # not the source-decider.  Reaching in and doing this by hand
@@ -2409,22 +2656,13 @@ class File(Base):
         # not clear right now how to fix that, stick with what works
         # until it becomes clear...
         if self.has_builder():
-            self.changed_since_last_build = self.decide_target
+            self.changed_since_last_build = 5
 
     def scanner_key(self):
         return self.get_suffix()
 
     def get_contents(self):
-        if not self.rexists():
-            return ''
-        fname = self.rfile().abspath
-        try:
-            contents = open(fname, "rb").read()
-        except EnvironmentError, e:
-            if not e.filename:
-                e.filename = fname
-            raise
-        return contents
+        return SCons.Node._get_contents_map[self._func_get_contents](self)
 
     # This attempts to figure out what the encoding of the text is
     # based upon the BOM bytes, and then decodes the contents so that
@@ -2451,7 +2689,7 @@ class File(Base):
         """
         if not self.rexists():
             return SCons.Util.MD5signature('')
-        fname = self.rfile().abspath
+        fname = self.rfile().get_abspath()
         try:
             cs = SCons.Util.MD5filesignature(fname,
                 chunksize=SCons.Node.FS.File.md5_chunksize*1024)
@@ -2461,9 +2699,7 @@ class File(Base):
             raise
         return cs
         
-
-    memoizer_counters.append(SCons.Memoize.CountValue('get_size'))
-
+    @SCons.Memoize.CountMethodCall
     def get_size(self):
         try:
             return self._memo['get_size']
@@ -2479,8 +2715,7 @@ class File(Base):
 
         return size
 
-    memoizer_counters.append(SCons.Memoize.CountValue('get_timestamp'))
-
+    @SCons.Memoize.CountMethodCall
     def get_timestamp(self):
         try:
             return self._memo['get_timestamp']
@@ -2496,14 +2731,6 @@ class File(Base):
 
         return timestamp
 
-    def store_info(self):
-        # Merge our build information into the already-stored entry.
-        # This accomodates "chained builds" where a file that's a target
-        # in one build (SConstruct file) is a source in a different build.
-        # See test/chained-build.py for the use case.
-        if do_store_info:
-            self.dir.sconsign().store_info(self.name, self)
-
     convert_copy_attrs = [
         'bsources',
         'bimplicit',
@@ -2616,8 +2843,7 @@ class File(Base):
             delattr(old_entry, attr)
         return new_entry
 
-    memoizer_counters.append(SCons.Memoize.CountValue('get_stored_info'))
-
+    @SCons.Memoize.CountMethodCall
     def get_stored_info(self):
         try:
             return self._memo['get_stored_info']
@@ -2657,8 +2883,7 @@ class File(Base):
     def _get_found_includes_key(self, env, scanner, path):
         return (id(env), id(scanner), path)
 
-    memoizer_counters.append(SCons.Memoize.CountDict('get_found_includes', _get_found_includes_key))
-
+    @SCons.Memoize.CountDictCall(_get_found_includes_key)
     def get_found_includes(self, env, scanner, path):
         """Return the included implicit dependencies in this file.
         Cache results so we only scan the file once per path
@@ -2724,7 +2949,7 @@ class File(Base):
         return self.get_build_env().get_CacheDir().retrieve(self)
 
     def visited(self):
-        if self.exists():
+        if self.exists() and self.executor is not None:
             self.get_build_env().get_CacheDir().push_if_forced(self)
 
         ninfo = self.get_ninfo()
@@ -2742,9 +2967,61 @@ class File(Base):
             # any build information that's stored in the .sconsign file
             # into our binfo object so it doesn't get lost.
             old = self.get_stored_info()
-            self.get_binfo().__dict__.update(old.binfo.__dict__)
-
-        self.store_info()
+            self.get_binfo().merge(old.binfo)
+
+        SCons.Node.store_info_map[self.store_info](self)
+
+    def release_target_info(self):
+        """Called just after this node has been marked
+         up-to-date or was built completely.
+         
+         This is where we try to release as many target node infos
+         as possible for clean builds and update runs, in order
+         to minimize the overall memory consumption.
+         
+         We'd like to remove a lot more attributes like self.sources
+         and self.sources_set, but they might get used
+         in a next build step. For example, during configuration
+         the source files for a built *.o file are used to figure out
+         which linker to use for the resulting Program (gcc vs. g++)!
+         That's why we check for the 'keep_targetinfo' attribute,
+         config Nodes and the Interactive mode just don't allow
+         an early release of most variables. 
+
+         In the same manner, we can't simply remove the self.attributes
+         here. The smart linking relies on the shared flag, and some
+         parts of the java Tool use it to transport information
+         about nodes...
+         
+         @see: built() and Node.release_target_info()
+         """
+        if (self.released_target_info or SCons.Node.interactive):
+            return
+        
+        if not hasattr(self.attributes, 'keep_targetinfo'):
+            # Cache some required values, before releasing
+            # stuff like env, executor and builder...
+            self.changed(allowcache=True)
+            self.get_contents_sig()
+            self.get_build_env()
+            # Now purge unneeded stuff to free memory...
+            self.executor = None
+            self._memo.pop('rfile', None)
+            self.prerequisites = None
+            # Cleanup lists, but only if they're empty
+            if not len(self.ignore_set):
+                self.ignore_set = None
+            if not len(self.implicit_set):
+                self.implicit_set = None
+            if not len(self.depends_set):
+                self.depends_set = None
+            if not len(self.ignore):
+                self.ignore = None
+            if not len(self.depends):
+                self.depends = None
+            # Mark this node as done, we only have to release
+            # the memory once...
+            self.released_target_info = True
 
     def find_src_builder(self):
         if self.rexists():
@@ -2792,7 +3069,7 @@ class File(Base):
 
     def _rmv_existing(self):
         self.clear_memoized_values()
-        if print_duplicate:
+        if SCons.Node.print_duplicate:
             print "dup: removing existing target %s"%self
         e = Unlink(self, [], None)
         if isinstance(e, SCons.Errors.BuildError):
@@ -2828,18 +3105,18 @@ class File(Base):
     def remove(self):
         """Remove this file."""
         if self.exists() or self.islink():
-            self.fs.unlink(self.path)
+            self.fs.unlink(self.get_internal_path())
             return 1
         return None
 
     def do_duplicate(self, src):
         self._createDir()
-        if print_duplicate:
+        if SCons.Node.print_duplicate:
             print "dup: relinking variant '%s' from '%s'"%(self, src)
         Unlink(self, None, None)
         e = Link(self, src, None)
         if isinstance(e, SCons.Errors.BuildError):
-            desc = "Cannot duplicate `%s' in `%s': %s." % (src.path, self.dir.path, e.errstr)
+            desc = "Cannot duplicate `%s' in `%s': %s." % (src.get_internal_path(), self.dir._path, e.errstr)
             raise SCons.Errors.StopError(desc)
         self.linked = 1
         # The Link() action may or may not have actually
@@ -2848,36 +3125,14 @@ class File(Base):
         # _rexists attributes so they can be reevaluated.
         self.clear()
 
-    memoizer_counters.append(SCons.Memoize.CountValue('exists'))
-
+    @SCons.Memoize.CountMethodCall
     def exists(self):
         try:
             return self._memo['exists']
         except KeyError:
             pass
-        # Duplicate from source path if we are set up to do this.
-        if self.duplicate and not self.is_derived() and not self.linked:
-            src = self.srcnode()
-            if src is not self:
-                # At this point, src is meant to be copied in a variant directory.
-                src = src.rfile()
-                if src.abspath != self.abspath:
-                    if src.exists():
-                        self.do_duplicate(src)
-                        # Can't return 1 here because the duplication might
-                        # not actually occur if the -n option is being used.
-                    else:
-                        # The source file does not exist.  Make sure no old
-                        # copy remains in the variant directory.
-                        if print_duplicate:
-                            print "dup: no src for %s, unlinking old variant copy"%self
-                        if Base.exists(self) or self.islink():
-                            self.fs.unlink(self.path)
-                        # Return None explicitly because the Base.exists() call
-                        # above will have cached its value if the file existed.
-                        self._memo['exists'] = None
-                        return None
-        result = Base.exists(self)
+        
+        result = SCons.Node._exists_map[self._func_exists](self)
         self._memo['exists'] = result
         return result
 
@@ -2954,7 +3209,53 @@ class File(Base):
 
     def builder_set(self, builder):
         SCons.Node.Node.builder_set(self, builder)
-        self.changed_since_last_build = self.decide_target
+        self.changed_since_last_build = 5
+
+    def built(self):
+        """Called just after this File node is successfully built.
+        
+         Just like for 'release_target_info' we try to release
+         some more target node attributes in order to minimize the
+         overall memory consumption.
+         
+         @see: release_target_info
+        """
+
+        SCons.Node.Node.built(self)
+
+        if (not SCons.Node.interactive and 
+            not hasattr(self.attributes, 'keep_targetinfo')):
+            # Ensure that the build infos get computed and cached...        
+            SCons.Node.store_info_map[self.store_info](self)
+            # ... then release some more variables.
+            self._specific_sources = False
+            self._labspath = None
+            self._save_str()
+            self.cwd = None
+             
+            self.scanner_paths = None
+
+    def changed(self, node=None, allowcache=False):
+        """
+        Returns if the node is up-to-date with respect to the BuildInfo
+        stored last time it was built. 
+        
+        For File nodes this is basically a wrapper around Node.changed(),
+        but we allow the return value to get cached after the reference
+        to the Executor got released in release_target_info().
+        
+        @see: Node.changed()
+        """
+        if node is None:
+            try:
+                return self._memo['changed']
+            except KeyError:
+                pass
+        
+        has_changed = SCons.Node.Node.changed(self, node)
+        if allowcache:
+            self._memo['changed'] = has_changed
+        return has_changed
 
     def changed_content(self, target, prev_ni):
         cur_csig = self.get_csig()
@@ -2987,16 +3288,6 @@ class File(Base):
         except AttributeError:
             return 1
 
-    def decide_source(self, target, prev_ni):
-        return target.get_build_env().decide_source(self, target, prev_ni)
-
-    def decide_target(self, target, prev_ni):
-        return target.get_build_env().decide_target(self, target, prev_ni)
-
-    # Initialize this Node's decider function to decide_source() because
-    # every file is a source file until it has a Builder attached...
-    changed_since_last_build = decide_source
-
     def is_up_to_date(self):
         T = 0
         if T: Trace('is_up_to_date(%s):' % self)
@@ -3014,7 +3305,7 @@ class File(Base):
                         e = LocalCopy(self, r, None)
                         if isinstance(e, SCons.Errors.BuildError):
                             raise 
-                        self.store_info()
+                        SCons.Node.store_info_map[self.store_info](self)
                     if T: Trace(' 1\n')
                     return 1
             self.changed()
@@ -3025,8 +3316,7 @@ class File(Base):
             if T: Trace(' self.exists():  %s\n' % r)
             return not r
 
-    memoizer_counters.append(SCons.Memoize.CountValue('rfile'))
-
+    @SCons.Memoize.CountMethodCall
     def rfile(self):
         try:
             return self._memo['rfile']
@@ -3089,25 +3379,50 @@ class File(Base):
             self.cachedir_csig = self.get_csig()
         return self.cachedir_csig
 
+    def get_contents_sig(self):
+        """
+        A helper method for get_cachedir_bsig.
+
+        It computes and returns the signature for this
+        node's contents.
+        """
+        
+        try:
+            return self.contentsig
+        except AttributeError:
+            pass
+        
+        executor = self.get_executor()
+
+        result = self.contentsig = SCons.Util.MD5signature(executor.get_contents())
+        return result
+
     def get_cachedir_bsig(self):
+        """
+        Return the signature for a cached file, including
+        its children.
+
+        It adds the path of the cached file to the cache signature,
+        because multiple targets built by the same action will all
+        have the same build signature, and we have to differentiate
+        them somehow.
+        """
         try:
             return self.cachesig
         except AttributeError:
             pass
-
-        # Add the path to the cache signature, because multiple
-        # targets built by the same action will all have the same
-        # build signature, and we have to differentiate them somehow.
+        
+        # Collect signatures for all children
         children = self.children()
-        executor = self.get_executor()
-        # sigs = [n.get_cachedir_csig() for n in children]
         sigs = [n.get_cachedir_csig() for n in children]
-        sigs.append(SCons.Util.MD5signature(executor.get_contents()))
-        sigs.append(self.path)
+        # Append this node's signature...
+        sigs.append(self.get_contents_sig())
+        # ...and it's path
+        sigs.append(self.get_internal_path())
+        # Merge this all into a single signature
         result = self.cachesig = SCons.Util.MD5collect(sigs)
         return result
 
-
 default_fs = None
 
 def get_default_fs():
@@ -3119,10 +3434,6 @@ def get_default_fs():
 class FileFinder(object):
     """
     """
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
-    memoizer_counters = []
 
     def __init__(self):
         self._memo = {}
@@ -3165,8 +3476,7 @@ class FileFinder(object):
     def _find_file_key(self, filename, paths, verbose=None):
         return (filename, paths)
         
-    memoizer_counters.append(SCons.Memoize.CountDict('find_file', _find_file_key))
-
+    @SCons.Memoize.CountDictCall(_find_file_key)
     def find_file(self, filename, paths, verbose=None):
         """
         find_file(str, [Dir()]) -> [nodes]
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/Python.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/Python.py
similarity index 73%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/Python.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/Python.py
index 5c302e6f750a4c0bd007ebe9c0fbe81512a782d5..b247ff6f75ee633e000dc6c1bb7f1a3c314c51ac 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/Python.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/Python.py
@@ -5,7 +5,7 @@ Python nodes.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,20 +27,54 @@ Python nodes.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Node/Python.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Node/Python.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Node
 
 class ValueNodeInfo(SCons.Node.NodeInfoBase):
-    current_version_id = 1
+    __slots__ = ('csig',)
+    current_version_id = 2
 
     field_list = ['csig']
 
     def str_to_node(self, s):
         return Value(s)
 
+    def __getstate__(self):
+        """
+        Return all fields that shall be pickled. Walk the slots in the class
+        hierarchy and add those to the state dictionary. If a '__dict__' slot is
+        available, copy all entries to the dictionary. Also include the version
+        id, which is fixed for all instances of a class.
+        """
+        state = getattr(self, '__dict__', {}).copy()
+        for obj in type(self).mro():
+            for name in getattr(obj,'__slots__',()):
+                if hasattr(self, name):
+                    state[name] = getattr(self, name)
+
+        state['_version_id'] = self.current_version_id
+        try:
+            del state['__weakref__']
+        except KeyError:
+            pass
+        
+        return state
+
+    def __setstate__(self, state):
+        """
+        Restore the attributes from a pickled state.
+        """
+        # TODO check or discard version
+        del state['_version_id']
+        for key, value in state.items():
+            if key not in ('__weakref__',):
+                setattr(self, key, value)
+
+
 class ValueBuildInfo(SCons.Node.BuildInfoBase):
-    current_version_id = 1
+    __slots__ = ()
+    current_version_id = 2
 
 class Value(SCons.Node.Node):
     """A class for Python variables, typically passed on the command line 
@@ -53,6 +87,8 @@ class Value(SCons.Node.Node):
     def __init__(self, value, built_value=None):
         SCons.Node.Node.__init__(self)
         self.value = value
+        self.changed_since_last_build = 6
+        self.store_info = 0
         if built_value is not None:
             self.built_value = built_value
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/__init__.py
similarity index 71%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/__init__.py
index 126d83c09a415280a1b4b782cc93b0615ee7e8d5..79db894cf87aa7892a5acb812e099d43f532fdb7 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Node/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Node/__init__.py
@@ -20,7 +20,7 @@ be able to depend on any other type of "thing."
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -41,12 +41,13 @@ be able to depend on any other type of "thing."
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Node/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Node/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import collections
 import copy
 from itertools import chain
 
+import SCons.Debug
 from SCons.Debug import logInstanceCreation
 import SCons.Executor
 import SCons.Memoize
@@ -54,9 +55,15 @@ import SCons.Util
 
 from SCons.Debug import Trace
 
+print_duplicate = 0
+
 def classname(obj):
     return str(obj.__class__).split('.')[-1]
 
+# Set to false if we're doing a dry run. There's more than one of these
+# little treats
+do_store_info = True
+
 # Node states
 #
 # These are in "priority" order, so that the maximum value for any
@@ -95,6 +102,238 @@ def do_nothing(node): pass
 
 Annotate = do_nothing
 
+# Gets set to 'True' if we're running in interactive mode. Is
+# currently used to release parts of a target's info during
+# clean builds and update runs (see release_target_info).
+interactive = False
+
+def is_derived_none(node):
+    raise NotImplementedError
+
+def is_derived_node(node):
+    """
+        Returns true if this node is derived (i.e. built).
+    """
+    return node.has_builder() or node.side_effect
+
+_is_derived_map = {0 : is_derived_none,
+                   1 : is_derived_node}
+
+def exists_none(node):
+    raise NotImplementedError
+
+def exists_always(node):
+    return 1
+
+def exists_base(node):
+    return node.stat() is not None
+
+def exists_entry(node):
+    """Return if the Entry exists.  Check the file system to see
+    what we should turn into first.  Assume a file if there's no
+    directory."""
+    node.disambiguate()
+    return _exists_map[node._func_exists](node)
+
+def exists_file(node):
+    # Duplicate from source path if we are set up to do this.
+    if node.duplicate and not node.is_derived() and not node.linked:
+        src = node.srcnode()
+        if src is not node:
+            # At this point, src is meant to be copied in a variant directory.
+            src = src.rfile()
+            if src.get_abspath() != node.get_abspath():
+                if src.exists():
+                    node.do_duplicate(src)
+                    # Can't return 1 here because the duplication might
+                    # not actually occur if the -n option is being used.
+                else:
+                    # The source file does not exist.  Make sure no old
+                    # copy remains in the variant directory.
+                    if print_duplicate:
+                        print "dup: no src for %s, unlinking old variant copy"%self
+                    if exists_base(node) or node.islink():
+                        node.fs.unlink(node.get_internal_path())
+                    # Return None explicitly because the Base.exists() call
+                    # above will have cached its value if the file existed.
+                    return None
+    return exists_base(node)
+
+_exists_map = {0 : exists_none,
+               1 : exists_always,
+               2 : exists_base,
+               3 : exists_entry,
+               4 : exists_file}
+
+
+def rexists_none(node):
+    raise NotImplementedError
+
+def rexists_node(node):
+    return node.exists()
+
+def rexists_base(node):
+    return node.rfile().exists()
+
+_rexists_map = {0 : rexists_none,
+                1 : rexists_node,
+                2 : rexists_base}
+
+def get_contents_none(node):
+    raise NotImplementedError
+
+def get_contents_entry(node):
+    """Fetch the contents of the entry.  Returns the exact binary
+    contents of the file."""
+    try:
+        node = node.disambiguate(must_exist=1)
+    except SCons.Errors.UserError:
+        # There was nothing on disk with which to disambiguate
+        # this entry.  Leave it as an Entry, but return a null
+        # string so calls to get_contents() in emitters and the
+        # like (e.g. in qt.py) don't have to disambiguate by hand
+        # or catch the exception.
+        return ''
+    else:
+        return _get_contents_map[node._func_get_contents](node)
+
+def get_contents_dir(node):
+    """Return content signatures and names of all our children
+    separated by new-lines. Ensure that the nodes are sorted."""
+    contents = []
+    for n in sorted(node.children(), key=lambda t: t.name):
+        contents.append('%s %s\n' % (n.get_csig(), n.name))
+    return ''.join(contents)
+
+def get_contents_file(node):    
+    if not node.rexists():
+        return ''
+    fname = node.rfile().get_abspath()
+    try:
+        contents = open(fname, "rb").read()
+    except EnvironmentError, e:
+        if not e.filename:
+            e.filename = fname
+        raise
+    return contents
+
+_get_contents_map = {0 : get_contents_none,
+                     1 : get_contents_entry,
+                     2 : get_contents_dir,
+                     3 : get_contents_file}
+
+def target_from_source_none(node, prefix, suffix, splitext):
+    raise NotImplementedError
+
+def target_from_source_base(node, prefix, suffix, splitext):
+    return node.dir.Entry(prefix + splitext(node.name)[0] + suffix)
+
+_target_from_source_map = {0 : target_from_source_none,
+                           1 : target_from_source_base}
+
+#
+# The new decider subsystem for Nodes
+#
+# We would set and overwrite the changed_since_last_build function
+# before, but for being able to use slots (less memory!) we now have
+# a dictionary of the different decider functions. Then in the Node
+# subclasses we simply store the index to the decider that should be
+# used by it.
+#
+
+#
+# First, the single decider functions
+#
+def changed_since_last_build_node(node, target, prev_ni):
+    """
+
+    Must be overridden in a specific subclass to return True if this
+    Node (a dependency) has changed since the last time it was used
+    to build the specified target.  prev_ni is this Node's state (for
+    example, its file timestamp, length, maybe content signature)
+    as of the last time the target was built.
+
+    Note that this method is called through the dependency, not the
+    target, because a dependency Node must be able to use its own
+    logic to decide if it changed.  For example, File Nodes need to
+    obey if we're configured to use timestamps, but Python Value Nodes
+    never use timestamps and always use the content.  If this method
+    were called through the target, then each Node's implementation
+    of this method would have to have more complicated logic to
+    handle all the different Node types on which it might depend.
+    """
+    raise NotImplementedError
+
+def changed_since_last_build_alias(node, target, prev_ni):
+    cur_csig = node.get_csig()
+    try:
+        return cur_csig != prev_ni.csig
+    except AttributeError:
+        return 1
+
+def changed_since_last_build_entry(node, target, prev_ni):
+    node.disambiguate()
+    return _decider_map[node.changed_since_last_build](node, target, prev_ni)
+
+def changed_since_last_build_state_changed(node, target, prev_ni):
+    return (node.state != SCons.Node.up_to_date)
+
+def decide_source(node, target, prev_ni):
+    return target.get_build_env().decide_source(node, target, prev_ni)
+
+def decide_target(node, target, prev_ni):
+    return target.get_build_env().decide_target(node, target, prev_ni)
+
+def changed_since_last_build_python(node, target, prev_ni):
+    cur_csig = node.get_csig()
+    try:
+        return cur_csig != prev_ni.csig
+    except AttributeError:
+        return 1
+
+
+#
+# Now, the mapping from indices to decider functions
+#
+_decider_map = {0 : changed_since_last_build_node,
+               1 : changed_since_last_build_alias,
+               2 : changed_since_last_build_entry,
+               3 : changed_since_last_build_state_changed,
+               4 : decide_source,
+               5 : decide_target,
+               6 : changed_since_last_build_python}
+
+do_store_info = True
+
+#
+# The new store_info subsystem for Nodes
+#
+# We would set and overwrite the store_info function
+# before, but for being able to use slots (less memory!) we now have
+# a dictionary of the different functions. Then in the Node
+# subclasses we simply store the index to the info method that should be
+# used by it.
+#
+
+#
+# First, the single info functions
+#
+
+def store_info_pass(node):
+    pass
+
+def store_info_file(node):
+    # Merge our build information into the already-stored entry.
+    # This accommodates "chained builds" where a file that's a target
+    # in one build (SConstruct file) is a source in a different build.
+    # See test/chained-build.py for the use case.
+    if do_store_info:
+        node.dir.sconsign().store_info(node.name, node)
+
+
+store_info_map = {0 : store_info_pass,
+                  1 : store_info_file}
+
 # Classes for signature info for Nodes.
 
 class NodeInfoBase(object):
@@ -104,11 +343,8 @@ class NodeInfoBase(object):
     Node subclasses should subclass NodeInfoBase to provide their own
     logic for dealing with their own Node-specific signature information.
     """
-    current_version_id = 1
-    def __init__(self, node=None):
-        # Create an object attribute from the class attribute so it ends up
-        # in the pickled data in the .sconsign file.
-        self._version_id = self.current_version_id
+    __slots__ = ('__weakref__',)
+    current_version_id = 2
     def update(self, node):
         try:
             field_list = self.field_list
@@ -128,13 +364,25 @@ class NodeInfoBase(object):
     def convert(self, node, val):
         pass
     def merge(self, other):
-        self.__dict__.update(other.__dict__)
+        """
+        Merge the fields of another object into this object. Already existing
+        information is overwritten by the other instance's data.
+        WARNING: If a '__dict__' slot is added, it should be updated instead of
+        replaced.
+        """
+        state = other.__getstate__()
+        self.__setstate__(state)
     def format(self, field_list=None, names=0):
         if field_list is None:
             try:
                 field_list = self.field_list
             except AttributeError:
-                field_list = sorted(self.__dict__.keys())
+                field_list = getattr(self, '__dict__', {}).keys()
+                for obj in type(self).mro():
+                    for slot in getattr(obj, '__slots__', ()):
+                        if slot not in ('__weakref__', '__dict__'):
+                            field_list.append(slot)
+                field_list.sort()
         fields = []
         for field in field_list:
             try:
@@ -147,6 +395,38 @@ class NodeInfoBase(object):
             fields.append(f)
         return fields
 
+    def __getstate__(self):
+        """
+        Return all fields that shall be pickled. Walk the slots in the class
+        hierarchy and add those to the state dictionary. If a '__dict__' slot is
+        available, copy all entries to the dictionary. Also include the version
+        id, which is fixed for all instances of a class.
+        """
+        state = getattr(self, '__dict__', {}).copy()
+        for obj in type(self).mro():
+            for name in getattr(obj,'__slots__',()):
+                if hasattr(self, name):
+                    state[name] = getattr(self, name)
+    
+        state['_version_id'] = self.current_version_id
+        try:
+            del state['__weakref__']
+        except KeyError:
+            pass
+        return state
+    
+    def __setstate__(self, state):
+        """
+        Restore the attributes from a pickled state. The version is discarded.
+        """
+        # TODO check or discard version
+        del state['_version_id']
+    
+        for key, value in state.items():
+            if key not in ('__weakref__',):
+                setattr(self, key, value)
+
+
 class BuildInfoBase(object):
     """
     The generic base class for build information for a Node.
@@ -157,33 +437,109 @@ class BuildInfoBase(object):
     generic build stuff we have to track:  sources, explicit dependencies,
     implicit dependencies, and action information.
     """
-    current_version_id = 1
-    def __init__(self, node=None):
+    __slots__ = ("bsourcesigs", "bdependsigs", "bimplicitsigs", "bactsig",
+                 "bsources", "bdepends", "bact", "bimplicit", "__weakref__")
+    current_version_id = 2
+    def __init__(self):
         # Create an object attribute from the class attribute so it ends up
         # in the pickled data in the .sconsign file.
-        self._version_id = self.current_version_id
         self.bsourcesigs = []
         self.bdependsigs = []
         self.bimplicitsigs = []
         self.bactsig = None
     def merge(self, other):
-        self.__dict__.update(other.__dict__)
+        """
+        Merge the fields of another object into this object. Already existing
+        information is overwritten by the other instance's data.
+        WARNING: If a '__dict__' slot is added, it should be updated instead of
+        replaced.
+        """
+        state = other.__getstate__()
+        self.__setstate__(state)
+ 
+    def __getstate__(self):
+        """
+        Return all fields that shall be pickled. Walk the slots in the class
+        hierarchy and add those to the state dictionary. If a '__dict__' slot is
+        available, copy all entries to the dictionary. Also include the version
+        id, which is fixed for all instances of a class.
+        """
+        state = getattr(self, '__dict__', {}).copy()
+        for obj in type(self).mro():
+            for name in getattr(obj,'__slots__',()):
+                if hasattr(self, name):
+                    state[name] = getattr(self, name)
+
+        state['_version_id'] = self.current_version_id
+        try:
+            del state['__weakref__']
+        except KeyError:
+            pass
+        return state
+
+    def __setstate__(self, state):
+        """
+        Restore the attributes from a pickled state.
+        """
+        # TODO check or discard version
+        del state['_version_id']
+        for key, value in state.items():
+            if key not in ('__weakref__',):
+                setattr(self, key, value)
 
 class Node(object):
     """The base Node class, for entities that we know how to
     build, or use to build other Nodes.
     """
 
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
-    memoizer_counters = []
+    __slots__ = ['sources',
+                 'sources_set',
+                 '_specific_sources',
+                 'depends',
+                 'depends_set',
+                 'ignore',
+                 'ignore_set',
+                 'prerequisites',
+                 'implicit',
+                 'waiting_parents',
+                 'waiting_s_e',
+                 'ref_count',
+                 'wkids',
+                 'env',
+                 'state',
+                 'precious',
+                 'noclean',
+                 'nocache',
+                 'cached',
+                 'always_build',
+                 'includes',
+                 'attributes',
+                 'side_effect',
+                 'side_effects',
+                 'linked',
+                 '_memo',
+                 'executor',
+                 'binfo',
+                 'ninfo',
+                 'builder',
+                 'is_explicit',
+                 'implicit_set',
+                 'changed_since_last_build',
+                 'store_info',
+                 'pseudo',
+                 '_tags',
+                 '_func_is_derived',
+                 '_func_exists',
+                 '_func_rexists',
+                 '_func_get_contents',
+                 '_func_target_from_source']
 
     class Attrs(object):
-        pass
+        __slots__ = ('shared', '__dict__')
+ 
 
     def __init__(self):
-        if __debug__: logInstanceCreation(self, 'Node.Node')
+        if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.Node')
         # Note that we no longer explicitly initialize a self.builder
         # attribute to None here.  That's because the self.builder
         # attribute may be created on-the-fly later by a subclass (the
@@ -204,7 +560,7 @@ class Node(object):
         self.depends_set = set()
         self.ignore = []        # dependencies to ignore
         self.ignore_set = set()
-        self.prerequisites = SCons.Util.UniqueList()
+        self.prerequisites = None
         self.implicit = None    # implicit (scanned) dependencies (None means not scanned yet)
         self.waiting_parents = set()
         self.waiting_s_e = set()
@@ -214,6 +570,7 @@ class Node(object):
         self.env = None
         self.state = no_state
         self.precious = None
+        self.pseudo = False
         self.noclean = 0
         self.nocache = 0
         self.cached = 0 # is this node pulled from cache?
@@ -223,7 +580,15 @@ class Node(object):
         self.side_effect = 0 # true iff this node is a side effect
         self.side_effects = [] # the side effects of building this target
         self.linked = 0 # is this node linked to the variant directory?
-
+        self.changed_since_last_build = 0
+        self.store_info = 0
+        self._tags = None
+        self._func_is_derived = 1
+        self._func_exists = 1
+        self._func_rexists = 1
+        self._func_get_contents = 0
+        self._func_target_from_source = 0
+        
         self.clear_memoized_values()
 
         # Let the interface in which the build engine is embedded
@@ -237,8 +602,7 @@ class Node(object):
     def get_suffix(self):
         return ''
 
-    memoizer_counters.append(SCons.Memoize.CountValue('get_build_env'))
-
+    @SCons.Memoize.CountMethodCall
     def get_build_env(self):
         """Fetch the appropriate Environment to build this node.
         """
@@ -286,7 +650,8 @@ class Node(object):
         except AttributeError:
             pass
         else:
-            executor.cleanup()
+            if executor is not None:
+                executor.cleanup()
 
     def reset_executor(self):
         "Remove cached executor; forces recompute when needed."
@@ -346,10 +711,11 @@ class Node(object):
         methods should call this base class method to get the child
         check and the BuildInfo structure.
         """
-        for d in self.depends:
-            if d.missing():
-                msg = "Explicit dependency `%s' not found, needed by target `%s'."
-                raise SCons.Errors.StopError(msg % (d, self))
+        if self.depends is not None:
+            for d in self.depends:
+                if d.missing():
+                    msg = "Explicit dependency `%s' not found, needed by target `%s'."
+                    raise SCons.Errors.StopError(msg % (d, self))
         if self.implicit is not None:
             for i in self.implicit:
                 if i.missing():
@@ -385,6 +751,13 @@ class Node(object):
 
         self.clear()
 
+        if self.pseudo:
+            if self.exists():
+                raise SCons.Errors.UserError("Pseudo target " + str(self) + " must not exist")
+        else:
+            if not self.exists() and do_store_info:
+                SCons.Warnings.warn(SCons.Warnings.TargetNotBuiltWarning,
+                                    "Cannot find target " + str(self) + " after building")
         self.ninfo.update(self)
 
     def visited(self):
@@ -398,7 +771,24 @@ class Node(object):
             pass
         else:
             self.ninfo.update(self)
-            self.store_info()
+            SCons.Node.store_info_map[self.store_info](self)
+
+    def release_target_info(self):
+        """Called just after this node has been marked
+         up-to-date or was built completely.
+         
+         This is where we try to release as many target node infos
+         as possible for clean builds and update runs, in order
+         to minimize the overall memory consumption.
+         
+         By purging attributes that aren't needed any longer after
+         a Node (=File) got built, we don't have to care that much how
+         many KBytes a Node actually requires...as long as we free
+         the memory shortly afterwards.
+         
+         @see: built() and File.release_target_info()
+         """
+        pass
 
     #
     #
@@ -501,7 +891,7 @@ class Node(object):
 
     def is_derived(self):
         """
-        Returns true iff this node is derived (i.e. built).
+        Returns true if this node is derived (i.e. built).
 
         This should return true only for nodes whose path should be in
         the variant directory when duplicate=0 and should contribute their build
@@ -509,7 +899,7 @@ class Node(object):
         example: source with source builders are not derived in this sense,
         and hence should not return true.
         """
-        return self.has_builder() or self.side_effect
+        return _is_derived_map[self._func_is_derived](self)
 
     def alter_targets(self):
         """Return a list of alternate targets for this Node.
@@ -669,7 +1059,7 @@ class Node(object):
     BuildInfo = BuildInfoBase
 
     def new_ninfo(self):
-        ninfo = self.NodeInfo(self)
+        ninfo = self.NodeInfo()
         return ninfo
 
     def get_ninfo(self):
@@ -680,7 +1070,7 @@ class Node(object):
             return self.ninfo
 
     def new_binfo(self):
-        binfo = self.BuildInfo(self)
+        binfo = self.BuildInfo()
         return binfo
 
     def get_binfo(self):
@@ -765,14 +1155,6 @@ class Node(object):
     def get_cachedir_csig(self):
         return self.get_csig()
 
-    def store_info(self):
-        """Make the build signature permanent (that is, store it in the
-        .sconsign file or equivalent)."""
-        pass
-
-    def do_not_store_info(self):
-        pass
-
     def get_stored_info(self):
         return None
 
@@ -788,6 +1170,10 @@ class Node(object):
         """Set the Node's precious value."""
         self.precious = precious
 
+    def set_pseudo(self, pseudo = True):
+        """Set the Node's precious value."""
+        self.pseudo = pseudo
+
     def set_noclean(self, noclean = 1):
         """Set the Node's noclean value."""
         # Make sure noclean is an integer so the --debug=stree
@@ -806,13 +1192,16 @@ class Node(object):
 
     def exists(self):
         """Does this node exists?"""
-        # All node exist by default:
-        return 1
+        return _exists_map[self._func_exists](self)
 
     def rexists(self):
         """Does this node exist locally or in a repositiory?"""
         # There are no repositories by default:
-        return self.exists()
+        return _rexists_map[self._func_rexists](self)
+
+    def get_contents(self):
+        """Fetch the contents of the entry."""
+        return _get_contents_map[self._func_get_contents](self)
 
     def missing(self):
         return not self.is_derived() and \
@@ -837,6 +1226,8 @@ class Node(object):
 
     def add_prerequisite(self, prerequisite):
         """Adds prerequisites"""
+        if self.prerequisites is None:
+            self.prerequisites = SCons.Util.UniqueList()
         self.prerequisites.extend(prerequisite)
         self._children_reset()
 
@@ -898,11 +1289,10 @@ class Node(object):
         # build info that it's cached so we can re-calculate it.
         self.executor_cleanup()
 
-    memoizer_counters.append(SCons.Memoize.CountValue('_children_get'))
-
+    @SCons.Memoize.CountMethodCall
     def _children_get(self):
         try:
-            return self._memo['children_get']
+            return self._memo['_children_get']
         except KeyError:
             pass
 
@@ -924,22 +1314,16 @@ class Node(object):
         # dictionary patterns I found all ended up using "not in"
         # internally anyway...)
         if self.ignore_set:
-            if self.implicit is None:
-                iter = chain(self.sources,self.depends)
-            else:
-                iter = chain(self.sources, self.depends, self.implicit)
+            iter = chain.from_iterable(filter(None, [self.sources, self.depends, self.implicit]))
 
             children = []
             for i in iter:
                 if i not in self.ignore_set:
                     children.append(i)
         else:
-            if self.implicit is None:
-                children = self.sources + self.depends
-            else:
-                children = self.sources + self.depends + self.implicit
+            children = self.all_children(scan=0)
 
-        self._memo['children_get'] = children
+        self._memo['_children_get'] = children
         return children
 
     def all_children(self, scan=1):
@@ -964,10 +1348,7 @@ class Node(object):
         # using dictionary keys, lose the order, and the only ordered
         # dictionary patterns I found all ended up using "not in"
         # internally anyway...)
-        if self.implicit is None:
-            return self.sources + self.depends
-        else:
-            return self.sources + self.depends + self.implicit
+        return list(chain.from_iterable(filter(None, [self.sources, self.depends, self.implicit])))
 
     def children(self, scan=1):
         """Return a list of the node's direct children, minus those
@@ -982,9 +1363,6 @@ class Node(object):
     def get_state(self):
         return self.state
 
-    def state_has_changed(self, target, prev_ni):
-        return (self.state != SCons.Node.up_to_date)
-
     def get_env(self):
         env = self.env
         if not env:
@@ -992,30 +1370,30 @@ class Node(object):
             env = SCons.Defaults.DefaultEnvironment()
         return env
 
-    def changed_since_last_build(self, target, prev_ni):
-        """
-
-        Must be overridden in a specific subclass to return True if this
-        Node (a dependency) has changed since the last time it was used
-        to build the specified target.  prev_ni is this Node's state (for
-        example, its file timestamp, length, maybe content signature)
-        as of the last time the target was built.
-
-        Note that this method is called through the dependency, not the
-        target, because a dependency Node must be able to use its own
-        logic to decide if it changed.  For example, File Nodes need to
-        obey if we're configured to use timestamps, but Python Value Nodes
-        never use timestamps and always use the content.  If this method
-        were called through the target, then each Node's implementation
-        of this method would have to have more complicated logic to
-        handle all the different Node types on which it might depend.
-        """
-        raise NotImplementedError
-
     def Decider(self, function):
-        SCons.Util.AddMethod(self, function, 'changed_since_last_build')
+        foundkey = None
+        for k, v in _decider_map.iteritems():
+            if v == function:
+                foundkey = k
+                break
+        if not foundkey:
+            foundkey = len(_decider_map)
+            _decider_map[foundkey] = function
+        self.changed_since_last_build = foundkey
+
+    def Tag(self, key, value):
+        """ Add a user-defined tag. """
+        if not self._tags:
+            self._tags = {}
+        self._tags[key] = value
+
+    def GetTag(self, key):
+        """ Return a user-defined tag. """
+        if not self._tags:
+            return None
+        return self._tags.get(key, None)
 
-    def changed(self, node=None):
+    def changed(self, node=None, allowcache=False):
         """
         Returns if the node is up-to-date with respect to the BuildInfo
         stored last time it was built.  The default behavior is to compare
@@ -1028,6 +1406,15 @@ class Node(object):
         any difference, but we now rely on checking every dependency
         to make sure that any necessary Node information (for example,
         the content signature of an #included .h file) is updated.
+        
+        The allowcache option was added for supporting the early
+        release of the executor/builder structures, right after
+        a File target was built. When set to true, the return
+        value of this changed method gets cached for File nodes.
+        Like this, the executor isn't needed any longer for subsequent
+        calls to changed().
+        
+        @see: FS.File.changed(), FS.File.release_target_info()
         """
         t = 0
         if t: Trace('changed(%s [%s], %s)' % (self, classname(self), node))
@@ -1052,7 +1439,7 @@ class Node(object):
             result = True
 
         for child, prev_ni in zip(children, then):
-            if child.changed_since_last_build(self, prev_ni):
+            if _decider_map[child.changed_since_last_build](child, self, prev_ni):
                 if t: Trace(': %s changed' % child)
                 result = True
 
@@ -1103,17 +1490,18 @@ class Node(object):
         Return a text representation, suitable for displaying to the
         user, of the include tree for the sources of this node.
         """
-        if self.is_derived() and self.env:
+        if self.is_derived():
             env = self.get_build_env()
-            for s in self.sources:
-                scanner = self.get_source_scanner(s)
-                if scanner:
-                    path = self.get_build_scanner_path(scanner)
-                else:
-                    path = None
-                def f(node, env=env, scanner=scanner, path=path):
-                    return node.get_found_includes(env, scanner, path)
-                return SCons.Util.render_tree(s, f, 1)
+            if env:
+                for s in self.sources:
+                    scanner = self.get_source_scanner(s)
+                    if scanner:
+                        path = self.get_build_scanner_path(scanner)
+                    else:
+                        path = None
+                    def f(node, env=env, scanner=scanner, path=path):
+                        return node.get_found_includes(env, scanner, path)
+                    return SCons.Util.render_tree(s, f, 1)
         else:
             return None
 
@@ -1222,7 +1610,7 @@ class Node(object):
         for k in new_bkids:
             if not k in old_bkids:
                 lines.append("`%s' is a new dependency\n" % stringify(k))
-            elif k.changed_since_last_build(self, osig[k]):
+            elif _decider_map[k.changed_since_last_build](k, self, osig[k]):
                 lines.append("`%s' changed\n" % stringify(k))
 
         if len(lines) == 0 and old_bkids != new_bkids:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/BoolOption.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/BoolOption.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/BoolOption.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/BoolOption.py
index be2de6ce74e276ea8ec5bcbe96c878f362dec0d5..c8d901f53a9522a315390eb215decd1b7187c564 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/BoolOption.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/BoolOption.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Options/BoolOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Options/BoolOption.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Options module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/EnumOption.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/EnumOption.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/EnumOption.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/EnumOption.py
index b7aa8530e23496fbd16c1ca56c97d49cd3d407b1..58b99ef8192973f7e4e4cec02911afaf21416d38 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/EnumOption.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/EnumOption.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Options/EnumOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Options/EnumOption.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Options module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/ListOption.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/ListOption.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/ListOption.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/ListOption.py
index ba4c4a98a0ce7a75077148f934c207eefcdc400b..00c93d9453841898bbd1fa1092b247c80e2ad309 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/ListOption.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/ListOption.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Options/ListOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Options/ListOption.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Options module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/PackageOption.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/PackageOption.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/PackageOption.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/PackageOption.py
index d65564077c9124e728cf0066f5c183a07d26c0bf..56624f0aabb6adcdab3e1eb62b380b049989557d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/PackageOption.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/PackageOption.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Options/PackageOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Options/PackageOption.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Options module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/PathOption.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/PathOption.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/PathOption.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/PathOption.py
index e7de97f89da6bb89c7b684d49050685ab3ade433..a4b81ecf58c95a1d17510597e2abfc8bdcf41ddb 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/PathOption.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/PathOption.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Options/PathOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Options/PathOption.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Options module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/__init__.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/__init__.py
index 62edfa9005c5c53f126fe20889c0189f20c69889..50997120e24d2ae4f5d8fd91b5e95ceeb7ed9ae6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Options/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Options/__init__.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Options/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Options/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Options module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/PathList.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/PathList.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/PathList.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/PathList.py
index 9a4145331e721312cf615ccba71cc1f26192733c..b3591445c395d5f55183f9286fa6a81cf19d1d41 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/PathList.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/PathList.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/PathList.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/PathList.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """SCons.PathList
 
@@ -131,12 +131,14 @@ class _PathList(object):
                 value = env.subst(value, target=target, source=source,
                                   conv=node_conv)
                 if SCons.Util.is_Sequence(value):
-                    result.extend(value)
-                    continue
-                    
+                    result.extend(SCons.Util.flatten(value))
+                elif value:
+                    result.append(value)
             elif type == TYPE_OBJECT:
                 value = node_conv(value)
-            if value:
+                if value:
+                    result.append(value)
+            elif value:
                 result.append(value)
         return tuple(result)
 
@@ -169,11 +171,6 @@ class PathListCache(object):
     cheaply avoid re-parsing both values of CPPPATH by using the
     common value from this cache.
     """
-    if SCons.Memoize.use_memoizer:
-        __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
-    memoizer_counters = []
-
     def __init__(self):
         self._memo = {}
 
@@ -194,8 +191,7 @@ class PathListCache(object):
             pathlist = tuple(SCons.Util.flatten(pathlist))
         return pathlist
 
-    memoizer_counters.append(SCons.Memoize.CountDict('PathList', _PathList_key))
-
+    @SCons.Memoize.CountDictCall(_PathList_key)
     def PathList(self, pathlist):
         """
         Returns the cached _PathList object for the specified pathlist,
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/__init__.py
similarity index 84%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/__init__.py
index 2cab3c8653d052f39763b3dd149d9fef74a1288f..ca4bc9be9a87c26b1d66444e3c2678c37590be72 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/__init__.py
@@ -20,7 +20,7 @@ their own platform definition.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -42,7 +42,7 @@ their own platform definition.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.compat
 
@@ -139,7 +139,7 @@ class TempFileMunge(object):
 
     Example usage:
     env["TEMPFILE"] = TempFileMunge
-    env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES')}"
+    env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES','$LINKCOMSTR')}"
 
     By default, the name of the temporary file used begins with a
     prefix of '@'.  This may be configred for other tool chains by
@@ -148,8 +148,9 @@ class TempFileMunge(object):
     env["TEMPFILEPREFIX"] = '-@'        # diab compiler
     env["TEMPFILEPREFIX"] = '-via'      # arm tool chain
     """
-    def __init__(self, cmd):
+    def __init__(self, cmd, cmdstr = None):
         self.cmd = cmd
+        self.cmdstr = cmdstr
 
     def __call__(self, target, source, env, for_signature):
         if for_signature:
@@ -173,9 +174,18 @@ class TempFileMunge(object):
         length = 0
         for c in cmd:
             length += len(c)
+        length += len(cmd) - 1
         if length <= maxline:
             return self.cmd
 
+        # Check if we already created the temporary file for this target
+        # It should have been previously done by Action.strfunction() call
+        node = target[0] if SCons.Util.is_List(target) else target
+        cmdlist = getattr(node.attributes, 'tempfile_cmdlist', None) \
+                    if node is not None else None
+        if cmdlist is not None : 
+            return cmdlist
+        
         # We do a normpath because mktemp() has what appears to be
         # a bug in Windows that will use a forward slash as a path
         # delimiter.  Windows's link mistakes that for a command line
@@ -187,7 +197,7 @@ class TempFileMunge(object):
         (fd, tmp) = tempfile.mkstemp('.lnk', text=True)
         native_tmp = SCons.Util.get_native_path(os.path.normpath(tmp))
 
-        if env['SHELL'] and env['SHELL'] == 'sh':
+        if env.get('SHELL',None) == 'sh':
             # The sh shell will try to escape the backslashes in the
             # path, so unescape them.
             native_tmp = native_tmp.replace('\\', r'\\\\')
@@ -223,9 +233,22 @@ class TempFileMunge(object):
         # purity get in the way of just being helpful, so we'll
         # reach into SCons.Action directly.
         if SCons.Action.print_actions:
-            print("Using tempfile "+native_tmp+" for command line:\n"+
-                  str(cmd[0]) + " " + " ".join(args))
-        return [ cmd[0], prefix + native_tmp + '\n' + rm, native_tmp ]
+            cmdstr = env.subst(self.cmdstr, SCons.Subst.SUBST_RAW, target, 
+                               source) if self.cmdstr is not None else ''
+            # Print our message only if XXXCOMSTR returns an empty string
+            if len(cmdstr) == 0 :
+                print("Using tempfile "+native_tmp+" for command line:\n"+
+                      str(cmd[0]) + " " + " ".join(args))
+            
+        # Store the temporary file command list into the target Node.attributes 
+        # to avoid creating two temporary files one for print and one for execute.
+        cmdlist = [ cmd[0], prefix + native_tmp + '\n' + rm, native_tmp ]
+        if node is not None:
+            try :
+                setattr(node.attributes, 'tempfile_cmdlist', cmdlist)
+            except AttributeError:
+                pass
+        return cmdlist
     
 def Platform(name = platform_default()):
     """Select a canned Platform specification.
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/aix.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/aix.py
similarity index 58%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/aix.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/aix.py
index df3ee4044210d0808a303473ce9cd3305ce6391d..44bccd1cb0c87b255e4fd0a622c0f34767671ce2 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/aix.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/aix.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,13 +30,17 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/aix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/aix.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
+import subprocess
 
 import posix
 
-def get_xlc(env, xlc=None, xlc_r=None, packages=[]):
+import SCons.Util
+import SCons.Action
+
+def get_xlc(env, xlc=None, packages=[]):
     # Use the AIX package installer tool lslpp to figure out where a
     # given xl* compiler is installed and what version it is.
     xlcPath = None
@@ -44,18 +48,30 @@ def get_xlc(env, xlc=None, xlc_r=None, packages=[]):
 
     if xlc is None:
         xlc = env.get('CC', 'xlc')
-    if xlc_r is None:
-        xlc_r = xlc + '_r'
+    if SCons.Util.is_List(xlc):
+        xlc = xlc[0]
     for package in packages:
-        cmd = "lslpp -fc " + package + " 2>/dev/null | egrep '" + xlc + "([^-_a-zA-Z0-9].*)?$'"
-        line = os.popen(cmd).readline()
-        if line:
-            v, p = line.split(':')[1:3]
-            xlcVersion = v.split()[1]
-            xlcPath = p.split()[0]
-            xlcPath = xlcPath[:xlcPath.rindex('/')]
-            break
-    return (xlcPath, xlc, xlc_r, xlcVersion)
+        # find the installed filename, which may be a symlink as well
+        pipe = SCons.Action._subproc(env, ['lslpp', '-fc', package],
+                stdin = 'devnull',
+                stderr = 'devnull',
+                stdout = subprocess.PIPE)
+        # output of lslpp is something like this:
+        #     #Path:Fileset:File
+        #     /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/exe/xlCcpp
+        #     /usr/lib/objrepos:vac.C 6.0.0.0:/usr/vac/bin/xlc_r -> /usr/vac/bin/xlc
+        for line in pipe.stdout:
+            if xlcPath:
+                continue # read everything to let lslpp terminate
+            fileset, filename = line.split(':')[1:3]
+            filename = filename.split()[0]
+            if ('/' in xlc and filename == xlc) \
+            or ('/' not in xlc and filename.endswith('/' + xlc)):
+                xlcVersion = fileset.split()[1]
+                xlcPath, sep, xlc = filename.rpartition('/')
+            pass
+        pass
+    return (xlcPath, xlc, xlcVersion)
 
 def generate(env):
     posix.generate(env)
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/cygwin.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/cygwin.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/cygwin.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/cygwin.py
index 31d822b9641bd8d2ff0c4c665effddf87c13f0d8..d04bbe7ae50763bd473db4c0e1fbe93fee3f7ab2 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/cygwin.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/cygwin.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/cygwin.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/cygwin.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import posix
 from SCons.Platform import TempFileMunge
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/darwin.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/darwin.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/darwin.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/darwin.py
index 907ec45d1aeee73e85fc7d5a0c9a862f1c7d35f7..efd8ba4d65b67436946dc142d279864f9babdba0 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/darwin.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/darwin.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/darwin.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/darwin.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import posix
 import os
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/hpux.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/hpux.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/hpux.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/hpux.py
index 2312439a8d67d715bacae6d2cc4b76c54c1bb13a..2e2fbca46b2d8a01ab2c67d504d32949313c6f28 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/hpux.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/hpux.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/hpux.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/hpux.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import posix
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/irix.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/irix.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/irix.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/irix.py
index f0b089a86ed20f79cd448284109981ec4ee05a16..3bedbdf1993f63b1f0dca1d12551c9e3b60a6549 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/irix.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/irix.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/irix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/irix.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import posix
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/os2.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/os2.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/os2.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/os2.py
index 0576abdd65a45161009dbbfa755e5226734bee3c..82eb1635b0897ca61aad5549a4d8255208ec8bd9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/os2.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/os2.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/os2.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/os2.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 import win32
 
 def generate(env):
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/posix.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/posix.py
new file mode 100644
index 0000000000000000000000000000000000000000..84458637d2b2479eec9f004b8f110090fc55970c
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/posix.py
@@ -0,0 +1,124 @@
+"""SCons.Platform.posix
+
+Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems.
+
+There normally shouldn't be any need to import this module directly.  It
+will usually be imported through the generic SCons.Platform.Platform()
+selection method.
+"""
+
+#
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Platform/posix.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+import errno
+import os
+import os.path
+import subprocess
+import sys
+import select
+
+import SCons.Util
+from SCons.Platform import TempFileMunge
+
+exitvalmap = {
+    2 : 127,
+    13 : 126,
+}
+
+def escape(arg):
+    "escape shell special characters"
+    slash = '\\'
+    special = '"$()'
+
+    arg = arg.replace(slash, slash+slash)
+    for c in special:
+        arg = arg.replace(c, slash+c)
+
+    return '"' + arg + '"'
+
+def exec_subprocess(l, env):
+    proc = subprocess.Popen(l, env = env, close_fds = True)
+    return proc.wait()
+
+def subprocess_spawn(sh, escape, cmd, args, env):
+    return exec_subprocess([sh, '-c', ' '.join(args)], env)
+
+def exec_popen3(l, env, stdout, stderr):
+    proc = subprocess.Popen(l, env = env, close_fds = True,
+                            stdout = stdout,
+                            stderr = stderr)
+    return proc.wait()
+
+def piped_env_spawn(sh, escape, cmd, args, env, stdout, stderr):
+    # spawn using Popen3 combined with the env command
+    # the command name and the command's stdout is written to stdout
+    # the command's stderr is written to stderr
+    return exec_popen3([sh, '-c', ' '.join(args)],
+                       env, stdout, stderr)
+
+
+def generate(env):
+    # Bearing in mind we have python 2.4 as a baseline, we can just do this:
+    spawn = subprocess_spawn
+    pspawn = piped_env_spawn
+    # Note that this means that 'escape' is no longer used
+
+    if 'ENV' not in env:
+        env['ENV']        = {}
+    env['ENV']['PATH']    = '/usr/local/bin:/opt/bin:/bin:/usr/bin'
+    env['OBJPREFIX']      = ''
+    env['OBJSUFFIX']      = '.o'
+    env['SHOBJPREFIX']    = '$OBJPREFIX'
+    env['SHOBJSUFFIX']    = '$OBJSUFFIX'
+    env['PROGPREFIX']     = ''
+    env['PROGSUFFIX']     = ''
+    env['LIBPREFIX']      = 'lib'
+    env['LIBSUFFIX']      = '.a'
+    env['SHLIBPREFIX']    = '$LIBPREFIX'
+    env['SHLIBSUFFIX']    = '.so'
+    env['LIBPREFIXES']    = [ '$LIBPREFIX' ]
+    env['LIBSUFFIXES']    = [ '$LIBSUFFIX', '$SHLIBSUFFIX' ]
+    env['PSPAWN']         = pspawn
+    env['SPAWN']          = spawn
+    env['SHELL']          = 'sh'
+    env['ESCAPE']         = escape
+    env['TEMPFILE']       = TempFileMunge
+    env['TEMPFILEPREFIX'] = '@'
+    #Based on LINUX: ARG_MAX=ARG_MAX=131072 - 3000 for environment expansion
+    #Note: specific platforms might rise or lower this value
+    env['MAXLINELENGTH']  = 128072
+
+    # This platform supports RPATH specifications.
+    env['__RPATH'] = '$_RPATH'
+
+    # GDC is GCC family, but DMD and LDC have different options.
+    # Must be able to have GCC and DMD work in the same build, so:
+    env['__DRPATH'] = '$_DRPATH'
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/sunos.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/sunos.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/sunos.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/sunos.py
index 7ae60f840f99d4f3390a079e4ba6b32940a92d36..1c1d797734566b5c37959bbc6599edeb0ba3423c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/sunos.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/sunos.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/sunos.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/sunos.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import posix
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/win32.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/win32.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/win32.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/win32.py
index 2d6d970d320b29132765a081edd9b537d5e4988c..3bad86b9ecd2187e6e3d454eb92b23e6946e4422 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Platform/win32.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Platform/win32.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Platform/win32.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Platform/win32.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
@@ -81,8 +81,39 @@ else:
     builtins.file = _scons_file
     builtins.open = _scons_open
 
-
-
+try:
+    import threading
+    spawn_lock = threading.Lock()
+    
+    # This locked version of spawnve works around a Windows
+    # MSVCRT bug, because its spawnve is not thread-safe.
+    # Without this, python can randomly crash while using -jN.
+    # See the python bug at http://bugs.python.org/issue6476
+    # and SCons issue at
+    # http://scons.tigris.org/issues/show_bug.cgi?id=2449
+    def spawnve(mode, file, args, env):
+        spawn_lock.acquire()
+        try:
+            if mode == os.P_WAIT:
+                ret = os.spawnve(os.P_NOWAIT, file, args, env)
+            else:
+                ret = os.spawnve(mode, file, args, env)
+        finally:
+            spawn_lock.release()
+        if mode == os.P_WAIT:
+            pid, status = os.waitpid(ret, 0)
+            ret = status >> 8
+        return ret
+except ImportError:
+    # Use the unsafe method of spawnve.
+    # Please, don't try to optimize this try-except block
+    # away by assuming that the threading module is always present.
+    # In the test test/option-j.py we intentionally call SCons with
+    # a fake threading.py that raises an import exception right away,
+    # simulating a non-existent package.
+    def spawnve(mode, file, args, env):
+        return os.spawnve(mode, file, args, env)
+    
 # The upshot of all this is that, if you are using Python 1.5.2,
 # you had better have cmd or command.com in your PATH when you run
 # scons.
@@ -123,7 +154,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
         # actually do the spawn
         try:
             args = [sh, '/C', escape(' '.join(args)) ]
-            ret = os.spawnve(os.P_WAIT, sh, args, env)
+            ret = spawnve(os.P_WAIT, sh, args, env)
         except OSError, e:
             # catch any error
             try:
@@ -151,7 +182,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
 
 def exec_spawn(l, env):
     try:
-        result = os.spawnve(os.P_WAIT, l[0], l, env)
+        result = spawnve(os.P_WAIT, l[0], l, env)
     except OSError, e:
         try:
             result = exitvalmap[e[0]]
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/SConf.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/SConf.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/SConf.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/SConf.py
index 5c99db9d3342564cb190d5ccfec8d9255075aeba..2ef4003619f16551a0510e228a59a378fbff53b1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/SConf.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/SConf.py
@@ -1,10 +1,18 @@
 """SCons.SConf
 
 Autoconf-like configuration support.
+
+In other words, SConf allows to run tests on the build machine to detect
+capabilities of system and do some things based on result: generate config
+files, header files for C/C++, update variables in environment.
+
+Tests on the build system can detect if compiler sees header files, if
+libraries are installed, if some command line options are supported etc.
+
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +34,7 @@ Autoconf-like configuration support.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/SConf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/SConf.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.compat
 
@@ -110,16 +118,22 @@ def _createConfigH(target, source, env):
 def _stringConfigH(target, source, env):
     return "scons: Configure: creating " + str(target[0])
 
-def CreateConfigHBuilder(env):
-    """Called just before the building targets phase begins."""
+
+def NeedConfigHBuilder():
     if len(_ac_config_hs) == 0:
-        return
+       return False
+    else:
+       return True
+
+def CreateConfigHBuilder(env):
+    """Called if necessary just before the building targets phase begins."""
     action = SCons.Action.Action(_createConfigH,
                                  _stringConfigH)
     sconfigHBld = SCons.Builder.Builder(action=action)
     env.Append( BUILDERS={'SConfigHBuilder':sconfigHBld} )
     for k in _ac_config_hs.keys():
         env.SConfigHBuilder(k, env.Value(_ac_config_hs[k]))
+
     
 class SConfWarning(SCons.Warnings.Warning):
     pass
@@ -161,8 +175,11 @@ class SConfBuildInfo(SCons.Node.FS.FileBuildInfo):
     are result (did the builder succeed last time?) and string, which
     contains messages of the original build phase.
     """
-    result = None # -> 0/None -> no error, != 0 error
-    string = None # the stdout / stderr output when building the target
+    __slots__ = ('result', 'string')
+    
+    def __init__(self):
+        self.result = None # -> 0/None -> no error, != 0 error
+        self.string = None # the stdout / stderr output when building the target
 
     def set_build_result(self, result, string):
         self.result = result
@@ -180,7 +197,11 @@ class Streamer(object):
     def write(self, str):
         if self.orig:
             self.orig.write(str)
-        self.s.write(str)
+        try:
+            self.s.write(str)
+        except TypeError as e:
+            # "unicode argument expected" bug in IOStream (python 2.x)
+            self.s.write(str.decode())
 
     def writelines(self, lines):
         for l in lines:
@@ -334,8 +355,10 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask):
                 raise SCons.Errors.ExplicitExit(self.targets[0],exc_value.code)
             except Exception, e:
                 for t in self.targets:
-                    binfo = t.get_binfo()
-                    binfo.__class__ = SConfBuildInfo
+                    #binfo = t.get_binfo()
+                    #binfo.__class__ = SConfBuildInfo
+                    binfo = SConfBuildInfo()
+                    binfo.merge(t.get_binfo())
                     binfo.set_build_result(1, s.getvalue())
                     sconsign_entry = SCons.SConsign.SConsignEntry()
                     sconsign_entry.binfo = binfo
@@ -352,8 +375,10 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask):
                 raise e
             else:
                 for t in self.targets:
-                    binfo = t.get_binfo()
-                    binfo.__class__ = SConfBuildInfo
+                    #binfo = t.get_binfo()
+                    #binfo.__class__ = SConfBuildInfo
+                    binfo = SConfBuildInfo()
+                    binfo.merge(t.get_binfo())
                     binfo.set_build_result(0, s.getvalue())
                     sconsign_entry = SCons.SConsign.SConsignEntry()
                     sconsign_entry.binfo = binfo
@@ -482,7 +507,10 @@ class SConfBase(object):
         # we override the store_info() method with a null place-holder
         # so we really control how it gets written.
         for n in nodes:
-            n.store_info = n.do_not_store_info
+            n.store_info = 0
+            if not hasattr(n, 'attributes'):
+                n.attributes = SCons.Node.Node.Attrs()
+            n.attributes.keep_targetinfo = 1
 
         ret = 1
 
@@ -619,7 +647,7 @@ class SConfBase(object):
         ok = self.TryLink(text, extension)
         if( ok ):
             prog = self.lastTarget
-            pname = prog.path
+            pname = prog.get_internal_path()
             output = self.confdir.File(os.path.basename(pname)+'.out')
             node = self.env.Command(output, prog, [ [ pname, ">", "${TARGET}"] ])
             ok = self.BuildNodes(node)
@@ -663,7 +691,6 @@ class SConfBase(object):
         else:
             if not os.path.isdir( dirName ):
                 os.makedirs( dirName )
-                node._exists = 1
 
     def _startup(self):
         """Private method. Set up logstream, and set the environment
@@ -776,19 +803,16 @@ class CheckContext(object):
         self.did_show_result = 0
 
     def Result(self, res):
-        """Inform about the result of the test. res may be an integer or a
-        string. In case of an integer, the written text will be 'yes' or 'no'.
+        """Inform about the result of the test. If res is not a string, displays
+        'yes' or 'no' depending on whether res is evaluated as true or false.
         The result is only displayed when self.did_show_result is not set.
         """
-        if isinstance(res, (int, bool)):
-            if res:
-                text = "yes"
-            else:
-                text = "no"
-        elif isinstance(res, str):
+        if isinstance(res, str):
             text = res
+        elif res:
+            text = "yes"
         else:
-            raise TypeError("Expected string, int or bool, got " + str(type(res)))
+            text = "no"
 
         if self.did_show_result == 0:
             # Didn't show result yet, do it now.
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/SConsign.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/SConsign.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/SConsign.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/SConsign.py
index aa59836b9d34a8b0fff96abcebbf907c60445790..e31a3eb713e7c4eb6a2723a1dc0e14082f532308 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/SConsign.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/SConsign.py
@@ -5,7 +5,7 @@ Writing and reading information to the .sconsign file or files.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Writing and reading information to the .sconsign file or files.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/SConsign.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/SConsign.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.compat
 
@@ -122,16 +122,40 @@ class SConsignEntry(object):
     XXX As coded below, we do expect a '.binfo' attribute to be added,
     but we'll probably generalize this in the next refactorings.
     """
-    current_version_id = 1
+    __slots__ = ("binfo", "ninfo", "__weakref__")
+    current_version_id = 2
+    
     def __init__(self):
         # Create an object attribute from the class attribute so it ends up
         # in the pickled data in the .sconsign file.
-        _version_id = self.current_version_id
+        #_version_id = self.current_version_id
+        pass
+    
     def convert_to_sconsign(self):
         self.binfo.convert_to_sconsign()
+        
     def convert_from_sconsign(self, dir, name):
         self.binfo.convert_from_sconsign(dir, name)
 
+    def __getstate__(self):
+        state = getattr(self, '__dict__', {}).copy()
+        for obj in type(self).mro():
+            for name in getattr(obj,'__slots__',()):
+                if hasattr(self, name):
+                    state[name] = getattr(self, name)
+
+        state['_version_id'] = self.current_version_id
+        try:
+            del state['__weakref__']
+        except KeyError:
+            pass
+        return state
+
+    def __setstate__(self, state):
+        for key, value in state.items():
+            if key not in ('_version_id','__weakref__'):
+                setattr(self, key, value)
+        
 class Base(object):
     """
     This is the controlling class for the signatures for the collection of
@@ -202,7 +226,7 @@ class DB(Base):
         # Read using the path relative to the top of the Repository
         # (self.dir.tpath) from which we're fetching the signature
         # information.
-        path = normcase(dir.tpath)
+        path = normcase(dir.get_tpath())
         try:
             rawentries = db[path]
         except KeyError:
@@ -217,7 +241,7 @@ class DB(Base):
                 raise
             except Exception, e:
                 SCons.Warnings.warn(SCons.Warnings.CorruptSConsignWarning,
-                                    "Ignoring corrupt sconsign entry : %s (%s)\n"%(self.dir.tpath, e))
+                                    "Ignoring corrupt sconsign entry : %s (%s)\n"%(self.dir.get_tpath(), e))
             for key, entry in self.entries.items():
                 entry.convert_from_sconsign(dir, key)
 
@@ -244,7 +268,7 @@ class DB(Base):
         # directory (self.dir.path), not relative to the top of
         # the Repository; we only write to our own .sconsign file,
         # not to .sconsign files in Repositories.
-        path = normcase(self.dir.path)
+        path = normcase(self.dir.get_internal_path())
         for key, entry in self.entries.items():
             entry.convert_to_sconsign()
         db[path] = pickle.dumps(self.entries, 1)
@@ -287,7 +311,7 @@ class DirFile(Dir):
         """
 
         self.dir = dir
-        self.sconsign = os.path.join(dir.path, '.sconsign')
+        self.sconsign = os.path.join(dir.get_internal_path(), '.sconsign')
 
         try:
             fp = open(self.sconsign, 'rb')
@@ -323,7 +347,7 @@ class DirFile(Dir):
 
         self.merge()
 
-        temp = os.path.join(self.dir.path, '.scons%d' % os.getpid())
+        temp = os.path.join(self.dir.get_internal_path(), '.scons%d' % os.getpid())
         try:
             file = open(temp, 'wb')
             fname = temp
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/C.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/C.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/C.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/C.py
index 6ba7eeac16afe96564ee847fce0a1d4bbadf0661..33e1145559128eb6ca0290e31f3232c944bdf8e1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/C.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/C.py
@@ -5,7 +5,7 @@ This module implements the depenency scanner for C/C++ code.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This module implements the depenency scanner for C/C++ code.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/C.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/C.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Node.FS
 import SCons.Scanner
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/D.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/D.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/D.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/D.py
index 20ab5f0ac67e1b8860ccda6746d97b34b7800227..2c51a097414e9eb57d4c6c9e260de8ebf7c9f2f6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/D.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/D.py
@@ -8,7 +8,7 @@ Coded by Andy Friesen
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ Coded by Andy Friesen
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/D.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/D.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import re
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Dir.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Dir.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Dir.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Dir.py
index 7c199bcf3b77cb8c478a9be5f45a1f80d4a9148a..756542384df42738b9ba4abb8ef20207eae52029 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Dir.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Dir.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Scanner/Dir.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/Dir.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Node.FS
 import SCons.Scanner
@@ -77,7 +77,7 @@ def scan_on_disk(node, env, path=()):
     that and then call the in-memory scanning function.
     """
     try:
-        flist = node.fs.listdir(node.abspath)
+        flist = node.fs.listdir(node.get_abspath())
     except (IOError, OSError):
         return []
     e = node.Entry
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Fortran.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Fortran.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Fortran.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Fortran.py
index 4bb49cd7895519a5ef5f28251a92fc883ca0deda..a1f39277fb0fb95e7e9bc69215509f04bb269c47 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Fortran.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Fortran.py
@@ -5,7 +5,7 @@ This module implements the dependency scanner for Fortran code.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ This module implements the dependency scanner for Fortran code.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Scanner/Fortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/Fortran.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import re
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/IDL.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/IDL.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/IDL.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/IDL.py
index d43e0139dfd428ba9a988cff6233dfe66dc5e49e..6758bd2e3af52593b2df2a18ab98db70b18b1bb1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/IDL.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/IDL.py
@@ -6,7 +6,7 @@ Definition Language) files.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ Definition Language) files.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/IDL.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/IDL.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Node.FS
 import SCons.Scanner
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/LaTeX.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/LaTeX.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/LaTeX.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/LaTeX.py
index 4152fa2ae3ea7310266b9243ec0d575424e6149b..aed074c974918c331b1995f133fec967fd33dd94 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/LaTeX.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/LaTeX.py
@@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/LaTeX.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/LaTeX.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Prog.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Prog.py
similarity index 82%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Prog.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Prog.py
index fbdf8581e69791889547fbdd3d1a726699a518d6..c0511dcd19e3fc417ad0217199379d99ff9885c6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/Prog.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/Prog.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/Prog.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/Prog.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Node
 import SCons.Node.FS
@@ -38,6 +38,24 @@ def ProgramScanner(**kw):
     ps = SCons.Scanner.Base(scan, "ProgramScanner", **kw)
     return ps
 
+def _subst_libs(env, libs):
+    """
+    Substitute environment variables and split into list.
+    """
+    if SCons.Util.is_String(libs):
+        libs = env.subst(libs)
+        if SCons.Util.is_String(libs):
+            libs = libs.split()
+    elif SCons.Util.is_Sequence(libs):
+        _libs = []
+        for l in libs:
+            _libs += _subst_libs(env, l)
+        libs = _libs
+    else:
+        # libs is an object (Node, for example)
+        libs = [libs]
+    return libs
+
 def scan(node, env, libpath = ()):
     """
     This scanner scans program files for static-library
@@ -50,10 +68,8 @@ def scan(node, env, libpath = ()):
     except KeyError:
         # There are no LIBS in this environment, so just return a null list:
         return []
-    if SCons.Util.is_String(libs):
-        libs = libs.split()
-    else:
-        libs = SCons.Util.flatten(libs)
+
+    libs = _subst_libs(env, libs)
 
     try:
         prefix = env['LIBPREFIXES']
@@ -83,7 +99,6 @@ def scan(node, env, libpath = ()):
     adjustixes = SCons.Util.adjustixes
     for lib in libs:
         if SCons.Util.is_String(lib):
-            lib = env.subst(lib)
             for pref, suf in pairs:
                 l = adjustixes(lib, pref, suf)
                 l = find_file(l, libpath, verbose=print_find_libs)
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/RC.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/RC.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/RC.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/RC.py
index 871fdf9a04f71ea7d6b1ed7db27fd4cf2b5ae442..f73b47ee579b0f977126d2315782cb4273f210ca 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/RC.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/RC.py
@@ -6,7 +6,7 @@ Definition Language) files.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ Definition Language) files.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/RC.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/RC.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Node.FS
 import SCons.Scanner
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/__init__.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/__init__.py
index 9675e8dd5c87e831ff29eab0c2acc2e3e68dfd46..d51cb9edaf7106fc3b0f6008c319d5b807060836 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Scanner/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Scanner/__init__.py
@@ -5,7 +5,7 @@ The Scanner package for the SCons software construction utility.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Scanner/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Scanner/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import re
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/Interactive.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/Interactive.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/Interactive.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/Interactive.py
index e0822a7e3089d18f6e05499f09b2b8781aea0ec3..afcde0c3dfd5c42bd1302518c01aa824ad0f65ea 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/Interactive.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/Interactive.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Script/Interactive.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Script/Interactive.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """
 SCons interactive mode
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/Main.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/Main.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/Main.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/Main.py
index 12d1bc256b9d1e7f9adff35f35b21cee5829c06f..6684fbd0af01992d48443bcf2c7f795dea68cce9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/Main.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/Main.py
@@ -11,9 +11,9 @@ it goes here.
 """
 
 unsupported_python_version = (2, 3, 0)
-deprecated_python_version = (2, 4, 0)
+deprecated_python_version = (2, 7, 0)
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ deprecated_python_version = (2, 4, 0)
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Script/Main.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Script/Main.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.compat
 
@@ -79,7 +79,12 @@ def fetch_win32_parallel_msg():
     import SCons.Platform.win32
     return SCons.Platform.win32.parallel_msg
 
-#
+def revert_io():
+    # This call is added to revert stderr and stdout to the original
+    # ones just in case some build rule or something else in the system
+    # has redirected them elsewhere.
+    sys.stderr = sys.__stderr__
+    sys.stdout = sys.__stdout__
 
 class SConsPrintHelpException(Exception):
     pass
@@ -187,7 +192,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
             finish_time = time.time()
             last_command_end = finish_time
             cumulative_command_time = cumulative_command_time+finish_time-start_time
-            sys.stdout.write("Command execution time: %f seconds\n"%(finish_time-start_time))
+            sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time))
 
     def do_failed(self, status=2):
         _BuildFailures.append(self.exception[1])
@@ -203,13 +208,13 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
             SCons.Taskmaster.OutOfDateTask.fail_stop(self)
             exit_status = status
             this_build_status = status
-            
+
     def executed(self):
         t = self.targets[0]
         if self.top and not t.has_builder() and not t.side_effect:
             if not t.exists():
                 if t.__class__.__name__ in ('File', 'Dir', 'Entry'):
-                    errstr="Do not know how to make %s target `%s' (%s)." % (t.__class__.__name__, t, t.abspath)
+                    errstr="Do not know how to make %s target `%s' (%s)." % (t.__class__.__name__, t, t.get_abspath())
                 else: # Alias or Python or ...
                     errstr="Do not know how to make %s target `%s'." % (t.__class__.__name__, t)
                 sys.stderr.write("scons: *** " + errstr)
@@ -248,7 +253,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
             except ValueError:
                 t, e = exc_info
                 tb = None
-                
+
         # Deprecated string exceptions will have their string stored
         # in the first entry of the tuple.
         if e is None:
@@ -266,12 +271,15 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
         errfmt = "scons: *** [%s] %s\n"
         sys.stderr.write(errfmt % (nodename, buildError))
 
-        if (buildError.exc_info[2] and buildError.exc_info[1] and 
+        if (buildError.exc_info[2] and buildError.exc_info[1] and
            not isinstance(
-               buildError.exc_info[1], 
+               buildError.exc_info[1],
                (EnvironmentError, SCons.Errors.StopError,
                             SCons.Errors.UserError))):
             type, value, trace = buildError.exc_info
+            if tb and print_stacktrace:
+                sys.stderr.write("scons: internal stack trace:\n")
+                traceback.print_tb(tb, file=sys.stderr)
             traceback.print_exception(type, value, trace)
         elif tb and print_stacktrace:
             sys.stderr.write("scons: internal stack trace:\n")
@@ -304,7 +312,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
 
 class CleanTask(SCons.Taskmaster.AlwaysTask):
     """An SCons clean task."""
-    def fs_delete(self, path, pathstr, remove=1):
+    def fs_delete(self, path, pathstr, remove=True):
         try:
             if os.path.lexists(path):
                 if os.path.isfile(path) or os.path.islink(path):
@@ -331,37 +339,41 @@ class CleanTask(SCons.Taskmaster.AlwaysTask):
         except (IOError, OSError), e:
             print "scons: Could not remove '%s':" % pathstr, e.strerror
 
-    def show(self):
+    def _get_files_to_clean(self):
+        result = []
         target = self.targets[0]
-        if (target.has_builder() or target.side_effect) and not target.noclean:
-            for t in self.targets:
-                if not t.isdir():
-                    display("Removed " + str(t))
-        if target in SCons.Environment.CleanTargets:
-            files = SCons.Environment.CleanTargets[target]
-            for f in files:
-                self.fs_delete(f.abspath, str(f), 0)
+        if target.has_builder() or target.side_effect:
+            result = [t for t in self.targets if not t.noclean]
+        return result
 
-    def remove(self):
+    def _clean_targets(self, remove=True):
         target = self.targets[0]
-        if (target.has_builder() or target.side_effect) and not target.noclean:
-            for t in self.targets:
-                try:
-                    removed = t.remove()
-                except OSError, e:
-                    # An OSError may indicate something like a permissions
-                    # issue, an IOError would indicate something like
-                    # the file not existing.  In either case, print a
-                    # message and keep going to try to remove as many
-                    # targets aa possible.
-                    print "scons: Could not remove '%s':" % str(t), e.strerror
-                else:
-                    if removed:
-                        display("Removed " + str(t))
         if target in SCons.Environment.CleanTargets:
             files = SCons.Environment.CleanTargets[target]
             for f in files:
-                self.fs_delete(f.abspath, str(f))
+                self.fs_delete(f.get_abspath(), str(f), remove)
+
+    def show(self):
+        for t in self._get_files_to_clean():
+            if not t.isdir():
+                display("Removed " + str(t))
+        self._clean_targets(remove=False)
+
+    def remove(self):
+        for t in self._get_files_to_clean():
+            try:
+                removed = t.remove()
+            except OSError, e:
+                # An OSError may indicate something like a permissions
+                # issue, an IOError would indicate something like
+                # the file not existing.  In either case, print a
+                # message and keep going to try to remove as many
+                # targets aa possible.
+                print "scons: Could not remove '%s':" % str(t), e.strerror
+            else:
+                if removed:
+                    display("Removed " + str(t))
+        self._clean_targets(remove=True)
 
     execute = remove
 
@@ -546,7 +558,7 @@ def find_deepest_user_frame(tb):
     Input is a "pre-processed" stack trace in the form
     returned by traceback.extract_tb() or traceback.extract_stack()
     """
-    
+
     tb.reverse()
 
     # find the deepest traceback frame that is not part
@@ -559,7 +571,7 @@ def find_deepest_user_frame(tb):
 
 def _scons_user_error(e):
     """Handle user errors. Print out a message and a description of the
-    error, along with the line number and routine where it occured. 
+    error, along with the line number and routine where it occured.
     The file and line number will be the deepest stack frame that is
     not part of SCons itself.
     """
@@ -622,7 +634,7 @@ def _set_debug_values(options):
     debug_values = options.debug
 
     if "count" in debug_values:
-        # All of the object counts are within "if __debug__:" blocks,
+        # All of the object counts are within "if track_instances:" blocks,
         # which get stripped when running optimized (with python -O or
         # from compiled *.pyo files).  Provide a warning if __debug__ is
         # stripped, so it doesn't just look like --debug=count is broken.
@@ -630,6 +642,7 @@ def _set_debug_values(options):
         if __debug__: enable_count = True
         if enable_count:
             count_stats.enable(sys.stdout)
+            SCons.Debug.track_instances = True
         else:
             msg = "--debug=count is not supported when running SCons\n" + \
                   "\twith the python -O option or optimized (.pyo) modules."
@@ -644,6 +657,8 @@ def _set_debug_values(options):
     if "memory" in debug_values:
         memory_stats.enable(sys.stdout)
     print_objects = ("objects" in debug_values)
+    if print_objects:
+        SCons.Debug.track_instances = True
     if "presub" in debug_values:
         SCons.Action.print_actions_presub = 1
     if "stacktrace" in debug_values:
@@ -657,7 +672,7 @@ def _set_debug_values(options):
     if "prepare" in debug_values:
         SCons.Taskmaster.print_prepare = 1
     if "duplicate" in debug_values:
-        SCons.Node.FS.print_duplicate = 1
+        SCons.Node.print_duplicate = 1
 
 def _create_path(plist):
     path = '.'
@@ -677,7 +692,7 @@ def _load_site_scons_dir(topdir, site_dir_name=None):
     else:
         site_dir_name = "site_scons"
         err_if_not_found = False
-        
+
     site_dir = os.path.join(topdir, site_dir_name)
     if not os.path.exists(site_dir):
         if err_if_not_found:
@@ -931,13 +946,21 @@ def _main(parser):
         progress_display.set_mode(0)
 
     if options.site_dir:
-        _load_site_scons_dir(d.path, options.site_dir)
+        _load_site_scons_dir(d.get_internal_path(), options.site_dir)
     elif not options.no_site_dir:
-        _load_all_site_scons_dirs(d.path)
-        
+        _load_all_site_scons_dirs(d.get_internal_path())
+
     if options.include_dir:
         sys.path = options.include_dir + sys.path
 
+    # If we're about to start SCons in the interactive mode,
+    # inform the FS about this right here. Else, the release_target_info
+    # method could get called on some nodes, like the used "gcc" compiler,
+    # when using the Configure methods within the SConscripts.
+    # This would then cause subtle bugs, as already happened in #2971.
+    if options.interactive:
+        SCons.Node.interactive = True
+
     # That should cover (most of) the options.  Next, set up the variables
     # that hold command-line arguments, so the SConscript files that we
     # read and execute have access to them.
@@ -983,9 +1006,9 @@ def _main(parser):
         # reading SConscript files and haven't started building
         # things yet, stop regardless of whether they used -i or -k
         # or anything else.
+        revert_io()
         sys.stderr.write("scons: *** %s  Stop.\n" % e)
-        exit_status = 2
-        sys.exit(exit_status)
+        sys.exit(2)
     global sconscript_time
     sconscript_time = time.time() - start_time
 
@@ -1009,13 +1032,18 @@ def _main(parser):
     # warning about deprecated Python versions--delayed until here
     # in case they disabled the warning in the SConscript files.
     if python_version_deprecated():
-        msg = "Support for pre-2.4 Python (%s) is deprecated.\n" + \
-              "    If this will cause hardship, contact dev@scons.tigris.org."
+        msg = "Support for pre-%s Python version (%s) is deprecated.\n" + \
+              "    If this will cause hardship, contact scons-dev@scons.org"
+        deprecated_version_string = ".".join(map(str, deprecated_python_version))
         SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning,
-                            msg % python_version_string())
+                            msg % (deprecated_version_string, python_version_string()))
 
     if not options.help:
-        SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
+        # [ ] Clarify why we need to create Builder here at all, and
+        #     why it is created in DefaultEnvironment
+        # https://bitbucket.org/scons/scons/commits/d27a548aeee8ad5e67ea75c2d19a7d305f784e30
+        if SCons.SConf.NeedConfigHBuilder():
+            SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
 
     # Now re-parse the command-line options (any to the left of a '--'
     # argument, that is) with any user-defined command-line options that
@@ -1070,6 +1098,8 @@ def _main(parser):
         # Build the targets
         nodes = _build_targets(fs, options, targets, target_top)
         if not nodes:
+            revert_io()
+            print 'Found nothing to build'
             exit_status = 2
 
 def _build_targets(fs, options, targets, target_top):
@@ -1081,13 +1111,14 @@ def _build_targets(fs, options, targets, target_top):
     display.set_mode(not options.silent)
     SCons.Action.print_actions          = not options.silent
     SCons.Action.execute_actions        = not options.no_exec
-    SCons.Node.FS.do_store_info         = not options.no_exec
+    SCons.Node.do_store_info            = not options.no_exec
     SCons.SConf.dryrun                  = options.no_exec
 
     if options.diskcheck:
         SCons.Node.FS.set_diskcheck(options.diskcheck)
 
     SCons.CacheDir.cache_enabled = not options.cache_disable
+    SCons.CacheDir.cache_readonly = options.cache_readonly
     SCons.CacheDir.cache_debug = options.cache_debug
     SCons.CacheDir.cache_force = options.cache_force
     SCons.CacheDir.cache_show = options.cache_show
@@ -1133,7 +1164,7 @@ def _build_targets(fs, options, targets, target_top):
                         # x doesn't have a cwd, so it's either not a target,
                         # or not a file, so go ahead and keep it as a default
                         # target and let the engine sort it out:
-                        return 1                
+                        return 1
                 d = list(filter(check_dir, SCons.Script.DEFAULT_TARGETS))
                 SCons.Script.DEFAULT_TARGETS[:] = d
                 target_top = None
@@ -1297,12 +1328,8 @@ def _exec_main(parser, values):
         prof = Profile()
         try:
             prof.runcall(_main, parser)
-        except SConsPrintHelpException, e:
+        finally:
             prof.dump_stats(options.profile_file)
-            raise e
-        except SystemExit:
-            pass
-        prof.dump_stats(options.profile_file)
     else:
         _main(parser)
 
@@ -1327,10 +1354,10 @@ def main():
     except (ImportError, AttributeError):
         # On Windows there is no scons.py, so there is no
         # __main__.__version__, hence there is no script version.
-        pass 
+        pass
     parts.append(version_string("engine", SCons))
     parts.append(path_string("engine", SCons))
-    parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation")
+    parts.append("Copyright (c) 2001 - 2015 The SCons Foundation")
     version = ''.join(parts)
 
     import SConsOptions
@@ -1338,9 +1365,12 @@ def main():
     values = SConsOptions.SConsValues(parser.get_default_values())
 
     OptionsParser = parser
-    
+
     try:
-        _exec_main(parser, values)
+        try:
+            _exec_main(parser, values)
+        finally:
+            revert_io()
     except SystemExit, s:
         if s:
             exit_status = s
@@ -1357,6 +1387,7 @@ def main():
         parser.print_help()
         exit_status = 0
     except SCons.Errors.BuildError, e:
+        print e
         exit_status = e.exitstatus
     except:
         # An exception here is likely a builtin Python exception Python
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/SConsOptions.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/SConsOptions.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/SConsOptions.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/SConsOptions.py
index 1d574f8cb068a404fc4b2afbbfa620b5380b501e..7e458aa22ebf704213b25d9844895629e2c51c25 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/SConsOptions.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/SConsOptions.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Script/SConsOptions.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Script/SConsOptions.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import optparse
 import re
@@ -248,7 +248,7 @@ class SConsOption(optparse.Option):
 class SConsOptionGroup(optparse.OptionGroup):
     """
     A subclass for SCons-specific option groups.
-    
+
     The only difference between this and the base class is that we print
     the group's help text flush left, underneath their own title but
     lined up with the normal "SCons Options".
@@ -268,8 +268,9 @@ class SConsOptionParser(optparse.OptionParser):
     preserve_unknown_options = False
 
     def error(self, msg):
+        # overriden OptionValueError exception handler
         self.print_usage(sys.stderr)
-        sys.stderr.write("SCons error: %s\n" % msg)
+        sys.stderr.write("SCons Error: %s\n" % msg)
         sys.exit(2)
 
     def _process_long_opt(self, rargs, values):
@@ -318,7 +319,13 @@ class SConsOptionParser(optparse.OptionParser):
                     value = option.const
             elif len(rargs) < nargs:
                 if nargs == 1:
-                    self.error(_("%s option requires an argument") % opt)
+                    if not option.choices:
+                        self.error(_("%s option requires an argument") % opt)
+                    else:
+                        msg  = _("%s option requires an argument " % opt)
+                        msg += _("(choose from %s)"
+                                 % ', '.join(option.choices))
+                        self.error(msg)
                 else:
                     self.error(_("%s option requires %d arguments")
                                % (opt, nargs))
@@ -336,10 +343,75 @@ class SConsOptionParser(optparse.OptionParser):
 
         option.process(opt, value, values, self)
 
+    def reparse_local_options(self):
+        """
+        Re-parse the leftover command-line options stored
+        in self.largs, so that any value overridden on the
+        command line is immediately available if the user turns
+        around and does a GetOption() right away.
+        
+        We mimic the processing of the single args
+        in the original OptionParser._process_args(), but here we
+        allow exact matches for long-opts only (no partial
+        argument names!).
+
+        Else, this would lead to problems in add_local_option()
+        below. When called from there, we try to reparse the
+        command-line arguments that
+          1. haven't been processed so far (self.largs), but
+          2. are possibly not added to the list of options yet.
+          
+        So, when we only have a value for "--myargument" yet,
+        a command-line argument of "--myarg=test" would set it.
+        Responsible for this behaviour is the method
+        _match_long_opt(), which allows for partial matches of
+        the option name, as long as the common prefix appears to
+        be unique.
+        This would lead to further confusion, because we might want
+        to add another option "--myarg" later on (see issue #2929).
+        
+        """
+        rargs = []
+        largs_restore = []
+        # Loop over all remaining arguments
+        skip = False
+        for l in self.largs:
+            if skip:
+                # Accept all remaining arguments as they are
+                largs_restore.append(l)
+            else:
+                if len(l) > 2 and l[0:2] == "--":
+                    # Check long option
+                    lopt = (l,)
+                    if "=" in l:
+                        # Split into option and value
+                        lopt = l.split("=", 1)
+                        
+                    if lopt[0] in self._long_opt:
+                        # Argument is already known
+                        rargs.append('='.join(lopt))
+                    else:
+                        # Not known yet, so reject for now
+                        largs_restore.append('='.join(lopt))
+                else:
+                    if l == "--" or l == "-":
+                        # Stop normal processing and don't
+                        # process the rest of the command-line opts
+                        largs_restore.append(l)
+                        skip = True
+                    else:
+                        rargs.append(l)
+        
+        # Parse the filtered list
+        self.parse_args(rargs, self.values)
+        # Restore the list of remaining arguments for the
+        # next call of AddOption/add_local_option...
+        self.largs = self.largs + largs_restore
+
     def add_local_option(self, *args, **kw):
         """
         Adds a local option to the parser.
-        
+
         This is initiated by a SetOption() call to add a user-defined
         command-line option.  We add the option to a separate option
         group for the local options, creating the group if necessary.
@@ -363,7 +435,7 @@ class SConsOptionParser(optparse.OptionParser):
             # available if the user turns around and does a GetOption()
             # right away.
             setattr(self.values.__defaults__, result.dest, result.default)
-            self.parse_args(self.largs, self.values)
+            self.reparse_local_options()
 
         return result
 
@@ -393,11 +465,11 @@ class SConsIndentedHelpFormatter(optparse.IndentedHelpFormatter):
         out liking:
 
         --  add our own regular expression that doesn't break on hyphens
-            (so things like --no-print-directory don't get broken); 
+            (so things like --no-print-directory don't get broken);
 
         --  wrap the list of options themselves when it's too long
             (the wrapper.fill(opts) call below);
- 
+
         --  set the subsequent_indent when wrapping the help_text.
         """
         # The help for each option consists of two parts:
@@ -563,23 +635,28 @@ def Parser(version):
                   action="store_true",
                   help="Copy already-built targets into the CacheDir.")
 
+    op.add_option('--cache-readonly',
+                  dest='cache_readonly', default=False,
+                  action="store_true",
+                  help="Do not update CacheDir with built targets.")
+
     op.add_option('--cache-show',
                   dest='cache_show', default=False,
                   action="store_true",
                   help="Print build actions for files from CacheDir.")
 
+    def opt_invalid(group, value, options):
+        errmsg  = "`%s' is not a valid %s option type, try:\n" % (value, group)
+        return errmsg + "    %s" % ", ".join(options)
+
     config_options = ["auto", "force" ,"cache"]
 
-    def opt_config(option, opt, value, parser, c_options=config_options):
-        if not value in c_options:
-            raise OptionValueError("Warning:  %s is not a valid config type" % value)
-        setattr(parser.values, option.dest, value)
     opt_config_help = "Controls Configure subsystem: %s." \
                       % ", ".join(config_options)
+
     op.add_option('--config',
-                  nargs=1, type="string",
+                  nargs=1, choices=config_options,
                   dest="config", default="auto",
-                  action="callback", callback=opt_config,
                   help = opt_config_help,
                   metavar="MODE")
 
@@ -599,14 +676,16 @@ def Parser(version):
     debug_options = ["count", "duplicate", "explain", "findlibs",
                      "includes", "memoizer", "memory", "objects",
                      "pdb", "prepare", "presub", "stacktrace",
-                     "time"] + list(deprecated_debug_options.keys())
+                     "time"]
 
-    def opt_debug(option, opt, value, parser,
+    def opt_debug(option, opt, value__, parser,
                   debug_options=debug_options,
                   deprecated_debug_options=deprecated_debug_options):
-        if value in debug_options:
-            parser.values.debug.append(value)
-            if value in deprecated_debug_options.keys():
+        for value in value__.split(','):
+            if value in debug_options:
+                parser.values.debug.append(value)
+            elif value in deprecated_debug_options.keys():
+                parser.values.debug.append(value)
                 try:
                     parser.values.delayed_warnings
                 except AttributeError:
@@ -615,8 +694,9 @@ def Parser(version):
                 w = "The --debug=%s option is deprecated%s." % (value, msg)
                 t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w)
                 parser.values.delayed_warnings.append(t)
-        else:
-            raise OptionValueError("Warning:  %s is not a valid debug type" % value)
+            else:
+                raise OptionValueError(opt_invalid('debug', value, debug_options))
+
     opt_debug_help = "Print various types of debugging information: %s." \
                      % ", ".join(debug_options)
     op.add_option('--debug',
@@ -630,7 +710,7 @@ def Parser(version):
         try:
             diskcheck_value = diskcheck_convert(value)
         except ValueError, e:
-            raise OptionValueError("Warning: `%s' is not a valid diskcheck type" % e)
+            raise OptionValueError("`%s' is not a valid diskcheck type" % e)
         setattr(parser.values, option.dest, diskcheck_value)
 
     op.add_option('--diskcheck',
@@ -642,7 +722,8 @@ def Parser(version):
 
     def opt_duplicate(option, opt, value, parser):
         if not value in SCons.Node.FS.Valid_Duplicates:
-            raise OptionValueError("`%s' is not a valid duplication style." % value)
+            raise OptionValueError(opt_invalid('duplication', value,
+                                              SCons.Node.FS.Valid_Duplicates))
         setattr(parser.values, option.dest, value)
         # Set the duplicate style right away so it can affect linking
         # of SConscript files.
@@ -807,7 +888,7 @@ def Parser(version):
             elif o == 'status':
                 tp.status = True
             else:
-                raise OptionValueError("Warning:  %s is not a valid --tree option" % o)
+                raise OptionValueError(opt_invalid('--tree', o, tree_options))
         parser.values.tree_printers.append(tp)
 
     opt_tree_help = "Print a dependency tree in various formats: %s." \
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/SConscript.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/SConscript.py
similarity index 97%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/SConscript.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/SConscript.py
index 18a9e310a3456099fac7f168992ed403f9255cca..ead6f2ea11e00e4f18ee38bc49ff98f1d1f7f8a3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/SConscript.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/SConscript.py
@@ -6,7 +6,7 @@ files.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ files.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 from __future__ import division
 
-__revision__ = "src/engine/SCons/Script/SConscript.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Script/SConscript.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons
 import SCons.Action
@@ -265,7 +265,7 @@ def _SConscript(fs, *files, **kw):
                             call_stack[-1].globals.update({__file__:old_file})
                 else:
                     SCons.Warnings.warn(SCons.Warnings.MissingSConscriptWarning,
-                             "Ignoring missing SConscript '%s'" % f.path)
+                             "Ignoring missing SConscript '%s'" % f.get_internal_path())
 
         finally:
             SCons.Script.sconscript_reading = SCons.Script.sconscript_reading - 1
@@ -438,7 +438,7 @@ class SConsEnvironment(SCons.Environment.Base):
                     fname = fn.get_path(src_dir)
                     files = [os.path.join(str(variant_dir), fname)]
                 else:
-                    files = [fn.abspath]
+                    files = [fn.get_abspath()]
                 kw['src_dir'] = variant_dir
             self.fs.VariantDir(variant_dir, src_dir, duplicate)
 
@@ -461,6 +461,11 @@ class SConsEnvironment(SCons.Environment.Base):
 
     def EnsureSConsVersion(self, major, minor, revision=0):
         """Exit abnormally if the SCons version is not late enough."""
+        # split string to avoid replacement during build process
+        if SCons.__version__ == '__' + 'VERSION__':
+            SCons.Warnings.warn(SCons.Warnings.DevelopmentVersionWarning,
+                "EnsureSConsVersion is ignored for development version")
+            return
         scons_ver = self._get_major_minor_revision(SCons.__version__)
         if scons_ver < (major, minor, revision):
             if revision:
@@ -473,13 +478,8 @@ class SConsEnvironment(SCons.Environment.Base):
 
     def EnsurePythonVersion(self, major, minor):
         """Exit abnormally if the Python version is not late enough."""
-        try:
-            v_major, v_minor, v_micro, release, serial = sys.version_info
-            python_ver = (v_major, v_minor)
-        except AttributeError:
-            python_ver = self._get_major_minor_revision(sys.version)[:2]
-        if python_ver < (major, minor):
-            v = sys.version.split(" ", 1)[0]
+        if sys.version_info < (major, minor):
+            v = sys.version.split()[0]
             print "Python %d.%d or greater required, but you have Python %s" %(major,minor,v)
             sys.exit(2)
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/__init__.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/__init__.py
index c0a031adb4b5d22eb6558b8df89782be668aa5c9..c21882fb2a17efd4d57216882b447d0dcc845db1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Script/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Script/__init__.py
@@ -12,7 +12,7 @@ it goes here.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ it goes here.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Script/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Script/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import time
 start_time = time.time()
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Sig.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Sig.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Sig.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Sig.py
index 41289a0f6f94890ee5d59cbe2c0056294b1425f8..e949cfb18b53cae91c9ebfa1cf565be9695a2612 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Sig.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Sig.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Sig.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Sig.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Place-holder for the old SCons.Sig module hierarchy
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Subst.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Subst.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Subst.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Subst.py
index 8d9d3a43a0fa992db335fcad5d068b554f4b8ce5..da0fa68da4aab66182874d51cf7a95c6d17673da 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Subst.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Subst.py
@@ -5,7 +5,7 @@ SCons string substitution.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ SCons string substitution.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Subst.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Subst.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import collections
 import re
@@ -78,6 +78,14 @@ class Literal(object):
     def is_literal(self):
         return 1
 
+    def __eq__(self, other):
+        if not isinstance(other, Literal):
+            return False
+        return self.lstr == other.lstr
+
+    def __neq__(self, other):
+        return not self.__eq__(other)
+
 class SpecialAttrWrapper(object):
     """This is a wrapper for what we call a 'Node special attribute.'
     This is any of the attributes of a Node that we can reference from
@@ -172,7 +180,7 @@ class NLWrapper(object):
     In practice, this might be a wash performance-wise, but it's a little
     cleaner conceptually...
     """
-    
+
     def __init__(self, list, func):
         self.list = list
         self.func = func
@@ -190,7 +198,7 @@ class NLWrapper(object):
         self._create_nodelist = self._return_nodelist
         return self.nodelist
     _create_nodelist = _gen_nodelist
-    
+
 
 class Targets_or_Sources(collections.UserList):
     """A class that implements $TARGETS or $SOURCES expansions by in turn
@@ -451,7 +459,7 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={
                             raise_exception(NameError(key), lvars['TARGETS'], s)
                         else:
                             return ''
-    
+
                     # Before re-expanding the result, handle
                     # recursive expansion by copying the local
                     # variable dictionary and overwriting a null
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Taskmaster.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Taskmaster.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Taskmaster.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Taskmaster.py
index cd95fb081b868bd2bdf2ddea49782b7e36f1f400..b303f79363daf72235a0251805300943069c3d9d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Taskmaster.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Taskmaster.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -47,7 +47,7 @@ interface and the SCons build engine.  There are two key classes here:
         target(s) that it decides need to be evaluated and/or built.
 """
 
-__revision__ = "src/engine/SCons/Taskmaster.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Taskmaster.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from itertools import chain
 import operator
@@ -186,6 +186,8 @@ class Task(object):
         # or implicit dependencies exists, and also initialize the
         # .sconsign info.
         executor = self.targets[0].get_executor()
+        if executor is None:
+            return
         executor.prepare()
         for t in executor.get_action_targets():
             if print_prepare:
@@ -240,7 +242,7 @@ class Task(object):
                 #
                 for t in cached_targets:
                     try:
-                        t.fs.unlink(t.path)
+                        t.fs.unlink(t.get_internal_path())
                     except (IOError, OSError):
                         pass
                 self.targets[0].build()
@@ -289,6 +291,7 @@ class Task(object):
         post-visit actions that must take place regardless of whether
         or not the target was an actual built target or a source Node.
         """
+        global print_prepare
         T = self.tm.trace
         if T: T.write(self.trace_message('Task.executed_with_callbacks()',
                                          self.node))
@@ -301,7 +304,12 @@ class Task(object):
                 if not t.cached:
                     t.push_to_cache()
                 t.built()
-            t.visited()
+                t.visited()
+                if (not print_prepare and 
+                    (not hasattr(self, 'options') or not self.options.debug_includes)):
+                    t.release_target_info()
+            else:
+                t.visited()
 
     executed = executed_with_callbacks
 
@@ -382,6 +390,7 @@ class Task(object):
 
         This is the default behavior for building only what's necessary.
         """
+        global print_prepare
         T = self.tm.trace
         if T: T.write(self.trace_message(u'Task.make_ready_current()',
                                          self.node))
@@ -414,6 +423,9 @@ class Task(object):
                 # parallel build...)
                 t.visited()
                 t.set_state(NODE_UP_TO_DATE)
+                if (not print_prepare and 
+                    (not hasattr(self, 'options') or not self.options.debug_includes)):
+                    t.release_target_info()
 
     make_ready = make_ready_current
 
@@ -453,14 +465,15 @@ class Task(object):
                 parents[p] = parents.get(p, 0) + 1
 
         for t in targets:
-            for s in t.side_effects:
-                if s.get_state() == NODE_EXECUTING:
-                    s.set_state(NODE_NO_STATE)
-                    for p in s.waiting_parents:
-                        parents[p] = parents.get(p, 0) + 1
-                for p in s.waiting_s_e:
-                    if p.ref_count == 0:
-                        self.tm.candidates.append(p)
+            if t.side_effects is not None:
+                for s in t.side_effects:
+                    if s.get_state() == NODE_EXECUTING:
+                        s.set_state(NODE_NO_STATE)
+                        for p in s.waiting_parents:
+                            parents[p] = parents.get(p, 0) + 1
+                    for p in s.waiting_s_e:
+                        if p.ref_count == 0:
+                            self.tm.candidates.append(p)
 
         for p, subtract in parents.items():
             p.ref_count = p.ref_count - subtract
@@ -927,7 +940,11 @@ class Taskmaster(object):
         if node is None:
             return None
 
-        tlist = node.get_executor().get_all_targets()
+        executor = node.get_executor()
+        if executor is None:
+            return None
+        
+        tlist = executor.get_all_targets()
 
         task = self.tasker(self, tlist, node in self.original_top, node)
         try:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/386asm.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/386asm.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/386asm.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/386asm.py
index bf32a0b7d4f7c404ddbfd9d2520c34e19a383540..06d271e7caa4ba142aa8bbb243a8aca079a34480 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/386asm.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/386asm.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/386asm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/386asm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.PharLapCommon import addPharLapPaths
 import SCons.Util
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/BitKeeper.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/BitKeeper.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/BitKeeper.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/BitKeeper.py
index 60445db1e8f5eda92439fe2c3fc36b6fd02d9965..9df9f59180b573b74adbf36ff3c1f210f2b496b0 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/BitKeeper.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/BitKeeper.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/BitKeeper.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/BitKeeper.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/CVS.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/CVS.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/CVS.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/CVS.py
index 87a6f1a32528d07c5acf3b900a99dfd787dc6024..14bc18e40fd5ac23f0dc10ac5dacfc1c36533bad 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/CVS.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/CVS.py
@@ -8,7 +8,7 @@ selection method.
 
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/CVS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/CVS.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/DCommon.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/DCommon.py
new file mode 100644
index 0000000000000000000000000000000000000000..db0366051e1551a4d75de2f5382c6809f917ee30
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/DCommon.py
@@ -0,0 +1,56 @@
+"""SCons.Tool.DCommon
+
+Common code for the various D tools.
+
+Coded by Russel Winder (russel@winder.org.uk)
+2012-09-06
+"""
+#
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Tool/DCommon.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+import os.path
+
+def isD(env, source):
+    if not source:
+        return 0
+    for s in source:
+        if s.sources:
+            ext = os.path.splitext(str(s.sources[0]))[1]
+            if ext == '.d':
+                return 1
+    return 0
+
+def addDPATHToEnv(env, executable):
+    dPath = env.WhereIs(executable)
+    if dPath:
+        phobosDir = dPath[:dPath.rindex(executable)] + '/../src/phobos'
+        if os.path.isdir(phobosDir):
+            env.Append(DPATH=[phobosDir])
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/FortranCommon.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/FortranCommon.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/FortranCommon.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/FortranCommon.py
index 2efcfa27b98507429dd07d8f46a4f6f2f8b61003..b8ff7d94cb43e72064227516f56e0bec7d4caa9f 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/FortranCommon.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/FortranCommon.py
@@ -5,7 +5,7 @@ Stuff for processing Fortran, common to all fortran dialects.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Stuff for processing Fortran, common to all fortran dialects.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/FortranCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/FortranCommon.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import re
 import os.path
@@ -247,6 +247,21 @@ def add_f03_to_env(env):
     DialectAddToEnv(env, "F03", F03Suffixes, F03PPSuffixes,
                     support_module = 1)
 
+def add_f08_to_env(env):
+    """Add Builders and construction variables for f08 to an Environment."""
+    try:
+        F08Suffixes = env['F08FILESUFFIXES']
+    except KeyError:
+        F08Suffixes = ['.f08']
+
+    try:
+        F08PPSuffixes = env['F08PPFILESUFFIXES']
+    except KeyError:
+        F08PPSuffixes = []
+
+    DialectAddToEnv(env, "F08", F08Suffixes, F08PPSuffixes,
+                    support_module = 1)
+
 def add_all_to_env(env):
     """Add builders and construction variables for all supported fortran
     dialects."""
@@ -255,6 +270,7 @@ def add_all_to_env(env):
     add_f90_to_env(env)
     add_f95_to_env(env)
     add_f03_to_env(env)
+    add_f08_to_env(env)
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/GettextCommon.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/GettextCommon.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/GettextCommon.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/GettextCommon.py
index b2d848c441c5f5ed1c63efe8dd067df11733e3d7..af9b074b782ea5eb9b5c551f05f04d7eb3a8b782 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/GettextCommon.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/GettextCommon.py
@@ -3,7 +3,7 @@
 Used by several tools of `gettext` toolset.
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ Used by several tools of `gettext` toolset.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/GettextCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/GettextCommon.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Warnings
 import re
@@ -225,8 +225,9 @@ class _POFileBuilder(BuilderBase):
 
 import SCons.Environment
 #############################################################################
-def _translate(env, target=[], source=SCons.Environment._null, *args, **kw):
+def _translate(env, target=None, source=SCons.Environment._null, *args, **kw):
   """ Function for `Translate()` pseudo-builder """
+  if target is None: target = []
   pot = env.POTUpdate(None, source, *args, **kw)
   po = env.POUpdate(target, pot, *args, **kw)
   return po
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/JavaCommon.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/JavaCommon.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/JavaCommon.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/JavaCommon.py
index dc381053e4a88f5793dfe97aca0c0265d42d0334..8b1e48efcdfe97925ac5baa9d6527d827db43838 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/JavaCommon.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/JavaCommon.py
@@ -5,7 +5,7 @@ Stuff for processing Java.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Stuff for processing Java.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/JavaCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/JavaCommon.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
@@ -64,8 +64,8 @@ if java_parsing:
         interfaces, and anonymous inner classes."""
         def __init__(self, version=default_java_version):
 
-            if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6',
-                               '5', '6'):
+            if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6', '1.7',
+                               '1.8', '5', '6'):
                 msg = "Java version %s not supported" % version
                 raise NotImplementedError(msg)
 
@@ -171,7 +171,7 @@ if java_parsing:
             if self.version in ('1.1', '1.2', '1.3', '1.4'):
                 clazz = self.listClasses[0]
                 self.listOutputs.append('%s$%d' % (clazz, self.nextAnon))
-            elif self.version in ('1.5', '1.6', '5', '6'):
+            elif self.version in ('1.5', '1.6', '1.7', '1.8', '5', '6'):
                 self.stackAnonClassBrackets.append(self.brackets)
                 className = []
                 className.extend(self.listClasses)
@@ -244,7 +244,8 @@ if java_parsing:
                 return self
             # If that's an inner class which is declared in a method, it
             # requires an index prepended to the class-name, e.g.
-            # 'Foo$1Inner' (Tigris Issue 2087)
+            # 'Foo$1Inner'
+            # http://scons.tigris.org/issues/show_bug.cgi?id=2087
             if self.outer_state.localClasses and \
                 self.outer_state.stackBrackets[-1] > \
                 self.outer_state.stackBrackets[-2]+1:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/__init__.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/__init__.py
index 8dc6c5a618ba4999a32e559cd0f3a6d883316dee..90cb0bc748ad4fa7ca46ae4e0ff39bd520f2bcd1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/__init__.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """
 Common functions for Microsoft Visual Studio and Visual C/C++.
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/arch.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/arch.py
index 1b6ac9ef0483ef20c1184fda45bcbc63cfd58327..5bc7ea596f639f538fdbe457aa56f5d7e0097529 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/arch.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Module to define supported Windows chip architectures.
 """
@@ -51,6 +51,12 @@ SupportedArchitectureList = [
         'ia64',
         ['IA64'],
     ),
+    
+    ArchitectureDefinition(
+        'arm',
+        ['ARM'],
+    ),
+
 ]
 
 SupportedArchitectureMap = {}
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/common.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/common.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/common.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/common.py
index d10b7636c1fb87950c8a47dad173309cde1da373..60d7d408d14fd6d599423c6cf6d5c031931d18f2 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/common.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/common.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/MSCommon/common.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/MSCommon/common.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """
 Common helper functions for working with the Microsoft tool chain.
@@ -55,12 +55,12 @@ _is_win64 = None
 
 def is_win64():
     """Return true if running on windows 64 bits.
-    
+
     Works whether python itself runs in 64 bits or 32 bits."""
     # Unfortunately, python does not provide a useful way to determine
     # if the underlying Windows OS is 32-bit or 64-bit.  Worse, whether
     # the Python itself is 32-bit or 64-bit affects what it returns,
-    # so nothing in sys.* or os.* help.  
+    # so nothing in sys.* or os.* help.
 
     # Apparently the best solution is to use env vars that Windows
     # sets.  If PROCESSOR_ARCHITECTURE is not x86, then the python
@@ -120,11 +120,21 @@ def normalize_env(env, keys, force=False):
             if k in os.environ and (force or not k in normenv):
                 normenv[k] = os.environ[k].encode('mbcs')
 
+    # This shouldn't be necessary, since the default environment should include system32,
+    # but keep this here to be safe, since it's needed to find reg.exe which the MSVC
+    # bat scripts use.
+    sys32_dir = os.path.join(os.environ.get("SystemRoot", os.environ.get("windir",r"C:\Windows\system32")),"System32")
+
+    if sys32_dir not in normenv['PATH']:
+        normenv['PATH'] = normenv['PATH'] + os.pathsep + sys32_dir
+
+    debug("PATH: %s"%normenv['PATH'])
+
     return normenv
 
 def get_output(vcbat, args = None, env = None):
     """Parse the output of given bat file, with given args."""
-    
+
     if env is None:
         # Create a blank environment, for use in launching the tools
         env = SCons.Environment.Environment(tools=[])
@@ -136,6 +146,11 @@ def get_output(vcbat, args = None, env = None):
     # settings in vs.py.
     vars = [
         'COMSPEC',
+# VS100 and VS110: Still set, but modern MSVC setup scripts will
+# discard these if registry has values.  However Intel compiler setup
+# script still requires these as of 2013/2014.
+        'VS110COMNTOOLS',
+        'VS100COMNTOOLS',
         'VS90COMNTOOLS',
         'VS80COMNTOOLS',
         'VS71COMNTOOLS',
@@ -164,6 +179,11 @@ def get_output(vcbat, args = None, env = None):
     # and won't work under Pythons not built with threading.
     stdout = popen.stdout.read()
     stderr = popen.stderr.read()
+
+    # Extra debug logic, uncomment if necessar
+#     debug('get_output():stdout:%s'%stdout)
+#     debug('get_output():stderr:%s'%stderr)
+
     if stderr:
         # TODO: find something better to do with stderr;
         # this at least prevents errors from getting swallowed.
@@ -194,7 +214,7 @@ def parse_output(output, keep = ("INCLUDE", "LIB", "LIBPATH", "PATH")):
                 p = p.encode('mbcs')
                 # XXX: For some reason, VC98 .bat file adds "" around the PATH
                 # values, and it screws up the environment later, so we strip
-                # it. 
+                # it.
                 p = p.strip('"')
                 dkeep[key].append(p)
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/netframework.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/netframework.py
index cc5aaf1bf0bb6c5818523f04c0ac548db3247264..0606e27bc5d140eeb74c718b2919255d1928489b 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/netframework.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """
 """
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/sdk.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/sdk.py
index fd22cd7be2aca4bea7c78d182e46f54554754cad..537f367c6d790134d48b61fe428797ac7895f0cd 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/sdk.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -19,9 +19,9 @@
 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
 
-__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+
+__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Module to detect the Platform/Windows SDK
 
@@ -172,6 +172,26 @@ SDK70VCSetupScripts =    { 'x86'      : r'bin\vcvars32.bat',
 #
 # If you update this list, update the documentation in Tool/mssdk.xml.
 SupportedSDKList = [
+    WindowsSDK('7.1',
+               sanity_check_file=r'bin\SetEnv.Cmd',
+               include_subdir='include',
+               lib_subdir={
+                   'x86'       : ['lib'],
+                   'x86_64'    : [r'lib\x64'],
+                   'ia64'      : [r'lib\ia64'],
+               },
+               vc_setup_scripts = SDK70VCSetupScripts,
+              ),
+    WindowsSDK('7.0A',
+               sanity_check_file=r'bin\SetEnv.Cmd',
+               include_subdir='include',
+               lib_subdir={
+                   'x86'       : ['lib'],
+                   'x86_64'    : [r'lib\x64'],
+                   'ia64'      : [r'lib\ia64'],
+               },
+               vc_setup_scripts = SDK70VCSetupScripts,
+              ),
     WindowsSDK('7.0',
                sanity_check_file=r'bin\SetEnv.Cmd',
                include_subdir='include',
@@ -337,10 +357,13 @@ def mssdk_setup_env(env):
     elif 'MSSDK_VERSION' in env:
         sdk_version = env['MSSDK_VERSION']
         if sdk_version is None:
-            msg = "SDK version %s is not installed" % repr(mssdk)
+            msg = "SDK version is specified as None"  
             raise SCons.Errors.UserError(msg)
         sdk_version = env.subst(sdk_version)
         mssdk = get_sdk_by_version(sdk_version)
+        if mssdk is None:
+            msg = "SDK version %s is not installed" % sdk_version 
+            raise SCons.Errors.UserError(msg)
         sdk_dir = mssdk.get_sdk_dir()
         debug('sdk.py:mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir)
     elif 'MSVS_VERSION' in env:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/vc.py
similarity index 83%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/vc.py
index 9bbec21702b8643aff9331002596a9a16e626aee..02a32a0fff3b1c3f993bc782825d807912485cc1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/vc.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@
 #   * test on 64 bits XP +  VS 2005 (and VS 6 if possible)
 #   * SDK
 #   * Assembly
-__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Module for Visual C/C++ detection and configuration.
 """
@@ -81,6 +81,7 @@ _ARCH_TO_CANONICAL = {
     "itanium"   : "ia64",
     "x86"       : "x86",
     "x86_64"    : "amd64",
+    "x86_amd64" : "x86_amd64", # Cross compile to 64 bit from 32bits
 }
 
 # Given a (host, target) tuple, return the argument for the bat file. Both host
@@ -88,6 +89,8 @@ _ARCH_TO_CANONICAL = {
 _HOST_TARGET_ARCH_TO_BAT_ARCH = {
     ("x86", "x86"): "x86",
     ("x86", "amd64"): "x86_amd64",
+    ("x86", "x86_amd64"): "x86_amd64",
+    ("amd64", "x86_amd64"): "x86_amd64", # This is present in (at least) VS2012 express
     ("amd64", "amd64"): "amd64",
     ("amd64", "x86"): "x86",
     ("x86", "ia64"): "x86_ia64"
@@ -129,9 +132,19 @@ def get_host_target(env):
 
     return (host, target,req_target_platform)
 
-_VCVER = ["11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
+# If you update this, update SupportedVSList in Tool/MSCommon/vs.py, and the
+# MSVC_VERSION documentation in Tool/msvc.xml.
+_VCVER = ["14.0", "14.0Exp", "12.0", "12.0Exp", "11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
 
 _VCVER_TO_PRODUCT_DIR = {
+        '14.0' : [
+            r'Microsoft\VisualStudio\14.0\Setup\VC\ProductDir'],
+        '14.0Exp' : [
+            r'Microsoft\VCExpress\14.0\Setup\VC\ProductDir'],
+        '12.0' : [
+            r'Microsoft\VisualStudio\12.0\Setup\VC\ProductDir'],
+        '12.0Exp' : [
+            r'Microsoft\VCExpress\12.0\Setup\VC\ProductDir'],
         '11.0': [
             r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'],
         '11.0Exp' : [
@@ -256,15 +269,16 @@ def find_batch_file(env,msvc_version,host_arch,target_arch):
     
     installed_sdks=get_installed_sdks()
     for _sdk in installed_sdks:
-        sdk_bat_file=_sdk.get_sdk_vc_script(host_arch,target_arch)
-        sdk_bat_file_path=os.path.join(pdir,sdk_bat_file)
-        debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path)
-        if os.path.exists(sdk_bat_file_path):
-            return (batfilename,sdk_bat_file_path)
+        sdk_bat_file = _sdk.get_sdk_vc_script(host_arch,target_arch)
+        if not sdk_bat_file:
+            debug("vc.py:find_batch_file() not found:%s"%_sdk)
         else:
-            debug("vc.py:find_batch_file() not found:%s"%sdk_bat_file_path)
-    else:
-        return (batfilename,None)
+            sdk_bat_file_path = os.path.join(pdir,sdk_bat_file)
+            if os.path.exists(sdk_bat_file_path): 
+                debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path)
+                return (batfilename,sdk_bat_file_path)
+    return (batfilename,None)
+
 
 __INSTALLED_VCS_RUN = None
 
@@ -295,8 +309,21 @@ def reset_installed_vcs():
     """Make it try again to find VC.  This is just for the tests."""
     __INSTALLED_VCS_RUN = None
 
+# Running these batch files isn't cheap: most of the time spent in
+# msvs.generate() is due to vcvars*.bat.  In a build that uses "tools='msvs'"
+# in multiple environments, for example:
+#    env1 = Environment(tools='msvs')
+#    env2 = Environment(tools='msvs')
+# we can greatly improve the speed of the second and subsequent Environment
+# (or Clone) calls by memoizing the environment variables set by vcvars*.bat.
+script_env_stdout_cache = {}
 def script_env(script, args=None):
-    stdout = common.get_output(script, args)
+    cache_key = (script, args)
+    stdout = script_env_stdout_cache.get(cache_key, None)
+    if stdout is None:
+        stdout = common.get_output(script, args)
+        script_env_stdout_cache[cache_key] = stdout
+
     # Stupid batch files do not set return code: we take a look at the
     # beginning of the output for an error message instead
     olines = stdout.splitlines()
@@ -357,13 +384,23 @@ def msvc_find_valid_batch_script(env,version):
     # target platform
     (host_platform, target_platform,req_target_platform) = get_host_target(env)
 
-    # If the user hasn't specifically requested a TARGET_ARCH, and
-    # The TARGET_ARCH is amd64 then also try 32 bits if there are no viable
-    # 64 bit tools installed
     try_target_archs = [target_platform]
-    if not req_target_platform and target_platform in ('amd64','x86_64'):
+    debug("msvs_find_valid_batch_script(): req_target_platform %s target_platform:%s"%(req_target_platform,target_platform))
+
+    # VS2012 has a "cross compile" environment to build 64 bit 
+    # with x86_amd64 as the argument to the batch setup script
+    if req_target_platform in ('amd64','x86_64'):
+        try_target_archs.append('x86_amd64')
+    elif not req_target_platform and target_platform in ['amd64','x86_64']:
+        # There may not be "native" amd64, but maybe "cross" x86_amd64 tools
+        try_target_archs.append('x86_amd64')
+        # If the user hasn't specifically requested a TARGET_ARCH, and
+        # The TARGET_ARCH is amd64 then also try 32 bits if there are no viable
+        # 64 bit tools installed
         try_target_archs.append('x86')
 
+    debug("msvs_find_valid_batch_script(): host_platform: %s try_target_archs:%s"%(host_platform, try_target_archs))
+
     d = None
     for tp in try_target_archs:
         # Set to current arch.
@@ -399,16 +436,20 @@ def msvc_find_valid_batch_script(env,version):
             except BatchFileExecutionError, e:
                 debug('vc.py:msvc_find_valid_batch_script() use_script 3: failed running VC script %s: %s: Error:%s'%(repr(vc_script),arg,e))
                 vc_script=None
+                continue
         if not vc_script and sdk_script:
             debug('vc.py:msvc_find_valid_batch_script() use_script 4: trying sdk script: %s'%(sdk_script))
             try:
-                d = script_env(sdk_script,args=[])
+                d = script_env(sdk_script)
             except BatchFileExecutionError,e:
                 debug('vc.py:msvc_find_valid_batch_script() use_script 5: failed running SDK script %s: Error:%s'%(repr(sdk_script),e))
                 continue
         elif not vc_script and not sdk_script:
             debug('vc.py:msvc_find_valid_batch_script() use_script 6: Neither VC script nor SDK script found')
             continue
+        
+        debug("vc.py:msvc_find_valid_batch_script() Found a working script/target: %s %s"%(repr(sdk_script),arg))
+        break # We've found a working target_platform, so stop looking
     
     # If we cannot find a viable installed compiler, reset the TARGET_ARCH
     # To it's initial value
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/vs.py
similarity index 86%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/vs.py
index f5feb2a448fb084e45d846d94c4e41f5b74089a0..619cbe58d376bec7eed0c155c36c0482218889db 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/MSCommon/vs.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """Module to detect Visual Studio and/or Visual C/C++
 """
@@ -73,7 +73,7 @@ class VisualStudio(object):
             debug('find_vs_dir():  no installed VC %s' % self.vc_version)
             return None
         return dir
-        
+
     def find_vs_dir_by_reg(self):
         root = 'Software\\'
 
@@ -91,13 +91,13 @@ class VisualStudio(object):
                 debug('find_vs_dir_by_reg(): found VS in registry: %s' % comps)
                 return comps
         return None
-    
+
     def find_vs_dir(self):
         """ Can use registry or location of VC to find vs dir
         First try to find by registry, and if that fails find via VC dir
         """
-        
-        
+
+
         if True:
             vs_dir=self.find_vs_dir_by_reg()
             return vs_dir
@@ -115,7 +115,7 @@ class VisualStudio(object):
             debug('find_executable():  %s not on file system' % executable)
             return None
         return executable
-    
+
     #
 
     def get_batch_file(self):
@@ -199,102 +199,118 @@ class VisualStudio(object):
 # good money for in preference to whatever Microsoft makes available
 # for free.
 #
-# If you update this list, update the documentation in Tool/msvs.xml.
+# If you update this list, update _VCVER and _VCVER_TO_PRODUCT_DIR in
+# Tool/MSCommon/vc.py, and the MSVC_VERSION documentation in Tool/msvc.xml.
 
 SupportedVSList = [
-    # Visual Studio 2010
-    # TODO: find the settings, perhaps from someone with a CTP copy?
-    #VisualStudio('TBD',
-    #             hkey_root=r'TBD',
-    #             common_tools_var='TBD',
-    #             executable_path=r'TBD',
-    #             default_dirname='TBD',
-    #),
-
-    # Visual Studio 11
-    # The batch file we look for is in the VC directory,
-    # so the devenv.com executable is up in ..\..\Common7\IDE.
+    # Visual Studio 2015
+    VisualStudio('14.0',
+                 vc_version='14.0',
+                 sdk_version='10.0A',
+                 hkeys=[r'Microsoft\VisualStudio\14.0\Setup\VS\ProductDir'],
+                 common_tools_var='VS140COMNTOOLS',
+                 executable_path=r'Common7\IDE\devenv.com',
+                 batch_file_path=r'Common7\Tools\vsvars32.bat',
+                 supported_arch=['x86', 'amd64', "arm"],
+    ),
+ 
+    # Visual C++ 2015 Express Edition (for Desktop)
+    VisualStudio('14.0Exp',
+                 vc_version='14.0',
+                 sdk_version='10.0A',
+                 hkeys=[r'Microsoft\VisualStudio\14.0\Setup\VS\ProductDir'],
+                 common_tools_var='VS140COMNTOOLS',
+                 executable_path=r'Common7\IDE\WDExpress.exe',
+                 batch_file_path=r'Common7\Tools\vsvars32.bat',
+                 supported_arch=['x86', 'amd64', "arm"],
+    ),
+
+    # Visual Studio 2013
+    VisualStudio('12.0',
+                 vc_version='12.0',
+                 sdk_version='8.1A',
+                 hkeys=[r'Microsoft\VisualStudio\12.0\Setup\VS\ProductDir'],
+                 common_tools_var='VS120COMNTOOLS',
+                 executable_path=r'Common7\IDE\devenv.com',
+                 batch_file_path=r'Common7\Tools\vsvars32.bat',
+                 supported_arch=['x86', 'amd64'],
+    ),
+
+    # Visual C++ 2013 Express Edition (for Desktop)
+    VisualStudio('12.0Exp',
+                 vc_version='12.0',
+                 sdk_version='8.1A',
+                 hkeys=[r'Microsoft\VisualStudio\12.0\Setup\VS\ProductDir'],
+                 common_tools_var='VS120COMNTOOLS',
+                 executable_path=r'Common7\IDE\WDExpress.exe',
+                 batch_file_path=r'Common7\Tools\vsvars32.bat',
+                 supported_arch=['x86', 'amd64'],
+    ),
+
+    # Visual Studio 2012
     VisualStudio('11.0',
-                 sdk_version='6.1',
+                 sdk_version='8.0A',
                  hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
                  common_tools_var='VS110COMNTOOLS',
                  executable_path=r'Common7\IDE\devenv.com',
                  batch_file_path=r'Common7\Tools\vsvars32.bat',
-                 default_dirname='Microsoft Visual Studio 11',
                  supported_arch=['x86', 'amd64'],
     ),
 
-    # Visual C++ 11 Express Edition
-    # The batch file we look for is in the VC directory,
-    # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
+    # Visual C++ 2012 Express Edition (for Desktop)
     VisualStudio('11.0Exp',
                  vc_version='11.0',
-                 sdk_version='6.1',
-                 hkeys=[r'Microsoft\VCExpress\11.0\Setup\VS\ProductDir'],
+                 sdk_version='8.0A',
+                 hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'],
                  common_tools_var='VS110COMNTOOLS',
-                 executable_path=r'Common7\IDE\VCExpress.exe',
+                 executable_path=r'Common7\IDE\WDExpress.exe',
                  batch_file_path=r'Common7\Tools\vsvars32.bat',
-                 default_dirname='Microsoft Visual Studio 11',
-                 supported_arch=['x86'],
+                 supported_arch=['x86', 'amd64'],
     ),
 
     # Visual Studio 2010
-    # The batch file we look for is in the VC directory,
-    # so the devenv.com executable is up in ..\..\Common7\IDE.
     VisualStudio('10.0',
-                 sdk_version='6.1',
+                 sdk_version='7.0A',
                  hkeys=[r'Microsoft\VisualStudio\10.0\Setup\VS\ProductDir'],
                  common_tools_var='VS100COMNTOOLS',
                  executable_path=r'Common7\IDE\devenv.com',
                  batch_file_path=r'Common7\Tools\vsvars32.bat',
-                 default_dirname='Microsoft Visual Studio 10',
                  supported_arch=['x86', 'amd64'],
     ),
 
     # Visual C++ 2010 Express Edition
-    # The batch file we look for is in the VC directory,
-    # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
     VisualStudio('10.0Exp',
                  vc_version='10.0',
-                 sdk_version='6.1',
+                 sdk_version='7.0A',
                  hkeys=[r'Microsoft\VCExpress\10.0\Setup\VS\ProductDir'],
                  common_tools_var='VS100COMNTOOLS',
                  executable_path=r'Common7\IDE\VCExpress.exe',
                  batch_file_path=r'Common7\Tools\vsvars32.bat',
-                 default_dirname='Microsoft Visual Studio 10',
                  supported_arch=['x86'],
     ),
 
     # Visual Studio 2008
-    # The batch file we look for is in the VC directory,
-    # so the devenv.com executable is up in ..\..\Common7\IDE.
     VisualStudio('9.0',
-                 sdk_version='6.1',
+                 sdk_version='6.0A',
                  hkeys=[r'Microsoft\VisualStudio\9.0\Setup\VS\ProductDir'],
                  common_tools_var='VS90COMNTOOLS',
                  executable_path=r'Common7\IDE\devenv.com',
                  batch_file_path=r'Common7\Tools\vsvars32.bat',
-                 default_dirname='Microsoft Visual Studio 9',
                  supported_arch=['x86', 'amd64'],
     ),
 
     # Visual C++ 2008 Express Edition
-    # The batch file we look for is in the VC directory,
-    # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
     VisualStudio('9.0Exp',
                  vc_version='9.0',
-                 sdk_version='6.1',
+                 sdk_version='6.0A',
                  hkeys=[r'Microsoft\VCExpress\9.0\Setup\VS\ProductDir'],
                  common_tools_var='VS90COMNTOOLS',
                  executable_path=r'Common7\IDE\VCExpress.exe',
                  batch_file_path=r'Common7\Tools\vsvars32.bat',
-                 default_dirname='Microsoft Visual Studio 9',
                  supported_arch=['x86'],
     ),
 
     # Visual Studio 2005
-    # The batch file we look for is in the VC directory,
-    # so the devenv.com executable is up in ..\..\Common7\IDE.
     VisualStudio('8.0',
                  sdk_version='6.0A',
                  hkeys=[r'Microsoft\VisualStudio\8.0\Setup\VS\ProductDir'],
@@ -306,8 +322,6 @@ SupportedVSList = [
     ),
 
     # Visual C++ 2005 Express Edition
-    # The batch file we look for is in the VC directory,
-    # so the VCExpress.exe executable is up in ..\..\Common7\IDE.
     VisualStudio('8.0Exp',
                  vc_version='8.0Exp',
                  sdk_version='6.0A',
@@ -320,8 +334,6 @@ SupportedVSList = [
     ),
 
     # Visual Studio .NET 2003
-    # The batch file we look for is in the Common7\Tools directory,
-    # so the devenv.com executable is next door in ..\IDE.
     VisualStudio('7.1',
                  sdk_version='6.0',
                  hkeys=[r'Microsoft\VisualStudio\7.1\Setup\VS\ProductDir'],
@@ -333,8 +345,6 @@ SupportedVSList = [
     ),
 
     # Visual Studio .NET
-    # The batch file we look for is in the Common7\Tools directory,
-    # so the devenv.com executable is next door in ..\IDE.
     VisualStudio('7.0',
                  sdk_version='2003R2',
                  hkeys=[r'Microsoft\VisualStudio\7.0\Setup\VS\ProductDir'],
@@ -393,11 +403,11 @@ def reset_installed_visual_studios():
     InstalledVSMap  = None
     for vs in SupportedVSList:
         vs.reset()
-        
+
     # Need to clear installed VC's as well as they are used in finding
     # installed VS's
     SCons.Tool.MSCommon.vc.reset_installed_vcs()
-        
+
 
 # We may be asked to update multiple construction environments with
 # SDK information.  When doing this, we check on-disk for whether
@@ -462,7 +472,7 @@ def get_default_version(env):
 
     If no version was requested by the user through the MSVS environment
     variable, query all the available the visual studios through
-    query_versions, and take the highest one.
+    get_installed_visual_studios, and take the highest one.
 
     Return
     ------
@@ -470,6 +480,7 @@ def get_default_version(env):
         the default version.
     """
     if 'MSVS' not in env or not SCons.Util.is_Dict(env['MSVS']):
+        # get all versions, and remember them for speed later
         versions = [vs.version for vs in get_installed_visual_studios()]
         env['MSVS'] = {'VERSIONS' : versions}
     else:
@@ -479,6 +490,8 @@ def get_default_version(env):
         if versions:
             env['MSVS_VERSION'] = versions[0] #use highest version by default
         else:
+            debug('get_default_version: WARNING: no installed versions found, '
+                  'using first in SupportedVSList (%s)'%SupportedVSList[0].version)
             env['MSVS_VERSION'] = SupportedVSList[0].version
 
     env['MSVS']['VERSION'] = env['MSVS_VERSION']
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/Perforce.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/Perforce.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/Perforce.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/Perforce.py
index ade9e88a74685e489ee957565c1a568a51b018c1..ddff25fed3b366b2da687a59ef37d9b1fcf216c9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/Perforce.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/Perforce.py
@@ -8,7 +8,7 @@ selection method.
 
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/Perforce.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/Perforce.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/PharLapCommon.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/PharLapCommon.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/PharLapCommon.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/PharLapCommon.py
index 0f54a2ba94c7c4fc0cee97252fd1b933847e40b8..576dea1aee75fd1b5d05aa3f8fa3a763fcabad41 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/PharLapCommon.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/PharLapCommon.py
@@ -7,7 +7,7 @@ Phar Lap ETS tool chain.  Right now, this is linkloc and
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ Phar Lap ETS tool chain.  Right now, this is linkloc and
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/PharLapCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/PharLapCommon.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/RCS.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/RCS.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/RCS.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/RCS.py
index cc33a4eeaf74cf0c8e0a7153c6bf7be055545214..d63bcd4c14d3148c50011bd34065e009f7709c04 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/RCS.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/RCS.py
@@ -8,7 +8,7 @@ selection method.
 
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/RCS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/RCS.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/SCCS.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/SCCS.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/SCCS.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/SCCS.py
index 5e35a875819e4323914a307e01ea91298b6e0c97..76f69e7f912e42afa2c8922c50ab05ccae53b9d8 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/SCCS.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/SCCS.py
@@ -8,7 +8,7 @@ selection method.
 
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/SCCS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/SCCS.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/Subversion.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/Subversion.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/Subversion.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/Subversion.py
index 212850fe353d79cd719584479e802691d9ed574e..85470b17fb2a4f43c327c08bcec9e5bd0f70f680 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/Subversion.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/Subversion.py
@@ -8,7 +8,7 @@ selection method.
 
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/Subversion.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/Subversion.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/__init__.py
similarity index 76%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/__init__.py
index 5bee64dd9a5346c0a534aefa21e7c78630aff130..bb9729a1cdde799b5b0094aa051f744d0ffa716d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/__init__.py
@@ -14,7 +14,7 @@ tool definition.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -35,10 +35,13 @@ tool definition.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import imp
 import sys
+import re
+import os
+import shutil
 
 import SCons.Builder
 import SCons.Errors
@@ -233,6 +236,151 @@ def createStaticLibBuilder(env):
 
     return static_lib
 
+def VersionShLibLinkNames(version, libname, env):
+    """Generate names of symlinks to the versioned shared library"""
+    Verbose = False
+    platform = env.subst('$PLATFORM')
+    shlib_suffix = env.subst('$SHLIBSUFFIX')
+    shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS'))
+
+    linknames = []
+    if version.count(".") != 2:
+        # We need a version string of the form x.y.z to proceed
+        # Several changes need to be made to support versions like x.y
+        raise ValueError
+
+    if platform == 'darwin':
+        # For libfoo.x.y.z.dylib, linknames libfoo.so
+        suffix_re = re.escape('.' + version + shlib_suffix)
+        linkname = re.sub(suffix_re, shlib_suffix, libname)
+        if Verbose:
+            print "VersionShLibLinkNames: linkname = ",linkname
+        linknames.append(linkname)
+    elif platform == 'posix' or platform == 'sunos':
+        if sys.platform.startswith('openbsd'):
+            # OpenBSD uses x.y shared library versioning numbering convention
+            # and doesn't use symlinks to backwards-compatible libraries
+            return []
+        # For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x
+        suffix_re = re.escape(shlib_suffix + '.' + version)
+        # First linkname has no version number
+        linkname = re.sub(suffix_re, shlib_suffix, libname)
+        if Verbose:
+            print "VersionShLibLinkNames: linkname = ",linkname
+        linknames.append(linkname)
+        versionparts = version.split('.')
+        major_name = linkname + "." + versionparts[0]
+        minor_name = major_name + "." + versionparts[1]
+        #Only add link for major_name
+        #for linkname in [major_name, minor_name]:
+        for linkname in [major_name, ]:
+            if Verbose:
+                print "VersionShLibLinkNames: linkname ",linkname, ", target ",libname
+            linknames.append(linkname)
+    # note: no Windows case here (win32 or cygwin);
+    # MSVC doesn't support this type of versioned shared libs.
+    # (could probably do something for MinGW though)
+    return linknames
+
+def VersionedSharedLibrary(target = None, source= None, env=None):
+    """Build a shared library. If the environment has SHLIBVERSION
+defined make a versioned shared library and create the appropriate
+symlinks for the platform we are on"""
+    Verbose = False
+    try:
+        version = env.subst('$SHLIBVERSION')
+    except KeyError:
+        version = None
+
+    # libname includes the version number if one was given
+    libname = getattr(target[0].attributes, 'shlibname', target[0].name)
+    platform = env.subst('$PLATFORM')
+    shlib_suffix = env.subst('$SHLIBSUFFIX')
+    shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS'))
+    if Verbose:
+        print "VersionShLib: libname      = ",libname
+        print "VersionShLib: platform     = ",platform
+        print "VersionShLib: shlib_suffix = ",shlib_suffix
+        print "VersionShLib: target = ",str(target[0])
+
+    if version:
+        # set the shared library link flags
+        if platform == 'posix':
+            shlink_flags += [ '-Wl,-Bsymbolic' ]
+            # OpenBSD doesn't usually use SONAME for libraries
+            if not sys.platform.startswith('openbsd'):
+                # continue setup of shlink flags for all other POSIX systems
+                suffix_re = re.escape(shlib_suffix + '.' + version)
+                (major, age, revision) = version.split(".")
+                # soname will have only the major version number in it
+                soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major
+                shlink_flags += [ '-Wl,-soname=%s' % soname ]
+                if Verbose:
+                    print " soname ",soname,", shlink_flags ",shlink_flags
+        elif platform == 'sunos':
+            suffix_re = re.escape(shlib_suffix + '.' + version)
+            (major, age, revision) = version.split(".")
+            soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major
+            shlink_flags += [ '-h', soname ]
+        elif platform == 'cygwin':
+            shlink_flags += [ '-Wl,-Bsymbolic',
+                              '-Wl,--out-implib,${TARGET.base}.a' ]
+        elif platform == 'darwin':
+            shlink_flags += [ '-current_version', '%s' % version,
+                              '-compatibility_version', '%s' % version,
+                              '-undefined', 'dynamic_lookup' ]
+        if Verbose:
+            print "VersionShLib: shlink_flags = ",shlink_flags
+        envlink = env.Clone()
+        envlink['SHLINKFLAGS'] = shlink_flags
+    else:
+        envlink = env
+
+    result = SCons.Defaults.ShLinkAction(target, source, envlink)
+
+    if version:
+        # here we need the full pathname so the links end up in the right directory
+        libname = getattr(target[0].attributes, 'shlibpath', target[0].get_internal_path())
+        if Verbose:
+            print "VerShLib: target lib is = ", libname
+            print "VerShLib: name is = ", target[0].name
+            print "VerShLib: dir is = ", target[0].dir.path
+        linknames = VersionShLibLinkNames(version, libname, env)
+        if Verbose:
+            print "VerShLib: linknames ",linknames
+        # Here we just need the file name w/o path as the target of the link
+        lib_ver = getattr(target[0].attributes, 'shlibname', target[0].name)
+        # make symlink of adjacent names in linknames
+        for count in range(len(linknames)):
+            linkname = linknames[count]
+            if count > 0:
+                try:
+                    os.remove(lastlinkname)
+                except:
+                    pass
+                os.symlink(os.path.basename(linkname),lastlinkname)
+                if Verbose:
+                    print "VerShLib: made sym link of %s -> %s" % (lastlinkname,linkname)
+            lastlinkname = linkname
+        # finish chain of sym links with link to the actual library
+        if len(linknames)>0:
+            try:
+                os.remove(lastlinkname)
+            except:
+                pass
+            os.symlink(lib_ver,lastlinkname)
+            if Verbose:
+                print "VerShLib: made sym link of %s -> %s" % (linkname, lib_ver)
+    return result
+
+# Fix http://scons.tigris.org/issues/show_bug.cgi?id=2903 :
+# Ensure we still depend on SCons.Defaults.ShLinkAction command line which is $SHLINKCOM.
+# This was tricky because we don't want changing LIBPATH to cause a rebuild, but
+# changing other link args should.  LIBPATH has $( ... $) around it but until this
+# fix, when the varlist was added to the build sig those ignored parts weren't getting
+# ignored.
+ShLibAction = SCons.Action.Action(VersionedSharedLibrary, None, varlist=['SHLINKCOM'])
+
 def createSharedLibBuilder(env):
     """This is a utility function that creates the SharedLibrary
     Builder in an Environment if it is not there already.
@@ -245,7 +393,7 @@ def createSharedLibBuilder(env):
     except KeyError:
         import SCons.Defaults
         action_list = [ SCons.Defaults.SharedCheck,
-                        SCons.Defaults.ShLinkAction ]
+                        ShLibAction ]
         shared_lib = SCons.Builder.Builder(action = action_list,
                                            emitter = "$SHLIBEMITTER",
                                            prefix = '$SHLIBPREFIX',
@@ -527,13 +675,16 @@ class ToolInitializer(object):
 	# the ToolInitializer class.
 
 def Initializers(env):
-    ToolInitializer(env, ['install'], ['_InternalInstall', '_InternalInstallAs'])
+    ToolInitializer(env, ['install'], ['_InternalInstall', '_InternalInstallAs', '_InternalInstallVersionedLib'])
     def Install(self, *args, **kw):
         return self._InternalInstall(*args, **kw)
     def InstallAs(self, *args, **kw):
         return self._InternalInstallAs(*args, **kw)
+    def InstallVersionedLib(self, *args, **kw):
+        return self._InternalInstallVersionedLib(*args, **kw)
     env.AddMethod(Install)
     env.AddMethod(InstallAs)
+    env.AddMethod(InstallVersionedLib)
 
 def FindTool(tools, env):
     for tool in tools:
@@ -563,7 +714,7 @@ def tool_list(platform, env):
         assemblers = ['masm', 'nasm', 'gas', '386asm' ]
         fortran_compilers = ['gfortran', 'g77', 'ifl', 'cvf', 'f95', 'f90', 'fortran']
         ars = ['mslib', 'ar', 'tlib']
-        other_plat_tools=['msvs','midl']
+        other_plat_tools = ['msvs', 'midl']
     elif str(platform) == 'os2':
         "prefer IBM tools on OS/2"
         linkers = ['ilink', 'gnulink', ]#'mslink']
@@ -613,6 +764,14 @@ def tool_list(platform, env):
         assemblers = ['as']
         fortran_compilers = ['gfortran', 'f95', 'f90', 'g77']
         ars = ['ar']
+    elif str(platform) == 'cygwin':
+        "prefer GNU tools on Cygwin, except for a platform-specific linker"
+        linkers = ['cyglink', 'mslink', 'ilink']
+        c_compilers = ['gcc', 'msvc', 'intelc', 'icc', 'cc']
+        cxx_compilers = ['g++', 'msvc', 'intelc', 'icc', 'c++']
+        assemblers = ['gas', 'nasm', 'masm']
+        fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
+        ars = ['ar', 'mslib']
     else:
         "prefer GNU tools on all other platforms"
         linkers = ['gnulink', 'mslink', 'ilink']
@@ -622,6 +781,9 @@ def tool_list(platform, env):
         fortran_compilers = ['gfortran', 'g77', 'ifort', 'ifl', 'f95', 'f90', 'f77']
         ars = ['ar', 'mslib']
 
+    if not str(platform) == 'win32':
+        other_plat_tools += ['m4', 'rpm']
+
     c_compiler = FindTool(c_compilers, env) or c_compilers[0]
 
     # XXX this logic about what tool provides what should somehow be
@@ -645,12 +807,13 @@ def tool_list(platform, env):
         fortran_compiler = FindTool(fortran_compilers, env) or fortran_compilers[0]
         ar = FindTool(ars, env) or ars[0]
 
+    d_compilers = ['dmd', 'gdc', 'ldc']
+    d_compiler = FindTool(d_compilers, env) or d_compilers[0]
+
     other_tools = FindAllTools(other_plat_tools + [
-                               'dmd',
                                #TODO: merge 'install' into 'filesystem' and
                                # make 'filesystem' the default
                                'filesystem',
-                               'm4',
                                'wix', #'midl', 'msvs',
                                # Parser generators
                                'lex', 'yacc',
@@ -662,14 +825,14 @@ def tool_list(platform, env):
                                'dvipdf', 'dvips', 'gs',
                                'tex', 'latex', 'pdflatex', 'pdftex',
                                # Archivers
-                               'tar', 'zip', 'rpm',
+                               'tar', 'zip',
                                # SourceCode factories
                                'BitKeeper', 'CVS', 'Perforce',
                                'RCS', 'SCCS', # 'Subversion',
                                ], env)
 
     tools = ([linker, c_compiler, cxx_compiler,
-              fortran_compiler, assembler, ar]
+              fortran_compiler, assembler, ar, d_compiler]
              + other_tools)
 
     return [x for x in tools if x]
@@ -679,3 +842,4 @@ def tool_list(platform, env):
 # indent-tabs-mode:nil
 # End:
 # vim: set expandtab tabstop=4 shiftwidth=4:
+
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixc++.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixc++.py
similarity index 72%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixc++.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixc++.py
index fecfe766f75d14d5e3e6780dc9ed958a742a645d..864fcdffe594ec3d2651e3f4a59003d5abd82626 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixc++.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixc++.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/aixc++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/aixc++.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
@@ -43,32 +43,25 @@ packages = ['vacpp.cmp.core', 'vacpp.cmp.batch', 'vacpp.cmp.C', 'ibmcxx.cmp']
 
 def get_xlc(env):
     xlc = env.get('CXX', 'xlC')
-    xlc_r = env.get('SHCXX', 'xlC_r')
-    return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages)
-
-def smart_cxxflags(source, target, env, for_signature):
-    build_dir = env.GetBuildPath()
-    if build_dir:
-        return '-qtempinc=' + os.path.join(build_dir, 'tempinc')
-    return ''
+    return SCons.Platform.aix.get_xlc(env, xlc, packages)
 
 def generate(env):
     """Add Builders and construction variables for xlC / Visual Age
     suite to an Environment."""
-    path, _cxx, _shcxx, version = get_xlc(env)
-    if path:
+    path, _cxx, version = get_xlc(env)
+    if path and _cxx:
         _cxx = os.path.join(path, _cxx)
-        _shcxx = os.path.join(path, _shcxx)
+
+    if 'CXX' not in env:
+        env['CXX'] = _cxx
 
     cplusplus.generate(env)
 
-    env['CXX'] = _cxx
-    env['SHCXX'] = _shcxx
-    env['CXXVERSION'] = version
-    env['SHOBJSUFFIX'] = '.pic.o'
+    if version:
+        env['CXXVERSION'] = version
     
 def exists(env):
-    path, _cxx, _shcxx, version = get_xlc(env)
+    path, _cxx, version = get_xlc(env)
     if path and _cxx:
         xlc = os.path.join(path, _cxx)
         if os.path.exists(xlc):
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixcc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixcc.py
similarity index 78%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixcc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixcc.py
index d611fdcf093b67a13f23bbe34791b7aac7a554b3..02e06499fb07e55aa5a64907d3f0cb7069c31bf3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixcc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixcc.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/aixcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/aixcc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
@@ -42,25 +42,25 @@ packages = ['vac.C', 'ibmcxx.cmp']
 
 def get_xlc(env):
     xlc = env.get('CC', 'xlc')
-    xlc_r = env.get('SHCC', 'xlc_r')
-    return SCons.Platform.aix.get_xlc(env, xlc, xlc_r, packages)
+    return SCons.Platform.aix.get_xlc(env, xlc, packages)
 
 def generate(env):
     """Add Builders and construction variables for xlc / Visual Age
     suite to an Environment."""
-    path, _cc, _shcc, version = get_xlc(env)
-    if path:
+    path, _cc, version = get_xlc(env)
+    if path and _cc:
         _cc = os.path.join(path, _cc)
-        _shcc = os.path.join(path, _shcc)
+
+    if 'CC' not in env:
+        env['CC'] = _cc
 
     cc.generate(env)
 
-    env['CC'] = _cc
-    env['SHCC'] = _shcc
-    env['CCVERSION'] = version
+    if version:
+        env['CCVERSION'] = version
 
 def exists(env):
-    path, _cc, _shcc, version = get_xlc(env)
+    path, _cc, version = get_xlc(env)
     if path and _cc:
         xlc = os.path.join(path, _cc)
         if os.path.exists(xlc):
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixf77.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixf77.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixf77.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixf77.py
index c3e062e00bffccf6581b0850bb68adfa1d296521..5327cf737a5dcdae246d6c330f90e07c1e86a52a 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixf77.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixf77.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/aixf77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/aixf77.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixlink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixlink.py
similarity index 80%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixlink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixlink.py
index 3a064bd2c7bf16ae76db8978a33f191970e4f2ef..7ad9cc61e2806ff245e70c723b07e44c5e4b30c6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/aixlink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/aixlink.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,14 +30,13 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/aixlink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/aixlink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
 
 import SCons.Util
 
-import aixcc
 import link
 
 cplusplus = __import__('c++', globals(), locals(), [])
@@ -62,12 +61,14 @@ def generate(env):
     env['SHLIBSUFFIX']    = '.a'
 
 def exists(env):
-    path, _cc, _shcc, version = aixcc.get_xlc(env)
-    if path and _cc:
-        xlc = os.path.join(path, _cc)
-        if os.path.exists(xlc):
-            return xlc
-    return None
+    # TODO: sync with link.smart_link() to choose a linker
+    linkers = { 'CXX': ['aixc++'], 'CC': ['aixcc'] }
+    alltools = []
+    for langvar, linktools in linkers.items():
+        if langvar in env: # use CC over CXX when user specified CC but not CXX
+            return SCons.Tool.FindTool(linktools, env)
+        alltools.extend(linktools)
+    return SCons.Tool.FindTool(alltools, env)
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/applelink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/applelink.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/applelink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/applelink.py
index 7b0cc176804bc708fe6d79ae12c8a5d433f28aad..9ef1b7519f6d14c40aa14cb38af602876147808c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/applelink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/applelink.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/applelink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/applelink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ar.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ar.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ar.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ar.py
index 655e56b60192522dee81ea50ab688e7b9f679193..2d7f7b9814902336301cb51dbae0bf6226417075 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ar.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ar.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/ar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/ar.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/as.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/as.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/as.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/as.py
index 6275d81367f61d39a11f0284a41a3b4b3bf12984..6c7304f1c419c030db3ffb639b0ab4c4fa253167 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/as.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/as.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/as.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/as.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/bcc32.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/bcc32.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/bcc32.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/bcc32.py
index c426e79e198184f287b3bf929af8e06c967123cc..a8295a350415324ff038d09ce1eb933d62866dbc 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/bcc32.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/bcc32.py
@@ -5,7 +5,7 @@ XXX
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ XXX
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/bcc32.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/bcc32.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/c++.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/c++.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/c++.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/c++.py
index 8cd1dea29dcbd4eea533dc6fb1a601496075c17e..580bf9cd03adf1d692009b45a3c06865cf26b512 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/c++.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/c++.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/c++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/c++.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
@@ -72,7 +72,8 @@ def generate(env):
 
     SCons.Tool.cc.add_common_cc_variables(env)
 
-    env['CXX']        = 'c++'
+    if 'CXX' not in env:
+        env['CXX']    = env.Detect(compilers) or compilers[0]
     env['CXXFLAGS']   = SCons.Util.CLVar('')
     env['CXXCOM']     = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
     env['SHCXX']      = '$CXX'
@@ -90,7 +91,7 @@ def generate(env):
     env['CXXFILESUFFIX'] = '.cc'
 
 def exists(env):
-    return env.Detect(compilers)
+    return env.Detect(env.get('CXX', compilers))
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/cc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cc.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/cc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cc.py
index 806f25131159a6c272c0c62632f9374081072928..7332ad0ce730ccc520da547eff77e300ca4e6c02 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/cc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cc.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/cc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/cc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Tool
 import SCons.Defaults
@@ -62,6 +62,8 @@ def add_common_cc_variables(env):
     if 'SHCCFLAGS' not in env:
         env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
 
+compilers = ['cc']
+
 def generate(env):
     """
     Add Builders and construction variables for C compilers to an Environment.
@@ -76,7 +78,8 @@ def generate(env):
 
     add_common_cc_variables(env)
 
-    env['CC']        = 'cc'
+    if 'CC' not in env:
+        env['CC']    = env.Detect(compilers) or compilers[0]
     env['CFLAGS']    = SCons.Util.CLVar('')
     env['CCCOM']     = '$CC -o $TARGET -c $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'
     env['SHCC']      = '$CC'
@@ -93,7 +96,7 @@ def generate(env):
     env['CFILESUFFIX'] = '.c'
 
 def exists(env):
-    return env.Detect('cc')
+    return env.Detect(env.get('CC', compilers))
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/cvf.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cvf.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/cvf.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cvf.py
index 2dcf195e1810919f031f7d91ff96afc18361e5da..89ac9fb4b5405a9312dc90dcc59987315126a3dd 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/cvf.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cvf.py
@@ -5,7 +5,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/cvf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/cvf.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import fortran
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cyglink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cyglink.py
new file mode 100644
index 0000000000000000000000000000000000000000..87716cf940576f579b8bdbc1102417f2bf7166cd
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/cyglink.py
@@ -0,0 +1,94 @@
+"""SCons.Tool.cyglink
+
+Customization of gnulink for Cygwin (http://www.cygwin.com/)
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+
+import SCons.Action
+import SCons.Util
+
+import gnulink
+
+def shlib_generator(target, source, env, for_signature):
+    cmd = SCons.Util.CLVar(['$SHLINK']) 
+
+    dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+    if dll: cmd.extend(['-o', dll])
+
+    cmd.extend(['$SHLINKFLAGS', '$__RPATH'])
+
+    implib = env.FindIxes(target, 'IMPLIBPREFIX', 'IMPLIBSUFFIX')
+    if implib:
+        cmd.extend([
+            '-Wl,--out-implib='+implib.get_string(for_signature),
+            '-Wl,--export-all-symbols',
+            '-Wl,--enable-auto-import',
+            '-Wl,--whole-archive', '$SOURCES',
+            '-Wl,--no-whole-archive', '$_LIBDIRFLAGS', '$_LIBFLAGS'
+            ])
+    else:
+        cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
+    
+    return [cmd]
+
+def shlib_emitter(target, source, env):
+    dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+    no_import_lib = env.get('no_import_lib', 0)
+
+    if not dll or len(target) > 1:
+        raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX"))
+    
+    # Remove any "lib" after the prefix
+    pre = env.subst('$SHLIBPREFIX')
+    if dll.name[len(pre):len(pre)+3] == 'lib':
+        dll.name = pre + dll.name[len(pre)+3:]
+
+    orig_target = target
+    target = [env.fs.File(dll)]
+    target[0].attributes.shared = 1
+
+    # Append an import lib target
+    if not no_import_lib:
+        # Create list of target libraries as strings
+        target_strings = env.ReplaceIxes(orig_target[0],
+                                         'SHLIBPREFIX', 'SHLIBSUFFIX',
+                                         'IMPLIBPREFIX', 'IMPLIBSUFFIX')
+        
+        implib_target = env.fs.File(target_strings)
+        implib_target.attributes.shared = 1
+        target.append(implib_target)
+
+    return (target, source)
+                         
+
+shlib_action = SCons.Action.Action(shlib_generator, generator=1)
+
+def generate(env):
+    """Add Builders and construction variables for cyglink to an Environment."""
+    gnulink.generate(env)
+
+    env['LINKFLAGS']   = SCons.Util.CLVar('-Wl,-no-undefined')
+
+    env['SHLINKCOM'] = shlib_action
+    env['LDMODULECOM'] = shlib_action
+    env.Append(SHLIBEMITTER = [shlib_emitter])
+
+    env['SHLIBPREFIX']         = 'cyg'
+    env['SHLIBSUFFIX']         = '.dll'
+
+    env['IMPLIBPREFIX']        = 'lib'
+    env['IMPLIBSUFFIX']        = '.dll.a'
+
+def exists(env):
+    return gnulink.exists(env)
+
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/default.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/default.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/default.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/default.py
index 292bd0ba3cc90b01117edc03a7ddaf7ce912adcf..35e872c6ac24bb2e4a52e629119d03b9292052a2 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/default.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/default.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/default.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/default.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Tool
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dmd.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dmd.py
new file mode 100644
index 0000000000000000000000000000000000000000..327da1504b922da1a7d4cb77923f2ecda455bca9
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dmd.py
@@ -0,0 +1,152 @@
+"""SCons.Tool.dmd
+
+Tool-specific initialization for the Digital Mars D compiler.
+(http://digitalmars.com/d)
+
+Originally coded by Andy Friesen (andy@ikagames.com)
+15 November 2003
+
+Evolved by Russel Winder (russel@winder.org.uk)
+2010-02-07 onwards
+
+There are a number of problems with this script at this point in time.
+The one that irritates the most is the Windows linker setup.  The D
+linker doesn't have a way to add lib paths on the commandline, as far
+as I can see.  You have to specify paths relative to the SConscript or
+use absolute paths.  To hack around it, add '#/blah'.  This will link
+blah.lib from the directory where SConstruct resides.
+
+Compiler variables:
+    DC - The name of the D compiler to use.  Defaults to dmd or gdmd,
+        whichever is found.
+    DPATH - List of paths to search for import modules.
+    DVERSIONS - List of version tags to enable when compiling.
+    DDEBUG - List of debug tags to enable when compiling.
+
+Linker related variables:
+    LIBS - List of library files to link in.
+    DLINK - Name of the linker to use.  Defaults to dmd or gdmd,
+        whichever is found.
+    DLINKFLAGS - List of linker flags.
+
+Lib tool variables:
+    DLIB - Name of the lib tool to use.  Defaults to lib.
+    DLIBFLAGS - List of flags to pass to the lib tool.
+    LIBS - Same as for the linker. (libraries to pull into the .lib)
+"""
+
+#
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Tool/dmd.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+import os
+import subprocess
+
+import SCons.Action
+import SCons.Builder
+import SCons.Defaults
+import SCons.Scanner.D
+import SCons.Tool
+
+import SCons.Tool.DCommon
+
+
+def generate(env):
+    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
+
+    static_obj.add_action('.d', SCons.Defaults.DAction)
+    shared_obj.add_action('.d', SCons.Defaults.ShDAction)
+    static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter)
+    shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter)
+
+    env['DC'] = env.Detect(['dmd', 'gdmd'])
+    env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of$TARGET $SOURCES'
+    env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}'
+    env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}'
+    env['_DDEBUGFLAGS'] = '${_concat(DDEBUGPREFIX, DDEBUG, DDEBUGSUFFIX, __env__)}'
+    env['_DFLAGS'] = '${_concat(DFLAGPREFIX, DFLAGS, DFLAGSUFFIX, __env__)}'
+
+    env['SHDC'] = '$DC'
+    env['SHDCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -fPIC -of$TARGET $SOURCES'
+
+    env['DPATH'] = ['#/']
+    env['DFLAGS'] = []
+    env['DVERSIONS'] = []
+    env['DDEBUG'] = []
+
+    if env['DC']:
+        SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
+
+    env['DINCPREFIX'] = '-I'
+    env['DINCSUFFIX'] = ''
+    env['DVERPREFIX'] = '-version='
+    env['DVERSUFFIX'] = ''
+    env['DDEBUGPREFIX'] = '-debug='
+    env['DDEBUGSUFFIX'] = ''
+    env['DFLAGPREFIX'] = '-'
+    env['DFLAGSUFFIX'] = ''
+    env['DFILESUFFIX'] = '.d'
+
+    env['DLINK'] = '$DC'
+    env['DLINKFLAGS'] = SCons.Util.CLVar('')
+    env['DLINKCOM'] = '$DLINK -of$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
+
+    env['DSHLINK'] = '$DC'
+    env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=libphobos2.so')
+    env['SHDLINKCOM'] = '$DLINK -of$TARGET $DSHLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
+
+    env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l'
+    env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else ''
+    env['_DLIBFLAGS'] = '${_stripixes(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES,  __env__)}'
+
+    env['DLIBDIRPREFIX'] = '-L-L'
+    env['DLIBDIRSUFFIX'] = ''
+    env['_DLIBDIRFLAGS'] = '${_concat(DLIBDIRPREFIX, LIBPATH, DLIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)}'
+
+
+    env['DLIB'] = 'lib' if env['PLATFORM'] == 'win32' else 'ar cr'
+    env['DLIBCOM'] = '$DLIB $_DLIBFLAGS {0}$TARGET $SOURCES $_DLIBFLAGS'.format('-c ' if env['PLATFORM'] == 'win32' else '')
+
+    #env['_DLIBFLAGS'] = '${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)}'
+
+    env['DLIBFLAGPREFIX'] = '-'
+    env['DLIBFLAGSUFFIX'] = ''
+
+    # __RPATH is set to $_RPATH in the platform specification if that
+    # platform supports it.
+    env['DRPATHPREFIX'] = '-L-rpath='
+    env['DRPATHSUFFIX'] = ''
+    env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}'
+
+    SCons.Tool.createStaticLibBuilder(env)
+
+
+def exists(env):
+    return env.Detect(['dmd', 'gdmd'])
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/docbook/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/docbook/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..aead43c6969b612c8f18f856893535003081b48c
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/docbook/__init__.py
@@ -0,0 +1,882 @@
+
+"""SCons.Tool.docbook
+
+Tool-specific initialization for Docbook.
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+
+#
+# Copyright (c) 2001-7,2010 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+import os
+import glob
+import re
+
+import SCons.Action
+import SCons.Builder
+import SCons.Defaults
+import SCons.Script
+import SCons.Tool
+import SCons.Util
+
+# Get full path to this script
+scriptpath = os.path.dirname(os.path.realpath(__file__))
+
+# Local folder for the collection of DocBook XSLs
+db_xsl_folder = 'docbook-xsl-1.76.1'
+
+# Do we have libxml2/libxslt/lxml?
+has_libxml2 = True
+has_lxml = True
+try:
+    import libxml2
+    import libxslt
+except:
+    has_libxml2 = False
+try:
+    import lxml
+except:
+    has_lxml = False
+
+# Set this to True, to prefer xsltproc over libxml2 and lxml
+prefer_xsltproc = False
+
+# Regexs for parsing Docbook XML sources of MAN pages
+re_manvolnum = re.compile("<manvolnum>([^<]*)</manvolnum>")
+re_refname = re.compile("<refname>([^<]*)</refname>")
+
+#
+# Helper functions
+#
+def __extend_targets_sources(target, source):
+    """ Prepare the lists of target and source files. """
+    if not SCons.Util.is_List(target):
+        target = [target]
+    if not source:
+        source = target[:]
+    elif not SCons.Util.is_List(source):
+        source = [source]
+    if len(target) < len(source):
+        target.extend(source[len(target):])
+        
+    return target, source
+
+def __init_xsl_stylesheet(kw, env, user_xsl_var, default_path):
+    if kw.get('DOCBOOK_XSL','') == '':
+        xsl_style = kw.get('xsl', env.subst(user_xsl_var))
+        if xsl_style == '':
+            path_args = [scriptpath, db_xsl_folder] + default_path
+            xsl_style = os.path.join(*path_args)
+        kw['DOCBOOK_XSL'] =  xsl_style
+    
+def __select_builder(lxml_builder, libxml2_builder, cmdline_builder):
+    """ Selects a builder, based on which Python modules are present. """
+    if prefer_xsltproc:
+        return cmdline_builder
+    
+    if not has_libxml2:
+        # At the moment we prefer libxml2 over lxml, the latter can lead
+        # to conflicts when installed together with libxml2.
+        if has_lxml:
+            return lxml_builder
+        else:
+            return cmdline_builder
+
+    return libxml2_builder
+
+def __ensure_suffix(t, suffix):
+    """ Ensure that the target t has the given suffix. """
+    tpath = str(t)
+    if not tpath.endswith(suffix):
+        return tpath+suffix
+    
+    return t
+
+def __ensure_suffix_stem(t, suffix):
+    """ Ensure that the target t has the given suffix, and return the file's stem. """
+    tpath = str(t)
+    if not tpath.endswith(suffix):
+        stem = tpath
+        tpath += suffix
+        
+        return tpath, stem
+    else:
+        stem, ext = os.path.splitext(tpath)
+    
+    return t, stem
+
+def __get_xml_text(root):
+    """ Return the text for the given root node (xml.dom.minidom). """
+    txt = ""
+    for e in root.childNodes:
+        if (e.nodeType == e.TEXT_NODE):
+            txt += e.data
+    return txt
+
+def __create_output_dir(base_dir):
+    """ Ensure that the output directory base_dir exists. """
+    root, tail = os.path.split(base_dir)
+    dir = None
+    if tail:
+        if base_dir.endswith('/'):
+            dir = base_dir
+        else:
+            dir = root
+    else:
+        if base_dir.endswith('/'):
+            dir = base_dir
+    
+    if dir and not os.path.isdir(dir):
+        os.makedirs(dir)
+
+
+#
+# Supported command line tools and their call "signature"
+#
+xsltproc_com = {'xsltproc' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE',
+                'saxon' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS',
+                'saxon-xslt' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS',
+                'xalan' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -q -out $TARGET -xsl $DOCBOOK_XSL -in $SOURCE'}
+xmllint_com = {'xmllint' : '$DOCBOOK_XMLLINT $DOCBOOK_XMLLINTFLAGS --xinclude $SOURCE > $TARGET'}
+fop_com = {'fop' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -fo $SOURCE -pdf $TARGET',
+           'xep' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -valid -fo $SOURCE -pdf $TARGET',
+           'jw' : '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -f docbook -b pdf $SOURCE -o $TARGET'}
+
+def __detect_cl_tool(env, chainkey, cdict):
+    """
+    Helper function, picks a command line tool from the list
+    and initializes its environment variables.
+    """
+    if env.get(chainkey,'') == '':
+        clpath = ''
+        for cltool in cdict:
+            clpath = env.WhereIs(cltool)
+            if clpath:
+                env[chainkey] = clpath
+                if not env[chainkey + 'COM']:
+                    env[chainkey + 'COM'] = cdict[cltool]
+
+def _detect(env):
+    """
+    Detect all the command line tools that we might need for creating
+    the requested output formats.
+    """
+    global prefer_xsltproc
+    
+    if env.get('DOCBOOK_PREFER_XSLTPROC',''):
+        prefer_xsltproc = True
+        
+    if ((not has_libxml2 and not has_lxml) or (prefer_xsltproc)):
+        # Try to find the XSLT processors
+        __detect_cl_tool(env, 'DOCBOOK_XSLTPROC', xsltproc_com)
+        __detect_cl_tool(env, 'DOCBOOK_XMLLINT', xmllint_com)
+
+    __detect_cl_tool(env, 'DOCBOOK_FOP', fop_com)
+
+#
+# Scanners
+#
+include_re = re.compile('fileref\\s*=\\s*["|\']([^\\n]*)["|\']')
+sentity_re = re.compile('<!ENTITY\\s+%*\\s*[^\\s]+\\s+SYSTEM\\s+["|\']([^\\n]*)["|\']>')
+ 
+def __xml_scan(node, env, path, arg):
+    """ Simple XML file scanner, detecting local images and XIncludes as implicit dependencies. """
+    # Does the node exist yet?
+    if not os.path.isfile(str(node)):
+        return []
+    
+    if env.get('DOCBOOK_SCANENT',''):
+        # Use simple pattern matching for system entities..., no support 
+        # for recursion yet.
+        contents = node.get_text_contents()
+        return sentity_re.findall(contents)
+
+    xsl_file = os.path.join(scriptpath,'utils','xmldepend.xsl')
+    if not has_libxml2 or prefer_xsltproc:
+        if has_lxml and not prefer_xsltproc:
+            
+            from lxml import etree
+            
+            xsl_tree = etree.parse(xsl_file)
+            doc = etree.parse(str(node))
+            result = doc.xslt(xsl_tree)
+
+            depfiles = [x.strip() for x in str(result).splitlines() if x.strip() != "" and not x.startswith("<?xml ")]
+            return depfiles
+        else:
+            # Try to call xsltproc
+            xsltproc = env.subst("$DOCBOOK_XSLTPROC")
+            if xsltproc and xsltproc.endswith('xsltproc'):
+                result = env.backtick(' '.join([xsltproc, xsl_file, str(node)]))
+                depfiles = [x.strip() for x in str(result).splitlines() if x.strip() != "" and not x.startswith("<?xml ")]
+                return depfiles
+            else:
+                # Use simple pattern matching, there is currently no support
+                # for xi:includes...
+                contents = node.get_text_contents()
+                return include_re.findall(contents)
+
+    styledoc = libxml2.parseFile(xsl_file)
+    style = libxslt.parseStylesheetDoc(styledoc)
+    doc = libxml2.readFile(str(node), None, libxml2.XML_PARSE_NOENT)
+    result = style.applyStylesheet(doc, None)
+
+    depfiles = []
+    for x in str(result).splitlines():
+        if x.strip() != "" and not x.startswith("<?xml "):
+            depfiles.extend(x.strip().split())
+    
+    style.freeStylesheet()
+    doc.freeDoc()
+    result.freeDoc()
+
+    return depfiles
+
+# Creating the instance of our XML dependency scanner
+docbook_xml_scanner = SCons.Script.Scanner(function = __xml_scan,
+                                           argument = None)
+
+
+#
+# Action generators
+#
+def __generate_xsltproc_action(source, target, env, for_signature):
+    cmd = env['DOCBOOK_XSLTPROCCOM']    
+    # Does the environment have a base_dir defined?
+    base_dir = env.subst('$base_dir')
+    if base_dir:
+        # Yes, so replace target path by its filename
+        return cmd.replace('$TARGET','${TARGET.file}')
+    return cmd
+
+
+#
+# Emitters
+#
+def __emit_xsl_basedir(target, source, env):
+    # Does the environment have a base_dir defined?
+    base_dir = env.subst('$base_dir')
+    if base_dir:
+        # Yes, so prepend it to each target
+        return [os.path.join(base_dir, str(t)) for t in target], source
+    
+    # No, so simply pass target and source names through
+    return target, source
+
+
+#
+# Builders
+#
+def __build_libxml2(target, source, env):
+    """
+    General XSLT builder (HTML/FO), using the libxml2 module.
+    """
+    xsl_style = env.subst('$DOCBOOK_XSL')
+    styledoc = libxml2.parseFile(xsl_style)
+    style = libxslt.parseStylesheetDoc(styledoc)
+    doc = libxml2.readFile(str(source[0]),None,libxml2.XML_PARSE_NOENT)
+    # Support for additional parameters
+    parampass = {}
+    if parampass:
+        result = style.applyStylesheet(doc, parampass)
+    else:
+        result = style.applyStylesheet(doc, None)
+    style.saveResultToFilename(str(target[0]), result, 0)
+    style.freeStylesheet()
+    doc.freeDoc()
+    result.freeDoc()
+
+    return None
+
+def __build_lxml(target, source, env):
+    """
+    General XSLT builder (HTML/FO), using the lxml module.
+    """
+    from lxml import etree
+    
+    xslt_ac = etree.XSLTAccessControl(read_file=True, 
+                                      write_file=True, 
+                                      create_dir=True, 
+                                      read_network=False, 
+                                      write_network=False)
+    xsl_style = env.subst('$DOCBOOK_XSL')
+    xsl_tree = etree.parse(xsl_style)
+    transform = etree.XSLT(xsl_tree, access_control=xslt_ac)
+    doc = etree.parse(str(source[0]))
+    # Support for additional parameters
+    parampass = {}
+    if parampass:
+        result = transform(doc, **parampass)
+    else:
+        result = transform(doc)
+        
+    try:
+        of = open(str(target[0]), "w")
+        of.write(of.write(etree.tostring(result, pretty_print=True)))
+        of.close()
+    except:
+        pass
+
+    return None
+
+def __xinclude_libxml2(target, source, env):
+    """
+    Resolving XIncludes, using the libxml2 module.
+    """
+    doc = libxml2.readFile(str(source[0]), None, libxml2.XML_PARSE_NOENT)
+    doc.xincludeProcessFlags(libxml2.XML_PARSE_NOENT)
+    doc.saveFile(str(target[0]))
+    doc.freeDoc()
+
+    return None
+
+def __xinclude_lxml(target, source, env):
+    """
+    Resolving XIncludes, using the lxml module.
+    """
+    from lxml import etree
+    
+    doc = etree.parse(str(source[0]))
+    doc.xinclude()
+    try:
+        doc.write(str(target[0]), xml_declaration=True, 
+                  encoding="UTF-8", pretty_print=True)
+    except:
+        pass
+
+    return None
+
+__libxml2_builder = SCons.Builder.Builder(
+        action = __build_libxml2,
+        src_suffix = '.xml',
+        source_scanner = docbook_xml_scanner,
+        emitter = __emit_xsl_basedir)
+__lxml_builder = SCons.Builder.Builder(
+        action = __build_lxml,
+        src_suffix = '.xml',
+        source_scanner = docbook_xml_scanner,
+        emitter = __emit_xsl_basedir)
+
+__xinclude_libxml2_builder = SCons.Builder.Builder(
+        action = __xinclude_libxml2,
+        suffix = '.xml',
+        src_suffix = '.xml',
+        source_scanner = docbook_xml_scanner)
+__xinclude_lxml_builder = SCons.Builder.Builder(
+        action = __xinclude_lxml,
+        suffix = '.xml',
+        src_suffix = '.xml',
+        source_scanner = docbook_xml_scanner)
+
+__xsltproc_builder = SCons.Builder.Builder(
+        action = SCons.Action.CommandGeneratorAction(__generate_xsltproc_action,
+                                                     {'cmdstr' : '$DOCBOOK_XSLTPROCCOMSTR'}),
+        src_suffix = '.xml',
+        source_scanner = docbook_xml_scanner,
+        emitter = __emit_xsl_basedir)
+__xmllint_builder = SCons.Builder.Builder(
+        action = SCons.Action.Action('$DOCBOOK_XMLLINTCOM','$DOCBOOK_XMLLINTCOMSTR'),
+        suffix = '.xml',
+        src_suffix = '.xml',
+        source_scanner = docbook_xml_scanner)
+__fop_builder = SCons.Builder.Builder(
+        action = SCons.Action.Action('$DOCBOOK_FOPCOM','$DOCBOOK_FOPCOMSTR'),
+        suffix = '.pdf',
+        src_suffix = '.fo',
+        ensure_suffix=1)
+
+def DocbookEpub(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for ePub output.
+    """
+    import zipfile
+    import shutil
+    
+    def build_open_container(target, source, env):
+        """Generate the *.epub file from intermediate outputs
+
+        Constructs the epub file according to the Open Container Format. This 
+        function could be replaced by a call to the SCons Zip builder if support
+        was added for different compression formats for separate source nodes.
+        """
+        zf = zipfile.ZipFile(str(target[0]), 'w')
+        mime_file = open('mimetype', 'w')
+        mime_file.write('application/epub+zip')
+        mime_file.close()
+        zf.write(mime_file.name, compress_type = zipfile.ZIP_STORED)
+        for s in source:
+            if os.path.isfile(str(s)):
+                head, tail = os.path.split(str(s))
+                if not head:
+                    continue
+                s = head
+            for dirpath, dirnames, filenames in os.walk(str(s)):
+                for fname in filenames:
+                    path = os.path.join(dirpath, fname)
+                    if os.path.isfile(path):
+                        zf.write(path, os.path.relpath(path, str(env.get('ZIPROOT', ''))),
+                            zipfile.ZIP_DEFLATED)
+        zf.close()
+        
+    def add_resources(target, source, env):
+        """Add missing resources to the OEBPS directory
+
+        Ensure all the resources in the manifest are present in the OEBPS directory.
+        """
+        hrefs = []
+        content_file = os.path.join(source[0].get_abspath(), 'content.opf')
+        if not os.path.isfile(content_file):
+            return
+        
+        hrefs = []
+        if has_libxml2:
+            nsmap = {'opf' : 'http://www.idpf.org/2007/opf'}
+            # Read file and resolve entities
+            doc = libxml2.readFile(content_file, None, 0)
+            opf = doc.getRootElement()
+            # Create xpath context
+            xpath_context = doc.xpathNewContext()
+            # Register namespaces
+            for key, val in nsmap.iteritems():
+                xpath_context.xpathRegisterNs(key, val)
+
+            if hasattr(opf, 'xpathEval') and xpath_context:
+                # Use the xpath context
+                xpath_context.setContextNode(opf)
+                items = xpath_context.xpathEval(".//opf:item")
+            else:
+                items = opf.findall(".//{'http://www.idpf.org/2007/opf'}item")
+
+            for item in items:
+                if hasattr(item, 'prop'):
+                    hrefs.append(item.prop('href'))
+                else:
+                    hrefs.append(item.attrib['href'])
+
+            doc.freeDoc()
+            xpath_context.xpathFreeContext()            
+        elif has_lxml:
+            from lxml import etree
+            
+            opf = etree.parse(content_file)
+            # All the opf:item elements are resources
+            for item in opf.xpath('//opf:item', 
+                    namespaces= { 'opf': 'http://www.idpf.org/2007/opf' }):
+                hrefs.append(item.attrib['href'])
+        
+        for href in hrefs:
+            # If the resource was not already created by DocBook XSL itself, 
+            # copy it into the OEBPS folder
+            referenced_file = os.path.join(source[0].get_abspath(), href)
+            if not os.path.exists(referenced_file):
+                shutil.copy(href, os.path.join(source[0].get_abspath(), href))
+        
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+    
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_EPUB', ['epub','docbook.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+    
+    # Create targets
+    result = []
+    if not env.GetOption('clean'):        
+        # Ensure that the folders OEBPS and META-INF exist
+        __create_output_dir('OEBPS/')
+        __create_output_dir('META-INF/')
+    dirs = env.Dir(['OEBPS', 'META-INF'])
+    
+    # Set the fixed base_dir
+    kw['base_dir'] = 'OEBPS/'
+    tocncx = __builder.__call__(env, 'toc.ncx', source[0], **kw)
+    cxml = env.File('META-INF/container.xml')
+    env.SideEffect(cxml, tocncx)
+    
+    env.Depends(tocncx, kw['DOCBOOK_XSL'])
+    result.extend(tocncx+[cxml])
+
+    container = env.Command(__ensure_suffix(str(target[0]), '.epub'), 
+        tocncx+[cxml], [add_resources, build_open_container])    
+    mimetype = env.File('mimetype')
+    env.SideEffect(mimetype, container)
+
+    result.extend(container)
+    # Add supporting files for cleanup
+    env.Clean(tocncx, dirs)
+
+    return result
+
+def DocbookHtml(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for HTML output.
+    """
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+    
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTML', ['html','docbook.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+    
+    # Create targets
+    result = []
+    for t,s in zip(target,source):
+        r = __builder.__call__(env, __ensure_suffix(t,'.html'), s, **kw)
+        env.Depends(r, kw['DOCBOOK_XSL'])
+        result.extend(r)
+
+    return result
+
+def DocbookHtmlChunked(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for chunked HTML output.
+    """
+    # Init target/source
+    if not SCons.Util.is_List(target):
+        target = [target]
+    if not source:
+        source = target
+        target = ['index.html']
+    elif not SCons.Util.is_List(source):
+        source = [source]
+        
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLCHUNKED', ['html','chunkfast.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+    
+    # Detect base dir
+    base_dir = kw.get('base_dir', '')
+    if base_dir:
+        __create_output_dir(base_dir)
+   
+    # Create targets
+    result = []
+    r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw)
+    env.Depends(r, kw['DOCBOOK_XSL'])
+    result.extend(r)
+    # Add supporting files for cleanup
+    env.Clean(r, glob.glob(os.path.join(base_dir, '*.html')))
+
+    return result
+
+
+def DocbookHtmlhelp(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for HTMLHELP output.
+    """
+    # Init target/source
+    if not SCons.Util.is_List(target):
+        target = [target]
+    if not source:
+        source = target
+        target = ['index.html']
+    elif not SCons.Util.is_List(source):
+        source = [source]    
+    
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLHELP', ['htmlhelp','htmlhelp.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+
+    # Detect base dir
+    base_dir = kw.get('base_dir', '')
+    if base_dir:
+        __create_output_dir(base_dir)
+    
+    # Create targets
+    result = []
+    r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw)
+    env.Depends(r, kw['DOCBOOK_XSL'])
+    result.extend(r)
+    # Add supporting files for cleanup
+    env.Clean(r, ['toc.hhc', 'htmlhelp.hhp', 'index.hhk'] +
+                 glob.glob(os.path.join(base_dir, '[ar|bk|ch]*.html')))
+
+    return result
+
+def DocbookPdf(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for PDF output.
+    """
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_PDF', ['fo','docbook.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+
+    # Create targets
+    result = []
+    for t,s in zip(target,source):
+        t, stem = __ensure_suffix_stem(t, '.pdf')
+        xsl = __builder.__call__(env, stem+'.fo', s, **kw)
+        result.extend(xsl)
+        env.Depends(xsl, kw['DOCBOOK_XSL'])
+        result.extend(__fop_builder.__call__(env, t, xsl, **kw))
+
+    return result
+
+def DocbookMan(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for Man page output.
+    """
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_MAN', ['manpages','docbook.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+
+    # Create targets
+    result = []
+    for t,s in zip(target,source):
+        volnum = "1"
+        outfiles = []
+        srcfile = __ensure_suffix(str(s),'.xml')
+        if os.path.isfile(srcfile):
+            try:
+                import xml.dom.minidom
+                
+                dom = xml.dom.minidom.parse(__ensure_suffix(str(s),'.xml'))
+                # Extract volume number, default is 1
+                for node in dom.getElementsByTagName('refmeta'):
+                    for vol in node.getElementsByTagName('manvolnum'):
+                        volnum = __get_xml_text(vol)
+                        
+                # Extract output filenames
+                for node in dom.getElementsByTagName('refnamediv'):
+                    for ref in node.getElementsByTagName('refname'):
+                        outfiles.append(__get_xml_text(ref)+'.'+volnum)
+                        
+            except:
+                # Use simple regex parsing 
+                f = open(__ensure_suffix(str(s),'.xml'), 'r')
+                content = f.read()
+                f.close()
+                
+                for m in re_manvolnum.finditer(content):
+                    volnum = m.group(1)
+                    
+                for m in re_refname.finditer(content):
+                    outfiles.append(m.group(1)+'.'+volnum)
+            
+            if not outfiles:
+                # Use stem of the source file
+                spath = str(s)
+                if not spath.endswith('.xml'):
+                    outfiles.append(spath+'.'+volnum)
+                else:
+                    stem, ext = os.path.splitext(spath)
+                    outfiles.append(stem+'.'+volnum)
+        else:
+            # We have to completely rely on the given target name
+            outfiles.append(t)
+            
+        __builder.__call__(env, outfiles[0], s, **kw)
+        env.Depends(outfiles[0], kw['DOCBOOK_XSL'])
+        result.append(outfiles[0])
+        if len(outfiles) > 1:
+            env.Clean(outfiles[0], outfiles[1:])
+
+        
+    return result
+
+def DocbookSlidesPdf(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for PDF slides output.
+    """
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESPDF', ['slides','fo','plain.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+
+    # Create targets
+    result = []
+    for t,s in zip(target,source):
+        t, stem = __ensure_suffix_stem(t, '.pdf')
+        xsl = __builder.__call__(env, stem+'.fo', s, **kw)
+        env.Depends(xsl, kw['DOCBOOK_XSL'])        
+        result.extend(xsl)
+        result.extend(__fop_builder.__call__(env, t, xsl, **kw))
+
+    return result
+
+def DocbookSlidesHtml(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, providing a Docbook toolchain for HTML slides output.
+    """
+    # Init list of targets/sources
+    if not SCons.Util.is_List(target):
+        target = [target]
+    if not source:
+        source = target
+        target = ['index.html']
+    elif not SCons.Util.is_List(source):
+        source = [source]    
+
+    # Init XSL stylesheet
+    __init_xsl_stylesheet(kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESHTML', ['slides','html','plain.xsl'])
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+
+    # Detect base dir
+    base_dir = kw.get('base_dir', '')
+    if base_dir:
+        __create_output_dir(base_dir)
+
+    # Create targets
+    result = []
+    r = __builder.__call__(env, __ensure_suffix(str(target[0]), '.html'), source[0], **kw)
+    env.Depends(r, kw['DOCBOOK_XSL'])
+    result.extend(r)
+    # Add supporting files for cleanup
+    env.Clean(r, [os.path.join(base_dir, 'toc.html')] +
+                 glob.glob(os.path.join(base_dir, 'foil*.html')))
+
+    return result
+
+def DocbookXInclude(env, target, source, *args, **kw):
+    """
+    A pseudo-Builder, for resolving XIncludes in a separate processing step.
+    """
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+
+    # Setup builder
+    __builder = __select_builder(__xinclude_lxml_builder,__xinclude_libxml2_builder,__xmllint_builder)
+            
+    # Create targets
+    result = []
+    for t,s in zip(target,source):
+        result.extend(__builder.__call__(env, t, s, **kw))
+        
+    return result
+
+def DocbookXslt(env, target, source=None, *args, **kw):
+    """
+    A pseudo-Builder, applying a simple XSL transformation to the input file.
+    """
+    # Init list of targets/sources
+    target, source = __extend_targets_sources(target, source)
+    
+    # Init XSL stylesheet
+    kw['DOCBOOK_XSL'] = kw.get('xsl', 'transform.xsl')
+
+    # Setup builder
+    __builder = __select_builder(__lxml_builder, __libxml2_builder, __xsltproc_builder)
+    
+    # Create targets
+    result = []
+    for t,s in zip(target,source):
+        r = __builder.__call__(env, t, s, **kw)
+        env.Depends(r, kw['DOCBOOK_XSL'])
+        result.extend(r)
+
+    return result
+
+
+def generate(env):
+    """Add Builders and construction variables for docbook to an Environment."""
+
+    env.SetDefault(
+        # Default names for customized XSL stylesheets
+        DOCBOOK_DEFAULT_XSL_EPUB = '',
+        DOCBOOK_DEFAULT_XSL_HTML = '',
+        DOCBOOK_DEFAULT_XSL_HTMLCHUNKED = '',
+        DOCBOOK_DEFAULT_XSL_HTMLHELP = '',
+        DOCBOOK_DEFAULT_XSL_PDF = '',
+        DOCBOOK_DEFAULT_XSL_MAN = '',
+        DOCBOOK_DEFAULT_XSL_SLIDESPDF = '',
+        DOCBOOK_DEFAULT_XSL_SLIDESHTML = '',
+        
+        # Paths to the detected executables
+        DOCBOOK_XSLTPROC = '',
+        DOCBOOK_XMLLINT = '',
+        DOCBOOK_FOP = '',
+        
+        # Additional flags for the text processors
+        DOCBOOK_XSLTPROCFLAGS = SCons.Util.CLVar(''),
+        DOCBOOK_XMLLINTFLAGS = SCons.Util.CLVar(''),
+        DOCBOOK_FOPFLAGS = SCons.Util.CLVar(''),
+        DOCBOOK_XSLTPROCPARAMS = SCons.Util.CLVar(''),
+        
+        # Default command lines for the detected executables
+        DOCBOOK_XSLTPROCCOM = xsltproc_com['xsltproc'],
+        DOCBOOK_XMLLINTCOM = xmllint_com['xmllint'],
+        DOCBOOK_FOPCOM = fop_com['fop'],
+
+        # Screen output for the text processors
+        DOCBOOK_XSLTPROCCOMSTR = None,
+        DOCBOOK_XMLLINTCOMSTR = None,
+        DOCBOOK_FOPCOMSTR = None,
+        
+        )
+    _detect(env)
+
+    try:
+        env.AddMethod(DocbookEpub, "DocbookEpub")
+        env.AddMethod(DocbookHtml, "DocbookHtml")
+        env.AddMethod(DocbookHtmlChunked, "DocbookHtmlChunked")
+        env.AddMethod(DocbookHtmlhelp, "DocbookHtmlhelp")
+        env.AddMethod(DocbookPdf, "DocbookPdf")
+        env.AddMethod(DocbookMan, "DocbookMan")
+        env.AddMethod(DocbookSlidesPdf, "DocbookSlidesPdf")
+        env.AddMethod(DocbookSlidesHtml, "DocbookSlidesHtml")
+        env.AddMethod(DocbookXInclude, "DocbookXInclude")
+        env.AddMethod(DocbookXslt, "DocbookXslt")
+    except AttributeError:
+        # Looks like we use a pre-0.98 version of SCons...
+        from SCons.Script.SConscript import SConsEnvironment
+        SConsEnvironment.DocbookEpub = DocbookEpub        
+        SConsEnvironment.DocbookHtml = DocbookHtml
+        SConsEnvironment.DocbookHtmlChunked = DocbookHtmlChunked
+        SConsEnvironment.DocbookHtmlhelp = DocbookHtmlhelp
+        SConsEnvironment.DocbookPdf = DocbookPdf
+        SConsEnvironment.DocbookMan = DocbookMan
+        SConsEnvironment.DocbookSlidesPdf = DocbookSlidesPdf
+        SConsEnvironment.DocbookSlidesHtml = DocbookSlidesHtml
+        SConsEnvironment.DocbookXInclude = DocbookXInclude
+        SConsEnvironment.DocbookXslt = DocbookXslt
+
+
+def exists(env):
+    return 1
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvi.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvi.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvi.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvi.py
index 803758cfa3ece324460f22829134285875f332ae..aba71684aa7e4caefec58ad9f3b67f4c4b8b9ae5 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvi.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvi.py
@@ -5,7 +5,7 @@ Common DVI Builder definition for various other Tool modules that use it.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/dvi.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/dvi.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Builder
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvipdf.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvipdf.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvipdf.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvipdf.py
index b931cf56d2977990fc10993a63a97d5774c96448..0a6dde7db6ed32b35b833e379ec5c728ad5aa102 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvipdf.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvipdf.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/dvipdf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/dvipdf.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Defaults
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvips.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvips.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvips.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvips.py
index 8b3ba0f54dfd3466fe01784aaf72f08179422496..f72f2fed7fa2a0ea53b07b7b38ebae656db628a0 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/dvips.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/dvips.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/dvips.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/dvips.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f03.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f03.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f03.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f03.py
index cc8f9d29df0ba52523ebaf027d87a0cdd8a357d2..77165ad7d452110ff637120b3fdde2bab5e4ce83 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f03.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f03.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/f03.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/f03.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f77.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f77.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f77.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f77.py
index cba5b0b218a0a73ae11882d55b2917ec780b3e35..593c517729a004b11ac1d1e09a87b655d19c3d5a 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f77.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f77.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/f77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/f77.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Scanner.Fortran
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f90.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f90.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f90.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f90.py
index 1df001405880b51dfeea8a8a75a5bcbfb24f9cfb..c4a8df36cc3e023261ec098e8835f6fb0f0d8939 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f90.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f90.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/f90.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/f90.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Scanner.Fortran
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f95.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f95.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f95.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f95.py
index b325309053f2eea7b3fe607a0a3d145624372808..f361e1d7b7a6648d5c3015e325894119a5f484e7 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/f95.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/f95.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/f95.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/f95.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/filesystem.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/filesystem.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/filesystem.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/filesystem.py
index 2ac49548f744188881177341ad165ee8cce2fdfb..df5757934e812adab23e1c81b629a87dc3927674 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/filesystem.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/filesystem.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/filesystem.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/filesystem.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons
 from SCons.Tool.install import copyFunc
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/fortran.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/fortran.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/fortran.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/fortran.py
index 3da748a94bb49b70e87279d311b3667de1af9a2e..7a513218c09753078a59f24918cbb46131071a11 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/fortran.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/fortran.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/fortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/fortran.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import re
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/g++.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/g++.py
similarity index 66%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/g++.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/g++.py
index 484344c3cf8c83926f91a8af07e0cb05447d92a8..824686232316ba5b11333c493722ff158b184c7f 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/g++.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/g++.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/g++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/g++.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
@@ -40,6 +40,8 @@ import subprocess
 import SCons.Tool
 import SCons.Util
 
+import gcc
+
 cplusplus = __import__('c++', globals(), locals(), [])
 
 compilers = ['g++']
@@ -48,9 +50,10 @@ def generate(env):
     """Add Builders and construction variables for g++ to an Environment."""
     static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
 
-    cplusplus.generate(env)
+    if 'CXX' not in env:
+        env['CXX']    = env.Detect(compilers) or compilers[0]
 
-    env['CXX']        = env.Detect(compilers)
+    cplusplus.generate(env)
 
     # platform specific settings
     if env['PLATFORM'] == 'aix':
@@ -62,26 +65,13 @@ def generate(env):
     elif env['PLATFORM'] == 'sunos':
         env['SHOBJSUFFIX'] = '.pic.o'
     # determine compiler version
-    if env['CXX']:
-        #pipe = SCons.Action._subproc(env, [env['CXX'], '-dumpversion'],
-        pipe = SCons.Action._subproc(env, [env['CXX'], '--version'],
-                                     stdin = 'devnull',
-                                     stderr = 'devnull',
-                                     stdout = subprocess.PIPE)
-        if pipe.wait() != 0: return
-        # -dumpversion was added in GCC 3.0.  As long as we're supporting
-        # GCC versions older than that, we should use --version and a
-        # regular expression.
-        #line = pipe.stdout.read().strip()
-        #if line:
-        #    env['CXXVERSION'] = line
-        line = pipe.stdout.readline()
-        match = re.search(r'[0-9]+(\.[0-9]+)+', line)
-        if match:
-            env['CXXVERSION'] = match.group(0)
+    version = gcc.detect_version(env, env['CXX'])
+    if version:
+        env['CXXVERSION'] = version
 
 def exists(env):
-    return env.Detect(compilers)
+    # is executable, and is a GNU compiler (or accepts '--version' at least)
+    return gcc.detect_version(env, env.Detect(env.get('CXX', compilers)))
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/g77.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/g77.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/g77.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/g77.py
index 97c2ef1846467bf0ca8fa18761fae2fff8cf2456..e09cf16f409e0843c77753653adca2870cf0e065 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/g77.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/g77.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/g77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/g77.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gas.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gas.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gas.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gas.py
index 89aa2e344fbbd6ed04f9f45993b3db91b4765440..f987b95d14d3f715076e34bcef310faeacd4c557 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gas.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gas.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/gas.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/gas.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 as_module = __import__('as', globals(), locals(), [])
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gcc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gcc.py
similarity index 52%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gcc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gcc.py
index 814e1dec242e489e4b6a0198220f34a9daceb52f..d2375c6e4e882aa4530755ad4361123df26f93c1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gcc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gcc.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/gcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/gcc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import cc
 import os
@@ -44,34 +44,54 @@ compilers = ['gcc', 'cc']
 
 def generate(env):
     """Add Builders and construction variables for gcc to an Environment."""
+
+    if 'CC' not in env:
+        env['CC'] = env.Detect(compilers) or compilers[0]
+
     cc.generate(env)
 
-    env['CC'] = env.Detect(compilers) or 'gcc'
     if env['PLATFORM'] in ['cygwin', 'win32']:
         env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
     else:
         env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS -fPIC')
     # determine compiler version
-    if env['CC']:
-        #pipe = SCons.Action._subproc(env, [env['CC'], '-dumpversion'],
-        pipe = SCons.Action._subproc(env, [env['CC'], '--version'],
-                                     stdin = 'devnull',
-                                     stderr = 'devnull',
-                                     stdout = subprocess.PIPE)
-        if pipe.wait() != 0: return
-        # -dumpversion was added in GCC 3.0.  As long as we're supporting
-        # GCC versions older than that, we should use --version and a
-        # regular expression.
-        #line = pipe.stdout.read().strip()
-        #if line:
-        #    env['CCVERSION'] = line
-        line = pipe.stdout.readline()
-        match = re.search(r'[0-9]+(\.[0-9]+)+', line)
-        if match:
-            env['CCVERSION'] = match.group(0)
+    version = detect_version(env, env['CC'])
+    if version:
+        env['CCVERSION'] = version
 
 def exists(env):
-    return env.Detect(compilers)
+    # is executable, and is a GNU compiler (or accepts '--version' at least)
+    return detect_version(env, env.Detect(env.get('CC', compilers)))
+
+def detect_version(env, cc):
+    """Return the version of the GNU compiler, or None if it is not a GNU compiler."""
+    cc = env.subst(cc)
+    if not cc:
+        return None
+    version = None
+    #pipe = SCons.Action._subproc(env, SCons.Util.CLVar(cc) + ['-dumpversion'],
+    pipe = SCons.Action._subproc(env, SCons.Util.CLVar(cc) + ['--version'],
+                                 stdin = 'devnull',
+                                 stderr = 'devnull',
+                                 stdout = subprocess.PIPE)
+    # -dumpversion was added in GCC 3.0.  As long as we're supporting
+    # GCC versions older than that, we should use --version and a
+    # regular expression.
+    #line = pipe.stdout.read().strip()
+    #if line:
+    #    version = line
+    line = pipe.stdout.readline()
+    match = re.search(r'[0-9]+(\.[0-9]+)+', line)
+    if match:
+        version = match.group(0)
+    # Non-GNU compiler's output (like AIX xlc's) may exceed the stdout buffer:
+    # So continue with reading to let the child process actually terminate.
+    while pipe.stdout.readline():
+        pass
+    ret = pipe.wait()
+    if ret != 0:
+        return None
+    return version
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gdc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gdc.py
new file mode 100644
index 0000000000000000000000000000000000000000..7a67501726aac3cb1abed3b20f7358ed5b006c96
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gdc.py
@@ -0,0 +1,128 @@
+"""SCons.Tool.gdc
+
+Tool-specific initialization for the GDC compiler.
+(https://github.com/D-Programming-GDC/GDC)
+
+Developed by Russel Winder (russel@winder.org.uk)
+2012-05-09 onwards
+
+Compiler variables:
+    DC - The name of the D compiler to use.  Defaults to gdc.
+    DPATH - List of paths to search for import modules.
+    DVERSIONS - List of version tags to enable when compiling.
+    DDEBUG - List of debug tags to enable when compiling.
+
+Linker related variables:
+    LIBS - List of library files to link in.
+    DLINK - Name of the linker to use.  Defaults to gdc.
+    DLINKFLAGS - List of linker flags.
+
+Lib tool variables:
+    DLIB - Name of the lib tool to use.  Defaults to lib.
+    DLIBFLAGS - List of flags to pass to the lib tool.
+    LIBS - Same as for the linker. (libraries to pull into the .lib)
+"""
+
+#
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Tool/gdc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+import SCons.Action
+import SCons.Defaults
+import SCons.Tool
+
+import SCons.Tool.DCommon
+
+
+def generate(env):
+    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
+
+    static_obj.add_action('.d', SCons.Defaults.DAction)
+    shared_obj.add_action('.d', SCons.Defaults.ShDAction)
+    static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter)
+    shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter)
+
+    env['DC'] = env.Detect('gdc')
+    env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -o $TARGET $SOURCES'
+    env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}'
+    env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}'
+    env['_DDEBUGFLAGS'] = '${_concat(DDEBUGPREFIX, DDEBUG, DDEBUGSUFFIX, __env__)}'
+    env['_DFLAGS'] = '${_concat(DFLAGPREFIX, DFLAGS, DFLAGSUFFIX, __env__)}'
+
+    env['SHDC'] = '$DC'
+    env['SHDCOM'] = '$SHDC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -fPIC -c -o $TARGET $SOURCES'
+
+    env['DPATH'] = ['#/']
+    env['DFLAGS'] = []
+    env['DVERSIONS'] = []
+    env['DDEBUG'] = []
+
+    if env['DC']:
+        SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
+
+    env['DINCPREFIX'] = '-I'
+    env['DINCSUFFIX'] = ''
+    env['DVERPREFIX'] = '-version='
+    env['DVERSUFFIX'] = ''
+    env['DDEBUGPREFIX'] = '-debug='
+    env['DDEBUGSUFFIX'] = ''
+    env['DFLAGPREFIX'] = '-'
+    env['DFLAGSUFFIX'] = ''
+    env['DFILESUFFIX'] = '.d'
+
+    env['DLINK'] = '$DC'
+    env['DLINKFLAGS'] = SCons.Util.CLVar('')
+    env['DLINKCOM'] = '$DLINK -o $TARGET $DLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+
+    env['DSHLINK'] = '$DC'
+    env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared')
+    env['SHDLINKCOM'] = '$DLINK -o $TARGET $DSHLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+
+    env['DLIB'] = 'lib' if env['PLATFORM'] == 'win32' else 'ar cr'
+    env['DLIBCOM'] = '$DLIB $_DLIBFLAGS {0}$TARGET $SOURCES $_DLINKLIBFLAGS'.format('-c ' if env['PLATFORM'] == 'win32' else '')
+
+    env['_DLIBFLAGS'] = '${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)}'
+
+    env['DLIBFLAGPREFIX'] = '-'
+    env['DLIBFLAGSUFFIX'] = ''
+    env['DLINKFLAGPREFIX'] = '-'
+    env['DLINKFLAGSUFFIX'] = ''
+
+    # __RPATH is set to $_RPATH in the platform specification if that
+    # platform supports it.
+    env['RPATHPREFIX'] = '-Wl,-rpath='
+    env['RPATHSUFFIX'] = ''
+    env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
+
+    SCons.Tool.createStaticLibBuilder(env)
+
+
+def exists(env):
+    return env.Detect('gdc')
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gettext.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gettext.py
similarity index 84%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gettext.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gettext.py
index 9f2c7071551ce6ce3411e896965ca95fa9be0f80..e53ebdba421761bb852aac98000557140a95ebf1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gettext.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gettext.py
@@ -2,7 +2,7 @@
 """
 
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -23,7 +23,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/gettext.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/gettext.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 #############################################################################
 def generate(env,**kw):
@@ -40,6 +40,9 @@ def exists(env):
   from SCons.Tool.GettextCommon \
   import _xgettext_exists, _msginit_exists, \
          _msgmerge_exists, _msgfmt_exists
-  return _xgettext_exists(env) and _msginit_exists(env) \
-     and _msgmerge_exists(env) and _msgfmt_exists(env)
+  try:
+    return _xgettext_exists(env) and _msginit_exists(env) \
+       and _msgmerge_exists(env) and _msgfmt_exists(env)
+  except:
+    return False
 #############################################################################
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gfortran.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gfortran.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gfortran.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gfortran.py
index 2f9bddc64e9eecd5944dab6d5b9d0f6e43c870a0..02da3023825c56a73b08037c4de3dc783cc925eb 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gfortran.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gfortran.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/gfortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/gfortran.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
@@ -43,7 +43,7 @@ def generate(env):
     Environment."""
     fortran.generate(env)
 
-    for dialect in ['F77', 'F90', 'FORTRAN', 'F95', 'F03']:
+    for dialect in ['F77', 'F90', 'FORTRAN', 'F95', 'F03', 'F08']:
         env['%s' % dialect] = 'gfortran'
         env['SH%s' % dialect] = '$%s' % dialect
         if env['PLATFORM'] in ['cygwin', 'win32']:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gnulink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gnulink.py
similarity index 77%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gnulink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gnulink.py
index ee9f584e953be687f952a2b055bffa91d836acf9..81c013042eb4d4b7649f93fd7a4d786bcde40bba 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gnulink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gnulink.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,14 +31,12 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/gnulink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/gnulink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
 import link
 
-linkers = ['g++', 'gcc']
-
 def generate(env):
     """Add Builders and construction variables for gnulink to an Environment."""
     link.generate(env)
@@ -53,7 +51,14 @@ def generate(env):
     env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
     
 def exists(env):
-    return env.Detect(linkers)
+    # TODO: sync with link.smart_link() to choose a linker
+    linkers = { 'CXX': ['g++'], 'CC': ['gcc'] }
+    alltools = []
+    for langvar, linktools in linkers.items():
+        if langvar in env: # use CC over CXX when user specified CC but not CXX
+            return SCons.Tool.FindTool(linktools, env)
+        alltools.extend(linktools)
+    return SCons.Tool.FindTool(alltools, env) # find CXX or CC
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gs.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gs.py
similarity index 72%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gs.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gs.py
index 12e71d282117e31e48795b3732b6f265e0831606..3e2eeccf19ec025c0b29fcaecd4098fd3b756db9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/gs.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/gs.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,9 +31,10 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/gs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/gs.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
+import SCons.Builder
 import SCons.Platform
 import SCons.Util
 
@@ -52,17 +53,26 @@ GhostscriptAction = None
 def generate(env):
     """Add Builders and construction variables for Ghostscript to an
     Environment."""
-
     global GhostscriptAction
-    if GhostscriptAction is None:
-        GhostscriptAction = SCons.Action.Action('$GSCOM', '$GSCOMSTR')
-
-    import pdf
-    pdf.generate(env)
-
-    bld = env['BUILDERS']['PDF']
-    bld.add_action('.ps', GhostscriptAction)
-
+    # The following try-except block enables us to use the Tool
+    # in standalone mode (without the accompanying pdf.py),
+    # whenever we need an explicit call of gs via the Gs()
+    # Builder ...
+    try:
+        if GhostscriptAction is None:
+            GhostscriptAction = SCons.Action.Action('$GSCOM', '$GSCOMSTR')
+    
+        import pdf
+        pdf.generate(env)
+    
+        bld = env['BUILDERS']['PDF']
+        bld.add_action('.ps', GhostscriptAction)
+    except ImportError, e:
+        pass
+
+    gsbuilder = SCons.Builder.Builder(action = SCons.Action.Action('$GSCOM', '$GSCOMSTR'))
+    env['BUILDERS']['Gs'] = gsbuilder
+    
     env['GS']      = gs
     env['GSFLAGS'] = SCons.Util.CLVar('-dNOPAUSE -dBATCH -sDEVICE=pdfwrite')
     env['GSCOM']   = '$GS $GSFLAGS -sOutputFile=$TARGET $SOURCES'
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hpc++.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hpc++.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hpc++.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hpc++.py
index 5f75e18078fddc69cc5a063f90328207b1d75455..eb23e94f03660ae3d35bc41ef4b690ebce27a8ac 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hpc++.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hpc++.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/hpc++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/hpc++.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hpcc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hpcc.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hpcc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hpcc.py
index 29586f623267ace3ea48e5f532943b2e76379e21..827460dd521924962df587ac934e9ee63acb0433 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hpcc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hpcc.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/hpcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/hpcc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hplink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hplink.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hplink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hplink.py
index d979545e62503c17b7184d7f63ba6bd836548943..e3512a22fbacd6b182cc6fa42e87568854d234f3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/hplink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/hplink.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/hplink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/hplink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/icc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/icc.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/icc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/icc.py
index 1f7f0284778f69cdfc62563517091dfa700f11f1..d6e3663ca36f20f79a6bf10e63da18bb0c4785d6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/icc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/icc.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/icc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/icc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import cc
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/icl.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/icl.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/icl.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/icl.py
index e3ee4ea5d2b8c35acc127e41a11fd820366e8e5c..88c68815dad30208a9794e2122f0fe4958fd240b 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/icl.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/icl.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/icl.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/icl.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Tool.intelc
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ifl.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ifl.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ifl.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ifl.py
index 6ad250abb9ee1f66578691cd2a5f97992b5c905b..ef5bdd61fc2ae976ea66295a0fa5379003086635 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ifl.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ifl.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/ifl.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/ifl.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 from SCons.Scanner.Fortran import FortranScan
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ifort.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ifort.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ifort.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ifort.py
index fde2e864f14f9e725e6095a0af8f804811b65afc..275c5c884049dc25e993facd50f57ac9d49f4e8e 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ifort.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ifort.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/ifort.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/ifort.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 from SCons.Scanner.Fortran import FortranScan
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ilink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ilink.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ilink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ilink.py
index 4f37906b90055c270d1450e200ee7eedb82f95e8..b2c3513de6b0cd173d5626b0591371c8668c5e6b 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ilink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ilink.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/ilink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/ilink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ilink32.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ilink32.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ilink32.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ilink32.py
index 399501b6b098494e1e3d230cd224b0af05789f1e..a2f1e67ba8f18cec0564cff19cce7b5262db9f7e 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ilink32.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ilink32.py
@@ -5,7 +5,7 @@ XXX
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ XXX
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/ilink32.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/ilink32.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Tool
 import SCons.Tool.bcc32
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/install.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/install.py
similarity index 51%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/install.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/install.py
index 8b0673b06b9a895ec0fc54728791f442a98dfe55..0b3642cd556bbeb58858aa208e344ee6bb1aedfa 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/install.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/install.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,9 +30,10 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/install.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/install.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
+import re
 import shutil
 import stat
 
@@ -121,6 +122,119 @@ def copyFunc(dest, source, env):
 
     return 0
 
+#
+# Functions doing the actual work of the InstallVersionedLib Builder.
+#
+def copyFuncVersionedLib(dest, source, env):
+    """Install a versioned library into a destination by copying,
+    (including copying permission/mode bits) and then creating
+    required symlinks."""
+
+    if os.path.isdir(source):
+        raise SCons.Errors.UserError("cannot install directory `%s' as a version library" % str(source) )
+    else:
+        # remove the link if it is already there
+        try:
+            os.remove(dest)
+        except:
+            pass
+        shutil.copy2(source, dest)
+        st = os.stat(source)
+        os.chmod(dest, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
+        versionedLibLinks(dest, source, env)
+
+    return 0
+
+def versionedLibVersion(dest, source, env):
+    """Check if dest is a version shared library name. Return version, libname, & install_dir if it is."""
+    Verbose = False
+    platform = env.subst('$PLATFORM')
+    if not (platform == 'posix'  or platform == 'darwin' or platform == 'sunos'):
+        return (None, None, None)
+
+    if (hasattr(source[0], 'attributes') and
+        hasattr(source[0].attributes, 'shlibname')):
+        libname = source[0].attributes.shlibname
+    else:
+        libname = os.path.basename(str(dest))
+    install_dir = os.path.dirname(str(dest))
+    shlib_suffix = env.subst('$SHLIBSUFFIX')
+    # See if the source name is a versioned shared library, get the version number
+    result = False
+    
+    version_re = re.compile("[0-9]+\\.[0-9]+\\.[0-9a-zA-Z]+")
+    version_File = None
+    if platform == 'posix' or platform == 'sunos':
+        # handle unix names
+        versioned_re = re.compile(re.escape(shlib_suffix + '.') + "[0-9]+\\.[0-9]+\\.[0-9a-zA-Z]+")
+        result = versioned_re.findall(libname)
+        if result:
+            version_File = version_re.findall(versioned_re.findall(libname)[-1])[-1]
+    elif platform == 'darwin':
+        # handle OSX names
+        versioned_re = re.compile("\\.[0-9]+\\.[0-9]+\\.[0-9a-zA-Z]+" + re.escape(shlib_suffix) )
+        result = versioned_re.findall(libname)
+        if result:
+            version_File = version_re.findall(versioned_re.findall(libname)[-1])[-1]
+    
+    if Verbose:
+        print "install: version_File ", version_File
+    # result is False if we did not find a versioned shared library name, so return and empty list
+    if not result:
+        return (None, libname, install_dir)
+
+    version = None
+    # get version number from the environment
+    try:
+        version = env.subst('$SHLIBVERSION')
+    except KeyError:
+        version = None
+    
+    if version != version_File:
+        #raise SCons.Errors.UserError("SHLIBVERSION '%s' does not match the version # '%s' in the filename" % (version, version_File) )
+        print "SHLIBVERSION '%s' does not match the version # '%s' in the filename, proceeding based on file name" % (version, version_File)
+        version = version_File
+    return (version, libname, install_dir)
+
+def versionedLibLinks(dest, source, env):
+    """If we are installing a versioned shared library create the required links."""
+    Verbose = False
+    linknames = []
+    version, libname, install_dir = versionedLibVersion(dest, source, env)
+
+    if version != None:
+        # libname includes the version number if one was given
+        linknames = SCons.Tool.VersionShLibLinkNames(version,libname,env)
+        if Verbose:
+            print "versionedLibLinks: linknames ",linknames
+        # Here we just need the file name w/o path as the target of the link
+        lib_ver = libname
+        # make symlink of adjacent names in linknames
+        for count in range(len(linknames)):
+            linkname = linknames[count]
+            fulllinkname = os.path.join(install_dir, linkname)
+            if Verbose:
+                print "full link name ",fulllinkname
+            if count > 0:
+                try:
+                    os.remove(lastlinkname)
+                except:
+                    pass
+                os.symlink(os.path.basename(fulllinkname),lastlinkname)
+                if Verbose:
+                    print "versionedLibLinks: made sym link of %s -> %s" % (lastlinkname,os.path.basename(fulllinkname))
+            lastlinkname = fulllinkname
+        # finish chain of sym links with link to the actual library
+        if len(linknames)>0:
+            try:
+                os.remove(lastlinkname)
+            except:
+                pass
+            os.symlink(lib_ver,lastlinkname)
+            if Verbose:
+                print "versionedLibLinks: made sym link of %s -> %s" % (lib_ver,lastlinkname)
+    return
+
 def installFunc(target, source, env):
     """Install a source file into a target using the function specified
     as the INSTALL construction variable."""
@@ -137,6 +251,26 @@ def installFunc(target, source, env):
 
     return 0
 
+def installFuncVersionedLib(target, source, env):
+    """Install a versioned library into a target using the function specified
+    as the INSTALLVERSIONEDLIB construction variable."""
+    try:
+        install = env['INSTALLVERSIONEDLIB']
+    except KeyError:
+        raise SCons.Errors.UserError('Missing INSTALLVERSIONEDLIB construction variable.')
+
+    assert len(target)==len(source), \
+           "Installing source %s into target %s: target and source lists must have same length."%(list(map(str, source)), list(map(str, target)))
+    for t,s in zip(target,source):
+        if hasattr(t.attributes, 'shlibname'):
+            tpath = os.path.join(t.get_dir(), t.attributes.shlibname)
+        else:
+            tpath = t.get_path()
+        if install(tpath,s.get_path(),env):
+            return 1
+
+    return 0
+
 def stringFunc(target, source, env):
     installstr = env.get('INSTALLSTR')
     if installstr:
@@ -159,6 +293,36 @@ def add_targets_to_INSTALLED_FILES(target, source, env):
     """
     global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES
     _INSTALLED_FILES.extend(target)
+
+    _UNIQUE_INSTALLED_FILES = None
+    return (target, source)
+
+def add_versioned_targets_to_INSTALLED_FILES(target, source, env):
+    """ an emitter that adds all target files to the list stored in the
+    _INSTALLED_FILES global variable. This way all installed files of one
+    scons call will be collected.
+    """
+    global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES
+    Verbose = False
+    _INSTALLED_FILES.extend(target)
+    if Verbose:
+        print "ver lib emitter ",repr(target)
+
+    # see if we have a versioned shared library, if so generate side effects
+    version, libname, install_dir = versionedLibVersion(target[0], source, env)
+    if version != None:
+        # generate list of link names
+        linknames = SCons.Tool.VersionShLibLinkNames(version,libname,env)
+        for linkname in linknames:
+            if Verbose:
+                print "make side effect of %s" % os.path.join(install_dir, linkname)
+            fulllinkname = os.path.join(install_dir, linkname)
+            env.SideEffect(fulllinkname,target[0])
+            env.Clean(target[0],fulllinkname)
+            _INSTALLED_FILES.append(fulllinkname)
+            if Verbose:
+                print "installed list ", _INSTALLED_FILES
+        
     _UNIQUE_INSTALLED_FILES = None
     return (target, source)
 
@@ -181,8 +345,9 @@ class DESTDIR_factory(object):
 #
 # The Builder Definition
 #
-install_action   = SCons.Action.Action(installFunc, stringFunc)
-installas_action = SCons.Action.Action(installFunc, stringFunc)
+install_action       = SCons.Action.Action(installFunc, stringFunc)
+installas_action     = SCons.Action.Action(installFunc, stringFunc)
+installVerLib_action = SCons.Action.Action(installFuncVersionedLib, stringFunc)
 
 BaseInstallBuilder               = None
 
@@ -223,6 +388,37 @@ def InstallAsBuilderWrapper(env, target=None, source=None, **kw):
         result.extend(BaseInstallBuilder(env, tgt, src, **kw))
     return result
 
+BaseVersionedInstallBuilder = None
+
+def InstallVersionedBuilderWrapper(env, target=None, source=None, dir=None, **kw):
+    if target and dir:
+        import SCons.Errors
+        raise SCons.Errors.UserError("Both target and dir defined for Install(), only one may be defined.")
+    if not dir:
+        dir=target
+
+    import SCons.Script
+    install_sandbox = SCons.Script.GetOption('install_sandbox')
+    if install_sandbox:
+        target_factory = DESTDIR_factory(env, install_sandbox)
+    else:
+        target_factory = env.fs
+
+    try:
+        dnodes = env.arg2nodes(dir, target_factory.Dir)
+    except TypeError:
+        raise SCons.Errors.UserError("Target `%s' of Install() is a file, but should be a directory.  Perhaps you have the Install() arguments backwards?" % str(dir))
+    sources = env.arg2nodes(source, env.fs.Entry)
+    tgt = []
+    for dnode in dnodes:
+        for src in sources:
+            # Prepend './' so the lookup doesn't interpret an initial
+            # '#' on the file name portion as meaning the Node should
+            # be relative to the top-level SConstruct directory.
+            target = env.fs.Entry('.'+os.sep+src.name, dnode)
+            tgt.extend(BaseVersionedInstallBuilder(env, target, src, **kw))
+    return tgt
+
 added = None
 
 def generate(env):
@@ -253,8 +449,25 @@ def generate(env):
                               emitter        = [ add_targets_to_INSTALLED_FILES, ],
                               name           = 'InstallBuilder')
 
+    global BaseVersionedInstallBuilder
+    if BaseVersionedInstallBuilder is None:
+        install_sandbox = GetOption('install_sandbox')
+        if install_sandbox:
+            target_factory = DESTDIR_factory(env, install_sandbox)
+        else:
+            target_factory = env.fs
+
+        BaseVersionedInstallBuilder = SCons.Builder.Builder(
+                                       action         = installVerLib_action,
+                                       target_factory = target_factory.Entry,
+                                       source_factory = env.fs.Entry,
+                                       multi          = 1,
+                                       emitter        = [ add_versioned_targets_to_INSTALLED_FILES, ],
+                                       name           = 'InstallVersionedBuilder')
+
     env['BUILDERS']['_InternalInstall'] = InstallBuilderWrapper
     env['BUILDERS']['_InternalInstallAs'] = InstallAsBuilderWrapper
+    env['BUILDERS']['_InternalInstallVersionedLib'] = InstallVersionedBuilderWrapper
 
     # We'd like to initialize this doing something like the following,
     # but there isn't yet support for a ${SOURCE.type} expansion that
@@ -273,6 +486,11 @@ def generate(env):
     except KeyError:
         env['INSTALL']    = copyFunc
 
+    try:
+        env['INSTALLVERSIONEDLIB']
+    except KeyError:
+        env['INSTALLVERSIONEDLIB']    = copyFuncVersionedLib
+
 def exists(env):
     return 1
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/intelc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/intelc.py
similarity index 79%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/intelc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/intelc.py
index 92529afdc5d9ee6e58235e9a2a47d6eb4824a5d1..256f32e6c1b498a94c7ccf3589ffa6b10fb897c4 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/intelc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/intelc.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 from __future__ import division
 
-__revision__ = "src/engine/SCons/Tool/intelc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/intelc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import math, sys, os.path, glob, string, re
 
@@ -78,6 +78,7 @@ def linux_ver_normalize(vstr):
     Always returns an old-style float like 80 or 90 for compatibility with Windows.
     Shades of Y2K!"""
     # Check for version number like 9.1.026: return 91.026
+    # XXX needs to be updated for 2011+ versions (like 2011.11.344 which is compiler v12.1.5)
     m = re.match(r'([0-9]+)\.([0-9]+)\.([0-9]+)', vstr)
     if m:
         vmaj,vmin,build = m.groups()
@@ -155,7 +156,43 @@ def get_intel_registry_value(valuename, version=None, abi=None):
     try:
         k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K)
     except SCons.Util.RegError:
-        raise MissingRegistryError("%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi))
+        # For version 13 and later, check UUID subkeys for valuename
+        if is_win64:
+            K = 'Software\\Wow6432Node\\Intel\\Suites\\' + version + "\\Defaults\\C++\\" + abi.upper()
+        else:
+            K = 'Software\\Intel\\Suites\\' + version + "\\Defaults\\C++\\" + abi.upper()
+        try:
+            k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K)
+            uuid = SCons.Util.RegQueryValueEx(k, 'SubKey')[0]
+
+            if is_win64:
+                K = 'Software\\Wow6432Node\\Intel\\Suites\\' + version + "\\" + uuid + "\\C++"
+            else:
+                K = 'Software\\Intel\\Suites\\' + version + "\\" + uuid + "\\C++"
+            k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K)
+
+            try:
+                v = SCons.Util.RegQueryValueEx(k, valuename)[0]
+                return v  # or v.encode('iso-8859-1', 'replace') to remove unicode?
+            except SCons.Util.RegError:
+                if abi.upper() == 'EM64T':
+                    abi = 'em64t_native'
+                if is_win64:
+                    K = 'Software\\Wow6432Node\\Intel\\Suites\\' + version + "\\" + uuid + "\\C++\\" + abi.upper()
+                else:
+                    K = 'Software\\Intel\\Suites\\' + version + "\\" + uuid + "\\C++\\" + abi.upper()
+                k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K)
+
+            try:
+                v = SCons.Util.RegQueryValueEx(k, valuename)[0]
+                return v  # or v.encode('iso-8859-1', 'replace') to remove unicode?
+            except SCons.Util.RegError:
+                raise MissingRegistryError("%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi))
+
+        except SCons.Util.RegError:
+            raise MissingRegistryError("%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi))
+        except WindowsError:
+            raise MissingRegistryError("%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi))
 
     # Get the value:
     try:
@@ -179,7 +216,16 @@ def get_all_compiler_versions():
             k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE,
                                         keyname)
         except WindowsError:
-            return []
+            # For version 13 or later, check for default instance UUID
+            if is_win64:
+                keyname = 'Software\\WoW6432Node\\Intel\\Suites'
+            else:
+                keyname = 'Software\\Intel\\Suites'
+            try:
+                k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE,
+                                            keyname)
+            except WindowsError:
+                return []
         i = 0
         versions = []
         try:
@@ -191,6 +237,9 @@ def get_all_compiler_versions():
                 # and then the install directory deleted or moved (rather
                 # than uninstalling properly), so the registry values
                 # are still there.
+                if subkey == 'Defaults': # Ignore default instances
+                    i = i + 1
+                    continue
                 ok = False
                 for try_abi in ('IA32', 'IA32e',  'IA64', 'EM64T'):
                     try:
@@ -221,7 +270,7 @@ def get_all_compiler_versions():
         except EnvironmentError:
             # no more subkeys
             pass
-    elif is_linux:
+    elif is_linux or is_mac:
         for d in glob.glob('/opt/intel_cc_*'):
             # Typical dir here is /opt/intel_cc_80.
             m = re.search(r'cc_(.*)$', d)
@@ -238,13 +287,17 @@ def get_all_compiler_versions():
             m = re.search(r'([0-9][0-9.]*)$', d)
             if m:
                 versions.append(m.group(1))
-    elif is_mac:
-        for d in glob.glob('/opt/intel/cc*/*'):
-            # Typical dir here is /opt/intel/cc/9.0 for IA32,
-            # /opt/intel/cce/9.0 for EMT64 (AMD64)
+        for d in glob.glob('/opt/intel/composerxe-*'):
+            # Typical dir here is /opt/intel/composerxe-2011.4.184
             m = re.search(r'([0-9][0-9.]*)$', d)
             if m:
                 versions.append(m.group(1))
+        for d in glob.glob('/opt/intel/composer_xe_*'):
+            # Typical dir here is /opt/intel/composer_xe_2011_sp1.11.344
+            # The _sp1 is useless, the installers are named 2011.9.x, 2011.10.x, 2011.11.x
+            m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d)
+            if m:
+                versions.append("%s.%s"%(m.group(1), m.group(2)))
     def keyfunc(str):
         """Given a dot-separated version string, return a tuple of ints representing it."""
         return [int(x) for x in str.split('.')]
@@ -263,9 +316,17 @@ def get_intel_compiler_top(version, abi):
         if not SCons.Util.can_read_reg:
             raise NoRegistryModuleError("No Windows registry module was found")
         top = get_intel_registry_value('ProductDir', version, abi)
+        archdir={'x86_64': 'intel64',
+                 'amd64' : 'intel64',
+                 'em64t' : 'intel64',
+                 'x86'   : 'ia32',
+                 'i386'  : 'ia32',
+                 'ia32'  : 'ia32'
+        }[abi] # for v11 and greater
         # pre-11, icl was in Bin.  11 and later, it's in Bin/<abi> apparently.
         if not os.path.exists(os.path.join(top, "Bin", "icl.exe")) \
-              and not os.path.exists(os.path.join(top, "Bin", abi, "icl.exe")):
+              and not os.path.exists(os.path.join(top, "Bin", abi, "icl.exe")) \
+              and not os.path.exists(os.path.join(top, "Bin", archdir, "icl.exe")):
             raise MissingDirError("Can't find Intel compiler in %s"%(top))
     elif is_mac or is_linux:
         def find_in_2008style_dir(version):
@@ -293,8 +354,33 @@ def get_intel_compiler_top(version, abi):
                     top = d
                     break
             return top
-        top = find_in_2010style_dir(version) or find_in_2008style_dir(version)
-        print "INTELC: top=",top
+        def find_in_2011style_dir(version):
+            # The 2011 (compiler v12) dirs are inconsistent, so just redo the search from
+            # get_all_compiler_versions and look for a match (search the newest form first)
+            top=None
+            for d in glob.glob('/opt/intel/composer_xe_*'):
+                # Typical dir here is /opt/intel/composer_xe_2011_sp1.11.344
+                # The _sp1 is useless, the installers are named 2011.9.x, 2011.10.x, 2011.11.x
+                m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d)
+                if m:
+                    cur_ver = "%s.%s"%(m.group(1), m.group(2))
+                    if cur_ver == version and \
+                        (os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or
+                        os.path.exists(os.path.join(d, "bin", "intel64", "icc"))):
+                        top = d
+                        break
+            if not top:
+                for d in glob.glob('/opt/intel/composerxe-*'):
+                    # Typical dir here is /opt/intel/composerxe-2011.4.184
+                    m = re.search(r'([0-9][0-9.]*)$', d)
+                    if m and m.group(1) == version and \
+                        (os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or
+                        os.path.exists(os.path.join(d, "bin", "intel64", "icc"))):
+                            top = d
+                            break
+            return top
+        top = find_in_2011style_dir(version) or find_in_2010style_dir(version) or find_in_2008style_dir(version)
+        # print "INTELC: top=",top
         if not top:
             raise MissingDirError("Can't find version %s Intel compiler in %s (abi='%s')"%(version,top, abi))
     return top
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ipkg.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ipkg.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ipkg.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ipkg.py
index bc56dcd38328d62ee6b35bf8f336d913d3cfdbfe..bf2b49671f3a9ffe8c7fd79cb9b60c4e169b89dd 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/ipkg.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ipkg.py
@@ -11,7 +11,7 @@ packages fake_root.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ packages fake_root.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/ipkg.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/ipkg.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/jar.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/jar.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/jar.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/jar.py
index 321006c8ffaa601eb91e79b854e7053796ecc0e9..50d3fc0dd42cd0e014b11cc958d5bbd76f46fe67 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/jar.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/jar.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/jar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/jar.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Subst
 import SCons.Util
@@ -97,7 +97,7 @@ def generate(env):
     env['_JARMANIFEST'] = jarManifest
     env['_JARSOURCES'] = jarSources
     env['_JARCOM']    = '$JAR $_JARFLAGS $TARGET $_JARMANIFEST $_JARSOURCES'
-    env['JARCOM']     = "${TEMPFILE('$_JARCOM')}"
+    env['JARCOM']     = "${TEMPFILE('$_JARCOM','$JARCOMSTR')}"
     env['JARSUFFIX']  = '.jar'
 
 def exists(env):
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/javac.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/javac.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/javac.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/javac.py
index b682cbf0faf4d3a1acb6979c84a20331ff8941d9..bb57208916a66f5e058c785a8a45820acd6f86ea 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/javac.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/javac.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/javac.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/javac.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
@@ -218,7 +218,7 @@ def generate(env):
     env['_JAVASOURCEPATH']          = '${_javapathopt("-sourcepath", "JAVASOURCEPATH", "_JAVASOURCEPATHDEFAULT")} '
     env['_JAVASOURCEPATHDEFAULT']   = '${TARGET.attributes.java_sourcedir}'
     env['_JAVACCOM']                = '$JAVAC $JAVACFLAGS $_JAVABOOTCLASSPATH $_JAVACLASSPATH -d ${TARGET.attributes.java_classdir} $_JAVASOURCEPATH $SOURCES'
-    env['JAVACCOM']                 = "${TEMPFILE('$_JAVACCOM')}"
+    env['JAVACCOM']                 = "${TEMPFILE('$_JAVACCOM','$JAVACCOMSTR')}"
     env['JAVACLASSSUFFIX']          = '.class'
     env['JAVASUFFIX']               = '.java'
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/javah.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/javah.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/javah.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/javah.py
index be5145d482cb7722adc7595a593d1e62e6a97610..1d667b9efef26b6444add7f67405ddb75b9d5ce6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/javah.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/javah.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/javah.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/javah.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/latex.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/latex.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/latex.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/latex.py
index 427c373246777af5eb6bf5ca7dbd381375737564..69413cc3205648bbc0f3d65736723ca6c6146d17 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/latex.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/latex.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/latex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/latex.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Defaults
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ldc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ldc.py
new file mode 100644
index 0000000000000000000000000000000000000000..c1b558ff3cc9c3640e5bcf2693c04a4ebbbbb700
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/ldc.py
@@ -0,0 +1,144 @@
+"""SCons.Tool.ldc
+
+Tool-specific initialization for the LDC compiler.
+(http://www.dsource.org/projects/ldc)
+
+Developed by Russel Winder (russel@winder.org.uk)
+2012-05-09 onwards
+
+Compiler variables:
+    DC - The name of the D compiler to use.  Defaults to ldc2.
+    DPATH - List of paths to search for import modules.
+    DVERSIONS - List of version tags to enable when compiling.
+    DDEBUG - List of debug tags to enable when compiling.
+
+Linker related variables:
+    LIBS - List of library files to link in.
+    DLINK - Name of the linker to use.  Defaults to ldc2.
+    DLINKFLAGS - List of linker flags.
+
+Lib tool variables:
+    DLIB - Name of the lib tool to use.  Defaults to lib.
+    DLIBFLAGS - List of flags to pass to the lib tool.
+    LIBS - Same as for the linker. (libraries to pull into the .lib)
+"""
+
+#
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Tool/ldc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+import os
+import subprocess
+
+import SCons.Action
+import SCons.Builder
+import SCons.Defaults
+import SCons.Scanner.D
+import SCons.Tool
+
+import SCons.Tool.DCommon
+
+
+def generate(env):
+    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
+
+    static_obj.add_action('.d', SCons.Defaults.DAction)
+    shared_obj.add_action('.d', SCons.Defaults.ShDAction)
+    static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter)
+    shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter)
+
+    env['DC'] = env.Detect('ldc2')
+    env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of=$TARGET $SOURCES'
+    env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}'
+    env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}'
+    env['_DDEBUGFLAGS'] = '${_concat(DDEBUGPREFIX, DDEBUG, DDEBUGSUFFIX, __env__)}'
+    env['_DFLAGS'] = '${_concat(DFLAGPREFIX, DFLAGS, DFLAGSUFFIX, __env__)}'
+
+    env['SHDC'] = '$DC'
+    env['SHDCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -relocation-model=pic -of=$TARGET $SOURCES'
+
+    env['DPATH'] = ['#/']
+    env['DFLAGS'] = []
+    env['DVERSIONS'] = []
+    env['DDEBUG'] = []
+
+    if env['DC']:
+        SCons.Tool.DCommon.addDPATHToEnv(env, env['DC'])
+
+    env['DINCPREFIX'] = '-I='
+    env['DINCSUFFIX'] = ''
+    env['DVERPREFIX'] = '-version='
+    env['DVERSUFFIX'] = ''
+    env['DDEBUGPREFIX'] = '-debug='
+    env['DDEBUGSUFFIX'] = ''
+    env['DFLAGPREFIX'] = '-'
+    env['DFLAGSUFFIX'] = ''
+    env['DFILESUFFIX'] = '.d'
+
+    env['DLINK'] = '$DC'
+    env['DLINKFLAGS'] = SCons.Util.CLVar('')
+    env['DLINKCOM'] = '$DLINK -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
+
+    env['DSHLINK'] = '$DC'
+    env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc')
+    # Hack for Fedora the packages of which use the wrong name :-(
+    if os.path.exists('/usr/lib64/libphobos-ldc.so') or  os.path.exists('/usr/lib32/libphobos-ldc.so') or os.path.exists('/usr/lib/libphobos-ldc.so') :
+        env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc')
+    env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
+
+    env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l'
+    env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else ''
+    #env['_DLIBFLAGS'] = '${_concat(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, __env__, RDirs, TARGET, SOURCE)}'
+    env['_DLIBFLAGS'] = '${_stripixes(DLIBLINKPREFIX, LIBS, DLIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES,  __env__)}'
+
+    env['DLIBDIRPREFIX'] = '-L-L'
+    env['DLIBDIRSUFFIX'] = ''
+    env['_DLIBDIRFLAGS'] = '${_concat(DLIBDIRPREFIX, LIBPATH, DLIBDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)}'
+
+
+    env['DLIB'] = 'lib' if env['PLATFORM'] == 'win32' else 'ar cr'
+    env['DLIBCOM'] = '$DLIB $_DLIBFLAGS {0}$TARGET $SOURCES $_DLIBFLAGS'.format('-c ' if env['PLATFORM'] == 'win32' else '')
+
+    #env['_DLIBFLAGS'] = '${_concat(DLIBFLAGPREFIX, DLIBFLAGS, DLIBFLAGSUFFIX, __env__)}'
+
+    env['DLIBFLAGPREFIX'] = '-'
+    env['DLIBFLAGSUFFIX'] = ''
+
+    # __RPATH is set to $_RPATH in the platform specification if that
+    # platform supports it.
+    env['DRPATHPREFIX'] = '-L-rpath='
+    env['DRPATHSUFFIX'] = ''
+    env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}'
+
+    SCons.Tool.createStaticLibBuilder(env)
+
+
+def exists(env):
+    return env.Detect('ldc2')
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/lex.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/lex.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/lex.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/lex.py
index 76e899248a406c17818a86f81a2d93eb8c2aa806..9f6557de73d245da6d10b7251849d2eeba9a205c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/lex.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/lex.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/lex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/lex.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/link.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/link.py
new file mode 100644
index 0000000000000000000000000000000000000000..6874301dc4a6b2deb49e79456a870dc822c26b12
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/link.py
@@ -0,0 +1,218 @@
+"""SCons.Tool.link
+
+Tool-specific initialization for the generic Posix linker.
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+
+#
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Tool/link.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+import re
+
+import SCons.Defaults
+import SCons.Tool
+import SCons.Util
+import SCons.Warnings
+
+from SCons.Tool.FortranCommon import isfortran
+
+from SCons.Tool.DCommon import isD
+
+cplusplus = __import__('c++', globals(), locals(), [])
+
+issued_mixed_link_warning = False
+
+def smart_link(source, target, env, for_signature):
+    has_cplusplus = cplusplus.iscplusplus(source)
+    has_fortran = isfortran(env, source)
+    has_d = isD(env, source)
+    if has_cplusplus and has_fortran and not has_d:
+        global issued_mixed_link_warning
+        if not issued_mixed_link_warning:
+            msg = "Using $CXX to link Fortran and C++ code together.\n\t" + \
+              "This may generate a buggy executable if the '%s'\n\t" + \
+              "compiler does not know how to deal with Fortran runtimes."
+            SCons.Warnings.warn(SCons.Warnings.FortranCxxMixWarning,
+                                msg % env.subst('$CXX'))
+            issued_mixed_link_warning = True
+        return '$CXX'
+    elif has_d:
+        env['LINKCOM'] = env['DLINKCOM']
+        env['SHLINKCOM'] = env['SHDLINKCOM']
+        return '$DC'
+    elif has_fortran:
+        return '$FORTRAN'
+    elif has_cplusplus:
+        return '$CXX'
+    return '$CC'
+
+def shlib_emitter(target, source, env):
+    Verbose = False
+    platform = env.subst('$PLATFORM')
+    for tgt in target:
+        tgt.attributes.shared = 1
+    try:
+        # target[0] comes in as libtest.so. Add the version extensions
+        version = env.subst('$SHLIBVERSION')
+        if version:
+            version_names = shlib_emitter_names(target, source, env)
+            # mark the target with the shared libraries name, including
+            # the version number
+            target[0].attributes.shlibname = version_names[0]
+            shlib = env.File(version_names[0], directory=target[0].get_dir())
+            target[0].attributes.shlibpath = shlib.get_internal_path()
+            for name in version_names[1:]:
+                env.SideEffect(name, shlib)
+                env.Clean(shlib, name)
+                if Verbose:
+                    print "shlib_emitter: add side effect - ",name
+            env.Clean(shlib, target[0])
+            return ([shlib], source)
+    except KeyError:
+        version = None
+    return (target, source)
+
+def shlib_emitter_names(target, source, env):
+    """Return list of file names that are side effects for a versioned library build. The first name in the list is the new name for the target"""
+    Verbose = False
+    platform = env.subst('$PLATFORM')
+    version_names = []
+    try:
+        # target[0] comes in as libtest.so. Add the version extensions
+        version = env.subst('$SHLIBVERSION')
+        if version.count(".") != 2:
+            # We need a version of the form x.y.z to proceed
+            raise ValueError
+        if version:
+            if platform == 'posix' or platform == 'sunos':
+                versionparts = version.split('.')
+                if hasattr(target[0].attributes, 'shlibname'):
+                    name = target[0].attributes.shlibname
+                else:
+                    name = target[0].name
+                # generate library name with the version number
+                version_name = name + '.' + version
+                if Verbose:
+                    print "shlib_emitter_names: target is ", version_name
+                    print "shlib_emitter_names: side effect: ", name
+                # add version_name to list of names to be a Side effect
+                version_names.append(version_name)
+                if Verbose:
+                    print "shlib_emitter_names: versionparts ",versionparts
+                for ver in versionparts[0:-1]:
+                    name = name + '.' + ver
+                    if Verbose:
+                        print "shlib_emitter_names: side effect: ", name
+                    # add name to list of names to be a Side effect
+                    version_names.append(name)
+            elif platform == 'darwin':
+                shlib_suffix = env.subst('$SHLIBSUFFIX')
+                if hasattr(target[0].attributes, 'shlibname'):
+                    name = target[0].attributes.shlibname
+                else:
+                    name = target[0].name
+                # generate library name with the version number
+                suffix_re = re.escape(shlib_suffix)
+                version_name = re.sub(suffix_re, '.' + version + shlib_suffix, name)
+                if Verbose:
+                    print "shlib_emitter_names: target is ", version_name
+                    print "shlib_emitter_names: side effect: ", name
+                # add version_name to list of names to be a Side effect
+                version_names.append(version_name)
+            elif platform == 'cygwin':
+                shlib_suffix = env.subst('$SHLIBSUFFIX')
+                if hasattr(target[0].attributes, 'shlibname'):
+                    name = target[0].attributes.shlibname
+                else:
+                    name = target[0].name
+                # generate library name with the version number
+                suffix_re = re.escape(shlib_suffix)
+                version_name = re.sub(suffix_re, '-' + re.sub('\.', '-', version) + shlib_suffix, name)
+                if Verbose:
+                    print "shlib_emitter_names: target is ", version_name
+                    print "shlib_emitter_names: side effect: ", name
+                # add version_name to list of names to be a Side effect
+                version_names.append(version_name)
+
+    except KeyError:
+        version = None
+    return version_names
+
+def generate(env):
+    """Add Builders and construction variables for gnulink to an Environment."""
+    SCons.Tool.createSharedLibBuilder(env)
+    SCons.Tool.createProgBuilder(env)
+
+    env['SHLINK']      = '$LINK'
+    env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
+    env['SHLINKCOM']   = '$SHLINK -o $TARGET $SHLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+    # don't set up the emitter, cause AppendUnique will generate a list
+    # starting with None :-(
+    env.Append(SHLIBEMITTER = [shlib_emitter])
+    env['SMARTLINK']   = smart_link
+    env['LINK']        = "$SMARTLINK"
+    env['LINKFLAGS']   = SCons.Util.CLVar('')
+    # __RPATH is only set to something ($_RPATH typically) on platforms that support it.
+    env['LINKCOM']     = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+    env['LIBDIRPREFIX']='-L'
+    env['LIBDIRSUFFIX']=''
+    env['_LIBFLAGS']='${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}'
+    env['LIBLINKPREFIX']='-l'
+    env['LIBLINKSUFFIX']=''
+
+    if env['PLATFORM'] == 'hpux':
+        env['SHLIBSUFFIX'] = '.sl'
+    elif env['PLATFORM'] == 'aix':
+        env['SHLIBSUFFIX'] = '.a'
+
+    # For most platforms, a loadable module is the same as a shared
+    # library.  Platforms which are different can override these, but
+    # setting them the same means that LoadableModule works everywhere.
+    SCons.Tool.createLoadableModuleBuilder(env)
+    env['LDMODULE'] = '$SHLINK'
+    # don't set up the emitter, cause AppendUnique will generate a list
+    # starting with None :-(
+    env.Append(LDMODULEEMITTER='$SHLIBEMITTER')
+    env['LDMODULEPREFIX'] = '$SHLIBPREFIX'
+    env['LDMODULESUFFIX'] = '$SHLIBSUFFIX'
+    env['LDMODULEFLAGS'] = '$SHLINKFLAGS'
+    env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+
+
+
+def exists(env):
+    # This module isn't really a Tool on its own, it's common logic for
+    # other linkers.
+    return None
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/linkloc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/linkloc.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/linkloc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/linkloc.py
index 50a1a5159520e294b49d872f3b137fd6b9debd0e..d2c218f7b36976dbb898acfed89013053da75a4f 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/linkloc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/linkloc.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/linkloc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/linkloc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/m4.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/m4.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/m4.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/m4.py
index 9bd4ef7c8cbb41dea0c5ba2b6d1931b6a0472f7b..dfc4665301b37a55b96a19d542ae15dbd025dff0 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/m4.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/m4.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/m4.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/m4.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/masm.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/masm.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/masm.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/masm.py
index f41f700a25b936bda5aa12a7ac0769d90914f709..7036de62e7a9d63376c47acede26ee0fd56e685d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/masm.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/masm.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/masm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/masm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/midl.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/midl.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/midl.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/midl.py
index 2cdcd5ae15f85f0eda46dc19684d9f47769580bc..0d9307346d0c8189e45de0428c72aa3685a945c3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/midl.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/midl.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/midl.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/midl.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mingw.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mingw.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mingw.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mingw.py
index 1c9c0829fc4e576bd09962bbcd88c76e05ecf7ba..236ce32b21b715c54726b4f30da7cdbcdfa06f0d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mingw.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mingw.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/mingw.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/mingw.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
@@ -133,7 +133,7 @@ def generate(env):
         
 
     # Most of mingw is the same as gcc and friends...
-    gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas', 'm4']
+    gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas', 'gfortran', 'm4']
     for tool in gnu_tools:
         SCons.Tool.Tool(tool)(env)
 
@@ -168,6 +168,7 @@ def generate(env):
     env['OBJSUFFIX'] = '.o'
     env['LIBPREFIX'] = 'lib'
     env['LIBSUFFIX'] = '.a'
+    env['PROGSUFFIX'] = '.exe'
 
 def exists(env):
     return find(env)
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msgfmt.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msgfmt.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msgfmt.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msgfmt.py
index 4fcd8fcc43f9659bf76c72df94fda79d6d75b760..4cfe6868d57dbc4a0efbc2bd8558808f9617aab7 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msgfmt.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msgfmt.py
@@ -1,6 +1,6 @@
 """ msgfmt tool """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/msgfmt.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/msgfmt.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Builder import BuilderBase
 #############################################################################
@@ -77,7 +77,10 @@ def generate(env,**kw):
   """ Generate `msgfmt` tool """
   import SCons.Util
   from SCons.Tool.GettextCommon import _detect_msgfmt
-  env['MSGFMT'] = _detect_msgfmt(env)
+  try:
+    env['MSGFMT'] = _detect_msgfmt(env)
+  except:
+    env['MSGFMT'] = 'msgfmt'
   env.SetDefault(
     MSGFMTFLAGS = [ SCons.Util.CLVar('-c') ],
     MSGFMTCOM = '$MSGFMT $MSGFMTFLAGS -o $TARGET $SOURCE',
@@ -92,7 +95,10 @@ def generate(env,**kw):
 def exists(env):
   """ Check if the tool exists """
   from SCons.Tool.GettextCommon import _msgfmt_exists
-  return _msgfmt_exists(env)
+  try:
+    return _msgfmt_exists(env)
+  except:
+    return False
 #############################################################################
 
 # Local Variables:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msginit.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msginit.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msginit.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msginit.py
index 210fbca58d0f474f263bef0bf97b30475edd1ea0..53046d6e72650007e27034554e22f76b79563331 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msginit.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msginit.py
@@ -3,7 +3,7 @@
 Tool specific initialization of msginit tool.
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ Tool specific initialization of msginit tool.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/msginit.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/msginit.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Warnings
 import SCons.Builder
@@ -79,7 +79,10 @@ def generate(env,**kw):
   """ Generate the `msginit` tool """
   import SCons.Util
   from SCons.Tool.GettextCommon import _detect_msginit
-  env['MSGINIT'] = _detect_msginit(env)
+  try:
+    env['MSGINIT'] = _detect_msginit(env)
+  except:
+    env['MSGINIT'] = 'msginit'
   msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' \
              + ' $MSGINITFLAGS -i $SOURCE -o $TARGET'
   # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded
@@ -104,7 +107,10 @@ def generate(env,**kw):
 def exists(env):
   """ Check if the tool exists """
   from SCons.Tool.GettextCommon import _msginit_exists
-  return  _msginit_exists(env)
+  try:
+    return  _msginit_exists(env)
+  except:
+    return False
 #############################################################################
 
 # Local Variables:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msgmerge.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msgmerge.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msgmerge.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msgmerge.py
index 2bc89f4d5016b87efbf4872e928b63aadb3c61c8..e2d06f4de717b5c2374442cab3f7fddccf654aac 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msgmerge.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msgmerge.py
@@ -3,7 +3,7 @@
 Tool specific initialization for `msgmerge` tool.
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ Tool specific initialization for `msgmerge` tool.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/msgmerge.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/msgmerge.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 #############################################################################
 def _update_or_init_po_files(target, source, env):
@@ -70,7 +70,10 @@ def _POUpdateBuilderWrapper(env, target=None, source=_null, **kw):
 def generate(env,**kw):
   """ Generate the `xgettext` tool """
   from SCons.Tool.GettextCommon import _detect_msgmerge
-  env['MSGMERGE'] = _detect_msgmerge(env)
+  try:
+    env['MSGMERGE'] = _detect_msgmerge(env)
+  except:
+    env['MSGMERGE'] = 'msgmerge'
   env.SetDefault(
     POTSUFFIX = ['.pot'],
     POSUFFIX = ['.po'],
@@ -88,7 +91,10 @@ def generate(env,**kw):
 def exists(env):
   """ Check if the tool exists """
   from SCons.Tool.GettextCommon import _msgmerge_exists
-  return  _msgmerge_exists(env)
+  try:
+    return  _msgmerge_exists(env)
+  except:
+    return False
 #############################################################################
 
 # Local Variables:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mslib.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mslib.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mslib.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mslib.py
index 82ea503239bed9a86152965fb054600fe3c49b65..a82e88db5051f7359b6490d1cfc8c26f9cd32ea2 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mslib.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mslib.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/mslib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/mslib.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
@@ -50,7 +50,7 @@ def generate(env):
 
     env['AR']          = 'lib'
     env['ARFLAGS']     = SCons.Util.CLVar('/nologo')
-    env['ARCOM']       = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
+    env['ARCOM']       = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES','$ARCOMSTR')}"
     env['LIBPREFIX']   = ''
     env['LIBSUFFIX']   = '.lib'
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mslink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mslink.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mslink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mslink.py
index 1f53295da8d605525919c462299f5dad4a2778c2..690630346fee48448252953f070dbaa4c6ae3448 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mslink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mslink.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/mslink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/mslink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
@@ -129,6 +129,14 @@ def _dllEmitter(target, source, env, paramtp):
         extratargets.append(pdb)
         target[0].attributes.pdb = pdb
 
+    if version_num >= 11.0 and env.get('PCH', 0):
+        # MSVC 11 and above need the PCH object file to be added to the link line,
+        # otherwise you get link error LNK2011.
+        pchobj = SCons.Util.splitext(str(env['PCH']))[0] + '.obj'
+        # print "prog_emitter, version %s, appending pchobj %s"%(version_num, pchobj)
+        if pchobj not in extrasources:
+            extrasources.append(pchobj)
+
     if not no_import_lib and \
        not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
         # Append an import library to the list of targets.
@@ -208,7 +216,7 @@ def embedManifestDllCheck(target, source, env):
     """Function run by embedManifestDllCheckAction to check for existence of manifest
     and other conditions, and embed the manifest by calling embedManifestDllAction if so."""
     if env.get('WINDOWS_EMBED_MANIFEST', 0):
-        manifestSrc = target[0].abspath + '.manifest'
+        manifestSrc = target[0].get_abspath() + '.manifest'
         if os.path.exists(manifestSrc):
             ret = (embedManifestDllAction) ([target[0]],None,env)        
             if ret:
@@ -222,7 +230,7 @@ def embedManifestExeCheck(target, source, env):
     """Function run by embedManifestExeCheckAction to check for existence of manifest
     and other conditions, and embed the manifest by calling embedManifestExeAction if so."""
     if env.get('WINDOWS_EMBED_MANIFEST', 0):
-        manifestSrc = target[0].abspath + '.manifest'
+        manifestSrc = target[0].get_abspath() + '.manifest'
         if os.path.exists(manifestSrc):
             ret = (embedManifestExeAction) ([target[0]],None,env)
             if ret:
@@ -237,11 +245,11 @@ embedManifestExeCheckAction = SCons.Action.Action(embedManifestExeCheck, None)
 
 regServerAction = SCons.Action.Action("$REGSVRCOM", "$REGSVRCOMSTR")
 regServerCheck = SCons.Action.Action(RegServerFunc, None)
-shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}', '$SHLINKCOMSTR')
+shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES", "$SHLINKCOMSTR")}', '$SHLINKCOMSTR')
 compositeShLinkAction = shlibLinkAction + regServerCheck + embedManifestDllCheckAction
-ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}', '$LDMODULECOMSTR')
+ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES", "$LDMODULECOMSTR")}', '$LDMODULECOMSTR')
 compositeLdmodAction = ldmodLinkAction + regServerCheck + embedManifestDllCheckAction
-exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}', '$LINKCOMSTR')
+exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows", "$LINKCOMSTR")}', '$LINKCOMSTR')
 compositeLinkAction = exeLinkAction + embedManifestExeCheckAction
 
 def generate(env):
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mssdk.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mssdk.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mssdk.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mssdk.py
index f871c7d5a3e52e2d7efc61a2ae73817595412fe2..38368171d14cb34c00d369c40b12c28f505bba3f 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mssdk.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mssdk.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/mssdk.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/mssdk.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 """engine.SCons.Tool.mssdk
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msvc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msvc.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msvc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msvc.py
index eb479a35b2d9ec8bf15ebc8c9cdc5c8596086273..03d65ee6789a29c3667dea9f3ec081c0c5f3613c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msvc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msvc.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/msvc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/msvc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
@@ -224,17 +224,17 @@ def generate(env):
     env['CC']         = 'cl'
     env['CCFLAGS']    = SCons.Util.CLVar('/nologo')
     env['CFLAGS']     = SCons.Util.CLVar('')
-    env['CCCOM']      = '${TEMPFILE("$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM")}'
+    env['CCCOM']      = '${TEMPFILE("$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM","$CCCOMSTR")}'
     env['SHCC']       = '$CC'
     env['SHCCFLAGS']  = SCons.Util.CLVar('$CCFLAGS')
     env['SHCFLAGS']   = SCons.Util.CLVar('$CFLAGS')
-    env['SHCCCOM']    = '${TEMPFILE("$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM")}'
+    env['SHCCCOM']    = '${TEMPFILE("$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS $_CCCOMCOM","$SHCCCOMSTR")}'
     env['CXX']        = '$CC'
     env['CXXFLAGS']   = SCons.Util.CLVar('$( /TP $)')
-    env['CXXCOM']     = '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM")}'
+    env['CXXCOM']     = '${TEMPFILE("$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS $_CCCOMCOM","$CXXCOMSTR")}'
     env['SHCXX']      = '$CXX'
     env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
-    env['SHCXXCOM']   = '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM")}'
+    env['SHCXXCOM']   = '${TEMPFILE("$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM","$SHCXXCOMSTR")}'
     env['CPPDEFPREFIX']  = '/D'
     env['CPPDEFSUFFIX']  = ''
     env['INCPREFIX']  = '/I'
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msvs.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msvs.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msvs.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msvs.py
index c0443d96d50848ed9a2771b7f5a2cb655f22bfd7..0ad4c780f1da53c0429a92f2024c249488be0b2d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/msvs.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/msvs.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/msvs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/msvs.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.compat
 
@@ -63,6 +63,7 @@ def xmlify(s):
     s = s.replace("&", "&amp;") # do this first
     s = s.replace("'", "&apos;")
     s = s.replace('"', "&quot;")
+    s = s.replace('\n', '&#x0A;')
     return s
 
 # Process a CPPPATH list in includes, given the env, target and source.
@@ -198,6 +199,209 @@ def makeHierarchy(sources):
         #    print 'Warning: failed to decompose path for '+str(file)
     return hierarchy
 
+class _UserGenerator(object):
+    '''
+    Base class for .dsp.user file generator
+    '''
+    # Default instance values.
+    # Ok ... a bit defensive, but it does not seems reasonable to crash the 
+    # build for a workspace user file. :-)
+    usrhead = None
+    usrdebg = None 
+    usrconf = None
+    createfile = False 
+    def __init__(self, dspfile, source, env):
+        # DebugSettings should be a list of debug dictionary sorted in the same order
+        # than the target list and variants 
+        if 'variant' not in env:
+            raise SCons.Errors.InternalError("You must specify a 'variant' argument (i.e. 'Debug' or " +\
+                  "'Release') to create an MSVSProject.")
+        elif SCons.Util.is_String(env['variant']):
+            variants = [env['variant']]
+        elif SCons.Util.is_List(env['variant']):
+            variants = env['variant']
+        
+        if 'DebugSettings' not in env or env['DebugSettings'] == None:
+            dbg_settings = []
+        elif SCons.Util.is_Dict(env['DebugSettings']):
+            dbg_settings = [env['DebugSettings']]
+        elif SCons.Util.is_List(env['DebugSettings']):
+            if len(env['DebugSettings']) != len(variants):
+                raise SCons.Errors.InternalError("Sizes of 'DebugSettings' and 'variant' lists must be the same.")
+            dbg_settings = []
+            for ds in env['DebugSettings']:
+                if SCons.Util.is_Dict(ds):
+                    dbg_settings.append(ds)
+                else:
+                    dbg_settings.append({})
+        else:
+            dbg_settings = []
+            
+        if len(dbg_settings) == 1:
+            dbg_settings = dbg_settings * len(variants)
+            
+        self.createfile = self.usrhead and self.usrdebg and self.usrconf and \
+                            dbg_settings and bool([ds for ds in dbg_settings if ds]) 
+
+        if self.createfile:
+            dbg_settings = dict(zip(variants, dbg_settings))
+            for var, src in dbg_settings.items():
+                # Update only expected keys
+                trg = {}
+                for key in [k for k in self.usrdebg.keys() if k in src]:
+                    trg[key] = str(src[key])
+                self.configs[var].debug = trg
+    
+    def UserHeader(self):
+        encoding = self.env.subst('$MSVSENCODING')
+        versionstr = self.versionstr
+        self.usrfile.write(self.usrhead % locals())
+   
+    def UserProject(self):
+        pass
+    
+    def Build(self):
+        if not self.createfile:
+            return
+        try:
+            filename = self.dspabs +'.user'
+            self.usrfile = open(filename, 'w')
+        except IOError, detail:
+            raise SCons.Errors.InternalError('Unable to open "' + filename + '" for writing:' + str(detail))
+        else:
+            self.UserHeader()
+            self.UserProject()
+            self.usrfile.close()
+
+V9UserHeader = """\
+<?xml version="1.0" encoding="%(encoding)s"?>
+<VisualStudioUserFile
+\tProjectType="Visual C++"
+\tVersion="%(versionstr)s"
+\tShowAllFiles="false"
+\t>
+\t<Configurations>
+"""
+
+V9UserConfiguration = """\
+\t\t<Configuration
+\t\t\tName="%(variant)s|%(platform)s"
+\t\t\t>
+\t\t\t<DebugSettings
+%(debug_settings)s
+\t\t\t/>
+\t\t</Configuration>
+"""
+
+V9DebugSettings = {
+'Command':'$(TargetPath)',
+'WorkingDirectory': None,
+'CommandArguments': None,
+'Attach':'false',
+'DebuggerType':'3',
+'Remote':'1',
+'RemoteMachine': None,
+'RemoteCommand': None,
+'HttpUrl': None,
+'PDBPath': None,
+'SQLDebugging': None,
+'Environment': None,
+'EnvironmentMerge':'true',
+'DebuggerFlavor': None,
+'MPIRunCommand': None,
+'MPIRunArguments': None,
+'MPIRunWorkingDirectory': None,
+'ApplicationCommand': None,
+'ApplicationArguments': None,
+'ShimCommand': None,
+'MPIAcceptMode': None,
+'MPIAcceptFilter': None,
+}
+
+class _GenerateV7User(_UserGenerator):
+    """Generates a Project file for MSVS .NET"""
+    def __init__(self, dspfile, source, env):
+        if self.version_num >= 9.0:
+            self.usrhead = V9UserHeader
+            self.usrconf = V9UserConfiguration
+            self.usrdebg = V9DebugSettings
+        _UserGenerator.__init__(self, dspfile, source, env)
+    
+    def UserProject(self):
+        confkeys = sorted(self.configs.keys())
+        for kind in confkeys:
+            variant = self.configs[kind].variant
+            platform = self.configs[kind].platform
+            debug = self.configs[kind].debug
+            if debug:
+                debug_settings = '\n'.join(['\t\t\t\t%s="%s"' % (key, xmlify(value)) 
+                                            for key, value in debug.items() 
+                                            if value is not None])
+                self.usrfile.write(self.usrconf % locals())
+        self.usrfile.write('\t</Configurations>\n</VisualStudioUserFile>')
+
+V10UserHeader = """\
+<?xml version="1.0" encoding="%(encoding)s"?>
+<Project ToolsVersion="%(versionstr)s" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+"""
+
+V10UserConfiguration = """\
+\t<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">
+%(debug_settings)s
+\t</PropertyGroup>
+"""
+
+V10DebugSettings = {
+'LocalDebuggerCommand': None,
+'LocalDebuggerCommandArguments': None,
+'LocalDebuggerEnvironment': None,
+'DebuggerFlavor': 'WindowsLocalDebugger',
+'LocalDebuggerWorkingDirectory': None,
+'LocalDebuggerAttach': None,
+'LocalDebuggerDebuggerType': None,
+'LocalDebuggerMergeEnvironment': None,
+'LocalDebuggerSQLDebugging': None,
+'RemoteDebuggerCommand': None,
+'RemoteDebuggerCommandArguments': None,
+'RemoteDebuggerWorkingDirectory': None,
+'RemoteDebuggerServerName': None,
+'RemoteDebuggerConnection': None,
+'RemoteDebuggerDebuggerType': None,
+'RemoteDebuggerAttach': None,
+'RemoteDebuggerSQLDebugging': None,
+'DeploymentDirectory': None,
+'AdditionalFiles': None,
+'RemoteDebuggerDeployDebugCppRuntime': None,
+'WebBrowserDebuggerHttpUrl': None,
+'WebBrowserDebuggerDebuggerType': None,
+'WebServiceDebuggerHttpUrl': None,
+'WebServiceDebuggerDebuggerType': None,
+'WebServiceDebuggerSQLDebugging': None,
+}
+
+class _GenerateV10User(_UserGenerator):
+    """Generates a Project'user file for MSVS 2010"""
+    
+    def __init__(self, dspfile, source, env):
+        self.versionstr = '4.0'
+        self.usrhead = V10UserHeader
+        self.usrconf = V10UserConfiguration
+        self.usrdebg = V10DebugSettings
+        _UserGenerator.__init__(self, dspfile, source, env)
+
+    def UserProject(self):
+        confkeys = sorted(self.configs.keys())
+        for kind in confkeys:
+            variant = self.configs[kind].variant
+            platform = self.configs[kind].platform
+            debug = self.configs[kind].debug
+            if debug:
+                debug_settings = '\n'.join(['\t\t<%s>%s</%s>' % (key, xmlify(value), key) 
+                                            for key, value in debug.items() 
+                                            if value is not None])
+                self.usrfile.write(self.usrconf % locals())
+        self.usrfile.write('</Project>')
+
 class _DSPGenerator(object):
     """ Base class for DSP generators """
 
@@ -289,9 +493,17 @@ class _DSPGenerator(object):
                 runfile.append(s)
 
         self.sconscript = env['MSVSSCONSCRIPT']
-
-        cmdargs = env.get('cmdargs', '')
-
+        
+        if 'cmdargs' not in env or env['cmdargs'] == None:
+            cmdargs = [''] * len(variants)
+        elif SCons.Util.is_String(env['cmdargs']):
+            cmdargs = [env['cmdargs']] * len(variants)
+        elif SCons.Util.is_List(env['cmdargs']):
+            if len(env['cmdargs']) != len(variants):
+                raise SCons.Errors.InternalError("Sizes of 'cmdargs' and 'variant' lists must be the same.")
+            else:
+                cmdargs = env['cmdargs']
+                
         self.env = env
 
         if 'name' in self.env:
@@ -354,7 +566,7 @@ class _DSPGenerator(object):
             print "Adding '" + self.name + ' - ' + config.variant + '|' + config.platform + "' to '" + str(dspfile) + "'"
 
         for i in range(len(variants)):
-            AddConfig(self, variants[i], buildtarget[i], outdir[i], runfile[i], cmdargs)
+            AddConfig(self, variants[i], buildtarget[i], outdir[i], runfile[i], cmdargs[i])
 
         self.platforms = []
         for key in self.configs.keys():
@@ -620,7 +832,7 @@ V8DSPConfiguration = """\
 \t\t\t/>
 \t\t</Configuration>
 """
-class _GenerateV7DSP(_DSPGenerator):
+class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
     """Generates a Project file for MSVS .NET"""
 
     def __init__(self, dspfile, source, env):
@@ -643,6 +855,8 @@ class _GenerateV7DSP(_DSPGenerator):
             self.dspheader = V7DSPHeader
             self.dspconfiguration = V7DSPConfiguration
         self.file = None
+        
+        _GenerateV7User.__init__(self, dspfile, source, env)
 
     def PrintHeader(self):
         env = self.env
@@ -867,7 +1081,9 @@ class _GenerateV7DSP(_DSPGenerator):
             self.PrintHeader()
             self.PrintProject()
             self.file.close()
-			
+            
+        _GenerateV7User.Build(self)
+
 V10DSPHeader = """\
 <?xml version="1.0" encoding="%(encoding)s"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@@ -892,6 +1108,7 @@ V10DSPPropertyGroupCondition = """\
 \t<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="Configuration">
 \t\t<ConfigurationType>Makefile</ConfigurationType>
 \t\t<UseOfMfc>false</UseOfMfc>
+\t\t<PlatformToolset>%(toolset)s</PlatformToolset>
 \t</PropertyGroup>
 """
 
@@ -913,15 +1130,16 @@ V10DSPCommandLine = """\
 \t\t<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
 """
 
-class _GenerateV10DSP(_DSPGenerator):
+class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
     """Generates a Project file for MSVS 2010"""
 
     def __init__(self, dspfile, source, env):
         _DSPGenerator.__init__(self, dspfile, source, env)
-        
         self.dspheader = V10DSPHeader
         self.dspconfiguration = V10DSPProjectConfiguration
         self.dspglobals = V10DSPGlobals
+        
+        _GenerateV10User.__init__(self, dspfile, source, env)
 
     def PrintHeader(self):
         env = self.env
@@ -972,6 +1190,10 @@ class _GenerateV10DSP(_DSPGenerator):
              
         self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\n')
         
+        toolset = ''
+        if 'MSVC_VERSION' in self.env:
+            version_num, suite = msvs_parse_version(self.env['MSVC_VERSION'])
+            toolset = 'v%d' % (version_num * 10)
         for kind in confkeys:
             variant = self.configs[kind].variant
             platform = self.configs[kind].platform
@@ -1169,6 +1391,8 @@ class _GenerateV10DSP(_DSPGenerator):
             self.PrintHeader()
             self.PrintProject()
             self.file.close()
+            
+        _GenerateV10User.Build(self)
 
 class _DSWGenerator(object):
     """ Base class for DSW generators """
@@ -1206,7 +1430,7 @@ class _GenerateV7DSW(_DSWGenerator):
         self.version_num, self.suite = msvs_parse_version(self.version)
         self.versionstr = '7.00'
         if self.version_num >= 11.0:
-            self.versionstr = '12.0'
+            self.versionstr = '12.00'
         elif self.version_num >= 10.0:
             self.versionstr = '11.00'
         elif self.version_num >= 9.0:
@@ -1311,7 +1535,9 @@ class _GenerateV7DSW(_DSWGenerator):
     def PrintSolution(self):
         """Writes a solution file"""
         self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr)
-        if self.versionstr >= 11.0:
+        if self.version_num >= 12.0:
+            self.file.write('# Visual Studio 14\n')
+        elif self.version_num >= 11.0:
             self.file.write('# Visual Studio 11\n')
         elif self.version_num >= 10.0:
             self.file.write('# Visual Studio 2010\n')
@@ -1654,6 +1880,10 @@ def projectEmitter(target, source, env):
         t, s = solutionEmitter(target, target, env)
         targetlist = targetlist + t
 
+    # Beginning with Visual Studio 2010 for each project file (.vcxproj) we have additional file (.vcxproj.filters)
+    if float(env['MSVS_VERSION']) >= 10.0:
+        targetlist.append(targetlist[0] + '.filters')
+
     return (targetlist, sourcelist)
 
 def solutionEmitter(target, source, env):
@@ -1753,7 +1983,7 @@ def generate(env):
         env['MSVSSCONSCRIPT'] = default_MSVS_SConscript
 
     env['MSVSSCONS'] = '"%s" -c "%s"' % (python_executable, getExecScriptMain(env))
-    env['MSVSSCONSFLAGS'] = '-C "${MSVSSCONSCRIPT.dir.abspath}" -f ${MSVSSCONSCRIPT.name}'
+    env['MSVSSCONSFLAGS'] = '-C "${MSVSSCONSCRIPT.dir.get_abspath()}" -f ${MSVSSCONSCRIPT.name}'
     env['MSVSSCONSCOM'] = '$MSVSSCONS $MSVSSCONSFLAGS'
     env['MSVSBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
     env['MSVSREBUILDCOM'] = '$MSVSSCONSCOM "$MSVSBUILDTARGET"'
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mwcc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mwcc.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mwcc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mwcc.py
index 689c2739ab3032cfd1ed3c50abefa4214408b9c7..a130d0fd86194feacfb8536f739825c0612dea3a 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mwcc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mwcc.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/mwcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/mwcc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mwld.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mwld.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mwld.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mwld.py
index 30149c37e6d53ab7f9e0e87e7ea68db9463e4a39..8f6f3a2b0b23e6705a0d1a40f5aeb4a814ac879f 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/mwld.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/mwld.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/mwld.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/mwld.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Tool
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/nasm.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/nasm.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/nasm.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/nasm.py
index e76b51ab17446a752dbb28be15decb5f5347eef7..86a7ef81c6a84343366989573907919a787ead9e 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/nasm.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/nasm.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/nasm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/nasm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/__init__.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/__init__.py
index f2b953d67d27bc19713ab75333dbb5fa6c4cc640..2107d5f728dc9937f4948f116ba095ca70f9810d 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/__init__.py
@@ -4,7 +4,7 @@ SCons Packaging Tool.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -25,7 +25,7 @@ SCons Packaging Tool.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/packaging/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Environment
 from SCons.Variables import *
@@ -80,7 +80,7 @@ def Tag(env, target, source, *more_tags, **kw_tags):
             #if not k.startswith('PACKAGING_'):
             if k[:10] != 'PACKAGING_':
                 k='PACKAGING_'+k
-            setattr(t, k, v)
+            t.Tag(k, v)
 
 def Package(env, target=None, source=None, **kw):
     """ Entry point for the package tool.
@@ -235,9 +235,11 @@ def copy_attr(f1, f2):
     #pattrs = [x for x in dir(f1) if not hasattr(f2, x) and\
     #                                x.startswith('PACKAGING_')]
     copyit = lambda x: not hasattr(f2, x) and x[:10] == 'PACKAGING_'
-    pattrs = list(filter(copyit, dir(f1)))
-    for attr in pattrs:
-        setattr(f2, attr, getattr(f1, attr))
+    if f1._tags:
+        pattrs = list(filter(copyit, f1._tags))
+        for attr in pattrs:
+            f2.Tag(attr, f1.GetTag(attr))
+
 def putintopackageroot(target, source, env, pkgroot, honor_install_location=1):
     """ Uses the CopyAs builder to copy all source files to the directory given
     in pkgroot.
@@ -262,9 +264,9 @@ def putintopackageroot(target, source, env, pkgroot, honor_install_location=1):
         if file.is_under(pkgroot):
             new_source.append(file)
         else:
-            if hasattr(file, 'PACKAGING_INSTALL_LOCATION') and\
+            if file.GetTag('PACKAGING_INSTALL_LOCATION') and\
                        honor_install_location:
-                new_name=make_path_relative(file.PACKAGING_INSTALL_LOCATION)
+                new_name=make_path_relative(file.GetTag('PACKAGING_INSTALL_LOCATION'))
             else:
                 new_name=make_path_relative(file.get_path())
 
@@ -301,7 +303,7 @@ def stripinstallbuilder(target, source, env):
             for ss in s.sources:
                 n_source.append(ss)
                 copy_attr(s, ss)
-                setattr(ss, 'PACKAGING_INSTALL_LOCATION', s.get_path())
+                ss.Tag('PACKAGING_INSTALL_LOCATION', s.get_path())
 
     return (target, n_source)
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/ipk.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/ipk.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/ipk.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/ipk.py
index 251de8a330578f655abce0d1eb1f9300c643e030..51c3381e3568d393dbac1a44e6e65f48c4181719 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/ipk.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/ipk.py
@@ -2,7 +2,7 @@
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/ipk.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/ipk.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Builder
 import SCons.Node.FS
@@ -120,7 +120,7 @@ def build_specfiles(source, target, env):
             return opened_files[needle]
         except KeyError:
             file=filter(lambda x: x.get_path().rfind(needle)!=-1, haystack)[0]
-            opened_files[needle]=open(file.abspath, 'w')
+            opened_files[needle]=open(file.get_abspath(), 'w')
             return opened_files[needle]
 
     control_file=open_file('control', target)
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/msi.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/msi.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/msi.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/msi.py
index dc593b3380eeabb3d5f5208f5fef772e5c2626b2..41b7c77708b2ed89816e5cff115de1d5b7009e7e 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/msi.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/msi.py
@@ -4,7 +4,7 @@ The msi packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -25,7 +25,7 @@ The msi packager.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/packaging/msi.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/msi.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import SCons
@@ -189,7 +189,7 @@ def build_wxsfile(target, source, env):
     """ compiles a .wxs file from the keywords given in env['msi_spec'] and
         by analyzing the tree of source nodes and their tags.
     """
-    file = open(target[0].abspath, 'w')
+    file = open(target[0].get_abspath(), 'w')
 
     try:
         # Create a document with the Wix root tag
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/rpm.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/rpm.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/rpm.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/rpm.py
index 1c83b6bbaaea3af103f0a16102ce50f60b948def..f7e25770ff02e83670017f04b46afbcdd96b47c3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/rpm.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/rpm.py
@@ -4,7 +4,7 @@ The rpm packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -25,11 +25,12 @@ The rpm packager.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/packaging/rpm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/rpm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 
 import SCons.Builder
+import SCons.Tool.rpmutils
 
 from SCons.Environment import OverrideEnvironment
 from SCons.Tool.packaging import stripinstallbuilder, src_targz
@@ -52,16 +53,7 @@ def package(env, target, source, PACKAGEROOT, NAME, VERSION,
     else:
         # This should be overridable from the construction environment,
         # which it is by using ARCHITECTURE=.
-        # Guessing based on what os.uname() returns at least allows it
-        # to work for both i386 and x86_64 Linux systems.
-        archmap = {
-            'i686'  : 'i386',
-            'i586'  : 'i386',
-            'i486'  : 'i386',
-        }
-
-        buildarchitecture = os.uname()[4]
-        buildarchitecture = archmap.get(buildarchitecture, buildarchitecture)
+        buildarchitecture = SCons.Tool.rpmutils.defaultMachine()
 
         if 'ARCHITECTURE' in kw:
             buildarchitecture = kw['ARCHITECTURE']
@@ -138,8 +130,7 @@ def build_specfile(target, source, env):
     """ Builds a RPM specfile from a dictionary with string metadata and
     by analyzing a tree of nodes.
     """
-    file = open(target[0].abspath, 'w')
-    str  = ""
+    file = open(target[0].get_abspath(), 'w')
 
     try:
         file.write( build_specfile_header(env) )
@@ -190,7 +181,7 @@ def build_specfile_sections(spec):
         spec['X_RPM_PREP'] = '[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"' + '\n%setup -q'
 
     if 'X_RPM_BUILD' not in spec:
-        spec['X_RPM_BUILD'] = 'mkdir "$RPM_BUILD_ROOT"'
+        spec['X_RPM_BUILD'] = '[ ! -e "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && mkdir "$RPM_BUILD_ROOT"'
 
     if 'X_RPM_INSTALL' not in spec:
         spec['X_RPM_INSTALL'] = 'scons --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"'
@@ -287,7 +278,9 @@ def build_specfile_filesection(spec, files):
         tags = {}
         for k in supported_tags.keys():
             try:
-                tags[k]=getattr(file, k)
+                v = file.GetTag(k)
+                if v:
+                    tags[k] = v
             except AttributeError:
                 pass
 
@@ -295,7 +288,7 @@ def build_specfile_filesection(spec, files):
         str = str + SimpleTagCompiler(supported_tags, mandatory=0).compile( tags )
 
         str = str + ' '
-        str = str + file.PACKAGING_INSTALL_LOCATION
+        str = str + file.GetTag('PACKAGING_INSTALL_LOCATION')
         str = str + '\n\n'
 
     return str
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_tarbz2.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_tarbz2.py
index 41c37ac4bf6887ba65bdfc34cb65182eaa975d90..438fc2099be7a6e4688794225d1adda66e397eb1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_tarbz2.py
@@ -4,7 +4,7 @@ The tarbz2 SRC packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.packaging import putintopackageroot
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_targz.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_targz.py
index dbf1c2bbea4db3644735efa3da7b2ca29379dbae..6a85869c279599451d8663fc7c5da84b9ab815a0 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_targz.py
@@ -4,7 +4,7 @@ The targz SRC packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The targz SRC packager.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.packaging import putintopackageroot
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_zip.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_zip.py
index e12c3667b8aaa3c8f4e1ed4c0d8e8ef23b05014e..e1a1d4963518ba553690b3d65da8410b241d8eca 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/src_zip.py
@@ -4,7 +4,7 @@ The zip SRC packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The zip SRC packager.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.packaging import putintopackageroot
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/tarbz2.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/tarbz2.py
index 73964eb8315157d87f67105e6d0dd36a1d0cfc3b..79f82198d8953fd70ba9372184e7f53e104bb9eb 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/tarbz2.py
@@ -4,7 +4,7 @@ The tarbz2 SRC packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The tarbz2 SRC packager.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/targz.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/targz.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/targz.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/targz.py
index 1019bdbf52ae17b14a27a15c673c63ed8ceb017c..eeb3d6a325ce897484bf5378911d2b76ecf0a98c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/targz.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/targz.py
@@ -4,7 +4,7 @@ The targz SRC packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The targz SRC packager.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/targz.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/targz.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/zip.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/zip.py
similarity index 87%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/zip.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/zip.py
index a96278749bea66a0b3078665253d9da7550b3bab..6c4037d528cc3b977fd1d39322ef9bb755170fc9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/packaging/zip.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/packaging/zip.py
@@ -4,7 +4,7 @@ The zip SRC packager.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ The zip SRC packager.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/packaging/zip.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/packaging/zip.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdf.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdf.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdf.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdf.py
index beae6dd2a39186bcc6e5a48d375b9b6cdc352767..0ccb49b0db9a163d190222aaa9c8859dfc0ea8cc 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdf.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdf.py
@@ -6,7 +6,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/pdf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/pdf.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Builder
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdflatex.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdflatex.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdflatex.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdflatex.py
index 9d2a449ecf5229c4b94ada01a884521b8463694f..42188f414eff36af3ba3aec80343063d8f3fc174 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdflatex.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdflatex.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/pdflatex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/pdflatex.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Util
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdftex.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdftex.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdftex.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdftex.py
index b5898c17f258c20b9e1da168ed0583ed40731304..e38a27866276843755fe73e7ca1991cd1c504719 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/pdftex.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/pdftex.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/pdftex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/pdftex.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import SCons.Action
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/qt.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/qt.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/qt.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/qt.py
index d40337d44df02f55cb6d28ffe38a2c2e77387def..b8233c06c3e3c29ac1f70fbcc75836c81de09a8b 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/qt.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/qt.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/qt.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/qt.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rmic.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rmic.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rmic.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rmic.py
index 0b32f06bd058bb3e41c7f0e395aae06c35e66904..6045b7fcc415de203dd5f0f530aa14b5028afe65 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rmic.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rmic.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/rmic.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/rmic.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rpcgen.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpcgen.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rpcgen.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpcgen.py
index c1542dc551a32d18ad48755cd139d1f01ad7ca3b..1a3de76e943713c6ec14f5c336554e2b85414caa 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rpcgen.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpcgen.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/rpcgen.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/rpcgen.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 from SCons.Builder import Builder
 import SCons.Util
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rpm.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpm.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rpm.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpm.py
index 3a4d6a928af82700f05a2c27afa30ce4932963e3..46b31124b7b6b9ed092e8d5ed58c2171eaca7143 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/rpm.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpm.py
@@ -11,7 +11,7 @@ tar.gz consisting of the source file and a specfile.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/rpm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/rpm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import re
@@ -51,11 +51,11 @@ def get_cmd(source, env):
     if SCons.Util.is_List(source):
         tar_file_with_included_specfile = source[0]
     return "%s %s %s"%(env['RPM'], env['RPMFLAGS'],
-                       tar_file_with_included_specfile.abspath )
+                       tar_file_with_included_specfile.get_abspath() )
 
 def build_rpm(target, source, env):
     # create a temporary rpm build root.
-    tmpdir = os.path.join( os.path.dirname( target[0].abspath ), 'rpmtemp' )
+    tmpdir = os.path.join( os.path.dirname( target[0].get_abspath() ), 'rpmtemp' )
     if os.path.exists(tmpdir):
         shutil.rmtree(tmpdir)
 
@@ -79,7 +79,7 @@ def build_rpm(target, source, env):
                                        errstr=output,
                                        filename=str(target[0]) )
     else:
-        # XXX: assume that LC_ALL=c is set while running rpmbuild
+        # XXX: assume that LC_ALL=C is set while running rpmbuild
         output_files = re.compile( 'Wrote: (.*)' ).findall( output )
 
         for output, input in zip( output_files, target ):
@@ -87,7 +87,7 @@ def build_rpm(target, source, env):
             expected   = os.path.basename(input.get_path())
 
             assert expected == rpm_output, "got %s but expected %s" % (rpm_output, expected)
-            shutil.copy( output, input.abspath )
+            shutil.copy( output, input.get_abspath() )
 
 
     # cleanup before leaving.
@@ -117,7 +117,7 @@ def generate(env):
         bld = RpmBuilder
         env['BUILDERS']['Rpm'] = bld
 
-    env.SetDefault(RPM          = 'LC_ALL=c rpmbuild')
+    env.SetDefault(RPM          = 'LC_ALL=C rpmbuild')
     env.SetDefault(RPMFLAGS     = SCons.Util.CLVar('-ta'))
     env.SetDefault(RPMCOM       = rpmAction)
     env.SetDefault(RPMSUFFIX    = '.rpm')
diff --git a/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpmutils.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpmutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..10b5560059d22abd3aeaa2d240adec408bd1f080
--- /dev/null
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/rpmutils.py
@@ -0,0 +1,543 @@
+"""SCons.Tool.rpmutils.py
+
+RPM specific helper routines for general usage in the test framework
+and SCons core modules.
+
+Since we check for the RPM package target name in several places,
+we have to know which machine/system name RPM will use for the current
+hardware setup. The following dictionaries and functions try to
+mimic the exact naming rules of the RPM source code.
+They were directly derived from the file "rpmrc.in" of the version
+rpm-4.9.1.3. For updating to a more recent version of RPM, this Python
+script can be used standalone. The usage() function below shows the
+exact syntax.
+
+"""
+
+# Copyright (c) 2001 - 2015 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+__revision__ = "src/engine/SCons/Tool/rpmutils.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
+
+
+import platform
+import subprocess
+
+# Start of rpmrc dictionaries (Marker, don't change or remove!)
+os_canon = {
+  'AIX' : ['AIX','5'],
+  'AmigaOS' : ['AmigaOS','5'],
+  'BSD_OS' : ['bsdi','12'],
+  'CYGWIN32_95' : ['cygwin32','15'],
+  'CYGWIN32_NT' : ['cygwin32','14'],
+  'Darwin' : ['darwin','21'],
+  'FreeBSD' : ['FreeBSD','8'],
+  'HP-UX' : ['hpux10','6'],
+  'IRIX' : ['Irix','2'],
+  'IRIX64' : ['Irix64','10'],
+  'Linux' : ['Linux','1'],
+  'Linux/390' : ['OS/390','20'],
+  'Linux/ESA' : ['VM/ESA','20'],
+  'MacOSX' : ['macosx','21'],
+  'MiNT' : ['FreeMiNT','17'],
+  'NEXTSTEP' : ['NextStep','11'],
+  'OS/390' : ['OS/390','18'],
+  'OSF1' : ['osf1','7'],
+  'SCO_SV' : ['SCO_SV3.2v5.0.2','9'],
+  'SunOS4' : ['SunOS','4'],
+  'SunOS5' : ['solaris','3'],
+  'UNIX_SV' : ['MP_RAS','16'],
+  'VM/ESA' : ['VM/ESA','19'],
+  'machten' : ['machten','13'],
+  'osf3.2' : ['osf1','7'],
+  'osf4.0' : ['osf1','7'],
+}
+
+buildarch_compat = {
+  'alpha' : ['noarch'],
+  'alphaev5' : ['alpha'],
+  'alphaev56' : ['alphaev5'],
+  'alphaev6' : ['alphapca56'],
+  'alphaev67' : ['alphaev6'],
+  'alphapca56' : ['alphaev56'],
+  'amd64' : ['x86_64'],
+  'armv3l' : ['noarch'],
+  'armv4b' : ['noarch'],
+  'armv4l' : ['armv3l'],
+  'armv4tl' : ['armv4l'],
+  'armv5tejl' : ['armv5tel'],
+  'armv5tel' : ['armv4tl'],
+  'armv6l' : ['armv5tejl'],
+  'armv7l' : ['armv6l'],
+  'atariclone' : ['m68kmint','noarch'],
+  'atarist' : ['m68kmint','noarch'],
+  'atariste' : ['m68kmint','noarch'],
+  'ataritt' : ['m68kmint','noarch'],
+  'athlon' : ['i686'],
+  'falcon' : ['m68kmint','noarch'],
+  'geode' : ['i586'],
+  'hades' : ['m68kmint','noarch'],
+  'hppa1.0' : ['parisc'],
+  'hppa1.1' : ['hppa1.0'],
+  'hppa1.2' : ['hppa1.1'],
+  'hppa2.0' : ['hppa1.2'],
+  'i386' : ['noarch','fat'],
+  'i486' : ['i386'],
+  'i586' : ['i486'],
+  'i686' : ['i586'],
+  'ia32e' : ['x86_64'],
+  'ia64' : ['noarch'],
+  'm68k' : ['noarch'],
+  'milan' : ['m68kmint','noarch'],
+  'mips' : ['noarch'],
+  'mipsel' : ['noarch'],
+  'parisc' : ['noarch'],
+  'pentium3' : ['i686'],
+  'pentium4' : ['pentium3'],
+  'ppc' : ['noarch','fat'],
+  'ppc32dy4' : ['noarch'],
+  'ppc64' : ['noarch','fat'],
+  'ppc64iseries' : ['ppc64'],
+  'ppc64pseries' : ['ppc64'],
+  'ppc8260' : ['noarch'],
+  'ppc8560' : ['noarch'],
+  'ppciseries' : ['noarch'],
+  'ppcpseries' : ['noarch'],
+  's390' : ['noarch'],
+  's390x' : ['noarch'],
+  'sh3' : ['noarch'],
+  'sh4' : ['noarch'],
+  'sh4a' : ['sh4'],
+  'sparc' : ['noarch'],
+  'sparc64' : ['sparcv9v'],
+  'sparc64v' : ['sparc64'],
+  'sparcv8' : ['sparc'],
+  'sparcv9' : ['sparcv8'],
+  'sparcv9v' : ['sparcv9'],
+  'sun4c' : ['noarch'],
+  'sun4d' : ['noarch'],
+  'sun4m' : ['noarch'],
+  'sun4u' : ['noarch'],
+  'x86_64' : ['noarch'],
+}
+
+os_compat = {
+  'BSD_OS' : ['bsdi'],
+  'Darwin' : ['MacOSX'],
+  'FreeMiNT' : ['mint','MiNT','TOS'],
+  'IRIX64' : ['IRIX'],
+  'MiNT' : ['FreeMiNT','mint','TOS'],
+  'TOS' : ['FreeMiNT','MiNT','mint'],
+  'bsdi4.0' : ['bsdi'],
+  'hpux10.00' : ['hpux9.07'],
+  'hpux10.01' : ['hpux10.00'],
+  'hpux10.10' : ['hpux10.01'],
+  'hpux10.20' : ['hpux10.10'],
+  'hpux10.30' : ['hpux10.20'],
+  'hpux11.00' : ['hpux10.30'],
+  'hpux9.05' : ['hpux9.04'],
+  'hpux9.07' : ['hpux9.05'],
+  'mint' : ['FreeMiNT','MiNT','TOS'],
+  'ncr-sysv4.3' : ['ncr-sysv4.2'],
+  'osf4.0' : ['osf3.2','osf1'],
+  'solaris2.4' : ['solaris2.3'],
+  'solaris2.5' : ['solaris2.3','solaris2.4'],
+  'solaris2.6' : ['solaris2.3','solaris2.4','solaris2.5'],
+  'solaris2.7' : ['solaris2.3','solaris2.4','solaris2.5','solaris2.6'],
+}
+
+arch_compat = {
+  'alpha' : ['axp','noarch'],
+  'alphaev5' : ['alpha'],
+  'alphaev56' : ['alphaev5'],
+  'alphaev6' : ['alphapca56'],
+  'alphaev67' : ['alphaev6'],
+  'alphapca56' : ['alphaev56'],
+  'amd64' : ['x86_64','athlon','noarch'],
+  'armv3l' : ['noarch'],
+  'armv4b' : ['noarch'],
+  'armv4l' : ['armv3l'],
+  'armv4tl' : ['armv4l'],
+  'armv5tejl' : ['armv5tel'],
+  'armv5tel' : ['armv4tl'],
+  'armv6l' : ['armv5tejl'],
+  'armv7l' : ['armv6l'],
+  'atariclone' : ['m68kmint','noarch'],
+  'atarist' : ['m68kmint','noarch'],
+  'atariste' : ['m68kmint','noarch'],
+  'ataritt' : ['m68kmint','noarch'],
+  'athlon' : ['i686'],
+  'falcon' : ['m68kmint','noarch'],
+  'geode' : ['i586'],
+  'hades' : ['m68kmint','noarch'],
+  'hppa1.0' : ['parisc'],
+  'hppa1.1' : ['hppa1.0'],
+  'hppa1.2' : ['hppa1.1'],
+  'hppa2.0' : ['hppa1.2'],
+  'i370' : ['noarch'],
+  'i386' : ['noarch','fat'],
+  'i486' : ['i386'],
+  'i586' : ['i486'],
+  'i686' : ['i586'],
+  'ia32e' : ['x86_64','athlon','noarch'],
+  'ia64' : ['noarch'],
+  'milan' : ['m68kmint','noarch'],
+  'mips' : ['noarch'],
+  'mipsel' : ['noarch'],
+  'osfmach3_i386' : ['i486'],
+  'osfmach3_i486' : ['i486','osfmach3_i386'],
+  'osfmach3_i586' : ['i586','osfmach3_i486'],
+  'osfmach3_i686' : ['i686','osfmach3_i586'],
+  'osfmach3_ppc' : ['ppc'],
+  'parisc' : ['noarch'],
+  'pentium3' : ['i686'],
+  'pentium4' : ['pentium3'],
+  'powerpc' : ['ppc'],
+  'powerppc' : ['ppc'],
+  'ppc' : ['rs6000'],
+  'ppc32dy4' : ['ppc'],
+  'ppc64' : ['ppc'],
+  'ppc64iseries' : ['ppc64'],
+  'ppc64pseries' : ['ppc64'],
+  'ppc8260' : ['ppc'],
+  'ppc8560' : ['ppc'],
+  'ppciseries' : ['ppc'],
+  'ppcpseries' : ['ppc'],
+  'rs6000' : ['noarch','fat'],
+  's390' : ['noarch'],
+  's390x' : ['s390','noarch'],
+  'sh3' : ['noarch'],
+  'sh4' : ['noarch'],
+  'sh4a' : ['sh4'],
+  'sparc' : ['noarch'],
+  'sparc64' : ['sparcv9'],
+  'sparc64v' : ['sparc64'],
+  'sparcv8' : ['sparc'],
+  'sparcv9' : ['sparcv8'],
+  'sparcv9v' : ['sparcv9'],
+  'sun4c' : ['sparc'],
+  'sun4d' : ['sparc'],
+  'sun4m' : ['sparc'],
+  'sun4u' : ['sparc64'],
+  'x86_64' : ['amd64','athlon','noarch'],
+}
+
+buildarchtranslate = {
+  'alphaev5' : ['alpha'],
+  'alphaev56' : ['alpha'],
+  'alphaev6' : ['alpha'],
+  'alphaev67' : ['alpha'],
+  'alphapca56' : ['alpha'],
+  'amd64' : ['x86_64'],
+  'armv3l' : ['armv3l'],
+  'armv4b' : ['armv4b'],
+  'armv4l' : ['armv4l'],
+  'armv4tl' : ['armv4tl'],
+  'armv5tejl' : ['armv5tejl'],
+  'armv5tel' : ['armv5tel'],
+  'armv6l' : ['armv6l'],
+  'armv7l' : ['armv7l'],
+  'atariclone' : ['m68kmint'],
+  'atarist' : ['m68kmint'],
+  'atariste' : ['m68kmint'],
+  'ataritt' : ['m68kmint'],
+  'athlon' : ['i386'],
+  'falcon' : ['m68kmint'],
+  'geode' : ['i386'],
+  'hades' : ['m68kmint'],
+  'i386' : ['i386'],
+  'i486' : ['i386'],
+  'i586' : ['i386'],
+  'i686' : ['i386'],
+  'ia32e' : ['x86_64'],
+  'ia64' : ['ia64'],
+  'milan' : ['m68kmint'],
+  'osfmach3_i386' : ['i386'],
+  'osfmach3_i486' : ['i386'],
+  'osfmach3_i586' : ['i386'],
+  'osfmach3_i686' : ['i386'],
+  'osfmach3_ppc' : ['ppc'],
+  'pentium3' : ['i386'],
+  'pentium4' : ['i386'],
+  'powerpc' : ['ppc'],
+  'powerppc' : ['ppc'],
+  'ppc32dy4' : ['ppc'],
+  'ppc64iseries' : ['ppc64'],
+  'ppc64pseries' : ['ppc64'],
+  'ppc8260' : ['ppc'],
+  'ppc8560' : ['ppc'],
+  'ppciseries' : ['ppc'],
+  'ppcpseries' : ['ppc'],
+  's390' : ['s390'],
+  's390x' : ['s390x'],
+  'sh3' : ['sh3'],
+  'sh4' : ['sh4'],
+  'sh4a' : ['sh4'],
+  'sparc64v' : ['sparc64'],
+  'sparcv8' : ['sparc'],
+  'sparcv9' : ['sparc'],
+  'sparcv9v' : ['sparc'],
+  'sun4c' : ['sparc'],
+  'sun4d' : ['sparc'],
+  'sun4m' : ['sparc'],
+  'sun4u' : ['sparc64'],
+  'x86_64' : ['x86_64'],
+}
+
+optflags = {
+  'alpha' : ['-O2','-g','-mieee'],
+  'alphaev5' : ['-O2','-g','-mieee','-mtune=ev5'],
+  'alphaev56' : ['-O2','-g','-mieee','-mtune=ev56'],
+  'alphaev6' : ['-O2','-g','-mieee','-mtune=ev6'],
+  'alphaev67' : ['-O2','-g','-mieee','-mtune=ev67'],
+  'alphapca56' : ['-O2','-g','-mieee','-mtune=pca56'],
+  'amd64' : ['-O2','-g'],
+  'armv3l' : ['-O2','-g','-march=armv3'],
+  'armv4b' : ['-O2','-g','-march=armv4'],
+  'armv4l' : ['-O2','-g','-march=armv4'],
+  'armv4tl' : ['-O2','-g','-march=armv4t'],
+  'armv5tejl' : ['-O2','-g','-march=armv5te'],
+  'armv5tel' : ['-O2','-g','-march=armv5te'],
+  'armv6l' : ['-O2','-g','-march=armv6'],
+  'armv7l' : ['-O2','-g','-march=armv7'],
+  'atariclone' : ['-O2','-g','-fomit-frame-pointer'],
+  'atarist' : ['-O2','-g','-fomit-frame-pointer'],
+  'atariste' : ['-O2','-g','-fomit-frame-pointer'],
+  'ataritt' : ['-O2','-g','-fomit-frame-pointer'],
+  'athlon' : ['-O2','-g','-march=athlon'],
+  'falcon' : ['-O2','-g','-fomit-frame-pointer'],
+  'fat' : ['-O2','-g','-arch','i386','-arch','ppc'],
+  'geode' : ['-Os','-g','-m32','-march=geode'],
+  'hades' : ['-O2','-g','-fomit-frame-pointer'],
+  'hppa1.0' : ['-O2','-g','-mpa-risc-1-0'],
+  'hppa1.1' : ['-O2','-g','-mpa-risc-1-0'],
+  'hppa1.2' : ['-O2','-g','-mpa-risc-1-0'],
+  'hppa2.0' : ['-O2','-g','-mpa-risc-1-0'],
+  'i386' : ['-O2','-g','-march=i386','-mtune=i686'],
+  'i486' : ['-O2','-g','-march=i486'],
+  'i586' : ['-O2','-g','-march=i586'],
+  'i686' : ['-O2','-g','-march=i686'],
+  'ia32e' : ['-O2','-g'],
+  'ia64' : ['-O2','-g'],
+  'm68k' : ['-O2','-g','-fomit-frame-pointer'],
+  'milan' : ['-O2','-g','-fomit-frame-pointer'],
+  'mips' : ['-O2','-g'],
+  'mipsel' : ['-O2','-g'],
+  'parisc' : ['-O2','-g','-mpa-risc-1-0'],
+  'pentium3' : ['-O2','-g','-march=pentium3'],
+  'pentium4' : ['-O2','-g','-march=pentium4'],
+  'ppc' : ['-O2','-g','-fsigned-char'],
+  'ppc32dy4' : ['-O2','-g','-fsigned-char'],
+  'ppc64' : ['-O2','-g','-fsigned-char'],
+  'ppc8260' : ['-O2','-g','-fsigned-char'],
+  'ppc8560' : ['-O2','-g','-fsigned-char'],
+  'ppciseries' : ['-O2','-g','-fsigned-char'],
+  'ppcpseries' : ['-O2','-g','-fsigned-char'],
+  's390' : ['-O2','-g'],
+  's390x' : ['-O2','-g'],
+  'sh3' : ['-O2','-g'],
+  'sh4' : ['-O2','-g','-mieee'],
+  'sh4a' : ['-O2','-g','-mieee'],
+  'sparc' : ['-O2','-g','-m32','-mtune=ultrasparc'],
+  'sparc64' : ['-O2','-g','-m64','-mtune=ultrasparc'],
+  'sparc64v' : ['-O2','-g','-m64','-mtune=niagara'],
+  'sparcv8' : ['-O2','-g','-m32','-mtune=ultrasparc','-mv8'],
+  'sparcv9' : ['-O2','-g','-m32','-mtune=ultrasparc'],
+  'sparcv9v' : ['-O2','-g','-m32','-mtune=niagara'],
+  'x86_64' : ['-O2','-g'],
+}
+
+arch_canon = {
+  'IP' : ['sgi','7'],
+  'alpha' : ['alpha','2'],
+  'alphaev5' : ['alphaev5','2'],
+  'alphaev56' : ['alphaev56','2'],
+  'alphaev6' : ['alphaev6','2'],
+  'alphaev67' : ['alphaev67','2'],
+  'alphapca56' : ['alphapca56','2'],
+  'amd64' : ['amd64','1'],
+  'armv3l' : ['armv3l','12'],
+  'armv4b' : ['armv4b','12'],
+  'armv4l' : ['armv4l','12'],
+  'armv5tejl' : ['armv5tejl','12'],
+  'armv5tel' : ['armv5tel','12'],
+  'armv6l' : ['armv6l','12'],
+  'armv7l' : ['armv7l','12'],
+  'atariclone' : ['m68kmint','13'],
+  'atarist' : ['m68kmint','13'],
+  'atariste' : ['m68kmint','13'],
+  'ataritt' : ['m68kmint','13'],
+  'athlon' : ['athlon','1'],
+  'falcon' : ['m68kmint','13'],
+  'geode' : ['geode','1'],
+  'hades' : ['m68kmint','13'],
+  'i370' : ['i370','14'],
+  'i386' : ['i386','1'],
+  'i486' : ['i486','1'],
+  'i586' : ['i586','1'],
+  'i686' : ['i686','1'],
+  'ia32e' : ['ia32e','1'],
+  'ia64' : ['ia64','9'],
+  'm68k' : ['m68k','6'],
+  'm68kmint' : ['m68kmint','13'],
+  'milan' : ['m68kmint','13'],
+  'mips' : ['mips','4'],
+  'mipsel' : ['mipsel','11'],
+  'pentium3' : ['pentium3','1'],
+  'pentium4' : ['pentium4','1'],
+  'ppc' : ['ppc','5'],
+  'ppc32dy4' : ['ppc32dy4','5'],
+  'ppc64' : ['ppc64','16'],
+  'ppc64iseries' : ['ppc64iseries','16'],
+  'ppc64pseries' : ['ppc64pseries','16'],
+  'ppc8260' : ['ppc8260','5'],
+  'ppc8560' : ['ppc8560','5'],
+  'ppciseries' : ['ppciseries','5'],
+  'ppcpseries' : ['ppcpseries','5'],
+  'rs6000' : ['rs6000','8'],
+  's390' : ['s390','14'],
+  's390x' : ['s390x','15'],
+  'sh' : ['sh','17'],
+  'sh3' : ['sh3','17'],
+  'sh4' : ['sh4','17'],
+  'sh4a' : ['sh4a','17'],
+  'sparc' : ['sparc','3'],
+  'sparc64' : ['sparc64','2'],
+  'sparc64v' : ['sparc64v','2'],
+  'sparcv8' : ['sparcv8','3'],
+  'sparcv9' : ['sparcv9','3'],
+  'sparcv9v' : ['sparcv9v','3'],
+  'sun4' : ['sparc','3'],
+  'sun4c' : ['sparc','3'],
+  'sun4d' : ['sparc','3'],
+  'sun4m' : ['sparc','3'],
+  'sun4u' : ['sparc64','2'],
+  'x86_64' : ['x86_64','1'],
+  'xtensa' : ['xtensa','18'],
+}
+
+# End of rpmrc dictionaries (Marker, don't change or remove!)
+
+def defaultMachine(use_rpm_default=True):
+    """ Return the canonicalized machine name. """
+
+    if use_rpm_default:
+        try:
+            # This should be the most reliable way to get the default arch
+            rmachine = subprocess.check_output(['rpm', '--eval=%_target_cpu'], shell=False).rstrip()
+        except Exception as e:
+            # Something went wrong, try again by looking up platform.machine()
+            return defaultMachine(False)
+    else:
+        rmachine = platform.machine()
+
+        # Try to lookup the string in the canon table
+        if rmachine in arch_canon:
+            rmachine = arch_canon[rmachine][0]
+
+    return rmachine
+
+def defaultSystem():
+    """ Return the canonicalized system name. """
+    rsystem = platform.system()
+
+    # Try to lookup the string in the canon tables
+    if rsystem in os_canon:
+        rsystem = os_canon[rsystem][0]
+
+    return rsystem
+
+def defaultNames():
+    """ Return the canonicalized machine and system name. """
+    return defaultMachine(), defaultSystem()
+
+def updateRpmDicts(rpmrc, pyfile):
+    """ Read the given rpmrc file with RPM definitions and update the
+        info dictionaries in the file pyfile with it.
+        The arguments will usually be 'rpmrc.in' from a recent RPM source
+        tree, and 'rpmutils.py' referring to this script itself.
+        See also usage() below.
+    """
+    try:
+        # Read old rpmutils.py file
+        oldpy = open(pyfile,"r").readlines()
+        # Read current rpmrc.in file
+        rpm = open(rpmrc,"r").readlines()
+        # Parse for data
+        data = {}
+        # Allowed section names that get parsed
+        sections = ['optflags',
+                    'arch_canon',
+                    'os_canon',
+                    'buildarchtranslate',
+                    'arch_compat',
+                    'os_compat',
+                    'buildarch_compat']
+        for l in rpm:
+            l = l.rstrip('\n').replace(':',' ')
+            # Skip comments
+            if l.lstrip().startswith('#'):
+                continue
+            tokens = l.strip().split()
+            if len(tokens):
+                key = tokens[0]
+                if key in sections:
+                    # Have we met this section before?
+                    if not data.has_key(tokens[0]):
+                        # No, so insert it
+                        data[key] = {}
+                    # Insert data
+                    data[key][tokens[1]] = tokens[2:]
+        # Write new rpmutils.py file
+        out = open(pyfile,"w")
+        pm = 0
+        for l in oldpy:
+            if pm:
+                if l.startswith('# End of rpmrc dictionaries'):
+                    pm = 0
+                    out.write(l)
+            else:
+                out.write(l)
+                if l.startswith('# Start of rpmrc dictionaries'):
+                    pm = 1
+                    # Write data sections to single dictionaries
+                    for key, entries in data.iteritems():
+                        out.write("%s = {\n" % key)
+                        for arch in sorted(entries.keys()):
+                            out.write("  '%s' : ['%s'],\n" % (arch, "','".join(entries[arch])))
+                        out.write("}\n\n")
+        out.close()
+    except:
+        pass
+
+def usage():
+    print "rpmutils.py rpmrc.in rpmutils.py"
+
+def main():
+    import sys
+
+    if len(sys.argv) < 3:
+        usage()
+        sys.exit(0)
+    updateRpmDicts(sys.argv[1], sys.argv[2])
+
+if __name__ == "__main__":
+    main()
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgiar.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgiar.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgiar.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgiar.py
index 42d07a2ed636bc66c82324e76544b0df6f076d08..6be4c6509f1eaabfbef0a7efdd78288cd634e921 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgiar.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgiar.py
@@ -11,7 +11,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -33,7 +33,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sgiar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sgiar.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgic++.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgic++.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgic++.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgic++.py
index 5358c4b6659e20e227037cfaa6e0c249dae5327e..8ae115a2a3aff17ff3cb737b64f153e6aefb8d38 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgic++.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgic++.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sgic++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sgic++.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgicc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgicc.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgicc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgicc.py
index c69d4fc9ec2e50fa07a160b606b355cffa34ea8f..ec26bf11ff65a49dd55e109e9a40151e38bd4293 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgicc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgicc.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sgicc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sgicc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import cc
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgilink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgilink.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgilink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgilink.py
index f651446970af183d665b94a365b1dfd5adaec59e..828f6d0ee90d1792880df8efbd5e2250396f8e94 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sgilink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sgilink.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sgilink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sgilink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunar.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunar.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunar.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunar.py
index 6e5f235f7026c2edcc00ccb8cd24cb26757eaa95..9c3e4810624ebeeea0715afc971bdaa71aec3f6c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunar.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunar.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sunar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sunar.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Defaults
 import SCons.Tool
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunc++.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunc++.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunc++.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunc++.py
index 6effe32f8e226c59f3c5346c5c22763dc76461d6..75fe4355c471f3ce5833217769f75adf4c1fccef 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunc++.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunc++.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sunc++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sunc++.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/suncc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/suncc.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/suncc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/suncc.py
index 6b1461f85b9dae190f78be4c2d64ced74b655026..b543b956da11a49cc0da300da4bd0ddc81b2fd52 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/suncc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/suncc.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/suncc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/suncc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf77.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf77.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf77.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf77.py
index 1536c7126baa669d1b687b9bef301ae3373d08d1..bff5c1a5d009203292f46be78531c37e958cc230 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf77.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf77.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sunf77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sunf77.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf90.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf90.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf90.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf90.py
index 65417f153af140e4edf4e59f1957b8357163142c..b0e31d1160445fbba704401433019466b45d9fbd 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf90.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf90.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sunf90.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sunf90.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf95.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf95.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf95.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf95.py
index c5300ad3b4a4cabc512687dab3fd2b02ff849196..5263f5ae7f615ed87a91a81d0468329f22f15afe 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunf95.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunf95.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sunf95.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sunf95.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Util
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunlink.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunlink.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunlink.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunlink.py
index b747c8f2e32415197a66a82f6bf71dcb9ab9da1a..d8a941f10806ebe0d3923be83efd00403e968a74 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/sunlink.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/sunlink.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/sunlink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/sunlink.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import os.path
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/swig.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/swig.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/swig.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/swig.py
index 9f2a3800d5029b4b6e7e96b5e785bbe0f86d66bc..83cd315930f398610c5261650e426c3f6743c58e 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/swig.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/swig.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/swig.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/swig.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
@@ -42,6 +42,7 @@ import SCons.Defaults
 import SCons.Scanner
 import SCons.Tool
 import SCons.Util
+import SCons.Node
 
 SwigAction = SCons.Action.Action('$SWIGCOM', '$SWIGCOMSTR')
 
@@ -117,9 +118,13 @@ def _swigEmitter(target, source, env):
             if outdir:
                  java_files = [os.path.join(outdir, j) for j in java_files]
             java_files = list(map(env.fs.File, java_files))
+            def t_from_s(t, p, s, x):
+                return t.dir
+            tsm = SCons.Node._target_from_source_map
+            tkey = len(tsm)
+            tsm[tkey] = t_from_s
             for jf in java_files:
-                t_from_s = lambda t, p, s, x: t.dir
-                SCons.Util.AddMethod(jf, t_from_s, 'target_from_source')
+                jf._func_target_from_source = tkey
             target.extend(java_files)
     return (target, source)
 
@@ -174,7 +179,8 @@ def generate(env):
     env.Append(SCANNERS = scanner)
 
 def exists(env):
-    return env.Detect(['swig'])
+    swig = env.get('SWIG') or env.Detect(['swig'])
+    return swig
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tar.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tar.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tar.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tar.py
index 7cb9836b48bae1bdaf01a390402200ecc753da59..50afeae94289d6fa3793ad32e192bbcc691723dd 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tar.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tar.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/tar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/tar.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Action
 import SCons.Builder
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tex.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tex.py
similarity index 90%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tex.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tex.py
index ce394e4f5769511f30ccc3feec0f754eacaa6a62..9dd462eceb54f63800ca68e487d89f1dc6f2d3ac 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tex.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tex.py
@@ -10,7 +10,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/tex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/tex.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import re
@@ -100,6 +100,11 @@ makeglossary_re = re.compile(r"^[^%\n]*\\makeglossary", re.MULTILINE)
 makeglossaries_re = re.compile(r"^[^%\n]*\\makeglossaries", re.MULTILINE)
 makeacronyms_re = re.compile(r"^[^%\n]*\\makeglossaries", re.MULTILINE)
 beamer_re = re.compile(r"^[^%\n]*\\documentclass\{beamer\}", re.MULTILINE)
+regex = r'^[^%\n]*\\newglossary\s*\[([^\]]+)\]?\s*\{([^}]*)\}\s*\{([^}]*)\}\s*\{([^}]*)\}\s*\{([^}]*)\}'
+newglossary_re = re.compile(regex, re.MULTILINE)
+biblatex_re = re.compile(r"^[^%\n]*\\usepackage.*\{biblatex\}", re.MULTILINE)
+
+newglossary_suffix = []
 
 # search to find all files included by Latex
 include_re = re.compile(r'^[^%\n]*\\(?:include|input){([^}]*)}', re.MULTILINE)
@@ -125,6 +130,9 @@ LaTeXAction = None
 # An action to run BibTeX on a file.
 BibTeXAction = None
 
+# An action to run Biber on a file.
+BiberAction = None
+
 # An action to run MakeIndex on a file.
 MakeIndexAction = None
 
@@ -137,6 +145,9 @@ MakeGlossaryAction = None
 # An action to run MakeIndex (for acronyms) on a file.
 MakeAcronymsAction = None
 
+# An action to run MakeIndex (for newglossary commands) on a file.
+MakeNewGlossaryAction = None
+
 # Used as a return value of modify_env_var if the variable is not set.
 _null = SCons.Scanner.LaTeX._null
 
@@ -232,7 +243,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
     saved_hashes = {}
     suffix_nodes = {}
 
-    for suffix in all_suffixes:
+
+    for suffix in all_suffixes+sum(newglossary_suffix, []):
         theNode = env.fs.File(targetbase + suffix)
         suffix_nodes[suffix] = theNode
         saved_hashes[suffix] = theNode.get_csig()
@@ -336,7 +348,9 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
                         must_rerun_latex = True
 
         # Now decide if biber will need to be run.
-        # The information that bibtex reads from the .bcf file is
+        # When the backend for biblatex is biber (by choice or default) the
+        # citation information is put in the .bcf file.
+        # The information that biber reads from the .bcf file is
         # pass-independent. If we find (below) that the .bbl file is unchanged,
         # then the last latex saw a correct bibliography.
         # Therefore only do this once
@@ -349,11 +363,11 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
                     content = open(target_bcf, "rb").read()
                     if content.find("bibdata") != -1:
                         if Verbose:
-                            print "Need to run bibtex on ",bcffilename
+                            print "Need to run biber on ",bcffilename
                         bibfile = env.fs.File(SCons.Util.splitext(target_bcf)[0])
-                        result = BibTeXAction(bibfile, bibfile, env)
+                        result = BiberAction(bibfile, bibfile, env)
                         if result != 0:
-                            check_file_error_message(env['BIBTEX'], 'blg')
+                            check_file_error_message(env['BIBER'], 'blg')
                         must_rerun_latex = True
 
         # Now decide if latex will need to be run again due to index.
@@ -410,6 +424,21 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
                                          'alg')
                 return result
 
+        # Now decide if latex will need to be run again due to newglossary command.
+        for ig in range(len(newglossary_suffix)):
+            if check_MD5(suffix_nodes[newglossary_suffix[ig][2]],newglossary_suffix[ig][2]) or (count == 1):
+                # We must run makeindex
+                if Verbose:
+                    print "Need to run makeindex for newglossary"
+                newglfile = suffix_nodes[newglossary_suffix[ig][2]]
+                MakeNewGlossaryAction = SCons.Action.Action("$MAKENEWGLOSSARYCOM ${SOURCE.filebase}%s -s ${SOURCE.filebase}.ist -t ${SOURCE.filebase}%s -o ${SOURCE.filebase}%s" % (newglossary_suffix[ig][2],newglossary_suffix[ig][0],newglossary_suffix[ig][1]), "$MAKENEWGLOSSARYCOMSTR")
+
+                result = MakeNewGlossaryAction(newglfile, newglfile, env)
+                if result != 0:
+                    check_file_error_message('%s (newglossary)' % env['MAKENEWGLOSSARY'],
+                                             newglossary_suffix[ig][0])
+                    return result
+
         # Now decide if latex needs to be run yet again to resolve warnings.
         if warning_rerun_re.search(logContent):
             must_rerun_latex = True
@@ -595,9 +624,23 @@ def ScanFiles(theFile, target, paths, file_tests, file_tests_search, env, graphi
 
     for i in range(len(file_tests_search)):
         if file_tests[i][0] is None:
+            if Verbose:
+                print "scan i ",i," files_tests[i] ",file_tests[i], file_tests[i][1]
             file_tests[i][0] = file_tests_search[i].search(content)
             if Verbose and file_tests[i][0]:
-                print "   found match for ",file_tests[i][-1][-1]
+                print "   found match for ",file_tests[i][1][-1]
+            # for newglossary insert the suffixes in file_tests[i]
+            if file_tests[i][0] and file_tests[i][1][-1] == 'newglossary':
+                findresult = file_tests_search[i].findall(content)
+                for l in range(len(findresult)) :
+                    (file_tests[i][1]).insert(0,'.'+findresult[l][3])
+                    (file_tests[i][1]).insert(0,'.'+findresult[l][2])
+                    (file_tests[i][1]).insert(0,'.'+findresult[l][0])
+                    suffix_list = ['.'+findresult[l][0],'.'+findresult[l][2],'.'+findresult[l][3] ]
+                    newglossary_suffix.append(suffix_list)
+                if Verbose:
+                    print " new suffixes for newglossary ",newglossary_suffix
+                
 
     incResult = includeOnly_re.search(content)
     if incResult:
@@ -642,15 +685,18 @@ def tex_emitter_core(target, source, env, graphics_extensions):
     auxfilename = targetbase + '.aux'
     logfilename = targetbase + '.log'
     flsfilename = targetbase + '.fls'
+    syncfilename = targetbase + '.synctex.gz'
 
     env.SideEffect(auxfilename,target[0])
     env.SideEffect(logfilename,target[0])
     env.SideEffect(flsfilename,target[0])
+    env.SideEffect(syncfilename,target[0])
     if Verbose:
-        print "side effect :",auxfilename,logfilename,flsfilename
+        print "side effect :",auxfilename,logfilename,flsfilename,syncfilename
     env.Clean(target[0],auxfilename)
     env.Clean(target[0],logfilename)
     env.Clean(target[0],flsfilename)
+    env.Clean(target[0],syncfilename)
 
     content = source[0].get_text_contents()
 
@@ -676,7 +722,9 @@ def tex_emitter_core(target, source, env, graphics_extensions):
                          makeglossary_re,
                          makeglossaries_re,
                          makeacronyms_re,
-                         beamer_re ]
+                         beamer_re,
+                         newglossary_re,
+                         biblatex_re ]
     # set up list with the file suffixes that need emitting
     # when a feature is found
     file_tests_suff = [['.aux','aux_file'],
@@ -693,7 +741,10 @@ def tex_emitter_core(target, source, env, graphics_extensions):
                   ['.glo', '.gls', '.glg','glossary'],
                   ['.glo', '.gls', '.glg','glossaries'],
                   ['.acn', '.acr', '.alg','acronyms'],
-                  ['.nav', '.snm', '.out', '.toc','beamer'] ]
+                  ['.nav', '.snm', '.out', '.toc','beamer'],
+                  ['newglossary',],
+                  ['.bcf', '.blg','biblatex'] ]
+    # for newglossary the suffixes are added as we find the command
     # build the list of lists
     file_tests = []
     for i in range(len(file_tests_search)):
@@ -722,6 +773,7 @@ def tex_emitter_core(target, source, env, graphics_extensions):
     if Verbose:
         print "search path ",paths
 
+    # scan all sources for side effect files
     aux_files = []
     file_tests = ScanFiles(source[0], target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files)
 
@@ -839,6 +891,11 @@ def generate_common(env):
     if BibTeXAction is None:
         BibTeXAction = SCons.Action.Action("$BIBTEXCOM", "$BIBTEXCOMSTR")
 
+    # Define an action to run Biber on a file.
+    global BiberAction
+    if BiberAction is None:
+        BiberAction = SCons.Action.Action("$BIBERCOM", "$BIBERCOMSTR")
+
     # Define an action to run MakeIndex on a file.
     global MakeIndexAction
     if MakeIndexAction is None:
@@ -898,6 +955,10 @@ def generate_common(env):
     env['BIBTEXFLAGS'] = SCons.Util.CLVar('')
     env['BIBTEXCOM']   = CDCOM + '${TARGET.dir} && $BIBTEX $BIBTEXFLAGS ${SOURCE.filebase}'
 
+    env['BIBER']      = 'biber'
+    env['BIBERFLAGS'] = SCons.Util.CLVar('')
+    env['BIBERCOM']   = CDCOM + '${TARGET.dir} && $BIBER $BIBERFLAGS ${SOURCE.filebase}'
+
     env['MAKEINDEX']      = 'makeindex'
     env['MAKEINDEXFLAGS'] = SCons.Util.CLVar('')
     env['MAKEINDEXCOM']   = CDCOM + '${TARGET.dir} && $MAKEINDEX $MAKEINDEXFLAGS ${SOURCE.file}'
@@ -917,6 +978,9 @@ def generate_common(env):
     env['MAKENCLFLAGS'] = '-s ${MAKENCLSTYLE} -t ${SOURCE.filebase}.nlg'
     env['MAKENCLCOM']   = CDCOM + '${TARGET.dir} && $MAKENCL ${SOURCE.filebase}.nlo $MAKENCLFLAGS -o ${SOURCE.filebase}.nls'
 
+    env['MAKENEWGLOSSARY']      = 'makeindex'
+    env['MAKENEWGLOSSARYCOM']   = CDCOM + '${TARGET.dir} && $MAKENEWGLOSSARY '
+
 def exists(env):
     generate_darwin(env)
     return env.Detect('tex')
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/textfile.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/textfile.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/textfile.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/textfile.py
index 44fd99941714b0d1af538bdf110541f41ab1550f..9c2b3a1f8325842eea3dbc7733c7b4c1969fe602 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/textfile.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/textfile.py
@@ -1,6 +1,6 @@
 # -*- python -*-
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -44,7 +44,7 @@ Textfile/Substfile builder for SCons.
     is unpredictible whether the expansion will occur.
 """
 
-__revision__ = "src/engine/SCons/Tool/textfile.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/textfile.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tlib.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tlib.py
similarity index 89%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tlib.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tlib.py
index 5a24a0cf2e4112ba12655ac6ab84a5d3ad07d35c..9040439070aaeb179e1181448bed6266f03a2053 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/tlib.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/tlib.py
@@ -5,7 +5,7 @@ XXX
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ XXX
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/tlib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/tlib.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Tool
 import SCons.Tool.bcc32
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/wix.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/wix.py
similarity index 75%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/wix.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/wix.py
index eb88ce383ae9633579a023c5dacc8dc785753e82..1291f184a8dbc2f633f209cc3b3a5c31c57bd07c 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/wix.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/wix.py
@@ -8,7 +8,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/wix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/wix.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import SCons.Builder
 import SCons.Action
@@ -47,15 +47,17 @@ def generate(env):
 
     env['WIXLIGHTFLAGS'].append( '-nologo' )
     env['WIXLIGHTCOM'] = "$WIXLIGHT $WIXLIGHTFLAGS -out ${TARGET} ${SOURCES}"
+    env['WIXSRCSUF'] = '.wxs'
+    env['WIXOBJSUF'] = '.wixobj'
 
     object_builder = SCons.Builder.Builder(
         action      = '$WIXCANDLECOM',
-        suffix      = '.wxiobj',
-        src_suffix  = '.wxs')
+        suffix      = '$WIXOBJSUF',
+        src_suffix  = '$WIXSRCSUF')
 
     linker_builder = SCons.Builder.Builder(
         action      = '$WIXLIGHTCOM',
-        src_suffix  = '.wxiobj',
+        src_suffix  = '$WIXOBJSUF',
         src_builder = object_builder)
 
     env['BUILDERS']['WiX'] = linker_builder
@@ -66,7 +68,6 @@ def exists(env):
 
     # try to find the candle.exe and light.exe tools and 
     # add the install directory to light libpath.
-    #for path in os.environ['PATH'].split(os.pathsep):
     for path in os.environ['PATH'].split(os.pathsep):
         if not path:
             continue
@@ -80,13 +81,17 @@ def exists(env):
 
         # search for the tools in the PATH environment variable
         try:
-            if env['WIXCANDLE'] in os.listdir(path) and\
-               env['WIXLIGHT']  in os.listdir(path):
-                   env.PrependENVPath('PATH', path)
-                   env['WIXLIGHTFLAGS'] = [ os.path.join( path, 'wixui.wixlib' ),
-                                            '-loc',
-                                            os.path.join( path, 'WixUI_en-us.wxl' ) ]
-                   return 1
+            files = os.listdir(path)
+            if env['WIXCANDLE'] in files and env['WIXLIGHT'] in files:
+                env.PrependENVPath('PATH', path)
+                # include appropriate flags if running WiX 2.0
+                if 'wixui.wixlib' in files and 'WixUI_en-us.wxl' in files:
+                    env['WIXLIGHTFLAGS'] = [ os.path.join( path, 'wixui.wixlib' ),
+                                             '-loc',
+                                             os.path.join( path, 'WixUI_en-us.wxl' ) ]
+                else:
+                    env['WIXLIGHTFLAGS'] = []
+                return 1
         except OSError:
             pass # ignore this, could be a stale PATH entry.
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/xgettext.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/xgettext.py
similarity index 97%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/xgettext.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/xgettext.py
index 9a5167c887f7027ff606b8cba7106293cfad9aef..ed6245d475d736be14826085148d90a6a2819c14 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/xgettext.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/xgettext.py
@@ -3,7 +3,7 @@
 Tool specific initialization of `xgettext` tool.
 """
 
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 # 
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ Tool specific initialization of `xgettext` tool.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Tool/xgettext.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/xgettext.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 #############################################################################
 class _CmdRunner(object):
@@ -271,7 +271,10 @@ def generate(env,**kw):
   import SCons.Util
   from SCons.Tool.GettextCommon import RPaths, _detect_xgettext
 
-  env['XGETTEXT'] = _detect_xgettext(env)
+  try:
+    env['XGETTEXT'] = _detect_xgettext(env)
+  except:
+    env['XGETTEXT'] = 'xgettext' 
   # NOTE: sources="$SOURCES" would work as well. However, we use following
   # construction to convert absolute paths provided by scons onto paths
   # relative to current working dir. Note, that scons expands $SOURCE(S) to
@@ -323,7 +326,10 @@ def generate(env,**kw):
 def exists(env):
   """ Check, whether the tool exists """
   from SCons.Tool.GettextCommon import _xgettext_exists
-  return _xgettext_exists(env)
+  try:
+    return _xgettext_exists(env)
+  except:
+    return False
 #############################################################################
 
 # Local Variables:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/yacc.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/yacc.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/yacc.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/yacc.py
index 580fe76ffb9236b576c38f1f331cda82a08375be..4b8d9380a330d3c8b4751463a4be320e60160b60 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/yacc.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/yacc.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/yacc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/yacc.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/zip.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/zip.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/zip.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/zip.py
index 77515ad35a15196c3d429251c0cd8de3be6e5fc7..750769a45317c2640c571e80f9bc392e1a29c08b 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Tool/zip.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Tool/zip.py
@@ -9,7 +9,7 @@ selection method.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ selection method.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Tool/zip.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Tool/zip.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 
@@ -57,9 +57,9 @@ if internal_zip:
                     for fname in filenames:
                         path = os.path.join(dirpath, fname)
                         if os.path.isfile(path):
-                            zf.write(path)
+                            zf.write(path, os.path.relpath(path, str(env.get('ZIPROOT', ''))))
             else:
-                zf.write(str(s))
+                zf.write(str(s), os.path.relpath(str(s), str(env.get('ZIPROOT', ''))))
         zf.close()
 else:
     zipcompression = 0
@@ -88,6 +88,7 @@ def generate(env):
     env['ZIPCOM']     = zipAction
     env['ZIPCOMPRESSION'] =  zipcompression
     env['ZIPSUFFIX']  = '.zip'
+    env['ZIPROOT']    = SCons.Util.CLVar('')
 
 def exists(env):
     return internal_zip or env.Detect('zip')
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Util.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Util.py
similarity index 99%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Util.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Util.py
index c1f87a2e7868e59b31ea43f266a12560a359888d..343f0a795ce7090508a72ced023e9e7ec00905bc 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Util.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Util.py
@@ -3,7 +3,7 @@
 Various utility functions go here.
 """
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -24,7 +24,7 @@ Various utility functions go here.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Util.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Util.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import sys
@@ -992,7 +992,7 @@ class Selector(OrderedDict):
     def __call__(self, env, source, ext=None):
         if ext is None:
             try:
-                ext = source[0].suffix
+                ext = source[0].get_suffix()
             except IndexError:
                 ext = ""
         try:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/BoolVariable.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/BoolVariable.py
similarity index 92%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/BoolVariable.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/BoolVariable.py
index 492f95e32804b119f6f801a53625bad9a07b5200..1594559e59016250595c3ee1c276a6e0ea21aaaa 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/BoolVariable.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/BoolVariable.py
@@ -12,7 +12,7 @@ Usage example:
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ Usage example:
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Variables/BoolVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Variables/BoolVariable.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __all__ = ['BoolVariable',]
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/EnumVariable.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/EnumVariable.py
similarity index 94%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/EnumVariable.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/EnumVariable.py
index e12c133ce38ca1d00beab1aad9bb2d56ef6fc3bc..bc95cf640e9bc3ee1b049cc101c4635b18edd968 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/EnumVariable.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/EnumVariable.py
@@ -15,7 +15,7 @@ Usage example:
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -37,7 +37,7 @@ Usage example:
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Variables/EnumVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Variables/EnumVariable.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __all__ = ['EnumVariable',]
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/ListVariable.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/ListVariable.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/ListVariable.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/ListVariable.py
index 0763b29c465ccc570dbec74f3b462e5c5c553d00..1faee7296278d46e34063a463b7cab572c82232e 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/ListVariable.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/ListVariable.py
@@ -25,7 +25,7 @@ Usage example:
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -46,7 +46,7 @@ Usage example:
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Variables/ListVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Variables/ListVariable.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 # Know Bug: This should behave like a Set-Type, but does not really,
 # since elements can occur twice.
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/PackageVariable.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/PackageVariable.py
similarity index 93%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/PackageVariable.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/PackageVariable.py
index dfac082e45c09ef5baa63fe05936924a6ffb5061..b7a59fe0ef371a2e5fb9d0ea5fc51eba34cf28d1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/PackageVariable.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/PackageVariable.py
@@ -28,7 +28,7 @@ Usage example:
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -50,7 +50,7 @@ Usage example:
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Variables/PackageVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Variables/PackageVariable.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __all__ = ['PackageVariable',]
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/PathVariable.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/PathVariable.py
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/PathVariable.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/PathVariable.py
index 77ef83edae2278407ce878989c13da964caafcc6..b095cbc45616a89c1ad3f807562bddb19023f0e1 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/PathVariable.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/PathVariable.py
@@ -46,7 +46,7 @@ Usage example:
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -68,7 +68,7 @@ Usage example:
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/Variables/PathVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Variables/PathVariable.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __all__ = ['PathVariable',]
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/__init__.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/__init__.py
index 88df0218bad74fd3faee85aa68b909b231ff2856..a00d4f8b8c0da5f002a3294ee7843e687ec63bd3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Variables/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Variables/__init__.py
@@ -5,7 +5,7 @@ customizable variables to an SCons build.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@ customizable variables to an SCons build.
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/engine/SCons/Variables/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Variables/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os.path
 import sys
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Warnings.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Warnings.py
similarity index 95%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Warnings.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Warnings.py
index 42e396f880430985ff1d7335b182107d9eab4f7a..615bc4550f281eaf006e77c7b4506e109f63902a 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/Warnings.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/Warnings.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This file implements the warnings framework for SCons.
 
 """
 
-__revision__ = "src/engine/SCons/Warnings.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Warnings.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import sys
 
@@ -42,6 +42,9 @@ class WarningOnByDefault(Warning):
 
 # NOTE:  If you add a new warning class, add it to the man page, too!
 
+class TargetNotBuiltWarning(Warning): # Should go to OnByDefault
+    pass
+
 class CacheWriteErrorWarning(Warning):
     pass
 
@@ -51,6 +54,9 @@ class CorruptSConsignWarning(WarningOnByDefault):
 class DependencyWarning(Warning):
     pass
 
+class DevelopmentVersionWarning(WarningOnByDefault):
+    pass
+
 class DuplicateEnvironmentWarning(WarningOnByDefault):
     pass
 
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/__init__.py
similarity index 77%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/__init__.py
index d4b619f718c5ae06a04f415a31640efb9f68ff05..019cbf92529e75e13de515f49276aba4e0c59758 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/__init__.py
@@ -5,7 +5,7 @@ The main package for the SCons software construction utility.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,17 +27,17 @@ The main package for the SCons software construction utility.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
-__version__ = "2.2.0"
+__version__ = "2.4.0"
 
-__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]"
+__build__ = "rel_2.4.0:3365:9259ea1c13d7"
 
-__buildsys__ = "oberbrunner-dev"
+__buildsys__ = "hpmicrodog"
 
-__date__ = "2012/08/05 15:38:28"
+__date__ = "2015/09/21 14:03:43"
 
-__developer__ = "garyo"
+__developer__ = "bdbaddog"
 
 # make sure compatibility is always in place
 import SCons.compat
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/__init__.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/__init__.py
similarity index 97%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/__init__.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/__init__.py
index 7dc6a68d591fe42be2cd7fa925c473c4a3b43a03..2352d4c5064d0b3b157113b85f105a6461a6f882 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/__init__.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/__init__.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -60,7 +60,7 @@ function defined below loads the module as the "real" name (without the
 rest of our code will find our pre-loaded compatibility module.
 """
 
-__revision__ = "src/engine/SCons/compat/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/compat/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import os
 import sys
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_builtins.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_builtins.py
similarity index 68%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_builtins.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_builtins.py
index 32f4e7536a4d3d64bcbbe01a4bd3173916b061e8..bf2005faf25a08a804956eb4dcb5ee34e9f05564 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_builtins.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_builtins.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -37,7 +37,6 @@ This module checks for the following builtins names:
 
         all()
         any()
-        sorted()
         memoryview()
 
 Implementations of functions are *NOT* guaranteed to be fully compliant
@@ -52,7 +51,7 @@ the FUNCTIONS or DATA output, that means those names are already built in
 to this version of Python and we don't need to add them from this module.
 """
 
-__revision__ = "src/engine/SCons/compat/_scons_builtins.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/compat/_scons_builtins.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import builtins
 
@@ -101,48 +100,6 @@ except NameError:
                 return self.obj[indx]
     builtins.memoryview = memoryview
 
-try:
-    sorted
-except NameError:
-    # Pre-2.4 Python has no sorted() function.
-    #
-    # The pre-2.4 Python list.sort() method does not support
-    # list.sort(key=) nor list.sort(reverse=) keyword arguments, so
-    # we must implement the functionality of those keyword arguments
-    # by hand instead of passing them to list.sort().
-    def sorted(iterable, cmp=None, key=None, reverse=False):
-        if key is not None:
-            result = [(key(x), x) for x in iterable]
-        else:
-            result = iterable[:]
-        if cmp is None:
-            # Pre-2.3 Python does not support list.sort(None).
-            result.sort()
-        else:
-            result.sort(cmp)
-        if key is not None:
-            result = [t1 for t0,t1 in result]
-        if reverse:
-            result.reverse()
-        return result
-    builtins.sorted = sorted
-
-#if sys.version_info[:3] in ((2, 2, 0), (2, 2, 1)):
-#    def lstrip(s, c=string.whitespace):
-#        while s and s[0] in c:
-#            s = s[1:]
-#        return s
-#    def rstrip(s, c=string.whitespace):
-#        while s and s[-1] in c:
-#            s = s[:-1]
-#        return s
-#    def strip(s, c=string.whitespace, l=lstrip, r=rstrip):
-#        return l(r(s, c), c)
-#
-#    object.__setattr__(str, 'lstrip', lstrip)
-#    object.__setattr__(str, 'rstrip', rstrip)
-#    object.__setattr__(str, 'strip', strip)
-
 # Local Variables:
 # tab-width:4
 # indent-tabs-mode:nil
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_collections.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_collections.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_collections.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_collections.py
index 4687642ddf794a18ed445737e580a57ac1647919..1f13065000c5c7f0661800a83ccef0eddd9cda93 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_collections.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_collections.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ used by SCons, in an interface that looks enough like collections for
 our purposes.
 """
 
-__revision__ = "src/engine/SCons/compat/_scons_collections.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/compat/_scons_collections.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 # Use exec to hide old names from fixers.
 exec("""if True:
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_dbm.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_dbm.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_dbm.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_dbm.py
index 0506ac804110aa176b27021a847ea9df02d1d9c5..3bc0768f017d263289e5c1b62d9ac7911cf4f1c3 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_dbm.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_dbm.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ that the whichdb.whichdb() implementstation in the various 2.X versions of
 Python won't blow up even if dbm wasn't compiled in.
 """
 
-__revision__ = "src/engine/SCons/compat/_scons_dbm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/compat/_scons_dbm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 class error(Exception):
     pass
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_hashlib.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_hashlib.py
similarity index 91%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_hashlib.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_hashlib.py
index 52cf3ba605702ea288b86a40d1d1ae880c27af25..de93e4bac8007e94766096e439c0f5413366b1e6 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_hashlib.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_hashlib.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ purposes, anyway).  In fact, this module will raise an ImportError if
 the underlying md5 module isn't available.
 """
 
-__revision__ = "src/engine/SCons/compat/_scons_hashlib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/compat/_scons_hashlib.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import md5
 from string import hexdigits
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_io.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_io.py
similarity index 88%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_io.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_io.py
index df4d444977f1bed151fa0a7853c7cf873fbf493f..72cd3b6d3cbf7e8b7c7592a1ea1d5bcf57e0e3c9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_io.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_io.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -29,7 +29,7 @@ functionality.  It only wraps the portions of io functionality used
 by SCons, in an interface that looks enough like io for our purposes.
 """
 
-__revision__ = "src/engine/SCons/compat/_scons_io.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/compat/_scons_io.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 # Use the "imp" module to protect the imports below from fixers.
 import imp
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_sets.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_sets.py
similarity index 100%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_sets.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_sets.py
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_subprocess.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_subprocess.py
similarity index 100%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/compat/_scons_subprocess.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/compat/_scons_subprocess.py
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/cpp.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/cpp.py
similarity index 98%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/cpp.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/cpp.py
index 74fff7c708714b1f6117700337889545687e5e67..cf80a4b7c1da57815de3fabccef44b1b78f3f711 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/cpp.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/cpp.py
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/cpp.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/cpp.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 __doc__ = """
 SCons C Pre-Processor module
@@ -395,9 +395,10 @@ class PreProcessor(object):
 
         """
         d = self.dispatch_table
-        d['import'] = self.do_import
-        d['include'] =  self.do_include
-        d['include_next'] =  self.do_include
+        p = self.stack[-1] if self.stack else self.default_table
+
+        for k in ('import', 'include', 'include_next'):
+            d[k] = p[k]
 
     def stop_handling_includes(self, t=None):
         """
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/dblite.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/dblite.py
similarity index 100%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/dblite.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/dblite.py
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/exitfuncs.py b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/exitfuncs.py
similarity index 77%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/exitfuncs.py
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/exitfuncs.py
index 4e604e193254288996c361431f3352a8ea22793f..19c8e8e06e44c6ffa4d9f8d4bc0b3eda0654b353 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/SCons/exitfuncs.py
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/SCons/exitfuncs.py
@@ -5,7 +5,7 @@ Register functions which are executed when SCons exits for any reason.
 """
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,9 +27,10 @@ Register functions which are executed when SCons exits for any reason.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = "src/engine/SCons/exitfuncs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/exitfuncs.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 
+import atexit
 
 _exithandlers = []
 def _run_exitfuncs():
@@ -52,23 +53,9 @@ def register(func, *targs, **kargs):
     """
     _exithandlers.append((func, targs, kargs))
 
-import sys
 
-try:
-    x = sys.exitfunc
-
-    # if x isn't our own exit func executive, assume it's another
-    # registered exit function - append it to our list...
-    if x != _run_exitfuncs:
-        register(x)
-
-except AttributeError:
-    pass
-
-# make our exit function get run by python when it exits:    
-sys.exitfunc = _run_exitfuncs
-
-del sys
+# make our exit function get run by python when it exits
+atexit.register(_run_exitfuncs)
 
 # Local Variables:
 # tab-width:4
diff --git a/installers/WinInstaller/scons-local/scons-local-2.2.0/scons-2.2.0.egg-info b/installers/WinInstaller/scons-local/scons-local-2.4.0/scons-2.4.0-py2.7.egg-info
similarity index 96%
rename from installers/WinInstaller/scons-local/scons-local-2.2.0/scons-2.2.0.egg-info
rename to installers/WinInstaller/scons-local/scons-local-2.4.0/scons-2.4.0-py2.7.egg-info
index b8f8d5e88b34a18e0a5d0beb44df42b46844b793..7a848af0f5d42b92d8ae51c33c6327c1b76dbbe9 100644
--- a/installers/WinInstaller/scons-local/scons-local-2.2.0/scons-2.2.0.egg-info
+++ b/installers/WinInstaller/scons-local/scons-local-2.4.0/scons-2.4.0-py2.7.egg-info
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: scons
-Version: 2.2.0
+Version: 2.4.0
 Summary: Open Source next-generation build tool.
 Home-page: http://www.scons.org/
 Author: Steven Knight
diff --git a/installers/WinInstaller/scons-local/scons-time.py b/installers/WinInstaller/scons-local/scons-time.py
old mode 100644
new mode 100755
index 1d774cb22996ca8d82e4815543086d12016881f9..f37d90694837f00a3c075d878d3c2ac2f262404c
--- a/installers/WinInstaller/scons-local/scons-time.py
+++ b/installers/WinInstaller/scons-local/scons-time.py
@@ -9,7 +9,7 @@
 #
 
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -32,7 +32,7 @@
 from __future__ import division
 from __future__ import nested_scopes
 
-__revision__ = "src/script/scons-time.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/script/scons-time.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
 import getopt
 import glob
diff --git a/installers/WinInstaller/scons-local/scons.py b/installers/WinInstaller/scons-local/scons.py
index 24686385c8e54ab944904d4f24c4ae98b4e3b209..0e59647dc50db65d237ab12bcde99af3963227cf 100644
--- a/installers/WinInstaller/scons-local/scons.py
+++ b/installers/WinInstaller/scons-local/scons.py
@@ -2,7 +2,7 @@
 #
 # SCons - a Software Constructor
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -23,21 +23,22 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/script/scons.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/script/scons.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
-__version__ = "2.2.0"
+__version__ = "2.4.0"
 
-__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]"
+__build__ = "rel_2.4.0:3365:9259ea1c13d7"
 
-__buildsys__ = "oberbrunner-dev"
+__buildsys__ = "hpmicrodog"
 
-__date__ = "2012/08/05 15:38:28"
+__date__ = "2015/09/21 14:03:43"
 
-__developer__ = "garyo"
+__developer__ = "bdbaddog"
 
 import os
 import sys
 
+
 ##############################################################################
 # BEGIN STANDARD SCons SCRIPT HEADER
 #
@@ -55,18 +56,12 @@ import sys
 # engine modules if they're in either directory.
 
 
-# Check to see if the python version is > 3.0 which is currently unsupported
-# If so exit with error message
-try:
-    if  sys.version_info >= (3,0,0):
-        msg = "scons: *** SCons version %s does not run under Python version %s.\n\
-Python 3.0 and later are not yet supported.\n"
-        sys.stderr.write(msg % (__version__, sys.version.split()[0]))
-        sys.exit(1)
-except AttributeError:
-    # Pre-1.6 Python has no sys.version_info
-    # No need to check version as we then know the version is < 3.0.0 and supported
-    pass
+if sys.version_info >= (3,0,0):
+    msg = "scons: *** SCons version %s does not run under Python version %s.\n\
+Python 3 is not yet supported.\n"
+    sys.stderr.write(msg % (__version__, sys.version.split()[0]))
+    sys.exit(1)
+
 
 script_dir = sys.path[0]
 
@@ -78,6 +73,11 @@ libs = []
 if "SCONS_LIB_DIR" in os.environ:
     libs.append(os.environ["SCONS_LIB_DIR"])
 
+# - running from source takes priority (since 2.3.2), excluding SCONS_LIB_DIR settings
+script_path = os.path.abspath(os.path.dirname(__file__))
+source_path = os.path.join(script_path, '..', 'engine')
+libs.append(source_path)
+
 local_version = 'scons-local-' + __version__
 local = 'scons-local'
 if script_dir:
@@ -91,6 +91,8 @@ scons_version = 'scons-%s' % __version__
 # preferred order of scons lookup paths
 prefs = []
 
+
+# - running from egg check
 try:
     import pkg_resources
 except ImportError:
@@ -184,7 +186,14 @@ sys.path = libs + sys.path
 ##############################################################################
 
 if __name__ == "__main__":
-    import SCons.Script
+    try:
+        import SCons.Script
+    except:
+        print("Import failed. Unable to find SCons files in:")
+        for path in libs:
+            print("  %s" % path)
+        raise
+
     # this does all the work, and calls sys.exit
     # with the proper exit status when done.
     SCons.Script.main()
diff --git a/installers/WinInstaller/scons-local/sconsign.py b/installers/WinInstaller/scons-local/sconsign.py
index 6e8df4e944bb39bdd2173b253ede3df1bc8b6a20..35dad8a00a6b0c72782aecc41d675622ddbdea44 100644
--- a/installers/WinInstaller/scons-local/sconsign.py
+++ b/installers/WinInstaller/scons-local/sconsign.py
@@ -2,7 +2,7 @@
 #
 # SCons - a Software Constructor
 #
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001 - 2015 The SCons Foundation
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -23,17 +23,17 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__revision__ = "src/script/sconsign.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/script/sconsign.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
 
-__version__ = "2.2.0"
+__version__ = "2.4.0"
 
-__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]"
+__build__ = "rel_2.4.0:3365:9259ea1c13d7"
 
-__buildsys__ = "oberbrunner-dev"
+__buildsys__ = "hpmicrodog"
 
-__date__ = "2012/08/05 15:38:28"
+__date__ = "2015/09/21 14:03:43"
 
-__developer__ = "garyo"
+__developer__ = "bdbaddog"
 
 import os
 import sys
@@ -278,7 +278,7 @@ def field(name, entry, verbose=Verbose):
 def nodeinfo_raw(name, ninfo, prefix=""):
     # This just formats the dictionary, which we would normally use str()
     # to do, except that we want the keys sorted for deterministic output.
-    d = ninfo.__dict__
+    d = ninfo.__getstate__()
     try:
         keys = ninfo.field_list + ['_version_id']
     except AttributeError: