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 'install-win32/maketap')
-rw-r--r--install-win32/maketap40
1 files changed, 40 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