git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2710 e7ae566f-a301-0410-adde-c780ea21d3b5
| ... | ... |
@@ -35,19 +35,48 @@ |
| 35 | 35 |
# |
| 36 | 36 |
# ../svc-template -- This directory should contain service.[ch] |
| 37 | 37 |
# from the MS Platform SDK. |
| 38 |
-# |
|
| 39 |
-# Example usage: |
|
| 40 |
-# |
|
| 41 |
-# build everything, then write installer to desktop |
|
| 42 |
-# INSTALLER_DEST="/c/Documents and Settings/James/Desktop" ./domake-win |
|
| 43 | 38 |
|
| 39 |
+# Note that all variables referenced here such as GENOUT and CLEAN |
|
| 40 |
+# are defined in install-win32/settings.in |
|
| 41 |
+ |
|
| 42 |
+# First build the autodefs directory, with C, sh, and NSIS versions |
|
| 43 |
+# of global settings, using install-win32/settings.in as source. |
|
| 44 |
+# These settings will then drive the rest of the build process. |
|
| 44 | 45 |
install-win32/winconfig |
| 46 |
+ |
|
| 47 |
+# Delete the GENOUT directory if CLEAN="yes" |
|
| 48 |
+install-win32/doclean |
|
| 49 |
+ |
|
| 50 |
+# Each of the scripts below build, get, and/or possibly sign a different |
|
| 51 |
+# OpenVPN component, placing the generated files in GENOUT. Each of these |
|
| 52 |
+# steps is fully indepedent, and can be executed in any order or omitted. |
|
| 53 |
+# The exception is the last script which gathers together all files from |
|
| 54 |
+# GENOUT and build the installer. |
|
| 55 |
+ |
|
| 56 |
+# Make the OpenVPN user-space component (openvpn.exe) |
|
| 45 | 57 |
install-win32/makeopenvpn |
| 46 |
-install-win32/maketapinstall |
|
| 58 |
+ |
|
| 59 |
+# Make the OpenVPN service |
|
| 60 |
+install-win32/makeservice |
|
| 61 |
+ |
|
| 62 |
+# Make the OpenVPN TAP driver |
|
| 47 | 63 |
install-win32/maketap |
| 48 |
-install-win32/signtap |
|
| 49 |
-install-win32/makebin |
|
| 64 |
+ |
|
| 65 |
+# Make the tapinstall utility, used to install the TAP driver |
|
| 66 |
+install-win32/maketapinstall |
|
| 67 |
+ |
|
| 68 |
+# Get the OpenSSL libraries from a pre-build OpenSSL tree |
|
| 69 |
+install-win32/getopenssl |
|
| 70 |
+ |
|
| 71 |
+# Get the PKCS-11 helper library from a pre-built OpenSSL tree |
|
| 72 |
+install-win32/getpkcs11helper |
|
| 73 |
+ |
|
| 74 |
+# Get the OpenVPN GUI (must be prebuilt) |
|
| 50 | 75 |
install-win32/getgui |
| 76 |
+ |
|
| 77 |
+# Produce the license text, install README, and sample config files |
|
| 78 |
+install-win32/maketext |
|
| 79 |
+ |
|
| 80 |
+# This final step builds the OpenVPN installer using generated |
|
| 81 |
+# files from GENOUT |
|
| 51 | 82 |
install-win32/buildinstaller |
| 52 |
-install-win32/signinstaller |
|
| 53 |
-install-win32/copyinstaller |
| ... | ... |
@@ -1,8 +1,22 @@ |
| 1 | 1 |
#!/bin/sh |
| 2 | 2 |
|
| 3 |
-# build the installer |
|
| 3 |
+# load version.nsi definitions |
|
| 4 |
+. autodefs/defs.sh |
|
| 4 | 5 |
|
| 6 |
+# build the installer |
|
| 5 | 7 |
cd install-win32 |
| 6 | 8 |
rm -f *.exe |
| 7 | 9 |
'/c/Program Files/NSIS/makensis' openvpn.nsi &>makensis.log |
| 8 | 10 |
tail -20 makensis.log |
| 11 |
+ |
|
| 12 |
+# copy the installer to GENOUT/install |
|
| 13 |
+ls openvpn*.exe 2>/dev/null || exit 1 |
|
| 14 |
+i=`ls -t openvpn*.exe | head -n 1` |
|
| 15 |
+cd .. |
|
| 16 |
+mkdir $GENOUT/install &>/dev/null |
|
| 17 |
+cp install-win32/$i $GENOUT/install |
|
| 18 |
+ |
|
| 19 |
+# sign the installer |
|
| 20 |
+if [ -d "$SIGNTOOL" ]; then |
|
| 21 |
+ TARGET_EXE="$(pwd)/$GENOUT/install/$i" $SIGNTOOL/signexe |
|
| 22 |
+fi |
| 9 | 23 |
deleted file mode 100644 |
| ... | ... |
@@ -1,15 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
- |
|
| 3 |
-# copy the installer to the $INSTALLER_DEST directory. |
|
| 4 |
- |
|
| 5 |
-# load version.nsi definitions |
|
| 6 |
-. autodefs/defs.sh |
|
| 7 |
- |
|
| 8 |
-if [ -n "$INSTALLER_DEST" ] ; then |
|
| 9 |
- cd install-win32 |
|
| 10 |
- ls openvpn*.exe 2>/dev/null || exit 1 |
|
| 11 |
- exe=install-win32/`ls -t openvpn*.exe | head -n 1` |
|
| 12 |
- cd .. |
|
| 13 |
- echo cp $exe "$INSTALLER_DEST" |
|
| 14 |
- cp $exe "$INSTALLER_DEST" |
|
| 15 |
-fi |
| ... | ... |
@@ -2,19 +2,17 @@ |
| 2 | 2 |
|
| 3 | 3 |
# Get and sign the OpenVPN GUI |
| 4 | 4 |
|
| 5 |
-c=`pwd` |
|
| 6 |
- |
|
| 7 | 5 |
# load version.nsi definitions |
| 8 | 6 |
. autodefs/defs.sh |
| 9 | 7 |
|
| 10 | 8 |
GUI="$OPENVPN_GUI_DIR/$OPENVPN_GUI" |
| 11 | 9 |
|
| 12 | 10 |
if [ -e "$GUI" ]; then |
| 13 |
- cp $GUI bin |
|
| 11 |
+ mkdir -p $GENOUT/bin &>/dev/null |
|
| 12 |
+ cp $GUI $GENOUT/bin |
|
| 14 | 13 |
echo '!define OPENVPN_GUI_DEFINED' >autodefs/guidefs.nsi |
| 15 | 14 |
if [ -d "$SIGNTOOL" ]; then |
| 16 |
- export TARGET_EXE="bin/$OPENVPN_GUI" |
|
| 17 |
- $SIGNTOOL/signexe |
|
| 15 |
+ TARGET_EXE="$GENOUT/bin/$OPENVPN_GUI" $SIGNTOOL/signexe |
|
| 18 | 16 |
fi |
| 19 | 17 |
else |
| 20 | 18 |
cat /dev/null >autodefs/guidefs.nsi |
| 21 | 19 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,17 @@ |
| 0 |
+#!/bin/sh |
|
| 1 |
+ |
|
| 2 |
+# get version.nsi definitions |
|
| 3 |
+. autodefs/defs.sh |
|
| 4 |
+ |
|
| 5 |
+# Get OpenSSL binaries |
|
| 6 |
+if [ -d "$OPENSSL_DIR" ] ; then |
|
| 7 |
+ mkdir -p $GENOUT/lib &>/dev/null |
|
| 8 |
+ mkdir -p $GENOUT/bin &>/dev/null |
|
| 9 |
+ for f in libeay32.dll libssl32.dll openssl.exe ; do |
|
| 10 |
+ cp $OPENSSL_DIR/$f $GENOUT/lib |
|
| 11 |
+ strip $GENOUT/lib/$f |
|
| 12 |
+ done |
|
| 13 |
+ mv $GENOUT/lib/openssl.exe $GENOUT/bin |
|
| 14 |
+else |
|
| 15 |
+ echo OpenSSL DIR $OPENSSL_DIR NOT FOUND |
|
| 16 |
+fi |
| 0 | 17 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,15 @@ |
| 0 |
+#!/bin/sh |
|
| 1 |
+ |
|
| 2 |
+# get version.nsi definitions |
|
| 3 |
+. autodefs/defs.sh |
|
| 4 |
+ |
|
| 5 |
+# Get PKCS11-helper libraries |
|
| 6 |
+if [ -d "$PKCS11_HELPER_DIR" ] ; then |
|
| 7 |
+ mkdir -p $GENOUT/lib &>/dev/null |
|
| 8 |
+ for f in libpkcs11-helper-1.dll ; do |
|
| 9 |
+ cp $PKCS11_HELPER_DIR/bin/$f $GENOUT/lib |
|
| 10 |
+ strip $GENOUT/lib/$f |
|
| 11 |
+ done |
|
| 12 |
+else |
|
| 13 |
+ echo PKCS11-helper DIR $PKCS11_HELPER_DIR NOT FOUND |
|
| 14 |
+fi |
| 0 | 15 |
deleted file mode 100644 |
| ... | ... |
@@ -1,56 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
- |
|
| 3 |
-# Assemble binaries into bin |
|
| 4 |
- |
|
| 5 |
-# get version.nsi definitions |
|
| 6 |
-. autodefs/defs.sh |
|
| 7 |
- |
|
| 8 |
-rm -rf bin |
|
| 9 |
-mkdir bin |
|
| 10 |
- |
|
| 11 |
-# Get OpenVPN executable |
|
| 12 |
-cp $PRODUCT_UNIX_NAME.exe bin |
|
| 13 |
-strip bin/$PRODUCT_UNIX_NAME.exe |
|
| 14 |
- |
|
| 15 |
-# Get OpenVPN service |
|
| 16 |
-cp service-win32/${PRODUCT_UNIX_NAME}serv.exe bin
|
|
| 17 |
-strip bin/${PRODUCT_UNIX_NAME}serv.exe
|
|
| 18 |
- |
|
| 19 |
-# Get OpenSSL binaries |
|
| 20 |
-for f in libeay32.dll libssl32.dll openssl.exe ; do |
|
| 21 |
- cp $OPENSSL_DIR/$f bin |
|
| 22 |
- strip bin/$f |
|
| 23 |
-done |
|
| 24 |
- |
|
| 25 |
-# Get PKCS11 libraries |
|
| 26 |
-for f in libpkcs11-helper-1.dll ; do |
|
| 27 |
- cp $PKCS11_HELPER_DIR/bin/$f bin |
|
| 28 |
- strip bin/$f |
|
| 29 |
-done |
|
| 30 |
- |
|
| 31 |
-# $DRVBINSRC, if defined, points to prebuilt TAP driver and |
|
| 32 |
-# tapinstall.exe. |
|
| 33 |
-if [ -z "$DRVBINSRC" ] ; then |
|
| 34 |
- # Get TAP drivers |
|
| 35 |
- cp -a tap-win32/dist bin/driver |
|
| 36 |
- |
|
| 37 |
- # Get tapinstall |
|
| 38 |
- mkdir bin/tapinstall |
|
| 39 |
- mkdir bin/tapinstall/i386 |
|
| 40 |
- mkdir bin/tapinstall/amd64 |
|
| 41 |
- cp tapinstall/objfre_w2k_x86/i386/tapinstall.exe bin/tapinstall/i386 |
|
| 42 |
- cp tapinstall/objfre_wnet_amd64/amd64/tapinstall.exe bin/tapinstall/amd64 |
|
| 43 |
-else |
|
| 44 |
- cp -a $DRVBINSRC/driver bin/driver |
|
| 45 |
- cp -a $DRVBINSRC/tapinstall bin/tapinstall |
|
| 46 |
-fi |
|
| 47 |
- |
|
| 48 |
-# $DRVBINDEST, if defined, points to a destination directory |
|
| 49 |
-# where TAP driver and tapinstall.exe will be saved, to be used |
|
| 50 |
-# as a $DRVBINSRC in future builds. |
|
| 51 |
-if [ -n "$DRVBINDEST" ] ; then |
|
| 52 |
- rm -rf $DRVBINDEST |
|
| 53 |
- mkdir $DRVBINDEST |
|
| 54 |
- cp -a bin/driver $DRVBINDEST |
|
| 55 |
- cp -a bin/tapinstall $DRVBINDEST |
|
| 56 |
-fi |
| ... | ... |
@@ -4,13 +4,10 @@ |
| 4 | 4 |
. autodefs/defs.sh |
| 5 | 5 |
|
| 6 | 6 |
# build OpenVPN binary |
| 7 |
-[ "$MAKE_CLEAN" = "yes" ] && make -f makefile.w32 clean |
|
| 7 |
+[ "$CLEAN" = "yes" ] && make -f makefile.w32 clean |
|
| 8 | 8 |
make -f makefile.w32 -j $MAKE_JOBS |
| 9 | 9 |
|
| 10 |
-# build OpenVPN service (openvpnserv.exe) |
|
| 11 |
-if [ -n "$SVC_TEMPLATE" ] ; then |
|
| 12 |
- cd service-win32 |
|
| 13 |
- [ "$MAKE_CLEAN" = "yes" ] && make clean |
|
| 14 |
- make -j $MAKE_JOBS |
|
| 15 |
- cd .. |
|
| 16 |
-fi |
|
| 10 |
+# copy OpenVPN executable to GENOUT/bin |
|
| 11 |
+mkdir -p $GENOUT/bin &>/dev/null |
|
| 12 |
+cp $PRODUCT_UNIX_NAME.exe $GENOUT/bin |
|
| 13 |
+strip $GENOUT/bin/$PRODUCT_UNIX_NAME.exe |
| 17 | 14 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,30 @@ |
| 0 |
+#!/bin/sh |
|
| 1 |
+ |
|
| 2 |
+# get version.nsi definitions |
|
| 3 |
+. autodefs/defs.sh |
|
| 4 |
+ |
|
| 5 |
+# build OpenVPN service (openvpnserv.exe) |
|
| 6 |
+if [ -d "$SVC_TEMPLATE" ] ; then |
|
| 7 |
+ # silly vista security theatre |
|
| 8 |
+ PATCH="/tmp/p.exe" |
|
| 9 |
+ cp `which patch` $PATCH |
|
| 10 |
+ |
|
| 11 |
+ # build service sources |
|
| 12 |
+ cp $SVC_TEMPLATE/service.[ch] service-win32 |
|
| 13 |
+ cd service-win32 |
|
| 14 |
+ cp service.c service.c.orig |
|
| 15 |
+ cp service.h service.h.orig |
|
| 16 |
+ $PATCH <service.patch |
|
| 17 |
+ |
|
| 18 |
+ # compile/link |
|
| 19 |
+ [ "$CLEAN" = "yes" ] && make clean |
|
| 20 |
+ make -j $MAKE_JOBS |
|
| 21 |
+ cd .. |
|
| 22 |
+ |
|
| 23 |
+ # copy service to GENOUT/bin |
|
| 24 |
+ mkdir $GENOUT/bin &>/dev/null |
|
| 25 |
+ cp service-win32/${PRODUCT_UNIX_NAME}serv.exe $GENOUT/bin
|
|
| 26 |
+ strip $GENOUT/bin/${PRODUCT_UNIX_NAME}serv.exe
|
|
| 27 |
+else |
|
| 28 |
+ echo OpenVPN service template directory $SVC_TEMPLATE NOT FOUND |
|
| 29 |
+fi |
| ... | ... |
@@ -6,9 +6,20 @@ |
| 6 | 6 |
# get version.nsi definitions |
| 7 | 7 |
. autodefs/defs.sh |
| 8 | 8 |
|
| 9 |
+if [ -d "/c/WINDDK/$DDKVER" ] ; then |
|
| 10 |
+ |
|
| 9 | 11 |
# common declarations for all DDK build targets |
| 10 | 12 |
. install-win32/ddk-common |
| 11 | 13 |
|
| 14 |
+# configure tap driver sources |
|
| 15 |
+MACRO="perl install-win32/macro.pl autodefs/defs.in" |
|
| 16 |
+IFDEF="perl install-win32/ifdef.pl" |
|
| 17 |
+rm -rf tap-win32/amd64 |
|
| 18 |
+mkdir tap-win32/amd64 |
|
| 19 |
+$MACRO <tap-win32/SOURCES.in >tap-win32/SOURCES |
|
| 20 |
+$MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF >tap-win32/i386/OemWin2k.inf |
|
| 21 |
+$MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF -DAMD64 >tap-win32/amd64/OemWin2k.inf |
|
| 22 |
+ |
|
| 12 | 23 |
if [ -n "$PRODUCT_TAP_DEBUG" ] ; then |
| 13 | 24 |
w2ktarget="w2k c" |
| 14 | 25 |
amdtarget="chk $x64_tag WNET" |
| ... | ... |
@@ -57,4 +68,33 @@ if [ -z "$DRVBINSRC" ] ; then |
| 57 | 57 |
out="TAP driver catalog file is undefined"; |
| 58 | 58 |
echo "$out" >$x86/$PRODUCT_TAP_ID.cat |
| 59 | 59 |
echo "$out" >$x64/$PRODUCT_TAP_ID.cat |
| 60 |
+ cd .. |
|
| 61 |
+fi |
|
| 62 |
+ |
|
| 63 |
+# $DRVBINSRC, if defined, points to prebuilt TAP driver and |
|
| 64 |
+# tapinstall.exe. |
|
| 65 |
+mkdir $GENOUT &>/dev/null |
|
| 66 |
+rm -rf $GENOUT/driver |
|
| 67 |
+if [ -z "$DRVBINSRC" ] ; then |
|
| 68 |
+ # Get TAP drivers |
|
| 69 |
+ cp -a tap-win32/dist $GENOUT/driver |
|
| 70 |
+ |
|
| 71 |
+ # Sign TAP drivers |
|
| 72 |
+ if [ -d "$SIGNTOOL" ]; then |
|
| 73 |
+ $SIGNTOOL/signtap |
|
| 74 |
+ fi |
|
| 75 |
+else |
|
| 76 |
+ cp -a $DRVBINSRC/driver $GENOUT/driver |
|
| 77 |
+fi |
|
| 78 |
+ |
|
| 79 |
+# $DRVBINDEST, if defined, points to a destination directory |
|
| 80 |
+# where TAP driver and tapinstall.exe will be saved, to be used |
|
| 81 |
+# as a $DRVBINSRC in future builds. |
|
| 82 |
+if [ -n "$DRVBINDEST" ] ; then |
|
| 83 |
+ mkdir $DRVBINDEST &>/dev/null |
|
| 84 |
+ cp -a $GENOUT/driver $DRVBINDEST |
|
| 85 |
+fi |
|
| 86 |
+ |
|
| 87 |
+else |
|
| 88 |
+ echo Not building TAP driver -- DDK version $DDKVER NOT INSTALLED |
|
| 60 | 89 |
fi |
| ... | ... |
@@ -8,6 +8,8 @@ |
| 8 | 8 |
# get version.nsi definitions |
| 9 | 9 |
. autodefs/defs.sh |
| 10 | 10 |
|
| 11 |
+if [ -d "/c/WINDDK/$DDKVER" ] ; then |
|
| 12 |
+ |
|
| 11 | 13 |
if ! [ -d "$TISRC" ] ; then |
| 12 | 14 |
echo "$TISRC" NOT INSTALLED |
| 13 | 15 |
exit 1 |
| ... | ... |
@@ -46,4 +48,30 @@ if [ -n "$TI_BIN_AMD64" ]; then |
| 46 | 46 |
cp "$TI_BIN_AMD64" $t/objfre_wnet_amd64/amd64 |
| 47 | 47 |
fi |
| 48 | 48 |
|
| 49 |
+# $DRVBINSRC, if defined, points to prebuilt TAP driver and |
|
| 50 |
+# tapinstall.exe. |
|
| 51 |
+if [ -z "$DRVBINSRC" ] ; then |
|
| 52 |
+ # Get tapinstall |
|
| 53 |
+ mkdir -p $GENOUT/tapinstall/i386 &>/dev/null |
|
| 54 |
+ mkdir -p $GENOUT/tapinstall/amd64 &>/dev/null |
|
| 55 |
+ cp tapinstall/objfre_w2k_x86/i386/tapinstall.exe $GENOUT/tapinstall/i386 |
|
| 56 |
+ cp tapinstall/objfre_wnet_amd64/amd64/tapinstall.exe $GENOUT/tapinstall/amd64 |
|
| 57 |
+else |
|
| 58 |
+ mkdir $GENOUT &>/dev/null |
|
| 59 |
+ cp -a $DRVBINSRC/tapinstall $GENOUT/tapinstall |
|
| 60 |
+fi |
|
| 61 |
+ |
|
| 62 |
+# $DRVBINDEST, if defined, points to a destination directory |
|
| 63 |
+# where TAP driver and tapinstall.exe will be saved, to be used |
|
| 64 |
+# as a $DRVBINSRC in future builds. |
|
| 65 |
+if [ -n "$DRVBINDEST" ] ; then |
|
| 66 |
+ mkdir $DRVBINDEST &>/dev/null |
|
| 67 |
+ cp -a $GENOUT/driver $DRVBINDEST |
|
| 68 |
+ cp -a $GENOUT/tapinstall $DRVBINDEST |
|
| 69 |
+fi |
|
| 70 |
+ |
|
| 49 | 71 |
title openvpn-build &>/dev/null |
| 72 |
+ |
|
| 73 |
+else |
|
| 74 |
+ echo Not building tapinstall -- DDK version $DDKVER NOT INSTALLED |
|
| 75 |
+fi |
| 50 | 76 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,20 @@ |
| 0 |
+#!/bin/sh |
|
| 1 |
+ |
|
| 2 |
+# get version.nsi definitions |
|
| 3 |
+. autodefs/defs.sh |
|
| 4 |
+ |
|
| 5 |
+mkdir -p $GENOUT/text &>/dev/null |
|
| 6 |
+ |
|
| 7 |
+# build license file |
|
| 8 |
+cat COPYING COPYRIGHT.GPL >$GENOUT/text/license.txt |
|
| 9 |
+ |
|
| 10 |
+# copy install file |
|
| 11 |
+cp INSTALL-win32.txt $GENOUT/text/install-win32.txt |
|
| 12 |
+ |
|
| 13 |
+# copy sample configuration files and docs |
|
| 14 |
+s=$GENOUT/samples |
|
| 15 |
+mkdir -p $s &>/dev/null |
|
| 16 |
+cp sample-config-files/client.conf $s/client.$PRODUCT_FILE_EXT |
|
| 17 |
+cp sample-config-files/server.conf $s/server.$PRODUCT_FILE_EXT |
|
| 18 |
+cp install-win32/sample.ovpn $s/sample.$PRODUCT_FILE_EXT |
|
| 19 |
+cp easy-rsa/1.0/openssl.cnf $s/openssl.cnf.sample |
| ... | ... |
@@ -15,7 +15,9 @@ |
| 15 | 15 |
!include "setpath.nsi" |
| 16 | 16 |
!include "GetWindowsVersion.nsi" |
| 17 | 17 |
|
| 18 |
-!define BIN "${HOME}\bin"
|
|
| 18 |
+!define GEN "${HOME}\${GENOUT}"
|
|
| 19 |
+!define BIN "${GEN}\bin"
|
|
| 20 |
+!define LIB "${GEN}\lib"
|
|
| 19 | 21 |
|
| 20 | 22 |
!define PRODUCT_ICON "icon.ico" |
| 21 | 23 |
|
| ... | ... |
@@ -75,7 +77,7 @@ |
| 75 | 75 |
!define MUI_UNFINISHPAGE_NOAUTOCLOSE |
| 76 | 76 |
|
| 77 | 77 |
!insertmacro MUI_PAGE_WELCOME |
| 78 |
- !insertmacro MUI_PAGE_LICENSE "${HOME}\install-win32\license.txt"
|
|
| 78 |
+ !insertmacro MUI_PAGE_LICENSE "${GEN}\text\license.txt"
|
|
| 79 | 79 |
!insertmacro MUI_PAGE_COMPONENTS |
| 80 | 80 |
!insertmacro MUI_PAGE_DIRECTORY |
| 81 | 81 |
!insertmacro MUI_PAGE_INSTFILES |
| ... | ... |
@@ -250,7 +252,7 @@ Section "${PRODUCT_NAME} RSA Certificate Management Scripts" SecOpenVPNEasyRSA
|
| 250 | 250 |
SetOverwrite on |
| 251 | 251 |
SetOutPath "$INSTDIR\easy-rsa" |
| 252 | 252 |
|
| 253 |
- File "${HOME}\samples\openssl.cnf.sample"
|
|
| 253 |
+ File "${GEN}\samples\openssl.cnf.sample"
|
|
| 254 | 254 |
File "${HOME}\easy-rsa\Windows\vars.bat.sample"
|
| 255 | 255 |
|
| 256 | 256 |
File "${HOME}\easy-rsa\Windows\init-config.bat"
|
| ... | ... |
@@ -286,9 +288,9 @@ Section "${PRODUCT_NAME} Service" SecService
|
| 286 | 286 |
FileClose $R0 |
| 287 | 287 |
|
| 288 | 288 |
SetOutPath "$INSTDIR\sample-config" |
| 289 |
- File "${HOME}\samples\sample.${SERV_CONFIG_EXT}"
|
|
| 290 |
- File "${HOME}\samples\client.${SERV_CONFIG_EXT}"
|
|
| 291 |
- File "${HOME}\samples\server.${SERV_CONFIG_EXT}"
|
|
| 289 |
+ File "${GEN}\samples\sample.${SERV_CONFIG_EXT}"
|
|
| 290 |
+ File "${GEN}\samples\client.${SERV_CONFIG_EXT}"
|
|
| 291 |
+ File "${GEN}\samples\server.${SERV_CONFIG_EXT}"
|
|
| 292 | 292 |
|
| 293 | 293 |
CreateDirectory "$INSTDIR\log" |
| 294 | 294 |
FileOpen $R0 "$INSTDIR\log\README.txt" w |
| ... | ... |
@@ -305,8 +307,8 @@ Section "OpenSSL DLLs" SecOpenSSLDLLs |
| 305 | 305 |
|
| 306 | 306 |
SetOverwrite on |
| 307 | 307 |
SetOutPath "$INSTDIR\bin" |
| 308 |
- File "${BIN}\libeay32.dll"
|
|
| 309 |
- File "${BIN}\libssl32.dll"
|
|
| 308 |
+ File "${LIB}\libeay32.dll"
|
|
| 309 |
+ File "${LIB}\libssl32.dll"
|
|
| 310 | 310 |
|
| 311 | 311 |
SectionEnd |
| 312 | 312 |
|
| ... | ... |
@@ -322,7 +324,7 @@ Section "PKCS#11 DLLs" SecPKCS11DLLs |
| 322 | 322 |
|
| 323 | 323 |
SetOverwrite on |
| 324 | 324 |
SetOutPath "$INSTDIR\bin" |
| 325 |
- File "${BIN}\libpkcs11-helper-1.dll"
|
|
| 325 |
+ File "${LIB}\libpkcs11-helper-1.dll"
|
|
| 326 | 326 |
|
| 327 | 327 |
SectionEnd |
| 328 | 328 |
|
| ... | ... |
@@ -354,13 +356,13 @@ Section "TAP-Win32 Virtual Ethernet Adapter" SecTAP |
| 354 | 354 |
|
| 355 | 355 |
SetOutPath "$INSTDIR\bin" |
| 356 | 356 |
|
| 357 |
- File "${BIN}\tapinstall\amd64\tapinstall.exe"
|
|
| 357 |
+ File "${GEN}\tapinstall\amd64\tapinstall.exe"
|
|
| 358 | 358 |
|
| 359 | 359 |
SetOutPath "$INSTDIR\driver" |
| 360 | 360 |
|
| 361 |
- File "${BIN}\driver\amd64\OemWin2k.inf"
|
|
| 362 |
- File "${BIN}\driver\amd64\${PRODUCT_TAP_ID}.cat"
|
|
| 363 |
- File "${BIN}\driver\amd64\${TAPDRV}"
|
|
| 361 |
+ File "${GEN}\driver\amd64\OemWin2k.inf"
|
|
| 362 |
+ File "${GEN}\driver\amd64\${PRODUCT_TAP_ID}.cat"
|
|
| 363 |
+ File "${GEN}\driver\amd64\${TAPDRV}"
|
|
| 364 | 364 |
|
| 365 | 365 |
goto tapend |
| 366 | 366 |
|
| ... | ... |
@@ -369,12 +371,12 @@ tap-32bit: |
| 369 | 369 |
DetailPrint "We are running on a 32-bit system." |
| 370 | 370 |
|
| 371 | 371 |
SetOutPath "$INSTDIR\bin" |
| 372 |
- File "${BIN}\tapinstall\i386\tapinstall.exe"
|
|
| 372 |
+ File "${GEN}\tapinstall\i386\tapinstall.exe"
|
|
| 373 | 373 |
|
| 374 | 374 |
SetOutPath "$INSTDIR\driver" |
| 375 |
- File "${BIN}\driver\i386\OemWin2k.inf"
|
|
| 376 |
- File "${BIN}\driver\i386\${PRODUCT_TAP_ID}.cat"
|
|
| 377 |
- File "${BIN}\driver\i386\${TAPDRV}"
|
|
| 375 |
+ File "${GEN}\driver\i386\OemWin2k.inf"
|
|
| 376 |
+ File "${GEN}\driver\i386\${PRODUCT_TAP_ID}.cat"
|
|
| 377 |
+ File "${GEN}\driver\i386\${TAPDRV}"
|
|
| 378 | 378 |
|
| 379 | 379 |
tapend: |
| 380 | 380 |
|
| ... | ... |
@@ -497,8 +499,8 @@ Section -post |
| 497 | 497 |
; Store README, license, icon |
| 498 | 498 |
SetOverwrite on |
| 499 | 499 |
SetOutPath $INSTDIR |
| 500 |
- File "${HOME}\install-win32\INSTALL-win32.txt"
|
|
| 501 |
- File "${HOME}\install-win32\license.txt"
|
|
| 500 |
+ File "${GEN}\text\INSTALL-win32.txt"
|
|
| 501 |
+ File "${GEN}\text\license.txt"
|
|
| 502 | 502 |
File "${HOME}\images\${PRODUCT_ICON}"
|
| 503 | 503 |
|
| 504 | 504 |
; store sample config files |
| ... | ... |
@@ -23,16 +23,6 @@ |
| 23 | 23 |
!define PKCS11_HELPER_DIR "../pkcs11-helper/usr/local" |
| 24 | 24 |
!define DMALLOC_DIR "../dmalloc-5.4.2" |
| 25 | 25 |
|
| 26 |
-# Write TAP driver and tapinstall.exe to this directory, |
|
| 27 |
-# to use as prebuilt binaries for future builds. May |
|
| 28 |
-# be undefined. |
|
| 29 |
-;!define DRVBINDEST "../tapbin" |
|
| 30 |
- |
|
| 31 |
-# Don't build TAP driver and tapinstall.exe -- instead get |
|
| 32 |
-# them as prebuilt binaries from this directory. May be |
|
| 33 |
-# undefined. |
|
| 34 |
-;!define DRVBINSRC "../tapbin" |
|
| 35 |
- |
|
| 36 | 26 |
# tapinstall.exe source code. |
| 37 | 27 |
# Not needed if DRVBINSRC is defined. |
| 38 | 28 |
!define TISRC "../tapinstall" |
| ... | ... |
@@ -71,8 +61,13 @@ |
| 71 | 71 |
# -j parameter passed to make |
| 72 | 72 |
!define MAKE_JOBS 2 |
| 73 | 73 |
|
| 74 |
-# do a make clean before make |
|
| 75 |
-!define MAKE_CLEAN "yes" |
|
| 74 |
+# output directory for built binaries |
|
| 75 |
+# and other generated files |
|
| 76 |
+!define GENOUT "gen" |
|
| 77 |
+ |
|
| 78 |
+# delete GENOUT directory before starting |
|
| 79 |
+# set to "yes" or "no" |
|
| 80 |
+!define CLEAN "yes" |
|
| 76 | 81 |
|
| 77 | 82 |
; DEBUGGING -- set to something like "-DBG2" |
| 78 | 83 |
!define OUTFILE_LABEL "" |
| 79 | 84 |
deleted file mode 100644 |
| ... | ... |
@@ -1,16 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
- |
|
| 3 |
-# Sign the installer. |
|
| 4 |
- |
|
| 5 |
-c=`pwd` |
|
| 6 |
- |
|
| 7 |
-# load version.nsi definitions |
|
| 8 |
-. autodefs/defs.sh |
|
| 9 |
- |
|
| 10 |
-if [ -d "$SIGNTOOL" ]; then |
|
| 11 |
- cd install-win32 |
|
| 12 |
- ls *.exe 2>/dev/null || exit 1 |
|
| 13 |
- export TARGET_EXE=$(pwd)/$(ls -t *.exe | head -n 1) |
|
| 14 |
- cd $c |
|
| 15 |
- $SIGNTOOL/signexe |
|
| 16 |
-fi |
| ... | ... |
@@ -3,54 +3,13 @@ |
| 3 | 3 |
# prepare files for building on Windows |
| 4 | 4 |
# run from top directory: install-win32/winconfig |
| 5 | 5 |
|
| 6 |
-c=`pwd` |
|
| 7 |
- |
|
| 8 | 6 |
rm -rf autodefs |
| 9 | 7 |
mkdir autodefs |
| 10 | 8 |
|
| 11 |
-MACRO="perl install-win32/macro.pl autodefs/defs.in" |
|
| 12 |
-IFDEF="perl install-win32/ifdef.pl" |
|
| 13 |
- |
|
| 14 |
-# silly vista security theatre |
|
| 15 |
-PATCH="/tmp/p.exe" |
|
| 16 |
-cp `which patch` $PATCH |
|
| 17 |
- |
|
| 18 | 9 |
# build multi-grammar definition files |
| 19 | 10 |
perl install-win32/m4todef.pl <version.m4 >autodefs/version.in |
| 20 | 11 |
for g in "h" "sh" "nsi" "in" ; do |
| 21 | 12 |
perl install-win32/trans.pl $g install-win32/settings.in >autodefs/defs.$g |
| 22 | 13 |
done |
| 23 | 14 |
|
| 24 |
-# load sh definitions |
|
| 25 |
-. autodefs/defs.sh |
|
| 26 |
- |
|
| 27 |
-# configure tap driver sources |
|
| 28 |
-rm -rf tap-win32/amd64 |
|
| 29 |
-mkdir tap-win32/amd64 |
|
| 30 |
-$MACRO <tap-win32/SOURCES.in >tap-win32/SOURCES |
|
| 31 |
-$MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF >tap-win32/i386/OemWin2k.inf |
|
| 32 |
-$MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF -DAMD64 >tap-win32/amd64/OemWin2k.inf |
|
| 33 |
- |
|
| 34 |
-# configure service |
|
| 35 |
-if [ -n "$SVC_TEMPLATE" ] ; then |
|
| 36 |
- cd $c |
|
| 37 |
- cp $SVC_TEMPLATE/service.[ch] service-win32 |
|
| 38 |
- cd service-win32 |
|
| 39 |
- cp service.c service.c.orig |
|
| 40 |
- cp service.h service.h.orig |
|
| 41 |
- $PATCH <service.patch |
|
| 42 |
-fi |
|
| 43 |
- |
|
| 44 |
-# build license file |
|
| 45 |
-cd $c |
|
| 46 |
-cat COPYING COPYRIGHT.GPL >install-win32/license.txt |
|
| 47 |
- |
|
| 48 |
-# copy sample configuration files and docs |
|
| 49 |
-s=samples |
|
| 50 |
-rm -rf $s |
|
| 51 |
-mkdir $s |
|
| 52 |
-cp sample-config-files/client.conf $s/client.$PRODUCT_FILE_EXT |
|
| 53 |
-cp sample-config-files/server.conf $s/server.$PRODUCT_FILE_EXT |
|
| 54 |
-cp install-win32/sample.ovpn $s/sample.$PRODUCT_FILE_EXT |
|
| 55 |
-cp easy-rsa/1.0/openssl.cnf $s/openssl.cnf.sample |
|
| 56 |
-cp INSTALL-win32.txt install-win32 |
|
| 15 |
+cat /dev/null >autodefs/guidefs.nsi |