diff options
| author | Rob Mensching <rob@firegiant.com> | 2022-12-06 15:55:18 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2022-12-06 17:29:07 -0800 |
| commit | fb0a8b74b598331dcf037d97a3adf89f5fe5ba92 (patch) | |
| tree | e66f9b50a04a2589602c89cab8449e2bb9a8e88d /src/tools/heat | |
| parent | aa591db212c3df5a5c9f501c01fb1fbf2deadb7c (diff) | |
| download | wix-fb0a8b74b598331dcf037d97a3adf89f5fe5ba92.tar.gz wix-fb0a8b74b598331dcf037d97a3adf89f5fe5ba92.tar.bz2 wix-fb0a8b74b598331dcf037d97a3adf89f5fe5ba92.zip | |
Correctly harvest registry files with multisz
Fixes 7044
Diffstat (limited to 'src/tools/heat')
| -rw-r--r-- | src/tools/heat/RegFileHarvester.cs | 2 | ||||
| -rw-r--r-- | src/tools/heat/RegistryHarvester.cs | 4 | ||||
| -rw-r--r-- | src/tools/heat/Serialize/wix.cs | 24 | ||||
| -rw-r--r-- | src/tools/heat/UtilFinalizeHarvesterMutator.cs | 4 | ||||
| -rw-r--r-- | src/tools/heat/UtilMutator.cs | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/tools/heat/RegFileHarvester.cs b/src/tools/heat/RegFileHarvester.cs index fcb4a9c2..49cf4c01 100644 --- a/src/tools/heat/RegFileHarvester.cs +++ b/src/tools/heat/RegFileHarvester.cs | |||
| @@ -200,7 +200,7 @@ namespace WixToolset.Harvesters | |||
| 200 | foreach (string part in parts) | 200 | foreach (string part in parts) |
| 201 | { | 201 | { |
| 202 | Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); | 202 | Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); |
| 203 | multiStringValue.Content = part; | 203 | multiStringValue.Value = part; |
| 204 | registryValue.AddChild(multiStringValue); | 204 | registryValue.AddChild(multiStringValue); |
| 205 | } | 205 | } |
| 206 | 206 | ||
diff --git a/src/tools/heat/RegistryHarvester.cs b/src/tools/heat/RegistryHarvester.cs index 0dfd3a29..71dd3962 100644 --- a/src/tools/heat/RegistryHarvester.cs +++ b/src/tools/heat/RegistryHarvester.cs | |||
| @@ -295,7 +295,7 @@ namespace WixToolset.Harvesters | |||
| 295 | { | 295 | { |
| 296 | Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); | 296 | Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); |
| 297 | 297 | ||
| 298 | multiStringValue.Content = String.Empty; | 298 | multiStringValue.Value = String.Empty; |
| 299 | 299 | ||
| 300 | registryValue.AddChild(multiStringValue); | 300 | registryValue.AddChild(multiStringValue); |
| 301 | } | 301 | } |
| @@ -305,7 +305,7 @@ namespace WixToolset.Harvesters | |||
| 305 | { | 305 | { |
| 306 | Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); | 306 | Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); |
| 307 | 307 | ||
| 308 | multiStringValue.Content = multiStringValueContent; | 308 | multiStringValue.Value = multiStringValueContent; |
| 309 | 309 | ||
| 310 | registryValue.AddChild(multiStringValue); | 310 | registryValue.AddChild(multiStringValue); |
| 311 | } | 311 | } |
diff --git a/src/tools/heat/Serialize/wix.cs b/src/tools/heat/Serialize/wix.cs index a3d9b33b..cb62079d 100644 --- a/src/tools/heat/Serialize/wix.cs +++ b/src/tools/heat/Serialize/wix.cs | |||
| @@ -27422,9 +27422,9 @@ namespace WixToolset.Harvesters.Serialize | |||
| 27422 | 27422 | ||
| 27423 | private ISchemaElement parentElement; | 27423 | private ISchemaElement parentElement; |
| 27424 | 27424 | ||
| 27425 | private string contentField; | 27425 | private string valueField; |
| 27426 | 27426 | ||
| 27427 | private bool contentFieldSet; | 27427 | private bool valueFieldSet; |
| 27428 | 27428 | ||
| 27429 | public virtual ISchemaElement ParentElement | 27429 | public virtual ISchemaElement ParentElement |
| 27430 | { | 27430 | { |
| @@ -27441,18 +27441,18 @@ namespace WixToolset.Harvesters.Serialize | |||
| 27441 | /// <summary> | 27441 | /// <summary> |
| 27442 | /// Use several of these elements to specify each registry value in a multiString registry value. This element | 27442 | /// Use several of these elements to specify each registry value in a multiString registry value. This element |
| 27443 | /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The | 27443 | /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The |
| 27444 | /// values should go in the text area of the MultiStringValue element. | 27444 | /// values should go in the Value attribute of the MultiStringValue element. |
| 27445 | /// </summary> | 27445 | /// </summary> |
| 27446 | public string Content | 27446 | public string Value |
| 27447 | { | 27447 | { |
| 27448 | get | 27448 | get |
| 27449 | { | 27449 | { |
| 27450 | return this.contentField; | 27450 | return this.valueField; |
| 27451 | } | 27451 | } |
| 27452 | set | 27452 | set |
| 27453 | { | 27453 | { |
| 27454 | this.contentFieldSet = true; | 27454 | this.valueFieldSet = true; |
| 27455 | this.contentField = value; | 27455 | this.valueField = value; |
| 27456 | } | 27456 | } |
| 27457 | } | 27457 | } |
| 27458 | 27458 | ||
| @@ -27463,10 +27463,10 @@ namespace WixToolset.Harvesters.Serialize | |||
| 27463 | { | 27463 | { |
| 27464 | throw new ArgumentNullException("name"); | 27464 | throw new ArgumentNullException("name"); |
| 27465 | } | 27465 | } |
| 27466 | if (("Content" == name)) | 27466 | if (("Value" == name)) |
| 27467 | { | 27467 | { |
| 27468 | this.contentField = value; | 27468 | this.valueField = value; |
| 27469 | this.contentFieldSet = true; | 27469 | this.valueFieldSet = true; |
| 27470 | } | 27470 | } |
| 27471 | } | 27471 | } |
| 27472 | 27472 | ||
| @@ -27480,9 +27480,9 @@ namespace WixToolset.Harvesters.Serialize | |||
| 27480 | throw new ArgumentNullException("writer"); | 27480 | throw new ArgumentNullException("writer"); |
| 27481 | } | 27481 | } |
| 27482 | writer.WriteStartElement("MultiStringValue", "http://wixtoolset.org/schemas/v4/wxs"); | 27482 | writer.WriteStartElement("MultiStringValue", "http://wixtoolset.org/schemas/v4/wxs"); |
| 27483 | if (this.contentFieldSet) | 27483 | if (this.valueFieldSet) |
| 27484 | { | 27484 | { |
| 27485 | writer.WriteString(this.contentField); | 27485 | writer.WriteAttributeString("Value", this.valueField); |
| 27486 | } | 27486 | } |
| 27487 | writer.WriteEndElement(); | 27487 | writer.WriteEndElement(); |
| 27488 | } | 27488 | } |
diff --git a/src/tools/heat/UtilFinalizeHarvesterMutator.cs b/src/tools/heat/UtilFinalizeHarvesterMutator.cs index 5af56e89..61bb8731 100644 --- a/src/tools/heat/UtilFinalizeHarvesterMutator.cs +++ b/src/tools/heat/UtilFinalizeHarvesterMutator.cs | |||
| @@ -1076,9 +1076,9 @@ namespace WixToolset.Harvesters | |||
| 1076 | foreach (Wix.MultiStringValue multiStringValue in registryValue.Children) | 1076 | foreach (Wix.MultiStringValue multiStringValue in registryValue.Children) |
| 1077 | { | 1077 | { |
| 1078 | // first replace file paths with their MSI tokens | 1078 | // first replace file paths with their MSI tokens |
| 1079 | multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)this.filePaths); | 1079 | multiStringValue.Value = this.MutateRegistryString(multiStringValue.Value, (ICollection)this.filePaths); |
| 1080 | // next replace directory paths with their MSI tokens | 1080 | // next replace directory paths with their MSI tokens |
| 1081 | multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)reversedDirectoryPaths); | 1081 | multiStringValue.Value = this.MutateRegistryString(multiStringValue.Value, (ICollection)reversedDirectoryPaths); |
| 1082 | } | 1082 | } |
| 1083 | } | 1083 | } |
| 1084 | else | 1084 | else |
diff --git a/src/tools/heat/UtilMutator.cs b/src/tools/heat/UtilMutator.cs index 287f5f5e..80fd470c 100644 --- a/src/tools/heat/UtilMutator.cs +++ b/src/tools/heat/UtilMutator.cs | |||
| @@ -246,7 +246,7 @@ namespace WixToolset.Harvesters | |||
| 246 | c.Directory = parentDirectory.Id; | 246 | c.Directory = parentDirectory.Id; |
| 247 | parentDirectory.RemoveChild(c); | 247 | parentDirectory.RemoveChild(c); |
| 248 | } | 248 | } |
| 249 | else if (c.ParentElement is Wix.DirectoryRef) | 249 | else if (c.ParentElement is Wix.DirectoryRef || c.ParentElement is Wix.StandardDirectory) |
| 250 | { | 250 | { |
| 251 | var parentDirectory = c.ParentElement as Wix.DirectoryBase; | 251 | var parentDirectory = c.ParentElement as Wix.DirectoryBase; |
| 252 | 252 | ||
