Fix OSx Pkg installers
- Make the .Net CLI SDK install SxS. - Make the .Net Host upgrade till RTM(v.1.0.0). - Make the .Net Core Sharedfx pkg to use the SharedFx Nuget version instead CLI version.
This commit is contained in:
parent
e81166afce
commit
4e68c19323
3 changed files with 59 additions and 53 deletions
|
@ -14,20 +14,20 @@
|
||||||
|
|
||||||
|
|
||||||
<choices-outline>
|
<choices-outline>
|
||||||
<line choice="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" />
|
<line choice="{SharedFxComponentId}.pkg" />
|
||||||
<line choice="com.microsoft.dotnet.sharedhost.osx.x64" />
|
<line choice="{SharedHostComponentId}.pkg" />
|
||||||
<line choice="com.microsoft.dotnet.sdk.osx.x64"/>
|
<line choice="{CLISdkComponentId}.pkg"/>
|
||||||
</choices-outline>
|
</choices-outline>
|
||||||
<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">
|
<choice id="{SharedFxComponentId}.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" />
|
<pkg-ref id="{SharedFxComponentId}.pkg" />
|
||||||
</choice>
|
</choice>
|
||||||
<choice id="com.microsoft.dotnet.sharedhost.osx.x64" visible="true" title=".NET Core Shared Host (x64)" description="The .NET Core Shared Host." >
|
<choice id="{SharedHostComponentId}.pkg" visible="true" title=".NET Core Shared Host (x64)" description="The .NET Core Shared Host." >
|
||||||
<pkg-ref id="com.microsoft.dotnet.sharedhost.osx.x64" />
|
<pkg-ref id="{SharedHostComponentId}.pkg" />
|
||||||
</choice>
|
</choice>
|
||||||
<choice id="com.microsoft.dotnet.sdk.osx.x64" visible="true" title=".NET CLI (x64)" description=".NET CLI">
|
<choice id="{CLISdkComponentId}.pkg" visible="true" title=".NET CLI (x64)" description=".NET CLI">
|
||||||
<pkg-ref id="com.microsoft.dotnet.sdk.osx.x64"/>
|
<pkg-ref id="{CLISdkComponentId}.pkg"/>
|
||||||
</choice>
|
</choice>
|
||||||
<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="{SharedFxComponentId}.pkg">{SharedFxComponentId}.pkg</pkg-ref>
|
||||||
<pkg-ref id="com.microsoft.dotnet.sharedhost.osx.x64">com.microsoft.dotnet.sharedhost.osx.x64.pkg</pkg-ref>
|
<pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref>
|
||||||
<pkg-ref id="com.microsoft.dotnet.sdk.osx.x64">com.microsoft.dotnet.sdk.osx.x64.pkg</pkg-ref>
|
<pkg-ref id="{CLISdkComponentId}.pkg">{CLISdkComponentId}.pkg</pkg-ref>
|
||||||
</installer-gui-script>
|
</installer-gui-script>
|
||||||
|
|
|
@ -10,15 +10,15 @@
|
||||||
</allowed-os-version>
|
</allowed-os-version>
|
||||||
</volume-check>
|
</volume-check>
|
||||||
<choices-outline>
|
<choices-outline>
|
||||||
<line choice="com.microsoft.dotnet.sharedframework.{SharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64.pkg" />
|
<line choice="{SharedFxComponentId}.pkg" />
|
||||||
<line choice="com.microsoft.dotnet.sharedhost.osx.x64" />
|
<line choice="{SharedHostComponentId}.pkg" />
|
||||||
</choices-outline>
|
</choices-outline>
|
||||||
<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">
|
<choice id="{SharedFxComponentId}.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" />
|
<pkg-ref id="{SharedFxComponentId}.pkg" />
|
||||||
</choice>
|
</choice>
|
||||||
<choice id="com.microsoft.dotnet.sharedhost.osx.x64" visible="true" title=".NET Core Shared Host (x64)" description="The .NET Core Shared Host." >
|
<choice id="{SharedHostComponentId}.pkg" visible="true" title=".NET Core Shared Host (x64)" description="The .NET Core Shared Host." >
|
||||||
<pkg-ref id="com.microsoft.dotnet.sharedhost.osx.x64" />
|
<pkg-ref id="{SharedHostComponentId}.pkg" />
|
||||||
</choice>
|
</choice>
|
||||||
<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="{SharedFxComponentId}.pkg">{SharedFxComponentId}.pkg</pkg-ref>
|
||||||
<pkg-ref id="com.microsoft.dotnet.sharedhost.osx.x64">com.microsoft.dotnet.sharedhost.osx.x64.pkg</pkg-ref>
|
<pkg-ref id="{SharedHostComponentId}.pkg">{SharedHostComponentId}.pkg</pkg-ref>
|
||||||
</installer-gui-script>
|
</installer-gui-script>
|
||||||
|
|
|
@ -13,12 +13,33 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public class PkgTargets
|
public class PkgTargets
|
||||||
{
|
{
|
||||||
public static string PkgsIntermediateDir { get; set; }
|
public static string PkgsIntermediateDir { get; set; }
|
||||||
|
public static string SharedHostComponentId { get; set; }
|
||||||
|
public static string SharedFxComponentId { get; set; }
|
||||||
|
public static string SharedFxPkgId { get; set; }
|
||||||
|
public static string SharedFrameworkNugetVersion { get; set; }
|
||||||
|
public static string CLISdkComponentId { get; set; }
|
||||||
|
public static string CLISdkPkgId { get; set; }
|
||||||
|
public static string CLISdkNugetVersion { get; set; }
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[BuildPlatforms(BuildPlatform.OSX)]
|
[BuildPlatforms(BuildPlatform.OSX)]
|
||||||
public static BuildTargetResult InitPkg(BuildTargetContext c)
|
public static BuildTargetResult InitPkg(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
PkgsIntermediateDir = Path.Combine(Dirs.Packages, "intermediate");
|
PkgsIntermediateDir = Path.Combine(Dirs.Packages, "intermediate");
|
||||||
Directory.CreateDirectory(PkgsIntermediateDir);
|
Directory.CreateDirectory(PkgsIntermediateDir);
|
||||||
|
|
||||||
|
var hostVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").ProductionVersion;
|
||||||
|
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.{hostVersion}.component.osx.x64";
|
||||||
|
|
||||||
|
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
||||||
|
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||||
|
SharedFxComponentId = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64";
|
||||||
|
SharedFxPkgId = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.osx.x64";
|
||||||
|
|
||||||
|
CLISdkNugetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
|
CLISdkComponentId = $"com.microsoft.dotnet.dev.{CLISdkNugetVersion}.component.osx.x64";
|
||||||
|
CLISdkPkgId = $"com.microsoft.dotnet.dev.{CLISdkNugetVersion}.osx.x64";
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +54,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.OSX)]
|
[BuildPlatforms(BuildPlatform.OSX)]
|
||||||
public static BuildTargetResult GenerateCLISdkProductArchive(BuildTargetContext c)
|
public static BuildTargetResult GenerateCLISdkProductArchive(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
|
||||||
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
|
||||||
string id = $"com.microsoft.dotnet.dev.{version}.osx.x64";
|
|
||||||
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "resources");
|
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "resources");
|
||||||
string outFilePath = Path.Combine(Dirs.Packages, c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile"));
|
string outFilePath = Path.Combine(Dirs.Packages, c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile"));
|
||||||
|
|
||||||
|
@ -48,14 +66,14 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
string distTemplate = File.ReadAllText(inputDistTemplatePath);
|
string distTemplate = File.ReadAllText(inputDistTemplatePath);
|
||||||
string distributionPath = Path.Combine(PkgsIntermediateDir, "CLI-SDK-Formatted-Distribution-Template.xml");
|
string distributionPath = Path.Combine(PkgsIntermediateDir, "CLI-SDK-Formatted-Distribution-Template.xml");
|
||||||
string formattedDistContents =
|
string formattedDistContents =
|
||||||
distTemplate.Replace("{SharedFrameworkNugetVersion}", sharedFrameworkNugetVersion)
|
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||||
.Replace("{SharedFrameworkNugetName}", Monikers.SharedFrameworkName)
|
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
||||||
.Replace("{VERSION}", version);
|
.Replace("{CLISdkComponentId}", CLISdkComponentId);
|
||||||
File.WriteAllText(distributionPath, formattedDistContents);
|
File.WriteAllText(distributionPath, formattedDistContents);
|
||||||
|
|
||||||
Cmd("productbuild",
|
Cmd("productbuild",
|
||||||
"--version", version,
|
"--version", CLISdkNugetVersion,
|
||||||
"--identifier", id,
|
"--identifier", CLISdkPkgId,
|
||||||
"--package-path", PkgsIntermediateDir,
|
"--package-path", PkgsIntermediateDir,
|
||||||
"--resources", resourcePath,
|
"--resources", resourcePath,
|
||||||
"--distribution", distributionPath,
|
"--distribution", distributionPath,
|
||||||
|
@ -70,16 +88,14 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.OSX)]
|
[BuildPlatforms(BuildPlatform.OSX)]
|
||||||
public static BuildTargetResult GenerateCLISdkPkg(BuildTargetContext c)
|
public static BuildTargetResult GenerateCLISdkPkg(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
string outFilePath = Path.Combine(PkgsIntermediateDir, CLISdkComponentId + ".pkg");
|
||||||
string id = $"com.microsoft.dotnet.sdk.osx.x64";
|
|
||||||
string outFilePath = Path.Combine(PkgsIntermediateDir, id + ".pkg");
|
|
||||||
string installLocation = "/usr/local/share/dotnet";
|
string installLocation = "/usr/local/share/dotnet";
|
||||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "clisdk", "scripts");
|
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "clisdk", "scripts");
|
||||||
|
|
||||||
Cmd("pkgbuild",
|
Cmd("pkgbuild",
|
||||||
"--root", c.BuildContext.Get<string>("CLISDKRoot"),
|
"--root", c.BuildContext.Get<string>("CLISDKRoot"),
|
||||||
"--identifier", id,
|
"--identifier", CLISdkComponentId,
|
||||||
"--version", version,
|
"--version", CLISdkNugetVersion,
|
||||||
"--install-location", installLocation,
|
"--install-location", installLocation,
|
||||||
"--scripts", scriptsLocation,
|
"--scripts", scriptsLocation,
|
||||||
outFilePath)
|
outFilePath)
|
||||||
|
@ -93,10 +109,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.OSX)]
|
[BuildPlatforms(BuildPlatform.OSX)]
|
||||||
public static BuildTargetResult GenerateSharedFrameworkProductArchive(BuildTargetContext c)
|
public static BuildTargetResult GenerateSharedFrameworkProductArchive(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
|
||||||
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
|
||||||
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
|
||||||
string id = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{sharedFrameworkNugetVersion}.osx.x64";
|
|
||||||
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "resources");
|
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "resources");
|
||||||
string outFilePath = Path.Combine(PkgsIntermediateDir, c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile"));
|
string outFilePath = Path.Combine(PkgsIntermediateDir, c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile"));
|
||||||
|
|
||||||
|
@ -109,14 +121,13 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
string distTemplate = File.ReadAllText(inputDistTemplatePath);
|
string distTemplate = File.ReadAllText(inputDistTemplatePath);
|
||||||
string distributionPath = Path.Combine(PkgsIntermediateDir, "shared-framework-formatted-distribution.xml");
|
string distributionPath = Path.Combine(PkgsIntermediateDir, "shared-framework-formatted-distribution.xml");
|
||||||
string formattedDistContents =
|
string formattedDistContents =
|
||||||
distTemplate.Replace("{SharedFrameworkNugetVersion}", sharedFrameworkNugetVersion)
|
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||||
.Replace("{SharedFrameworkNugetName}", Monikers.SharedFrameworkName)
|
.Replace("{SharedHostComponentId}", SharedHostComponentId);
|
||||||
.Replace("{VERSION}", version);
|
|
||||||
File.WriteAllText(distributionPath, formattedDistContents);
|
File.WriteAllText(distributionPath, formattedDistContents);
|
||||||
|
|
||||||
Cmd("productbuild",
|
Cmd("productbuild",
|
||||||
"--version", version,
|
"--version", SharedFrameworkNugetVersion,
|
||||||
"--identifier", id,
|
"--identifier", SharedFxPkgId,
|
||||||
"--package-path", PkgsIntermediateDir,
|
"--package-path", PkgsIntermediateDir,
|
||||||
"--resources", resourcePath,
|
"--resources", resourcePath,
|
||||||
"--distribution", distributionPath,
|
"--distribution", distributionPath,
|
||||||
|
@ -131,18 +142,14 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.OSX)]
|
[BuildPlatforms(BuildPlatform.OSX)]
|
||||||
public static BuildTargetResult GenerateSharedFrameworkPkg(BuildTargetContext c)
|
public static BuildTargetResult GenerateSharedFrameworkPkg(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedFxComponentId + ".pkg");
|
||||||
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
|
||||||
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
|
||||||
string id = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{sharedFrameworkNugetVersion}.component.osx.x64";
|
|
||||||
string outFilePath = Path.Combine(PkgsIntermediateDir, id + ".pkg");
|
|
||||||
string installLocation = "/usr/local/share/dotnet";
|
string installLocation = "/usr/local/share/dotnet";
|
||||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "scripts");
|
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "scripts");
|
||||||
|
|
||||||
Cmd("pkgbuild",
|
Cmd("pkgbuild",
|
||||||
"--root", c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
|
"--root", c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
|
||||||
"--identifier", id,
|
"--identifier", SharedFxComponentId,
|
||||||
"--version", version,
|
"--version", SharedFrameworkNugetVersion,
|
||||||
"--install-location", installLocation,
|
"--install-location", installLocation,
|
||||||
"--scripts", scriptsLocation,
|
"--scripts", scriptsLocation,
|
||||||
outFilePath)
|
outFilePath)
|
||||||
|
@ -156,15 +163,14 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.OSX)]
|
[BuildPlatforms(BuildPlatform.OSX)]
|
||||||
public static BuildTargetResult GenerateSharedHostPkg(BuildTargetContext c)
|
public static BuildTargetResult GenerateSharedHostPkg(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").SimpleVersion;
|
string version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
string id = $"com.microsoft.dotnet.sharedhost.osx.x64";
|
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedHostComponentId + ".pkg");
|
||||||
string outFilePath = Path.Combine(PkgsIntermediateDir, id + ".pkg");
|
|
||||||
string installLocation = "/usr/local/share/dotnet";
|
string installLocation = "/usr/local/share/dotnet";
|
||||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedhost", "scripts");
|
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedhost", "scripts");
|
||||||
|
|
||||||
Cmd("pkgbuild",
|
Cmd("pkgbuild",
|
||||||
"--root", c.BuildContext.Get<string>("SharedHostPublishRoot"),
|
"--root", c.BuildContext.Get<string>("SharedHostPublishRoot"),
|
||||||
"--identifier", id,
|
"--identifier", SharedHostComponentId,
|
||||||
"--version", version,
|
"--version", version,
|
||||||
"--install-location", installLocation,
|
"--install-location", installLocation,
|
||||||
"--scripts", scriptsLocation,
|
"--scripts", scriptsLocation,
|
||||||
|
|
Loading…
Add table
Reference in a new issue