]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Several modifications to win/make_dist.py to allow building the NSI installer
authorSamuli Seppänen <samuli@openvpn.net>
Fri, 11 Feb 2011 14:25:40 +0000 (16:25 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Sat, 26 Feb 2011 23:59:04 +0000 (00:59 +0100)
Added copying of all remaining openvpn dependencies to dist directory so that
the NSI installer script (win/openvpn.nsi) can find and use them more easily.
This includes openvpn.exe, openvpnserv.exe, libpkcs11-helper-1.dll, openssl.exe,
and example files. The associated, external DDL/manifest files are copied also,
so that embedding them with mt.exe is easier. This is a temporary solution until
nmake makefiles are modified to automate this process, except for a few of the
library dependencies (lzo2.dll and libpkcs11-helper-1.dll).

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>
win/make_dist.py

index a6a0563753a642cfb9ec13d5253b4d3e1ea1713d..70aaa60d6f17c994b3b8d010826c0a7542662d3c 100644 (file)
@@ -1,5 +1,5 @@
 import os\r
-from wb import home_fn, rm_rf, mkdir, cp_a, cp\r
+from wb import home_fn, rm_rf, mkdir, cp_a, cp, rename
 \r
 def main(config, tap=True):\r
     dist = config['DIST']\r
@@ -8,6 +8,7 @@ def main(config, tap=True):
     bin = os.path.join(dist, 'bin')\r
     i386 = os.path.join(dist, 'i386')\r
     amd64 = os.path.join(dist, 'amd64')\r
+    samples = os.path.join(dist, 'samples')
 \r
     # build dist and subdirectories\r
     rm_rf(dist)\r
@@ -16,15 +17,34 @@ def main(config, tap=True):
     if tap:\r
         mkdir(i386)\r
         mkdir(amd64)\r
+    mkdir(samples)
 \r
-    # copy openvpn.exe and manifest\r
+    # copy openvpn.exe, openvpnserv.exe and their manifests
     cp(home_fn('openvpn.exe'), bin)\r
     cp(home_fn('openvpn.exe.manifest'), bin)\r
+    cp(home_fn('service-win32/openvpnserv.exe'), bin)
+    cp(home_fn('service-win32/openvpnserv.exe.manifest'), bin)
+
+    # copy openvpn-gui
+    cp(home_fn(config['OPENVPN_GUI_DIR']+"/"+config['OPENVPN_GUI']), bin)
 \r
     # copy DLL dependencies\r
     cp(home_fn(config['LZO_DIR']+'/bin/lzo2.dll'), bin)\r
+    cp(home_fn(config['LZO_DIR']+'/bin/lzo2.dll.manifest'), bin)
     cp(home_fn(config['OPENSSL_DIR']+'/bin/libeay32.dll'), bin)\r
     cp(home_fn(config['OPENSSL_DIR']+'/bin/ssleay32.dll'), bin)\r
+    cp(home_fn(config['PKCS11_HELPER_DIR']+'/lib/libpkcs11-helper-1.dll'), bin)
+    cp(home_fn(config['PKCS11_HELPER_DIR']+'/lib/libpkcs11-helper-1.dll.manifest'), bin)
+
+    # copy OpenSSL utilities (=openvpn.exe)
+    cp(home_fn(config['OPENSSL_DIR']+'/bin/openssl.exe'), bin)
+
+    # copy sample config files; renaming is necessary due to openvpn.nsi script
+    cp(home_fn('install-win32/sample.ovpn'), samples)
+    cp(home_fn('sample-config-files/client.conf'), samples)
+    cp(home_fn('sample-config-files/server.conf'), samples)
+    rename(os.path.join(samples,'client.conf'), os.path.join(samples, 'client.ovpn'))
+    rename(os.path.join(samples,'server.conf'), os.path.join(samples, 'server.ovpn'))
 \r
     # copy MSVC CRT\r
     cp_a(home_fn(config['MSVC_CRT']), bin)\r
@@ -40,16 +60,18 @@ def main(config, tap=True):
                         cp(os.path.join(dir, f), dest)\r
                 break\r
 \r
-        # copy tapinstall\r
+        # Copy tapinstall.exe (usually known as devcon.exe)
         dest = {'amd64' : amd64, 'i386' : i386}\r
         for dirpath, dirnames, filenames in os.walk(home_fn('tapinstall')):\r
             for f in filenames:\r
                 if f == 'tapinstall.exe':\r
+                   # dir_name is either i386 or amd64
                     dir_name = os.path.basename(dirpath)\r
                     src = os.path.join(dirpath, f)\r
                     if dir_name in dest:\r
                         cp(src, dest[dir_name])\r
 \r
+
 # if we are run directly, and not loaded as a module\r
 if __name__ == "__main__":\r
     from wb import config\r