From fecacf19e8ea73500b7a936f809dc92f7317886b Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 10 Apr 2020 15:46:09 +1000 Subject: Update CreateBootstrapperApplicationManifest to better match v3 output. --- ...CreateBootstrapperApplicationManifestCommand.cs | 60 +++++++++++++++++----- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs index be8227f2..1ef5bb2e 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs @@ -83,7 +83,7 @@ namespace WixToolset.Core.Burn.Bundles writer.WriteAttributeString("DisplayName", this.BundleTuple.Name); writer.WriteAttributeString("LogPathVariable", this.BundleTuple.LogPathVariable); writer.WriteAttributeString("Compressed", this.BundleTuple.Compressed == true ? "yes" : "no"); - writer.WriteAttributeString("BundleId", this.BundleTuple.BundleId.ToUpperInvariant()); + writer.WriteAttributeString("Id", this.BundleTuple.BundleId.ToUpperInvariant()); writer.WriteAttributeString("UpgradeCode", this.BundleTuple.UpgradeCode); writer.WriteAttributeString("PerMachine", this.BundleTuple.PerMachine ? "yes" : "no"); @@ -98,12 +98,21 @@ namespace WixToolset.Core.Burn.Bundles var size = package.PackageTuple.Size.ToString(CultureInfo.InvariantCulture); - writer.WriteStartElement("WixBundleProperties"); + writer.WriteStartElement("WixPackageProperties"); writer.WriteAttributeString("Package", package.PackageId); writer.WriteAttributeString("Vital", package.PackageTuple.Vital == true ? "yes" : "no"); - writer.WriteAttributeString("DisplayName", package.PackageTuple.DisplayName); - writer.WriteAttributeString("Description", package.PackageTuple.Description); + + if (!String.IsNullOrEmpty(package.PackageTuple.DisplayName)) + { + writer.WriteAttributeString("DisplayName", package.PackageTuple.DisplayName); + } + + if (!String.IsNullOrEmpty(package.PackageTuple.Description)) + { + writer.WriteAttributeString("Description", package.PackageTuple.Description); + } + writer.WriteAttributeString("DownloadSize", size); writer.WriteAttributeString("PackageSize", size); writer.WriteAttributeString("InstalledSize", package.PackageTuple.InstallSize?.ToString(CultureInfo.InvariantCulture) ?? size); @@ -175,9 +184,22 @@ namespace WixToolset.Core.Burn.Bundles writer.WriteAttributeString("Package", featureTuple.PackageRef); writer.WriteAttributeString("Feature", featureTuple.Name); writer.WriteAttributeString("Size", featureTuple.Size.ToString(CultureInfo.InvariantCulture)); - writer.WriteAttributeString("Parent", featureTuple.Parent); - writer.WriteAttributeString("Title", featureTuple.Title); - writer.WriteAttributeString("Description", featureTuple.Description); + + if (!String.IsNullOrEmpty(featureTuple.Parent)) + { + writer.WriteAttributeString("Parent", featureTuple.Parent); + } + + if (!String.IsNullOrEmpty(featureTuple.Title)) + { + writer.WriteAttributeString("Title", featureTuple.Title); + } + + if (!String.IsNullOrEmpty(featureTuple.Description)) + { + writer.WriteAttributeString("Description", featureTuple.Description); + } + writer.WriteAttributeString("Display", featureTuple.Display.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("Level", featureTuple.Level.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("Directory", featureTuple.Directory); @@ -193,14 +215,28 @@ namespace WixToolset.Core.Burn.Bundles foreach (var payloadTuple in payloadTuples) { - writer.WriteStartElement("WixPackageFeatureInfo"); + writer.WriteStartElement("WixPayloadProperties"); + + writer.WriteAttributeString("Payload", payloadTuple.Id.Id); + + if (!String.IsNullOrEmpty(payloadTuple.PackageRef)) + { + writer.WriteAttributeString("Package", payloadTuple.PackageRef); + } + + if (!String.IsNullOrEmpty(payloadTuple.ContainerRef)) + { + writer.WriteAttributeString("Container", payloadTuple.ContainerRef); + } - writer.WriteAttributeString("Id", payloadTuple.Id.Id); - writer.WriteAttributeString("Package", payloadTuple.PackageRef); - writer.WriteAttributeString("Container", payloadTuple.ContainerRef); writer.WriteAttributeString("Name", payloadTuple.Name); writer.WriteAttributeString("Size", payloadTuple.FileSize.ToString(CultureInfo.InvariantCulture)); - writer.WriteAttributeString("DownloadUrl", payloadTuple.DownloadUrl); + + if (!String.IsNullOrEmpty(payloadTuple.DownloadUrl)) + { + writer.WriteAttributeString("DownloadUrl", payloadTuple.DownloadUrl); + } + writer.WriteAttributeString("LayoutOnly", payloadTuple.LayoutOnly ? "yes" : "no"); writer.WriteEndElement(); -- cgit v1.2.3-55-g6feb