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:
parent
578065d849
commit
5812fa78d2
1 changed files with 14 additions and 0 deletions
14
SConstruct
14
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 ###
|
||||
######################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue