a4d39450 |
#!/bin/sh
# Build the x86 and x64 versions of the tapinstall tool |
0039dd40 |
# Requires the Windows DDK.
# TISRC should be set to directory containing
# tapinstall source code. |
a4d39450 |
# get version.nsi definitions |
1568d7f4 |
. autodefs/defs.sh |
a4d39450 |
|
9ff2821b |
if [ -n "$DDKVER" ] && [ -d "/c/WINDDK/$DDKVER" ] ; then |
63082c8a |
|
d710d36d |
if ! [ -d "$TISRC" ] ; then
echo "$TISRC" NOT INSTALLED
exit 1
fi
|
44b3dcc8 |
# common declarations for all DDK build targets
. install-win32/ddk-common
|
d710d36d |
amdtarget=""
if [ -z "$TI_BIN_AMD64" ]; then |
44b3dcc8 |
amdtarget="fre $x64_tag WNET" |
d710d36d |
fi
|
0039dd40 |
if [ -z "$DRVBINSRC" ] ; then
rm -rf tapinstall
cp -a "$TISRC" tapinstall |
a4d39450 |
|
52d84f6e |
if [ -e tapinstall/sources.in ]; then
perl install-win32/ifdef.pl autodefs/defs.in <tapinstall/sources.in >tapinstall/sources
fi
|
0039dd40 |
cd tapinstall
t=`pwd`
cd .. |
a4d39450 |
|
35a3c167 |
for mode in "w2k f" "$amdtarget"; do |
d710d36d |
if [ -n "$mode" ]; then
echo '**********' build TAPINSTALL $mode
cmd //c "C:\\WINDDK\\$DDKVER\\bin\\setenv.bat C:\\WINDDK\\$DDKVER $mode && cd `perl install-win32/dosname.pl $t` && build -cef"
fi |
0039dd40 |
done
fi |
d710d36d |
if [ -n "$TI_BIN_AMD64" ]; then
mkdir -p $t/objfre_wnet_amd64/amd64
cp "$TI_BIN_AMD64" $t/objfre_wnet_amd64/amd64
fi |
35a3c167 |
|
63082c8a |
# $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
|
1568d7f4 |
title openvpn-build &>/dev/null |
63082c8a |
else |
5449d743 |
echo Not building tapinstall -- DDK version $DDKVER NOT BUILT |
63082c8a |
fi |