Merge pull request #5225 from eerhardt/AddSharedFx11

Install Shared Framework 1.1 when installing the CLI
This commit is contained in:
Eric Erhardt 2017-01-06 11:21:14 -06:00 committed by GitHub
commit 12f28a6019
12 changed files with 205 additions and 35 deletions

View file

@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SdkBrandName>Microsoft .NET Core 1.0.1 - SDK Preview 5</SdkBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core 1.0.1 - Runtime</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core 1.0.0 - Host</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core 1.0.0 - Host FX Resolver</HostFxrBrandName>
<SdkBrandName>Microsoft .NET Core 1.0.3 - SDK Preview 5</SdkBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core 1.0.1 - Host</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core 1.0.1 - Host FX Resolver</HostFxrBrandName>
<AdditionalSharedFrameworkBrandName>Microsoft .NET Core 1.1.0 - Runtime</AdditionalSharedFrameworkBrandName>
<AdditionalSharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</AdditionalSharedHostBrandName>
<AdditionalHostFxrBrandName>Microsoft .NET Core 1.1.0 - Host FX Resolver</AdditionalHostFxrBrandName>
<SharedFrameworkNugetName>Microsoft.NETCore.App</SharedFrameworkNugetName>
</PropertyGroup>

View file

@ -118,15 +118,37 @@
<CombinedFrameworkHostCompressedFileName>dotnet-$(ProductMonikerRid).$(SharedFrameworkVersion)$(ArchiveExtension)</CombinedFrameworkHostCompressedFileName>
</PropertyGroup>
<!-- Additional Shared Framework to be installed -->
<PropertyGroup>
<AdditionalCoreSetupChannel>release/1.1.0</AdditionalCoreSetupChannel>
<AdditionalSharedFrameworkVersion>1.1.0</AdditionalSharedFrameworkVersion>
<AdditionalSharedHostVersion>1.1.0</AdditionalSharedHostVersion>
<AdditionalHostFxrVersion>1.1.0</AdditionalHostFxrVersion>
<!-- Additional Downloaded Installers + Archives -->
<AdditionalDownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host-$(ProductMonikerRid).$(AdditionalSharedHostVersion)$(InstallerExtension)</AdditionalDownloadedSharedHostInstallerFileName>
<AdditionalDownloadedSharedHostInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(AdditionalDownloadedSharedHostInstallerFileName)</AdditionalDownloadedSharedHostInstallerFile>
<AdditionalDownloadedHostFxrInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-hostfxr-$(ProductMonikerRid).$(AdditionalHostFxrVersion)$(InstallerExtension)</AdditionalDownloadedHostFxrInstallerFileName>
<AdditionalDownloadedHostFxrInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(AdditionalDownloadedHostFxrInstallerFileName)</AdditionalDownloadedHostFxrInstallerFile>
<AdditionalDownloadedSharedFrameworkInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-sharedframework-$(ProductMonikerRid).$(AdditionalSharedFrameworkVersion)$(InstallerExtension)</AdditionalDownloadedSharedFrameworkInstallerFileName>
<AdditionalDownloadedSharedFrameworkInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(AdditionalDownloadedSharedFrameworkInstallerFileName)</AdditionalDownloadedSharedFrameworkInstallerFile>
<AdditionalCombinedFrameworkHostCompressedFileName>dotnet-$(ProductMonikerRid).$(AdditionalSharedFrameworkVersion)$(ArchiveExtension)</AdditionalCombinedFrameworkHostCompressedFileName>
</PropertyGroup>
<!-- SetTelemetryProfile -->
<SetEnvVar Name="DOTNET_CLI_TELEMETRY_PROFILE" Value="$(DOTNET_CLI_TELEMETRY_PROFILE);https://github.com/dotnet/cli;$(CommitHash)" />
</Target>
<Target Name="SetupDownloadHostAndSharedFxInputsOutputs" DependsOnTargets="Init">
<PropertyGroup>
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/$(CoreSetupChannel)</CoreSetupBlobRootUrl>
<SharedFrameworkArchiveBlobRootUrl>$(CoreSetupBlobRootUrl)/Binaries/$(SharedFrameworkVersion)</SharedFrameworkArchiveBlobRootUrl>
<CoreSetupInstallerBlobRootUrl>$(CoreSetupBlobRootUrl)/Installers</CoreSetupInstallerBlobRootUrl>
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</CoreSetupBlobRootUrl>
<CoreSetupBlobRootUrlWithChannel>$(CoreSetupBlobRootUrl)$(CoreSetupChannel)</CoreSetupBlobRootUrlWithChannel>
<SharedFrameworkArchiveBlobRootUrl>$(CoreSetupBlobRootUrlWithChannel)/Binaries/$(SharedFrameworkVersion)</SharedFrameworkArchiveBlobRootUrl>
<CoreSetupInstallerBlobRootUrl>$(CoreSetupBlobRootUrlWithChannel)/Installers</CoreSetupInstallerBlobRootUrl>
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(SharedFrameworkVersion)</CoreSetupDownloadDirectory>
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive</CombinedSharedHostAndFrameworkArchive>
</PropertyGroup>
@ -160,11 +182,57 @@
<ExtractDestintation></ExtractDestintation>
</_DownloadAndExtractItem>
</ItemGroup>
<!-- Additional Shared Framework to be installed -->
<PropertyGroup>
<AdditionalCoreSetupBlobRootUrlWithChannel>$(CoreSetupBlobRootUrl)$(AdditionalCoreSetupChannel)</AdditionalCoreSetupBlobRootUrlWithChannel>
<AdditionalSharedFrameworkArchiveBlobRootUrl>$(AdditionalCoreSetupBlobRootUrlWithChannel)/Binaries/$(AdditionalSharedFrameworkVersion)</AdditionalSharedFrameworkArchiveBlobRootUrl>
<AdditionalCoreSetupInstallerBlobRootUrl>$(AdditionalCoreSetupBlobRootUrlWithChannel)/Installers</AdditionalCoreSetupInstallerBlobRootUrl>
<AdditionalCoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(AdditionalSharedFrameworkVersion)</AdditionalCoreSetupDownloadDirectory>
<AdditionalCombinedSharedHostAndFrameworkArchive>$(AdditionalCoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive</AdditionalCombinedSharedHostAndFrameworkArchive>
</PropertyGroup>
<ItemGroup>
<_DownloadAndExtractItem Include="AdditionalCombinedSharedHostAndFrameworkArchive"
Condition="!Exists('$(AdditionalCombinedSharedHostAndFrameworkArchive)')">
<Url>$(AdditionalSharedFrameworkArchiveBlobRootUrl)/$(AdditionalCombinedFrameworkHostCompressedFileName)</Url>
<DownloadFileName>$(AdditionalCombinedSharedHostAndFrameworkArchive)</DownloadFileName>
<ExtractDestination>$(SharedFrameworkPublishDirectory)</ExtractDestination>
<!-- don't overwrite the destination because both shared fx's need to be combined -->
<OverwriteDestination>False</OverwriteDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AdditionalDownloadedSharedFrameworkInstallerFile"
Condition="!Exists('$(AdditionalDownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
<Url>$(AdditionalCoreSetupInstallerBlobRootUrl)/$(AdditionalSharedFrameworkVersion)/$(AdditionalDownloadedSharedFrameworkInstallerFileName)</Url>
<DownloadFileName>$(AdditionalDownloadedSharedFrameworkInstallerFile)</DownloadFileName>
<ExtractDestination></ExtractDestination>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AdditionalDownloadedSharedHostInstallerFile"
Condition="!Exists('$(AdditionalDownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
<Url>$(AdditionalCoreSetupInstallerBlobRootUrl)/$(AdditionalSharedHostVersion)/$(AdditionalDownloadedSharedHostInstallerFileName)</Url>
<DownloadFileName>$(AdditionalDownloadedSharedHostInstallerFile)</DownloadFileName>
<ExtractDestintation></ExtractDestintation>
</_DownloadAndExtractItem>
<_DownloadAndExtractItem Include="AdditionalDownloadedHostFxrInstallerFile"
Condition="!Exists('$(AdditionalDownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
<Url>$(AdditionalCoreSetupInstallerBlobRootUrl)/$(AdditionalHostFxrVersion)/$(AdditionalDownloadedHostFxrInstallerFileName)</Url>
<DownloadFileName>$(AdditionalDownloadedHostFxrInstallerFile)</DownloadFileName>
<ExtractDestintation></ExtractDestintation>
</_DownloadAndExtractItem>
</ItemGroup>
</Target>
<Target Name="DownloadHostAndSharedFxArtifacts"
DependsOnTargets="SetupDownloadHostAndSharedFxInputsOutputs">
<PropertyGroup>
<OverwriteExtractionDestination>%(_DownloadAndExtractItem.OverwriteDestination)</OverwriteExtractionDestination>
<OverwriteExtractionDestination Condition="'$(OverwriteExtractionDestination)' == ''">True</OverwriteExtractionDestination>
</PropertyGroup>
<DownloadFile Condition=" '@(_DownloadAndExtractItem)' != '' "
Uri="%(_DownloadAndExtractItem.Url)"
DestinationPath="%(_DownloadAndExtractItem.DownloadFileName)" />
@ -172,12 +240,12 @@
<ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' == 'win' "
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
OverwriteDestination="True" />
OverwriteDestination="$(OverwriteExtractionDestination)" />
<TarGzFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' != 'win' "
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
OverwriteDestination="True" />
OverwriteDestination="$(OverwriteExtractionDestination)" />
</Target>
<Target Name="RestoreSrcPackages"
@ -212,7 +280,7 @@
<CallTarget Targets="CleanToolsLockFiles" />
<DotNetRestore ToolPath="$(DotNetPath)"
<DotNetRestore ToolPath="$(DotNetPath)"
ProjectPath="&quot;%(RestoreToolsPackagesInput.FullPath)&quot;" />
</Target>

View file

@ -74,6 +74,10 @@
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AdditionalSharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AdditionalHostFxrDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostDebianPackageName)" />
</Target>
@ -89,6 +93,11 @@
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(AdditionalDownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(AdditionalDownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(AdditionalDownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(SdkInstallerFile)" />
<!-- Run E2E -->
@ -100,6 +109,10 @@
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AdditionalSharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AdditionalHostFxrDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostDebianPackageName)" />
</Target>

View file

@ -42,6 +42,13 @@
<HostFxrDebianPackageName>dotnet-hostfxr-$(HostFxrDebianPackageVersion)</HostFxrDebianPackageName>
<HostFxrDebianPackageName>$(HostFxrDebianPackageName.ToLower())</HostFxrDebianPackageName>
<HostDebianPackageName>dotnet-host</HostDebianPackageName>
<AdditionalSharedFxDebianPackageVersion>$(AdditionalSharedFrameworkVersion)</AdditionalSharedFxDebianPackageVersion>
<AdditionalSharedFxDebianPackageName>dotnet-sharedframework-$(SharedFrameworkName)-$(AdditionalSharedFxDebianPackageVersion)</AdditionalSharedFxDebianPackageName>
<AdditionalSharedFxDebianPackageName>$(AdditionalSharedFxDebianPackageName.ToLower())</AdditionalSharedFxDebianPackageName>
<AdditionalHostFxrDebianPackageVersion>$(AdditionalHostFxrVersion)</AdditionalHostFxrDebianPackageVersion>
<AdditionalHostFxrDebianPackageName>dotnet-hostfxr-$(AdditionalHostFxrDebianPackageVersion)</AdditionalHostFxrDebianPackageName>
<AdditionalHostFxrDebianPackageName>$(AdditionalHostFxrDebianPackageName.ToLower())</AdditionalHostFxrDebianPackageName>
</PropertyGroup>
<!-- Inputs -->
@ -86,14 +93,8 @@
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%">
<ReplacementString>$(SharedFxDebianPackageName)</ReplacementString>
</DebianConfigTokenValues>
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_NUGET_NAME%">
<ReplacementString>$(SharedFrameworkName)</ReplacementString>
</DebianConfigTokenValues>
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_NUGET_VERSION%">
<ReplacementString>$(SharedFrameworkVersion)</ReplacementString>
</DebianConfigTokenValues>
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_BRAND_NAME%">
<ReplacementString>$(SharedFrameworkBrandName)</ReplacementString>
<DebianConfigTokenValues Include="%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME_ADDITIONAL%">
<ReplacementString>$(AdditionalSharedFxDebianPackageName)</ReplacementString>
</DebianConfigTokenValues>
<DebianConfigTokenValues Include="%SDK_NUGET_VERSION%">
<ReplacementString>$(SdkVersion)</ReplacementString>

View file

@ -111,6 +111,9 @@
'$(DownloadedSharedFrameworkInstallerFile)'
'$(DownloadedHostFxrInstallerFile)'
'$(DownloadedSharedHostInstallerFile)'
'$(AdditionalDownloadedSharedFrameworkInstallerFile)'
'$(AdditionalDownloadedHostFxrInstallerFile)'
'$(AdditionalDownloadedSharedHostInstallerFile)'
'$(CombinedFrameworkSdkHostInstallerFile)'
'$(WixRoot)'
'$(SdkBrandName)'

View file

@ -9,12 +9,16 @@
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
<!-- Properties for pkg build -->
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.component.osx.x64</SharedHostComponentId>
<HostFxrComponentId>com.microsoft.dotnet.hostfxr.component.osx.x64</HostFxrComponentId>
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.$(SharedHostVersion).component.osx.x64</SharedHostComponentId>
<HostFxrComponentId>com.microsoft.dotnet.hostfxr.$(HostFxrVersion).component.osx.x64</HostFxrComponentId>
<SharedFrameworkComponentId>com.microsoft.dotnet.sharedframework.$(SharedFrameworkNugetName).$(SharedFrameworkVersion).component.osx.x64</SharedFrameworkComponentId>
<SdkComponentId>com.microsoft.dotnet.dev.$(SdkVersion).component.osx.x64</SdkComponentId>
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(SdkVersion).osx.x64</SdkProductArchiveId>
<AdditionalSharedHostComponentId>com.microsoft.dotnet.sharedhost.$(AdditionalSharedHostVersion).component.osx.x64</AdditionalSharedHostComponentId>
<AdditionalHostFxrComponentId>com.microsoft.dotnet.hostfxr.$(AdditionalHostFxrVersion).component.osx.x64</AdditionalHostFxrComponentId>
<AdditionalSharedFrameworkComponentId>com.microsoft.dotnet.sharedframework.$(SharedFrameworkNugetName).$(AdditionalSharedFrameworkVersion).component.osx.x64</AdditionalSharedFrameworkComponentId>
<PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory>
<SdkPkgSourcesRootDirectory>$(RepoRoot)/packaging/osx/clisdk</SdkPkgSourcesRootDirectory>
@ -28,6 +32,10 @@
<SharedFrameworkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedFrameworkComponentId).pkg</SharedFrameworkPkgIntermediatePath>
<SharedHostPkgIntermediatePath>$(PkgIntermediateDirectory)/$(SharedHostComponentId).pkg</SharedHostPkgIntermediatePath>
<HostFxrPkgIntermediatePath>$(PkgIntermediateDirectory)/$(HostFxrComponentId).pkg</HostFxrPkgIntermediatePath>
<AdditionalSharedFrameworkPkgIntermediatePath>$(PkgIntermediateDirectory)/$(AdditionalSharedFrameworkComponentId).pkg</AdditionalSharedFrameworkPkgIntermediatePath>
<AdditionalSharedHostPkgIntermediatePath>$(PkgIntermediateDirectory)/$(AdditionalSharedHostComponentId).pkg</AdditionalSharedHostPkgIntermediatePath>
<AdditionalHostFxrPkgIntermediatePath>$(PkgIntermediateDirectory)/$(AdditionalHostFxrComponentId).pkg</AdditionalHostFxrPkgIntermediatePath>
</PropertyGroup>
<ItemGroup>
@ -40,6 +48,15 @@
<DistributionTemplateReplacement Include="{HostFxrComponentId}">
<ReplacementString>$(HostFxrComponentId)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{AdditionalSharedFxComponentId}">
<ReplacementString>$(AdditionalSharedFrameworkComponentId)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{AdditionalSharedHostComponentId}">
<ReplacementString>$(AdditionalSharedHostComponentId)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{AdditionalHostFxrComponentId}">
<ReplacementString>$(AdditionalHostFxrComponentId)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{CLISdkComponentId}">
<ReplacementString>$(SdkComponentId)</ReplacementString>
</DistributionTemplateReplacement>
@ -58,6 +75,15 @@
<DistributionTemplateReplacement Include="{HostFxrBrandName}">
<ReplacementString>$(HostFxrBrandName)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{AdditionalSharedFxBrandName}">
<ReplacementString>$(AdditionalSharedFrameworkBrandName)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{AdditionalSharedHostBrandName}">
<ReplacementString>$(AdditionalSharedHostBrandName)</ReplacementString>
</DistributionTemplateReplacement>
<DistributionTemplateReplacement Include="{AdditionalHostFxrBrandName}">
<ReplacementString>$(AdditionalHostFxrBrandName)</ReplacementString>
</DistributionTemplateReplacement>
</ItemGroup>
<!-- Consumed By Publish -->
@ -75,6 +101,10 @@
<GenerateSdkProductArchiveInputs Include="$(DownloadedSharedHostInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveDistributionTemplateFile)" />
<GenerateSdkProductArchiveInputs Include="$(SdkProductArchiveResourcesDirectory)/**/*" />
<GenerateSdkProductArchiveInputs Include="$(AdditionalDownloadedSharedFrameworkInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(AdditionalDownloadedHostFxrInstallerFile)" />
<GenerateSdkProductArchiveInputs Include="$(AdditionalDownloadedSharedHostInstallerFile)" />
</ItemGroup>
</Target>
@ -103,11 +133,17 @@
SourceFiles="$(SdkInstallerFile);
$(DownloadedSharedFrameworkInstallerFile);
$(DownloadedHostFxrInstallerFile);
$(DownloadedSharedHostInstallerFile);"
$(DownloadedSharedHostInstallerFile);
$(AdditionalDownloadedSharedFrameworkInstallerFile);
$(AdditionalDownloadedHostFxrInstallerFile);
$(AdditionalDownloadedSharedHostInstallerFile);"
DestinationFiles="$(SdkPkgIntermediatePath);
$(SharedFrameworkPkgIntermediatePath);
$(HostFxrPkgIntermediatePath);
$(SharedHostPkgIntermediatePath);" />
$(SharedHostPkgIntermediatePath);
$(AdditionalSharedFrameworkPkgIntermediatePath);
$(AdditionalHostFxrPkgIntermediatePath);
$(AdditionalSharedHostPkgIntermediatePath);" />
<!-- Fill out parameters in the Distribution Template -->
<ReplaceFileContents

View file

@ -42,12 +42,6 @@ namespace Microsoft.DotNet.Build.Tasks
Log.LogMessage(MessageImportance.Low, "'{0}' already exists, trying to delete before unzipping...", DestinationDirectory);
Directory.Delete(DestinationDirectory, recursive: true);
}
else
{
Log.LogWarning("'{0}' already exists. Did you forget to set '{1}' to true?", DestinationDirectory, nameof(OverwriteDestination));
retVal = false;
}
}
if (!File.Exists(SourceArchive))

View file

@ -25,7 +25,7 @@ namespace Microsoft.DotNet.Build.Tasks
public string DestinationDirectory { get; set; }
/// <summary>
/// Indicates if the destination archive should be overwritten if it already exists.
/// Indicates if the destination directory should be cleaned if it already exists.
/// </summary>
public bool OverwriteDestination { get; set; }
@ -40,17 +40,37 @@ namespace Microsoft.DotNet.Build.Tasks
Log.LogMessage(MessageImportance.Low, "'{0}' already exists, trying to delete before unzipping...", DestinationDirectory);
Directory.Delete(DestinationDirectory, recursive: true);
}
else
{
Log.LogWarning("'{0}' already exists. Did you forget to set '{1}' to true?", DestinationDirectory, nameof(OverwriteDestination));
}
}
Log.LogMessage(MessageImportance.High, "Decompressing '{0}' into '{1}'...", SourceArchive, DestinationDirectory);
if (!Directory.Exists(Path.GetDirectoryName(DestinationDirectory)))
Directory.CreateDirectory(Path.GetDirectoryName(DestinationDirectory));
ZipFile.ExtractToDirectory(SourceArchive, DestinationDirectory);
// match tar default behavior to overwrite by default
// Replace this code with ZipFile.ExtractToDirectory when https://github.com/dotnet/corefx/pull/14806 is available
using (ZipArchive archive = ZipFile.Open(SourceArchive, ZipArchiveMode.Read))
{
DirectoryInfo di = Directory.CreateDirectory(DestinationDirectory);
string destinationDirectoryFullPath = di.FullName;
foreach (ZipArchiveEntry entry in archive.Entries)
{
string fileDestinationPath = Path.GetFullPath(Path.Combine(destinationDirectoryFullPath, entry.FullName));
if (Path.GetFileName(fileDestinationPath).Length == 0)
{
// If it is a directory:
Directory.CreateDirectory(fileDestinationPath);
}
else
{
// If it is a file:
// Create containing directory:
Directory.CreateDirectory(Path.GetDirectoryName(fileDestinationPath));
entry.ExtractToFile(fileDestinationPath, overwrite: true);
}
}
}
}
catch (Exception e)
{

View file

@ -29,6 +29,7 @@
},
"debian_dependencies":{
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {}
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME%" : {},
"%SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME_ADDITIONAL%" : {}
}
}

