From: Owen Smith Date: Thu, 23 Feb 2023 09:47:24 +0000 (+0000) Subject: Allow rebranding file copyright string X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3d598964722fde7f1e5af0ff12d94f49da309445;p=pvdrivers%2Fwin%2Fxencons.git Allow rebranding file copyright string Pass COPYRIGHT string from environment to override the copyright string that is embedded in the output binaries. Signed-off-by: Owen Smith --- diff --git a/build.ps1 b/build.ps1 index 27efa38..31ba9a8 100644 --- a/build.ps1 +++ b/build.ps1 @@ -88,6 +88,10 @@ if ([string]::IsNullOrEmpty($Env:PRODUCT_NAME)) { Set-Item -Path Env:PRODUCT_NAME -Value 'Xen' } +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 d6f9a48..ce056d3 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 MAJOR_VERSION_STR "@MAJOR_VERSION@" #define MINOR_VERSION_STR "@MINOR_VERSION@" diff --git a/scripts/genfiles.ps1 b/scripts/genfiles.ps1 index ddfca48..5f4f3e4 100644 --- a/scripts/genfiles.ps1 +++ b/scripts/genfiles.ps1 @@ -61,6 +61,7 @@ $Replacements = [ordered]@{ 'PRODUCT_NAME' = $Env:PRODUCT_NAME; 'VENDOR_DEVICE_ID' = $Env:VENDOR_DEVICE_ID; 'VENDOR_PREFIX' = $Env:VENDOR_PREFIX; + 'COPYRIGHT' = $Env:COPYRIGHT; 'MAJOR_VERSION' = $Env:MAJOR_VERSION; 'MINOR_VERSION' = $Env:MINOR_VERSION; diff --git a/src/monitor/xencons_monitor.rc b/src/monitor/xencons_monitor.rc index bd3b141..9384af6 100644 --- a/src/monitor/xencons_monitor.rc +++ b/src/monitor/xencons_monitor.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 "XENCONS" #define VER_PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER diff --git a/src/tty/xencons_tty.rc b/src/tty/xencons_tty.rc index 2a72104..fc80506 100644 --- a/src/tty/xencons_tty.rc +++ b/src/tty/xencons_tty.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 "XENCONS" #define VER_PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER diff --git a/src/xencons/xencons.rc b/src/xencons/xencons.rc index 0b1c157..06b215d 100644 --- a/src/xencons/xencons.rc +++ b/src/xencons/xencons.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 "XENCONS" #define VER_PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_NUMBER