summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Seppänen <samuli@openvpn.net>2011-02-11 16:14:28 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2011-02-27 00:55:38 +0100
commit8c1c666e65db37fe680f7760c6ef52c2dd031932 (patch)
tree822d319aee573b0b31adc070690d3d27d70a059f
parent292cf21a64b4afb3b22a6ba19967f965b486600a (diff)
downloadopenvpn-8c1c666e65db37fe680f7760c6ef52c2dd031932.tar.gz
openvpn-8c1c666e65db37fe680f7760c6ef52c2dd031932.tar.xz
openvpn-8c1c666e65db37fe680f7760c6ef52c2dd031932.zip
Added command-line switch to win/build_all.py to skip TAP driver building
Modified win/build_all.py so that by giving -n or --notap switch the TAP driver is not built. This is useful if using prebuilt TAP drivers, or when WinDDK is not installed. Signed-off-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: James Yonan <james@openvpn.net> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r--win/build_all.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/win/build_all.py b/win/build_all.py
index dec3a78..2c4d1aa 100644
--- a/win/build_all.py
+++ b/win/build_all.py
@@ -11,6 +11,7 @@ def Usage():
print
print " -h, --help Show this help"
print " -u, --unsigned Do not sign the TAP drivers"
+ print " -n, --notap Don't build the TAP driver"
sys.exit(1)
def main(config):
@@ -18,9 +19,12 @@ def main(config):
# Do a signed build by default
signedBuild=True
+ # Build the TAP driver by default
+ tap=True
+
# Parse the command line argument(s)
try:
- opts, args = getopt.getopt(sys.argv[1:], "hu", ["help", "unsigned"])
+ opts, args = getopt.getopt(sys.argv[1:], "hun", ["help", "unsigned", "notap"])
except getopt.GetoptError:
Usage()
@@ -29,7 +33,8 @@ def main(config):
Usage()
if o in ("-u", "--unsigned"):
signedBuild=False
-
+ if o in ("-n", "--notap"):
+ tap=False
# Check if the SignTool module is present. This avoids ImportErrors popping
# up annoyingly _after_ the build.
@@ -45,8 +50,12 @@ def main(config):
# Start the build
config_all(config)
build_openvpn()
- build_ddk(config, 'tap', 'all')
- build_ddk(config, 'tapinstall', 'all')
+
+ if tap:
+ build_ddk(config, 'tap', 'all')
+ build_ddk(config, 'tapinstall', 'all')
+ else:
+ print "Not building the TAP driver"
if signedBuild:
sign(config, 'all')
@@ -54,6 +63,6 @@ def main(config):
make_dist(config)
# if we are run directly, and not loaded as a module
-if __name__ == "__main__":
- from wb import config
- main(config)
+if __name__ == "__main__":
+ from wb import config
+ main(config)