Configurable version information in binary and INF
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@daynix.com> Acked-by: Dmitry Fleytman <dmitry@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
4cba150eee
commit
6caff25931
33
qxldod/Version.props
Normal file
33
qxldod/Version.props
Normal file
@ -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)' == ''">0</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)' == ''">13000</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>
|
@ -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"
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user