aboutsummaryrefslogtreecommitdiff
path: root/install-win32
diff options
context:
space:
mode:
Diffstat (limited to 'install-win32')
-rw-r--r--install-win32/getgui5
-rw-r--r--install-win32/getprebuilt10
-rw-r--r--install-win32/makeopenvpn18
-rw-r--r--install-win32/settings.in5
4 files changed, 30 insertions, 8 deletions
diff --git a/install-win32/getgui b/install-win32/getgui
index c7fd2bb..03f68a8 100644
--- a/install-win32/getgui
+++ b/install-win32/getgui
@@ -10,10 +10,13 @@ GUI="$OPENVPN_GUI_DIR/$OPENVPN_GUI"
if [ -e "$GUI" ]; then
mkdir -p $GENOUT/bin &>/dev/null
cp $GUI $GENOUT/bin
- echo '!define OPENVPN_GUI_DEFINED' >autodefs/guidefs.nsi
if [ -d "$SIGNTOOL" ]; then
TARGET_EXE="$GENOUT/bin/$OPENVPN_GUI" $SIGNTOOL/signexe
fi
+fi
+
+if [ -e "$GENOUT/bin/$OPENVPN_GUI" ]; then
+ echo '!define OPENVPN_GUI_DEFINED' >autodefs/guidefs.nsi
else
cat /dev/null >autodefs/guidefs.nsi
fi
diff --git a/install-win32/getprebuilt b/install-win32/getprebuilt
new file mode 100644
index 0000000..36c4827
--- /dev/null
+++ b/install-win32/getprebuilt
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# get version.nsi definitions
+. autodefs/defs.sh
+
+# Get PKCS11-helper libraries
+if [ -d "$GENOUT_PREBUILT" ] && ! [ -d "$GENOUT" ]; then
+ echo LOADING prebuilt binaries from $GENOUT_PREBUILT
+ cp -a $GENOUT_PREBUILT $GENOUT
+fi
diff --git a/install-win32/makeopenvpn b/install-win32/makeopenvpn
index 31df604..be43fdc 100644
--- a/install-win32/makeopenvpn
+++ b/install-win32/makeopenvpn
@@ -3,11 +3,15 @@
# get version.nsi definitions
. autodefs/defs.sh
-# build OpenVPN binary
-[ "$CLEAN" = "yes" ] && make -f makefile.w32 clean
-make -f makefile.w32 -j $MAKE_JOBS
+if [ -d "$OPENSSL_DIR" ] && [ -d "$LZO_DIR" ] && [ -d "$PKCS11_HELPER_DIR" ]; then
+ # build OpenVPN binary
+ [ "$CLEAN" = "yes" ] && make -f makefile.w32 clean
+ make -f makefile.w32 -j $MAKE_JOBS
-# copy OpenVPN executable to GENOUT/bin
-mkdir -p $GENOUT/bin &>/dev/null
-cp $PRODUCT_UNIX_NAME.exe $GENOUT/bin
-strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe
+ # copy OpenVPN executable to GENOUT/bin
+ mkdir -p $GENOUT/bin &>/dev/null
+ cp $PRODUCT_UNIX_NAME.exe $GENOUT/bin
+ strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe
+else
+ echo DID NOT BUILD openvpn.exe because one or more of OPENSSL_DIR, LZO_DIR, or PKCS11_HELPER_DIR directories were missing
+fi
diff --git a/install-win32/settings.in b/install-win32/settings.in
index ce9ee35..864cf19 100644
--- a/install-win32/settings.in
+++ b/install-win32/settings.in
@@ -23,6 +23,11 @@
!define PKCS11_HELPER_DIR "../pkcs11-helper/usr/local"
!define DMALLOC_DIR "../dmalloc-5.4.2"
+# Optional directory of prebuilt OpenVPN binary components,
+# to be used as a source when build-from-scratch prerequisites
+# are not met.
+!define GENOUT_PREBUILT "../gen-prebuilt"
+
# tapinstall.exe source code.
# Not needed if DRVBINSRC is defined.
!define TISRC "../tapinstall"