View file

@ -17,6 +17,9 @@
<line choice="{SharedFxComponentId}.pkg" />
<line choice="{HostFxrComponentId}.pkg" />
<line choice="{SharedHostComponentId}.pkg" />
<line choice="{AdditionalSharedFxComponentId}.pkg" />
<line choice="{AdditionalHostFxrComponentId}.pkg" />
<line choice="{AdditionalSharedHostComponentId}.pkg" />
<line choice="{CLISdkComponentId}.pkg"/>
</choices-outline>
<choice id="{SharedFxComponentId}.pkg" visible="true" title="{SharedFxBrandName} (x64)" description="The .NET Core Shared Framework">
@ -28,11 +31,23 @@
<choice id="{SharedHostComponentId}.pkg" visible="true" title="{SharedHostBrandName} (x64)" description="The .NET Core Shared Host." >
<pkg-ref id="{SharedHostComponentId}.pkg" />
</choice>
<choice id="{AdditionalSharedFxComponentId}.pkg" visible="true" title="{AdditionalSharedFxBrandName} (x64)" description="The .NET Core Shared Framework">
<pkg-ref id="{AdditionalSharedFxComponentId}.pkg" />
</choice>
<choice id="{AdditionalHostFxrComponentId}.pkg" visible="true" title="{AdditionalHostFxrBrandName} (x64)" description="The .NET Core Host FX Resolver">
<pkg-ref id="{AdditionalHostFxrComponentId}.pkg" />
</choice>
<choice id="{AdditionalSharedHostComponentId}.pkg" visible="true" title="{AdditionalSharedHostBrandName} (x64)" description="The .NET Core Shared Host." >
<pkg-ref id="{AdditionalSharedHostComponentId}.pkg" />
</choice>
<choice id="{CLISdkComponentId}.pkg" visible="true" title="{CLISdkBrandName} (x64)" description="The .NET Core SDK">
<pkg-ref id="{CLISdkComponentId}.pkg"/>
</choice>
<pkg-ref id="{SharedFxComponentId}.pkg">{SharedFxComponentId}.pkg</pkg-ref>
<pkg-ref id="{HostFxrComponentId}.pkg">{HostFxrComponentId}.pkg</pkg-ref>
<pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref>
<pkg-ref id="{AdditionalSharedFxComponentId}.pkg">{AdditionalSharedFxComponentId}.pkg</pkg-ref>
<pkg-ref id="{AdditionalHostFxrComponentId}.pkg">{AdditionalHostFxrComponentId}.pkg</pkg-ref>
<pkg-ref id="{AdditionalSharedHostComponentId}.pkg">{AdditionalSharedHostComponentId}.pkg</pkg-ref>
<pkg-ref id="{CLISdkComponentId}.pkg">{CLISdkComponentId}.pkg</pkg-ref>
</installer-gui-script>

