Added support for prebuilt TAP-drivers. Automated embedding manifests.
PATCH 1/1 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".
--- win/build.py | 16 +++-------- win/build_all.py | 13 +++++---- win/make_dist.py | 75 +++++++++++++++++++++++++++++++++++++---------------- win/settings.in | 3 ++ win/tap_span.py | 2 +- win/wb.py | 5 +++ 6 files changed, 73 insertions(+), 41 deletions(-)
win/build.py +5 -11
@@ -1,25 +1,19 @@ 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,)) +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'),)) + run_in_vs_shell("nmake /f %s" % (home_fn('msvc.mak'),)) cd_service_win32() - build_vc("nmake /f %s" % ('msvc.mak')) + 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'),)) + run_in_vs_shell("nmake /f %s clean" % (home_fn('msvc.mak'),)) os.chdir("service-win32") - build_vc("nmake /f %s clean" % ('msvc.mak')) + run_in_vs_shell("nmake /f %s clean" % ('msvc.mak')) # if we are run directly, and not loaded as a module if __name__ == "__main__":
win/build_all.py +7 -6
@@ -54,13 +54,14 @@ def main(config): if tap: build_ddk(config, 'tap', 'all') build_ddk(config, 'tapinstall', 'all') - else: - print "Not building the TAP driver" - - if signedBuild: - sign(config, 'all') + if signedBuild: + sign(config, 'all') + make_dist(config,tap=True) - make_dist(config) + else: + if 'TAP_PREBUILT' in config: + print "Using prebuilt TAP driver" + make_dist(config,tap=False) # if we are run directly, and not loaded as a module if __name__ == "__main__":
win/make_dist.py +52 -23
97 lines not on this page · raw message
win/settings.in +3 -0
@@ -69,6 +69,9 @@ !define SIGNTOOL "../signtool" !define PRODUCT_SIGN_CN "openvpn" +# Directory with prebuilt TAP drivers and tapinstall.exes +!define TAP_PREBUILT "../tap-prebuilt" + ; DEBUGGING -- set to something like "-DBG2" !define OUTFILE_LABEL ""
win/tap_span.py +1 -1
@@ -26,7 +26,7 @@ def copy_tapinstall(src, dest, x64): mkdir_silent(dest) for dirpath, dirnames, filenames in os.walk(home_fn(src)): for f in filenames: - if f == 'tapinstall.exe': + if f == 'devcon.exe': dir_name = os.path.basename(dirpath) s = os.path.join(dirpath, f) if dir_name == base:
win/wb.py +5 -0
@@ -44,6 +44,11 @@ def system(cmd): 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+),\[(.*)\]\)$')
Signature · 1 line
1.6.3.3
David Sommerseth
Applied-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 4 lines · Samuli Seppänen
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 fromwin/build.pytowin/wb.pyand renamed it "run_in_vs_shell".
Quoted 9 lines
--- win/build.py | 16 +++-------- win/build_all.py | 13 +++++---- win/make_dist.py | 75 +++++++++++++++++++++++++++++++++++++---------------- win/settings.in | 3 ++ win/tap_span.py | 2 +- win/wb.py | 5 +++ 6 files changed, 73 insertions(+), 41 deletions(-)
Applied to beta2.2 and merged into allmerged
commit 58704ea66478942ae82c013d0d48c7931cb79fa0
Author: Samuli Seppänen <[email protected]...> Date: Tue Mar 15 16:38:07 2011 +0200
Updated INSTALL-win32.txt
Signed-off-by: Samuli Seppänen <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Signed-off-by: David Sommerseth <[email protected]...>-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk2HuVgACgkQDC186MBRfroGXACeJuuMM9Kxmlc0wAeAsSnSNO2Y nEAAnR63nK8M1EyNvcXybcZqUXPQ1QFQ
=5HUu
-----END PGP SIGNATURE-----