From 0abaf2951a72c966d5deb42013133af1d7a379dc Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 21 May 2005 15:37:56 +0000 Subject: [PATCH] set default value of CHMDOCS to 'yes' if hhc.exe is found in PATH git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4046 212acab6-be3b-0410-9dea-997c60f758d6 --- SConstruct | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index ba640ed4..3adbbe64 100644 --- a/SConstruct +++ b/SConstruct @@ -61,22 +61,22 @@ defenv.Append(NSIS_VERSION = VERSION) ####### Options ### ###################################################################### +import os +hhc = 'no' +if defenv.WhereIs('hhc', os.environ['PATH']): + hhc = 'yes' + opts = Options() opts.Add(PathOption('PREFIX', 'Installation prefix', None)) opts.Add(BoolOption('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no')) opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no')) -opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', 'no')) +opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc)) opts.Add(PathOption('CPPPATH', 'Path to search for include files', None)) opts.Add(PathOption('LIBPATH', 'Path to search for libraries', None)) opts.Add(ListOption('SKIPSTUBS', 'A list of stubs that will not be built', 'none', stubs)) opts.Add(ListOption('SKIPPLUGINS', 'A list of plug-ins that will not be built', 'none', plugins)) opts.Add(ListOption('SKIPUTILS', 'A list of utilities that will not be built', 'none', utils)) opts.Add(ListOption('SKIPMISC', 'A list of plug-ins that will not be built', 'none', misc)) - -import os -if defenv.WhereIs('hhc', os.environ['PATH']): - defenv['CHMDOCS'] = 1 - opts.Update(defenv) Help(opts.GenerateHelpText(defenv))