aboutsummaryrefslogtreecommitdiff
path: root/win/wb.py
diff options
context:
space:
mode:
authorSamuli Seppänen <samuli@openvpn.net>2011-03-08 16:07:49 +0200
committerDavid Sommerseth <davids@redhat.com>2011-03-21 15:15:12 +0100
commit0c03c731a80399998cc4b03a35ffad2961c7b369 (patch)
tree9bfd3ff8c63e0d8f63ba8102ea691402b075d6b8 /win/wb.py
parentImplement IPv6 in TUN mode for Windows TAP driver. (diff)
downloadopenvpn-0c03c731a80399998cc4b03a35ffad2961c7b369.tar.xz
Added support for prebuilt TAP-drivers. Automated embedding manifests.
Removed win/make_dist.py's dependency on TAP-driver and tapinstall.exe building. Also added manifest embedding commands to win/make_dist.py. To avoid duplicate code moved the "build_vc" method from win/build.py to win/wb.py and renamed it "run_in_vs_shell". Signed-off-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: James Yonan <james@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
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()