aboutsummaryrefslogtreecommitdiff
path: root/install-win32/maketap
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-02-01 10:13:59 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-02-01 10:13:59 +0000
commit63082c8a210741e2c390f78669009697128cfe30 (patch)
tree0df33f1061a4cb681804f9d77fb0493d0578b5c0 /install-win32/maketap
parentVersion 2.1_rc7 (diff)
downloadopenvpn-63082c8a210741e2c390f78669009697128cfe30.tar.xz
Changes to Windows build system to make it easier to do
partial builds, where only a subset of OpenVPN installer components are built. See ./domake-win comments. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2710 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--install-win32/maketap40
-rw-r--r--install-win32/maketapinstall28
2 files changed, 68 insertions, 0 deletions
diff --git a/install-win32/maketap b/install-win32/maketap
index 7fe643c..ef9db13 100644
--- a/install-win32/maketap
+++ b/install-win32/maketap
@@ -6,9 +6,20 @@
# get version.nsi definitions
. autodefs/defs.sh
+if [ -d "/c/WINDDK/$DDKVER" ] ; then
+
# common declarations for all DDK build targets
. install-win32/ddk-common
+# configure tap driver sources
+MACRO="perl install-win32/macro.pl autodefs/defs.in"
+IFDEF="perl install-win32/ifdef.pl"
+rm -rf tap-win32/amd64
+mkdir tap-win32/amd64
+$MACRO <tap-win32/SOURCES.in >tap-win32/SOURCES
+$MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF >tap-win32/i386/OemWin2k.inf
+$MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF -DAMD64 >tap-win32/amd64/OemWin2k.inf
+
if [ -n "$PRODUCT_TAP_DEBUG" ] ; then
w2ktarget="w2k c"
amdtarget="chk $x64_tag WNET"
@@ -57,4 +68,33 @@ if [ -z "$DRVBINSRC" ] ; then
out="TAP driver catalog file is undefined";
echo "$out" >$x86/$PRODUCT_TAP_ID.cat
echo "$out" >$x64/$PRODUCT_TAP_ID.cat
+ cd ..
+fi
+
+# $DRVBINSRC, if defined, points to prebuilt TAP driver and
+# tapinstall.exe.
+mkdir $GENOUT &>/dev/null
+rm -rf $GENOUT/driver
+if [ -z "$DRVBINSRC" ] ; then
+ # Get TAP drivers
+ cp -a tap-win32/dist $GENOUT/driver
+
+ # Sign TAP drivers
+ if [ -d "$SIGNTOOL" ]; then
+ $SIGNTOOL/signtap
+ fi
+else
+ cp -a $DRVBINSRC/driver $GENOUT/driver
+fi
+
+# $DRVBINDEST, if defined, points to a destination directory
+# where TAP driver and tapinstall.exe will be saved, to be used
+# as a $DRVBINSRC in future builds.
+if [ -n "$DRVBINDEST" ] ; then
+ mkdir $DRVBINDEST &>/dev/null
+ cp -a $GENOUT/driver $DRVBINDEST
+fi
+
+else
+ echo Not building TAP driver -- DDK version $DDKVER NOT INSTALLED
fi
diff --git a/install-win32/maketapinstall b/install-win32/maketapinstall
index 8b06a99..a5aaf47 100644
--- a/install-win32/maketapinstall
+++ b/install-win32/maketapinstall
@@ -8,6 +8,8 @@
# get version.nsi definitions
. autodefs/defs.sh
+if [ -d "/c/WINDDK/$DDKVER" ] ; then
+
if ! [ -d "$TISRC" ] ; then
echo "$TISRC" NOT INSTALLED
exit 1
@@ -46,4 +48,30 @@ if [ -n "$TI_BIN_AMD64" ]; then
cp "$TI_BIN_AMD64" $t/objfre_wnet_amd64/amd64
fi
+# $DRVBINSRC, if defined, points to prebuilt TAP driver and
+# tapinstall.exe.
+if [ -z "$DRVBINSRC" ] ; then
+ # Get tapinstall
+ mkdir -p $GENOUT/tapinstall/i386 &>/dev/null
+ mkdir -p $GENOUT/tapinstall/amd64 &>/dev/null
+ cp tapinstall/objfre_w2k_x86/i386/tapinstall.exe $GENOUT/tapinstall/i386
+ cp tapinstall/objfre_wnet_amd64/amd64/tapinstall.exe $GENOUT/tapinstall/amd64
+else
+ mkdir $GENOUT &>/dev/null
+ cp -a $DRVBINSRC/tapinstall $GENOUT/tapinstall
+fi
+
+# $DRVBINDEST, if defined, points to a destination directory
+# where TAP driver and tapinstall.exe will be saved, to be used
+# as a $DRVBINSRC in future builds.
+if [ -n "$DRVBINDEST" ] ; then
+ mkdir $DRVBINDEST &>/dev/null
+ cp -a $GENOUT/driver $DRVBINDEST
+ cp -a $GENOUT/tapinstall $DRVBINDEST
+fi
+
title openvpn-build &>/dev/null
+
+else
+ echo Not building tapinstall -- DDK version $DDKVER NOT INSTALLED
+fi