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@4535 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2af8b64f00
commit
7a5163ea59
3 changed files with 3 additions and 21 deletions
|
@ -64,10 +64,9 @@ if env['PLATFORM'] == 'win32':
|
||||||
|
|
||||||
AddAvailableLibs(env, libs)
|
AddAvailableLibs(env, libs)
|
||||||
|
|
||||||
##### Configuration defines
|
##### Defines
|
||||||
|
|
||||||
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
||||||
env.Append(CPPDEFINES = env['NSIS_CPPDEFINES'])
|
|
||||||
|
|
||||||
##### Set PCH
|
##### Set PCH
|
||||||
|
|
||||||
|
@ -75,24 +74,6 @@ env.Append(CPPDEFINES = env['NSIS_CPPDEFINES'])
|
||||||
#env['PCH'] = env.PCH(pch)[0]
|
#env['PCH'] = env.PCH(pch)[0]
|
||||||
#env['PCHSTOP'] = pch
|
#env['PCHSTOP'] = pch
|
||||||
|
|
||||||
##### Version define
|
|
||||||
|
|
||||||
version_env = env.Copy()
|
|
||||||
version_env.Append(CPPDEFINES = ['NSIS_VERSION=v$VERSION'])
|
|
||||||
|
|
||||||
# only pass -DNSIS_VERSION to files that use it to minimize rebuilds
|
|
||||||
|
|
||||||
new_makensis_files = []
|
|
||||||
|
|
||||||
for file in makensis_files:
|
|
||||||
f = File(file).srcnode().abspath
|
|
||||||
if open(f).read().find('NSIS_VERSION') >= 0:
|
|
||||||
new_makensis_files.append(version_env.Object(file))
|
|
||||||
else:
|
|
||||||
new_makensis_files.append(file)
|
|
||||||
|
|
||||||
makensis_files = new_makensis_files
|
|
||||||
|
|
||||||
##### LZMA specific defines
|
##### LZMA specific defines
|
||||||
|
|
||||||
lzma_env = env.Copy()
|
lzma_env = env.Copy()
|
||||||
|
|
|
@ -74,7 +74,6 @@ conf.Finish()
|
||||||
env.Append(CPPDEFINES = ['EXEHEAD'])
|
env.Append(CPPDEFINES = ['EXEHEAD'])
|
||||||
env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
|
env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
|
||||||
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
|
||||||
env.Append(CPPDEFINES = env['NSIS_CPPDEFINES'])
|
|
||||||
|
|
||||||
### Some other settings
|
### Some other settings
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED // keep msdev's resource editor from mangling the .rc file
|
#ifndef APSTUDIO_INVOKED // keep msdev's resource editor from mangling the .rc file
|
||||||
|
|
||||||
|
#include "sconf.h"
|
||||||
|
|
||||||
#ifndef NSIS_CONFIG_VISIBLE_SUPPORT
|
#ifndef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||||
#undef NSIS_CONFIG_LICENSEPAGE
|
#undef NSIS_CONFIG_LICENSEPAGE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue