From 3c3e42020b6a9c65f439f53355961c1d68fd2a90 Mon Sep 17 00:00:00 2001 From: joostverburg Date: Sun, 29 Oct 2006 14:52:22 +0000 Subject: [PATCH] Disabled libcp check for MSVC 2005. This lib is not used anymore. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4797 212acab6-be3b-0410-9dea-997c60f758d6 --- SCons/Config/ms | 60 +++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/SCons/Config/ms b/SCons/Config/ms index 24baa3c5..0cc51d9e 100644 --- a/SCons/Config/ms +++ b/SCons/Config/ms @@ -33,44 +33,46 @@ if defenv['DEBUG']: ### workarounds -# latest Platform SDK includes a bad version of libcp.lib. +# Some Platform SDK version includes a bad version of libcp.lib. # if stl usage causes link failure, copy the good libcp.lib # from one of the other lib folders and use it instead. -confenv = defenv.Copy() -conf = confenv.Configure() +if not defenv['TEMP_MSVC2005']: -libcptest = """ -#include -int main() { - // %s - std::ofstream header("test", std::ofstream::out); - return 0; -} -""" + confenv = defenv.Copy() + conf = confenv.Configure() -conf.env.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath) -conf.env.Append(CCFLAGS = ['$EXCEPTION_FLAG']) + libcptest = """ + #include + int main() { + // %s + std::ofstream header("test", std::ofstream::out); + return 0; + } + """ -if not conf.TryLink(libcptest % 'no change', '.cpp'): - import os, shutil + conf.env.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath) + conf.env.Append(CCFLAGS = ['$EXCEPTION_FLAG']) - libdirs = defenv['ENV']['LIB'].split(os.pathsep) + if not conf.TryLink(libcptest % 'no change', '.cpp'): + import os, shutil - for libdir in libdirs: - try: - libcp = r'%s\libcp.lib' % libdir - shutil.copy(libcp, Dir('#/.sconf_temp').abspath) - if conf.TryLink(libcptest % (r'using %s' % libcp), '.cpp'): - defenv.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath) - break - except IOError: - continue - else: - print "*** Couldn't find a good version of libcp.lib" - Exit(2) + libdirs = defenv['ENV']['LIB'].split(os.pathsep) -conf.Finish() + for libdir in libdirs: + try: + libcp = r'%s\libcp.lib' % libdir + shutil.copy(libcp, Dir('#/.sconf_temp').abspath) + if conf.TryLink(libcptest % (r'using %s' % libcp), '.cpp'): + defenv.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath) + break + except IOError: + continue + else: + print "*** Couldn't find a good version of libcp.lib" + Exit(2) + + conf.Finish() ### stub environment