scons 0.98 with an even uglier hack to reverse the result of hhc.exe
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5605 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3d28b97c82
commit
685aacef36
2 changed files with 12 additions and 11 deletions
|
@ -75,10 +75,6 @@ def fix_html(target, source, env):
|
||||||
|
|
||||||
if build_chm:
|
if build_chm:
|
||||||
hhc_action = Action(r'cd \ && hhc "%s\nsis.hhp"' % (build_dir))
|
hhc_action = Action(r'cd \ && hhc "%s\nsis.hhp"' % (build_dir))
|
||||||
execute = hhc_action.execute
|
|
||||||
def rexecute(*args):
|
|
||||||
return execute(*args) != 1 # hhc returns 1 on success
|
|
||||||
hhc_action.execute = rexecute
|
|
||||||
|
|
||||||
chm_builder = Builder(
|
chm_builder = Builder(
|
||||||
action = [
|
action = [
|
||||||
|
@ -92,6 +88,17 @@ if build_chm:
|
||||||
|
|
||||||
env.Append(BUILDERS = {'HalibutCHM' : chm_builder})
|
env.Append(BUILDERS = {'HalibutCHM' : chm_builder})
|
||||||
|
|
||||||
|
# fix hhc.exe reverse return value - UGLY
|
||||||
|
old_spawn = env['SPAWN']
|
||||||
|
def new_spawn(*args, **kw):
|
||||||
|
result = old_spawn(*args, **kw)
|
||||||
|
if 'hhc' in args[3]:
|
||||||
|
return not result
|
||||||
|
else:
|
||||||
|
return result
|
||||||
|
env['SPAWN'] = new_spawn
|
||||||
|
|
||||||
|
# build CHM
|
||||||
chm = env.HalibutCHM('NSIS.chm', [chm_config_but] + buts)
|
chm = env.HalibutCHM('NSIS.chm', [chm_config_but] + buts)
|
||||||
env.Depends(chm, halibut)
|
env.Depends(chm, halibut)
|
||||||
env.Depends(chm, '#Docs/style.css')
|
env.Depends(chm, '#Docs/style.css')
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
EnsurePythonVersion(1,6)
|
EnsureSConsVersion(0,98)
|
||||||
|
|
||||||
try:
|
|
||||||
EnsureSConsVersion(0,96,93)
|
|
||||||
except TypeError: # EnsureSConsVersion in older versions took only two parameters
|
|
||||||
print 'SCons 0.96.93 or greater is required, but you have an older version'
|
|
||||||
Exit(2)
|
|
||||||
|
|
||||||
stubs = [
|
stubs = [
|
||||||
'bzip2',
|
'bzip2',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue