summaryrefslogtreecommitdiff
path: root/win/build.py
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-21 15:53:40 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-21 15:53:40 +0100
commit349cfa7acb95abe865209a28e417ec74b56f9bba (patch)
treead65334821b587c4ecdd461be84c94305ffdb888 /win/build.py
Imported Upstream version 2.2.1upstream/2.2.1
Diffstat (limited to 'win/build.py')
-rw-r--r--win/build.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/win/build.py b/win/build.py
new file mode 100644
index 0000000..69137f2
--- /dev/null
+++ b/win/build.py
@@ -0,0 +1,23 @@
+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()
+ run_in_vs_shell("nmake /f %s" % (home_fn('msvc.mak'),))
+ cd_service_win32()
+ run_in_vs_shell("nmake /f %s" % ('msvc.mak'))
+
+def clean():
+ """Clean up after openvpn.exe and openvpnserv.exe build"""
+ cd_home()
+ run_in_vs_shell("nmake /f %s clean" % (home_fn('msvc.mak'),))
+ os.chdir("service-win32")
+ 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:
+ main()