proper MSVS_VERSION check
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4817 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
f04bd2fa14
commit
7519ae9fe2
2 changed files with 30 additions and 32 deletions
|
@ -23,7 +23,7 @@ docs = Split("""
|
||||||
|
|
||||||
Import('BuildPlugin env')
|
Import('BuildPlugin env')
|
||||||
|
|
||||||
if env['MSVS_VERSION'] >= 8.0:
|
if float(env['MSVS_VERSION']) >= 8.0:
|
||||||
files += ['Source/mathcrtmt.lib']
|
files += ['Source/mathcrtmt.lib']
|
||||||
else:
|
else:
|
||||||
files += ['Source/mathcrt.lib']
|
files += ['Source/mathcrt.lib']
|
||||||
|
|
|
@ -12,7 +12,7 @@ defenv['CPP_FLAG'] = '/TP'
|
||||||
defenv['CPP_REQUIRES_STDLIB'] = 0
|
defenv['CPP_REQUIRES_STDLIB'] = 0
|
||||||
defenv['SUBSYS_CON'] = '/subsystem:console'
|
defenv['SUBSYS_CON'] = '/subsystem:console'
|
||||||
|
|
||||||
if defenv['MSVS_VERSION'] >= 8.0:
|
if float(defenv['MSVS_VERSION']) >= 8.0:
|
||||||
defenv['EXCEPTION_FLAG'] = '/EHsc'
|
defenv['EXCEPTION_FLAG'] = '/EHsc'
|
||||||
defenv.Append(CCFLAGS = '/GS-')
|
defenv.Append(CCFLAGS = '/GS-')
|
||||||
else:
|
else:
|
||||||
|
@ -31,24 +31,22 @@ if defenv['DEBUG']:
|
||||||
# if stl usage causes link failure, copy the good libcp.lib
|
# if stl usage causes link failure, copy the good libcp.lib
|
||||||
# from one of the other lib folders and use it instead.
|
# from one of the other lib folders and use it instead.
|
||||||
|
|
||||||
if not defenv['MSVS_VERSION'] >= 8.0:
|
confenv = defenv.Clone()
|
||||||
|
conf = confenv.Configure()
|
||||||
|
|
||||||
confenv = defenv.Clone()
|
libcptest = """
|
||||||
conf = confenv.Configure()
|
#include <fstream>
|
||||||
|
int main() {
|
||||||
libcptest = """
|
|
||||||
#include <fstream>
|
|
||||||
int main() {
|
|
||||||
// %s
|
// %s
|
||||||
std::ofstream header("test", std::ofstream::out);
|
std::ofstream header("test", std::ofstream::out);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
conf.env.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath)
|
conf.env.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath)
|
||||||
conf.env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
|
conf.env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
|
||||||
|
|
||||||
if not conf.TryLink(libcptest % 'no change', '.cpp'):
|
if not conf.TryLink(libcptest % 'no change', '.cpp'):
|
||||||
import os, shutil
|
import os, shutil
|
||||||
|
|
||||||
libdirs = defenv['ENV']['LIB'].split(os.pathsep)
|
libdirs = defenv['ENV']['LIB'].split(os.pathsep)
|
||||||
|
@ -66,7 +64,7 @@ if not defenv['MSVS_VERSION'] >= 8.0:
|
||||||
print "*** Couldn't find a good version of libcp.lib"
|
print "*** Couldn't find a good version of libcp.lib"
|
||||||
Exit(2)
|
Exit(2)
|
||||||
|
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
||||||
### stub environment
|
### stub environment
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue