automatic MSVC 2005 detection

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4816 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2006-11-14 19:14:53 +00:00
parent 62776e907d
commit f04bd2fa14
5 changed files with 7 additions and 20 deletions

View file

@ -23,7 +23,7 @@ docs = Split("""
Import('BuildPlugin env')
if env['TEMP_MSVC2005']:
if env['MSVS_VERSION'] >= 8.0:
files += ['Source/mathcrtmt.lib']
else:
files += ['Source/mathcrt.lib']

View file

@ -51,15 +51,9 @@ To get a complete list of options SCons has to offer, type:
\H{build_windows} Building on Windows
If Microsoft Visual C++ is installed, SCons will automatically detect and use it.
SCons will automatically detect Microsoft Visual C++. If you are looking for a free compiler to compile NSIS, we recommend \W{http://msdn.microsoft.com/vstudio/express/visualc/download/}{Microsoft Visual C++ 2005 Express Edition}.
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
If you are looking for a free compiler to compile NSIS, we recommend \W{http://msdn.microsoft.com/vstudio/express/visualc/download/}{Microsoft Visual C++ 2005 Express Edition}.
When using the Microsoft Visual C++ Toolkit, add MSTOOLKIT=yes to the build command line:
When using the Microsoft Visual C++ Toolkit 2003, add MSTOOLKIT=yes to the build command line:
\c scons MSTOOLKIT=yes

View file

@ -32,13 +32,7 @@ This is a trimmed version of Appendix "Building NSIS" of the documentation.
- Special cases
* When using Microsoft Visual C++ 2005, add TEMP_MSVC2005=yes to
the build command line (this temporary workaround will soon be
removed):
scons TEMP_MSVC2005=yes PREFIX=C:\NSIS install
* If using the free Microsoft Visual C++ Toolkit and Platform SDK,
* If using the Microsoft Visual C++ Toolkit 2003 and Platform SDK,
add MSTOOLKIT=yes to the build command line. For example:
scons MSTOOLKIT=yes PREFIX=C:\NSIS install

View file

@ -12,7 +12,7 @@ defenv['CPP_FLAG'] = '/TP'
defenv['CPP_REQUIRES_STDLIB'] = 0
defenv['SUBSYS_CON'] = '/subsystem:console'
if defenv['TEMP_MSVC2005']:
if defenv['MSVS_VERSION'] >= 8.0:
defenv['EXCEPTION_FLAG'] = '/EHsc'
defenv.Append(CCFLAGS = '/GS-')
else:
@ -31,7 +31,7 @@ if defenv['DEBUG']:
# if stl usage causes link failure, copy the good libcp.lib
# from one of the other lib folders and use it instead.
if not defenv['TEMP_MSVC2005']:
if not defenv['MSVS_VERSION'] >= 8.0:
confenv = defenv.Clone()
conf = confenv.Configure()
@ -87,7 +87,7 @@ makensis_env = defenv.Clone()
if not defenv['DEBUG']:
makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
makensis_env.Append(CCFLAGS = '/GX') # enable exceptions
makensis_env.Append(CCFLAGS = '$EXCEPTION_FLAG') # enable exceptions
makensis_env.Append(CCFLAGS = '/W3') # level 3 warnings
makensis_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align

View file

@ -130,7 +130,6 @@ opts.Add(ListOption('SKIPMISC', 'A list of plug-ins that will not be built', 'no
opts.Add(ListOption('SKIPDOC', 'A list of doc files that will not be built/installed', 'none', doc))
# build tools
opts.Add(BoolOption('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no'))
opts.Add(BoolOption('TEMP_MSVC2005', 'Enable temporary work-around for Microsoft Visual C++ 2005 support', 'no'))
opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc))
opts.Add(PathOption('CPPPATH', 'Path to search for include files', None))
opts.Add(PathOption('LIBPATH', 'Path to search for libraries', None))