blob: bdae27a40a5dc5028d1eb06376a0ca3161f9ed80 (
plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)..\..\dir.props" />
<PropertyGroup>
<!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
<PackagePlatform>AnyCPU</PackagePlatform>
<!-- Distro rid is passed as runtimeos-arch-->
<_parseDistroRid>$(__DistroRid)</_parseDistroRid>
<_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(__BuildOS)' == 'OSX'">osx.10.10-x64</_parseDistroRid>
<_distroRidIndex>$(_parseDistroRid.IndexOfAny("-"))</_distroRidIndex>
<_archRidIndex>$([MSBuild]::Add($(_distroRidIndex), 1))</_archRidIndex>
<OSRid Condition="'$(OSRid)' == '' and '$(_distroRidIndex)' != '-1'">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</OSRid>
<OSRid Condition="'$(OSRid)' == ''">win10</OSRid>
<ArchGroup Condition="'$(ArchGroup)' == '' and '$(_archRidIndex)' != '0'">$(_parseDistroRid.SubString($(_archRidIndex)))</ArchGroup>
<ArchGroup Condition="'$(ArchGroup)' == '' and '$(Platform)' != ''">$(Platform)</ArchGroup>
<ArchGroup Condition="'$(ArchGroup)' == ''">$(BuildArch)</ArchGroup>
<RuntimeOS Condition="'$(RuntimeOS)' == ''">$(OSRid)</RuntimeOS>
<SupportedPackageOSGroups Condition="'$(SupportedPackageOSGroups)' == ''">Windows_NT;OSX;Linux</SupportedPackageOSGroups>
<SupportedPackageOSGroups>;$(SupportedPackageOSGroups);</SupportedPackageOSGroups>
<_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
<_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
<_isSupportedOSGroup>true</_isSupportedOSGroup>
</PropertyGroup>
<!-- derive an OS Group based on the OS Family -->
<PropertyGroup>
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'osx'">OSX</_derivedPackageTargetOSGroup>
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'win'">Windows_NT</_derivedPackageTargetOSGroup>
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(__BuildOS)' != ''">$(__BuildOS)</_derivedPackageTargetOSGroup>
<_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == ''">Linux</_derivedPackageTargetOSGroup>
<_isSupportedOSGroup Condition="!$(SupportedPackageOSGroups.Contains(';$(_derivedPackageTargetOSGroup);'))">false</_isSupportedOSGroup>
</PropertyGroup>
<!-- _packageTargetOSGroup is used to control the runtime package imports, don't import runtime package targets for
an unsupported OS Group -->
<PropertyGroup Condition="'$(PackageTargetRuntime)' != '' and '$(_isSupportedOSGroup)' == 'true'">
<_packageTargetOSGroup>$(_derivedPackageTargetOSGroup)</_packageTargetOSGroup>
</PropertyGroup>
<PropertyGroup>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<OutputPath>$(PackageOutputPath)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLineupPackage)' == 'true'">
<SkipValidatePackage>true</SkipValidatePackage>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
</PropertyGroup>
<Choose>
<When Condition="'$(PackageRID)' != ''" />
<When Condition="'$(_runtimeOSFamily)' == 'win'">
<PropertyGroup>
<PackageRID Condition="'$(ArchGroup)' == 'x86' OR '$(ArchGroup)' == 'x64'">win7-$(ArchGroup)</PackageRID>
<PackageRID Condition="'$(ArchGroup)' == 'arm'">win8-$(ArchGroup)</PackageRID>
<PackageRID Condition="'$(ArchGroup)' == 'arm64'">win10-$(ArchGroup)</PackageRID>
</PropertyGroup>
</When>
<When Condition="'$(_runtimeOSFamily)' == 'osx'">
<PropertyGroup>
<PackageRID>osx.10.10-$(ArchGroup)</PackageRID>
</PropertyGroup>
</When>
<When Condition="'$(_runtimeOSFamily)' == 'rhel'">
<PropertyGroup>
<PackageRID>rhel.7-$(ArchGroup)</PackageRID>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<PackageRID>$(RuntimeOS)-$(ArchGroup)</PackageRID>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Linux;'))">
<OfficialBuildRID Include="alpine.3.4.3-x64" />
<OfficialBuildRID Include="debian.8-armel">
<Platform>armel</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="debian.8-x64" />
<OfficialBuildRID Include="fedora.23-x64" />
<OfficialBuildRID Include="fedora.24-x64" />
<OfficialBuildRID Include="linux-x64" />
<OfficialBuildRID Include="opensuse.13.2-x64" />
<OfficialBuildRID Include="opensuse.42.1-x64" />
<OfficialBuildRID Include="rhel.7-x64" />
<OfficialBuildRID Include="tizen.4.0.0-armel">
<Platform>armel</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="ubuntu.14.04-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="ubuntu.14.04-x64" />
<OfficialBuildRID Include="ubuntu.16.04-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="ubuntu.16.04-x64" />
<OfficialBuildRID Include="ubuntu.16.10-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="ubuntu.16.10-x64" />
</ItemGroup>
<ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';OSX;'))">
<OfficialBuildRID Include="osx.10.10-x64" />
</ItemGroup>
<ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Windows_NT;'))">
<OfficialBuildRID Include="win7-x86">
<Platform>x86</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="win7-x64" />
<OfficialBuildRID Include="win8-arm">
<Platform>arm</Platform>
</OfficialBuildRID>
<OfficialBuildRID Include="win10-arm64">
<Platform>arm64</Platform>
</OfficialBuildRID>
</ItemGroup>
<ItemGroup>
<!-- Ensure we have a RID-specific package for the current build, even if it isn't in our official set, but
don't build the RID-specific package if we're in an unsupported os family -->
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
<BuildRID Include="$(PackageRID)"
Condition="'$(_isSupportedOSGroup)' == 'true'">
<Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
<Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
</BuildRID>
</ItemGroup>
<ItemGroup>
<_project Include="@(BuildRID)">
<Platform Condition="'%(Platform)' == ''">amd64</Platform>
<PackageTargetRuntime>%(Identity)</PackageTargetRuntime>
<AdditionalProperties>PackageTargetRuntime=%(Identity);Platform=%(Platform)</AdditionalProperties>
</_project>
<_buildRidProjects Include="@(_project->'$(MSBuildProjectName).pkgproj')" />
<!-- Only include rid projects for a builds file, not for a lineup package -->
<Project Condition="'$(IsLineupPackage)' != 'true'" Include="@(_buildRidProjects)" />
</ItemGroup>
<ItemGroup Condition="'$(IsLineupPackage)' == 'true'">
<!-- Include project references for a lineup package to generate the runtime.json file -->
<ProjectReference Include="@(_buildRidProjects)" />
</ItemGroup>
</Project>
|