summaryrefslogtreecommitdiffstats
path: root/install-win32/signtap
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2007-03-07 07:08:49 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2007-03-07 07:08:49 +0000
commit0039dd40464ea8544022abb32e220224ab71d6e5 (patch)
treed58e23208cccfbd533be63864442bc86352d34d3 /install-win32/signtap
parent54e2ebca2443f830a675ee196cc5790c7124e207 (diff)
downloadopenvpn-0039dd40464ea8544022abb32e220224ab71d6e5.tar.gz
openvpn-0039dd40464ea8544022abb32e220224ab71d6e5.tar.xz
openvpn-0039dd40464ea8544022abb32e220224ab71d6e5.zip
Cleaned up Windows build scripts.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1763 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'install-win32/signtap')
-rw-r--r--install-win32/signtap83
1 files changed, 47 insertions, 36 deletions
diff --git a/install-win32/signtap b/install-win32/signtap
index 248c545..0dc3b05 100644
--- a/install-win32/signtap
+++ b/install-win32/signtap
@@ -2,42 +2,53 @@
# Sign the x86 and x64 versions of the TAP driver
-SIGN=../sign
-INF2CAT=../inf2cat
+# SIGNCODE should point to directory with signcode.exe and keys
+# INF2CAT should point to the MS inf2cat distribution
c=`pwd`
-# copy driver files into tap-win32/dist
-cd tap-win32
-rm -rf dist
-mkdir dist
-cd dist
-mkdir i386
-mkdir amd64
-cd i386
-x86=`pwd`
-cd ../amd64
-x64=`pwd`
-cd ../..
-cp i386/OemWin2k.inf $x86
-cp i386/*.sys $x86
-cp amd64/OemWin2k.inf $x64
-cp amd64/*.sys $x64
-cd $c
-
-cd $INF2CAT
-
-echo '******************' BUILD .cat FILE for x86
-cmd //c "inf2cat /driver:`perl $c/install-win32/dosname.pl $x86` /os:2000,XP_X86,Server2003_X86,Vista_X86"
-
-echo '******************' BUILD .cat FILE for x64
-cmd //c "inf2cat /driver:`perl $c/install-win32/dosname.pl $x64` /os:XP_X64,Server2003_X64,Vista_X64"
-
-cd $c
-cd $SIGN
-
-TS="http://timestamp.verisign.com/scripts/timstamp.dll"
-echo '******************' SIGN .cat FILE for x86
-./signcode -spc mycredentials.spc -v myprivatekey.pvk -a sha1 -n "OpenVPN TAP-Win32 Driver" -t $TS `perl $c/install-win32/dosname.pl $x86/tap.cat`
-echo '******************' SIGN .cat FILE for x64
-./signcode -spc mycredentials.spc -v myprivatekey.pvk -a sha1 -n "OpenVPN TAP-Win64 Driver" -t $TS `perl $c/install-win32/dosname.pl $x64/tap.cat`
+# load version.nsi definitions
+. autodefs/nsidefs.sh
+
+if [ -z "$DRVBINSRC" ] ; then
+ # copy driver files into tap-win32/dist
+ cd tap-win32
+ rm -rf dist
+ mkdir dist
+ cd dist
+ mkdir i386
+ mkdir amd64
+ cd i386
+ x86=`pwd`
+ cd ../amd64
+ x64=`pwd`
+ cd ../..
+ cp i386/OemWin2k.inf $x86
+ cp i386/*.sys $x86
+ cp amd64/OemWin2k.inf $x64
+ cp amd64/*.sys $x64
+ cd $c
+
+ if [ -n "$SIGNCODE" ] && [ -n "$INF2CAT" ] ; then
+ cd "$INF2CAT"
+
+ echo '******************' BUILD .cat FILE for x86
+ cmd //c "inf2cat /driver:`perl $c/install-win32/dosname.pl $x86` /os:2000,XP_X86,Server2003_X86,Vista_X86"
+
+ echo '******************' BUILD .cat FILE for x64
+ cmd //c "inf2cat /driver:`perl $c/install-win32/dosname.pl $x64` /os:XP_X64,Server2003_X64,Vista_X64"
+
+ cd $c
+ cd "$SIGNCODE"
+
+ TS="http://timestamp.verisign.com/scripts/timstamp.dll"
+ echo '******************' SIGNCODE .cat FILE for x86
+ ./signcode -spc mycredentials.spc -v myprivatekey.pvk -a sha1 -n "OpenVPN TAP-Win32 Driver" -t $TS `perl $c/install-win32/dosname.pl $x86/tap.cat`
+ echo '******************' SIGNCODE .cat FILE for x64
+ ./signcode -spc mycredentials.spc -v myprivatekey.pvk -a sha1 -n "OpenVPN TAP-Win64 Driver" -t $TS `perl $c/install-win32/dosname.pl $x64/tap.cat`
+ else
+ out="TAP driver catalog file is undefined";
+ echo "$out" >$x86/tap.cat
+ echo "$out" >$x64/tap.cat
+ fi
+fi