private void CreateContainer(WixBundleContainerSymbol container, IEnumerable <WixBundlePayloadSymbol> containerPayloads) { var command = new CreateContainerCommand(containerPayloads, container.WorkingPath, this.DefaultCompressionLevel); command.Execute(); container.Hash = command.Hash; container.Size = command.Size; }
public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleSymbol bundleSymbol, WixBundleContainerSymbol uxContainer, IEnumerable <WixBundleContainerSymbol> containers) { this.Messaging = messaging; this.BackendHelper = backendHelper; this.IntermediateFolder = intermediateFolder; this.OutputPath = outputPath; this.BundleSymbol = bundleSymbol; this.UXContainer = uxContainer; this.Containers = containers; }
private void WriteBurnManifestContainerAttributes(XmlTextWriter writer, string executableName, WixBundleContainerSymbol container) { writer.WriteAttributeString("Id", container.Id.Id); writer.WriteAttributeString("FileSize", container.Size.Value.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("Hash", container.Hash); if (ContainerType.Detached == container.Type) { if (!String.IsNullOrEmpty(container.DownloadUrl)) { writer.WriteAttributeString("DownloadUrl", container.DownloadUrl); } writer.WriteAttributeString("FilePath", container.Name); } else if (ContainerType.Attached == container.Type) { writer.WriteAttributeString("FilePath", executableName); // attached containers use the name of the bundle since they are attached to the executable. writer.WriteAttributeString("AttachedIndex", container.AttachedContainerIndex.Value.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("Attached", "yes"); writer.WriteAttributeString("Primary", "yes"); } }
private void WriteBurnManifestContainerAttributes(XmlTextWriter writer, string executableName, WixBundleContainerSymbol container) { writer.WriteAttributeString("Id", container.Id.Id); writer.WriteAttributeString("FileSize", container.Size.Value.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("Hash", container.Hash); if (ContainerType.Detached == container.Type) { string resolvedUrl = this.ResolveUrl(container.DownloadUrl, null, null, container.Id.Id, container.Name); if (!String.IsNullOrEmpty(resolvedUrl)) { writer.WriteAttributeString("DownloadUrl", resolvedUrl); } else if (!String.IsNullOrEmpty(container.DownloadUrl)) { writer.WriteAttributeString("DownloadUrl", container.DownloadUrl); } writer.WriteAttributeString("FilePath", container.Name); } else if (ContainerType.Attached == container.Type) { if (!String.IsNullOrEmpty(container.DownloadUrl)) { this.Messaging.Write(WarningMessages.DownloadUrlNotSupportedForAttachedContainers(container.SourceLineNumbers, container.Id.Id)); } writer.WriteAttributeString("FilePath", executableName); // attached containers use the name of the bundle since they are attached to the executable. writer.WriteAttributeString("AttachedIndex", container.AttachedContainerIndex.Value.ToString(CultureInfo.InvariantCulture)); writer.WriteAttributeString("Attached", "yes"); writer.WriteAttributeString("Primary", "yes"); } }