Hi Alin, thanks for the review. Will send out an updated patch.
VER_TO_STR applied to both the FileVersion as well as ProductVersion entry in the "VarFileInfo" block. The FILEVERSION property does not require a string literal, so it gets generated fine. However, note that the FileVersion within the VarFileInfo block needs to be a string literal, and the value displayed in the properties page is coming from FILEVERSION and not FileVersion property. Did you mean something else? Thanks, Shashank ________________________________ From: Alin Serdean <[email protected]> Sent: Monday, May 15, 2017 1:50:09 PM To: Shashank Ram; [email protected] Subject: RE: [ovs-dev] [PATCH] datapath-windows: Set Version correctly for OVSExt 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: [email protected] [mailto:ovs-dev- > [email protected]] On Behalf Of Shashank Ram > Sent: Saturday, May 6, 2017 1:58 AM > To: [email protected] > 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 <[email protected]> > --- > 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 > [email protected] > https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwIFAg&c=uilaK90D4TOVoH58JNXRgQ&r=6OuVHk-mnufSWzkKa74UkQ&m=D1EihPvuo7Tzv-H7qs4AQsWnr76rYEo37u9eosxM018&s=C4qdE2qa6u84yrpjAhycOWRnBlD3kk19G5RmDHR7_p8&e= _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
