Copy is deprecated by Clone in scons 0.96.93
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4813 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
79a3b31431
commit
4bdb1ebd7d
7 changed files with 40 additions and 40 deletions
|
@ -6,7 +6,7 @@ NSIS version 2.07 introduced a new build system, based on \W{http://www.scons.or
|
||||||
|
|
||||||
Source code is available in \W{http://nsis.cvs.sourceforge.net/nsis}{CVS} and as a separate package with every \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{NSIS distribution}.
|
Source code is available in \W{http://nsis.cvs.sourceforge.net/nsis}{CVS} and as a separate package with every \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{NSIS distribution}.
|
||||||
|
|
||||||
To build NSIS \W{http://www.python.org/}{Python} and \W{http://www.scons.org/}{SCons} must be installed. Currently, the supported version of SCons is version 0.96.92. Any version of Python above 1.6 is supported.
|
To build NSIS \W{http://www.python.org/}{Python} and \W{http://www.scons.org/}{SCons} must be installed. Currently, the supported version of SCons is version 0.96.93. Any version of Python above 1.6 is supported.
|
||||||
|
|
||||||
To build, open a console, change the working directory to the root directory of NSIS and type \c{scons}. That's it. For example:
|
To build, open a console, change the working directory to the root directory of NSIS and type \c{scons}. That's it. For example:
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ To get a complete list of options SCons has to offer, type:
|
||||||
|
|
||||||
If Microsoft Visual C++ is installed, SCons will automatically detect and use it.
|
If Microsoft Visual C++ is installed, SCons will automatically detect and use it.
|
||||||
|
|
||||||
SCons 0.96.92 does not yet support Microsoft Visual C++ 2005. Therefore a temporary workaround has been added to support this compiler. Add TEMP_MSVC2005=yes to the build command line when using MSVC 2005:
|
SCons 0.96.93 does not yet support Microsoft Visual C++ 2005. Therefore a temporary workaround has been added to support this compiler. Add TEMP_MSVC2005=yes to the build command line when using MSVC 2005:
|
||||||
|
|
||||||
\c scons TEMP_MSVC2005=yes
|
\c scons TEMP_MSVC2005=yes
|
||||||
|
|
||||||
|
|
4
INSTALL
4
INSTALL
|
@ -6,7 +6,7 @@ This is a trimmed version of Appendix "Building NSIS" of the documentation.
|
||||||
- Requirements
|
- Requirements
|
||||||
|
|
||||||
* Python version 1.6 and above (http://www.python.org/)
|
* Python version 1.6 and above (http://www.python.org/)
|
||||||
* SCons version 0.96.92 and above (http://www.scons.org/)
|
* SCons version 0.96.93 and above (http://www.scons.org/)
|
||||||
* C compiler
|
* C compiler
|
||||||
|
|
||||||
- Optional Tools
|
- Optional Tools
|
||||||
|
@ -32,7 +32,7 @@ This is a trimmed version of Appendix "Building NSIS" of the documentation.
|
||||||
|
|
||||||
- Special cases
|
- Special cases
|
||||||
|
|
||||||
* SCons 0.96.92 does not yet support Microsoft Visual C++ 2005.
|
* SCons 0.96.93 does not yet support Microsoft Visual C++ 2005.
|
||||||
Therefore a temporary workaround has been added to support this
|
Therefore a temporary workaround has been added to support this
|
||||||
compiler. Add TEMP_MSVC2005=yes to the build command line when
|
compiler. Add TEMP_MSVC2005=yes to the build command line when
|
||||||
using MSVC 2005:
|
using MSVC 2005:
|
||||||
|
|
|
@ -15,27 +15,27 @@ defenv['SUBSYS_CON'] = ''
|
||||||
|
|
||||||
### stub environment
|
### stub environment
|
||||||
|
|
||||||
stub_env = defenv.Copy()
|
stub_env = defenv.Clone()
|
||||||
|
|
||||||
### makensis environment
|
### makensis environment
|
||||||
|
|
||||||
makensis_env = defenv.Copy()
|
makensis_env = defenv.Clone()
|
||||||
|
|
||||||
### plugin environment
|
### plugin environment
|
||||||
|
|
||||||
plugin_env = defenv.Copy(no_import_lib = 1)
|
plugin_env = defenv.Clone(no_import_lib = 1)
|
||||||
|
|
||||||
### util environment
|
### util environment
|
||||||
|
|
||||||
util_env = defenv.Copy()
|
util_env = defenv.Clone()
|
||||||
|
|
||||||
### cross-platform util environment
|
### cross-platform util environment
|
||||||
|
|
||||||
cp_util_env = util_env.Copy()
|
cp_util_env = util_env.Clone()
|
||||||
|
|
||||||
### test environment
|
### test environment
|
||||||
|
|
||||||
test_env = defenv.Copy()
|
test_env = defenv.Clone()
|
||||||
|
|
||||||
# return
|
# return
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ if defenv['DEBUG']:
|
||||||
|
|
||||||
### stub environment
|
### stub environment
|
||||||
|
|
||||||
stub_env = defenv.Copy()
|
stub_env = defenv.Clone()
|
||||||
cross_env(stub_env)
|
cross_env(stub_env)
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
|
@ -75,7 +75,7 @@ stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
### makensis environment
|
### makensis environment
|
||||||
|
|
||||||
makensis_env = defenv.Copy()
|
makensis_env = defenv.Clone()
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
makensis_env.Append(CCFLAGS = '-O2') # optimize
|
makensis_env.Append(CCFLAGS = '-O2') # optimize
|
||||||
|
@ -89,7 +89,7 @@ conf.Finish()
|
||||||
|
|
||||||
### plugin environment
|
### plugin environment
|
||||||
|
|
||||||
plugin_env = defenv.Copy()
|
plugin_env = defenv.Clone()
|
||||||
cross_env(plugin_env)
|
cross_env(plugin_env)
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
|
@ -104,7 +104,7 @@ plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
### cross-platform util environment
|
### cross-platform util environment
|
||||||
|
|
||||||
cp_util_env = defenv.Copy()
|
cp_util_env = defenv.Clone()
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
cp_util_env.Append(CCFLAGS = '-O2') # optimize
|
cp_util_env.Append(CCFLAGS = '-O2') # optimize
|
||||||
|
@ -118,7 +118,7 @@ conf.Finish()
|
||||||
|
|
||||||
### util environment
|
### util environment
|
||||||
|
|
||||||
util_env = cp_util_env.Copy()
|
util_env = cp_util_env.Clone()
|
||||||
cross_env(util_env)
|
cross_env(util_env)
|
||||||
|
|
||||||
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
|
||||||
|
@ -126,7 +126,7 @@ util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
|
||||||
|
|
||||||
### test environment
|
### test environment
|
||||||
|
|
||||||
test_env = defenv.Copy()
|
test_env = defenv.Clone()
|
||||||
|
|
||||||
### weird GCC requirements
|
### weird GCC requirements
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ def add_file(file):
|
||||||
add_file_to_emitter(util_env, 'PROGEMITTER', file)
|
add_file_to_emitter(util_env, 'PROGEMITTER', file)
|
||||||
add_file_to_emitter(plugin_env, 'SHLIBEMITTER', file)
|
add_file_to_emitter(plugin_env, 'SHLIBEMITTER', file)
|
||||||
|
|
||||||
cenv = defenv.Copy()
|
cenv = defenv.Clone()
|
||||||
cross_env(cenv)
|
cross_env(cenv)
|
||||||
conf = cenv.Configure(custom_tests = { 'CheckRequirement' : check_requirement })
|
conf = cenv.Configure(custom_tests = { 'CheckRequirement' : check_requirement })
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ if defenv['DEBUG']:
|
||||||
|
|
||||||
if not defenv['TEMP_MSVC2005']:
|
if not defenv['TEMP_MSVC2005']:
|
||||||
|
|
||||||
confenv = defenv.Copy()
|
confenv = defenv.Clone()
|
||||||
conf = confenv.Configure()
|
conf = confenv.Configure()
|
||||||
|
|
||||||
libcptest = """
|
libcptest = """
|
||||||
|
@ -76,7 +76,7 @@ if not defenv['TEMP_MSVC2005']:
|
||||||
|
|
||||||
### stub environment
|
### stub environment
|
||||||
|
|
||||||
stub_env = defenv.Copy()
|
stub_env = defenv.Clone()
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
stub_env.Append(CCFLAGS = '/O1') # optimize for size
|
stub_env.Append(CCFLAGS = '/O1') # optimize for size
|
||||||
|
@ -89,7 +89,7 @@ stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
### makensis environment
|
### makensis environment
|
||||||
|
|
||||||
makensis_env = defenv.Copy()
|
makensis_env = defenv.Clone()
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
|
makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
|
||||||
|
@ -101,7 +101,7 @@ makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
### plugin environment
|
### plugin environment
|
||||||
|
|
||||||
plugin_env = defenv.Copy(no_import_lib = 1)
|
plugin_env = defenv.Clone(no_import_lib = 1)
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
plugin_env.Append(CCFLAGS = '/O1') # optimize for size
|
plugin_env.Append(CCFLAGS = '/O1') # optimize for size
|
||||||
|
@ -112,7 +112,7 @@ plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
### util environment
|
### util environment
|
||||||
|
|
||||||
util_env = defenv.Copy()
|
util_env = defenv.Clone()
|
||||||
|
|
||||||
if not defenv['DEBUG']:
|
if not defenv['DEBUG']:
|
||||||
util_env.Append(CCFLAGS = '/O1') # optimize for speed
|
util_env.Append(CCFLAGS = '/O1') # optimize for speed
|
||||||
|
@ -123,11 +123,11 @@ util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
|
||||||
|
|
||||||
### cross-platform util environment
|
### cross-platform util environment
|
||||||
|
|
||||||
cp_util_env = util_env.Copy()
|
cp_util_env = util_env.Clone()
|
||||||
|
|
||||||
### test environment
|
### test environment
|
||||||
|
|
||||||
test_env = defenv.Copy()
|
test_env = defenv.Clone()
|
||||||
|
|
||||||
### weird compiler requirements
|
### weird compiler requirements
|
||||||
|
|
||||||
|
|
30
SConstruct
30
SConstruct
|
@ -9,9 +9,9 @@
|
||||||
EnsurePythonVersion(1,6)
|
EnsurePythonVersion(1,6)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
EnsureSConsVersion(0,96,92)
|
EnsureSConsVersion(0,96,93)
|
||||||
except TypeError: # EnsureSConsVersion in older versions took only two parameters
|
except TypeError: # EnsureSConsVersion in older versions took only two parameters
|
||||||
print 'SCons 0.96.92 or greater is required, but you have an older version'
|
print 'SCons 0.96.93 or greater is required, but you have an older version'
|
||||||
Exit(2)
|
Exit(2)
|
||||||
|
|
||||||
stubs = [
|
stubs = [
|
||||||
|
@ -366,7 +366,7 @@ defenv.DistributeConf('nsisconf.nsh')
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
def BuildStub(compression, solid):
|
def BuildStub(compression, solid):
|
||||||
env = stub_env.Copy()
|
env = stub_env.Clone()
|
||||||
|
|
||||||
suffix = ''
|
suffix = ''
|
||||||
if solid:
|
if solid:
|
||||||
|
@ -448,7 +448,7 @@ def BuildPlugin(target, source, libs, examples = None, docs = None,
|
||||||
entry = 'DllMain', res = None, res_target = None,
|
entry = 'DllMain', res = None, res_target = None,
|
||||||
resources = None, defines = None, flags = None,
|
resources = None, defines = None, flags = None,
|
||||||
nodeflib = True, cppused = False):
|
nodeflib = True, cppused = False):
|
||||||
env = plugin_env.Copy()
|
env = plugin_env.Clone()
|
||||||
|
|
||||||
if cppused and env['CPP_REQUIRES_STDLIB']:
|
if cppused and env['CPP_REQUIRES_STDLIB']:
|
||||||
nodeflib = False
|
nodeflib = False
|
||||||
|
@ -479,7 +479,7 @@ for plugin in plugins:
|
||||||
|
|
||||||
path = 'Contrib/' + plugin
|
path = 'Contrib/' + plugin
|
||||||
build_dir = '$BUILD_PREFIX/' + plugin
|
build_dir = '$BUILD_PREFIX/' + plugin
|
||||||
exports = {'BuildPlugin' : BuildPlugin, 'env' : plugin_env.Copy()}
|
exports = {'BuildPlugin' : BuildPlugin, 'env' : plugin_env.Clone()}
|
||||||
|
|
||||||
defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
|
defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
|
||||||
|
|
||||||
|
@ -493,9 +493,9 @@ def BuildUtil(target, source, libs, entry = None, res = None,
|
||||||
examples = None, docs = None, cross_platform = False,
|
examples = None, docs = None, cross_platform = False,
|
||||||
root_util = False):
|
root_util = False):
|
||||||
if not cross_platform:
|
if not cross_platform:
|
||||||
env = util_env.Copy()
|
env = util_env.Clone()
|
||||||
else:
|
else:
|
||||||
env = cp_util_env.Copy()
|
env = cp_util_env.Clone()
|
||||||
|
|
||||||
AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
|
AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ for util in utils:
|
||||||
|
|
||||||
path = 'Contrib/' + util
|
path = 'Contrib/' + util
|
||||||
build_dir = '$BUILD_PREFIX/' + util
|
build_dir = '$BUILD_PREFIX/' + util
|
||||||
exports = {'BuildUtil' : BuildUtil, 'env' : util_env.Copy()}
|
exports = {'BuildUtil' : BuildUtil, 'env' : util_env.Clone()}
|
||||||
|
|
||||||
defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
|
defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ halibut = defenv.SConscript(
|
||||||
dirs = 'Docs/src/bin/halibut',
|
dirs = 'Docs/src/bin/halibut',
|
||||||
build_dir = '$BUILD_PREFIX/halibut',
|
build_dir = '$BUILD_PREFIX/halibut',
|
||||||
duplicate = False,
|
duplicate = False,
|
||||||
exports = {'env' : defenv.Copy()}
|
exports = {'env' : defenv.Clone()}
|
||||||
)
|
)
|
||||||
|
|
||||||
if defenv['CHMDOCS']:
|
if defenv['CHMDOCS']:
|
||||||
|
@ -554,14 +554,14 @@ if defenv['CHMDOCS']:
|
||||||
dirs = 'Docs/src',
|
dirs = 'Docs/src',
|
||||||
build_dir = '$BUILD_PREFIX/Docs/chm',
|
build_dir = '$BUILD_PREFIX/Docs/chm',
|
||||||
duplicate = False,
|
duplicate = False,
|
||||||
exports = {'halibut' : halibut, 'env' : defenv.Copy(), 'build_chm' : True}
|
exports = {'halibut' : halibut, 'env' : defenv.Clone(), 'build_chm' : True}
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
defenv.SConscript(
|
defenv.SConscript(
|
||||||
dirs = 'Docs/src',
|
dirs = 'Docs/src',
|
||||||
build_dir = '$BUILD_PREFIX/Docs/html',
|
build_dir = '$BUILD_PREFIX/Docs/html',
|
||||||
duplicate = False,
|
duplicate = False,
|
||||||
exports = {'halibut' : halibut, 'env' : defenv.Copy(), 'build_chm' : False}
|
exports = {'halibut' : halibut, 'env' : defenv.Clone(), 'build_chm' : False}
|
||||||
)
|
)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -570,7 +570,7 @@ else:
|
||||||
|
|
||||||
defenv.SConscript(
|
defenv.SConscript(
|
||||||
dirs = 'Examples',
|
dirs = 'Examples',
|
||||||
exports = {'env': defenv.Copy()}
|
exports = {'env': defenv.Clone()}
|
||||||
)
|
)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -579,7 +579,7 @@ defenv.SConscript(
|
||||||
|
|
||||||
defenv.SConscript(
|
defenv.SConscript(
|
||||||
dirs = 'Include',
|
dirs = 'Include',
|
||||||
exports = {'env': defenv.Copy()}
|
exports = {'env': defenv.Clone()}
|
||||||
)
|
)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -599,7 +599,7 @@ for i in misc:
|
||||||
# test code
|
# test code
|
||||||
|
|
||||||
build_dir = '$BUILD_PREFIX/tests'
|
build_dir = '$BUILD_PREFIX/tests'
|
||||||
exports = {'env' : test_env.Copy()}
|
exports = {'env' : test_env.Clone()}
|
||||||
|
|
||||||
defenv.SConscript(
|
defenv.SConscript(
|
||||||
dirs = 'Source/Tests',
|
dirs = 'Source/Tests',
|
||||||
|
@ -612,7 +612,7 @@ defenv.Ignore('$BUILD_PREFIX', '$BUILD_PREFIX/tests')
|
||||||
|
|
||||||
# test scripts
|
# test scripts
|
||||||
|
|
||||||
test_scripts_env = defenv.Copy(ENV = os.environ) # env needed for some scripts
|
test_scripts_env = defenv.Clone(ENV = os.environ) # env needed for some scripts
|
||||||
test_scripts_env['ENV']['NSISDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
test_scripts_env['ENV']['NSISDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
||||||
test_scripts_env['ENV']['NSISCONFDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
test_scripts_env['ENV']['NSISCONFDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
||||||
|
|
||||||
##### LZMA specific defines
|
##### LZMA specific defines
|
||||||
|
|
||||||
lzma_env = env.Copy()
|
lzma_env = env.Clone()
|
||||||
lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
|
lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
|
||||||
lzma_files = lzma_env.Object(lzma_files)
|
lzma_files = lzma_env.Object(lzma_files)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue