diff options
author | Rob Mensching <rob@firegiant.com> | 2022-10-04 13:21:14 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-10-04 14:23:47 -0700 |
commit | bec7063ae6bef19c4deb62afab7c529e739bbfa9 (patch) | |
tree | 2eac8d5a584e8edf6d0bd4cef80a63883bb3ae36 /src | |
parent | 9a18c230cfd88996b43c8ff7c59a195fb34ed3cf (diff) | |
download | wix-bec7063ae6bef19c4deb62afab7c529e739bbfa9.tar.gz wix-bec7063ae6bef19c4deb62afab7c529e739bbfa9.tar.bz2 wix-bec7063ae6bef19c4deb62afab7c529e739bbfa9.zip |
Fix tracking of detached containers
Detached containers were being tracked as both a BuiltContentOutput
and Temporary file. That caused the detached containers to be
cleaned up and unavailable for the bundle after the build.
Also removed the unused ITrackedFile.Clean property.
Diffstat (limited to 'src')
5 files changed, 5 insertions, 15 deletions
diff --git a/src/api/wix/WixToolset.Extensibility/Data/ITrackedFile.cs b/src/api/wix/WixToolset.Extensibility/Data/ITrackedFile.cs index df36bd2b..771531e8 100644 --- a/src/api/wix/WixToolset.Extensibility/Data/ITrackedFile.cs +++ b/src/api/wix/WixToolset.Extensibility/Data/ITrackedFile.cs | |||
@@ -10,11 +10,6 @@ namespace WixToolset.Extensibility.Data | |||
10 | public interface ITrackedFile | 10 | public interface ITrackedFile |
11 | { | 11 | { |
12 | /// <summary> | 12 | /// <summary> |
13 | /// Indicates whether the tracked file should be cleaned by the project. | ||
14 | /// </summary> | ||
15 | bool Clean { get; set; } | ||
16 | |||
17 | /// <summary> | ||
18 | /// Path to tracked file. | 13 | /// Path to tracked file. |
19 | /// </summary> | 14 | /// </summary> |
20 | string Path { get; set; } | 15 | string Path { get; set; } |
diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index 6ae3520f..621be346 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | |||
@@ -484,7 +484,7 @@ namespace WixToolset.Core.Burn | |||
484 | uxContainer.Hash = command.Hash; | 484 | uxContainer.Hash = command.Hash; |
485 | uxContainer.Size = command.Size; | 485 | uxContainer.Size = command.Size; |
486 | 486 | ||
487 | trackedFiles.Add(this.BackendHelper.TrackFile(uxContainer.WorkingPath, TrackedFileType.Temporary)); | 487 | trackedFiles.Add(this.BackendHelper.TrackFile(uxContainer.WorkingPath, TrackedFileType.Temporary, uxContainer.SourceLineNumbers)); |
488 | } | 488 | } |
489 | 489 | ||
490 | { | 490 | { |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs index 2df07dd6..8e83408a 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs | |||
@@ -78,8 +78,8 @@ namespace WixToolset.Core.Burn.Bundles | |||
78 | { | 78 | { |
79 | this.UXContainer = container; | 79 | this.UXContainer = container; |
80 | 80 | ||
81 | container.WorkingPath = Path.Combine(this.IntermediateFolder, container.Name); | ||
82 | container.AttachedContainerIndex = 0; | 81 | container.AttachedContainerIndex = 0; |
82 | container.WorkingPath = Path.Combine(this.IntermediateFolder, container.Name); | ||
83 | 83 | ||
84 | // Gather the list of UX payloads but ensure the BootstrapperApplicationDll Payload is the first | 84 | // Gather the list of UX payloads but ensure the BootstrapperApplicationDll Payload is the first |
85 | // in the list since that is the Payload that Burn attempts to load. | 85 | // in the list since that is the Payload that Burn attempts to load. |
@@ -101,9 +101,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
101 | { | 101 | { |
102 | container.WorkingPath = Path.Combine(this.IntermediateFolder, container.Name); | 102 | container.WorkingPath = Path.Combine(this.IntermediateFolder, container.Name); |
103 | 103 | ||
104 | // Add detached containers to the list of file transfers. | ||
105 | if (ContainerType.Detached == container.Type) | 104 | if (ContainerType.Detached == container.Type) |
106 | { | 105 | { |
106 | // Add file transfer to move the detached containers from intermediate build location to the correct output location. | ||
107 | var outputPath = Path.Combine(this.LayoutFolder, container.Name); | 107 | var outputPath = Path.Combine(this.LayoutFolder, container.Name); |
108 | var transfer = this.BackendHelper.CreateFileTransfer(container.WorkingPath, outputPath, true, container.SourceLineNumbers); | 108 | var transfer = this.BackendHelper.CreateFileTransfer(container.WorkingPath, outputPath, true, container.SourceLineNumbers); |
109 | fileTransfers.Add(transfer); | 109 | fileTransfers.Add(transfer); |
@@ -116,6 +116,8 @@ namespace WixToolset.Core.Burn.Bundles | |||
116 | 116 | ||
117 | container.AttachedContainerIndex = attachedContainerIndex; | 117 | container.AttachedContainerIndex = attachedContainerIndex; |
118 | ++attachedContainerIndex; | 118 | ++attachedContainerIndex; |
119 | |||
120 | trackedFiles.Add(this.BackendHelper.TrackFile(container.WorkingPath, TrackedFileType.Temporary, container.SourceLineNumbers)); | ||
119 | } | 121 | } |
120 | } | 122 | } |
121 | } | 123 | } |
@@ -125,7 +127,6 @@ namespace WixToolset.Core.Burn.Bundles | |||
125 | foreach (var container in this.Containers.Where(c => !String.IsNullOrEmpty(c.WorkingPath) && c.Id.Id != BurnConstants.BurnUXContainerName)) | 127 | foreach (var container in this.Containers.Where(c => !String.IsNullOrEmpty(c.WorkingPath) && c.Id.Id != BurnConstants.BurnUXContainerName)) |
126 | { | 128 | { |
127 | this.CreateContainer(container, payloadsByContainer[container.Id.Id]); | 129 | this.CreateContainer(container, payloadsByContainer[container.Id.Id]); |
128 | trackedFiles.Add(this.BackendHelper.TrackFile(container.WorkingPath, TrackedFileType.Temporary, container.SourceLineNumbers)); | ||
129 | } | 130 | } |
130 | } | 131 | } |
131 | 132 | ||
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs index 26b69afb..c5f198f8 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | |||
@@ -113,9 +113,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
113 | fileTransfers.Add(transfer); | 113 | fileTransfers.Add(transfer); |
114 | 114 | ||
115 | var tracked = this.BackendHelper.TrackFile(transfer.Destination, TrackedFileType.CopiedOutput, facade.SourceLineNumber); | 115 | var tracked = this.BackendHelper.TrackFile(transfer.Destination, TrackedFileType.CopiedOutput, facade.SourceLineNumber); |
116 | |||
117 | tracked.Clean = !transfer.Redundant; | ||
118 | |||
119 | trackedFiles.Add(tracked); | 116 | trackedFiles.Add(tracked); |
120 | } | 117 | } |
121 | } | 118 | } |
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs b/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs index c9966bce..542410e4 100644 --- a/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs +++ b/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs | |||
@@ -12,11 +12,8 @@ namespace WixToolset.Core.ExtensibilityServices | |||
12 | this.Path = path; | 12 | this.Path = path; |
13 | this.Type = type; | 13 | this.Type = type; |
14 | this.SourceLineNumbers = sourceLineNumbers; | 14 | this.SourceLineNumbers = sourceLineNumbers; |
15 | this.Clean = (type == TrackedFileType.Intermediate || type == TrackedFileType.BuiltContentOutput || type == TrackedFileType.BuiltTargetOutput || type == TrackedFileType.BuiltPdbOutput || type == TrackedFileType.CopiedOutput); | ||
16 | } | 15 | } |
17 | 16 | ||
18 | public bool Clean { get; set; } | ||
19 | |||
20 | public string Path { get; set; } | 17 | public string Path { get; set; } |
21 | 18 | ||
22 | public SourceLineNumber SourceLineNumbers { get; set; } | 19 | public SourceLineNumber SourceLineNumbers { get; set; } |