From 7a5163ea597af1ba05716fe6b4dc9f6f50ae55de Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 24 Feb 2006 19:10:42 +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@4535 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/SConscript | 21 +-------------------- Source/exehead/SConscript | 1 - Source/exehead/config.h | 2 ++ 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Source/SConscript b/Source/SConscript index ed58843f..fb4c5036 100644 --- a/Source/SConscript +++ b/Source/SConscript @@ -64,10 +64,9 @@ if env['PLATFORM'] == 'win32': AddAvailableLibs(env, libs) -##### Configuration defines +##### Defines env.Append(CPPDEFINES = ['_WIN32_IE=0x0500']) -env.Append(CPPDEFINES = env['NSIS_CPPDEFINES']) ##### Set PCH @@ -75,24 +74,6 @@ env.Append(CPPDEFINES = env['NSIS_CPPDEFINES']) #env['PCH'] = env.PCH(pch)[0] #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_env = env.Copy() diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript index d8e61a8e..af869801 100644 --- a/Source/exehead/SConscript +++ b/Source/exehead/SConscript @@ -74,7 +74,6 @@ conf.Finish() env.Append(CPPDEFINES = ['EXEHEAD']) env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN']) env.Append(CPPDEFINES = ['_WIN32_IE=0x0500']) -env.Append(CPPDEFINES = env['NSIS_CPPDEFINES']) ### Some other settings diff --git a/Source/exehead/config.h b/Source/exehead/config.h index 8993a477..c7067d01 100644 --- a/Source/exehead/config.h +++ b/Source/exehead/config.h @@ -3,6 +3,8 @@ #ifndef APSTUDIO_INVOKED // keep msdev's resource editor from mangling the .rc file +#include "sconf.h" + #ifndef NSIS_CONFIG_VISIBLE_SUPPORT #ifdef NSIS_CONFIG_LICENSEPAGE #undef NSIS_CONFIG_LICENSEPAGE