automatically pass makensis build settings to script
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4632 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
d2ab1be975
commit
a7be6822ea
2 changed files with 18 additions and 170 deletions
17
SConstruct
17
SConstruct
|
@ -147,14 +147,21 @@ if defenv['PLATFORM'] != 'win32':
|
|||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', '"%s"' % defenv.subst('$PREFIX_CONF'))])
|
||||
defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv.subst('$PREFIX_DATA'))])
|
||||
|
||||
# write configuration into sconf.h
|
||||
f = open(File('#Source/exehead/sconf.h').abspath, 'w')
|
||||
# write configuration into sconf.h and defines.h
|
||||
sconf_h = open(File('#Source/exehead/sconf.h').abspath, 'w')
|
||||
defines_h = open(File('#Source/defines.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]))
|
||||
sconf_h.write('#define %s %s\n' % (i[0], i[1]))
|
||||
if type(i[1]) is int:
|
||||
defines_h.write('definedlist.add("%s", "%s");\n' % (i[0], i[1]))
|
||||
else:
|
||||
defines_h.write('definedlist.add("%s", %s);\n' % (i[0], i[1]))
|
||||
else:
|
||||
f.write('#define %s\n' % (i))
|
||||
f.close()
|
||||
sconf_h.write('#define %s\n' % (i))
|
||||
defines_h.write('definedlist.add("%s");\n' % (i))
|
||||
sconf_h.close()
|
||||
defines_h.close()
|
||||
|
||||
# write version into version.h
|
||||
f = open(File('#Source/version.h').abspath, 'w')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue