SCons options display hack: Fix ListVariable to generate comma separated (quoted if required) list of allowed names
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6212 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b3dc58c704
commit
6cf12d3c83
1 changed files with 11 additions and 0 deletions
11
SConstruct
11
SConstruct
|
@ -107,6 +107,17 @@ SConscript('SCons/config.py')
|
|||
opts.Update(defenv)
|
||||
Help(opts.GenerateHelpText(defenv))
|
||||
|
||||
#Fix ListVariable to generate comma separated (quoted if required) list of allowed names:
|
||||
org_ListVariable = ListVariable
|
||||
def ListVariable(key, help, default, names, map={}):
|
||||
r = list(org_ListVariable(key, help, default, names, map))
|
||||
if len(r) == 5 and isinstance(r[1], str):
|
||||
fmt = 'allowed names: %s'
|
||||
repl = fmt % ', '.join( ((' ' in s) and ('"%s"' % s) or s) for s in names )
|
||||
r[1] = r[1].replace(fmt % ' '.join(names), repl)
|
||||
return r
|
||||
|
||||
|
||||
install_dirs = {
|
||||
'relocatable': {
|
||||
'dest': '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue