Re: [PATCH qxl-wddm-dod v2 1/1] Configurable version information in binary and INF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Dmitry Fleytman <dmitry@xxxxxxxxxx>

> On 2 Nov 2016, at 02:26 AM, yuri.benditovich@xxxxxxxxxx wrote:
> 
> From: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx>
> 
> Version information in INF file is configured by
> environment variables.
> The same version information placed in driver binary.
> To set required version from external build engine,
> define following environment variables:
> VERSION_V1, VERSION_V2, VERSION_V3, VERSION_V4
> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx>
> ---
> qxldod/Version.props  | 33 +++++++++++++++++++++++++++++++++
> qxldod/qxldod.rc      | 23 +++++++++++++++++++++--
> qxldod/qxldod.vcxproj |  1 +
> 3 files changed, 55 insertions(+), 2 deletions(-)
> create mode 100644 qxldod/Version.props
> 
> diff --git a/qxldod/Version.props b/qxldod/Version.props
> new file mode 100644
> index 0000000..bdf02a9
> --- /dev/null
> +++ b/qxldod/Version.props
> @@ -0,0 +1,33 @@
> +<!--
> +***********************************************************************************************
> +Version.props
> +Version definitions used by the driver.
> +***********************************************************************************************
> +-->
> +
> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"; TreatAsLocalProperty="Platform">
> +  <PropertyGroup>
> +    <!-- First component of driver version -->
> +    <VERSION_V1 Condition="'$(VERSION_V1)' == ''">100</VERSION_V1>
> +    <!-- Second component of driver version -->
> +    <VERSION_V2 Condition="'$(VERSION_V2)' == ''">6</VERSION_V2>
> +    <!-- Third component of driver version -->
> +    <VERSION_V3 Condition="'$(VERSION_V3)' == ''">0</VERSION_V3>
> +    <!-- Fourth component of driver version -->
> +    <VERSION_V4 Condition="'$(VERSION_V4)' == ''">13</VERSION_V4>
> +    <STAMPINF_VERSION>$(VERSION_V1).$(VERSION_V2).$(VERSION_V3).$(VERSION_V4)</STAMPINF_VERSION>
> +  </PropertyGroup>
> +
> +  <!-- Version specs for C preprocessor, resource compiler, and stampinf -->
> +  <ItemDefinitionGroup>
> +    <ClCompile>
> +      <PreprocessorDefinitions>VERSION_V3=$(VERSION_V3);VERSION_V4=$(VERSION_V4);VERSION_V1=$(VERSION_V1);VERSION_V2=$(VERSION_V2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
> +    </ClCompile>
> +    <ResourceCompile>
> +      <PreprocessorDefinitions>VERSION_V3=$(VERSION_V3);VERSION_V4=$(VERSION_V4);VERSION_V1=$(VERSION_V1);VERSION_V2=$(VERSION_V2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
> +    </ResourceCompile>
> +    <Inf>
> +      <TimeStamp>$(STAMPINF_VERSION)</TimeStamp>
> +    </Inf>
> +  </ItemDefinitionGroup>
> +</Project>
> diff --git a/qxldod/qxldod.rc b/qxldod/qxldod.rc
> index 7d7c326..de45b37 100755
> --- a/qxldod/qxldod.rc
> +++ b/qxldod/qxldod.rc
> @@ -2,11 +2,30 @@
> 
> #include <ntverp.h>
> 
> +#undef VER_PRODUCTBUILD
> +#undef VER_PRODUCTBUILD_QFE
> +#undef VER_PRODUCTNAME_STR
> +#undef VER_PRODUCTMAJORVERSION
> +#undef VER_PRODUCTMINORVERSION
> +#undef VER_COMPANYNAME_STR
> +#undef VER_LEGALTRADEMARKS_STR
> +#undef VER_LEGALCOPYRIGHT_STR
> +
> +#define VER_COMPANYNAME_STR         "Red Hat Inc."
> +#define VER_LEGALTRADEMARKS_STR     ""
> +#define VER_LEGALCOPYRIGHT_STR      "Copyright (C) 2008-2016 Red Hat Inc."
> +
> +#define VER_PRODUCTMAJORVERSION         VERSION_V1
> +#define VER_PRODUCTMINORVERSION         VERSION_V2
> +#define VER_PRODUCTBUILD                VERSION_V3
> +#define VER_PRODUCTBUILD_QFE            VERSION_V4
> +
> #define VER_FILETYPE                VFT_DRV
> #define VER_FILESUBTYPE             VFT2_DRV_DISPLAY
> -#define VER_FILEDESCRIPTION_STR     "QQL WDDM DOD"
> -#define VER_INTERNALNAME_STR        "qxlod.sys"
> +#define VER_FILEDESCRIPTION_STR     "QXL WDDM DOD"
> +#define VER_INTERNALNAME_STR        "qxldod.sys"
> #define VER_ORIGINALFILENAME_STR    "qxldod.sys"
> +#define VER_PRODUCTNAME_STR         VER_FILEDESCRIPTION_STR
> 
> #define VER_LANGNEUTRAL
> #include "common.ver"
> diff --git a/qxldod/qxldod.vcxproj b/qxldod/qxldod.vcxproj
> index 2c10158..1766a61 100755
> --- a/qxldod/qxldod.vcxproj
> +++ b/qxldod/qxldod.vcxproj
> @@ -44,6 +44,7 @@
>     <DriverType>WDM</DriverType>
>   </PropertyGroup>
>   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
> +  <Import Project="$(MSBuildProjectDirectory)\Version.props" />
>   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Debug|Win32'" Label="Configuration">
>     <TargetVersion>
>     </TargetVersion>
> -- 
> 2.7.0.windows.1
> 

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]