aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/wix/WixToolset.Data/ErrorMessages.cs14
-rw-r--r--src/api/wix/WixToolset.Data/OutputType.cs1
-rw-r--r--src/api/wix/WixToolset.Data/SectionType.cs1
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/ExternalFilesSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/FamilyFileRangesSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/ImageFamiliesSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/MsiPatchMetadataSymbol.cs31
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/PatchMetadataSymbol.cs31
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/PatchPackageSymbol.cs2
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/PatchSequenceSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs10
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/TargetFilesOptionalDataSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/TargetImagesSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/UpgradedFilesOptionalDataSymbol.cs6
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/UpgradedFilesToIgnoreSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/UpgradedImagesSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/WarningMessages.cs18
-rw-r--r--src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs2
-rw-r--r--src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs13
-rw-r--r--src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/data.xsd1
-rw-r--r--src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd1
-rw-r--r--src/wix/WixToolset.Converters.Symbolizer/ConvertSymbols.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs47
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs627
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Decompile/Names.cs8
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendFactory.cs4
-rw-r--r--src/wix/WixToolset.Core/CommandLine/BuildCommand.cs7
-rw-r--r--src/wix/WixToolset.Core/Compiler.cs151
-rw-r--r--src/wix/WixToolset.Core/CompilerWarnings.cs6
-rw-r--r--src/wix/WixToolset.Core/Compiler_Patch.cs83
-rw-r--r--src/wix/WixToolset.Core/Compiler_PatchCreation.cs1265
-rw-r--r--src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs2
-rw-r--r--src/wix/WixToolset.Sdk/tools/wix.targets3
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs4
-rw-r--r--src/xsd/wix.xsd507
35 files changed, 316 insertions, 2595 deletions
diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs
index 4052917c..f3add0a1 100644
--- a/src/api/wix/WixToolset.Data/ErrorMessages.cs
+++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs
@@ -563,11 +563,6 @@ namespace WixToolset.Data
563 return Message(null, Ids.ExpectedPatchIdInWixMsp, "The WixMsp is missing the patch ID."); 563 return Message(null, Ids.ExpectedPatchIdInWixMsp, "The WixMsp is missing the patch ID.");
564 } 564 }
565 565
566 public static Message ExpectedRowInPatchCreationPackage(string tableName)
567 {
568 return Message(null, Ids.ExpectedRowInPatchCreationPackage, "Could not find a row in the '{0}' table for this patch creation package. Patch creation packages must contain at least one row in the '{0}' table.", tableName);
569 }
570
571 public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers) 566 public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers)
572 { 567 {
573 return Message(sourceLineNumbers, Ids.ExpectedSignedCabinetName, "The Media/@Cabinet attribute was not found; it is required when this element contains a DigitalSignature child element. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or specify a valid external cabinet name via the Cabinet attribute."); 568 return Message(sourceLineNumbers, Ids.ExpectedSignedCabinetName, "The Media/@Cabinet attribute was not found; it is required when this element contains a DigitalSignature child element. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or specify a valid external cabinet name via the Cabinet attribute.");
@@ -1413,7 +1408,7 @@ namespace WixToolset.Data
1413 1408
1414 public static Message MissingEntrySection() 1409 public static Message MissingEntrySection()
1415 { 1410 {
1416 return Message(null, Ids.MissingEntrySection, "Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, PatchCreation, Module."); 1411 return Message(null, Ids.MissingEntrySection, "Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, Module.");
1417 } 1412 }
1418 1413
1419 public static Message MissingEntrySection(string sectionType) 1414 public static Message MissingEntrySection(string sectionType)
@@ -2056,11 +2051,6 @@ namespace WixToolset.Data
2056 return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName); 2051 return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName);
2057 } 2052 }
2058 2053
2059 public static Message UnexpectedTableInPatchCreationPackage(SourceLineNumber sourceLineNumbers, string tableName)
2060 {
2061 return Message(sourceLineNumbers, Ids.UnexpectedTableInPatchCreationPackage, "An unexpected row in the '{0}' table was found in this patch creation package. Patch creation packages cannot contain the '{0}' table.", tableName);
2062 }
2063
2064 public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace) 2054 public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace)
2065 { 2055 {
2066 return Message(sourceLineNumbers, Ids.UnhandledExtensionAttribute, "The {0} element contains an unhandled extension attribute '{1}'. Please ensure that the extension for attributes in the '{2}' namespace has been provided.", elementName, extensionAttributeName, extensionNamespace); 2056 return Message(sourceLineNumbers, Ids.UnhandledExtensionAttribute, "The {0} element contains an unhandled extension attribute '{1}'. Please ensure that the extension for attributes in the '{2}' namespace has been provided.", elementName, extensionAttributeName, extensionNamespace);
@@ -2435,9 +2425,7 @@ namespace WixToolset.Data
2435 NoUniqueActionSequenceNumber2 = 180, 2425 NoUniqueActionSequenceNumber2 = 180,
2436 ActionScheduledRelativeToItself = 181, 2426 ActionScheduledRelativeToItself = 181,
2437 MissingTableDefinition = 182, 2427 MissingTableDefinition = 182,
2438 ExpectedRowInPatchCreationPackage = 183,
2439 UnexpectedTableInMergeModule = 184, 2428 UnexpectedTableInMergeModule = 184,
2440 UnexpectedTableInPatchCreationPackage = 185,
2441 MergeExcludedModule = 186, 2429 MergeExcludedModule = 186,
2442 MergeFeatureRequired = 187, 2430 MergeFeatureRequired = 187,
2443 MergeLanguageFailed = 188, 2431 MergeLanguageFailed = 188,
diff --git a/src/api/wix/WixToolset.Data/OutputType.cs b/src/api/wix/WixToolset.Data/OutputType.cs
index abe484bd..ceb1c011 100644
--- a/src/api/wix/WixToolset.Data/OutputType.cs
+++ b/src/api/wix/WixToolset.Data/OutputType.cs
@@ -25,6 +25,7 @@ namespace WixToolset.Data
25 Patch, 25 Patch,
26 26
27 /// <summary>Patch Creation output type.</summary> 27 /// <summary>Patch Creation output type.</summary>
28 [Obsolete]
28 PatchCreation, 29 PatchCreation,
29 30
30 /// <summary>Package output type.</summary> 31 /// <summary>Package output type.</summary>
diff --git a/src/api/wix/WixToolset.Data/SectionType.cs b/src/api/wix/WixToolset.Data/SectionType.cs
index 21fb5eac..d58154dd 100644
--- a/src/api/wix/WixToolset.Data/SectionType.cs
+++ b/src/api/wix/WixToolset.Data/SectionType.cs
@@ -29,6 +29,7 @@ namespace WixToolset.Data
29 Product = Package, 29 Product = Package,
30 30
31 /// <summary>Patch creation section type.</summary> 31 /// <summary>Patch creation section type.</summary>
32 [Obsolete]
32 PatchCreation, 33 PatchCreation,
33 34
34 /// <summary>Patch section type.</summary> 35 /// <summary>Patch section type.</summary>
diff --git a/src/api/wix/WixToolset.Data/Symbols/ExternalFilesSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/ExternalFilesSymbol.cs
index 87888f0b..4e91ec5b 100644
--- a/src/api/wix/WixToolset.Data/Symbols/ExternalFilesSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/ExternalFilesSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition ExternalFiles = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition ExternalFiles = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.ExternalFiles, 12 SymbolDefinitionType.ExternalFiles,
11 new[] 13 new[]
@@ -25,6 +27,9 @@ namespace WixToolset.Data
25 27
26namespace WixToolset.Data.Symbols 28namespace WixToolset.Data.Symbols
27{ 29{
30 using System;
31
32 [Obsolete]
28 public enum ExternalFilesSymbolFields 33 public enum ExternalFilesSymbolFields
29 { 34 {
30 Family, 35 Family,
@@ -37,6 +42,7 @@ namespace WixToolset.Data.Symbols
37 Order, 42 Order,
38 } 43 }
39 44
45 [Obsolete]
40 public class ExternalFilesSymbol : IntermediateSymbol 46 public class ExternalFilesSymbol : IntermediateSymbol
41 { 47 {
42 public ExternalFilesSymbol() : base(SymbolDefinitions.ExternalFiles, null, null) 48 public ExternalFilesSymbol() : base(SymbolDefinitions.ExternalFiles, null, null)
@@ -97,4 +103,4 @@ namespace WixToolset.Data.Symbols
97 set => this.Set((int)ExternalFilesSymbolFields.Order, value); 103 set => this.Set((int)ExternalFilesSymbolFields.Order, value);
98 } 104 }
99 } 105 }
100} \ No newline at end of file 106}
diff --git a/src/api/wix/WixToolset.Data/Symbols/FamilyFileRangesSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/FamilyFileRangesSymbol.cs
index 84cd5b4b..f3400de0 100644
--- a/src/api/wix/WixToolset.Data/Symbols/FamilyFileRangesSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/FamilyFileRangesSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition FamilyFileRanges = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition FamilyFileRanges = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.FamilyFileRanges, 12 SymbolDefinitionType.FamilyFileRanges,
11 new[] 13 new[]
@@ -21,6 +23,9 @@ namespace WixToolset.Data
21 23
22namespace WixToolset.Data.Symbols 24namespace WixToolset.Data.Symbols
23{ 25{
26 using System;
27
28 [Obsolete]
24 public enum FamilyFileRangesSymbolFields 29 public enum FamilyFileRangesSymbolFields
25 { 30 {
26 Family, 31 Family,
@@ -29,6 +34,7 @@ namespace WixToolset.Data.Symbols
29 RetainLengths, 34 RetainLengths,
30 } 35 }
31 36
37 [Obsolete]
32 public class FamilyFileRangesSymbol : IntermediateSymbol 38 public class FamilyFileRangesSymbol : IntermediateSymbol
33 { 39 {
34 public FamilyFileRangesSymbol() : base(SymbolDefinitions.FamilyFileRanges, null, null) 40 public FamilyFileRangesSymbol() : base(SymbolDefinitions.FamilyFileRanges, null, null)
@@ -65,4 +71,4 @@ namespace WixToolset.Data.Symbols
65 set => this.Set((int)FamilyFileRangesSymbolFields.RetainLengths, value); 71 set => this.Set((int)FamilyFileRangesSymbolFields.RetainLengths, value);
66 } 72 }
67 } 73 }
68} \ No newline at end of file 74}
diff --git a/src/api/wix/WixToolset.Data/Symbols/ImageFamiliesSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/ImageFamiliesSymbol.cs
index 090628ef..39ac8ea0 100644
--- a/src/api/wix/WixToolset.Data/Symbols/ImageFamiliesSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/ImageFamiliesSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition ImageFamilies = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition ImageFamilies = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.ImageFamilies, 12 SymbolDefinitionType.ImageFamilies,
11 new[] 13 new[]
@@ -23,6 +25,9 @@ namespace WixToolset.Data
23 25
24namespace WixToolset.Data.Symbols 26namespace WixToolset.Data.Symbols
25{ 27{
28 using System;
29
30 [Obsolete]
26 public enum ImageFamiliesSymbolFields 31 public enum ImageFamiliesSymbolFields
27 { 32 {
28 Family, 33 Family,
@@ -33,6 +38,7 @@ namespace WixToolset.Data.Symbols
33 VolumeLabel, 38 VolumeLabel,
34 } 39 }
35 40
41 [Obsolete]
36 public class ImageFamiliesSymbol : IntermediateSymbol 42 public class ImageFamiliesSymbol : IntermediateSymbol
37 { 43 {
38 public ImageFamiliesSymbol() : base(SymbolDefinitions.ImageFamilies, null, null) 44 public ImageFamiliesSymbol() : base(SymbolDefinitions.ImageFamilies, null, null)
@@ -81,4 +87,4 @@ namespace WixToolset.Data.Symbols
81 set => this.Set((int)ImageFamiliesSymbolFields.VolumeLabel, value); 87 set => this.Set((int)ImageFamiliesSymbolFields.VolumeLabel, value);
82 } 88 }
83 } 89 }
84} \ No newline at end of file 90}
diff --git a/src/api/wix/WixToolset.Data/Symbols/MsiPatchMetadataSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/MsiPatchMetadataSymbol.cs
index 682adbca..599883dc 100644
--- a/src/api/wix/WixToolset.Data/Symbols/MsiPatchMetadataSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/MsiPatchMetadataSymbol.cs
@@ -20,6 +20,8 @@ namespace WixToolset.Data
20 20
21namespace WixToolset.Data.Symbols 21namespace WixToolset.Data.Symbols
22{ 22{
23 using System;
24
23 public enum MsiPatchMetadataSymbolFields 25 public enum MsiPatchMetadataSymbolFields
24 { 26 {
25 Company, 27 Company,
@@ -27,6 +29,33 @@ namespace WixToolset.Data.Symbols
27 Value, 29 Value,
28 } 30 }
29 31
32 /// <summary>
33 /// Values for the OptimizeCA MsiPatchMetdata property, which indicates whether custom actions can be skipped when applying the patch.
34 /// </summary>
35 [Flags]
36 public enum OptimizeCAFlags
37 {
38 /// <summary>
39 /// No custom actions are skipped.
40 /// </summary>
41 None = 0,
42
43 /// <summary>
44 /// Skip property (type 51) and directory (type 35) assignment custom actions.
45 /// </summary>
46 SkipAssignment = 1,
47
48 /// <summary>
49 /// Skip immediate custom actions that are not property or directory assignment custom actions.
50 /// </summary>
51 SkipImmediate = 2,
52
53 /// <summary>
54 /// Skip custom actions that run within the script.
55 /// </summary>
56 SkipDeferred = 4
57 }
58
30 public class MsiPatchMetadataSymbol : IntermediateSymbol 59 public class MsiPatchMetadataSymbol : IntermediateSymbol
31 { 60 {
32 public MsiPatchMetadataSymbol() : base(SymbolDefinitions.MsiPatchMetadata, null, null) 61 public MsiPatchMetadataSymbol() : base(SymbolDefinitions.MsiPatchMetadata, null, null)
@@ -57,4 +86,4 @@ namespace WixToolset.Data.Symbols
57 set => this.Set((int)MsiPatchMetadataSymbolFields.Value, value); 86 set => this.Set((int)MsiPatchMetadataSymbolFields.Value, value);
58 } 87 }
59 } 88 }
60} \ No newline at end of file 89}
diff --git a/src/api/wix/WixToolset.Data/Symbols/PatchMetadataSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/PatchMetadataSymbol.cs
index 201b8444..ec8b9a5e 100644
--- a/src/api/wix/WixToolset.Data/Symbols/PatchMetadataSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/PatchMetadataSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition PatchMetadata = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition PatchMetadata = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.PatchMetadata, 12 SymbolDefinitionType.PatchMetadata,
11 new[] 13 new[]
@@ -22,6 +24,7 @@ namespace WixToolset.Data.Symbols
22{ 24{
23 using System; 25 using System;
24 26
27 [Obsolete]
25 public enum PatchMetadataSymbolFields 28 public enum PatchMetadataSymbolFields
26 { 29 {
27 Company, 30 Company,
@@ -29,33 +32,7 @@ namespace WixToolset.Data.Symbols
29 Value, 32 Value,
30 } 33 }
31 34
32 /// <summary> 35 [Obsolete]
33 /// Values for the OptimizeCA MsiPatchMetdata property, which indicates whether custom actions can be skipped when applying the patch.
34 /// </summary>
35 [Flags]
36 public enum OptimizeCAFlags
37 {
38 /// <summary>
39 /// No custom actions are skipped.
40 /// </summary>
41 None = 0,
42
43 /// <summary>
44 /// Skip property (type 51) and directory (type 35) assignment custom actions.
45 /// </summary>
46 SkipAssignment = 1,
47
48 /// <summary>
49 /// Skip immediate custom actions that are not property or directory assignment custom actions.
50 /// </summary>
51 SkipImmediate = 2,
52
53 /// <summary>
54 /// Skip custom actions that run within the script.
55 /// </summary>
56 SkipDeferred = 4
57 }
58
59 public class PatchMetadataSymbol : IntermediateSymbol 36 public class PatchMetadataSymbol : IntermediateSymbol
60 { 37 {
61 public PatchMetadataSymbol() : base(SymbolDefinitions.PatchMetadata, null, null) 38 public PatchMetadataSymbol() : base(SymbolDefinitions.PatchMetadata, null, null)
diff --git a/src/api/wix/WixToolset.Data/Symbols/PatchPackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/PatchPackageSymbol.cs
index 0efdfd25..2d8b3f81 100644
--- a/src/api/wix/WixToolset.Data/Symbols/PatchPackageSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/PatchPackageSymbol.cs
@@ -49,4 +49,4 @@ namespace WixToolset.Data.Symbols
49 set => this.Set((int)PatchPackageSymbolFields.MediaDiskIdRef, value); 49 set => this.Set((int)PatchPackageSymbolFields.MediaDiskIdRef, value);
50 } 50 }
51 } 51 }
52} \ No newline at end of file 52}
diff --git a/src/api/wix/WixToolset.Data/Symbols/PatchSequenceSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/PatchSequenceSymbol.cs
index a4cbca61..d769651f 100644
--- a/src/api/wix/WixToolset.Data/Symbols/PatchSequenceSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/PatchSequenceSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition PatchSequence = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition PatchSequence = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.PatchSequence, 12 SymbolDefinitionType.PatchSequence,
11 new[] 13 new[]
@@ -21,6 +23,9 @@ namespace WixToolset.Data
21 23
22namespace WixToolset.Data.Symbols 24namespace WixToolset.Data.Symbols
23{ 25{
26 using System;
27
28 [Obsolete]
24 public enum PatchSequenceSymbolFields 29 public enum PatchSequenceSymbolFields
25 { 30 {
26 PatchFamily, 31 PatchFamily,
@@ -29,6 +34,7 @@ namespace WixToolset.Data.Symbols
29 Supersede, 34 Supersede,
30 } 35 }
31 36
37 [Obsolete]
32 public class PatchSequenceSymbol : IntermediateSymbol 38 public class PatchSequenceSymbol : IntermediateSymbol
33 { 39 {
34 public PatchSequenceSymbol() : base(SymbolDefinitions.PatchSequence, null, null) 40 public PatchSequenceSymbol() : base(SymbolDefinitions.PatchSequence, null, null)
@@ -65,4 +71,4 @@ namespace WixToolset.Data.Symbols
65 set => this.Set((int)PatchSequenceSymbolFields.Supersede, value); 71 set => this.Set((int)PatchSequenceSymbolFields.Supersede, value);
66 } 72 }
67 } 73 }
68} \ No newline at end of file 74}
diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
index 64c1a2a5..ad4b2e11 100644
--- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
@@ -4,6 +4,7 @@ namespace WixToolset.Data
4{ 4{
5 using System; 5 using System;
6 6
7#pragma warning disable CS0612 // includes some obsolete symbol definitions
7 public enum SymbolDefinitionType 8 public enum SymbolDefinitionType
8 { 9 {
9 SummaryInformation, 10 SummaryInformation,
@@ -34,7 +35,9 @@ namespace WixToolset.Data
34 Error, 35 Error,
35 EventMapping, 36 EventMapping,
36 Extension, 37 Extension,
38 [Obsolete]
37 ExternalFiles, 39 ExternalFiles,
40 [Obsolete]
38 FamilyFileRanges, 41 FamilyFileRanges,
39 Feature, 42 Feature,
40 FeatureComponents, 43 FeatureComponents,
@@ -86,8 +89,10 @@ namespace WixToolset.Data
86 ODBCSourceAttribute, 89 ODBCSourceAttribute,
87 ODBCTranslator, 90 ODBCTranslator,
88 Patch, 91 Patch,
92 [Obsolete]
89 PatchMetadata, 93 PatchMetadata,
90 PatchPackage, 94 PatchPackage,
95 [Obsolete]
91 PatchSequence, 96 PatchSequence,
92 ProgId, 97 ProgId,
93 Properties, 98 Properties,
@@ -106,14 +111,19 @@ namespace WixToolset.Data
106 Shortcut, 111 Shortcut,
107 Signature, 112 Signature,
108 SoftwareIdentificationTag, 113 SoftwareIdentificationTag,
114 [Obsolete]
109 TargetFilesOptionalData, 115 TargetFilesOptionalData,
116 [Obsolete]
110 TargetImages, 117 TargetImages,
111 TextStyle, 118 TextStyle,
112 TypeLib, 119 TypeLib,
113 UIText, 120 UIText,
114 Upgrade, 121 Upgrade,
122 [Obsolete]
115 UpgradedFilesOptionalData, 123 UpgradedFilesOptionalData,
124 [Obsolete]
116 UpgradedFilesToIgnore, 125 UpgradedFilesToIgnore,
126 [Obsolete]
117 UpgradedImages, 127 UpgradedImages,
118 Verb, 128 Verb,
119 WixAction, 129 WixAction,
diff --git a/src/api/wix/WixToolset.Data/Symbols/TargetFilesOptionalDataSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/TargetFilesOptionalDataSymbol.cs
index 66fdc30c..fe3800ff 100644
--- a/src/api/wix/WixToolset.Data/Symbols/TargetFilesOptionalDataSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/TargetFilesOptionalDataSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition TargetFilesOptionalData = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition TargetFilesOptionalData = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.TargetFilesOptionalData, 12 SymbolDefinitionType.TargetFilesOptionalData,
11 new[] 13 new[]
@@ -23,6 +25,9 @@ namespace WixToolset.Data
23 25
24namespace WixToolset.Data.Symbols 26namespace WixToolset.Data.Symbols
25{ 27{
28 using System;
29
30 [Obsolete]
26 public enum TargetFilesOptionalDataSymbolFields 31 public enum TargetFilesOptionalDataSymbolFields
27 { 32 {
28 Target, 33 Target,
@@ -33,6 +38,7 @@ namespace WixToolset.Data.Symbols
33 RetainOffsets, 38 RetainOffsets,
34 } 39 }
35 40
41 [Obsolete]
36 public class TargetFilesOptionalDataSymbol : IntermediateSymbol 42 public class TargetFilesOptionalDataSymbol : IntermediateSymbol
37 { 43 {
38 public TargetFilesOptionalDataSymbol() : base(SymbolDefinitions.TargetFilesOptionalData, null, null) 44 public TargetFilesOptionalDataSymbol() : base(SymbolDefinitions.TargetFilesOptionalData, null, null)
@@ -81,4 +87,4 @@ namespace WixToolset.Data.Symbols
81 set => this.Set((int)TargetFilesOptionalDataSymbolFields.RetainOffsets, value); 87 set => this.Set((int)TargetFilesOptionalDataSymbolFields.RetainOffsets, value);
82 } 88 }
83 } 89 }
84} \ No newline at end of file 90}
diff --git a/src/api/wix/WixToolset.Data/Symbols/TargetImagesSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/TargetImagesSymbol.cs
index 4748b1f3..20b3ec5d 100644
--- a/src/api/wix/WixToolset.Data/Symbols/TargetImagesSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/TargetImagesSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition TargetImages = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition TargetImages = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.TargetImages, 12 SymbolDefinitionType.TargetImages,
11 new[] 13 new[]
@@ -24,6 +26,9 @@ namespace WixToolset.Data
24 26
25namespace WixToolset.Data.Symbols 27namespace WixToolset.Data.Symbols
26{ 28{
29 using System;
30
31 [Obsolete]
27 public enum TargetImagesSymbolFields 32 public enum TargetImagesSymbolFields
28 { 33 {
29 Target, 34 Target,
@@ -35,6 +40,7 @@ namespace WixToolset.Data.Symbols
35 IgnoreMissingSrcFiles, 40 IgnoreMissingSrcFiles,
36 } 41 }
37 42
43 [Obsolete]
38 public class TargetImagesSymbol : IntermediateSymbol 44 public class TargetImagesSymbol : IntermediateSymbol
39 { 45 {
40 public TargetImagesSymbol() : base(SymbolDefinitions.TargetImages, null, null) 46 public TargetImagesSymbol() : base(SymbolDefinitions.TargetImages, null, null)
@@ -89,4 +95,4 @@ namespace WixToolset.Data.Symbols
89 set => this.Set((int)TargetImagesSymbolFields.IgnoreMissingSrcFiles, value); 95 set => this.Set((int)TargetImagesSymbolFields.IgnoreMissingSrcFiles, value);
90 } 96 }
91 } 97 }
92} \ No newline at end of file 98}
diff --git a/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesOptionalDataSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesOptionalDataSymbol.cs
index 9e669ec3..8f2ccf00 100644
--- a/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesOptionalDataSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesOptionalDataSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition UpgradedFilesOptionalData = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition UpgradedFilesOptionalData = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.UpgradedFilesOptionalData, 12 SymbolDefinitionType.UpgradedFilesOptionalData,
11 new[] 13 new[]
@@ -22,6 +24,9 @@ namespace WixToolset.Data
22 24
23namespace WixToolset.Data.Symbols 25namespace WixToolset.Data.Symbols
24{ 26{
27 using System;
28
29 [Obsolete]
25 public enum UpgradedFilesOptionalDataSymbolFields 30 public enum UpgradedFilesOptionalDataSymbolFields
26 { 31 {
27 Upgraded, 32 Upgraded,
@@ -31,6 +36,7 @@ namespace WixToolset.Data.Symbols
31 IncludeWholeFile, 36 IncludeWholeFile,
32 } 37 }
33 38
39 [Obsolete]
34 public class UpgradedFilesOptionalDataSymbol : IntermediateSymbol 40 public class UpgradedFilesOptionalDataSymbol : IntermediateSymbol
35 { 41 {
36 public UpgradedFilesOptionalDataSymbol() : base(SymbolDefinitions.UpgradedFilesOptionalData, null, null) 42 public UpgradedFilesOptionalDataSymbol() : base(SymbolDefinitions.UpgradedFilesOptionalData, null, null)
diff --git a/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesToIgnoreSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesToIgnoreSymbol.cs
index e21af6a2..1afcb980 100644
--- a/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesToIgnoreSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/UpgradedFilesToIgnoreSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition UpgradedFilesToIgnore = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition UpgradedFilesToIgnore = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.UpgradedFilesToIgnore, 12 SymbolDefinitionType.UpgradedFilesToIgnore,
11 new[] 13 new[]
@@ -19,12 +21,16 @@ namespace WixToolset.Data
19 21
20namespace WixToolset.Data.Symbols 22namespace WixToolset.Data.Symbols
21{ 23{
24 using System;
25
26 [Obsolete]
22 public enum UpgradedFilesToIgnoreSymbolFields 27 public enum UpgradedFilesToIgnoreSymbolFields
23 { 28 {
24 Upgraded, 29 Upgraded,
25 FTK, 30 FTK,
26 } 31 }
27 32
33 [Obsolete]
28 public class UpgradedFilesToIgnoreSymbol : IntermediateSymbol 34 public class UpgradedFilesToIgnoreSymbol : IntermediateSymbol
29 { 35 {
30 public UpgradedFilesToIgnoreSymbol() : base(SymbolDefinitions.UpgradedFilesToIgnore, null, null) 36 public UpgradedFilesToIgnoreSymbol() : base(SymbolDefinitions.UpgradedFilesToIgnore, null, null)
@@ -49,4 +55,4 @@ namespace WixToolset.Data.Symbols
49 set => this.Set((int)UpgradedFilesToIgnoreSymbolFields.FTK, value); 55 set => this.Set((int)UpgradedFilesToIgnoreSymbolFields.FTK, value);
50 } 56 }
51 } 57 }
52} \ No newline at end of file 58}
diff --git a/src/api/wix/WixToolset.Data/Symbols/UpgradedImagesSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/UpgradedImagesSymbol.cs
index 28eae08a..438ca493 100644
--- a/src/api/wix/WixToolset.Data/Symbols/UpgradedImagesSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/UpgradedImagesSymbol.cs
@@ -2,10 +2,12 @@
2 2
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System;
5 using WixToolset.Data.Symbols; 6 using WixToolset.Data.Symbols;
6 7
7 public static partial class SymbolDefinitions 8 public static partial class SymbolDefinitions
8 { 9 {
10 [Obsolete]
9 public static readonly IntermediateSymbolDefinition UpgradedImages = new IntermediateSymbolDefinition( 11 public static readonly IntermediateSymbolDefinition UpgradedImages = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.UpgradedImages, 12 SymbolDefinitionType.UpgradedImages,
11 new[] 13 new[]
@@ -22,6 +24,9 @@ namespace WixToolset.Data
22 24
23namespace WixToolset.Data.Symbols 25namespace WixToolset.Data.Symbols
24{ 26{
27 using System;
28
29 [Obsolete]
25 public enum UpgradedImagesSymbolFields 30 public enum UpgradedImagesSymbolFields
26 { 31 {
27 Upgraded, 32 Upgraded,
@@ -31,6 +36,7 @@ namespace WixToolset.Data.Symbols
31 Family, 36 Family,
32 } 37 }
33 38
39 [Obsolete]
34 public class UpgradedImagesSymbol : IntermediateSymbol 40 public class UpgradedImagesSymbol : IntermediateSymbol
35 { 41 {
36 public UpgradedImagesSymbol() : base(SymbolDefinitions.UpgradedImages, null, null) 42 public UpgradedImagesSymbol() : base(SymbolDefinitions.UpgradedImages, null, null)
@@ -73,4 +79,4 @@ namespace WixToolset.Data.Symbols
73 set => this.Set((int)UpgradedImagesSymbolFields.Family, value); 79 set => this.Set((int)UpgradedImagesSymbolFields.Family, value);
74 } 80 }
75 } 81 }
76} \ No newline at end of file 82}
diff --git a/src/api/wix/WixToolset.Data/WarningMessages.cs b/src/api/wix/WixToolset.Data/WarningMessages.cs
index 83d9dc51..67915620 100644
--- a/src/api/wix/WixToolset.Data/WarningMessages.cs
+++ b/src/api/wix/WixToolset.Data/WarningMessages.cs
@@ -167,11 +167,6 @@ namespace WixToolset.Data
167 return Message(sourceLineNumbers, Ids.DeprecatedLongNameAttribute, "The {0}/@{1} attribute has been deprecated. Since WiX now has the ability to generate short file/directory names, the desired name should be specified in the {2} attribute instead. If the name specified in the {2} attribute is a short name, then WiX will not generate a short name. If the name specified in the {2} attribute is a long name and you want to manually specify the short name, please set the short name value in the {3} attribute.", elementName, longNameAttributeName, nameAttributeName, shortNameAttributeName); 167 return Message(sourceLineNumbers, Ids.DeprecatedLongNameAttribute, "The {0}/@{1} attribute has been deprecated. Since WiX now has the ability to generate short file/directory names, the desired name should be specified in the {2} attribute instead. If the name specified in the {2} attribute is a short name, then WiX will not generate a short name. If the name specified in the {2} attribute is a long name and you want to manually specify the short name, please set the short name value in the {3} attribute.", elementName, longNameAttributeName, nameAttributeName, shortNameAttributeName);
168 } 168 }
169 169
170 public static Message DeprecatedPatchSequenceTargetAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
171 {
172 return Message(sourceLineNumbers, Ids.DeprecatedPatchSequenceTargetAttribute, "The {0}/@{1} attribute has been deprecated in favor of the more strongly-typed ProductCode or TargetImage attributes. Please use the ProductCode attribute for indicating the ProductCode of a patch family directly, or the TargetImage attribute to specify the TargetImage which in turn will retrieve the ProductCode of the patch family.", elementName, attributeName);
173 }
174
175 public static Message DeprecatedPreProcVariable(SourceLineNumber sourceLineNumbers, string oldName, string newName) 170 public static Message DeprecatedPreProcVariable(SourceLineNumber sourceLineNumbers, string oldName, string newName)
176 { 171 {
177 return Message(sourceLineNumbers, Ids.DeprecatedPreProcVariable, "The built-in preprocessor variable '{0}' is deprecated. Please correct your authoring to use the new '{1}' preprocessor variable instead.", oldName, newName); 172 return Message(sourceLineNumbers, Ids.DeprecatedPreProcVariable, "The built-in preprocessor variable '{0}' is deprecated. Please correct your authoring to use the new '{1}' preprocessor variable instead.", oldName, newName);
@@ -332,11 +327,6 @@ namespace WixToolset.Data
332 return Message(sourceLineNumbers, Ids.IllegalColumnValue, "The {0}.{1} column's value, '{2}', is not a recognized legal value. This information will be left out of the decompiled output.", tableName, columnName, value); 327 return Message(sourceLineNumbers, Ids.IllegalColumnValue, "The {0}.{1} column's value, '{2}', is not a recognized legal value. This information will be left out of the decompiled output.", tableName, columnName, value);
333 } 328 }
334 329
335 public static Message IllegalPatchCreationTable(SourceLineNumber sourceLineNumbers, string tableName)
336 {
337 return Message(sourceLineNumbers, Ids.IllegalPatchCreationTable, "The {0} table is not legal in a patch creation file. The information in this table will be left out of the decompiled output.", tableName);
338 }
339
340 public static Message IllegalRegistryKeyPath(SourceLineNumber sourceLineNumbers, string componentName, string registryId) 330 public static Message IllegalRegistryKeyPath(SourceLineNumber sourceLineNumbers, string componentName, string registryId)
341 { 331 {
342 return Message(sourceLineNumbers, Ids.IllegalRegistryKeyPath, "Component '{0}' specifies an illegal registry keypath of '{1}'. Since this entry actually represents a registry key, not a registry value, it cannot be the keypath.", componentName, registryId); 332 return Message(sourceLineNumbers, Ids.IllegalRegistryKeyPath, "Component '{0}' specifies an illegal registry keypath of '{1}'. Since this entry actually represents a registry key, not a registry value, it cannot be the keypath.", componentName, registryId);
@@ -542,11 +532,6 @@ namespace WixToolset.Data
542 return Message(sourceLineNumbers, Ids.SkippingMergeModuleTable, "The {0} table can only be represented in WiX for merge modules. The information in this table will be left out of the decompiled output.", tableName); 532 return Message(sourceLineNumbers, Ids.SkippingMergeModuleTable, "The {0} table can only be represented in WiX for merge modules. The information in this table will be left out of the decompiled output.", tableName);
543 } 533 }
544 534
545 public static Message SkippingPatchCreationTable(SourceLineNumber sourceLineNumbers, string tableName)
546 {
547 return Message(sourceLineNumbers, Ids.SkippingPatchCreationTable, "The {0} table can only be represented in WiX for patch creation files. The information in this table will be left out of the decompiled output.", tableName);
548 }
549
550 public static Message StandardDirectoryConflictInMergeModule(SourceLineNumber sourceLineNumbers, string directory, string standardDirectory) 535 public static Message StandardDirectoryConflictInMergeModule(SourceLineNumber sourceLineNumbers, string directory, string standardDirectory)
551 { 536 {
552 return Message(sourceLineNumbers, Ids.StandardDirectoryConflictInMergeModule, "The Directory '{0}' starts with the same Id as the standard folder in Windows Installer '{1}'. A directory Id that begins with the same Id as a standard folder that is in an MSM may encounter a conflict when merging the MSM into an MSI. This may result in the contents of this merge module being installed to an unexpected location. To eliminate this warning, change your directory Id to not start with the same Id as any standard folders.", directory, standardDirectory); 537 return Message(sourceLineNumbers, Ids.StandardDirectoryConflictInMergeModule, "The Directory '{0}' starts with the same Id as the standard folder in Windows Installer '{1}'. A directory Id that begins with the same Id as a standard folder that is in an MSM may encounter a conflict when merging the MSM into an MSI. This may result in the contents of this merge module being installed to an unexpected location. To eliminate this warning, change your directory Id to not start with the same Id as any standard folders.", directory, standardDirectory);
@@ -762,9 +747,7 @@ namespace WixToolset.Data
762 IllegalActionInSequence = 1058, 747 IllegalActionInSequence = 1058,
763 ExpectedForeignRow = 1059, 748 ExpectedForeignRow = 1059,
764 DecompilingAsCustomTable = 1060, 749 DecompilingAsCustomTable = 1060,
765 IllegalPatchCreationTable = 1061,
766 SkippingMergeModuleTable = 1062, 750 SkippingMergeModuleTable = 1062,
767 SkippingPatchCreationTable = 1063,
768 UnrepresentableColumnValue = 1064, 751 UnrepresentableColumnValue = 1064,
769 DeprecatedTable = 1065, 752 DeprecatedTable = 1065,
770 PatchTable = 1066, 753 PatchTable = 1066,
@@ -782,7 +765,6 @@ namespace WixToolset.Data
782 EmptyCabinet = 1079, 765 EmptyCabinet = 1079,
783 DeprecatedRegistryElement = 1080, 766 DeprecatedRegistryElement = 1080,
784 IllegalRegistryKeyPath = 1081, 767 IllegalRegistryKeyPath = 1081,
785 DeprecatedPatchSequenceTargetAttribute = 1082,
786 ProductIdAuthored = 1083, 768 ProductIdAuthored = 1083,
787 ImplicitMergeModulePrimaryFeature = 1084, 769 ImplicitMergeModulePrimaryFeature = 1084,
788 DeprecatedIgnoreModularizationElement = 1085, 770 DeprecatedIgnoreModularizationElement = 1085,
diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
index fbb38501..2f27e45d 100644
--- a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
+++ b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerData.cs
@@ -214,9 +214,11 @@ namespace WixToolset.Data.WindowsInstaller
214 case "Patch": 214 case "Patch":
215 output.Type = OutputType.Patch; 215 output.Type = OutputType.Patch;
216 break; 216 break;
217#pragma warning disable CS0612 // still supported backward compatiblity
217 case "PatchCreation": 218 case "PatchCreation":
218 output.Type = OutputType.PatchCreation; 219 output.Type = OutputType.PatchCreation;
219 break; 220 break;
221#pragma warning restore CS0612
220 case "Package": 222 case "Package":
221 case "Product": 223 case "Product":
222 output.Type = OutputType.Package; 224 output.Type = OutputType.Package;
diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs
index 9f0cdd96..96ae929d 100644
--- a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs
+++ b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs
@@ -2,6 +2,7 @@
2 2
3namespace WixToolset.Data.WindowsInstaller 3namespace WixToolset.Data.WindowsInstaller
4{ 4{
5 using System;
5 using WixToolset.Data.WindowsInstaller.Rows; 6 using WixToolset.Data.WindowsInstaller.Rows;
6 7
7 public static class WindowsInstallerTableDefinitions 8 public static class WindowsInstallerTableDefinitions
@@ -861,6 +862,7 @@ namespace WixToolset.Data.WindowsInstaller
861 symbolIdIsPrimaryKey: false 862 symbolIdIsPrimaryKey: false
862 ); 863 );
863 864
865 [Obsolete]
864 public static readonly TableDefinition PatchMetadata = new TableDefinition( 866 public static readonly TableDefinition PatchMetadata = new TableDefinition(
865 "PatchMetadata", 867 "PatchMetadata",
866 SymbolDefinitions.PatchMetadata, 868 SymbolDefinitions.PatchMetadata,
@@ -908,6 +910,7 @@ namespace WixToolset.Data.WindowsInstaller
908 symbolIdIsPrimaryKey: false 910 symbolIdIsPrimaryKey: false
909 ); 911 );
910 912
913 [Obsolete]
911 public static readonly TableDefinition PatchSequence = new TableDefinition( 914 public static readonly TableDefinition PatchSequence = new TableDefinition(
912 "PatchSequence", 915 "PatchSequence",
913 SymbolDefinitions.PatchSequence, 916 SymbolDefinitions.PatchSequence,
@@ -1560,6 +1563,7 @@ namespace WixToolset.Data.WindowsInstaller
1560 symbolIdIsPrimaryKey: false 1563 symbolIdIsPrimaryKey: false
1561 ); 1564 );
1562 1565
1566 [Obsolete]
1563 public static readonly TableDefinition ImageFamilies = new TableDefinition( 1567 public static readonly TableDefinition ImageFamilies = new TableDefinition(
1564 "ImageFamilies", 1568 "ImageFamilies",
1565 SymbolDefinitions.ImageFamilies, 1569 SymbolDefinitions.ImageFamilies,
@@ -1575,6 +1579,7 @@ namespace WixToolset.Data.WindowsInstaller
1575 symbolIdIsPrimaryKey: false 1579 symbolIdIsPrimaryKey: false
1576 ); 1580 );
1577 1581
1582 [Obsolete]
1578 public static readonly TableDefinition UpgradedImages = new TableDefinition( 1583 public static readonly TableDefinition UpgradedImages = new TableDefinition(
1579 "UpgradedImages", 1584 "UpgradedImages",
1580 SymbolDefinitions.UpgradedImages, 1585 SymbolDefinitions.UpgradedImages,
@@ -1589,6 +1594,7 @@ namespace WixToolset.Data.WindowsInstaller
1589 symbolIdIsPrimaryKey: false 1594 symbolIdIsPrimaryKey: false
1590 ); 1595 );
1591 1596
1597 [Obsolete]
1592 public static readonly TableDefinition UpgradedFilesToIgnore = new TableDefinition( 1598 public static readonly TableDefinition UpgradedFilesToIgnore = new TableDefinition(
1593 "UpgradedFilesToIgnore", 1599 "UpgradedFilesToIgnore",
1594 SymbolDefinitions.UpgradedFilesToIgnore, 1600 SymbolDefinitions.UpgradedFilesToIgnore,
@@ -1600,6 +1606,7 @@ namespace WixToolset.Data.WindowsInstaller
1600 symbolIdIsPrimaryKey: false 1606 symbolIdIsPrimaryKey: false
1601 ); 1607 );
1602 1608
1609 [Obsolete]
1603 public static readonly TableDefinition UpgradedFilesOptionalData = new TableDefinition( 1610 public static readonly TableDefinition UpgradedFilesOptionalData = new TableDefinition(
1604 "UpgradedFiles_OptionalData", 1611 "UpgradedFiles_OptionalData",
1605 SymbolDefinitions.UpgradedFilesOptionalData, 1612 SymbolDefinitions.UpgradedFilesOptionalData,
@@ -1614,6 +1621,7 @@ namespace WixToolset.Data.WindowsInstaller
1614 symbolIdIsPrimaryKey: false 1621 symbolIdIsPrimaryKey: false
1615 ); 1622 );
1616 1623
1624 [Obsolete]
1617 public static readonly TableDefinition TargetImages = new TableDefinition( 1625 public static readonly TableDefinition TargetImages = new TableDefinition(
1618 "TargetImages", 1626 "TargetImages",
1619 SymbolDefinitions.TargetImages, 1627 SymbolDefinitions.TargetImages,
@@ -1630,6 +1638,7 @@ namespace WixToolset.Data.WindowsInstaller
1630 symbolIdIsPrimaryKey: false 1638 symbolIdIsPrimaryKey: false
1631 ); 1639 );
1632 1640
1641 [Obsolete]
1633 public static readonly TableDefinition TargetFilesOptionalData = new TableDefinition( 1642 public static readonly TableDefinition TargetFilesOptionalData = new TableDefinition(
1634 "TargetFiles_OptionalData", 1643 "TargetFiles_OptionalData",
1635 SymbolDefinitions.TargetFilesOptionalData, 1644 SymbolDefinitions.TargetFilesOptionalData,
@@ -1645,6 +1654,7 @@ namespace WixToolset.Data.WindowsInstaller
1645 symbolIdIsPrimaryKey: false 1654 symbolIdIsPrimaryKey: false
1646 ); 1655 );
1647 1656
1657 [Obsolete]
1648 public static readonly TableDefinition FamilyFileRanges = new TableDefinition( 1658 public static readonly TableDefinition FamilyFileRanges = new TableDefinition(
1649 "FamilyFileRanges", 1659 "FamilyFileRanges",
1650 SymbolDefinitions.FamilyFileRanges, 1660 SymbolDefinitions.FamilyFileRanges,
@@ -1658,6 +1668,7 @@ namespace WixToolset.Data.WindowsInstaller
1658 symbolIdIsPrimaryKey: false 1668 symbolIdIsPrimaryKey: false
1659 ); 1669 );
1660 1670
1671 [Obsolete]
1661 public static readonly TableDefinition ExternalFiles = new TableDefinition( 1672 public static readonly TableDefinition ExternalFiles = new TableDefinition(
1662 "ExternalFiles", 1673 "ExternalFiles",
1663 SymbolDefinitions.ExternalFiles, 1674 SymbolDefinitions.ExternalFiles,
@@ -1772,6 +1783,7 @@ namespace WixToolset.Data.WindowsInstaller
1772 symbolIdIsPrimaryKey: false 1783 symbolIdIsPrimaryKey: false
1773 ); 1784 );
1774 1785
1786#pragma warning disable CS0612 // includes some obsolete table definitions
1775 public static readonly TableDefinition[] All = new[] 1787 public static readonly TableDefinition[] All = new[]
1776 { 1788 {
1777 ActionText, 1789 ActionText,
@@ -1903,5 +1915,6 @@ namespace WixToolset.Data.WindowsInstaller
1903 WixDependencyProvider, 1915 WixDependencyProvider,
1904 WixDependencyRef, 1916 WixDependencyRef,
1905 }; 1917 };
1918#pragma warning restore CS0618
1906 } 1919 }
1907} 1920}
diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/data.xsd b/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/data.xsd
index 2ee214d8..c4109dc1 100644
--- a/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/data.xsd
+++ b/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/data.xsd
@@ -37,7 +37,6 @@
37 <xs:enumeration value="Bundle" /> 37 <xs:enumeration value="Bundle" />
38 <xs:enumeration value="Module" /> 38 <xs:enumeration value="Module" />
39 <xs:enumeration value="Patch" /> 39 <xs:enumeration value="Patch" />
40 <xs:enumeration value="PatchCreation" />
41 <xs:enumeration value="Package" /> 40 <xs:enumeration value="Package" />
42 <xs:enumeration value="Product" /> 41 <xs:enumeration value="Product" />
43 <xs:enumeration value="Transform" /> 42 <xs:enumeration value="Transform" />
diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd b/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd
index 84b59321..404290f1 100644
--- a/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd
+++ b/src/api/wix/WixToolset.Data/WindowsInstaller/Xsd/objects.xsd
@@ -121,7 +121,6 @@
121 <xs:enumeration value="module" /> 121 <xs:enumeration value="module" />
122 <xs:enumeration value="package" /> 122 <xs:enumeration value="package" />
123 <xs:enumeration value="product" /> 123 <xs:enumeration value="product" />
124 <xs:enumeration value="patchCreation" />
125 <xs:enumeration value="patch" /> 124 <xs:enumeration value="patch" />
126 </xs:restriction> 125 </xs:restriction>
127 </xs:simpleType> 126 </xs:simpleType>
diff --git a/src/wix/WixToolset.Converters.Symbolizer/ConvertSymbols.cs b/src/wix/WixToolset.Converters.Symbolizer/ConvertSymbols.cs
index 6e6f212d..bbf6e929 100644
--- a/src/wix/WixToolset.Converters.Symbolizer/ConvertSymbols.cs
+++ b/src/wix/WixToolset.Converters.Symbolizer/ConvertSymbols.cs
@@ -822,8 +822,6 @@ namespace WixToolset.Converters.Symbolizer
822 return SectionType.Module; 822 return SectionType.Module;
823 case Wix3.OutputType.Patch: 823 case Wix3.OutputType.Patch:
824 return SectionType.Patch; 824 return SectionType.Patch;
825 case Wix3.OutputType.PatchCreation:
826 return SectionType.PatchCreation;
827 case Wix3.OutputType.Product: 825 case Wix3.OutputType.Product:
828 return SectionType.Package; 826 return SectionType.Package;
829 case Wix3.OutputType.Transform: 827 case Wix3.OutputType.Transform:
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
index eb0c69c6..f2d70f2b 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
@@ -1376,29 +1376,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1376 this.Data.EnsureTable(this.TableDefinitions["ModuleSignature"]); 1376 this.Data.EnsureTable(this.TableDefinitions["ModuleSignature"]);
1377 break; 1377 break;
1378 1378
1379 case OutputType.PatchCreation:
1380 var imageFamiliesCount = this.Data.Tables["ImageFamilies"]?.Rows.Count ?? 0;
1381 var targetImagesCount = this.Data.Tables["TargetImages"]?.Rows.Count ?? 0;
1382 var upgradedImagesCount = this.Data.Tables["UpgradedImages"]?.Rows.Count ?? 0;
1383
1384 if (imageFamiliesCount < 1)
1385 {
1386 this.Messaging.Write(ErrorMessages.ExpectedRowInPatchCreationPackage("ImageFamilies"));
1387 }
1388
1389 if (targetImagesCount < 1)
1390 {
1391 this.Messaging.Write(ErrorMessages.ExpectedRowInPatchCreationPackage("TargetImages"));
1392 }
1393
1394 if (upgradedImagesCount < 1)
1395 {
1396 this.Messaging.Write(ErrorMessages.ExpectedRowInPatchCreationPackage("UpgradedImages"));
1397 }
1398
1399 this.Data.EnsureTable(this.TableDefinitions["Properties"]);
1400 break;
1401
1402 case OutputType.Package: 1379 case OutputType.Package:
1403 this.Data.EnsureTable(this.TableDefinitions["File"]); 1380 this.Data.EnsureTable(this.TableDefinitions["File"]);
1404 this.Data.EnsureTable(this.TableDefinitions["Media"]); 1381 this.Data.EnsureTable(this.TableDefinitions["Media"]);
@@ -1456,28 +1433,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1456 } 1433 }
1457 break; 1434 break;
1458 1435
1459 case OutputType.PatchCreation:
1460 if (!table.Definition.Unreal &&
1461 "_SummaryInformation" != table.Name &&
1462 "ExternalFiles" != table.Name &&
1463 "FamilyFileRanges" != table.Name &&
1464 "ImageFamilies" != table.Name &&
1465 "PatchMetadata" != table.Name &&
1466 "PatchSequence" != table.Name &&
1467 "Properties" != table.Name &&
1468 "TargetFiles_OptionalData" != table.Name &&
1469 "TargetImages" != table.Name &&
1470 "UpgradedFiles_OptionalData" != table.Name &&
1471 "UpgradedFilesToIgnore" != table.Name &&
1472 "UpgradedImages" != table.Name)
1473 {
1474 foreach (var row in table.Rows)
1475 {
1476 this.Messaging.Write(ErrorMessages.UnexpectedTableInPatchCreationPackage(row.SourceLineNumbers, table.Name));
1477 }
1478 }
1479 break;
1480
1481 case OutputType.Patch: 1436 case OutputType.Patch:
1482 if (!table.Definition.Unreal && 1437 if (!table.Definition.Unreal &&
1483 "_SummaryInformation" != table.Name && 1438 "_SummaryInformation" != table.Name &&
@@ -1607,8 +1562,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1607 return OutputType.Module; 1562 return OutputType.Module;
1608 case SectionType.Package: 1563 case SectionType.Package:
1609 return OutputType.Package; 1564 return OutputType.Package;
1610 case SectionType.PatchCreation:
1611 return OutputType.PatchCreation;
1612 case SectionType.Patch: 1565 case SectionType.Patch:
1613 return OutputType.Patch; 1566 return OutputType.Patch;
1614 1567
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
index 8699ca2c..8f23a886 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
@@ -133,9 +133,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
133 case OutputType.Module: 133 case OutputType.Module:
134 this.DecompilerHelper.RootElement = new XElement(Names.ModuleElement); 134 this.DecompilerHelper.RootElement = new XElement(Names.ModuleElement);
135 break; 135 break;
136 case OutputType.PatchCreation:
137 this.DecompilerHelper.RootElement = new XElement(Names.PatchCreationElement);
138 break;
139 case OutputType.Package: 136 case OutputType.Package:
140 this.DecompilerHelper.RootElement = new XElement(Names.PackageElement); 137 this.DecompilerHelper.RootElement = new XElement(Names.PackageElement);
141 break; 138 break;
@@ -571,31 +568,24 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
571 /// <param name="tables">The collection of all tables.</param> 568 /// <param name="tables">The collection of all tables.</param>
572 private void FinalizeDecompile(TableIndexedCollection tables) 569 private void FinalizeDecompile(TableIndexedCollection tables)
573 { 570 {
574 if (OutputType.PatchCreation == this.OutputType) 571 this.FinalizeSummaryInformationStream(tables);
575 { 572 this.FinalizeCheckBoxTable(tables);
576 this.FinalizeFamilyFileRangesTable(tables); 573 this.FinalizeComponentTable(tables);
577 } 574 this.FinalizeDialogTable(tables);
578 else 575 this.FinalizeDuplicateMoveFileTables(tables);
579 { 576 this.FinalizeFeatureComponentsTable(tables);
580 this.FinalizeSummaryInformationStream(tables); 577 this.FinalizeFileTable(tables);
581 this.FinalizeCheckBoxTable(tables); 578 this.FinalizeMIMETable(tables);
582 this.FinalizeComponentTable(tables); 579 this.FinalizeMsiLockPermissionsExTable(tables);
583 this.FinalizeDialogTable(tables); 580 this.FinalizeLockPermissionsTable(tables);
584 this.FinalizeDuplicateMoveFileTables(tables); 581 this.FinalizeProgIdTable(tables);
585 this.FinalizeFeatureComponentsTable(tables); 582 this.FinalizePropertyTable(tables);
586 this.FinalizeFileTable(tables); 583 this.FinalizeRemoveFileTable(tables);
587 this.FinalizeMIMETable(tables); 584 this.FinalizeSearchTables(tables);
588 this.FinalizeMsiLockPermissionsExTable(tables); 585 this.FinalizeShortcutTable(tables);
589 this.FinalizeLockPermissionsTable(tables); 586 this.FinalizeUpgradeTable(tables);
590 this.FinalizeProgIdTable(tables); 587 this.FinalizeSequenceTables(tables);
591 this.FinalizePropertyTable(tables); 588 this.FinalizeVerbTable(tables);
592 this.FinalizeRemoveFileTable(tables);
593 this.FinalizeSearchTables(tables);
594 this.FinalizeShortcutTable(tables);
595 this.FinalizeUpgradeTable(tables);
596 this.FinalizeSequenceTables(tables);
597 this.FinalizeVerbTable(tables);
598 }
599 589
600 foreach (var extension in this.Extensions) 590 foreach (var extension in this.Extensions)
601 { 591 {
@@ -972,126 +962,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
972 } 962 }
973 963
974 /// <summary> 964 /// <summary>
975 /// Finalize the FamilyFileRanges table.
976 /// </summary>
977 /// <param name="tables">The collection of all tables.</param>
978 private void FinalizeFamilyFileRangesTable(TableIndexedCollection tables)
979 {
980 var familyFileRangesTable = tables["FamilyFileRanges"];
981 if (null != familyFileRangesTable)
982 {
983 foreach (var row in familyFileRangesTable.Rows)
984 {
985 var xProtectRange = new XElement(Names.ProtectRangeElement);
986
987 if (!row.IsColumnNull(2) && !row.IsColumnNull(3))
988 {
989 var retainOffsets = row.FieldAsString(2).Split(',');
990 var retainLengths = row.FieldAsString(3).Split(',');
991
992 if (retainOffsets.Length == retainLengths.Length)
993 {
994 for (var i = 0; i < retainOffsets.Length; i++)
995 {
996 if (retainOffsets[i].StartsWith("0x", StringComparison.Ordinal))
997 {
998 xProtectRange.SetAttributeValue("Offset", Convert.ToInt32(retainOffsets[i].Substring(2), 16));
999 }
1000 else
1001 {
1002 xProtectRange.SetAttributeValue("Offset", Convert.ToInt32(retainOffsets[i], CultureInfo.InvariantCulture));
1003 }
1004
1005 if (retainLengths[i].StartsWith("0x", StringComparison.Ordinal))
1006 {
1007 xProtectRange.SetAttributeValue("Length", Convert.ToInt32(retainLengths[i].Substring(2), 16));
1008 }
1009 else
1010 {
1011 xProtectRange.SetAttributeValue("Length", Convert.ToInt32(retainLengths[i], CultureInfo.InvariantCulture));
1012 }
1013 }
1014 }
1015 else
1016 {
1017 // TODO: warn
1018 }
1019 }
1020 else if (!row.IsColumnNull(2) || !row.IsColumnNull(3))
1021 {
1022 // TODO: warn about mismatch between columns
1023 }
1024
1025 this.DecompilerHelper.IndexElement(row, xProtectRange);
1026 }
1027 }
1028
1029 var usedProtectRanges = new HashSet<XElement>();
1030 var externalFilesTable = tables["ExternalFiles"];
1031 if (null != externalFilesTable)
1032 {
1033 foreach (var row in externalFilesTable.Rows)
1034 {
1035 if (this.DecompilerHelper.TryGetIndexedElement(row, out var xExternalFile)
1036 && this.DecompilerHelper.TryGetIndexedElement("FamilyFileRanges", row.FieldAsString(0), row.FieldAsString(0), out var xProtectRange))
1037 {
1038 xExternalFile.Add(xProtectRange);
1039 usedProtectRanges.Add(xProtectRange);
1040 }
1041 }
1042 }
1043
1044 var targetFiles_OptionalDataTable = tables["TargetFiles_OptionalData"];
1045 if (null != targetFiles_OptionalDataTable)
1046 {
1047 var targetImagesTable = tables["TargetImages"];
1048 var targetImageRows = targetImagesTable?.Rows.ToDictionary(row => row.FieldAsString(0));
1049
1050 var upgradedImagesTable = tables["UpgradedImages"];
1051 var upgradedImagesRows = upgradedImagesTable?.Rows.ToDictionary(row => row.FieldAsString(0));
1052
1053 foreach (var row in targetFiles_OptionalDataTable.Rows)
1054 {
1055 var xTargetFile = this.PatchTargetFiles[row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter)];
1056
1057 if (!targetImageRows.TryGetValue(row.FieldAsString(0), out var targetImageRow))
1058 {
1059 this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, targetFiles_OptionalDataTable.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Target", row.FieldAsString(0), "TargetImages"));
1060 continue;
1061 }
1062
1063 if (!upgradedImagesRows.TryGetValue(row.FieldAsString(3), out var upgradedImagesRow))
1064 {
1065 this.Messaging.Write(WarningMessages.ExpectedForeignRow(targetImageRow.SourceLineNumbers, targetImageRow.Table.Name, targetImageRow.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Upgraded", row.FieldAsString(3), "UpgradedImages"));
1066 continue;
1067 }
1068
1069 if (this.DecompilerHelper.TryGetIndexedElement("FamilyFileRanges", upgradedImagesRow.FieldAsString(4), row.FieldAsString(1), out var xProtectRange))
1070 {
1071 xTargetFile.Add(xProtectRange);
1072 usedProtectRanges.Add(xProtectRange);
1073 }
1074 }
1075 }
1076
1077 if (null != familyFileRangesTable)
1078 {
1079 foreach (var row in familyFileRangesTable.Rows)
1080 {
1081 var xProtectRange = this.DecompilerHelper.GetIndexedElement(row);
1082
1083 if (!usedProtectRanges.Contains(xProtectRange))
1084 {
1085 var xProtectFile = new XElement(Names.ProtectFileElement, new XAttribute("File", row.FieldAsString(1)));
1086 xProtectFile.Add(xProtectRange);
1087
1088 this.AddChildToParent("ImageFamilies", xProtectFile, row, 0);
1089 }
1090 }
1091 }
1092 }
1093
1094 /// <summary>
1095 /// Finalize the FeatureComponents table. 965 /// Finalize the FeatureComponents table.
1096 /// </summary> 966 /// </summary>
1097 /// <param name="tables">The collection of all tables.</param> 967 /// <param name="tables">The collection of all tables.</param>
@@ -2640,12 +2510,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2640 case "Extension": 2510 case "Extension":
2641 this.DecompileExtensionTable(table); 2511 this.DecompileExtensionTable(table);
2642 break; 2512 break;
2643 case "ExternalFiles":
2644 this.DecompileExternalFilesTable(table);
2645 break;
2646 case "FamilyFileRanges":
2647 // handled in FinalizeFamilyFileRangesTable
2648 break;
2649 case "Feature": 2513 case "Feature":
2650 this.DecompileFeatureTable(table); 2514 this.DecompileFeatureTable(table);
2651 break; 2515 break;
@@ -2664,9 +2528,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2664 case "Icon": 2528 case "Icon":
2665 this.DecompileIconTable(table); 2529 this.DecompileIconTable(table);
2666 break; 2530 break;
2667 case "ImageFamilies":
2668 this.DecompileImageFamiliesTable(table);
2669 break;
2670 case "IniFile": 2531 case "IniFile":
2671 this.DecompileIniFileTable(table); 2532 this.DecompileIniFileTable(table);
2672 break; 2533 break;
@@ -2764,12 +2625,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2764 case "ODBCTranslator": 2625 case "ODBCTranslator":
2765 this.DecompileODBCTranslatorTable(table); 2626 this.DecompileODBCTranslatorTable(table);
2766 break; 2627 break;
2767 case "PatchMetadata":
2768 this.DecompilePatchMetadataTable(table);
2769 break;
2770 case "PatchSequence":
2771 this.DecompilePatchSequenceTable(table);
2772 break;
2773 case "ProgId": 2628 case "ProgId":
2774 this.DecompileProgIdTable(table); 2629 this.DecompileProgIdTable(table);
2775 break; 2630 break;
@@ -2821,12 +2676,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2821 case "Signature": 2676 case "Signature":
2822 this.DecompileSignatureTable(table); 2677 this.DecompileSignatureTable(table);
2823 break; 2678 break;
2824 case "TargetFiles_OptionalData":
2825 this.DecompileTargetFiles_OptionalDataTable(table);
2826 break;
2827 case "TargetImages":
2828 this.DecompileTargetImagesTable(table);
2829 break;
2830 case "TextStyle": 2679 case "TextStyle":
2831 this.DecompileTextStyleTable(table); 2680 this.DecompileTextStyleTable(table);
2832 break; 2681 break;
@@ -2836,15 +2685,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2836 case "Upgrade": 2685 case "Upgrade":
2837 this.DecompileUpgradeTable(table); 2686 this.DecompileUpgradeTable(table);
2838 break; 2687 break;
2839 case "UpgradedFiles_OptionalData":
2840 this.DecompileUpgradedFiles_OptionalDataTable(table);
2841 break;
2842 case "UpgradedFilesToIgnore":
2843 this.DecompileUpgradedFilesToIgnoreTable(table);
2844 break;
2845 case "UpgradedImages":
2846 this.DecompileUpgradedImagesTable(table);
2847 break;
2848 case "UIText": 2688 case "UIText":
2849 this.DecompileUITextTable(table); 2689 this.DecompileUITextTable(table);
2850 break; 2690 break;
@@ -2924,15 +2764,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2924 case "UpgradedFiles_OptionalData": 2764 case "UpgradedFiles_OptionalData":
2925 case "UpgradedFilesToIgnore": 2765 case "UpgradedFilesToIgnore":
2926 case "UpgradedImages": 2766 case "UpgradedImages":
2927 if (OutputType.PatchCreation != output.Type) 2767 return false;
2928 {
2929 this.Messaging.Write(WarningMessages.SkippingPatchCreationTable(output.SourceLineNumbers, tableName));
2930 return false;
2931 }
2932 else
2933 {
2934 return true;
2935 }
2936 case "MsiPatchHeaders": 2768 case "MsiPatchHeaders":
2937 case "MsiPatchMetadata": 2769 case "MsiPatchMetadata":
2938 case "MsiPatchOldAssemblyName": 2770 case "MsiPatchOldAssemblyName":
@@ -2948,16 +2780,8 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2948 case "MsiAssemblyName": 2780 case "MsiAssemblyName":
2949 case "MsiFileHash": 2781 case "MsiFileHash":
2950 return false; 2782 return false;
2951 default: // all other tables are allowed in any output except for a patch creation package 2783 default: // all other tables are allowed in any output.
2952 if (OutputType.PatchCreation == output.Type) 2784 return true;
2953 {
2954 this.Messaging.Write(WarningMessages.IllegalPatchCreationTable(output.SourceLineNumbers, tableName));
2955 return false;
2956 }
2957 else
2958 {
2959 return true;
2960 }
2961 } 2785 }
2962 } 2786 }
2963 2787
@@ -4590,74 +4414,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
4590 } 4414 }
4591 4415
4592 /// <summary> 4416 /// <summary>
4593 /// Decompile the ExternalFiles table.
4594 /// </summary>
4595 /// <param name="table">The table to decompile.</param>
4596 private void DecompileExternalFilesTable(Table table)
4597 {
4598 foreach (var row in table.Rows)
4599 {
4600 var xExternalFile = new XElement(Names.ExternalFileElement,
4601 new XAttribute("File", row.FieldAsString(1)),
4602 new XAttribute("Source", row.FieldAsString(2)));
4603
4604 AddSymbolPaths(row, 3, xExternalFile);
4605
4606 if (!row.IsColumnNull(4) && !row.IsColumnNull(5))
4607 {
4608 var ignoreOffsets = row.FieldAsString(4).Split(',');
4609 var ignoreLengths = row.FieldAsString(5).Split(',');
4610
4611 if (ignoreOffsets.Length == ignoreLengths.Length)
4612 {
4613 for (var i = 0; i < ignoreOffsets.Length; i++)
4614 {
4615 var xIgnoreRange = new XElement(Names.IgnoreRangeElement);
4616
4617 if (ignoreOffsets[i].StartsWith("0x", StringComparison.Ordinal))
4618 {
4619 xIgnoreRange.SetAttributeValue("Offset", Convert.ToInt32(ignoreOffsets[i].Substring(2), 16));
4620 }
4621 else
4622 {
4623 xIgnoreRange.SetAttributeValue("Offset", Convert.ToInt32(ignoreOffsets[i], CultureInfo.InvariantCulture));
4624 }
4625
4626 if (ignoreLengths[i].StartsWith("0x", StringComparison.Ordinal))
4627 {
4628 xIgnoreRange.SetAttributeValue("Length", Convert.ToInt32(ignoreLengths[i].Substring(2), 16));
4629 }
4630 else
4631 {
4632 xIgnoreRange.SetAttributeValue("Length", Convert.ToInt32(ignoreLengths[i], CultureInfo.InvariantCulture));
4633 }
4634
4635 xExternalFile.Add(xIgnoreRange);
4636 }
4637 }
4638 else
4639 {
4640 // TODO: warn
4641 }
4642 }
4643 else if (!row.IsColumnNull(4) || !row.IsColumnNull(5))
4644 {
4645 // TODO: warn about mismatch between columns
4646 }
4647
4648 // the RetainOffsets column is handled in FinalizeFamilyFileRangesTable
4649
4650 if (!row.IsColumnNull(7))
4651 {
4652 xExternalFile.SetAttributeValue("Order", row.FieldAsInteger(7));
4653 }
4654
4655 this.AddChildToParent("ImageFamilies", xExternalFile, row, 0);
4656 this.DecompilerHelper.IndexElement(row, xExternalFile);
4657 }
4658 }
4659
4660 /// <summary>
4661 /// Decompile the Feature table. 4417 /// Decompile the Feature table.
4662 /// </summary> 4418 /// </summary>
4663 /// <param name="table">The table to decompile.</param> 4419 /// <param name="table">The table to decompile.</param>
@@ -4888,27 +4644,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
4888 } 4644 }
4889 4645
4890 /// <summary> 4646 /// <summary>
4891 /// Decompile the ImageFamilies table.
4892 /// </summary>
4893 /// <param name="table">The table to decompile.</param>
4894 private void DecompileImageFamiliesTable(Table table)
4895 {
4896 foreach (var row in table.Rows)
4897 {
4898 var family = new XElement(Names.FamilyElement,
4899 new XAttribute("Name", row.FieldAsString(0)),
4900 row.IsColumnNull(1) ? null : new XAttribute("MediaSrcProp", row.FieldAsString(1)),
4901 row.IsColumnNull(2) ? null : new XAttribute("DiskId", row.FieldAsString(2)),
4902 row.IsColumnNull(3) ? null : new XAttribute("SequenceStart", row.FieldAsString(3)),
4903 row.IsColumnNull(4) ? null : new XAttribute("DiskPrompt", row.FieldAsString(4)),
4904 row.IsColumnNull(5) ? null : new XAttribute("VolumeLabel", row.FieldAsString(5)));
4905
4906 this.DecompilerHelper.AddElementToRoot(family);
4907 this.DecompilerHelper.IndexElement(row, family);
4908 }
4909 }
4910
4911 /// <summary>
4912 /// Decompile the IniFile table. 4647 /// Decompile the IniFile table.
4913 /// </summary> 4648 /// </summary>
4914 /// <param name="table">The table to decompile.</param> 4649 /// <param name="table">The table to decompile.</param>
@@ -5875,156 +5610,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
5875 } 5610 }
5876 5611
5877 /// <summary> 5612 /// <summary>
5878 /// Decompile the PatchMetadata table.
5879 /// </summary>
5880 /// <param name="table">The table to decompile.</param>
5881 private void DecompilePatchMetadataTable(Table table)
5882 {
5883 if (0 < table.Rows.Count)
5884 {
5885 var xPatchMetadata = new XElement(Names.PatchMetadataElement);
5886
5887 foreach (var row in table.Rows)
5888 {
5889 var value = row.FieldAsString(2);
5890
5891 switch (row.FieldAsString(1))
5892 {
5893 case "AllowRemoval":
5894 if ("1" == value)
5895 {
5896 xPatchMetadata.SetAttributeValue("AllowRemoval", "yes");
5897 }
5898 break;
5899 case "Classification":
5900 if (null != value)
5901 {
5902 xPatchMetadata.SetAttributeValue("Classification", value);
5903 }
5904 break;
5905 case "CreationTimeUTC":
5906 if (null != value)
5907 {
5908 xPatchMetadata.SetAttributeValue("CreationTimeUTC", value);
5909 }
5910 break;
5911 case "Description":
5912 if (null != value)
5913 {
5914 xPatchMetadata.SetAttributeValue("Description", value);
5915 }
5916 break;
5917 case "DisplayName":
5918 if (null != value)
5919 {
5920 xPatchMetadata.SetAttributeValue("DisplayName", value);
5921 }
5922 break;
5923 case "ManufacturerName":
5924 if (null != value)
5925 {
5926 xPatchMetadata.SetAttributeValue("ManufacturerName", value);
5927 }
5928 break;
5929 case "MinorUpdateTargetRTM":
5930 if (null != value)
5931 {
5932 xPatchMetadata.SetAttributeValue("MinorUpdateTargetRTM", value);
5933 }
5934 break;
5935 case "MoreInfoURL":
5936 if (null != value)
5937 {
5938 xPatchMetadata.SetAttributeValue("MoreInfoURL", value);
5939 }
5940 break;
5941 case "OptimizeCA":
5942 var xOptimizeCustomActions = new XElement(Names.OptimizeCustomActionsElement);
5943 var optimizeCA = Int32.Parse(value, CultureInfo.InvariantCulture);
5944 if (0 != (Convert.ToInt32(OptimizeCAFlags.SkipAssignment) & optimizeCA))
5945 {
5946 xOptimizeCustomActions.SetAttributeValue("SkipAssignment", "yes");
5947 }
5948
5949 if (0 != (Convert.ToInt32(OptimizeCAFlags.SkipImmediate) & optimizeCA))
5950 {
5951 xOptimizeCustomActions.SetAttributeValue("SkipImmediate", "yes");
5952 }
5953
5954 if (0 != (Convert.ToInt32(OptimizeCAFlags.SkipDeferred) & optimizeCA))
5955 {
5956 xOptimizeCustomActions.SetAttributeValue("SkipDeferred", "yes");
5957 }
5958
5959 xPatchMetadata.Add(xOptimizeCustomActions);
5960 break;
5961 case "OptimizedInstallMode":
5962 if ("1" == value)
5963 {
5964 xPatchMetadata.SetAttributeValue("OptimizedInstallMode", "yes");
5965 }
5966 break;
5967 case "TargetProductName":
5968 if (null != value)
5969 {
5970 xPatchMetadata.SetAttributeValue("TargetProductName", value);
5971 }
5972 break;
5973 default:
5974 var xCustomProperty = new XElement(Names.CustomPropertyElement,
5975 XAttributeIfNotNull("Company", row, 0),
5976 XAttributeIfNotNull("Property", row, 1),
5977 XAttributeIfNotNull("Value", row, 2));
5978
5979 xPatchMetadata.Add(xCustomProperty);
5980 break;
5981 }
5982 }
5983
5984 this.DecompilerHelper.AddElementToRoot(xPatchMetadata);
5985 }
5986 }
5987
5988 /// <summary>
5989 /// Decompile the PatchSequence table.
5990 /// </summary>
5991 /// <param name="table">The table to decompile.</param>
5992 private void DecompilePatchSequenceTable(Table table)
5993 {
5994 foreach (var row in table.Rows)
5995 {
5996 var patchSequence = new XElement(Names.PatchSequenceElement,
5997 new XAttribute("PatchFamily", row.FieldAsString(0)));
5998
5999 if (!row.IsColumnNull(1))
6000 {
6001 try
6002 {
6003 var guid = new Guid(row.FieldAsString(1));
6004
6005 patchSequence.SetAttributeValue("ProductCode", row.FieldAsString(1));
6006 }
6007 catch // non-guid value
6008 {
6009 patchSequence.SetAttributeValue("TargetImage", row.FieldAsString(1));
6010 }
6011 }
6012
6013 if (!row.IsColumnNull(2))
6014 {
6015 patchSequence.SetAttributeValue("Sequence", row.FieldAsString(2));
6016 }
6017
6018 if (!row.IsColumnNull(3) && 0x1 == row.FieldAsInteger(3))
6019 {
6020 patchSequence.SetAttributeValue("Supersede", "yes");
6021 }
6022
6023 this.DecompilerHelper.AddElementToRoot(patchSequence);
6024 }
6025 }
6026
6027 /// <summary>
6028 /// Decompile the ProgId table. 5613 /// Decompile the ProgId table.
6029 /// </summary> 5614 /// </summary>
6030 /// <param name="table">The table to decompile.</param> 5615 /// <param name="table">The table to decompile.</param>
@@ -7072,105 +6657,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
7072 } 6657 }
7073 6658
7074 /// <summary> 6659 /// <summary>
7075 /// Decompile the TargetFiles_OptionalData table.
7076 /// </summary>
7077 /// <param name="table">The table to decompile.</param>
7078 private void DecompileTargetFiles_OptionalDataTable(Table table)
7079 {
7080 foreach (var row in table.Rows)
7081 {
7082 if (!this.PatchTargetFiles.TryGetValue(row.FieldAsString(0), out var xPatchTargetFile))
7083 {
7084 xPatchTargetFile = new XElement(Names.TargetFileElement,
7085 new XAttribute("Id", row.FieldAsString(1)));
7086
7087 if (this.DecompilerHelper.TryGetIndexedElement("TargetImages", row.FieldAsString(0), out var xTargetImage))
7088 {
7089 xTargetImage.Add(xPatchTargetFile);
7090 }
7091 else
7092 {
7093 this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Target", row.FieldAsString(0), "TargetImages"));
7094 }
7095
7096 this.PatchTargetFiles.Add(row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), xPatchTargetFile);
7097 }
7098
7099 AddSymbolPaths(row, 2, xPatchTargetFile);
7100
7101 if (!row.IsColumnNull(3) && !row.IsColumnNull(4))
7102 {
7103 var ignoreOffsets = row.FieldAsString(3).Split(',');
7104 var ignoreLengths = row.FieldAsString(4).Split(',');
7105
7106 if (ignoreOffsets.Length == ignoreLengths.Length)
7107 {
7108 for (var i = 0; i < ignoreOffsets.Length; i++)
7109 {
7110 var xIgnoreRange = new XElement(Names.IgnoreRangeElement);
7111
7112 if (ignoreOffsets[i].StartsWith("0x", StringComparison.Ordinal))
7113 {
7114 xIgnoreRange.SetAttributeValue("Offset", Convert.ToInt32(ignoreOffsets[i].Substring(2), 16));
7115 }
7116 else
7117 {
7118 xIgnoreRange.SetAttributeValue("Offset", Convert.ToInt32(ignoreOffsets[i], CultureInfo.InvariantCulture));
7119 }
7120
7121 if (ignoreLengths[i].StartsWith("0x", StringComparison.Ordinal))
7122 {
7123 xIgnoreRange.SetAttributeValue("Length", Convert.ToInt32(ignoreLengths[i].Substring(2), 16));
7124 }
7125 else
7126 {
7127 xIgnoreRange.SetAttributeValue("Length", Convert.ToInt32(ignoreLengths[i], CultureInfo.InvariantCulture));
7128 }
7129
7130 xPatchTargetFile.Add(xIgnoreRange);
7131 }
7132 }
7133 else
7134 {
7135 // TODO: warn
7136 }
7137 }
7138 else if (!row.IsColumnNull(3) || !row.IsColumnNull(4))
7139 {
7140 // TODO: warn about mismatch between columns
7141 }
7142
7143 // the RetainOffsets column is handled in FinalizeFamilyFileRangesTable
7144 }
7145 }
7146
7147 /// <summary>
7148 /// Decompile the TargetImages table.
7149 /// </summary>
7150 /// <param name="table">The table to decompile.</param>
7151 private void DecompileTargetImagesTable(Table table)
7152 {
7153 foreach (var row in table.Rows)
7154 {
7155 var xTargetImage = new XElement(Names.TargetImageElement,
7156 new XAttribute("Id", row.FieldAsString(0)),
7157 new XAttribute("SourceFile", row.FieldAsString(1)),
7158 new XAttribute("Order", row.FieldAsInteger(4)),
7159 XAttributeIfNotNull("Validation", row, 5));
7160
7161 AddSymbolPaths(row, 2, xTargetImage);
7162
7163 if (0 != row.FieldAsInteger(6))
7164 {
7165 xTargetImage.SetAttributeValue("IgnoreMissingFiles", "yes");
7166 }
7167
7168 this.AddChildToParent("UpgradedImages", xTargetImage, row, 3);
7169 this.DecompilerHelper.IndexElement(row, xTargetImage);
7170 }
7171 }
7172
7173 /// <summary>
7174 /// Decompile the TextStyle table. 6660 /// Decompile the TextStyle table.
7175 /// </summary> 6661 /// </summary>
7176 /// <param name="table">The table to decompile.</param> 6662 /// <param name="table">The table to decompile.</param>
@@ -7342,77 +6828,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
7342 } 6828 }
7343 } 6829 }
7344 6830
7345 /// <summary>
7346 /// Decompile the UpgradedFiles_OptionalData table.
7347 /// </summary>
7348 /// <param name="table">The table to decompile.</param>
7349 private void DecompileUpgradedFiles_OptionalDataTable(Table table)
7350 {
7351 foreach (var row in table.Rows)
7352 {
7353 var xUpgradeFile = new XElement(Names.UpgradeFileElement,
7354 new XAttribute("File", row.FieldAsString(1)),
7355 new XAttribute("Ignore", "no"));
7356
7357 AddSymbolPaths(row, 2, xUpgradeFile);
7358
7359 if (!row.IsColumnNull(3) && 1 == row.FieldAsInteger(3))
7360 {
7361 xUpgradeFile.SetAttributeValue("AllowIgnoreOnError", "yes");
7362 }
7363
7364 if (!row.IsColumnNull(4) && 0 != row.FieldAsInteger(4))
7365 {
7366 xUpgradeFile.SetAttributeValue("WholeFile", "yes");
7367 }
7368
7369 this.AddChildToParent("UpgradedImages", xUpgradeFile, row, 0);
7370 }
7371 }
7372
7373 /// <summary>
7374 /// Decompile the UpgradedFilesToIgnore table.
7375 /// </summary>
7376 /// <param name="table">The table to decompile.</param>
7377 private void DecompileUpgradedFilesToIgnoreTable(Table table)
7378 {
7379 foreach (var row in table.Rows)
7380 {
7381 if ("*" != row.FieldAsString(0))
7382 {
7383 var xUpgradeFile = new XElement(Names.UpgradeFileElement,
7384 new XAttribute("File", row.FieldAsString(1)),
7385 new XAttribute("Ignore", "yes"));
7386
7387 this.AddChildToParent("UpgradedImages", xUpgradeFile, row, 0);
7388 }
7389 else
7390 {
7391 this.Messaging.Write(WarningMessages.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, row.Fields[0].Column.Name, row[0]));
7392 }
7393 }
7394 }
7395
7396 /// <summary>
7397 /// Decompile the UpgradedImages table.
7398 /// </summary>
7399 /// <param name="table">The table to decompile.</param>
7400 private void DecompileUpgradedImagesTable(Table table)
7401 {
7402 foreach (var row in table.Rows)
7403 {
7404 var xUpgradeImage = new XElement(Names.UpgradeImageElement,
7405 new XAttribute("Id", row.FieldAsString(0)),
7406 new XAttribute("SourceFile", row.FieldAsString(1)),
7407 XAttributeIfNotNull("SourcePatch", row, 2));
7408
7409 AddSymbolPaths(row, 3, xUpgradeImage);
7410
7411 this.AddChildToParent("ImageFamilies", xUpgradeImage, row, 4);
7412 this.DecompilerHelper.IndexElement(row, xUpgradeImage);
7413 }
7414 }
7415
7416 private static void AddSymbolPaths(Row row, int column, XElement xParent) 6831 private static void AddSymbolPaths(Row row, int column, XElement xParent)
7417 { 6832 {
7418 if (!row.IsColumnNull(column)) 6833 if (!row.IsColumnNull(column))
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Names.cs b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Names.cs
index e49c1df9..1738ae73 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Names.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Names.cs
@@ -10,7 +10,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
10 10
11 public static readonly XName PackageElement = WxsNamespace + "Package"; 11 public static readonly XName PackageElement = WxsNamespace + "Package";
12 public static readonly XName ModuleElement = WxsNamespace + "Module"; 12 public static readonly XName ModuleElement = WxsNamespace + "Module";
13 public static readonly XName PatchCreationElement = WxsNamespace + "PatchCreation";
14 13
15 public static readonly XName SummaryInformationElement = WxsNamespace + "SummaryInformation"; 14 public static readonly XName SummaryInformationElement = WxsNamespace + "SummaryInformation";
16 15
@@ -27,9 +26,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
27 26
28 public static readonly XName PropertyElement = WxsNamespace + "Property"; 27 public static readonly XName PropertyElement = WxsNamespace + "Property";
29 28
30 public static readonly XName ProtectRangeElement = WxsNamespace + "ProtectRange";
31 public static readonly XName ProtectFileElement = WxsNamespace + "ProtectFile";
32
33 public static readonly XName FileElement = WxsNamespace + "File"; 29 public static readonly XName FileElement = WxsNamespace + "File";
34 30
35 public static readonly XName EnsureTableElement = WxsNamespace + "EnsureTable"; 31 public static readonly XName EnsureTableElement = WxsNamespace + "EnsureTable";
@@ -44,7 +40,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
44 40
45 public static readonly XName BillboardElement = WxsNamespace + "Billboard"; 41 public static readonly XName BillboardElement = WxsNamespace + "Billboard";
46 public static readonly XName BillboardActionElement = WxsNamespace + "BillboardAction"; 42 public static readonly XName BillboardActionElement = WxsNamespace + "BillboardAction";
47 43
48 public static readonly XName BinaryElement = WxsNamespace + "Binary"; 44 public static readonly XName BinaryElement = WxsNamespace + "Binary";
49 45
50 public static readonly XName ClassElement = WxsNamespace + "Class"; 46 public static readonly XName ClassElement = WxsNamespace + "Class";
@@ -115,8 +111,6 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
115 public static readonly XName ODBCTranslatorElement = WxsNamespace + "ODBCTranslator"; 111 public static readonly XName ODBCTranslatorElement = WxsNamespace + "ODBCTranslator";
116 public static readonly XName PatchMetadataElement = WxsNamespace + "PatchMetadata"; 112 public static readonly XName PatchMetadataElement = WxsNamespace + "PatchMetadata";
117 public static readonly XName OptimizeCustomActionsElement = WxsNamespace + "OptimizeCustomActions"; 113 public static readonly XName OptimizeCustomActionsElement = WxsNamespace + "OptimizeCustomActions";
118 public static readonly XName CustomPropertyElement = WxsNamespace + "CustomProperty";
119 public static readonly XName PatchSequenceElement = WxsNamespace + "PatchSequence";
120 public static readonly XName ProgIdElement = WxsNamespace + "ProgId"; 114 public static readonly XName ProgIdElement = WxsNamespace + "ProgId";
121 public static readonly XName ReplacePatchElement = WxsNamespace + "ReplacePatch"; 115 public static readonly XName ReplacePatchElement = WxsNamespace + "ReplacePatch";
122 public static readonly XName TargetProductCodeElement = WxsNamespace + "TargetProductCode"; 116 public static readonly XName TargetProductCodeElement = WxsNamespace + "TargetProductCode";
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendFactory.cs b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendFactory.cs
index 42e1a45d..21e99f46 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendFactory.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendFactory.cs
@@ -37,10 +37,6 @@ namespace WixToolset.Core.WindowsInstaller
37 case ".msp": 37 case ".msp":
38 backend = new MspBackend(); 38 backend = new MspBackend();
39 return true; 39 return true;
40
41 //case "patchcreation":
42 //case ".pcp":
43 // return new PatchCreationBackend();
44 } 40 }
45 41
46 backend = null; 42 backend = null;
diff --git a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
index 73a1dd33..d45b9301 100644
--- a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -450,8 +450,6 @@ namespace WixToolset.Core.CommandLine
450 return ".msm"; 450 return ".msm";
451 case SectionType.Package: 451 case SectionType.Package:
452 return ".msi"; 452 return ".msi";
453 case SectionType.PatchCreation:
454 return ".pcp";
455 case SectionType.Patch: 453 case SectionType.Patch:
456 return ".msp"; 454 return ".msp";
457 case SectionType.Fragment: 455 case SectionType.Fragment:
@@ -473,8 +471,6 @@ namespace WixToolset.Core.CommandLine
473 return ".msm"; 471 return ".msm";
474 case OutputType.Patch: 472 case OutputType.Patch:
475 return ".msp"; 473 return ".msp";
476 case OutputType.PatchCreation:
477 return ".pcp";
478 case OutputType.Package: 474 case OutputType.Package:
479 return ".msi"; 475 return ".msi";
480 case OutputType.Transform: 476 case OutputType.Transform:
@@ -786,9 +782,6 @@ namespace WixToolset.Core.CommandLine
786 case ".msp": 782 case ".msp":
787 return Data.OutputType.Patch; 783 return Data.OutputType.Patch;
788 784
789 case ".pcp":
790 return Data.OutputType.PatchCreation;
791
792 case "product": 785 case "product":
793 case "package": 786 case "package":
794 case ".msi": 787 case ".msi":
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs
index e184e86c..9bcdca4a 100644
--- a/src/wix/WixToolset.Core/Compiler.cs
+++ b/src/wix/WixToolset.Core/Compiler.cs
@@ -220,7 +220,7 @@ namespace WixToolset.Core
220 this.ParseModuleElement(child); 220 this.ParseModuleElement(child);
221 break; 221 break;
222 case "PatchCreation": 222 case "PatchCreation":
223 this.ParsePatchCreationElement(child); 223 this.Core.Write(CompilerWarnings.PatchCreationDeprecated(sourceLineNumbers));
224 break; 224 break;
225 case "Package": 225 case "Package":
226 this.ParsePackageElement(child); 226 this.ParsePackageElement(child);
@@ -8038,89 +8038,6 @@ namespace WixToolset.Core
8038 } 8038 }
8039 8039
8040 /// <summary> 8040 /// <summary>
8041 /// Parses the All element under a PatchFamily.
8042 /// </summary>
8043 /// <param name="node">The element to parse.</param>
8044 private void ParseAllElement(XElement node)
8045 {
8046 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
8047
8048 // find unexpected attributes
8049 foreach (var attrib in node.Attributes())
8050 {
8051 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
8052 {
8053 this.Core.UnexpectedAttribute(node, attrib);
8054 }
8055 else
8056 {
8057 this.Core.ParseExtensionAttribute(node, attrib);
8058 }
8059 }
8060
8061 this.Core.ParseForExtensionElements(node);
8062
8063 // Always warn when using the All element.
8064 this.Core.Write(WarningMessages.AllChangesIncludedInPatch(sourceLineNumbers));
8065
8066 if (!this.Core.EncounteredError)
8067 {
8068 this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers)
8069 {
8070 Table = "*",
8071 PrimaryKeys = "*",
8072 });
8073 }
8074 }
8075
8076 /// <summary>
8077 /// Parses all reference elements under a PatchFamily.
8078 /// </summary>
8079 /// <param name="node">The element to parse.</param>
8080 /// <param name="tableName">Table that reference was made to.</param>
8081 private void ParsePatchChildRefElement(XElement node, string tableName)
8082 {
8083 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
8084 string id = null;
8085
8086 foreach (var attrib in node.Attributes())
8087 {
8088 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
8089 {
8090 switch (attrib.Name.LocalName)
8091 {
8092 case "Id":
8093 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
8094 break;
8095 default:
8096 this.Core.UnexpectedAttribute(node, attrib);
8097 break;
8098 }
8099 }
8100 else
8101 {
8102 this.Core.ParseExtensionAttribute(node, attrib);
8103 }
8104 }
8105
8106 if (null == id)
8107 {
8108 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
8109 }
8110
8111 this.Core.ParseForExtensionElements(node);
8112
8113 if (!this.Core.EncounteredError)
8114 {
8115 this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers)
8116 {
8117 Table = tableName,
8118 PrimaryKeys = id
8119 });
8120 }
8121 }
8122
8123 /// <summary>
8124 /// Parses a PatchBaseline element. 8041 /// Parses a PatchBaseline element.
8125 /// </summary> 8042 /// </summary>
8126 /// <param name="node">The element to parse.</param> 8043 /// <param name="node">The element to parse.</param>
@@ -8221,6 +8138,72 @@ namespace WixToolset.Core
8221 } 8138 }
8222 8139
8223 /// <summary> 8140 /// <summary>
8141 /// Parses a range element (ProtectRange, IgnoreRange, etc).
8142 /// </summary>
8143 /// <param name="node">The element to parse.</param>
8144 /// <param name="offsets">Reference to the offsets string.</param>
8145 /// <param name="lengths">Reference to the lengths string.</param>
8146 private void ParseRangeElement(XElement node, ref string offsets, ref string lengths)
8147 {
8148 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
8149 string length = null;
8150 string offset = null;
8151
8152 foreach (var attrib in node.Attributes())
8153 {
8154 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
8155 {
8156 switch (attrib.Name.LocalName)
8157 {
8158 case "Length":
8159 length = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8160 break;
8161 case "Offset":
8162 offset = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8163 break;
8164 default:
8165 this.Core.UnexpectedAttribute(node, attrib);
8166 break;
8167 }
8168 }
8169 else
8170 {
8171 this.Core.ParseExtensionAttribute(node, attrib);
8172 }
8173 }
8174
8175 if (null == length)
8176 {
8177 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Length"));
8178 }
8179
8180 if (null == offset)
8181 {
8182 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset"));
8183 }
8184
8185 this.Core.ParseForExtensionElements(node);
8186
8187 if (null != lengths)
8188 {
8189 lengths = String.Concat(lengths, ",", length);
8190 }
8191 else
8192 {
8193 lengths = length;
8194 }
8195
8196 if (null != offsets)
8197 {
8198 offsets = String.Concat(offsets, ",", offset);
8199 }
8200 else
8201 {
8202 offsets = offset;
8203 }
8204 }
8205
8206 /// <summary>
8224 /// Parses a Validate element. 8207 /// Parses a Validate element.
8225 /// </summary> 8208 /// </summary>
8226 /// <param name="node">The element to parse.</param> 8209 /// <param name="node">The element to parse.</param>
diff --git a/src/wix/WixToolset.Core/CompilerWarnings.cs b/src/wix/WixToolset.Core/CompilerWarnings.cs
index 97d20ba6..6685f2b2 100644
--- a/src/wix/WixToolset.Core/CompilerWarnings.cs
+++ b/src/wix/WixToolset.Core/CompilerWarnings.cs
@@ -31,6 +31,11 @@ namespace WixToolset.Core
31 return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default.", id); 31 return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default.", id);
32 } 32 }
33 33
34 public static Message PatchCreationDeprecated(SourceLineNumber sourceLineNumbers)
35 {
36 return Message(sourceLineNumbers, Ids.PatchCreationDeprecated, "The PatchCreation element is not supported in WiX v4 and later. Use the Patch element instead.");
37 }
38
34 public static Message PropertyRemoved(string name) 39 public static Message PropertyRemoved(string name)
35 { 40 {
36 return Message(null, Ids.PropertyRemoved, "The property {0} was authored in the package with a value and will be removed. The property should not be authored.", name); 41 return Message(null, Ids.PropertyRemoved, "The property {0} was authored in the package with a value and will be removed. The property should not be authored.", name);
@@ -72,6 +77,7 @@ namespace WixToolset.Core
72 DefiningStandardDirectoryDeprecated = 5437, 77 DefiningStandardDirectoryDeprecated = 5437,
73 ReadonlyLogVariableTarget = 5438, 78 ReadonlyLogVariableTarget = 5438,
74 // DO_NOT_REUSE ReservedBurnNamespaceWarning = 5439, 79 // DO_NOT_REUSE ReservedBurnNamespaceWarning = 5439,
80 PatchCreationDeprecated = 5440,
75 } // 5400-5499 and 6600-6699 were the ranges for Dependency and Tag which are now in Core between CompilerWarnings and CompilerErrors. 81 } // 5400-5499 and 6600-6699 were the ranges for Dependency and Tag which are now in Core between CompilerWarnings and CompilerErrors.
76 } 82 }
77} 83}
diff --git a/src/wix/WixToolset.Core/Compiler_Patch.cs b/src/wix/WixToolset.Core/Compiler_Patch.cs
index 43e1d2e9..e20737dd 100644
--- a/src/wix/WixToolset.Core/Compiler_Patch.cs
+++ b/src/wix/WixToolset.Core/Compiler_Patch.cs
@@ -566,6 +566,53 @@ namespace WixToolset.Core
566 } 566 }
567 567
568 /// <summary> 568 /// <summary>
569 /// Parses all reference elements under a PatchFamily.
570 /// </summary>
571 /// <param name="node">The element to parse.</param>
572 /// <param name="tableName">Table that reference was made to.</param>
573 private void ParsePatchChildRefElement(XElement node, string tableName)
574 {
575 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
576 string id = null;
577
578 foreach (var attrib in node.Attributes())
579 {
580 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
581 {
582 switch (attrib.Name.LocalName)
583 {
584 case "Id":
585 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
586 break;
587 default:
588 this.Core.UnexpectedAttribute(node, attrib);
589 break;
590 }
591 }
592 else
593 {
594 this.Core.ParseExtensionAttribute(node, attrib);
595 }
596 }
597
598 if (null == id)
599 {
600 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
601 }
602
603 this.Core.ParseForExtensionElements(node);
604
605 if (!this.Core.EncounteredError)
606 {
607 this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers)
608 {
609 Table = tableName,
610 PrimaryKeys = id
611 });
612 }
613 }
614
615 /// <summary>
569 /// Parses a TargetProductCodes element. 616 /// Parses a TargetProductCodes element.
570 /// </summary> 617 /// </summary>
571 /// <param name="node">The element to parse.</param> 618 /// <param name="node">The element to parse.</param>
@@ -644,6 +691,42 @@ namespace WixToolset.Core
644 } 691 }
645 } 692 }
646 693
694 /// <summary>
695 /// Parses the All element under a PatchFamily.
696 /// </summary>
697 /// <param name="node">The element to parse.</param>
698 private void ParseAllElement(XElement node)
699 {
700 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
701
702 // find unexpected attributes
703 foreach (var attrib in node.Attributes())
704 {
705 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
706 {
707 this.Core.UnexpectedAttribute(node, attrib);
708 }
709 else
710 {
711 this.Core.ParseExtensionAttribute(node, attrib);
712 }
713 }
714
715 this.Core.ParseForExtensionElements(node);
716
717 // Always warn when using the All element.
718 this.Core.Write(WarningMessages.AllChangesIncludedInPatch(sourceLineNumbers));
719
720 if (!this.Core.EncounteredError)
721 {
722 this.Core.AddSymbol(new WixPatchRefSymbol(sourceLineNumbers)
723 {
724 Table = "*",
725 PrimaryKeys = "*",
726 });
727 }
728 }
729
647 private void AddMsiPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value) 730 private void AddMsiPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value)
648 { 731 {
649 this.Core.AddSymbol(new MsiPatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Section, company, property)) 732 this.Core.AddSymbol(new MsiPatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Section, company, property))
diff --git a/src/wix/WixToolset.Core/Compiler_PatchCreation.cs b/src/wix/WixToolset.Core/Compiler_PatchCreation.cs
deleted file mode 100644
index 81ae4121..00000000
--- a/src/wix/WixToolset.Core/Compiler_PatchCreation.cs
+++ /dev/null
@@ -1,1265 +0,0 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Core
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Globalization;
8 using System.Xml.Linq;
9 using WixToolset.Data;
10 using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility;
12
13 /// <summary>
14 /// Compiler of the WiX toolset.
15 /// </summary>
16 internal partial class Compiler : ICompiler
17 {
18 /// <summary>
19 /// Parses a patch creation element.
20 /// </summary>
21 /// <param name="node">The element to parse.</param>
22 private void ParsePatchCreationElement(XElement node)
23 {
24 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
25 var clean = true; // Default is to clean
26 var codepage = 0;
27 string outputPath = null;
28 var productMismatches = false;
29 var replaceGuids = String.Empty;
30 string sourceList = null;
31 string symbolFlags = null;
32 var targetProducts = String.Empty;
33 var versionMismatches = false;
34 var wholeFiles = false;
35
36 foreach (var attrib in node.Attributes())
37 {
38 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
39 {
40 switch (attrib.Name.LocalName)
41 {
42 case "Id":
43 this.activeName = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
44 break;
45 case "AllowMajorVersionMismatches":
46 versionMismatches = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
47 break;
48 case "AllowProductCodeMismatches":
49 productMismatches = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
50 break;
51 case "CleanWorkingFolder":
52 clean = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
53 break;
54 case "Codepage":
55 codepage = this.Core.GetAttributeCodePageValue(sourceLineNumbers, attrib);
56 break;
57 case "OutputPath":
58 outputPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
59 break;
60 case "SourceList":
61 sourceList = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
62 break;
63 case "SymbolFlags":
64 symbolFlags = String.Format(CultureInfo.InvariantCulture, "0x{0:x8}", this.Core.GetAttributeLongValue(sourceLineNumbers, attrib, 0, UInt32.MaxValue));
65 break;
66 case "WholeFilesOnly":
67 wholeFiles = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
68 break;
69 default:
70 this.Core.UnexpectedAttribute(node, attrib);
71 break;
72 }
73 }
74 else
75 {
76 this.Core.ParseExtensionAttribute(node, attrib);
77 }
78 }
79
80 if (null == this.activeName)
81 {
82 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
83 }
84
85 this.Core.CreateActiveSection(this.activeName, SectionType.PatchCreation, this.Context.CompilationId);
86
87 foreach (var child in node.Elements())
88 {
89 if (CompilerCore.WixNamespace == child.Name.Namespace)
90 {
91 switch (child.Name.LocalName)
92 {
93 case "Family":
94 this.ParseFamilyElement(child);
95 break;
96 case "PatchInformation":
97 this.ParsePatchInformationElement(child);
98 break;
99 case "PatchMetadata":
100 this.ParsePatchMetadataElement(child);
101 break;
102 case "PatchProperty":
103 this.ParsePatchPropertyElement(child, false);
104 break;
105 case "PatchSequence":
106 this.ParsePatchSequenceElement(child);
107 break;
108 case "ReplacePatch":
109 replaceGuids = String.Concat(replaceGuids, this.ParseReplacePatchElement(child));
110 break;
111 case "TargetProductCode":
112 var targetProduct = this.ParseTargetProductCodeElement(child);
113 if (0 < targetProducts.Length)
114 {
115 targetProducts = String.Concat(targetProducts, ";");
116 }
117 targetProducts = String.Concat(targetProducts, targetProduct);
118 break;
119 default:
120 this.Core.UnexpectedElement(node, child);
121 break;
122 }
123 }
124 else
125 {
126 this.Core.ParseExtensionElement(node, child);
127 }
128 }
129
130 this.AddPrivateProperty(sourceLineNumbers, "PatchGUID", this.activeName);
131 this.AddPrivateProperty(sourceLineNumbers, "AllowProductCodeMismatches", productMismatches ? "1" : "0");
132 this.AddPrivateProperty(sourceLineNumbers, "AllowProductVersionMajorMismatches", versionMismatches ? "1" : "0");
133 this.AddPrivateProperty(sourceLineNumbers, "DontRemoveTempFolderWhenFinished", clean ? "0" : "1");
134 this.AddPrivateProperty(sourceLineNumbers, "IncludeWholeFilesOnly", wholeFiles ? "1" : "0");
135
136 if (null != symbolFlags)
137 {
138 this.AddPrivateProperty(sourceLineNumbers, "ApiPatchingSymbolFlags", symbolFlags);
139 }
140
141 if (0 < replaceGuids.Length)
142 {
143 this.AddPrivateProperty(sourceLineNumbers, "ListOfPatchGUIDsToReplace", replaceGuids);
144 }
145
146 if (0 < targetProducts.Length)
147 {
148 this.AddPrivateProperty(sourceLineNumbers, "ListOfTargetProductCodes", targetProducts);
149 }
150
151 if (null != outputPath)
152 {
153 this.AddPrivateProperty(sourceLineNumbers, "PatchOutputPath", outputPath);
154 }
155
156 if (null != sourceList)
157 {
158 this.AddPrivateProperty(sourceLineNumbers, "PatchSourceList", sourceList);
159 }
160 }
161
162 /// <summary>
163 /// Parses a family element.
164 /// </summary>
165 /// <param name="node">The element to parse.</param>
166 private void ParseFamilyElement(XElement node)
167 {
168 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
169 var diskId = CompilerConstants.IntegerNotSet;
170 string diskPrompt = null;
171 string mediaSrcProp = null;
172 string name = null;
173 var sequenceStart = CompilerConstants.IntegerNotSet;
174 string volumeLabel = null;
175
176 foreach (var attrib in node.Attributes())
177 {
178 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
179 {
180 switch (attrib.Name.LocalName)
181 {
182 case "DiskId":
183 diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue);
184 break;
185 case "DiskPrompt":
186 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
187 break;
188 case "MediaSrcProp":
189 mediaSrcProp = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
190 break;
191 case "Name":
192 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
193 break;
194 case "SequenceStart":
195 sequenceStart = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int32.MaxValue);
196 break;
197 case "VolumeLabel":
198 volumeLabel = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
199 break;
200 default:
201 this.Core.UnexpectedAttribute(node, attrib);
202 break;
203 }
204 }
205 else
206 {
207 this.Core.ParseExtensionAttribute(node, attrib);
208 }
209 }
210
211 if (null == name)
212 {
213 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
214 }
215 else if (0 < name.Length)
216 {
217 if (8 < name.Length) // check the length
218 {
219 this.Core.Write(ErrorMessages.FamilyNameTooLong(sourceLineNumbers, node.Name.LocalName, "Name", name, name.Length));
220 }
221 else // check for illegal characters
222 {
223 foreach (var character in name)
224 {
225 if (!Char.IsLetterOrDigit(character) && '_' != character)
226 {
227 this.Core.Write(ErrorMessages.IllegalFamilyName(sourceLineNumbers, node.Name.LocalName, "Name", name));
228 }
229 }
230 }
231 }
232
233 foreach (var child in node.Elements())
234 {
235 if (CompilerCore.WixNamespace == child.Name.Namespace)
236 {
237 switch (child.Name.LocalName)
238 {
239 case "UpgradeImage":
240 this.ParseUpgradeImageElement(child, name);
241 break;
242 case "ExternalFile":
243 this.ParseExternalFileElement(child, name);
244 break;
245 case "ProtectFile":
246 this.ParseProtectFileElement(child, name);
247 break;
248 default:
249 this.Core.UnexpectedElement(node, child);
250 break;
251 }
252 }
253 else
254 {
255 this.Core.ParseExtensionElement(node, child);
256 }
257 }
258
259 if (!this.Core.EncounteredError)
260 {
261 var symbol = this.Core.AddSymbol(new ImageFamiliesSymbol(sourceLineNumbers)
262 {
263 Family = name,
264 MediaSrcPropName = mediaSrcProp,
265 DiskPrompt = diskPrompt,
266 VolumeLabel = volumeLabel
267 });
268
269 if (CompilerConstants.IntegerNotSet != diskId)
270 {
271 symbol.MediaDiskId = diskId;
272 }
273
274 if (CompilerConstants.IntegerNotSet != sequenceStart)
275 {
276 symbol.FileSequenceStart = sequenceStart;
277 }
278 }
279 }
280
281 /// <summary>
282 /// Parses an upgrade image element.
283 /// </summary>
284 /// <param name="node">The element to parse.</param>
285 /// <param name="family">The family for this element.</param>
286 private void ParseUpgradeImageElement(XElement node, string family)
287 {
288 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
289 string sourceFile = null;
290 string sourcePatch = null;
291 var symbols = new List<string>();
292 string upgrade = null;
293
294 foreach (var attrib in node.Attributes())
295 {
296 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
297 {
298 switch (attrib.Name.LocalName)
299 {
300 case "Id":
301 upgrade = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
302 if (13 < upgrade.Length)
303 {
304 this.Core.Write(ErrorMessages.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", upgrade, 13));
305 }
306 break;
307 case "SourceFile":
308 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
309 break;
310 case "SourcePatch":
311 sourcePatch = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
312 break;
313 default:
314 this.Core.UnexpectedAttribute(node, attrib);
315 break;
316 }
317 }
318 else
319 {
320 this.Core.ParseExtensionAttribute(node, attrib);
321 }
322 }
323
324 if (null == upgrade)
325 {
326 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
327 }
328
329 if (null == sourceFile)
330 {
331 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
332 }
333
334 foreach (var child in node.Elements())
335 {
336 if (CompilerCore.WixNamespace == child.Name.Namespace)
337 {
338 switch (child.Name.LocalName)
339 {
340 case "SymbolPath":
341 symbols.Add(this.ParseSymbolPathElement(child));
342 break;
343 case "TargetImage":
344 this.ParseTargetImageElement(child, upgrade, family);
345 break;
346 case "UpgradeFile":
347 this.ParseUpgradeFileElement(child, upgrade);
348 break;
349 default:
350 this.Core.UnexpectedElement(node, child);
351 break;
352 }
353 }
354 else
355 {
356 this.Core.ParseExtensionElement(node, child);
357 }
358 }
359
360 if (!this.Core.EncounteredError)
361 {
362 this.Core.AddSymbol(new UpgradedImagesSymbol(sourceLineNumbers)
363 {
364 Upgraded = upgrade,
365 MsiPath = sourceFile,
366 PatchMsiPath = sourcePatch,
367 SymbolPaths = String.Join(";", symbols),
368 Family = family
369 });
370 }
371 }
372
373 /// <summary>
374 /// Parses an upgrade file element.
375 /// </summary>
376 /// <param name="node">The element to parse.</param>
377 /// <param name="upgrade">The upgrade key for this element.</param>
378 private void ParseUpgradeFileElement(XElement node, string upgrade)
379 {
380 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
381 var allowIgnoreOnError = false;
382 string file = null;
383 var ignore = false;
384 var symbols = new List<string>();
385 var wholeFile = false;
386
387 foreach (var attrib in node.Attributes())
388 {
389 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
390 {
391 switch (attrib.Name.LocalName)
392 {
393 case "AllowIgnoreOnError":
394 allowIgnoreOnError = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
395 break;
396 case "File":
397 file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
398 break;
399 case "Ignore":
400 ignore = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
401 break;
402 case "WholeFile":
403 wholeFile = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
404 break;
405 default:
406 this.Core.UnexpectedAttribute(node, attrib);
407 break;
408 }
409 }
410 else
411 {
412 this.Core.ParseExtensionAttribute(node, attrib);
413 }
414 }
415
416 if (null == file)
417 {
418 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
419 }
420
421 foreach (var child in node.Elements())
422 {
423 if (CompilerCore.WixNamespace == child.Name.Namespace)
424 {
425 switch (child.Name.LocalName)
426 {
427 case "SymbolPath":
428 symbols.Add(this.ParseSymbolPathElement(child));
429 break;
430 default:
431 this.Core.UnexpectedElement(node, child);
432 break;
433 }
434 }
435 else
436 {
437 this.Core.ParseExtensionElement(node, child);
438 }
439 }
440
441 if (!this.Core.EncounteredError)
442 {
443 if (ignore)
444 {
445 this.Core.AddSymbol(new UpgradedFilesToIgnoreSymbol(sourceLineNumbers)
446 {
447 Upgraded = upgrade,
448 FTK = file
449 });
450 }
451 else
452 {
453 this.Core.AddSymbol(new UpgradedFilesOptionalDataSymbol(sourceLineNumbers)
454 {
455 Upgraded = upgrade,
456 FTK = file,
457 SymbolPaths = String.Join(";", symbols),
458 AllowIgnoreOnPatchError = allowIgnoreOnError,
459 IncludeWholeFile = wholeFile
460 });
461 }
462 }
463 }
464
465 /// <summary>
466 /// Parses a target image element.
467 /// </summary>
468 /// <param name="node">The element to parse.</param>
469 /// <param name="upgrade">The upgrade key for this element.</param>
470 /// <param name="family">The family key for this element.</param>
471 private void ParseTargetImageElement(XElement node, string upgrade, string family)
472 {
473 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
474 var ignore = false;
475 var order = CompilerConstants.IntegerNotSet;
476 string sourceFile = null;
477 string symbols = null;
478 string target = null;
479 string validation = null;
480
481 foreach (var attrib in node.Attributes())
482 {
483 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
484 {
485 switch (attrib.Name.LocalName)
486 {
487 case "Id":
488 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
489 if (target.Length > 13)
490 {
491 this.Core.Write(ErrorMessages.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", target, 13));
492 }
493 break;
494 case "IgnoreMissingFiles":
495 ignore = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
496 break;
497 case "Order":
498 order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue);
499 break;
500 case "SourceFile":
501 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
502 break;
503 case "Validation":
504 validation = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
505 break;
506 default:
507 this.Core.UnexpectedAttribute(node, attrib);
508 break;
509 }
510 }
511 else
512 {
513 this.Core.ParseExtensionAttribute(node, attrib);
514 }
515 }
516
517 if (null == target)
518 {
519 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
520 }
521
522 if (null == sourceFile)
523 {
524 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
525 }
526
527 if (CompilerConstants.IntegerNotSet == order)
528 {
529 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Order"));
530 }
531
532 foreach (var child in node.Elements())
533 {
534 if (CompilerCore.WixNamespace == child.Name.Namespace)
535 {
536 switch (child.Name.LocalName)
537 {
538 case "SymbolPath":
539 if (null != symbols)
540 {
541 symbols = String.Concat(symbols, ";", this.ParseSymbolPathElement(child));
542 }
543 else
544 {
545 symbols = this.ParseSymbolPathElement(child);
546 }
547 break;
548 case "TargetFile":
549 this.ParseTargetFileElement(child, target, family);
550 break;
551 default:
552 this.Core.UnexpectedElement(node, child);
553 break;
554 }
555 }
556 else
557 {
558 this.Core.ParseExtensionElement(node, child);
559 }
560 }
561
562 if (!this.Core.EncounteredError)
563 {
564 this.Core.AddSymbol(new TargetImagesSymbol(sourceLineNumbers)
565 {
566 Target = target,
567 MsiPath = sourceFile,
568 SymbolPaths = symbols,
569 Upgraded = upgrade,
570 Order = order,
571 ProductValidateFlags = validation,
572 IgnoreMissingSrcFiles = ignore
573 });
574 }
575 }
576
577 /// <summary>
578 /// Parses an upgrade file element.
579 /// </summary>
580 /// <param name="node">The element to parse.</param>
581 /// <param name="target">The upgrade key for this element.</param>
582 /// <param name="family">The family key for this element.</param>
583 private void ParseTargetFileElement(XElement node, string target, string family)
584 {
585 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
586 string file = null;
587 string ignoreLengths = null;
588 string ignoreOffsets = null;
589 string protectLengths = null;
590 string protectOffsets = null;
591 string symbols = null;
592
593 foreach (var attrib in node.Attributes())
594 {
595 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
596 {
597 switch (attrib.Name.LocalName)
598 {
599 case "Id":
600 file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
601 break;
602 default:
603 this.Core.UnexpectedAttribute(node, attrib);
604 break;
605 }
606 }
607 else
608 {
609 this.Core.ParseExtensionAttribute(node, attrib);
610 }
611 }
612
613 if (null == file)
614 {
615 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
616 }
617
618 foreach (var child in node.Elements())
619 {
620 if (CompilerCore.WixNamespace == child.Name.Namespace)
621 {
622 switch (child.Name.LocalName)
623 {
624 case "IgnoreRange":
625 this.ParseRangeElement(child, ref ignoreOffsets, ref ignoreLengths);
626 break;
627 case "ProtectRange":
628 this.ParseRangeElement(child, ref protectOffsets, ref protectLengths);
629 break;
630 case "SymbolPath":
631 symbols = this.ParseSymbolPathElement(child);
632 break;
633 default:
634 this.Core.UnexpectedElement(node, child);
635 break;
636 }
637 }
638 else
639 {
640 this.Core.ParseExtensionElement(node, child);
641 }
642 }
643
644 if (!this.Core.EncounteredError)
645 {
646 var symbol = this.Core.AddSymbol(new TargetFilesOptionalDataSymbol(sourceLineNumbers)
647 {
648 Target = target,
649 FTK = file,
650 SymbolPaths = symbols,
651 IgnoreOffsets = ignoreOffsets,
652 IgnoreLengths = ignoreLengths,
653 });
654
655 if (null != protectOffsets)
656 {
657 symbol.RetainOffsets = protectOffsets;
658
659 this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers)
660 {
661 Family = family,
662 FTK = file,
663 RetainOffsets = protectOffsets,
664 RetainLengths = protectLengths,
665 });
666 }
667 }
668 }
669
670 /// <summary>
671 /// Parses an external file element.
672 /// </summary>
673 /// <param name="node">The element to parse.</param>
674 /// <param name="family">The family for this element.</param>
675 private void ParseExternalFileElement(XElement node, string family)
676 {
677 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
678 string file = null;
679 string ignoreLengths = null;
680 string ignoreOffsets = null;
681 var order = CompilerConstants.IntegerNotSet;
682 string protectLengths = null;
683 string protectOffsets = null;
684 string source = null;
685 string symbols = null;
686
687 foreach (var attrib in node.Attributes())
688 {
689 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
690 {
691 switch (attrib.Name.LocalName)
692 {
693 case "File":
694 file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
695 break;
696 case "Order":
697 order = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, Int32.MinValue + 2, Int32.MaxValue);
698 break;
699 case "Source":
700 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
701 break;
702 default:
703 this.Core.UnexpectedAttribute(node, attrib);
704 break;
705 }
706 }
707 else
708 {
709 this.Core.ParseExtensionAttribute(node, attrib);
710 }
711 }
712
713 if (null == file)
714 {
715 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
716 }
717
718 if (null == source)
719 {
720 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Source"));
721 }
722
723 if (CompilerConstants.IntegerNotSet == order)
724 {
725 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Order"));
726 }
727
728 foreach (var child in node.Elements())
729 {
730 if (CompilerCore.WixNamespace == child.Name.Namespace)
731 {
732 switch (child.Name.LocalName)
733 {
734 case "IgnoreRange":
735 this.ParseRangeElement(child, ref ignoreOffsets, ref ignoreLengths);
736 break;
737 case "ProtectRange":
738 this.ParseRangeElement(child, ref protectOffsets, ref protectLengths);
739 break;
740 case "SymbolPath":
741 symbols = this.ParseSymbolPathElement(child);
742 break;
743 default:
744 this.Core.UnexpectedElement(node, child);
745 break;
746 }
747 }
748 else
749 {
750 this.Core.ParseExtensionElement(node, child);
751 }
752 }
753
754 if (!this.Core.EncounteredError)
755 {
756 var symbol = this.Core.AddSymbol(new ExternalFilesSymbol(sourceLineNumbers)
757 {
758 Family = family,
759 FTK = file,
760 FilePath = source,
761 SymbolPaths = symbols,
762 IgnoreOffsets = ignoreOffsets,
763 IgnoreLengths = ignoreLengths,
764 });
765
766 if (null != protectOffsets)
767 {
768 symbol.RetainOffsets = protectOffsets;
769 }
770
771 if (CompilerConstants.IntegerNotSet != order)
772 {
773 symbol.Order = order;
774 }
775
776 if (null != protectOffsets)
777 {
778 this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers)
779 {
780 Family = family,
781 FTK = file,
782 RetainOffsets = protectOffsets,
783 RetainLengths = protectLengths,
784 });
785 }
786 }
787 }
788
789 /// <summary>
790 /// Parses a protect file element.
791 /// </summary>
792 /// <param name="node">The element to parse.</param>
793 /// <param name="family">The family for this element.</param>
794 private void ParseProtectFileElement(XElement node, string family)
795 {
796 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
797 string file = null;
798 string protectLengths = null;
799 string protectOffsets = null;
800
801 foreach (var attrib in node.Attributes())
802 {
803 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
804 {
805 switch (attrib.Name.LocalName)
806 {
807 case "File":
808 file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
809 break;
810 default:
811 this.Core.UnexpectedAttribute(node, attrib);
812 break;
813 }
814 }
815 else
816 {
817 this.Core.ParseExtensionAttribute(node, attrib);
818 }
819 }
820
821 if (null == file)
822 {
823 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
824 }
825
826 foreach (var child in node.Elements())
827 {
828 if (CompilerCore.WixNamespace == child.Name.Namespace)
829 {
830 switch (child.Name.LocalName)
831 {
832 case "ProtectRange":
833 this.ParseRangeElement(child, ref protectOffsets, ref protectLengths);
834 break;
835 default:
836 this.Core.UnexpectedElement(node, child);
837 break;
838 }
839 }
840 else
841 {
842 this.Core.ParseExtensionElement(node, child);
843 }
844 }
845
846 if (null == protectOffsets || null == protectLengths)
847 {
848 this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "ProtectRange"));
849 }
850
851 if (!this.Core.EncounteredError)
852 {
853 this.Core.AddSymbol(new FamilyFileRangesSymbol(sourceLineNumbers)
854 {
855 Family = family,
856 FTK = file,
857 RetainOffsets = protectOffsets,
858 RetainLengths = protectLengths
859 });
860 }
861 }
862
863 /// <summary>
864 /// Parses a range element (ProtectRange, IgnoreRange, etc).
865 /// </summary>
866 /// <param name="node">The element to parse.</param>
867 /// <param name="offsets">Reference to the offsets string.</param>
868 /// <param name="lengths">Reference to the lengths string.</param>
869 private void ParseRangeElement(XElement node, ref string offsets, ref string lengths)
870 {
871 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
872 string length = null;
873 string offset = null;
874
875 foreach (var attrib in node.Attributes())
876 {
877 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
878 {
879 switch (attrib.Name.LocalName)
880 {
881 case "Length":
882 length = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
883 break;
884 case "Offset":
885 offset = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
886 break;
887 default:
888 this.Core.UnexpectedAttribute(node, attrib);
889 break;
890 }
891 }
892 else
893 {
894 this.Core.ParseExtensionAttribute(node, attrib);
895 }
896 }
897
898 if (null == length)
899 {
900 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Length"));
901 }
902
903 if (null == offset)
904 {
905 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset"));
906 }
907
908 this.Core.ParseForExtensionElements(node);
909
910 if (null != lengths)
911 {
912 lengths = String.Concat(lengths, ",", length);
913 }
914 else
915 {
916 lengths = length;
917 }
918
919 if (null != offsets)
920 {
921 offsets = String.Concat(offsets, ",", offset);
922 }
923 else
924 {
925 offsets = offset;
926 }
927 }
928
929 /// <summary>
930 /// Parses a patch metadata element.
931 /// </summary>
932 /// <param name="node">Element to parse.</param>
933 private void ParsePatchMetadataElement(XElement node)
934 {
935 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
936 var allowRemoval = YesNoType.NotSet;
937 string classification = null;
938 string creationTimeUtc = null;
939 string description = null;
940 string displayName = null;
941 string manufacturerName = null;
942 string minorUpdateTargetRTM = null;
943 string moreInfoUrl = null;
944 var optimizeCA = CompilerConstants.IntegerNotSet;
945 var optimizedInstallMode = YesNoType.NotSet;
946 string targetProductName = null;
947
948 foreach (var attrib in node.Attributes())
949 {
950 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
951 {
952 switch (attrib.Name.LocalName)
953 {
954 case "AllowRemoval":
955 allowRemoval = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
956 break;
957 case "Classification":
958 classification = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
959 break;
960 case "CreationTimeUTC":
961 creationTimeUtc = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
962 break;
963 case "Description":
964 description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
965 break;
966 case "DisplayName":
967 displayName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
968 break;
969 case "ManufacturerName":
970 manufacturerName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
971 break;
972 case "MinorUpdateTargetRTM":
973 minorUpdateTargetRTM = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
974 break;
975 case "MoreInfoURL":
976 moreInfoUrl = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
977 break;
978 case "OptimizedInstallMode":
979 optimizedInstallMode = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
980 break;
981 case "TargetProductName":
982 targetProductName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
983 break;
984 default:
985 this.Core.UnexpectedAttribute(node, attrib);
986 break;
987 }
988 }
989 else
990 {
991 this.Core.ParseExtensionAttribute(node, attrib);
992 }
993 }
994
995 if (YesNoType.NotSet == allowRemoval)
996 {
997 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AllowRemoval"));
998 }
999
1000 if (null == classification)
1001 {
1002 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Classification"));
1003 }
1004
1005 if (null == description)
1006 {
1007 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
1008 }
1009
1010 if (null == displayName)
1011 {
1012 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayName"));
1013 }
1014
1015 if (null == manufacturerName)
1016 {
1017 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ManufacturerName"));
1018 }
1019
1020 if (null == moreInfoUrl)
1021 {
1022 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MoreInfoURL"));
1023 }
1024
1025 if (null == targetProductName)
1026 {
1027 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetProductName"));
1028 }
1029
1030 foreach (var child in node.Elements())
1031 {
1032 if (CompilerCore.WixNamespace == child.Name.Namespace)
1033 {
1034 switch (child.Name.LocalName)
1035 {
1036 case "CustomProperty":
1037 this.ParseCustomPropertyElement(child);
1038 break;
1039 case "OptimizeCustomActions":
1040 optimizeCA = this.ParseOptimizeCustomActionsElement(child);
1041 break;
1042 default:
1043 this.Core.UnexpectedElement(node, child);
1044 break;
1045 }
1046 }
1047 else
1048 {
1049 this.Core.ParseExtensionElement(node, child);
1050 }
1051 }
1052
1053 if (!this.Core.EncounteredError)
1054 {
1055 if (YesNoType.NotSet != allowRemoval)
1056 {
1057 this.AddPatchMetadata(sourceLineNumbers, null, "AllowRemoval", YesNoType.Yes == allowRemoval ? "1" : "0");
1058 }
1059
1060 if (null != classification)
1061 {
1062 this.AddPatchMetadata(sourceLineNumbers, null, "Classification", classification);
1063 }
1064
1065 if (null != creationTimeUtc)
1066 {
1067 this.AddPatchMetadata(sourceLineNumbers, null, "CreationTimeUTC", creationTimeUtc);
1068 }
1069
1070 if (null != description)
1071 {
1072 this.AddPatchMetadata(sourceLineNumbers, null, "Description", description);
1073 }
1074
1075 if (null != displayName)
1076 {
1077 this.AddPatchMetadata(sourceLineNumbers, null, "DisplayName", displayName);
1078 }
1079
1080 if (null != manufacturerName)
1081 {
1082 this.AddPatchMetadata(sourceLineNumbers, null, "ManufacturerName", manufacturerName);
1083 }
1084
1085 if (null != minorUpdateTargetRTM)
1086 {
1087 this.AddPatchMetadata(sourceLineNumbers, null, "MinorUpdateTargetRTM", minorUpdateTargetRTM);
1088 }
1089
1090 if (null != moreInfoUrl)
1091 {
1092 this.AddPatchMetadata(sourceLineNumbers, null, "MoreInfoURL", moreInfoUrl);
1093 }
1094
1095 if (CompilerConstants.IntegerNotSet != optimizeCA)
1096 {
1097 this.AddPatchMetadata(sourceLineNumbers, null, "OptimizeCA", optimizeCA.ToString(CultureInfo.InvariantCulture));
1098 }
1099
1100 if (YesNoType.NotSet != optimizedInstallMode)
1101 {
1102 this.AddPatchMetadata(sourceLineNumbers, null, "OptimizedInstallMode", YesNoType.Yes == optimizedInstallMode ? "1" : "0");
1103 }
1104
1105 if (null != targetProductName)
1106 {
1107 this.AddPatchMetadata(sourceLineNumbers, null, "TargetProductName", targetProductName);
1108 }
1109 }
1110 }
1111
1112 /// <summary>
1113 /// Parses a custom property element for the PatchMetadata table.
1114 /// </summary>
1115 /// <param name="node">Element to parse.</param>
1116 private void ParseCustomPropertyElement(XElement node)
1117 {
1118 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1119 string company = null;
1120 string property = null;
1121 string value = null;
1122
1123 foreach (var attrib in node.Attributes())
1124 {
1125 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
1126 {
1127 switch (attrib.Name.LocalName)
1128 {
1129 case "Company":
1130 company = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1131 break;
1132 case "Property":
1133 property = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1134 break;
1135 case "Value":
1136 value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1137 break;
1138 default:
1139 this.Core.UnexpectedAttribute(node, attrib);
1140 break;
1141 }
1142 }
1143 else
1144 {
1145 this.Core.ParseExtensionAttribute(node, attrib);
1146 }
1147 }
1148
1149 if (null == company)
1150 {
1151 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Company"));
1152 }
1153
1154 if (null == property)
1155 {
1156 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
1157 }
1158
1159 if (null == value)
1160 {
1161 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
1162 }
1163
1164 this.Core.ParseForExtensionElements(node);
1165
1166 if (!this.Core.EncounteredError)
1167 {
1168 this.AddPatchMetadata(sourceLineNumbers, company, property, value);
1169 }
1170 }
1171
1172 /// <summary>
1173 /// Parses a patch sequence element.
1174 /// </summary>
1175 /// <param name="node">The element to parse.</param>
1176 private void ParsePatchSequenceElement(XElement node)
1177 {
1178 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1179 string family = null;
1180 string target = null;
1181 string sequence = null;
1182 var attributes = 0;
1183
1184 foreach (var attrib in node.Attributes())
1185 {
1186 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
1187 {
1188 switch (attrib.Name.LocalName)
1189 {
1190 case "PatchFamily":
1191 family = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1192 break;
1193 case "ProductCode":
1194 if (null != target)
1195 {
1196 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "TargetImage"));
1197 }
1198 target = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1199 break;
1200 case "Target":
1201 if (null != target)
1202 {
1203 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetImage", "ProductCode"));
1204 }
1205 this.Core.Write(WarningMessages.DeprecatedPatchSequenceTargetAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1206 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1207 break;
1208 case "TargetImage":
1209 if (null != target)
1210 {
1211 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "ProductCode"));
1212 }
1213 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1214 this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.TargetImages, target);
1215 break;
1216 case "Sequence":
1217 sequence = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
1218 break;
1219 case "Supersede":
1220 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1221 {
1222 attributes |= 0x1;
1223 }
1224 break;
1225 default:
1226 this.Core.UnexpectedAttribute(node, attrib);
1227 break;
1228 }
1229 }
1230 else
1231 {
1232 this.Core.ParseExtensionAttribute(node, attrib);
1233 }
1234 }
1235
1236 if (null == family)
1237 {
1238 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PatchFamily"));
1239 }
1240
1241 this.Core.ParseForExtensionElements(node);
1242
1243 if (!this.Core.EncounteredError)
1244 {
1245 this.Core.AddSymbol(new PatchSequenceSymbol(sourceLineNumbers)
1246 {
1247 PatchFamily = family,
1248 Target = target,
1249 Sequence = sequence,
1250 Supersede = attributes,
1251 });
1252 }
1253 }
1254
1255 private void AddPatchMetadata(SourceLineNumber sourceLineNumbers, string company, string property, string value)
1256 {
1257 this.Core.AddSymbol(new PatchMetadataSymbol(sourceLineNumbers, new Identifier(AccessModifier.Section, company, property))
1258 {
1259 Company = company,
1260 Property = property,
1261 Value = value,
1262 });
1263 }
1264 }
1265}
diff --git a/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
index 8eaac27d..ddf446d4 100644
--- a/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
+++ b/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
@@ -64,7 +64,7 @@ namespace WixToolset.Core.Link
64 foreach (var section in this.Sections) 64 foreach (var section in this.Sections)
65 { 65 {
66 // Try to find the one and only entry section. 66 // Try to find the one and only entry section.
67 if (SectionType.Package == section.Type || SectionType.Module == section.Type || SectionType.PatchCreation == section.Type || SectionType.Patch == section.Type || SectionType.Bundle == section.Type) 67 if (SectionType.Package == section.Type || SectionType.Module == section.Type || SectionType.Patch == section.Type || SectionType.Bundle == section.Type)
68 { 68 {
69 if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType) 69 if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType)
70 { 70 {
diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets
index 59b7d85f..a9c54269 100644
--- a/src/wix/WixToolset.Sdk/tools/wix.targets
+++ b/src/wix/WixToolset.Sdk/tools/wix.targets
@@ -91,7 +91,6 @@
91 <TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt> 91 <TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt>
92 <TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt> 92 <TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt>
93 <TargetExt Condition=" '$(OutputType)' == 'Patch' ">.msp</TargetExt> 93 <TargetExt Condition=" '$(OutputType)' == 'Patch' ">.msp</TargetExt>
94 <TargetExt Condition=" '$(OutputType)' == 'PatchCreation' ">.pcp</TargetExt>
95 <TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt> 94 <TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt>
96 <TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt> 95 <TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt>
97 <TargetExt Condition=" '$(OutputType)' == 'IntermediatePostLink' ">.wixipl</TargetExt> 96 <TargetExt Condition=" '$(OutputType)' == 'IntermediatePostLink' ">.wixipl</TargetExt>
@@ -479,7 +478,7 @@
479 --> 478 -->
480 <Target 479 <Target
481 Name="AssignTargetPaths" 480 Name="AssignTargetPaths"
482 Condition=" '$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module' "> 481 Condition=" '$(OutputType)' == 'Package' or '$(OutputType)' == 'Module' ">
483 482
484 <WixAssignCulture Cultures="$(Cultures)" Files="@(EmbeddedResource)"> 483 <WixAssignCulture Cultures="$(Cultures)" Files="@(EmbeddedResource)">
485 <Output TaskParameter="CultureGroups" ItemName="CultureGroup" /> 484 <Output TaskParameter="CultureGroups" ItemName="CultureGroup" />
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
index e42c7810..e25a69b2 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
@@ -136,7 +136,7 @@ namespace WixToolsetTest.CoreIntegration
136 } 136 }
137 catch (WixException we) 137 catch (WixException we)
138 { 138 {
139 WixAssert.StringEqual("Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, PatchCreation, Module.", we.Message); 139 WixAssert.StringEqual("Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, Module.", we.Message);
140 return; 140 return;
141 } 141 }
142 142
@@ -166,7 +166,7 @@ namespace WixToolsetTest.CoreIntegration
166 } 166 }
167 catch (WixException we) 167 catch (WixException we)
168 { 168 {
169 WixAssert.StringEqual("Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, PatchCreation, Module.", we.Message); 169 WixAssert.StringEqual("Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, Module.", we.Message);
170 return; 170 return;
171 } 171 }
172 172
diff --git a/src/xsd/wix.xsd b/src/xsd/wix.xsd
index 05de58c6..b8e69f29 100644
--- a/src/xsd/wix.xsd
+++ b/src/xsd/wix.xsd
@@ -34,7 +34,6 @@
34 <xs:element ref="Package" /> 34 <xs:element ref="Package" />
35 <xs:element ref="Module" /> 35 <xs:element ref="Module" />
36 <xs:element ref="Patch" /> 36 <xs:element ref="Patch" />
37 <xs:element ref="PatchCreation" />
38 </xs:choice> 37 </xs:choice>
39 <xs:element ref="Fragment" minOccurs="0" maxOccurs="unbounded" /> 38 <xs:element ref="Fragment" minOccurs="0" maxOccurs="unbounded" />
40 </xs:sequence> 39 </xs:sequence>
@@ -3384,77 +3383,6 @@
3384 </xs:annotation> 3383 </xs:annotation>
3385 </xs:anyAttribute> 3384 </xs:anyAttribute>
3386 </xs:complexType> 3385 </xs:complexType>
3387</xs:element>
3388 <xs:element name="PatchCreation">
3389 <xs:annotation>
3390 <xs:documentation>
3391 The PatchCreation element is analogous to the main function in a C program. When linking, only one PatchCreation section
3392 can be given to the linker to produce a successful result. Using this element creates a pcp file.
3393 </xs:documentation>
3394 <xs:appinfo>
3395 <xse:remarks>
3396 <html:p>You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See [Code pages](../../../tools/codepage/) for more information.</html:p>
3397 </xse:remarks>
3398 </xs:appinfo>
3399 </xs:annotation>
3400 <xs:complexType>
3401 <xs:sequence>
3402 <xs:element ref="PatchInformation" />
3403 <xs:element ref="PatchMetadata" minOccurs="0" />
3404 <xs:element ref="Family" maxOccurs="unbounded" />
3405 <xs:choice minOccurs="0" maxOccurs="unbounded">
3406 <xs:element ref="PatchProperty" />
3407 <xs:element ref="PatchSequence" />
3408 <xs:element ref="ReplacePatch" />
3409 <xs:element ref="TargetProductCode" />
3410 </xs:choice>
3411 </xs:sequence>
3412 <xs:attribute name="Id" type="Guid" use="required">
3413 <xs:annotation>
3414 <xs:documentation>PatchCreation identifier; this is the primary key for identifying patches.</xs:documentation>
3415 </xs:annotation>
3416 </xs:attribute>
3417 <xs:attribute name="AllowMajorVersionMismatches" type="YesNoTypeUnion">
3418 <xs:annotation>
3419 <xs:documentation>Use this to set whether the major versions between the upgrade and target images match. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">AllowProductVersionMajorMismatches</html:a> for more information.</xs:documentation>
3420 </xs:annotation>
3421 </xs:attribute>
3422 <xs:attribute name="AllowProductCodeMismatches" type="YesNoTypeUnion">
3423 <xs:annotation>
3424 <xs:documentation>Use this to set whether the product code between the upgrade and target images match. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">AllowProductCodeMismatches</html:a> for more information.</xs:documentation>
3425 </xs:annotation>
3426 </xs:attribute>
3427 <xs:attribute name="CleanWorkingFolder" type="YesNoTypeUnion">
3428 <xs:annotation>
3429 <xs:documentation>Use this to set whether Patchwiz should clean the temp folder when finished. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">DontRemoveTempFolderWhenFinished</html:a> for more information. </xs:documentation>
3430 </xs:annotation>
3431 </xs:attribute>
3432 <xs:attribute name="Codepage" type="xs:string">
3433 <xs:annotation>
3434 <xs:documentation>The code page integer value or web name for the resulting PCP. See remarks for more information.</xs:documentation>
3435 </xs:annotation>
3436 </xs:attribute>
3437 <xs:attribute name="OutputPath" type="xs:string">
3438 <xs:annotation>
3439 <xs:documentation>The full path, including file name, of the patch package file that is to be generated. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">PatchOutputPath</html:a> for more information.</xs:documentation>
3440 </xs:annotation>
3441 </xs:attribute>
3442 <xs:attribute name="SourceList" type="xs:string">
3443 <xs:annotation>
3444 <xs:documentation>Used to locate the .msp file for the patch if the cached copy is unavailable. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">PatchSourceList</html:a> for more information.</xs:documentation>
3445 </xs:annotation>
3446 </xs:attribute>
3447 <xs:attribute name="SymbolFlags" type="xs:int">
3448 <xs:annotation>
3449 <xs:documentation>An 8-digit hex integer representing the combination of patch symbol usage flags to use when creating a binary file patch. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">ApiPatchingSymbolFlags</html:a> for more information.</xs:documentation>
3450 </xs:annotation>
3451 </xs:attribute>
3452 <xs:attribute name="WholeFilesOnly" type="YesNoTypeUnion">
3453 <xs:annotation>
3454 <xs:documentation>Use this to set whether changing files should be included in their entirety. See <html:a href="http://msdn.microsoft.com/library/aa370890.aspx">IncludeWholeFilesOnly</html:a> for more information.</xs:documentation>
3455 </xs:annotation>
3456 </xs:attribute>
3457 </xs:complexType>
3458 </xs:element> 3386 </xs:element>
3459 <xs:element name="PatchInformation"> 3387 <xs:element name="PatchInformation">
3460 <xs:annotation> 3388 <xs:annotation>
@@ -3537,123 +3465,6 @@
3537 </xs:attribute> 3465 </xs:attribute>
3538 </xs:complexType> 3466 </xs:complexType>
3539 </xs:element> 3467 </xs:element>
3540 <xs:element name="PatchMetadata">
3541 <xs:annotation>
3542 <xs:documentation>Properties about the patch to be placed in the PatchMetadata table.</xs:documentation>
3543 <xs:appinfo>
3544 <xse:msiRef table="MsiPatchMetadata" href="http://msdn.microsoft.com/library/aa370344.aspx" />
3545 </xs:appinfo>
3546 </xs:annotation>
3547 <xs:complexType>
3548 <xs:sequence>
3549 <xs:choice minOccurs="0" maxOccurs="unbounded">
3550 <xs:element ref="CustomProperty" minOccurs="0">
3551 <xs:annotation>
3552 <xs:documentation>A custom property that extends the standard set.</xs:documentation>
3553 </xs:annotation>
3554 </xs:element>
3555 <xs:element ref="OptimizeCustomActions" minOccurs="0" maxOccurs="1">
3556 <xs:annotation>
3557 <xs:documentation>Indicates whether custom actions can be skipped when applying the patch.</xs:documentation>
3558 </xs:annotation>
3559 </xs:element>
3560 </xs:choice>
3561 </xs:sequence>
3562 <xs:attribute name="AllowRemoval" type="YesNoTypeUnion" use="required">
3563 <xs:annotation>
3564 <xs:documentation>Whether this is an uninstallable patch.</xs:documentation>
3565 </xs:annotation>
3566 </xs:attribute>
3567 <xs:attribute name="Classification" type="xs:string" use="required">
3568 <xs:annotation>
3569 <xs:documentation>Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.</xs:documentation>
3570 </xs:annotation>
3571 </xs:attribute>
3572 <xs:attribute name="CreationTimeUTC" type="xs:string">
3573 <xs:annotation>
3574 <xs:documentation>Creation time of the .msp file in the form mm-dd-yy HH:MM (month-day-year hour:minute).</xs:documentation>
3575 </xs:annotation>
3576 </xs:attribute>
3577 <xs:attribute name="Description" type="xs:string" use="required">
3578 <xs:annotation>
3579 <xs:documentation>Description of the patch.</xs:documentation>
3580 </xs:annotation>
3581 </xs:attribute>
3582 <xs:attribute name="DisplayName" type="xs:string" use="required">
3583 <xs:annotation>
3584 <xs:documentation>A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.</xs:documentation>
3585 </xs:annotation>
3586 </xs:attribute>
3587 <xs:attribute name="ManufacturerName" type="xs:string" use="required">
3588 <xs:annotation>
3589 <xs:documentation>Name of the manufacturer.</xs:documentation>
3590 </xs:annotation>
3591 </xs:attribute>
3592 <xs:attribute name="MinorUpdateTargetRTM" type="xs:string">
3593 <xs:annotation>
3594 <xs:documentation>
3595 Indicates that the patch targets the RTM version of the product or the most recent major
3596 upgrade patch. Author this optional property in minor update patches that contain sequencing
3597 information to indicate that the patch removes all patches up to the RTM version of the
3598 product, or up to the most recent major upgrade patch. This property is available beginning
3599 with Windows Installer 3.1.
3600 </xs:documentation>
3601 </xs:annotation>
3602 </xs:attribute>
3603 <xs:attribute name="MoreInfoURL" type="xs:string" use="required">
3604 <xs:annotation>
3605 <xs:documentation>A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.</xs:documentation>
3606 </xs:annotation>
3607 </xs:attribute>
3608 <xs:attribute name="OptimizedInstallMode" type="YesNoTypeUnion">
3609 <xs:annotation>
3610 <xs:documentation>
3611 If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
3612 application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
3613 </xs:documentation>
3614 </xs:annotation>
3615 </xs:attribute>
3616 <xs:attribute name="TargetProductName" type="xs:string" use="required">
3617 <xs:annotation>
3618 <xs:documentation>Name of the application or target product suite.</xs:documentation>
3619 </xs:annotation>
3620 </xs:attribute>
3621 </xs:complexType>
3622 </xs:element>
3623 <xs:element name="CustomProperty">
3624 <xs:annotation>
3625 <xs:documentation>A custom property for the PatchMetadata table.</xs:documentation>
3626 </xs:annotation>
3627 <xs:complexType>
3628 <xs:attribute name="Company" type="xs:string" use="required">
3629 <xs:annotation>
3630 <xs:documentation>The name of the company.</xs:documentation>
3631 </xs:annotation>
3632 </xs:attribute>
3633 <xs:attribute name="Property" type="xs:string" use="required">
3634 <xs:annotation>
3635 <xs:documentation>The name of the metadata property.</xs:documentation>
3636 </xs:annotation>
3637 </xs:attribute>
3638 <xs:attribute name="Value" type="xs:string" use="required">
3639 <xs:annotation>
3640 <xs:documentation>Value of the metadata property.</xs:documentation>
3641 </xs:annotation>
3642 </xs:attribute>
3643 </xs:complexType>
3644 </xs:element>
3645 <xs:element name="ReplacePatch">
3646 <xs:annotation>
3647 <xs:documentation>A patch that is deprecated by this patch.</xs:documentation>
3648 </xs:annotation>
3649 <xs:complexType>
3650 <xs:attribute name="Id" type="Guid" use="required">
3651 <xs:annotation>
3652 <xs:documentation>Patch GUID to be unregistered if it exists on the machine targeted by this patch.</xs:documentation>
3653 </xs:annotation>
3654 </xs:attribute>
3655 </xs:complexType>
3656 </xs:element>
3657 <xs:element name="TargetProductCodes"> 3468 <xs:element name="TargetProductCodes">
3658 <xs:annotation> 3469 <xs:annotation>
3659 <xs:documentation> 3470 <xs:documentation>
@@ -3674,12 +3485,11 @@
3674 <xs:element name="TargetProductCode"> 3485 <xs:element name="TargetProductCode">
3675 <xs:annotation> 3486 <xs:annotation>
3676 <xs:documentation> 3487 <xs:documentation>
3677 A product code for a product that can accept the patch. 3488 A product code for a product that can accept the patch.
3678 </xs:documentation> 3489 </xs:documentation>
3679 <xs:appinfo> 3490 <xs:appinfo>
3680 <xse:remarks> 3491 <xse:remarks>
3681 <html:p>When using the PatchCreation element, if the Id attribute value is '*' or this element is not authored, the product codes of all products referenced by the TargetImages element are used.</html:p> 3492 The Id attribute value must not be '*'. Use the TargetProductCodes/@Replace attribute instead.
3682 <html:p>When using the Patch element, the Id attribute value must not be '*'. Use the TargetProductCodes/@Replace attribute instead.</html:p>
3683 </xse:remarks> 3493 </xse:remarks>
3684 </xs:appinfo> 3494 </xs:appinfo>
3685 </xs:annotation> 3495 </xs:annotation>
@@ -3687,8 +3497,8 @@
3687 <xs:attribute name="Id" type="xs:string" use="required"> 3497 <xs:attribute name="Id" type="xs:string" use="required">
3688 <xs:annotation> 3498 <xs:annotation>
3689 <xs:documentation> 3499 <xs:documentation>
3690 The product code for a product that can accept the patch. This can be '*'. See remarks for more information. 3500 The product code for a product that can accept the patch. This can be '*'. See remarks for more information.
3691 </xs:documentation> 3501 </xs:documentation>
3692 </xs:annotation> 3502 </xs:annotation>
3693 </xs:attribute> 3503 </xs:attribute>
3694 </xs:complexType> 3504 </xs:complexType>
@@ -3699,7 +3509,7 @@
3699 <xs:appinfo> 3509 <xs:appinfo>
3700 <xse:msiRef table="MsiPatchMetadata" href="http://msdn.microsoft.com/library/aa370344.aspx" /> 3510 <xse:msiRef table="MsiPatchMetadata" href="http://msdn.microsoft.com/library/aa370344.aspx" />
3701 <xse:remarks> 3511 <xse:remarks>
3702 <html:p>When authored under the Patch element, the PatchProperty defines entries in the MsiPatchMetadata table.</html:p> 3512 The PatchProperty defines entries in the MsiPatchMetadata table.
3703 </xse:remarks> 3513 </xse:remarks>
3704 </xs:appinfo> 3514 </xs:appinfo>
3705 </xs:annotation> 3515 </xs:annotation>
@@ -3721,305 +3531,6 @@
3721 </xs:attribute> 3531 </xs:attribute>
3722 </xs:complexType> 3532 </xs:complexType>
3723 </xs:element> 3533 </xs:element>
3724 <xs:element name="PatchSequence">
3725 <xs:annotation>
3726 <xs:documentation>Sequence information for this patch database. Sequence information is generated automatically in most cases, and rarely needs to be set explicitly.</xs:documentation>
3727 <xs:appinfo>
3728 <xse:msiRef table="MsiPatchSequence" href="http://msdn.microsoft.com/library/aa370350.aspx" />
3729 </xs:appinfo>
3730 </xs:annotation>
3731 <xs:complexType>
3732 <xs:attribute name="PatchFamily" type="xs:string" use="required">
3733 <xs:annotation>
3734 <xs:documentation>Identifier which indicates a sequence family to which this patch belongs.</xs:documentation>
3735 </xs:annotation>
3736 </xs:attribute>
3737 <xs:attribute name="ProductCode" type="Guid">
3738 <xs:annotation>
3739 <xs:documentation>
3740 Specifies the ProductCode of the product that this family applies to.
3741 This attribute cannot the specified if the TargetImage attribute is specified.
3742 </xs:documentation>
3743 </xs:annotation>
3744 </xs:attribute>
3745 <xs:attribute name="Sequence" type="xs:string">
3746 <xs:annotation>
3747 <xs:documentation>Used to populate the sequence column of the MsiPatchSequence table in the final MSP file. Specified in x.x.x.x format. See documentation for Sequence column of MsiPatchSequence table in MSI SDK.</xs:documentation>
3748 </xs:annotation>
3749 </xs:attribute>
3750 <xs:attribute name="Supersede" type="YesNoTypeUnion">
3751 <xs:annotation>
3752 <xs:documentation>
3753 Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
3754 The default value is 'no'.
3755 </xs:documentation>
3756 </xs:annotation>
3757 </xs:attribute>
3758 <xs:attribute name="Target" type="xs:string">
3759 <xs:annotation>
3760 <xs:appinfo>
3761 <xse:deprecated ref="TargetImage" />
3762 </xs:appinfo>
3763 </xs:annotation>
3764 </xs:attribute>
3765 <xs:attribute name="TargetImage" type="xs:string">
3766 <xs:annotation>
3767 <xs:documentation>
3768 Specifies the TargetImage that this family applies to.
3769 This attribute cannot the specified if the ProductCode attribute is specified.
3770 </xs:documentation>
3771 </xs:annotation>
3772 </xs:attribute>
3773 </xs:complexType>
3774 </xs:element>
3775 <xs:element name="Family">
3776 <xs:annotation>
3777 <xs:documentation>Group of one or more upgraded images of a product.</xs:documentation>
3778 </xs:annotation>
3779 <xs:complexType>
3780 <xs:sequence>
3781 <xs:element ref="UpgradeImage" maxOccurs="unbounded" />
3782 <xs:choice minOccurs="0" maxOccurs="unbounded">
3783 <xs:element ref="ExternalFile" />
3784 <xs:element ref="ProtectFile" />
3785 </xs:choice>
3786 </xs:sequence>
3787 <xs:attribute name="DiskId" type="DiskIdType">
3788 <xs:annotation>
3789 <xs:documentation>Entered into the DiskId field of the new Media table record.</xs:documentation>
3790 </xs:annotation>
3791 </xs:attribute>
3792 <xs:attribute name="DiskPrompt" type="xs:string">
3793 <xs:annotation>
3794 <xs:documentation>Value to display in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.</xs:documentation>
3795 </xs:annotation>
3796 </xs:attribute>
3797 <xs:attribute name="MediaSrcProp" type="xs:string">
3798 <xs:annotation>
3799 <xs:documentation>Entered into the Source field of the new Media table entry of the upgraded image.</xs:documentation>
3800 </xs:annotation>
3801 </xs:attribute>
3802 <xs:attribute name="Name" type="xs:string" use="required">
3803 <xs:annotation>
3804 <xs:documentation>Identifier for the family.</xs:documentation>
3805 </xs:annotation>
3806 </xs:attribute>
3807 <xs:attribute name="SequenceStart" type="xs:int">
3808 <xs:annotation>
3809 <xs:documentation>Sequence number for the starting file.</xs:documentation>
3810 </xs:annotation>
3811 </xs:attribute>
3812 <xs:attribute name="VolumeLabel" type="xs:string">
3813 <xs:annotation>
3814 <xs:documentation>Entered into the VolumeLabel field of the new Media table record.</xs:documentation>
3815 </xs:annotation>
3816 </xs:attribute>
3817 </xs:complexType>
3818 </xs:element>
3819 <xs:element name="UpgradeImage">
3820 <xs:annotation>
3821 <xs:documentation>Contains information about the upgraded images of the product.</xs:documentation>
3822 </xs:annotation>
3823 <xs:complexType>
3824 <xs:sequence>
3825 <xs:element ref="TargetImage" maxOccurs="unbounded" />
3826 <xs:choice minOccurs="0" maxOccurs="unbounded">
3827 <xs:element ref="SymbolPath" />
3828 <xs:element ref="UpgradeFile" />
3829 </xs:choice>
3830 </xs:sequence>
3831 <xs:attribute name="Id" type="xs:string" use="required">
3832 <xs:annotation>
3833 <xs:documentation>Identifier to connect target images with upgraded image.</xs:documentation>
3834 </xs:annotation>
3835 </xs:attribute>
3836 <xs:attribute name="SourceFile" type="xs:string">
3837 <xs:annotation>
3838 <xs:documentation>Full path to location of msi file for upgraded image.</xs:documentation>
3839 </xs:annotation>
3840 </xs:attribute>
3841 <xs:attribute name="SourcePatch" type="xs:string">
3842 <xs:annotation>
3843 <xs:documentation>Modified copy of the upgraded installation database that contains additional authoring specific to patching.</xs:documentation>
3844 </xs:annotation>
3845 </xs:attribute>
3846 </xs:complexType>
3847 </xs:element>
3848 <xs:element name="TargetImage">
3849 <xs:annotation>
3850 <xs:documentation>Contains information about the target images of the product.</xs:documentation>
3851 </xs:annotation>
3852 <xs:complexType>
3853 <xs:choice minOccurs="0" maxOccurs="unbounded">
3854 <xs:element ref="SymbolPath" />
3855 <xs:element ref="TargetFile" />
3856 </xs:choice>
3857 <xs:attribute name="Id" type="xs:string" use="required">
3858 <xs:annotation>
3859 <xs:documentation>Identifier for the target image.</xs:documentation>
3860 </xs:annotation>
3861 </xs:attribute>
3862 <xs:attribute name="SourceFile" type="xs:string">
3863 <xs:annotation>
3864 <xs:documentation>Full path to the location of the msi file for the target image.</xs:documentation>
3865 </xs:annotation>
3866 </xs:attribute>
3867 <xs:attribute name="Order" type="xs:int" use="required">
3868 <xs:annotation>
3869 <xs:documentation>Relative order of the target image.</xs:documentation>
3870 </xs:annotation>
3871 </xs:attribute>
3872 <xs:attribute name="Validation" type="xs:string">
3873 <xs:annotation>
3874 <xs:documentation>Product checking to avoid applying irrelevant transforms.</xs:documentation>
3875 </xs:annotation>
3876 </xs:attribute>
3877 <xs:attribute name="IgnoreMissingFiles" type="YesNoTypeUnion">
3878 <xs:annotation>
3879 <xs:documentation>Files missing from the target image are ignored by the installer.</xs:documentation>
3880 </xs:annotation>
3881 </xs:attribute>
3882 </xs:complexType>
3883 </xs:element>
3884 <xs:element name="TargetFile">
3885 <xs:annotation>
3886 <xs:documentation>Information about specific files in a target image.</xs:documentation>
3887 </xs:annotation>
3888 <xs:complexType>
3889 <xs:sequence>
3890 <xs:element ref="SymbolPath" minOccurs="0" />
3891 <xs:choice minOccurs="0" maxOccurs="unbounded">
3892 <xs:element ref="IgnoreRange" />
3893 <xs:element ref="ProtectRange" />
3894 </xs:choice>
3895 </xs:sequence>
3896 <xs:attribute name="Id" type="xs:string" use="required">
3897 <xs:annotation>
3898 <xs:documentation>Foreign key into the File table.</xs:documentation>
3899 </xs:annotation>
3900 </xs:attribute>
3901 </xs:complexType>
3902 </xs:element>
3903 <xs:element name="IgnoreRange">
3904 <xs:annotation>
3905 <xs:documentation>Specifies part of a file that is to be ignored during patching.</xs:documentation>
3906 </xs:annotation>
3907 <xs:complexType>
3908 <xs:attribute name="Offset" type="xs:int" use="required">
3909 <xs:annotation>
3910 <xs:documentation>Offset of the start of the range.</xs:documentation>
3911 </xs:annotation>
3912 </xs:attribute>
3913 <xs:attribute name="Length" type="xs:int" use="required">
3914 <xs:annotation>
3915 <xs:documentation>Length of the range.</xs:documentation>
3916 </xs:annotation>
3917 </xs:attribute>
3918 </xs:complexType>
3919 </xs:element>
3920 <xs:element name="ProtectRange">
3921 <xs:annotation>
3922 <xs:documentation>Specifies part of a file that cannot be overwritten during patching.</xs:documentation>
3923 </xs:annotation>
3924 <xs:complexType>
3925 <xs:attribute name="Offset" type="xs:int" use="required">
3926 <xs:annotation>
3927 <xs:documentation>Offset of the start of the range.</xs:documentation>
3928 </xs:annotation>
3929 </xs:attribute>
3930 <xs:attribute name="Length" type="xs:int" use="required">
3931 <xs:annotation>
3932 <xs:documentation>Length of the range.</xs:documentation>
3933 </xs:annotation>
3934 </xs:attribute>
3935 </xs:complexType>
3936 </xs:element>
3937 <xs:element name="ProtectFile">
3938 <xs:annotation>
3939 <xs:documentation>Specifies a file to be protected.</xs:documentation>
3940 </xs:annotation>
3941 <xs:complexType>
3942 <xs:choice maxOccurs="unbounded">
3943 <xs:element ref="ProtectRange" />
3944 </xs:choice>
3945 <xs:attribute name="File" type="xs:string" use="required">
3946 <xs:annotation>
3947 <xs:documentation>Foreign key into the File table.</xs:documentation>
3948 </xs:annotation>
3949 </xs:attribute>
3950 </xs:complexType>
3951 </xs:element>
3952 <xs:element name="ExternalFile">
3953 <xs:annotation>
3954 <xs:documentation>Contains information about specific files that are not part of a regular target image.</xs:documentation>
3955 </xs:annotation>
3956 <xs:complexType>
3957 <xs:sequence>
3958 <xs:element ref="ProtectRange" maxOccurs="unbounded" />
3959 <xs:element ref="SymbolPath" maxOccurs="unbounded" />
3960 <xs:choice minOccurs="0" maxOccurs="unbounded">
3961 <xs:element ref="IgnoreRange" />
3962 </xs:choice>
3963 </xs:sequence>
3964 <xs:attribute name="File" type="xs:string" use="required">
3965 <xs:annotation>
3966 <xs:documentation>Foreign key into the File table.</xs:documentation>
3967 </xs:annotation>
3968 </xs:attribute>
3969 <xs:attribute name="Source" type="xs:string">
3970 <xs:annotation>
3971 <xs:documentation>Full path of the external file.</xs:documentation>
3972 </xs:annotation>
3973 </xs:attribute>
3974 <xs:attribute name="Order" type="xs:int" use="required">
3975 <xs:annotation>
3976 <xs:documentation>Specifies the order of the external files to use when creating the patch.</xs:documentation>
3977 </xs:annotation>
3978 </xs:attribute>
3979 </xs:complexType>
3980 </xs:element>
3981 <xs:element name="UpgradeFile">
3982 <xs:annotation>
3983 <xs:documentation>Specifies files to either ignore or to specify optional data about a file.</xs:documentation>
3984 </xs:annotation>
3985 <xs:complexType>
3986 <xs:choice minOccurs="0" maxOccurs="unbounded">
3987 <xs:element ref="SymbolPath" />
3988 </xs:choice>
3989 <xs:attribute name="File" type="xs:string" use="required">
3990 <xs:annotation>
3991 <xs:documentation>Foreign key into the File table.</xs:documentation>
3992 </xs:annotation>
3993 </xs:attribute>
3994 <xs:attribute name="Ignore" type="YesNoTypeUnion" use="required">
3995 <xs:annotation>
3996 <xs:documentation>If yes, the file is ignored during patching, and the next two attributes are ignored.</xs:documentation>
3997 </xs:annotation>
3998 </xs:attribute>
3999 <xs:attribute name="AllowIgnoreOnError" type="YesNoTypeUnion">
4000 <xs:annotation>
4001 <xs:documentation>Specifies whether patching this file is vital.</xs:documentation>
4002 </xs:annotation>
4003 </xs:attribute>
4004 <xs:attribute name="WholeFile" type="YesNoTypeUnion">
4005 <xs:annotation>
4006 <xs:documentation>Whether the whole file should be installed, rather than creating a binary patch.</xs:documentation>
4007 </xs:annotation>
4008 </xs:attribute>
4009 </xs:complexType>
4010 </xs:element>
4011 <xs:element name="SymbolPath">
4012 <xs:annotation>
4013 <xs:documentation>A path to symbols.</xs:documentation>
4014 </xs:annotation>
4015 <xs:complexType>
4016 <xs:attribute name="Path" type="xs:string" use="required">
4017 <xs:annotation>
4018 <xs:documentation>The path.</xs:documentation>
4019 </xs:annotation>
4020 </xs:attribute>
4021 </xs:complexType>
4022 </xs:element>
4023 <xs:element name="SummaryInformation"> 3534 <xs:element name="SummaryInformation">
4024 <xs:annotation> 3535 <xs:annotation>
4025 <xs:documentation> 3536 <xs:documentation>
@@ -4063,9 +3574,9 @@
4063 <xs:element name="AssemblyName"> 3574 <xs:element name="AssemblyName">
4064 <xs:annotation> 3575 <xs:annotation>
4065 <xs:documentation> 3576 <xs:documentation>
4066 The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly. 3577 The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly.
4067 Consider using the Assembly attribute on File element to have the toolset populate these entries automatically. 3578 Consider using the Assembly attribute on File element to have the toolset populate these entries automatically.
4068 </xs:documentation> 3579 </xs:documentation>
4069 <xs:appinfo> 3580 <xs:appinfo>
4070 <xse:msiRef table="MsiAssemblyName" href="http://msdn.microsoft.com/library/aa370062.aspx" /> 3581 <xse:msiRef table="MsiAssemblyName" href="http://msdn.microsoft.com/library/aa370062.aspx" />
4071 </xs:appinfo> 3582 </xs:appinfo>