1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

Move corehost.proj to corehost directory (#57036)

* Move corehost.proj to corehost directory

* Simplify host version overriding
This commit is contained in:
Adeel Mujahid 2021-08-09 10:33:28 +03:00 committed by GitHub
parent 7a799ce4d2
commit 25bb59daa0
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 82 deletions

View file

@ -105,4 +105,42 @@
<FileWrites Include="$(_NETStandardCompatErrorFilePath)" />
</ItemGroup>
</Target>
<!--
Arcade SDK versioning is defined by static properties in a targets file: work around this by
moving properties based on versioning into a target.
-->
<Target Name="GetProductVersions">
<PropertyGroup>
<IncludePreReleaseLabelInPackageVersion Condition="'$(DotNetFinalVersionKind)' != 'release'">true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludePreReleaseLabelInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludeBuildNumberInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludeBuildNumberInPackageVersion>
<ProductVersionSuffix Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">-$(VersionSuffix)</ProductVersionSuffix>
<ProductBandVersion Condition="'$(ProductBandVersion)' == ''">$(MajorVersion).$(MinorVersion)</ProductBandVersion>
<ProductionVersion Condition="'$(ProductionVersion)' == ''">$(ProductBandVersion).$(PatchVersion)</ProductionVersion>
<ProductVersion>$(ProductionVersion)$(ProductVersionSuffix)</ProductVersion>
<SharedFrameworkNugetVersion>$(ProductVersion)</SharedFrameworkNugetVersion>
<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>
<InstallersRelativePath>Runtime/$(SharedFrameworkNugetVersion)/</InstallersRelativePath>
<!--
By default, we are always building the nuget packages for HostPolicy, HostFXR and
Dotnet/AppHost. Thus, the properties (below) are always set to $(ProductVersion).
However, there are scenarios when only some of these components will change (e.g. during
servicing, we may only change HostPolicy but not HostFXR and Dotnet/AppHost). In such cases,
pass the appropriate version value(s) as argument to the build command in order to override;
e.g. 'build -p:HostPolicyVersion=x.y.z ...'
-->
<HostVersion Condition="'$(HostVersion)' == ''">$(ProductVersion)</HostVersion>
<AppHostVersion Condition="'$(AppHostVersion)' == ''">$(ProductVersion)</AppHostVersion>
<HostResolverVersion Condition="'$(HostResolverVersion)' == ''">$(ProductVersion)</HostResolverVersion>
<HostPolicyVersion Condition="'$(HostPolicyVersion)' == ''">$(ProductVersion)</HostPolicyVersion>
</PropertyGroup>
</Target>
</Project>

View file

@ -290,7 +290,7 @@
<!-- Host sets -->
<ItemGroup Condition="$(_subset.Contains('+host.native+'))">
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
<CorehostProjectToBuild Include="$(SharedNativeRoot)corehost\corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" Pack="true" Category="host" />
</ItemGroup>

View file

@ -15,17 +15,4 @@
want to ensure we use the correct packages. -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<!-- Set up the default output and intermediate paths -->
<PropertyGroup>
<OSPlatformConfig>$(OutputRid).$(Configuration)</OSPlatformConfig>
<BaseOutputRootPath>$(ArtifactsBinDir)$(OSPlatformConfig)\</BaseOutputRootPath>
<IntermediateOutputRootPath>$(ArtifactsObjDir)$(OSPlatformConfig)\</IntermediateOutputRootPath>
<!-- Produce assets into the specified blob feed. -->
<AssetOutputPath Condition="'$(DotNetOutputBlobFeedDir)' != ''">$(DotNetOutputBlobFeedDir)assets/</AssetOutputPath>
<AssetOutputPath Condition="'$(AssetOutputPath)'==''">$(ArtifactsShippingPackagesDir)</AssetOutputPath>
<SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)'==''">$(ArtifactsShippingPackagesDir)</SymbolPackageOutputPath>
</PropertyGroup>
</Project>

View file

