From f9ad66c789308d99576ca5d28b1bedf973957ab2 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 6 Mar 2007 06:48:09 +0000 Subject: Changes to Windows build environment, to allow straightforward building directly from an svn checkout or export. install-win32/version.nsi contains high-level version info. The script install-win32/winconfig should be run initially to set up build configuration files. Then make can be executed as such: . autodefs/nsidefs.sh make -f makefile.w32 -j 2 git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1757 e7ae566f-a301-0410-adde-c780ea21d3b5 --- tap-win32/SOURCES | 72 ---------------- tap-win32/SOURCES.in | 72 ++++++++++++++++ tap-win32/amd64/OemWin2k.inf | 183 ----------------------------------------- tap-win32/amd64/tap.cat | 6 -- tap-win32/i386/OemWin2k.inf | 183 ----------------------------------------- tap-win32/i386/OemWin2k.inf.in | 183 +++++++++++++++++++++++++++++++++++++++++ tap-win32/i386/tap.cat | 6 -- tap-win32/inf64.patch | 14 ++++ 8 files changed, 269 insertions(+), 450 deletions(-) delete mode 100755 tap-win32/SOURCES create mode 100755 tap-win32/SOURCES.in delete mode 100755 tap-win32/amd64/OemWin2k.inf delete mode 100755 tap-win32/amd64/tap.cat delete mode 100755 tap-win32/i386/OemWin2k.inf create mode 100755 tap-win32/i386/OemWin2k.inf.in delete mode 100755 tap-win32/i386/tap.cat create mode 100644 tap-win32/inf64.patch (limited to 'tap-win32') diff --git a/tap-win32/SOURCES b/tap-win32/SOURCES deleted file mode 100755 index f3d9ce5..0000000 --- a/tap-win32/SOURCES +++ /dev/null @@ -1,72 +0,0 @@ -# Build TAP-Win32 driver. -# Build Command: build -cef - -MAJORCOMP=ntos -MINORCOMP=ndis - -TARGETNAME=tap0901 -TARGETTYPE=DRIVER -TARGETPATH=. -TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib $(DDK_LIB_PATH)\ntstrsafe.lib -INCLUDES=$(DDK_INCLUDE_PATH) - -# The TAP version numbers here must be >= -# TAP_WIN32_MIN_x values defined in -# config-win32.h -C_DEFINES= -C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MAJOR_VERSION=9 -C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MINOR_VERSION=2 - -# 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. -!IF "$(DDKBUILDENV)" != "chk" -NTDEBUGTYPE=both -USE_PDB=1 -!ELSE -NTDEBUGTYPE=both -USE_PDB=1 -!ENDIF - -# Set compiler optimizations: -# /Ox - Full optimization enabled -# /Os - favor speed over size when optimizing -# /Od - Disable all optimizations -# /Oi - Enable optimization for intrinsic functions -# /Fc - Generate mixed assembler/source code files -# -# For both checked and free builds, make sure that any intrinsic -# functions are compiled correctly. To do this, ensure that /Oi -# is selected for both free and checked builds. There is a bug in -# VC++ 6.0 (at least through SP4) where, if you specify any -# intrinsic functions in your code with "#pragma intrinsic" but -# you don't have the /Oi optimization enabled, neither a call -# to the function, nor the intrinsic inline version of the function -# will end up in your object code. This bug only applies to free -# builds, but just to be safe we'll make sure that the flag is -# enabled for all builds. - -!IF "$(DDKBUILDENV)" != "chk" -MSC_OPTIMIZATION=/Ox /Oi /Fc -!ELSE -MSC_OPTIMIZATION=/Od /Oi /Fc -!ENDIF - -# Generate a linker map file just in case we need one for debugging -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 - -# Abort compilation on warnings. -MSC_WARNING_LEVEL=/W3 /WX - -SOURCES=tapdrvr.c resource.rc diff --git a/tap-win32/SOURCES.in b/tap-win32/SOURCES.in new file mode 100755 index 0000000..63479a0 --- /dev/null +++ b/tap-win32/SOURCES.in @@ -0,0 +1,72 @@ +# Build TAP-Win32 driver. +# Build Command: build -cef + +MAJORCOMP=ntos +MINORCOMP=ndis + +TARGETNAME=tap0901 +TARGETTYPE=DRIVER +TARGETPATH=. +TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib $(DDK_LIB_PATH)\ntstrsafe.lib +INCLUDES=$(DDK_INCLUDE_PATH) + +# The TAP version numbers here must be >= +# TAP_WIN32_MIN_x values defined in +# config-win32.h +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. +!IF "$(DDKBUILDENV)" != "chk" +NTDEBUGTYPE=both +USE_PDB=1 +!ELSE +NTDEBUGTYPE=both +USE_PDB=1 +!ENDIF + +# Set compiler optimizations: +# /Ox - Full optimization enabled +# /Os - favor speed over size when optimizing +# /Od - Disable all optimizations +# /Oi - Enable optimization for intrinsic functions +# /Fc - Generate mixed assembler/source code files +# +# For both checked and free builds, make sure that any intrinsic +# functions are compiled correctly. To do this, ensure that /Oi +# is selected for both free and checked builds. There is a bug in +# VC++ 6.0 (at least through SP4) where, if you specify any +# intrinsic functions in your code with "#pragma intrinsic" but +# you don't have the /Oi optimization enabled, neither a call +# to the function, nor the intrinsic inline version of the function +# will end up in your object code. This bug only applies to free +# builds, but just to be safe we'll make sure that the flag is +# enabled for all builds. + +!IF "$(DDKBUILDENV)" != "chk" +MSC_OPTIMIZATION=/Ox /Oi /Fc +!ELSE +MSC_OPTIMIZATION=/Od /Oi /Fc +!ENDIF + +# Generate a linker map file just in case we need one for debugging +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 + +# Abort compilation on warnings. +MSC_WARNING_LEVEL=/W3 /WX + +SOURCES=tapdrvr.c resource.rc diff --git a/tap-win32/amd64/OemWin2k.inf b/tap-win32/amd64/OemWin2k.inf deleted file mode 100755 index 69f95c8..0000000 --- a/tap-win32/amd64/OemWin2k.inf +++ /dev/null @@ -1,183 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2006 OpenVPN Solutions LLC * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; SYNTAX CHECKER -; cd \WINDDK\3790\tools\chkinf -; chkinf c:\src\openvpn\tap-win32\i386\oemwin2k.inf -; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm - -; INSTALL/REMOVE DRIVER -; tapinstall install OemWin2k.inf TAP0901 -; tapinstall update OemWin2k.inf TAP0901 -; tapinstall remove TAP0901 - -;********************************************************* -; Note to Developers: -; -; If you are bundling the TAP-Win32 driver with your app, -; you should try to rename it in such a way that it will -; not collide with other instances of TAP-Win32 defined -; by other apps. Multiple versions of the TAP-Win32 -; driver, each installed by different apps, can coexist -; on the same machine if you follow these guidelines: -; -; (1) Rename all tapXXXX instances in this file to -; something different (use at least 5 characters -; for this name!) -; (2) Change the "!define TAP" definition in openvpn.nsi -; to match what you changed tapXXXX to. -; (3) Change TARGETNAME in SOURCES to match what you -; changed tapXXXX to. -; (4) Change TAP_COMPONENT_ID in common.h to match what -; you changed tapXXXX to. -; (5) Change SZDEPENDENCIES in service.h to match what -; you changed tapXXXX to. -; (6) Change DeviceDescription and Provider strings. -; (7) Change PRODUCT_STRING in constants.h to what you -; set DeviceDescription to. -; -;********************************************************* - -[Version] - Signature = "$Windows NT$" - CatalogFile = tap.cat - ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} - Provider = %Provider% - Class = Net - -; This version number should match the version -; number given in SOURCES. - DriverVer=03/05/2007,9.00.00.0002 - -[Strings] - DeviceDescription = "TAP-Win32 Adapter V9" - Provider = "TAP-Win32 Provider V9" - -;---------------------------------------------------------------- -; Manufacturer + Product Section (Done) -;---------------------------------------------------------------- -[Manufacturer] - %Provider% = tap0901, NTamd64 - -[tap0901.NTamd64] - %DeviceDescription% = tap0901.ndi, tap0901 - -;--------------------------------------------------------------- -; Driver Section (Done) -;--------------------------------------------------------------- - -;----------------- Characteristics ------------ -; NCF_PHYSICAL = 0x04 -; NCF_VIRTUAL = 0x01 -; NCF_SOFTWARE_ENUMERATED = 0x02 -; NCF_HIDDEN = 0x08 -; NCF_NO_SERVICE = 0x10 -; NCF_HAS_UI = 0x80 -;----------------- Characteristics ------------ - -[tap0901.ndi] - CopyFiles = tap0901.driver, tap0901.files - AddReg = tap0901.reg - AddReg = tap0901.params.reg - Characteristics = 0x81 - -[tap0901.ndi.Services] - AddService = tap0901, 2, tap0901.service - -[tap0901.reg] - HKR, Ndi, Service, 0, "tap0901" - HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" - HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" - HKR, , Manufacturer, 0, "%Provider%" - HKR, , ProductName, 0, "%DeviceDescription%" - -[tap0901.params.reg] - HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" - HKR, Ndi\params\MTU, Type, 0, "int" - HKR, Ndi\params\MTU, Default, 0, "1500" - HKR, Ndi\params\MTU, Optional, 0, "0" - HKR, Ndi\params\MTU, Min, 0, "100" - HKR, Ndi\params\MTU, Max, 0, "1500" - HKR, Ndi\params\MTU, Step, 0, "1" - HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" - HKR, Ndi\params\MediaStatus, Type, 0, "enum" - HKR, Ndi\params\MediaStatus, Default, 0, "0" - HKR, Ndi\params\MediaStatus, Optional, 0, "0" - HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" - HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" - HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" - HKR, Ndi\params\MAC, Type, 0, "edit" - HKR, Ndi\params\MAC, Optional, 0, "1" - HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" - HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" - HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" - HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" - HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" - HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" - -;---------------------------------------------------------------- -; Service Section -;---------------------------------------------------------------- - -;---------- Service Type ------------- -; SERVICE_KERNEL_DRIVER = 0x01 -; SERVICE_WIN32_OWN_PROCESS = 0x10 -;---------- Service Type ------------- - -;---------- Start Mode --------------- -; SERVICE_BOOT_START = 0x0 -; SERVICE_SYSTEM_START = 0x1 -; SERVICE_AUTO_START = 0x2 -; SERVICE_DEMAND_START = 0x3 -; SERVICE_DISABLED = 0x4 -;---------- Start Mode --------------- - -[tap0901.service] - DisplayName = %DeviceDescription% - ServiceType = 1 - StartType = 3 - ErrorControl = 1 - LoadOrderGroup = NDIS - ServiceBinary = %12%\tap0901.sys - -;----------------------------------------------------------------- -; File Installation -;----------------------------------------------------------------- - -;----------------- Copy Flags ------------ -; COPYFLG_NOSKIP = 0x02 -; COPYFLG_NOVERSIONCHECK = 0x04 -;----------------- Copy Flags ------------ - -; SourceDisksNames -; diskid = description[, [tagfile] [, , subdir]] -; 1 = "Intel Driver Disk 1",e100bex.sys,, - -[SourceDisksNames] - 1 = %DeviceDescription%, tap0901.sys - -; SourceDisksFiles -; filename_on_source = diskID[, [subdir][, size]] -; e100bex.sys = 1,, ; on distribution disk 1 - -[SourceDisksFiles] -tap0901.sys = 1 - -[DestinationDirs] - tap0901.files = 11 - tap0901.driver = 12 - -[tap0901.files] -; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK -; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -[tap0901.driver] - tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -;--------------------------------------------------------------- -; End -;--------------------------------------------------------------- diff --git a/tap-win32/amd64/tap.cat b/tap-win32/amd64/tap.cat deleted file mode 100755 index 4492fa2..0000000 --- a/tap-win32/amd64/tap.cat +++ /dev/null @@ -1,6 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2005 OpenVPN Solutions LLC * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** diff --git a/tap-win32/i386/OemWin2k.inf b/tap-win32/i386/OemWin2k.inf deleted file mode 100755 index 792cbb8..0000000 --- a/tap-win32/i386/OemWin2k.inf +++ /dev/null @@ -1,183 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2006 OpenVPN Solutions LLC * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; SYNTAX CHECKER -; cd \WINDDK\3790\tools\chkinf -; chkinf c:\src\openvpn\tap-win32\i386\oemwin2k.inf -; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm - -; INSTALL/REMOVE DRIVER -; tapinstall install OemWin2k.inf TAP0901 -; tapinstall update OemWin2k.inf TAP0901 -; tapinstall remove TAP0901 - -;********************************************************* -; Note to Developers: -; -; If you are bundling the TAP-Win32 driver with your app, -; you should try to rename it in such a way that it will -; not collide with other instances of TAP-Win32 defined -; by other apps. Multiple versions of the TAP-Win32 -; driver, each installed by different apps, can coexist -; on the same machine if you follow these guidelines: -; -; (1) Rename all tapXXXX instances in this file to -; something different (use at least 5 characters -; for this name!) -; (2) Change the "!define TAP" definition in openvpn.nsi -; to match what you changed tapXXXX to. -; (3) Change TARGETNAME in SOURCES to match what you -; changed tapXXXX to. -; (4) Change TAP_COMPONENT_ID in common.h to match what -; you changed tapXXXX to. -; (5) Change SZDEPENDENCIES in service.h to match what -; you changed tapXXXX to. -; (6) Change DeviceDescription and Provider strings. -; (7) Change PRODUCT_STRING in constants.h to what you -; set DeviceDescription to. -; -;********************************************************* - -[Version] - Signature = "$Windows NT$" - CatalogFile = tap.cat - ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} - Provider = %Provider% - Class = Net - -; This version number should match the version -; number given in SOURCES. - DriverVer=03/05/2007,9.00.00.0002 - -[Strings] - DeviceDescription = "TAP-Win32 Adapter V9" - Provider = "TAP-Win32 Provider V9" - -;---------------------------------------------------------------- -; Manufacturer + Product Section (Done) -;---------------------------------------------------------------- -[Manufacturer] - %Provider% = tap0901 - -[tap0901] - %DeviceDescription% = tap0901.ndi, tap0901 - -;--------------------------------------------------------------- -; Driver Section (Done) -;--------------------------------------------------------------- - -;----------------- Characteristics ------------ -; NCF_PHYSICAL = 0x04 -; NCF_VIRTUAL = 0x01 -; NCF_SOFTWARE_ENUMERATED = 0x02 -; NCF_HIDDEN = 0x08 -; NCF_NO_SERVICE = 0x10 -; NCF_HAS_UI = 0x80 -;----------------- Characteristics ------------ - -[tap0901.ndi] - CopyFiles = tap0901.driver, tap0901.files - AddReg = tap0901.reg - AddReg = tap0901.params.reg - Characteristics = 0x81 - -[tap0901.ndi.Services] - AddService = tap0901, 2, tap0901.service - -[tap0901.reg] - HKR, Ndi, Service, 0, "tap0901" - HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" - HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" - HKR, , Manufacturer, 0, "%Provider%" - HKR, , ProductName, 0, "%DeviceDescription%" - -[tap0901.params.reg] - HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" - HKR, Ndi\params\MTU, Type, 0, "int" - HKR, Ndi\params\MTU, Default, 0, "1500" - HKR, Ndi\params\MTU, Optional, 0, "0" - HKR, Ndi\params\MTU, Min, 0, "100" - HKR, Ndi\params\MTU, Max, 0, "1500" - HKR, Ndi\params\MTU, Step, 0, "1" - HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" - HKR, Ndi\params\MediaStatus, Type, 0, "enum" - HKR, Ndi\params\MediaStatus, Default, 0, "0" - HKR, Ndi\params\MediaStatus, Optional, 0, "0" - HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" - HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" - HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" - HKR, Ndi\params\MAC, Type, 0, "edit" - HKR, Ndi\params\MAC, Optional, 0, "1" - HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" - HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" - HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" - HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" - HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" - HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" - -;---------------------------------------------------------------- -; Service Section -;---------------------------------------------------------------- - -;---------- Service Type ------------- -; SERVICE_KERNEL_DRIVER = 0x01 -; SERVICE_WIN32_OWN_PROCESS = 0x10 -;---------- Service Type ------------- - -;---------- Start Mode --------------- -; SERVICE_BOOT_START = 0x0 -; SERVICE_SYSTEM_START = 0x1 -; SERVICE_AUTO_START = 0x2 -; SERVICE_DEMAND_START = 0x3 -; SERVICE_DISABLED = 0x4 -;---------- Start Mode --------------- - -[tap0901.service] - DisplayName = %DeviceDescription% - ServiceType = 1 - StartType = 3 - ErrorControl = 1 - LoadOrderGroup = NDIS - ServiceBinary = %12%\tap0901.sys - -;----------------------------------------------------------------- -; File Installation -;----------------------------------------------------------------- - -;----------------- Copy Flags ------------ -; COPYFLG_NOSKIP = 0x02 -; COPYFLG_NOVERSIONCHECK = 0x04 -;----------------- Copy Flags ------------ - -; SourceDisksNames -; diskid = description[, [tagfile] [, , subdir]] -; 1 = "Intel Driver Disk 1",e100bex.sys,, - -[SourceDisksNames] - 1 = %DeviceDescription%, tap0901.sys - -; SourceDisksFiles -; filename_on_source = diskID[, [subdir][, size]] -; e100bex.sys = 1,, ; on distribution disk 1 - -[SourceDisksFiles] -tap0901.sys = 1 - -[DestinationDirs] - tap0901.files = 11 - tap0901.driver = 12 - -[tap0901.files] -; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK -; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -[tap0901.driver] - tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK - -;--------------------------------------------------------------- -; End -;--------------------------------------------------------------- diff --git a/tap-win32/i386/OemWin2k.inf.in b/tap-win32/i386/OemWin2k.inf.in new file mode 100755 index 0000000..a5450ad --- /dev/null +++ b/tap-win32/i386/OemWin2k.inf.in @@ -0,0 +1,183 @@ +; **************************************************************************** +; * Copyright (C) 2002-2006 OpenVPN Solutions LLC * +; * This program is free software; you can redistribute it and/or modify * +; * it under the terms of the GNU General Public License version 2 * +; * as published by the Free Software Foundation. * +; **************************************************************************** + +; SYNTAX CHECKER +; cd \WINDDK\3790\tools\chkinf +; chkinf c:\src\openvpn\tap-win32\i386\oemwin2k.inf +; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm + +; INSTALL/REMOVE DRIVER +; tapinstall install OemWin2k.inf TAP0901 +; tapinstall update OemWin2k.inf TAP0901 +; tapinstall remove TAP0901 + +;********************************************************* +; Note to Developers: +; +; If you are bundling the TAP-Win32 driver with your app, +; you should try to rename it in such a way that it will +; not collide with other instances of TAP-Win32 defined +; by other apps. Multiple versions of the TAP-Win32 +; driver, each installed by different apps, can coexist +; on the same machine if you follow these guidelines: +; +; (1) Rename all tapXXXX instances in this file to +; something different (use at least 5 characters +; for this name!) +; (2) Change the "!define TAP" definition in openvpn.nsi +; to match what you changed tapXXXX to. +; (3) Change TARGETNAME in SOURCES to match what you +; changed tapXXXX to. +; (4) Change TAP_COMPONENT_ID in common.h to match what +; you changed tapXXXX to. +; (5) Change SZDEPENDENCIES in service.h to match what +; you changed tapXXXX to. +; (6) Change DeviceDescription and Provider strings. +; (7) Change PRODUCT_STRING in constants.h to what you +; set DeviceDescription to. +; +;********************************************************* + +[Version] + Signature = "$Windows NT$" + CatalogFile = tap.cat + ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} + Provider = %Provider% + Class = Net + +; This version number should match the version +; number given in SOURCES. + DriverVer=@@PRODUCT_TAP_RELDATE@@,@@PRODUCT_TAP_MAJOR_VER@@.00.00.@@PRODUCT_TAP_MINOR_VER@@ + +[Strings] + DeviceDescription = "TAP-Win32 Adapter V9" + Provider = "TAP-Win32 Provider V9" + +;---------------------------------------------------------------- +; Manufacturer + Product Section (Done) +;---------------------------------------------------------------- +[Manufacturer] + %Provider% = tap0901 + +[tap0901] + %DeviceDescription% = tap0901.ndi, tap0901 + +;--------------------------------------------------------------- +; Driver Section (Done) +;--------------------------------------------------------------- + +;----------------- Characteristics ------------ +; NCF_PHYSICAL = 0x04 +; NCF_VIRTUAL = 0x01 +; NCF_SOFTWARE_ENUMERATED = 0x02 +; NCF_HIDDEN = 0x08 +; NCF_NO_SERVICE = 0x10 +; NCF_HAS_UI = 0x80 +;----------------- Characteristics ------------ + +[tap0901.ndi] + CopyFiles = tap0901.driver, tap0901.files + AddReg = tap0901.reg + AddReg = tap0901.params.reg + Characteristics = 0x81 + +[tap0901.ndi.Services] + AddService = tap0901, 2, tap0901.service + +[tap0901.reg] + HKR, Ndi, Service, 0, "tap0901" + HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" + HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" + HKR, , Manufacturer, 0, "%Provider%" + HKR, , ProductName, 0, "%DeviceDescription%" + +[tap0901.params.reg] + HKR, Ndi\params\MTU, ParamDesc, 0, "MTU" + HKR, Ndi\params\MTU, Type, 0, "int" + HKR, Ndi\params\MTU, Default, 0, "1500" + HKR, Ndi\params\MTU, Optional, 0, "0" + HKR, Ndi\params\MTU, Min, 0, "100" + HKR, Ndi\params\MTU, Max, 0, "1500" + HKR, Ndi\params\MTU, Step, 0, "1" + HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status" + HKR, Ndi\params\MediaStatus, Type, 0, "enum" + HKR, Ndi\params\MediaStatus, Default, 0, "0" + HKR, Ndi\params\MediaStatus, Optional, 0, "0" + HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled" + HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected" + HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address" + HKR, Ndi\params\MAC, Type, 0, "edit" + HKR, Ndi\params\MAC, Optional, 0, "1" + HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access" + HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum" + HKR, Ndi\params\AllowNonAdmin, Default, 0, "1" + HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0" + HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed" + HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed" + +;---------------------------------------------------------------- +; Service Section +;---------------------------------------------------------------- + +;---------- Service Type ------------- +; SERVICE_KERNEL_DRIVER = 0x01 +; SERVICE_WIN32_OWN_PROCESS = 0x10 +;---------- Service Type ------------- + +;---------- Start Mode --------------- +; SERVICE_BOOT_START = 0x0 +; SERVICE_SYSTEM_START = 0x1 +; SERVICE_AUTO_START = 0x2 +; SERVICE_DEMAND_START = 0x3 +; SERVICE_DISABLED = 0x4 +;---------- Start Mode --------------- + +[tap0901.service] + DisplayName = %DeviceDescription% + ServiceType = 1 + StartType = 3 + ErrorControl = 1 + LoadOrderGroup = NDIS + ServiceBinary = %12%\tap0901.sys + +;----------------------------------------------------------------- +; File Installation +;----------------------------------------------------------------- + +;----------------- Copy Flags ------------ +; COPYFLG_NOSKIP = 0x02 +; COPYFLG_NOVERSIONCHECK = 0x04 +;----------------- Copy Flags ------------ + +; SourceDisksNames +; diskid = description[, [tagfile] [, , subdir]] +; 1 = "Intel Driver Disk 1",e100bex.sys,, + +[SourceDisksNames] + 1 = %DeviceDescription%, tap0901.sys + +; SourceDisksFiles +; filename_on_source = diskID[, [subdir][, size]] +; e100bex.sys = 1,, ; on distribution disk 1 + +[SourceDisksFiles] +tap0901.sys = 1 + +[DestinationDirs] + tap0901.files = 11 + tap0901.driver = 12 + +[tap0901.files] +; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK +; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK + +[tap0901.driver] + tap0901.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK + +;--------------------------------------------------------------- +; End +;--------------------------------------------------------------- diff --git a/tap-win32/i386/tap.cat b/tap-win32/i386/tap.cat deleted file mode 100755 index 4492fa2..0000000 --- a/tap-win32/i386/tap.cat +++ /dev/null @@ -1,6 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2005 OpenVPN Solutions LLC * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** diff --git a/tap-win32/inf64.patch b/tap-win32/inf64.patch new file mode 100644 index 0000000..a619a3e --- /dev/null +++ b/tap-win32/inf64.patch @@ -0,0 +1,14 @@ +--- i386/OemWin2k.inf Mon Mar 5 23:17:34 2007 ++++ amd64/OemWin2k.inf Mon Mar 5 23:17:35 2007 +@@ -61,9 +61,9 @@ + ; Manufacturer + Product Section (Done) + ;---------------------------------------------------------------- + [Manufacturer] +- %Provider% = tap0901 ++ %Provider% = tap0901, NTamd64 + +-[tap0901] ++[tap0901.NTamd64] + %DeviceDescription% = tap0901.ndi, tap0901 + + ;--------------------------------------------------------------- -- cgit v1.2.3