Fix installer issues
- Sign the Sharedfx bundle correctly. - Fix the installer title for SharedFx bundle. Fixes #2100 - Fix the installer title for SharedFx pkg. Fixes #2161
This commit is contained in:
parent
1428eb81cf
commit
988fe85c19
4 changed files with 37 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<installer-gui-script minSpecVersion="1">
|
<installer-gui-script minSpecVersion="1">
|
||||||
<title>.NET CLI {VERSION}</title>
|
<title>.NET CLI {CLISdkNugetVersion}</title>
|
||||||
<license file="eula.rtf" mime-type="application/rtf" />
|
<license file="eula.rtf" mime-type="application/rtf" />
|
||||||
<background file="dotnetbackground.png" mime-type="image/png"/>
|
<background file="dotnetbackground.png" mime-type="image/png"/>
|
||||||
<options customize="never" require-scripts="false" />
|
<options customize="never" require-scripts="false" />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||||
<String Id="Caption">[WixBundleName] Setup</String>
|
<String Id="Caption">[WixBundleName] Setup</String>
|
||||||
<String Id="Title">Microsoft .Net CLI for Windows</String>
|
<String Id="Title">Microsoft .Net Core for Windows</String>
|
||||||
<String Id="Motto">You just need a shell, a text editor and 10 minutes of your time.
|
<String Id="Motto">You just need a shell, a text editor and 10 minutes of your time.
|
||||||
|
|
||||||
Ready? Set? Let's go!</String>
|
Ready? Set? Let's go!</String>
|
||||||
|
|
|
@ -32,7 +32,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
private static string SharedFrameworkBundle { get; set; }
|
private static string SharedFrameworkBundle { get; set; }
|
||||||
|
|
||||||
private static string Engine { get; set; }
|
private static string SdkEngine { get; set; }
|
||||||
|
|
||||||
|
private static string SharedFrameworkEngine { get; set; }
|
||||||
|
|
||||||
private static string MsiVersion { get; set; }
|
private static string MsiVersion { get; set; }
|
||||||
|
|
||||||
|
@ -68,11 +70,12 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
SdkBundle = c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile");
|
SdkBundle = c.BuildContext.Get<string>("CombinedFrameworkSDKHostInstallerFile");
|
||||||
SdkMsi = Path.ChangeExtension(SdkBundle, "msi");
|
SdkMsi = Path.ChangeExtension(SdkBundle, "msi");
|
||||||
Engine = Path.Combine(Path.GetDirectoryName(SdkBundle), ENGINE);
|
SdkEngine = GetEngineName(SdkBundle);
|
||||||
|
|
||||||
SharedFrameworkBundle = c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile");
|
SharedFrameworkBundle = c.BuildContext.Get<string>("CombinedFrameworkHostInstallerFile");
|
||||||
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
|
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
|
||||||
SharedFrameworkMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), "msi");
|
SharedFrameworkMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), "msi");
|
||||||
|
SharedFrameworkEngine = GetEngineName(SharedFrameworkBundle);
|
||||||
|
|
||||||
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||||
MsiVersion = buildVersion.GenerateMsiVersion();
|
MsiVersion = buildVersion.GenerateMsiVersion();
|
||||||
|
@ -199,9 +202,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.Windows)]
|
[BuildPlatforms(BuildPlatform.Windows)]
|
||||||
public static BuildTargetResult ExtractEngineFromBundle(BuildTargetContext c)
|
public static BuildTargetResult ExtractEngineFromBundle(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
Cmd($"{WixRoot}\\insignia.exe", "-ib", SdkBundle, "-o", Engine)
|
ExtractEngineFromBundleHelper(SdkBundle, SdkEngine);
|
||||||
.Execute()
|
ExtractEngineFromBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
|
||||||
.EnsureSuccessful();
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,10 +211,31 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.Windows)]
|
[BuildPlatforms(BuildPlatform.Windows)]
|
||||||
public static BuildTargetResult ReattachEngineToBundle(BuildTargetContext c)
|
public static BuildTargetResult ReattachEngineToBundle(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
Cmd($"{WixRoot}\\insignia.exe", "-ab", Engine, SdkBundle, "-o", SdkBundle)
|
ReattachEngineToBundleHelper(SdkBundle, SdkEngine);
|
||||||
|
ReattachEngineToBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetEngineName(string bundle)
|
||||||
|
{
|
||||||
|
var engine = $"{Path.GetFileNameWithoutExtension(bundle)}-{ENGINE}";
|
||||||
|
return Path.Combine(Path.GetDirectoryName(bundle), engine);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ExtractEngineFromBundleHelper(string bundle, string engine)
|
||||||
|
{
|
||||||
|
Cmd($"{WixRoot}\\insignia.exe", "-ib", bundle, "-o", engine)
|
||||||
.Execute()
|
.Execute()
|
||||||
.EnsureSuccessful();
|
.EnsureSuccessful();
|
||||||
return c.Success();
|
}
|
||||||
|
|
||||||
|
private static void ReattachEngineToBundleHelper(string bundle, string engine)
|
||||||
|
{
|
||||||
|
Cmd($"{WixRoot}\\insignia.exe", "-ab", engine, bundle, "-o", bundle)
|
||||||
|
.Execute()
|
||||||
|
.EnsureSuccessful();
|
||||||
|
|
||||||
|
File.Delete(engine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
string formattedDistContents =
|
string formattedDistContents =
|
||||||
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||||
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
||||||
.Replace("{CLISdkComponentId}", CLISdkComponentId);
|
.Replace("{CLISdkComponentId}", CLISdkComponentId)
|
||||||
|
.Replace("{CLISdkNugetVersion}", CLISdkNugetVersion);
|
||||||
File.WriteAllText(distributionPath, formattedDistContents);
|
File.WriteAllText(distributionPath, formattedDistContents);
|
||||||
|
|
||||||
Cmd("productbuild",
|
Cmd("productbuild",
|
||||||
|
@ -122,7 +123,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
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("{SharedFxComponentId}", SharedFxComponentId)
|
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||||
.Replace("{SharedHostComponentId}", SharedHostComponentId);
|
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
||||||
|
.Replace("{SharedFrameworkNugetName}", Monikers.SharedFrameworkName)
|
||||||
|
.Replace("{SharedFrameworkNugetVersion}", SharedFrameworkNugetVersion);
|
||||||
File.WriteAllText(distributionPath, formattedDistContents);
|
File.WriteAllText(distributionPath, formattedDistContents);
|
||||||
|
|
||||||
Cmd("productbuild",
|
Cmd("productbuild",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue