summaryrefslogtreecommitdiffstats
path: root/win/build.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/build.py
parent0265cf3a6b646cc02a78cc3501dce77f99e81a5f (diff)
downloadopenvpn-0c03c731a80399998cc4b03a35ffad2961c7b369.tar.gz
openvpn-0c03c731a80399998cc4b03a35ffad2961c7b369.tar.xz
openvpn-0c03c731a80399998cc4b03a35ffad2961c7b369.zip
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/build.py')
-rw-r--r--win/build.py36
1 files changed, 15 insertions, 21 deletions
diff --git a/win/build.py b/win/build.py
index fdec7cf..25f70c4 100644
--- a/win/build.py
+++ b/win/build.py
@@ -1,28 +1,22 @@
-import os, sys
-from wb import system, config, home_fn, cd_home, cd_service_win32
-
-os.environ['PATH'] += ";%s\\VC" % (os.path.normpath(config['MSVC']),)
-
-def build_vc(cmd):
- """Make sure environment variables are setup before build"""
- system('cmd /c "vcvarsall.bat x86 && %s"' % (cmd,))
-
-def main():
+import os, sys
+from wb import system, config, home_fn, cd_home, cd_service_win32, run_in_vs_shell
+
+def main():
"""Build openvpn.exe and openvpnserv.exe"""
- cd_home()
- build_vc("nmake /f %s" % (home_fn('msvc.mak'),))
+ cd_home()
+ run_in_vs_shell("nmake /f %s" % (home_fn('msvc.mak'),))
cd_service_win32()
- build_vc("nmake /f %s" % ('msvc.mak'))
-
-def clean():
+ run_in_vs_shell("nmake /f %s" % ('msvc.mak'))
+
+def clean():
"""Clean up after openvpn.exe and openvpnserv.exe build"""
- cd_home()
- build_vc("nmake /f %s clean" % (home_fn('msvc.mak'),))
+ cd_home()
+ run_in_vs_shell("nmake /f %s clean" % (home_fn('msvc.mak'),))
os.chdir("service-win32")
- build_vc("nmake /f %s clean" % ('msvc.mak'))
-
-# if we are run directly, and not loaded as a module
-if __name__ == "__main__":
+ run_in_vs_shell("nmake /f %s clean" % ('msvc.mak'))
+
+# if we are run directly, and not loaded as a module
+if __name__ == "__main__":
if len(sys.argv) == 2 and sys.argv[1] == 'clean':
clean()
else: