Include DesktopUI shared framework and toolset in redist layout

This commit is contained in:
Daniel Plaisted 2018-10-24 16:05:02 -07:00
parent 584ec3c3d6
commit ac23150af3
3 changed files with 95 additions and 6 deletions

View file

@ -6,6 +6,7 @@
</PropertyGroup> </PropertyGroup>
<Import Project="targets\BuildCoreSdkTasks.targets" /> <Import Project="targets\BuildCoreSdkTasks.targets" />
<Import Project="targets\Versions.targets" />
<Import Project="targets\BundledComponents.targets" /> <Import Project="targets\BundledComponents.targets" />
<Import Project="targets\FileExtensions.targets" /> <Import Project="targets\FileExtensions.targets" />
<Import Project="targets\GetRuntimeInformation.targets" /> <Import Project="targets\GetRuntimeInformation.targets" />

View file

@ -1,7 +1,8 @@
<Project> <Project>
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions"> <Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetSdkVersionInfo">
<PropertyGroup> <PropertyGroup>
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</CoreSetupBlobRootUrl> <CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</CoreSetupBlobRootUrl>
<DotnetExtensionsBlobRootUrl Condition="'$(DotnetExtensionsBlobRootUrl)' == ''">https://dotnetcli.blob.core.windows.net/dotnet/</DotnetExtensionsBlobRootUrl>
<CoreSetupRid>$(HostRid)</CoreSetupRid> <CoreSetupRid>$(HostRid)</CoreSetupRid>
<CoreSetupRid Condition=" ('$(HostOSName)' == 'win' or '$(HostOSName)' == 'osx') and '$(DotNetBuildFromSource)' != 'true' ">$(HostMonikerRid)</CoreSetupRid> <CoreSetupRid Condition=" ('$(HostOSName)' == 'win' or '$(HostOSName)' == 'osx') and '$(DotNetBuildFromSource)' != 'true' ">$(HostMonikerRid)</CoreSetupRid>
@ -101,6 +102,13 @@
<DownloadFileName>$(DownloadedHostFxrInstallerFileName)</DownloadFileName> <DownloadFileName>$(DownloadedHostFxrInstallerFileName)</DownloadFileName>
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken> <AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
</BundledInstallerComponent> </BundledInstallerComponent>
<BundledLayoutComponent Include="ToolsetArchive">
<BaseUrl>$(CoreSetupBlobRootUrl)Toolset/$(ToolsetVersion)</BaseUrl>
<DownloadFileName>dotnet-toolset-internal-$(ToolsetVersion).zip</DownloadFileName>
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
<RelativeLayoutPath>sdk/$(SdkVersion)</RelativeLayoutPath>
</BundledLayoutComponent>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' != 'false' "> <ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' != 'false' ">
@ -126,11 +134,31 @@
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken> <AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
</BundledInstallerComponent> </BundledInstallerComponent>
</ItemGroup> </ItemGroup>
<PropertyGroup>
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' AND '$(OS)' == 'Windows_NT' ">true</IncludeWpfAndWinForms>
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' ">false</IncludeWpfAndWinForms>
</PropertyGroup>
<ItemGroup Condition=" '$(IncludeWpfAndWinForms)' != 'false' ">
<BundledLayoutComponent Include="WinFormsAndWpfSharedFxArchiveFile">
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(MicrosoftDesktopUIPackageVersion)</BaseUrl>
<DownloadFileName>$(WinFormsAndWpfSharedFxArchiveFileName)</DownloadFileName>
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
<RelativeLayoutPath>shared</RelativeLayoutPath>
</BundledLayoutComponent>
<BundledInstallerComponent Include="DownloadedWinFormsAndWpfSharedFrameworkInstallerFile"
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(MicrosoftDesktopUIPackageVersion)</BaseUrl>
<DownloadFileName>$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)</DownloadFileName>
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
</BundledInstallerComponent>
</ItemGroup>
</Target> </Target>
<Target Name="DownloadBundledComponents" DependsOnTargets="SetupBundledComponents" <Target Name="DownloadBundledComponents" DependsOnTargets="SetupBundledComponents">
AfterTargets="Build">
<ItemGroup> <ItemGroup>
<BundledLayoutComponent> <BundledLayoutComponent>
<DownloadDestination>$(IntermediateOutputPath)downloads\%(DownloadFileName)</DownloadDestination> <DownloadDestination>$(IntermediateOutputPath)downloads\%(DownloadFileName)</DownloadDestination>
@ -147,9 +175,19 @@
Uri="%(ComponentToDownload.BaseUrl)/%(ComponentToDownload.DownloadFileName)" Uri="%(ComponentToDownload.BaseUrl)/%(ComponentToDownload.DownloadFileName)"
DestinationPath="%(ComponentToDownload.DownloadDestination)" /> DestinationPath="%(ComponentToDownload.DownloadDestination)" />
</Target>
<Target Name="CleanPublishDir">
<!-- Remove everything from the publish directory so we don't have left over items from previous builds -->
<RemoveDir Directories="$(PublishDir)" />
<MakeDir Directories="$(PublishDir)" />
</Target>
<Target Name="LayoutBundledComponents" DependsOnTargets="DownloadBundledComponents;CleanPublishDir"
AfterTargets="Build">
<ExtractArchiveToDirectory SourceArchive="%(BundledLayoutComponent.DownloadDestination)" <ExtractArchiveToDirectory SourceArchive="%(BundledLayoutComponent.DownloadDestination)"
DestinationDirectory="$(PublishDir)" /> DestinationDirectory="$(PublishDir)/%(BundledLayoutComponent.RelativeLayoutPath)" />
</Target> </Target>
</Project> </Project>

