download fxr installer file, use it in pkg targets
This commit is contained in:
parent
e3c53c18fd
commit
0f640a32e3
3 changed files with 19 additions and 25 deletions
|
@ -20,6 +20,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static string CLISdkComponentId { get; set; }
|
||||
public static string CLISdkPkgId { get; set; }
|
||||
public static string CLISdkNugetVersion { get; set; }
|
||||
public static string HostFxrComponentId { get; set; }
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
|
@ -29,6 +30,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
Directory.CreateDirectory(PkgsIntermediateDir);
|
||||
|
||||
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.component.osx.x64";
|
||||
HostFxrComponentId = $"com.microsoft.dotnet.hostfxr.component.osx.x64";
|
||||
|
||||
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
||||
SharedFrameworkNugetVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||
|
@ -59,10 +61,12 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// Copy SharedFX and host installers in the correct place
|
||||
var sharedFrameworkPkgIntermediatePath = Path.Combine(PkgsIntermediateDir, $"{SharedFxComponentId}.pkg");
|
||||
var sharedHostPkgIntermediatePath = Path.Combine(PkgsIntermediateDir, $"{SharedHostComponentId}.pkg");
|
||||
var hostFxrPkgIntermediatePath = Path.Combine(PkgsIntermediateDir, $"{HostFxrComponentId}.pkg");
|
||||
|
||||
|
||||
File.Copy(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), sharedFrameworkPkgIntermediatePath, true);
|
||||
File.Copy(c.BuildContext.Get<string>("SharedHostInstallerFile"), sharedHostPkgIntermediatePath, true);
|
||||
|
||||
File.Copy(c.BuildContext.Get<string>("HostFxrInstallerFile"), hostFxrPkgIntermediatePath, true);
|
||||
|
||||
string inputDistTemplatePath = Path.Combine(
|
||||
Dirs.RepoRoot,
|
||||
|
@ -75,11 +79,13 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
string formattedDistContents =
|
||||
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
||||
.Replace("{HostFxrComponentId}", HostFxrComponentId)
|
||||
.Replace("{CLISdkComponentId}", CLISdkComponentId)
|
||||
.Replace("{CLISdkNugetVersion}", CLISdkNugetVersion)
|
||||
.Replace("{CLISdkBrandName}", Monikers.CLISdkBrandName)
|
||||
.Replace("{SharedFxBrandName}", Monikers.SharedFxBrandName)
|
||||
.Replace("{SharedHostBrandName}", Monikers.SharedHostBrandName);
|
||||
.Replace("{SharedHostBrandName}", Monikers.SharedHostBrandName)
|
||||
.Replace("{HostFxrBrandName}", Monikers.HostFxrBrandName);
|
||||
File.WriteAllText(distributionPath, formattedDistContents);
|
||||
|
||||
Cmd("productbuild",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue