From: Owen Smith Date: Thu, 23 Feb 2023 09:49:52 +0000 (+0000) Subject: Allow rebranding file copyright string X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a71491b71cf8cae6586491091acc81220565a9c7;p=pvdrivers%2Fwin%2Fxeniface.git Allow rebranding file copyright string Pass COPYRIGHT string from environment to override the copyright string that is embedded in the output binaries. Note: Does not change the copyright string in xencontrol.dll, which is assigned to "Invisible Things Lab". This string is not rebrandable Signed-off-by: Owen Smith --- diff --git a/build.ps1 b/build.ps1 index 0d0f606..4943d99 100644 --- a/build.ps1 +++ b/build.ps1 @@ -92,6 +92,10 @@ if ([string]::IsNullOrEmpty($Env:OBJECT_PREFIX)) { Set-Item -Path Env:OBJECT_PREFIX -Value 'XenProject' } +if ([string]::IsNullOrEmpty($Env:COPYRIGHT)) { + Set-Item -Path Env:COPYRIGHT -Value 'Copyright (c) Xen Project.' +} + if ([string]::IsNullOrEmpty($Env:BUILD_NUMBER)) { if (Test-Path ".build_number") { $BuildNum = Get-Content -Path ".build_number" diff --git a/include/version.tmpl b/include/version.tmpl index c675b9c..a72b1c6 100644 --- a/include/version.tmpl +++ b/include/version.tmpl @@ -2,6 +2,7 @@ #define PRODUCT_NAME_STR "@PRODUCT_NAME@" #define VENDOR_PREFIX_STR "@VENDOR_PREFIX@" #define VENDOR_DEVICE_ID_STR "@VENDOR_DEVICE_ID@" +#define COPYRIGHT_STR "@COPYRIGHT@" #define OBJECT_PREFIX_STR "@OBJECT_PREFIX@" #define OBJECT_GUID(_Name) @OBJECT_PREFIX@ ## _Name ## _GUID diff --git a/scripts/genfiles.ps1 b/scripts/genfiles.ps1 index 64e087c..96a338c 100644 --- a/scripts/genfiles.ps1 +++ b/scripts/genfiles.ps1 @@ -62,6 +62,7 @@ $Replacements = [ordered]@{ 'VENDOR_DEVICE_ID' = $Env:VENDOR_DEVICE_ID; 'VENDOR_PREFIX' = $Env:VENDOR_PREFIX; 'OBJECT_PREFIX' = $Env:OBJECT_PREFIX; + 'COPYRIGHT' = $Env:COPYRIGHT; 'MAJOR_VERSION' = $Env:MAJOR_VERSION; 'MINOR_VERSION' = $Env:MINOR_VERSION; diff --git a/src/xenagent/xenagent.rc b/src/xenagent/xenagent.rc index f8d7fc0..ea40aec 100644 --- a/src/xenagent/xenagent.rc +++ b/src/xenagent/xenagent.rc @@ -41,7 +41,7 @@ #include #define VER_COMPANYNAME_STR VENDOR_NAME_STR -#define VER_LEGALCOPYRIGHT_STR "Copyright (c) Citrix Systems Inc." +#define VER_LEGALCOPYRIGHT_STR COPYRIGHT_STR #define VER_PRODUCTNAME_STR "XENIFACE" #define VER_PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER diff --git a/src/xeniface/xeniface.rc b/src/xeniface/xeniface.rc index 8902799..c113fac 100644 --- a/src/xeniface/xeniface.rc +++ b/src/xeniface/xeniface.rc @@ -40,7 +40,7 @@ #include #define VER_COMPANYNAME_STR VENDOR_NAME_STR -#define VER_LEGALCOPYRIGHT_STR "Copyright (c) Citrix Systems Inc." +#define VER_LEGALCOPYRIGHT_STR COPYRIGHT_STR #define VER_PRODUCTNAME_STR "XENIFACE" #define VER_PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER