|
2 | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 |
|
4 | 4 |
|
5 | | -<Project InitialTargets="DotnetToolRestore" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> |
6 | | - <!-- Ensure that the SignClient is initialized. --> |
7 | | - <Import Project="Dotnet.targets" Condition="'$(WixBuildDotnetToolPropertiesDefined)'!='true'" /> |
8 | | - |
| 5 | +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> |
9 | 6 | <PropertyGroup> |
10 | | - <_SigningAppSettingsPath>$(MSBuildThisFileDirectory)appsettings.json</_SigningAppSettingsPath> |
11 | | - <_SigningFilterNonePath>$(MSBuildThisFileDirectory)signing-filter.none.txt</_SigningFilterNonePath> |
12 | | - <_SigningName>WiX Toolset</_SigningName> |
13 | | - <_SigningUrl>http://wixtoolset.org</_SigningUrl> |
| 7 | + <SigningToolExe>$(WIX_ROOT).tools\sign.exe</SigningToolExe> |
| 8 | + <SigningCommand>code azure-key-vault</SigningCommand> |
| 9 | + <SigningFilelist>$(MSBuildThisFileDirectory)signing-filter.none.txt</SigningFilelist> |
| 10 | + <SigningConfiguration>--description "WiX Toolset" --description-url "https://wixtoolset.org/" --timestamp-url "http://timestamp.digicert.com" --file-list "$(SigningFilelist)" --azure-key-vault-url $(SigningKeyVaultUri) --azure-key-vault-tenant-id $(SigningTenantId) --azure-key-vault-client-id $(SigningClientId) --azure-key-vault-client-secret $(SigningClientSecret) --azure-key-vault-certificate $(SigningCertName)</SigningConfiguration> |
14 | 11 | </PropertyGroup> |
15 | 12 |
|
16 | 13 | <ItemGroup> |
|
19 | 16 | </ItemGroup> |
20 | 17 |
|
21 | 18 | <Target Name="SignFiles" AfterTargets="AfterBuild" Condition="'$(SignOutput)'=='true'"> |
22 | | - <Exec Command=""$(SignClientPath)" sign -c "$(_SigningAppSettingsPath)" -i "%(FilesToSign.FullPath)" -f "$(_SigningFilterNonePath)" -s "$(SignClientSecret)" -r "$(SignClientUser)" -n "$(_SigningName)" -d "$(_SigningName)" -u "$(_SigningUrl)"" /> |
| 19 | + <Message Importance="high" Text="Signing file: %(FilesToSign.FullPath)" /> |
| 20 | + |
| 21 | + <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) "%(FilesToSign.FullPath)"' |
| 22 | + WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" /> |
23 | 23 | </Target> |
24 | 24 |
|
25 | 25 | <!-- |
|
30 | 30 |
|
31 | 31 | ================================================================================================ |
32 | 32 | --> |
33 | | - <Target Name="SignCabs"> |
34 | | - <!-- <Exec Command=""$(SignClientPath)" sign -c "$(_SigningAppSettingsPath)" -i "%(SignCabs.FullPath)" -f "$(_SigningFilterNonePath)" -s "$(SignClientSecret)" -r "$(SignClientUser)" -n "$(_SigningName)" -d "$(_SigningName)" -u "$(_SigningUrl)"" /> --> |
35 | | - </Target> |
| 33 | + <Target Name="SignCabs" /> |
36 | 34 |
|
37 | | - <Target Name="SignMsi"> |
38 | | - <!-- <Exec Command=""$(SignClientPath)" sign -c "$(_SigningAppSettingsPath)" -i "%(SignMsi.FullPath)" -f "$(_SigningFilterNonePath)" -s "$(SignClientSecret)" -r "$(SignClientUser)" -n "$(_SigningName)" -d "$(_SigningName)" -u "$(_SigningUrl)"" /> --> |
39 | | - </Target> |
| 35 | + <Target Name="SignMsi" /> |
40 | 36 |
|
41 | | - <Target Name="SignContainers"> |
42 | | - <Exec Command=""$(SignClientPath)" sign -c "$(_SigningAppSettingsPath)" -i "%(SignContainers.FullPath)" -f "$(_SigningFilterNonePath)" -s "$(SignClientSecret)" -r "$(SignClientUser)" -n "$(_SigningName)" -d "$(_SigningName)" -u "$(_SigningUrl)"" /> |
43 | | - </Target> |
| 37 | + <Target Name="SignContainers" /> |
44 | 38 |
|
45 | 39 | <Target Name="SignBundleEngine"> |
46 | | - <Exec Command=""$(SignClientPath)" sign -c "$(_SigningAppSettingsPath)" -i "%(SignBundleEngine.FullPath)" -f "$(_SigningFilterNonePath)" -s "$(SignClientSecret)" -r "$(SignClientUser)" -n "$(_SigningName)" -d "$(_SigningName)" -u "$(_SigningUrl)"" /> |
| 40 | + <Message Importance="high" Text="Signing bundle engine: @(SignBundleEngine->'%(Identity)')" /> |
| 41 | + |
| 42 | + <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) "@(SignBundleEngine->'%(Identity)')"' |
| 43 | + WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" /> |
47 | 44 | </Target> |
48 | 45 |
|
49 | 46 | <Target Name="SignBundle"> |
50 | | - <Exec Command=""$(SignClientPath)" sign -c "$(_SigningAppSettingsPath)" -i "%(SignBundle.FullPath)" -f "$(_SigningFilterNonePath)" -s "$(SignClientSecret)" -r "$(SignClientUser)" -n "$(_SigningName)" -d "$(_SigningName)" -u "$(_SigningUrl)"" /> |
| 47 | + <Message Importance="high" Text="Signing bundle: @(SignBundle->'%(Identity)')" /> |
| 48 | + |
| 49 | + <Exec Command='"$(SigningToolExe)" $(SigningCommand) $(SigningConfiguration) "@(SignBundle->'%(Identity)')"' |
| 50 | + WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" /> |
51 | 51 | </Target> |
52 | 52 |
|
53 | 53 | <!-- Sentinel value that indicates WixBuid.Signing.targets has been initialized. --> |
|
0 commit comments