@ -16,67 +16,4 @@
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
<Target Name="Pack" />
<!--
Arcade SDK versioning is defined by static properties in a targets file: work around this by
moving properties based on versioning into a target.
-->
<Target Name="GetProductVersions">
<PropertyGroup>
<IncludePreReleaseLabelInPackageVersion Condition="'$(DotNetFinalVersionKind)' != 'release'">true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludePreReleaseLabelInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludeBuildNumberInPackageVersion>
<IncludeBuildNumberInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludeBuildNumberInPackageVersion>
<ProductVersionSuffix Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">-$(VersionSuffix)</ProductVersionSuffix>
<ProductBandVersion Condition="'$(ProductBandVersion)' == ''">$(MajorVersion).$(MinorVersion)</ProductBandVersion>
<ProductionVersion Condition="'$(ProductionVersion)' == ''">$(ProductBandVersion).$(PatchVersion)</ProductionVersion>
<ProductVersion>$(ProductionVersion)$(ProductVersionSuffix)</ProductVersion>
<SharedFrameworkNugetVersion>$(ProductVersion)</SharedFrameworkNugetVersion>
<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>
<InstallersRelativePath>Runtime/$(SharedFrameworkNugetVersion)/</InstallersRelativePath>
<!--
By default, we are always building the nuget packages for HostPolicy, HostFXR and
Dotnet/AppHost. Thus, the "UseShipped*" properties (below) are always set to false.
However, there are scenarios when some of these components will not change (e.g. during
servicing, we may only change HostPolicy but not HostFXR and Dotnet/AppHost). In such cases,
set the appropriate "UseShipped*" property below to true and the corresponding "*Version"
property to the desired version so that we use the last shipped version of the package.
-->
<!-- The host/apphost package versions are only updated whenever there is a change in the components -->
<UseShippedHostPackage>false</UseShippedHostPackage>
<HostVersion Condition="'$(UseShippedHostPackage)' != 'true'">$(ProductVersion)</HostVersion>
<HostVersion Condition="'$(UseShippedHostPackage)' == 'true'">2.0.0</HostVersion>
<!-- The AppHostVersion is used for all hosts that aren't dotnet.exe -->
<UseShippedAppHostPackage>false</UseShippedAppHostPackage>
<AppHostVersion Condition="'$(UseShippedAppHostPackage)' != 'true'">$(ProductVersion)</AppHostVersion>
<AppHostVersion Condition="'$(UseShippedAppHostPackage)' == 'true'">2.0.0</AppHostVersion>
<!--
The FXR Resolver package version is only updated whenever there is a change in it.
If there is ever a need to use a shipped version of the package, then set the property
below to true.
-->
<UseShippedHostResolverPackage>false</UseShippedHostResolverPackage>
<HostResolverVersion Condition="'$(UseShippedHostResolverPackage)' != 'true'">$(ProductVersion)</HostResolverVersion>
<HostResolverVersion Condition="'$(UseShippedHostResolverPackage)' == 'true'">2.0.0</HostResolverVersion>
<!--
Host Policy package version is only updated whenever there is a change in it.
If there is ever a need to use a shipped version of the package, then set the property
below to true.
-->
<UseShippedHostPolicyPackage>false</UseShippedHostPolicyPackage>
<HostPolicyVersion Condition="'$(UseShippedHostPolicyPackage)' != 'true'">$(ProductVersion)</HostPolicyVersion>
<HostPolicyVersion Condition="'$(UseShippedHostPolicyPackage)' == 'true'">2.0.0</HostPolicyVersion>
</PropertyGroup>
</Target>
</Project>

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<Platform>$(TargetArchitecture)</Platform>
<DotNetHostBinDir>$(BaseOutputRootPath)corehost</DotNetHostBinDir>
<DotNetHostBinDir>$(ArtifactsBinDir)$(OutputRid).$(Configuration)\corehost</DotNetHostBinDir>
</PropertyGroup>
<PropertyGroup>

View file

@ -8,6 +8,7 @@
<IncrementalNativeBuild Condition="'$(IncrementalNativeBuild)' == ''">true</IncrementalNativeBuild>
<BuildCoreHostDependsOn>GetProductVersions;GenerateNativeVersionFile</BuildCoreHostDependsOn>
<BuildCoreHostDependsOn Condition="'$(DisableSourceLink)' != 'true'">$(BuildCoreHostDependsOn);InitializeSourceControlInformationFromSourceControlManager</BuildCoreHostDependsOn>
<IntermediateOutputRootPath>$(ArtifactsObjDir)$(OutputRid).$(Configuration)\</IntermediateOutputRootPath>
</PropertyGroup>
<!-- Target that builds dotnet, hostfxr and hostpolicy with the same version as what NetCoreApp will be built for
@ -19,6 +20,7 @@
DependsOnTargets="$(BuildCoreHostDependsOn)">
<PropertyGroup>
<CMakeBuildDir>$(IntermediateOutputRootPath)corehost\cmake\</CMakeBuildDir>
<BuildScript>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', 'build.sh'))</BuildScript>
<BuildArgs>$(Configuration) $(TargetArchitecture) -apphostver "$(AppHostVersion)" -hostver "$(HostVersion)" -fxrver "$(HostResolverVersion)" -policyver "$(HostPolicyVersion)" -commithash "$([MSBuild]::ValueOrDefault('$(SourceRevisionId)', 'N/A'))" -os $(TargetOS)</BuildArgs>
<BuildArgs>$(BuildArgs) -cmakeargs "-DVERSION_FILE_PATH=$(NativeVersionFile)"</BuildArgs>
@ -37,8 +39,8 @@
Use IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing
warning in the macOS build when dsymutil tries to strip symbols.
-->
<Message Text="$(SharedNativeRoot)corehost\build.sh $(BuildArgs)" Importance="High"/>
<Exec Command="$(SharedNativeRoot)corehost\build.sh $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
<Message Text="&quot;$(BuildScript)&quot; $(BuildArgs)" Importance="High"/>
<Exec Command="&quot;$(BuildScript)&quot; $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
</Target>
<Target Name="BuildCoreHostWindows"
@ -79,6 +81,8 @@
!Exists('$(IntermediateOutputRootPath)hostResourceFiles\%(HostFiles.Identity)\version_info.h')"/>
<PropertyGroup>
<BuildScript>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', 'build.cmd'))</BuildScript>
<BuildArgs>$(Configuration) $(TargetArchitecture) apphostver $(AppHostVersion) hostver $(HostVersion) fxrver $(HostResolverVersion) policyver $(HostPolicyVersion) commit $([MSBuild]::ValueOrDefault('$(SourceRevisionId)', 'N/A')) rid $(OutputRid)</BuildArgs>
<BuildArgs Condition="'$(PortableBuild)' == 'true'">$(BuildArgs) portable</BuildArgs>
<BuildArgs Condition="'$(IncrementalNativeBuild)' == 'true'">$(BuildArgs) incremental-native-build</BuildArgs>
@ -94,8 +98,8 @@
IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing
warning in the native build.
-->
<Message Text="$(SharedNativeRoot)corehost\build.cmd $(BuildArgs)" Importance="High"/>
<Exec Command="$(SharedNativeRoot)corehost\build.cmd $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
<Message Text="&quot;$(BuildScript)&quot; $(BuildArgs)" Importance="High"/>
<Exec Command="&quot;$(BuildScript)&quot; $(BuildArgs)" IgnoreStandardErrorWarningFormat="true"/>
</Target>
<Target Name="PrependWindowsHeaderIncludeToVersionHeaderFile"