def main(config): config_all(config) build_openvpn() build_ddk(config, 'tap', 'all') build_ddk(config, 'tapinstall', 'all') sign(config, 'all') make_dist(config)
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:], "hun", ["help", "unsigned", "notap"]) except getopt.GetoptError: Usage() for o, a in opts: if o in ("-h","--help"): 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. if signedBuild: try: from signtool import SignTool except (ImportError): print "ERROR: SignTool python module not found! Can't do a signed build." sys.exit(1) else: print "Doing an unsigned build as requested" # Start the build config_all(config) build_openvpn() if tap: build_ddk(config, 'tap', 'all') build_ddk(config, 'tapinstall', 'all') if signedBuild: sign(config, 'all') make_dist(config,tap=True) else: if 'TAP_PREBUILT' in config: print "Using prebuilt TAP driver" make_dist(config,tap=False)
def main(config): config_main(config) build_openvpn() make_dist(config, tap=False)