vcxproj: swap configuration and platform subfolder hierarchy

This should allow wintun.dll to simplify referencing same configuration
but different platform wintun.dll for WoW64 support.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-10-16 11:14:51 +02:00 committed by Jason A. Donenfeld
parent d04721dee6
commit b79703bba8
5 changed files with 31 additions and 31 deletions

16
.gitignore vendored
View File

@ -4,14 +4,14 @@
# Build Output
/dist
/amd64/Debug
/amd64/Release
/arm/Debug
/arm/Release
/arm64/Debug
/arm64/Release
/x86/Debug
/x86/Release
/Debug/amd64
/Debug/arm
/Debug/arm64
/Debug/x86
/Release/amd64
/Release/arm
/Release/arm64
/Release/x86
# Static Driver Verifier Output
/sdv

View File

@ -134,8 +134,8 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>..\$(WintunPlatform)\$(Configuration)\</OutDir>
<IntDir>..\$(WintunPlatform)\$(Configuration)\$(ProjectName)-intermediate\</IntDir>
<OutDir>..\$(Configuration)\$(WintunPlatform)\</OutDir>
<IntDir>..\$(Configuration)\$(WintunPlatform)\$(ProjectName)-intermediate\</IntDir>
<TargetName>wintun</TargetName>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
@ -144,14 +144,14 @@
<ClCompile>
<PreprocessorDefinitions>_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64' Or '$(Configuration)|$(Platform)'=='Debug|ARM64'">HAVE_EV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('..\$(WintunPlatform)\$(Configuration)\whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('$(OutDir)whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\$(WintunPlatform)\$(Configuration);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\$(Configuration)\$(WintunPlatform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64' Or '$(Configuration)|$(Platform)'=='Debug|ARM64'">HAVE_EV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('..\$(WintunPlatform)\$(Configuration)\whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('$(OutDir)whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<AdditionalDependencies>Bcrypt.lib;Cfgmgr32.lib;Crypt32.lib;Iphlpapi.lib;newdev.lib;ntdll.lib;Setupapi.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>

View File

@ -110,8 +110,8 @@
<InstallerVersionMin Condition="'$(Platform)'=='ARM64'">500</InstallerVersionMin>
</PropertyGroup>
<PropertyGroup>
<OutDir>..\$(WintunPlatform)\$(Configuration)\</OutDir>
<IntDir>..\$(WintunPlatform)\$(Configuration)\$(ProjectName)-intermediate\</IntDir>
<OutDir>..\$(Configuration)\$(WintunPlatform)\</OutDir>
<IntDir>..\$(Configuration)\$(WintunPlatform)\$(ProjectName)-intermediate\</IntDir>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<LocalDebuggerCommand>rundll32.exe</LocalDebuggerCommand>
@ -122,8 +122,8 @@
<WixArch Condition="'$(Platform)'=='ARM64'">arm64</WixArch>
<WixCandleFlags>$(WixCandleFlags) -nologo -arch $(WixArch) -dWINTUN_PLATFORM=$(WintunPlatform) -dWINTUN_VERSION=$(WintunVersion) -dINSTALLER_VERSION_MIN=$(InstallerVersionMin) -sw1086</WixCandleFlags>
<WixLightFlags>$(WixLightFlags) -nologo -b output_dir="$(OutDir.TrimEnd('\'))" -spdb -sw1076 -sw1079</WixLightFlags>
<WixLightFlags Condition="'$(Platform)'=='x64'">$(WixLightFlags) -b output_dir_wow64="..\x86\$(Configuration)"</WixLightFlags>
<WixLightFlags Condition="'$(Platform)'=='ARM64'">$(WixLightFlags) -b output_dir_wow64="..\arm\$(Configuration)"</WixLightFlags>
<WixLightFlags Condition="'$(Platform)'=='x64'">$(WixLightFlags) -b output_dir_wow64="..\$(Configuration)\x86"</WixLightFlags>
<WixLightFlags Condition="'$(Platform)'=='ARM64'">$(WixLightFlags) -b output_dir_wow64="..\$(Configuration)\arm"</WixLightFlags>
<WixOutputPath>$(OutDir)</WixOutputPath>
<WixOutputName>wintun</WixOutputName>
<WixOutputExt>.msm</WixOutputExt>
@ -136,12 +136,12 @@
<ClCompile>
<PreprocessorDefinitions>_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64' Or '$(Configuration)'=='Debug'">HAVE_EV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('..\$(WintunPlatform)\$(Configuration)\whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('$(OutDir)whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>..\$(WintunPlatform)\$(Configuration);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\$(Configuration)\$(WintunPlatform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64' Or '$(Configuration)'=='Debug'">HAVE_EV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('..\$(WintunPlatform)\$(Configuration)\whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="Exists('$(OutDir)whql\')">HAVE_WHQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<ModuleDefinitionFile>exports.def</ModuleDefinitionFile>

View File

@ -15,10 +15,10 @@
<Target Name="Build" DependsOnTargets="Driver-x86;Driver-amd64;Driver-arm64" />
<Target Name="MSM" DependsOnTargets="MSM-x86;MSM-amd64;MSM-arm64" />
<Target Name="Clean">
<RemoveDir Directories="amd64\Release\" />
<RemoveDir Directories="arm\Release\" />
<RemoveDir Directories="arm64\Release\" />
<RemoveDir Directories="x86\Release\" />
<RemoveDir Directories="Release\amd64\" />
<RemoveDir Directories="Release\arm\" />
<RemoveDir Directories="Release\arm64\" />
<RemoveDir Directories="Release\x86\" />
<RemoveDir Directories="$(SDVDir)" />
<RemoveDir Directories="$(DistributionDir)" />
<Delete Files="smvbuild.log;smvstats.txt;wintun.DVL.XML" />
@ -33,17 +33,17 @@
<DriverInputs>atomic.h;undocumented.h;wintun.c;wintun.inf;wintun.props;wintun.rc;wintun.vcxproj;$(DriverInputs)</DriverInputs>
</PropertyGroup>
<Target Name="Driver-x86"
Outputs="x86\Release\wintun\wintun.sys;x86\Release\wintun\wintun.inf;x86\Release\wintun\wintun.cat"
Outputs="Release\x86\wintun\wintun.sys;Release\x86\wintun\wintun.inf;Release\x86\wintun\wintun.cat"
Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=Win32" />
</Target>
<Target Name="Driver-amd64"
Outputs="amd64\Release\wintun\wintun.sys;amd64\Release\wintun\wintun.inf;amd64\Release\wintun\wintun.cat"
Outputs="Release\amd64\wintun\wintun.sys;Release\amd64\wintun\wintun.inf;Release\amd64\wintun\wintun.cat"
Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=x64" />
</Target>
<Target Name="Driver-arm64"
Outputs="arm64\Release\wintun\wintun.sys;arm64\Release\wintun\wintun.inf;arm64\Release\wintun\wintun.cat"
Outputs="Release\arm64\wintun\wintun.sys;Release\arm64\wintun\wintun.inf;Release\arm64\wintun\wintun.cat"
Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=ARM64" />
</Target>
@ -51,7 +51,7 @@
<!--
Static Driver Verifier
-->
<Target Name="SDV" Outputs="$(SDVDir)SDV.DVL.xml;amd64\Release\vc.nativecodeanalysis.all.xml">
<Target Name="SDV" Outputs="$(SDVDir)SDV.DVL.xml;Release\amd64\vc.nativecodeanalysis.all.xml">
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/check:*;Configuration=Release;Platform=x64" />
</Target>
<Target Name="SDVView">
@ -63,7 +63,7 @@
-->
<Target Name="DVL" DependsOnTargets="SDV"
Outputs="wintun.DVL.XML"
Inputs="$(SDVDir)SDV.DVL.xml;amd64\Release\vc.nativecodeanalysis.all.xml">
Inputs="$(SDVDir)SDV.DVL.xml;Release\amd64\vc.nativecodeanalysis.all.xml">
<MSBuild Projects="wintun.vcxproj" Targets="dvl" Properties="Configuration=Release;Platform=x64" />
</Target>

View File

@ -106,8 +106,8 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>15.0.28127.55</_ProjectFileVersion>
<IntDir>$(WintunPlatform)\$(ConfigurationName)\</IntDir>
<OutDir>$(WintunPlatform)\$(ConfigurationName)\</OutDir>
<IntDir>$(ConfigurationName)\$(WintunPlatform)\</IntDir>
<OutDir>$(ConfigurationName)\$(WintunPlatform)\</OutDir>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">