Thanks a lot for the patch.

I had to double look the changes.

It may be worth adding to the commit message that this impacts the way the 
"ovsext.sys" product version will be generated.
At the moment, only the file version of the sys attributes will be generated 
correctly. The product version is being set to the text "Version".

Mind changing the commit message to "set product version correctly".

Also, a small nit you `VER_TO_STR` applied only on `ProductVersion`.

Alin.

> -----Original Message-----
> From: ovs-dev-boun...@openvswitch.org [mailto:ovs-dev-
> boun...@openvswitch.org] On Behalf Of Shashank Ram
> Sent: Saturday, May 6, 2017 1:58 AM
> To: d...@openvswitch.org
> Subject: [ovs-dev] [PATCH] datapath-windows: Set Version correctly for
> OVSExt
> 
> - Previously, the 'Version' property passed to MSBuild
>   was not being passed to the RcComplile section. To
>   use the value of 'Version' property in the rc file,
>   it needs to be passed.
> 
> - Adds a macro to convert the Version to a string literal.
>   Previously, the Version was simply being converted
>   to a literal text.
> 
> Signed-off-by: Shashank Ram <r...@vmware.com>
> ---
>  datapath-windows/ovsext/ovsext.rc      |  5 +++--
>  datapath-windows/ovsext/ovsext.vcxproj | 14 +++++++-------
>  2 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/datapath-windows/ovsext/ovsext.rc b/datapath-
> windows/ovsext/ovsext.rc
> index a7cf0a7..c5458ec 100644
> --- a/datapath-windows/ovsext/ovsext.rc
> +++ b/datapath-windows/ovsext/ovsext.rc
> @@ -9,6 +9,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
> #pragma code_page(1252)
> 
>  #define STR(x)                          #x
> +#define VER_TO_STR(v)                   STR(v)
>  /////////////////////////////////////////////////////////////////////////////
>  //
>  // Version
> @@ -33,12 +34,12 @@ BEGIN
>          BEGIN
>              VALUE "CompanyName", "The Linux Foundation (R)"
>              VALUE "FileDescription", "Open vSwitch Extension"
> -            VALUE "FileVersion", STR(Version)
> +            VALUE "FileVersion", VER_TO_STR(Version)
>              VALUE "InternalName", "OVSExt.SYS"
>              VALUE "LegalCopyright", "Licensed under the Apache License, 
> Version
> 2.0 (the ""License"")"
>              VALUE "OriginalFilename", "OVSExt.SYS"
>              VALUE "ProductName", "Open vSwitch"
> -            VALUE "ProductVersion", STR(Version)
> +            VALUE "ProductVersion", VER_TO_STR(Version)
>          END
>      END
>      BLOCK "VarFileInfo"
> diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-
> windows/ovsext/ovsext.vcxproj
> index da5a67a..cd7b436 100644
> --- a/datapath-windows/ovsext/ovsext.vcxproj
> +++ b/datapath-windows/ovsext/ovsext.vcxproj
> @@ -291,12 +291,12 @@
>      <ClCompile Include="Vport.c" />
>      <ClCompile Include="Vxlan.c" />
>      <ResourceCompile Include="ovsext.rc">
> -      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8
> Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1;Versio
> nWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
> -      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8
> Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1;Version
> WithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
> -      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8.1
> Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Versio
> nWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
> -      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8.1
> Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Version
> WithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
> -      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win10
> Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Versio
> nWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
> -      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win10
> Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Version
> WithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
> +      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8
> Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1;Versio
> n=$(Version);VersionWithCommas=$(Version.Replace('.',','))</Preprocessor
> Definitions>
> +      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8
> Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1;Version
> =$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorD
> efinitions>
> +      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8.1
> Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Versio
> n=$(Version);VersionWithCommas=$(Version.Replace('.',','))</Preprocessor
> Definitions>
> +      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win8.1
> Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Version
> =$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorD
> efinitions>
> +      <PreprocessorDefinitions
> Condition="'$(Configuration)|$(Platform)'=='Win10
> Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Versio
> n=$(Version);VersionWithCommas=$(Version.Replace('.',','))</Preprocessor
> Definitions>
> +      <PreprocessorDefinitions
> + Condition="'$(Configuration)|$(Platform)'=='Win10
> +
> Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;Version
> =$(
> + Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDe
> + finitions>
>      </ResourceCompile>
>    </ItemGroup>
>    <ItemGroup>
> @@ -309,4 +309,4 @@
>      <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
>    </ItemGroup>
>    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
> \ No newline at end of file
> +</Project>
> --
> 2.9.3.windows.2
> 
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to