Driver: Separate builds for Windows 7 & 10.

This commit is contained in:
Nodir Temirkhodjaev 2021-09-01 12:03:20 +03:00
parent 6a4511274a
commit 27d55effba
10 changed files with 29 additions and 16 deletions

View File

@ -14,11 +14,11 @@
]
},
"${TARGET}/driver": {
"driver-x32 | Win7": [
"${BUILD}-driver/fortfw32.sys"
"driver-x32 | win7": [
"${BUILD}-driver-${CONFIG}/fortfw32.sys"
],
"driver-x64": [
"${BUILD}-driver/fortfw64.sys"
"${BUILD}-driver-${CONFIG}/fortfw64.sys"
],
"scripts": [
"${ROOT}/src/driver/scripts | *.bat *.lnk |"
@ -28,8 +28,8 @@
"qt": [
"${QTPATH}/plugins/platforms | qwindows.dll | *d.dll"
],
"qt-tls | Win10": [
"${QTPATH}/plugins/tls | schannelbackend.dll | *dd.dll"
"qt-tls | win10": [
"${QTPATH}/plugins/tls | qschannelbackend.dll | *dd.dll"
]
}
}

View File

@ -1 +1 @@
@%~dp0setup-deployment.bat -QtPath ".\build-qt\qtbase" -Config Win10
@%~dp0setup-deployment.bat -QtPath ".\build-qt\qtbase" -Config win10

View File

@ -1 +1 @@
@%~dp0setup-deployment.bat -QtPath ".\build-qt-win7\qtbase" -Config Win7
@%~dp0setup-deployment.bat -QtPath ".\build-qt-win7\qtbase" -Config win7

View File

@ -50,6 +50,7 @@ for ($i = 0; $i -lt $targetDirs.length; $i++) {
$file = $file -replace '\${BUILD}', "$BuildPath"
$file = $file -replace '\${ROOT}', "$RootPath"
$file = $file -replace '\${QTPATH}', "$QtPath"
$file = $file -replace '\${CONFIG}', "$Config"
if ($file.Contains('|')) {
$fileParts = $file.Split('|')

View File

@ -5,8 +5,11 @@
# define NDIS_WDM 1
# define NDIS630 1
# define WIN9X_COMPAT_SPINLOCK /* XXX: Support Windows 7: KeInitializeSpinLock() */
# define POOL_NX_OPTIN 1 /* Enhanced protection of NX pool */
# if defined(FORT_WIN7_COMPAT)
# define WIN9X_COMPAT_SPINLOCK /* XXX: Support Windows 7: KeInitializeSpinLock() */
# endif
# define POOL_NX_OPTIN 1 /* Enhanced protection of NX pool */
# include <wdm.h>
# include <fwpmk.h>

View File

@ -23,11 +23,12 @@
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<DefineConstants Condition="'$(Configuration)'=='Release'">$(DefineConstants);NDEBUG</DefineConstants>
<DefineConstants Condition="'$(Config)'=='win7'">$(DefineConstants);FORT_WIN7_COMPAT</DefineConstants>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration-Common">
<TargetVersion>WindowsV6.3</TargetVersion>
<KernelBufferOverflowLib>$(DDK_LIB_PATH)\BufferOverflowK.lib</KernelBufferOverflowLib>
<KernelBufferOverflowLib Condition="'$(Config)'=='win7'">$(DDK_LIB_PATH)\BufferOverflowK.lib</KernelBufferOverflowLib>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>WDM</DriverType>

View File

@ -0,0 +1 @@
@%~dp0msvcbuild.bat x64 win10

View File

@ -0,0 +1 @@
@%~dp0msvcbuild.bat Win32 win7

View File

@ -0,0 +1 @@
@%~dp0msvcbuild.bat x64 win7

View File

@ -6,15 +6,20 @@
@rem PLAT: x64, Win32
@set PLAT=%1
@if "%PLAT%"=="" PLAT=x64
@set OutDir=..\..\build-driver
@rem CONFIG: win7, win10
@set CONFIG=%2
@if "%CONFIG%"=="" PLAT=win10
@set OutDir=..\..\build-driver-%CONFIG%
@set IntDir=%OutDir%-%PLAT%
MSBuild fortdrv.vcxproj /p:OutDir=%OutDir%\;IntDir=%IntDir%\;Platform=%PLAT%
MSBuild fortdrv.vcxproj /p:OutDir=%OutDir%\;IntDir=%IntDir%\;Platform=%PLAT%;Config=%CONFIG%
@rem DumpBin /SYMBOLS %IntDir%\fortdrv.obj > symbols.txt
@rem DumpBin /SYMBOLS "%IntDir%\fortdrv.obj" > symbols.txt
@rd /S /Q %IntDir%
@rd /S /Q "%IntDir%"
@rd /S /Q %OutDir%\fortdrv
@del /Q %OutDir%\fortfw*.cer %OutDir%\fortfw*.pdb
@rd /S /Q "%OutDir%\fortdrv"
@del /Q "%OutDir%\fortfw*.cer" "%OutDir%\fortfw*.pdb"