diff options
author | James Yonan <james@openvpn.net> | 2010-07-16 19:08:35 +0000 |
---|---|---|
committer | James Yonan <james@openvpn.net> | 2010-07-16 19:08:35 +0000 |
commit | 57346f568b63627967fd27e70f3c452eec8b486e (patch) | |
tree | 551900387e15fe79dd7b93a797dc694c0b6c3b69 | |
parent | Added --register-dns option for Windows. (diff) | |
download | openvpn-57346f568b63627967fd27e70f3c452eec8b486e.tar.xz |
Added win/build_exe.py script, which is similar to
win/build_all.py except that it doesn't build the
TAP drivers or tapinstall.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6306 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r-- | win/build_exe.py | 15 | ||||
-rw-r--r-- | win/make_dist.py | 44 |
2 files changed, 38 insertions, 21 deletions
diff --git a/win/build_exe.py b/win/build_exe.py new file mode 100644 index 0000000..087f9a3 --- /dev/null +++ b/win/build_exe.py @@ -0,0 +1,15 @@ +from config import main as config_main
+from build import main as build_openvpn
+from build_ddk import main as build_ddk
+from sign import main as sign
+from make_dist import main as make_dist
+
+def main(config):
+ config_main(config)
+ build_openvpn()
+ make_dist(config, tap=False)
+
+# if we are run directly, and not loaded as a module
+if __name__ == "__main__":
+ from wb import config
+ main(config)
diff --git a/win/make_dist.py b/win/make_dist.py index 3011279..a6a0563 100644 --- a/win/make_dist.py +++ b/win/make_dist.py @@ -1,7 +1,7 @@ import os
from wb import home_fn, rm_rf, mkdir, cp_a, cp
-def main(config):
+def main(config, tap=True):
dist = config['DIST']
assert dist
dist = home_fn(dist)
@@ -13,8 +13,9 @@ def main(config): rm_rf(dist)
mkdir(dist)
mkdir(bin)
- mkdir(i386)
- mkdir(amd64)
+ if tap:
+ mkdir(i386)
+ mkdir(amd64)
# copy openvpn.exe and manifest
cp(home_fn('openvpn.exe'), bin)
@@ -28,25 +29,26 @@ def main(config): # 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):
+ if tap:
+ # 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:
- 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 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__":
|