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
This commit is contained in:
kichik 2006-02-24 19:17:49 +00:00
parent 578065d849
commit 5812fa78d2

View file

@ -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 ###
######################################################################