diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-05-22 14:47:36 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-05-22 15:25:19 -0700 |
| commit | e8030ca17ff96a794a3fecd66bb01b81581a5451 (patch) | |
| tree | 6f05c2356882f33b375e2372efecf3d60830686b /src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs | |
| parent | d84ed7360adec89569eaab3793e9723f38d2a855 (diff) | |
| download | wix-e8030ca17ff96a794a3fecd66bb01b81581a5451.tar.gz wix-e8030ca17ff96a794a3fecd66bb01b81581a5451.tar.bz2 wix-e8030ca17ff96a794a3fecd66bb01b81581a5451.zip | |
Fix naming of file in a merge module's cabinet
The file was stored in the merge module's cabinet with plain FileId,
without the modularization GUID. This change fixes the cabinet builder
so that it adds the modularization GUID when creating the cabinet.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs index 64257ccf..8b459d69 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/ModularizeCommand.cs | |||
| @@ -15,10 +15,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 15 | 15 | ||
| 16 | internal class ModularizeCommand | 16 | internal class ModularizeCommand |
| 17 | { | 17 | { |
| 18 | public ModularizeCommand(WindowsInstallerData output, string modularizationGuid, IEnumerable<WixSuppressModularizationTuple> suppressTuples) | 18 | public ModularizeCommand(WindowsInstallerData output, string modularizationSuffix, IEnumerable<WixSuppressModularizationTuple> suppressTuples) |
| 19 | { | 19 | { |
| 20 | this.Output = output; | 20 | this.Output = output; |
| 21 | this.ModularizationGuid = modularizationGuid; | 21 | this.ModularizationSuffix = modularizationSuffix; |
| 22 | 22 | ||
| 23 | // Gather all the unique suppress modularization identifiers. | 23 | // Gather all the unique suppress modularization identifiers. |
| 24 | this.SuppressModularizationIdentifiers = new HashSet<string>(suppressTuples.Select(s => s.Id.Id)); | 24 | this.SuppressModularizationIdentifiers = new HashSet<string>(suppressTuples.Select(s => s.Id.Id)); |
| @@ -26,7 +26,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 26 | 26 | ||
| 27 | private WindowsInstallerData Output { get; } | 27 | private WindowsInstallerData Output { get; } |
| 28 | 28 | ||
| 29 | private string ModularizationGuid { get; } | 29 | private string ModularizationSuffix { get; } |
| 30 | 30 | ||
| 31 | private HashSet<string> SuppressModularizationIdentifiers { get; } | 31 | private HashSet<string> SuppressModularizationIdentifiers { get; } |
| 32 | 32 | ||
| @@ -129,7 +129,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 129 | // if we're not supposed to suppress modularization of this identifier | 129 | // if we're not supposed to suppress modularization of this identifier |
| 130 | if (!this.SuppressModularizationIdentifiers.Contains(fieldData)) | 130 | if (!this.SuppressModularizationIdentifiers.Contains(fieldData)) |
| 131 | { | 131 | { |
| 132 | fieldData = String.Concat(fieldData, ".", this.ModularizationGuid); | 132 | fieldData = String.Concat(fieldData, this.ModularizationSuffix); |
| 133 | } | 133 | } |
| 134 | break; | 134 | break; |
| 135 | 135 | ||
| @@ -178,8 +178,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 178 | var identifier = group.Value; | 178 | var identifier = group.Value; |
| 179 | if (!WindowsInstallerStandard.IsStandardProperty(identifier) && !this.SuppressModularizationIdentifiers.Contains(identifier)) | 179 | if (!WindowsInstallerStandard.IsStandardProperty(identifier) && !this.SuppressModularizationIdentifiers.Contains(identifier)) |
| 180 | { | 180 | { |
| 181 | sb.Insert(group.Index + group.Length, '.'); | 181 | sb.Insert(group.Index + group.Length, this.ModularizationSuffix); |
| 182 | sb.Insert(group.Index + group.Length + 1, this.ModularizationGuid); | ||
| 183 | } | 182 | } |
| 184 | } | 183 | } |
| 185 | } | 184 | } |
| @@ -193,7 +192,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 193 | if (!this.SuppressModularizationIdentifiers.Contains(fieldData) && | 192 | if (!this.SuppressModularizationIdentifiers.Contains(fieldData) && |
| 194 | 0 < fieldData.Length && !Char.IsDigit(fieldData, 0)) | 193 | 0 < fieldData.Length && !Char.IsDigit(fieldData, 0)) |
| 195 | { | 194 | { |
| 196 | fieldData = String.Concat(fieldData, ".", this.ModularizationGuid); | 195 | fieldData = String.Concat(fieldData, this.ModularizationSuffix); |
| 197 | } | 196 | } |
| 198 | break; | 197 | break; |
| 199 | 198 | ||
| @@ -203,11 +202,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 203 | var start = fieldData.LastIndexOf(".", StringComparison.Ordinal); | 202 | var start = fieldData.LastIndexOf(".", StringComparison.Ordinal); |
| 204 | if (-1 == start) | 203 | if (-1 == start) |
| 205 | { | 204 | { |
| 206 | fieldData = String.Concat(fieldData, ".", this.ModularizationGuid); | 205 | fieldData = String.Concat(fieldData, this.ModularizationSuffix); |
| 207 | } | 206 | } |
| 208 | else | 207 | else |
| 209 | { | 208 | { |
| 210 | fieldData = String.Concat(fieldData.Substring(0, start), ".", this.ModularizationGuid, fieldData.Substring(start)); | 209 | fieldData = String.Concat(fieldData.Substring(0, start), this.ModularizationSuffix, fieldData.Substring(start)); |
| 211 | } | 210 | } |
| 212 | } | 211 | } |
| 213 | break; | 212 | break; |
| @@ -218,7 +217,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 218 | { | 217 | { |
| 219 | if (!String.IsNullOrEmpty(keys[i])) | 218 | if (!String.IsNullOrEmpty(keys[i])) |
| 220 | { | 219 | { |
| 221 | keys[i] = String.Concat(keys[i], ".", this.ModularizationGuid); | 220 | keys[i] = String.Concat(keys[i], this.ModularizationSuffix); |
| 222 | } | 221 | } |
| 223 | } | 222 | } |
| 224 | 223 | ||