View file

@ -55,6 +55,15 @@
<MsiPackage SourceFile="$(var.SharedHostMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
<MsiPackage SourceFile="$(var.AdditionalSharedFXMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
<MsiPackage SourceFile="$(var.AdditionalHostFXRMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
<MsiPackage SourceFile="$(var.AdditionalSharedHostMsiSourcePath)">
<MsiProperty Name="DOTNETHOME" Value="[DOTNETHOME]" />
</MsiPackage>
</Chain>
</Bundle>

View file

@ -6,6 +6,9 @@ param(
[Parameter(Mandatory=$true)][string]$SharedFxMSIFile,
[Parameter(Mandatory=$true)][string]$HostFxrMSIFile,
[Parameter(Mandatory=$true)][string]$SharedHostMSIFile,
[Parameter(Mandatory=$true)][string]$AdditionalSharedFxMSIFile,
[Parameter(Mandatory=$true)][string]$AdditionalHostFxrMSIFile,
[Parameter(Mandatory=$true)][string]$AdditionalSharedHostMSIFile,
[Parameter(Mandatory=$true)][string]$DotnetBundleOutput,
[Parameter(Mandatory=$true)][string]$WixRoot,
[Parameter(Mandatory=$true)][string]$ProductMoniker,
@ -39,6 +42,9 @@ function RunCandleForBundle
-dSharedFXMsiSourcePath="$SharedFxMSIFile" `
-dHostFXRMsiSourcePath="$HostFxrMSIFile" `
-dSharedHostMsiSourcePath="$SharedHostMSIFile" `
-dAdditionalSharedFXMsiSourcePath="$AdditionalSharedFxMSIFile" `
-dAdditionalHostFXRMsiSourcePath="$AdditionalHostFxrMSIFile" `
-dAdditionalSharedHostMsiSourcePath="$AdditionalSharedHostMSIFile" `
-arch "$Architecture" `
-ext WixBalExtension.dll `
-ext WixUtilExtension.dll `