Skip to content

Commit

Permalink
More VS2022 build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmiller-nmap committed Jul 11, 2024
1 parent c505524 commit 13994dd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
14 changes: 8 additions & 6 deletions installer/Build.bat
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
SET NPCAPDIR=".."
SET MODE="Release"
rem SET MODE="Debug"
SET VSVER=17

::::::::::
for /f "usebackq delims=#" %%a in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 16 -property installationPath`) do call "%%a\VC\Auxiliary\Build\vcvarsall.bat" x86
for /f "usebackq delims=#" %%a in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version %VSVER% -property installationPath`) do call "%%a\VC\Auxiliary\Build\vcvarsall.bat" x86 & goto :break1
:break1
if %ERRORLEVEL% NEQ 0 goto :badenv

msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE%" /p:Platform="x86"
msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE% Win8 driver" /p:Platform="x86"
msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE% Win10 driver" /p:Platform="x86"
msbuild "%NPCAPDIR%\wpcap\build-win32\wpcap.vcxproj" /m /t:Build /p:Configuration="%MODE%" /p:Platform="Win32"

for /f "usebackq delims=#" %%a in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 16 -property installationPath`) do call "%%a\VC\Auxiliary\Build\vcvarsall.bat" x64
for /f "usebackq delims=#" %%a in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version %VSVER% -property installationPath`) do call "%%a\VC\Auxiliary\Build\vcvarsall.bat" x64 & goto :break2
:break2
if %ERRORLEVEL% NEQ 0 goto :badenv

msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE%" /p:Platform="x64"
msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE% Win8 driver" /p:Platform="x64"
msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE% Win10 driver" /p:Platform="x64"
msbuild "%NPCAPDIR%\wpcap\build-x64\wpcap.vcxproj" /m /t:Build /p:Configuration="%MODE%" /p:Platform="x64"

for /f "usebackq delims=#" %%a in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version 16 -property installationPath`) do call "%%a\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
for /f "usebackq delims=#" %%a in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -version %VSVER% -property installationPath`) do call "%%a\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64 & goto :break3
:break3
if %ERRORLEVEL% NEQ 0 goto :badenv

msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE%" /p:Platform="ARM64"
rem ARM64 is only supported for Win10, so we do not have separate Win8/Win10 driver configurations for this platform
msbuild "%NPCAPDIR%\packetWin7\vs14\npcap.sln" /m /t:Build /p:Configuration="%MODE% Win10 driver" /p:Platform="ARM64"
msbuild "%NPCAPDIR%\wpcap\build-ARM64\wpcap.vcxproj" /m /t:Build /p:Configuration="%MODE%" /p:Platform="ARM64"

exit /b
Expand Down
4 changes: 1 addition & 3 deletions packetWin7/npf/npf Package/npf Package.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@
</PropertyGroup>
<PropertyGroup Label="Globals">
<RootNamespace>npf_Package</RootNamespace>
<VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VisualStudioVersion)' == '11.0'">$(VCTargetsPath11)</VCTargetsPath>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Label="PropertySheets">
<ConfigurationType>Utility</ConfigurationType>
Expand Down Expand Up @@ -1222,4 +1220,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
14 changes: 7 additions & 7 deletions packetWin7/vs14/npcap.sln
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ Global
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win8 driver|x86.ActiveCfg = Win8 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win8 driver|x86.Build.0 = Win8 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win8 driver|x86.Deploy.0 = Win8 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|ARM64.ActiveCfg = Win7 OEM RO Release|ARM64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|x64.ActiveCfg = Win7 OEM RO Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|x64.Build.0 = Win7 OEM RO Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|x64.Deploy.0 = Win7 OEM RO Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|x86.ActiveCfg = Win7 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|x86.Build.0 = Win7 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release|x86.Deploy.0 = Win7 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|ARM64.ActiveCfg = Win7 OEM RO Release|ARM64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|x64.ActiveCfg = Win7 OEM RO Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|x64.Build.0 = Win7 OEM RO Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|x64.Deploy.0 = Win7 OEM RO Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|x86.ActiveCfg = Win7 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|x86.Build.0 = Win7 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.OEM RO Release Win7 driver|x86.Deploy.0 = Win7 OEM RO Release|Win32
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.Release No AirPcap|ARM64.ActiveCfg = Win7 Release|ARM64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.Release No AirPcap|x64.ActiveCfg = Win7 Release|x64
{1A6BC1F1-F16A-4653-B787-FAF5A0E50229}.Release No AirPcap|x86.ActiveCfg = Win7 Release|Win32
Expand Down

0 comments on commit 13994dd

Please sign in to comment.