aboutsummaryrefslogtreecommitdiff
path: root/win/wb.py
diff options
context:
space:
mode:
Diffstat (limited to 'win/wb.py')
-rw-r--r--win/wb.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/win/wb.py b/win/wb.py
index d1b0b3e..33eefbd 100644
--- a/win/wb.py
+++ b/win/wb.py
@@ -41,12 +41,17 @@ def cd_service_win32():
os.chdir(os.path.join(os.path.dirname(__file__), '../service-win32'))
def system(cmd):
- print "RUN:", cmd
- os.system(cmd)
-
-def parse_version_m4(kv, version_m4):
+ print "RUN:", cmd
+ os.system(cmd)
+
+def run_in_vs_shell(cmd):
+ """Make sure environment variables are setup before running command"""
+ os.environ['PATH'] += ";%s\\VC" % (os.path.normpath(config['MSVC']),)
+ system('cmd /c "vcvarsall.bat x86 && %s"' % (cmd,))
+
+def parse_version_m4(kv, version_m4):
'''Parse define lines in version.m4'''
- r = re.compile(r'^define\((\w+),\[(.*)\]\)$')
+ r = re.compile(r'^define\((\w+),\[(.*)\]\)$')
f = open(version_m4)
for line in f:
line = line.rstrip()