111 lines
5.4 KiB
Plaintext
111 lines
5.4 KiB
Plaintext
<!--
|
|
This archive contains everything necessary to use the ASP.NET Core shared runtime,
|
|
including binaries from the base .NET Core runtime and the dotnet.exe muxer.
|
|
-->
|
|
<Project>
|
|
|
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
|
|
|
<PropertyGroup>
|
|
<!-- Use a short folder name to avoid MAX_PATH issues on Windows -->
|
|
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\ar\</BaseIntermediateOutputPath>
|
|
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
|
|
<OutputFileName>$(RuntimeInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</OutputFileName>
|
|
<OutputPath>$(InstallersOutputPath)</OutputPath>
|
|
<TargetPath>$(InstallersOutputPath)$(OutputFileName)</TargetPath>
|
|
<DotNetRuntimeArchiveFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</DotNetRuntimeArchiveFileName>
|
|
<DotNetRuntimeDownloadUrl>$(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName)</DotNetRuntimeDownloadUrl>
|
|
<DotNetRuntimeArchive>$(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName)</DotNetRuntimeArchive>
|
|
<!-- This file is used by the dotnet/core-sdk to determine if our shared framework aligns with the version they pull. -->
|
|
<BaseRuntimeVersionFileName>aspnetcore_base_runtime.version</BaseRuntimeVersionFileName>
|
|
<BaseRuntimeVersionFileOutputPath>$(OutputPath)$(BaseRuntimeVersionFileName)</BaseRuntimeVersionFileOutputPath>
|
|
<!-- This file can be used in READMEs or other webpages -->
|
|
<SvgBadgeFileName>aspnetcore-runtime-$(TargetRuntimeIdentifier)-version-badge.svg</SvgBadgeFileName>
|
|
<SvgBadgeOutputPath>$(OutputPath)$(SvgBadgeFileName)</SvgBadgeOutputPath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
|
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
|
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
|
<OutputItemType>_ResolvedFxProjects</OutputItemType>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
|
|
|
<Target Name="GetTargetPath" Returns="$(TargetPath)" />
|
|
|
|
<Target Name="PrepareForBuild">
|
|
<MakeDir Directories="$(OutputPath);$(IntermediateOutputPath)" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateMetadataFiles" DependsOnTargets="PrepareForBuild">
|
|
<!--
|
|
Used by the dotnet/core-sdk build to determine which version of Microsoft.NETCore.App is used.
|
|
-->
|
|
<WriteLinesToFile File="$(BaseRuntimeVersionFileOutputPath)" Lines="$(MicrosoftNETCoreAppPackageVersion)" Overwrite="true" />
|
|
|
|
<PropertyGroup>
|
|
<SvgBadgeLabel>version</SvgBadgeLabel>
|
|
<SvgBadgeValue>$(PackageVersion)</SvgBadgeValue>
|
|
<SvgBadgeColor>#007EC6</SvgBadgeColor>
|
|
<SvgBadgeWidth>$([MSBuild]::Add(56, $([MSBuild]::Multiply($(PackageVersion.Length), 6.67))))</SvgBadgeWidth>
|
|
<SvgBadgeContent>
|
|
<![CDATA[
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="$(SvgBadgeWidth)" height="20">
|
|
<g>
|
|
<rect width="$(SvgBadgeWidth)" height="20" rx="0" fill="#007EC6" />
|
|
<rect width="52" height="20" rx="0" fill="#555" />
|
|
</g>
|
|
<g fill="#fff" text-anchor="left" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
<text x="6" y="15" fill="#010101" fill-opacity=".3">$(SvgBadgeLabel)</text>
|
|
<text x="6" y="14">$(SvgBadgeLabel)</text>
|
|
<text x="60" y="15" fill="#010101" fill-opacity=".3">$(SvgBadgeValue)</text>
|
|
<text x="60" y="14">$(SvgBadgeValue)</text>
|
|
</g>
|
|
</svg>
|
|
]]>
|
|
</SvgBadgeContent>
|
|
</PropertyGroup>
|
|
|
|
<WriteLinesToFile File="$(SvgBadgeOutputPath)" Lines="$(SvgBadgeContent)" Overwrite="true" />
|
|
</Target>
|
|
|
|
<Target Name="Build" DependsOnTargets="PrepareForBuild;ResolveProjectReferences;GetTargetPath;GenerateMetadataFiles">
|
|
<DownloadFile Condition=" ! Exists('$(DotNetRuntimeArchive)')"
|
|
SourceUrl="$(DotNetRuntimeDownloadUrl)$(DotNetAssetRootAccessTokenSuffix)"
|
|
DestinationFolder="$(BaseIntermediateOutputPath)"
|
|
DestinationFileName="$(DotNetRuntimeArchiveFileName)" />
|
|
|
|
<ItemGroup>
|
|
<SharedFxAssetFolder Include="%(_ResolvedFxProjects.InstallerAssetPaths)" SharedFxName="%(_ResolvedFxProjects.SharedFxName)" />
|
|
<FileToZip Include="%(SharedFxAssetFolder.Identity)\**\*">
|
|
<DestinationDir>$(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\</DestinationDir>
|
|
</FileToZip>
|
|
</ItemGroup>
|
|
|
|
<!-- Extract the dotnet-runtime archive -->
|
|
<Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
|
|
Command="tar -xzf $(DotNetRuntimeArchive) -C $(IntermediateOutputPath)" />
|
|
|
|
<Unzip Condition="'$(ArchiveExtension)' == '.zip'"
|
|
SourceFiles="$(DotNetRuntimeArchive)"
|
|
DestinationFolder="$(IntermediateOutputPath)"
|
|
OverwriteReadOnlyFiles="true" />
|
|
|
|
<Copy SourceFiles="@(FileToZip)" DestinationFiles="@(FileToZip->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')" />
|
|
|
|
<!-- Zip up all contents of the archive. -->
|
|
|
|
<Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
|
|
Command="tar -czf $(TargetPath) -C $(IntermediateOutputPath) ." />
|
|
|
|
<ZipDirectory Condition="'$(ArchiveExtension)' == '.zip'"
|
|
DestinationFile="$(TargetPath)"
|
|
SourceDirectory="$(IntermediateOutputPath)"
|
|
Overwrite="true" />
|
|
</Target>
|
|
|
|
</Project>
|