From 5812fa78d271eb92b71c427b20a36348455a3d14 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 24 Feb 2006 19:17:49 +0000 Subject: [PATCH] write all defines to sconf.h which is included by config.h instead of passing them on the command line write the freaquently changing NSIS_VERSION to a separate file named version.h so only files that really need it will include it git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4538 212acab6-be3b-0410-9dea-997c60f758d6 --- SConstruct | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SConstruct b/SConstruct index 1a3d05ef..bc1a5ab2 100644 --- a/SConstruct +++ b/SConstruct @@ -142,6 +142,20 @@ Help(opts.GenerateHelpText(defenv)) # build configuration SConscript('SCons/config.py') +# write configuration into sconf.h +f = open(File('#Source/exehead/sconf.h').abspath, 'w') +for i in defenv['NSIS_CPPDEFINES']: + if type(i) is not str: + f.write('#define %s %s\n' % (i[0], i[1])) + else: + f.write('#define %s\n' % (i)) +f.close() + +# write version into version.h +f = open(File('#Source/version.h').abspath, 'w') +f.write('#define NSIS_VERSION "%s"' % defenv['VERSION']) +f.close() + ###################################################################### ####### Functions ### ######################################################################