summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/ovsext.vcxproj
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2016-12-06 02:58:30 +0000
committerGurucharan Shetty <guru@ovn.org>2016-12-21 15:08:48 -0800
commitb61dd18bb69eb1897574f642777acfbbc16a6a5e (patch)
tree0425d8b2a53ed0a0f79e7910c3dcd40361c1c0b7 /datapath-windows/ovsext/ovsext.vcxproj
parentb4675b81a67be842a4b9dc19b7d0d43162bb5aa3 (diff)
downloadopenvswitch-b61dd18bb69eb1897574f642777acfbbc16a6a5e.tar.gz
datapath-windows: Force driver version to depend on a variable
The following components use Windows driver information: - System (inf file); used during device installation - Resource file (rc file); used by applications when looking over the driver file(sys) Currently we have the following for the driver version number: - (inf file) generated value from the build timestamp - (rc file) predefined value This patch forces both files to depend on a variable: '$(Version)'. This is a predefined variable from Visual Studio. To achieve the above we change the current project settings used by the 'stampinf' utility and we define a new preprocessor value named 'VersionWithCommas' (which is obtained by replacing all '.' with ',' from $(Version) ). Certain values from the resource file are expected to use ',' instead of '.' . The resource file has been updated to use the new values when generating information about the driver (sys). The variable '$(Version' can be changed from the command line via the 'msbuild' utility. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/ovsext.vcxproj')
-rw-r--r--datapath-windows/ovsext/ovsext.vcxproj19
1 files changed, 18 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index e311a097a..39b9f57c8 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -174,6 +174,18 @@
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">true</MultiProcessorCompilation>
<MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">true</MultiProcessorCompilation>
</ClCompile>
+ <Inf>
+ <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(Version)</TimeStamp>
+ </Inf>
+ <Inf>
+ <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">$(Version)</TimeStamp>
+ </Inf>
+ <Inf>
+ <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(Version)</TimeStamp>
+ </Inf>
+ <Inf>
+ <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">$(Version)</TimeStamp>
+ </Inf>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Actions.c" />
@@ -214,7 +226,12 @@
<ClCompile Include="Util.c" />
<ClCompile Include="Vport.c" />
<ClCompile Include="Vxlan.c" />
- <ResourceCompile Include="ovsext.rc" />
+ <ResourceCompile Include="ovsext.rc">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1;VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1;VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemGroup>
<ItemGroup>
<Inf Exclude="@(Inf)" Include="*.inf" />