This repository has been archived by the owner on Aug 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsign.proj
93 lines (79 loc) · 3.22 KB
/
sign.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="utf-8"?>
<Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="dir.props" />
<!-- This will be overridden if we're building with MicroBuild. -->
<Target Name="SignFiles">
<Message Text="Fake sign target. Would sign: @(FilesToSign)" />
</Target>
<Import Project="Tools/MicroBuild.Core.props" />
<Import Project="Tools/MicroBuild.Core.targets" />
<Target Name="SetSigningProperties">
<Error Condition="'$(TargetRid)' == ''" Text="Missing required property 'TargetRid'." />
<Error Condition="'$(CertificateId)' == ''" Text="Missing required property 'CertificateId'." />
<PropertyGroup>
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
signs files that are under these paths. -->
<OutDir Condition="'$(OutDir)' == ''">$(BaseOutputRootPath)/</OutDir>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)</IntermediateOutputPath>
</PropertyGroup>
</Target>
<Target Name="SignBinaries" DependsOnTargets="GetSignBinaryFiles">
<CallTarget Targets="SignFiles" />
</Target>
<Target Name="GetSignBinaryFiles">
<ItemGroup>
<FilesToSign Include="$(OutDir)corehost/**/hostfxr.dll">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
<FilesToSign Include="$(OutDir)corehost/**/hostpolicy.dll">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
<FilesToSign Include="$(OutDir)corehost/**/dotnet.exe">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
<ItemGroup>
<FilesToSign Include="$(CrossGenRootPath)/**/*.dll">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
<ItemGroup>
<FilesToSign Include="$(IntermediateOutputPath)forPackaging/**/*.dll">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
<Target Name="SignMsiAndCab" DependsOnTargets="GetSignMsiAndCabFiles">
<CallTarget Targets="SignFiles" />
</Target>
<Target Name="GetSignMsiAndCabFiles">
<ItemGroup>
<FilesToSign Include="$(OutDir)packages/**/*.msi">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
<FilesToSign Include="$(OutDir)packages/**/*.cab">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
<Target Name="SignEngine" DependsOnTargets="GetSignEngineFiles">
<CallTarget Targets="SignFiles" />
</Target>
<Target Name="GetSignEngineFiles">
<ItemGroup>
<FilesToSign Include="$(OutDir)packages/**/*engine.exe">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
<Target Name="SignBundle" DependsOnTargets="GetSignBundleFiles">
<CallTarget Targets="SignFiles" />
</Target>
<Target Name="GetSignBundleFiles">
<ItemGroup>
<FilesToSign Include="$(OutDir)packages/**/*.exe">
<Authenticode>$(CertificateId)</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
</Project>