From: Owen Smith Date: Fri, 18 Nov 2022 10:06:10 +0000 (+0000) Subject: Pass SignMode to MSBuild X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4a9f847380ab17f71e09ed12248f60301d8b466a;p=pvdrivers%2Fwin%2Fxencons.git Pass SignMode to MSBuild Allows overriding of SignMode to "Off" to prevent signing binaries with the PFX file. This is useful if wrapper builds sign binaries with alternative signatures or when signing is not required. Signed-off-by: Owen Smith Small whitespace fix. Signed-off-by: Paul Durrant --- diff --git a/build.ps1 b/build.ps1 index 5689107..27efa38 100644 --- a/build.ps1 +++ b/build.ps1 @@ -6,6 +6,7 @@ param( [Parameter(Mandatory = $true)] [string]$Type, [string]$Arch, + [string]$SignMode = "TestSign", [switch]$CodeQL, [switch]$Sdv ) @@ -28,7 +29,8 @@ Function Build { SolutionDir = $solutiondir[$visualstudioversion]; ConfigurationBase = $configurationbase[$visualstudioversion]; Arch = $Arch; - Type = $Type + Type = $Type; + SignMode = $SignMode } & ".\msbuild.ps1" @params if ($LASTEXITCODE -ne 0) { @@ -47,7 +49,8 @@ Function SdvBuild { SolutionDir = $solutiondir[$visualstudioversion]; ConfigurationBase = $configurationbase[$visualstudioversion]; Arch = $arch; - Type = "sdv" + Type = "sdv"; + SignMode = $SignMode } & ".\msbuild.ps1" @params } @@ -62,7 +65,8 @@ function CodeQLBuild { SolutionDir = $solutiondir[$visualstudioversion]; ConfigurationBase = $configurationbase[$visualstudioversion]; Arch = $arch; - Type = "codeql" + Type = "codeql"; + SignMode = $SignMode } & ".\msbuild.ps1" @params } diff --git a/msbuild.ps1 b/msbuild.ps1 index 0088f56..e3b87a0 100644 --- a/msbuild.ps1 +++ b/msbuild.ps1 @@ -7,7 +7,8 @@ param( [Parameter(Mandatory = $true)] [string]$Arch, [Parameter(Mandatory = $true)] - [string]$Type + [string]$Type, + [string]$SignMode = "TestSign" ) Function Run-MSBuild { @@ -25,6 +26,7 @@ Function Run-MSBuild { $c += " /m:4" $c += [string]::Format(" /p:Configuration=""{0}""", $Configuration) $c += [string]::Format(" /p:Platform=""{0}""", $Platform) + $c += [string]::Format(" /p:SignMode=""{0}""", $SignMode) $c += [string]::Format(" /t:""{0}"" ", $Target) if ($Inputs) { $c += [string]::Format(" /p:Inputs=""{0}"" ", $Inputs) @@ -99,6 +101,7 @@ Function Run-CodeQL { $a += " /t:Build" $a += [string]::Format(" /p:Configuration=""{0}""", $Configuration) $a += [string]::Format(" /p:Platform=""{0}""", $Platform) + $a += [string]::Format(" /p:SignMode=""{0}""", $SignMode) $a += " " $a += Join-Path $projpath $project $a | Set-Content $bat diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj index 533e574..4012108 100644 --- a/vs2019/package/package.vcxproj +++ b/vs2019/package/package.vcxproj @@ -68,10 +68,16 @@ - + + SourceFiles="@(PackageFiles)" + DestinationFiles="@(PackageFiles->'$(ArchiveDir)\%(FileName)%(Extension)')" + /> + + + diff --git a/vs2022/package/package.vcxproj b/vs2022/package/package.vcxproj index 533e574..c302d6d 100644 --- a/vs2022/package/package.vcxproj +++ b/vs2022/package/package.vcxproj @@ -68,10 +68,16 @@ - + + SourceFiles="@(PackageFiles)" + DestinationFiles="@(PackageFiles->'$(ArchiveDir)\%(FileName)%(Extension)')" + /> + + +