aboutsummaryrefslogtreecommitdiff
path: root/win/make_dist.py
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2010-04-22 12:53:31 +0000
committerJames Yonan <james@openvpn.net>2010-04-22 12:53:31 +0000
commit059739e9341781d9019e07fc5119367c1630b012 (patch)
tree6839d8071558539505991895ef377baee58e960f /win/make_dist.py
parentMinor change to doclean script: (diff)
downloadopenvpn-059739e9341781d9019e07fc5119367c1630b012.tar.xz
Added Python-based build system for Windows in
win directory. Fixed minor issue in TAP driver DEBUG builds where non-null-terminated unicode strings were being printed incorrectly. Version 2.1.1g git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5577 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'win/make_dist.py')
-rw-r--r--win/make_dist.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/win/make_dist.py b/win/make_dist.py
new file mode 100644
index 0000000..3011279
--- /dev/null
+++ b/win/make_dist.py
@@ -0,0 +1,54 @@
+import os
+from wb import home_fn, rm_rf, mkdir, cp_a, cp
+
+def main(config):
+ dist = config['DIST']
+ assert dist
+ dist = home_fn(dist)
+ bin = os.path.join(dist, 'bin')
+ i386 = os.path.join(dist, 'i386')
+ amd64 = os.path.join(dist, 'amd64')
+
+ # build dist and subdirectories
+ rm_rf(dist)
+ mkdir(dist)
+ mkdir(bin)
+ mkdir(i386)
+ mkdir(amd64)
+
+ # copy openvpn.exe and manifest
+ cp(home_fn('openvpn.exe'), bin)
+ cp(home_fn('openvpn.exe.manifest'), bin)
+
+ # copy DLL dependencies
+ cp(home_fn(config['LZO_DIR']+'/bin/lzo2.dll'), bin)
+ cp(home_fn(config['OPENSSL_DIR']+'/bin/libeay32.dll'), bin)
+ cp(home_fn(config['OPENSSL_DIR']+'/bin/ssleay32.dll'), bin)
+
+ # copy MSVC CRT
+ cp_a(home_fn(config['MSVC_CRT']), bin)
+
+ # copy TAP drivers
+ for dir_name, dest in (('amd64', amd64), ('i386', i386)):
+ dir = home_fn(os.path.join('tap-win32', dir_name))
+ for dirpath, dirnames, filenames in os.walk(dir):
+ for f in filenames:
+ root, ext = os.path.splitext(f)
+ if ext in ('.inf', '.cat', '.sys'):
+ cp(os.path.join(dir, f), dest)
+ break
+
+ # copy tapinstall
+ dest = {'amd64' : amd64, 'i386' : i386}
+ for dirpath, dirnames, filenames in os.walk(home_fn('tapinstall')):
+ for f in filenames:
+ if f == 'tapinstall.exe':
+ dir_name = os.path.basename(dirpath)
+ src = os.path.join(dirpath, f)
+ if dir_name in dest:
+ cp(src, dest[dir_name])
+
+# if we are run directly, and not loaded as a module
+if __name__ == "__main__":
+ from wb import config
+ main(config)