Bring the OSX installer 'title' in line with Windows

It now includes the shared framework 'name' (NuGet package name) in the installer. In this case, the installer is called '.NET Core Shared Framework (NETStandard.Library 1.0.0-*)'
This commit is contained in:
Eric Mellino 2016-03-10 15:19:54 -08:00
parent edbbc64b03
commit d77fad4e68
2 changed files with 11 additions and 9 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>.NET Core Shared Framework ({SharedFrameworkNugetVersion})</title>
<title>.NET Core Shared Framework ({SharedFrameworkNugetName} {SharedFrameworkNugetVersion})</title>
<license file="eula.rtf" mime-type="application/rtf" />
<background file="dotnetbackground.png" mime-type="image/png"/>
<options customize="never" require-scripts="false" />
@ -10,15 +10,15 @@
</allowed-os-version>
</volume-check>
<choices-outline>
<line choice="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" />
<line choice="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" />
<line choice="com.microsoft.dotnet.sharedhost.osx.x64" />
</choices-outline>
<choice id="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" visible="true" title=".NET Core Shared Framework (x64)" description="The .NET Core Shared Framework">
<pkg-ref id="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" />
<choice id="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" visible="true" title=".NET Core Shared Framework (x64)" description="The .NET Core Shared Framework">
<pkg-ref id="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" />
</choice>
<choice id="com.microsoft.dotnet.sharedhost.osx.x64" visible="true" title=".NET Core Shared Host (x64)" description="The .NET Core Shared Host." >
<pkg-ref id="com.microsoft.dotnet.sharedhost.osx.x64" />
</choice>
<pkg-ref id="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetVersion}.component.osx.x64.pkg">com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetVersion}.component.osx.x64.pkg</pkg-ref>
<pkg-ref id="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg">com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg</pkg-ref>
<pkg-ref id="com.microsoft.dotnet.sharedhost.osx.x64">com.microsoft.dotnet.sharedhost.osx.x64.pkg</pkg-ref>
</installer-gui-script>

View file

@ -37,9 +37,10 @@ namespace Microsoft.DotNet.Cli.Build
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GenerateSharedFrameworkProductArchive(BuildTargetContext c)
{
string sharedFrameworkNugetName = SharedFrameworkTargets.SharedFrameworkName;
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
string id = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetVersion}.osx.x64";
string id = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{sharedFrameworkNugetVersion}.osx.x64";
string packageIntermediatesPath = Path.Combine(Dirs.Output, "obj", "pkg");
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "resources");
string outFilePath = Path.Combine(packageIntermediatesPath, id + ".pkg");
@ -54,6 +55,7 @@ namespace Microsoft.DotNet.Cli.Build
string distributionPath = Path.Combine(packageIntermediatesPath, "shared-framework-formatted-distribution.xml");
string formattedDistContents =
distTemplate.Replace("{SharedFrameworkNugetVersion}", sharedFrameworkNugetVersion)
.Replace("{SharedFrameworkNugetName}", SharedFrameworkTargets.SharedFrameworkName)
.Replace("{VERSION}", version);
File.WriteAllText(distributionPath, formattedDistContents);
@ -63,8 +65,7 @@ namespace Microsoft.DotNet.Cli.Build
"--package-path", packageIntermediatesPath,
"--resources", resourcePath,
"--distribution", distributionPath,
outFilePath
)
outFilePath)
.Execute()
.EnsureSuccessful();
@ -75,10 +76,11 @@ namespace Microsoft.DotNet.Cli.Build
[BuildPlatforms(BuildPlatform.OSX)]
public static BuildTargetResult GenerateSharedFrameworkPkg(BuildTargetContext c)
{
string sharedFrameworkNugetName = SharedFrameworkTargets.SharedFrameworkName;
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
Directory.CreateDirectory(Path.Combine(Dirs.Output, "obj", "pkg"));
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
string id = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetVersion}.component.osx.x64";
string id = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{sharedFrameworkNugetVersion}.component.osx.x64";
string outFilePath = Path.Combine(Dirs.Output, "obj", "pkg", id + ".pkg");
string installLocation = "/usr/local/share/dotnet";
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "scripts");