Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build configuration to generate runtime packs for iOS #34050

Merged
merged 20 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/installer/pkg/projects/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<PropertyGroup>
<PackagePlatform>AnyCPU</PackagePlatform>

<SkipBuildOnRuntimePackOnlyOS>false</SkipBuildOnRuntimePackOnlyOS>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
<OutputPath>$(PackageOutputPath)</OutputPath>
Expand Down
11 changes: 11 additions & 0 deletions src/installer/pkg/projects/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
<StableVersion Condition="'$(IncludePreReleaseLabelInPackageVersion)' != 'true'">$(Version)</StableVersion>
</PropertyGroup>

<!--
For mobile targets, we do not need the host, so allow depproj's to opt
in in order to skip building.
steveisok marked this conversation as resolved.
Show resolved Hide resolved
-->
<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps"
Condition="'$(SkipBuildOnRuntimePackOnlyOS)' and '$(TargetOS)' == 'iOS'">
steveisok marked this conversation as resolved.
Show resolved Hide resolved
steveisok marked this conversation as resolved.
Show resolved Hide resolved
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<!--
For any Dependency items with a VersionProp, set it to the property by that name given by the
version generation target. For any with a VersionFromProject, query the ProductVersion from that
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<VersionProp>AppHostVersion</VersionProp>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>

<Import Project="$(MSBuildProjectName).props" Condition="'$(TargetOS)' != 'iOS'" />

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<InstallerName>dotnet-host</InstallerName>
<GenerateSharedFrameworkPart>true</GenerateSharedFrameworkPart>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>

<Target Name="SetupHostSpecificWixBuild"
Expand Down Expand Up @@ -47,12 +48,6 @@
</ItemGroup>
</Target>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<Import Condition="'$(PackageTargetRuntime)' != '' and '$(TargetOS)' != 'iOS'" Project="$(MSBuildThisFileDirectory)runtime.$(TargetOS).$(MSBuildProjectName).props" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@

<PropertyGroup>
<VersionProp>HostPolicyVersion</VersionProp>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>

<ItemGroup>
<Dependency Include="Microsoft.NETCore.DotNetHostResolver" VersionProp="HostResolverVersion" />
</ItemGroup>

<Import Project="$(MSBuildProjectName).props" Condition="'$(TargetOS)' != 'iOS'" />
steveisok marked this conversation as resolved.
Show resolved Hide resolved

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<InstallerName>dotnet-hostfxr</InstallerName>
<GenerateSharedFrameworkPart>true</GenerateSharedFrameworkPart>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -45,12 +46,6 @@
</ItemGroup>
</Target>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<Import Project="$(MSBuildProjectName).props" Condition="'$(TargetOS)' != 'iOS'" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PropertyGroup>
<FrameworkPackType>crossgen2</FrameworkPackType>
<BuildRidSpecificPacks>true</BuildRidSpecificPacks>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>

<!--
Expand Down Expand Up @@ -87,12 +88,6 @@

</Target>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
<CrossArchSdkMsiInstallerArch Include="x64;x86" />
</ItemGroup>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>
<PropertyGroup>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<File Include="PackageOverrides.txt" TargetPath="data/" />
</ItemGroup>

<Target Name="MobileSkipBuildProps" BeforeTargets="GetSkipBuildProps" Condition="'$(TargetOS)' == 'iOS'">
<PropertyGroup>
<SkipBuild>true</SkipBuild>
</PropertyGroup>
</Target>

<PropertyGroup>
<SkipBuildOnRuntimePackOnlyOS>true</SkipBuildOnRuntimePackOnlyOS>
</PropertyGroup>
</Project>