From ba865c55a61b4dd3bcf3e2c6bb2632e38d07cd2a Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Feb 2008 19:44:53 +0000 Subject: Changes to Windows build system: added GENOUT_PREBUILT mode to allow building an OpenVPN installer with a reduced set of prerequisites. See comments in domake-win for more info. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2711 e7ae566f-a301-0410-adde-c780ea21d3b5 --- install-win32/getgui | 5 ++++- install-win32/getprebuilt | 10 ++++++++++ install-win32/makeopenvpn | 18 +++++++++++------- install-win32/settings.in | 5 +++++ 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 install-win32/getprebuilt (limited to 'install-win32') 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" -- cgit v1.2.3