View file

@ -0,0 +1,50 @@
<Project>
<PropertyGroup>
<VersionMajor>3</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionPatch>100</VersionPatch>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">alpha1</ReleaseSuffix>
</PropertyGroup>
<Target Name="GetCoreSdkGitCommitInfo">
<Exec Command="git rev-list --count HEAD"
ConsoleToMSBuild="true"
Condition=" '$(GitCommitCount)' == '' ">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitCount" />
</Exec>
<Exec Command="git rev-parse HEAD"
ConsoleToMSBuild="true"
Condition=" '$(GitCommitHash)' == '' ">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" />
</Exec>
<PropertyGroup>
<GitCommitCount>$(GitCommitCount.PadLeft(6,'0'))</GitCommitCount>
</PropertyGroup>
</Target>
<Target Name="SetSdkVersionInfo" DependsOnTargets="GetCoreSdkGitCommitInfo">
<PropertyGroup>
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
<CliVersionNoSuffix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</CliVersionNoSuffix>
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
<CliBrandingVersion Condition=" '$(DropSuffix)' != 'true' ">$(CliVersionNoSuffix) - $(ReleaseSuffix)</CliBrandingVersion>
<CliBrandingVersion Condition=" '$(DropSuffix)' == 'true' ">$(CliVersionNoSuffix)</CliBrandingVersion>
<SimpleVersion Condition=" '$(DropSuffix)' != 'true' ">$(CliVersionNoSuffix).$(GitCommitCount)</SimpleVersion>
<SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(CliVersionNoSuffix)</SimpleVersion>
<VersionSuffix Condition=" '$(DropSuffix)' != 'true' ">$(ReleaseSuffix)-$(GitCommitCount)</VersionSuffix>
<FullNugetVersion>$(CliVersionNoSuffix)-$(ReleaseSuffix)-$(GitCommitCount)</FullNugetVersion>
<NugetVersion Condition=" '$(DropSuffix)' != 'true' ">$(FullNugetVersion)</NugetVersion>
<NugetVersion Condition=" '$(NugetVersion)' == '' ">$(CliVersionNoSuffix)</NugetVersion>
<SdkVersion>$(NugetVersion)</SdkVersion>
<SdkNugetVersion>$(NugetVersion)</SdkNugetVersion>
</PropertyGroup>
</Target>
</Project>