summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuan Lang <juanlang@google.com>2012-12-06 01:07:53 (GMT)
committerJuan Lang <juanlang@google.com>2012-12-06 01:07:53 (GMT)
commit820af04df5e741db15f7429f1513b7e82d2b12b4 (patch)
tree3bfa9faae4951d898e98b96cb0227d7438cad78c /src
parentb5cf704972f2b25ba609108351076eb5515fb50d (diff)
downloadSCons-820af04df5e741db15f7429f1513b7e82d2b12b4.zip
SCons-820af04df5e741db15f7429f1513b7e82d2b12b4.tar.gz
SCons-820af04df5e741db15f7429f1513b7e82d2b12b4.tar.bz2
Support building with WiX releases after 2.0
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt1
-rw-r--r--src/engine/SCons/Tool/wix.py19
-rw-r--r--src/engine/SCons/Tool/wixTests.py2
3 files changed, 13 insertions, 9 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index ff8290e..8905e72 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -11,6 +11,7 @@ RELEASE 2.X.X -
From Juan Lang:
- Fix WiX Tool to use .wixobj rather than .wxiobj for compiler output
+ - Support building with WiX releases after 2.0
From Alexey Klimkin:
- Fix nested LIBPATH expansion by flattening sequences in subst_path.
diff --git a/src/engine/SCons/Tool/wix.py b/src/engine/SCons/Tool/wix.py
index c898949..04136ce 100644
--- a/src/engine/SCons/Tool/wix.py
+++ b/src/engine/SCons/Tool/wix.py
@@ -68,7 +68,6 @@ def exists(env):
# try to find the candle.exe and light.exe tools and
# add the install directory to light libpath.
- #for path in os.environ['PATH'].split(os.pathsep):
for path in os.environ['PATH'].split(os.pathsep):
if not path:
continue
@@ -82,13 +81,17 @@ def exists(env):
# search for the tools in the PATH environment variable
try:
- if env['WIXCANDLE'] in os.listdir(path) and\
- env['WIXLIGHT'] in os.listdir(path):
- env.PrependENVPath('PATH', path)
- env['WIXLIGHTFLAGS'] = [ os.path.join( path, 'wixui.wixlib' ),
- '-loc',
- os.path.join( path, 'WixUI_en-us.wxl' ) ]
- return 1
+ files = os.listdir(path)
+ if env['WIXCANDLE'] in files and env['WIXLIGHT'] in files:
+ env.PrependENVPath('PATH', path)
+ # include appropriate flags if running WiX 2.0
+ if 'wixui.wixlib' in files and 'WixUI_en-us.wxl' in files:
+ env['WIXLIGHTFLAGS'] = [ os.path.join( path, 'wixui.wixlib' ),
+ '-loc',
+ os.path.join( path, 'WixUI_en-us.wxl' ) ]
+ else:
+ env['WIXLIGHTFLAGS'] = []
+ return 1
except OSError:
pass # ignore this, could be a stale PATH entry.
diff --git a/src/engine/SCons/Tool/wixTests.py b/src/engine/SCons/Tool/wixTests.py
index 8240d68..c815dd0 100644
--- a/src/engine/SCons/Tool/wixTests.py
+++ b/src/engine/SCons/Tool/wixTests.py
@@ -46,7 +46,7 @@ class WixTestCase(unittest.TestCase):
env = Environment(tools=['wix'])
assert env['WIXCANDLE'] is not None
assert env['WIXCANDLEFLAGS'] is not None
- assert '-loc' in env['WIXLIGHTFLAGS']
+ assert env['WIXLIGHTFLAGS'] is not None
assert env.subst('$WIXOBJSUF') == '.wixobj'
assert env.subst('$WIXSRCSUF') == '.wxs'