]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Updated build system and tap driver to work with
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 19 Apr 2007 10:20:57 +0000 (10:20 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 19 Apr 2007 10:20:57 +0000 (10:20 +0000)
version 5600 of the Windows DDK.

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1851 e7ae566f-a301-0410-adde-c780ea21d3b5

domake-win
install-win32/copyinstaller
install-win32/makebin
install-win32/maketap
install-win32/maketapinstall
install-win32/version.nsi
tap-win32/SOURCES.in
tap-win32/prototypes.h
tap-win32/tapdrvr.c

index 52239468c0f7c96d41e7ff4e0c105f5328665bb7..a4d606901654b4db2e80e467a0a219ce710345b9 100644 (file)
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+# make without signing:
+#  SIGNCODE="null" ./domake-win
+
 install-win32/winconfig
 install-win32/makeopenvpn
 install-win32/maketapinstall
index f5279cafbbb455adcfefe0e92e2546fcfdccb5fb..96c213d8bd5a102b63c065c1811bbcef34137b7d 100644 (file)
@@ -5,9 +5,7 @@
 # load version.nsi definitions
 . autodefs/nsidefs.sh
 
-if [ -n "$INSTALLER_DEST" ] ; then
-    cd install-win32
-    ls openvpn*.exe 2>/dev/null || exit 1
-    exe=`ls -t openvpn*.exe | head -n 1`
-    cp $exe $INSTALLER_DEST
-fi
+cd install-win32
+ls openvpn*.exe 2>/dev/null || exit 1
+exe=`ls -t openvpn*.exe | head -n 1`
+cp $exe ..
index 671fb3bdab6baecb2c0fea349e0cbee59d2d762c..66691a94382071b2852606691b8de6f6d9feba89 100644 (file)
@@ -32,8 +32,8 @@ if [ -z "$DRVBINSRC" ] ; then
     mkdir bin/tapinstall
     mkdir bin/tapinstall/i386
     mkdir bin/tapinstall/amd64
-    cp tapinstall/objfre_wnet_x86/i386/tapinstall.exe bin/tapinstall/i386
-    cp tapinstall/objfre_wnet_amd64/amd64/tapinstall.exe bin/tapinstall/amd64
+    cp tapinstall/objfre_w2k_x86/i386/tapinstall.exe bin/tapinstall/i386
+    cp tapinstall/objfre_wlh_amd64/amd64/tapinstall.exe bin/tapinstall/amd64
 else
     cp -a $DRVBINSRC/driver bin/driver
     cp -a $DRVBINSRC/tapinstall bin/tapinstall
index cd89eea76c53b8396623748dfad3c882368a383e..728bb854f2ee09fdef5cbbb94584c7613f9842b8 100644 (file)
@@ -8,7 +8,7 @@
 
 amdtarget=""
 if [ -z "$TAP_BIN_AMD64" ]; then
-    amdtarget="fre AMD64 WNET"
+    amdtarget="fre AMD64 WLH"
 fi
 
 if [ -z "$DRVBINSRC" ] ; then
@@ -16,7 +16,7 @@ if [ -z "$DRVBINSRC" ] ; then
     t=`pwd`
     cd ..
 
-    for mode in "fre WNET" "$amdtarget"; do
+    for mode in "w2k f" "$amdtarget"; do
        echo '**********' build TAP $mode
        cmd //c "C:\\WINDDK\\$DDKVER\\bin\\setenv.bat C:\\WINDDK\\$DDKVER $mode && cd `perl install-win32/dosname.pl $t` && build -cef"
     done
@@ -26,3 +26,5 @@ if [ -n "$TAP_BIN_AMD64" ]; then
     mkdir -p $t/amd64
     cp "$TAP_BIN_AMD64" $t/amd64
 fi
+
+title openvpn &>/dev/null
index 5229a897fc47c5e9246ed0db309c96911e81ee6c..72b81b7819ca88fa095570cc7f8054b950a44cb6 100644 (file)
@@ -15,7 +15,7 @@ fi
 
 amdtarget=""
 if [ -z "$TI_BIN_AMD64" ]; then
-    amdtarget="fre AMD64 WNET"
+    amdtarget="fre AMD64 WLH"
 fi
 
 if [ -z "$DRVBINSRC" ] ; then
@@ -26,7 +26,7 @@ if [ -z "$DRVBINSRC" ] ; then
     t=`pwd`
     cd ..
 
-    for mode in "fre WNET" "$amdtarget"; do
+    for mode in "w2k f" "$amdtarget"; do
        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"
@@ -38,3 +38,5 @@ if [ -n "$TI_BIN_AMD64" ]; then
     mkdir -p $t/objfre_wnet_amd64/amd64
     cp "$TI_BIN_AMD64" $t/objfre_wnet_amd64/amd64
 fi
+
+title openvpn &>/dev/null
index 3004aa40f2c9c8ad41318ce97d459eff64e4cf27..9e9d4e2d48b3c8eac78f26103746a9f4637229f8 100644 (file)
@@ -1,11 +1,11 @@
 # Version numbers, settings, and dependencies
 # for Windows OpenVPN installer.
 
-!define PRODUCT_VERSION "2.1_rc2c"
+!define PRODUCT_VERSION "2.1_rc2d"
 
 # For now, use prebuilt AMD64 tap/tapinstall
-!define TAP_BIN_AMD64 "../amd64/tap/tap0901.sys"
-!define TI_BIN_AMD64  "../amd64/tapinstall/tapinstall.exe"
+#!define TAP_BIN_AMD64 "../amd64/tap/tap0901.sys"
+#!define TI_BIN_AMD64  "../amd64/tapinstall/tapinstall.exe"
 
 # Copy installer to this directory when finished.
 # If undefined, don't copy installer after generation.
@@ -32,8 +32,8 @@
 
 # TAP Adapter parameters.
 !define PRODUCT_TAP_MAJOR_VER       9
-!define PRODUCT_TAP_MINOR_VER       2
-!define PRODUCT_TAP_RELDATE         "03/05/2007"
+!define PRODUCT_TAP_MINOR_VER       3
+!define PRODUCT_TAP_RELDATE         "04/18/2007"
 
 # Service template files service.[ch] (get from Platform SDK).
 # If undefined, don't build openvpnserv.exe
@@ -42,7 +42,7 @@
 # DDK Version.
 # DDK distribution is assumed to be in C:\WINDDK\${DDKVER}
 # Not needed if DRVBINSRC is defined.
-!define DDKVER "3790"
+!define DDKVER 5600
 
 # Code Signing.
 # This directory should contain signcode.exe + key files.
index 63479a01ad01a6c9ab0715a7ea546128b2958526..d64829dbcc272713e517fb87da766f709a5efc88 100755 (executable)
@@ -17,13 +17,6 @@ C_DEFINES=
 C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MAJOR_VERSION=@@PRODUCT_TAP_MAJOR_VER@@
 C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MINOR_VERSION=@@PRODUCT_TAP_MINOR_VER@@
 
-# Use 00:FF:XX:XX:XX:XX format MAC addresses where
-# the Xs are random (like Linux tap driver).
-#
-# Don't allow TAP device to be opened by more than one process
-# at a time.
-C_DEFINES=$(C_DEFINES)
-
 # Produce the same symbolic information for both free & checked builds.
 # This will allow us to perform full source-level debugging on both
 # builds without affecting the free build's performance.
@@ -63,8 +56,8 @@ MSC_OPTIMIZATION=/Od /Oi /Fc
 LINKER_FLAGS=$(LINKER_FLAGS) /MAP /MAPINFO:EXPORTS /MAPINFO:LINES
 
 # Generate a browser information file for use in IDE development
-BROWSER_INFO=1
-BROWSERFILE=$(TARGETNAME).BSC -n
+#BROWSER_INFO=1
+#BROWSERFILE=$(TARGETNAME).BSC -n
 
 # Abort compilation on warnings.
 MSC_WARNING_LEVEL=/W3 /WX
index 2bd996169431f373eddaba900946a8d4c58d9e7b..788670c1ee77e9509651b1e9db4fe555fd1bb1f6 100755 (executable)
@@ -187,6 +187,7 @@ VOID HookDispatchFunctions();
 
 #if ENABLE_NONADMIN
 
+#if DDKVER < 5600
 /*
  * Better solution for use on Vista DDK, but possibly not compatible with
  * earlier DDKs:
@@ -216,6 +217,8 @@ ZwSetSecurityObject (
   IN SECURITY_INFORMATION  SecurityInformation,
   IN PSECURITY_DESCRIPTOR  SecurityDescriptor);
 
+#endif
+
 VOID AllowNonAdmin (TapExtensionPointer p_Extension);
 
 #endif
index 3d3c2245c14acb2546864caac3f180136297f124..7e8d2d605f8c2b4af86af0050c7519cf9ef96315 100755 (executable)
 // TAP_IOCTL_CONFIG_TUN ioctl.
 //======================================================
 
+#include "../../autodefs/nsidefs.h"
+#ifndef DDKVER
+#error DDKVER must be defined to the DDK Version as in c:\WinDDK\[DDKVER]\...
+#endif
+
 #define NDIS_MINIPORT_DRIVER
 #define BINARY_COMPATIBLE 0
 #define NDIS50_MINIPORT 1
 //========================================================
 #define ENABLE_NONADMIN 1         // JYFIXME
 
+#if DDKVER < 5600
 #include <ndis.h>
 #include <ntstrsafe.h>
 #include <ntddk.h>
+#else
+#include <ntifs.h>
+#include <ndis.h>
+#include <ntstrsafe.h>
+#endif
 
 #include "lock.h"
 #include "constants.h"
@@ -408,6 +419,7 @@ NDIS_STATUS AdapterCreate
                }
            }
        } else {
+#if DDKVER < 5600
          /* "MiniportName" is available only XP and above.  Not on Windows 2000. */
          NDIS_STRING key = NDIS_STRING_CONST("NdisVersion");
          NdisReadConfiguration (&status, &parm, configHandle, &key, NdisParameterInteger);
@@ -428,7 +440,8 @@ NDIS_STATUS AdapterCreate
                    }
                }
            }
-       }
+#endif
+      }
     }
 
     /* Can't continue without name (see macro 'NAME') */