Skip to content

Commit 5b06ff3

Browse files
committed
Properly deprecate PatchCreation and remove mostly dead code
Resolves 9099
1 parent cc7761e commit 5b06ff3

35 files changed

+316
-2595
lines changed

src/api/wix/WixToolset.Data/ErrorMessages.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,6 @@ public static Message ExpectedPatchIdInWixMsp()
563563
return Message(null, Ids.ExpectedPatchIdInWixMsp, "The WixMsp is missing the patch ID.");
564564
}
565565

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-
571566
public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers)
572567
{
573568
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 @@ public static Message MissingDependencyVersion(string packageId)
14131408

14141409
public static Message MissingEntrySection()
14151410
{
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.");
14171412
}
14181413

14191414
public static Message MissingEntrySection(string sectionType)
@@ -2056,11 +2051,6 @@ public static Message UnexpectedTableInPatch(SourceLineNumber sourceLineNumbers,
20562051
return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName);
20572052
}
20582053

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-
20642054
public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace)
20652055
{
20662056
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 @@ public enum Ids
24352425
NoUniqueActionSequenceNumber2 = 180,
24362426
ActionScheduledRelativeToItself = 181,
24372427
MissingTableDefinition = 182,
2438-
ExpectedRowInPatchCreationPackage = 183,
24392428
UnexpectedTableInMergeModule = 184,
2440-
UnexpectedTableInPatchCreationPackage = 185,
24412429
MergeExcludedModule = 186,
24422430
MergeFeatureRequired = 187,
24432431
MergeLanguageFailed = 188,

src/api/wix/WixToolset.Data/OutputType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public enum OutputType
2525
Patch,
2626

2727
/// <summary>Patch Creation output type.</summary>
28+
[Obsolete]
2829
PatchCreation,
2930

3031
/// <summary>Package output type.</summary>

src/api/wix/WixToolset.Data/SectionType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public enum SectionType
2929
Product = Package,
3030

3131
/// <summary>Patch creation section type.</summary>
32+
[Obsolete]
3233
PatchCreation,
3334

3435
/// <summary>Patch section type.</summary>

src/api/wix/WixToolset.Data/Symbols/ExternalFilesSymbol.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace WixToolset.Data
44
{
5+
using System;
56
using WixToolset.Data.Symbols;
67

78
public static partial class SymbolDefinitions
89
{
10+
[Obsolete]
911
public static readonly IntermediateSymbolDefinition ExternalFiles = new IntermediateSymbolDefinition(
1012
SymbolDefinitionType.ExternalFiles,
1113
new[]
@@ -25,6 +27,9 @@ public static partial class SymbolDefinitions
2527

2628
namespace WixToolset.Data.Symbols
2729
{
30+
using System;
31+
32+
[Obsolete]
2833
public enum ExternalFilesSymbolFields
2934
{
3035
Family,
@@ -37,6 +42,7 @@ public enum ExternalFilesSymbolFields
3742
Order,
3843
}
3944

45+
[Obsolete]
4046
public class ExternalFilesSymbol : IntermediateSymbol
4147
{
4248
public ExternalFilesSymbol() : base(SymbolDefinitions.ExternalFiles, null, null)
@@ -97,4 +103,4 @@ public int Order
97103
set => this.Set((int)ExternalFilesSymbolFields.Order, value);
98104
}
99105
}
100-
}
106+
}

src/api/wix/WixToolset.Data/Symbols/FamilyFileRangesSymbol.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace WixToolset.Data
44
{
5+
using System;
56
using WixToolset.Data.Symbols;
67

78
public static partial class SymbolDefinitions
89
{
10+
[Obsolete]
911
public static readonly IntermediateSymbolDefinition FamilyFileRanges = new IntermediateSymbolDefinition(
1012
SymbolDefinitionType.FamilyFileRanges,
1113
new[]
@@ -21,6 +23,9 @@ public static partial class SymbolDefinitions
2123

2224
namespace WixToolset.Data.Symbols
2325
{
26+
using System;
27+
28+
[Obsolete]
2429
public enum FamilyFileRangesSymbolFields
2530
{
2631
Family,
@@ -29,6 +34,7 @@ public enum FamilyFileRangesSymbolFields
2934
RetainLengths,
3035
}
3136

37+
[Obsolete]
3238
public class FamilyFileRangesSymbol : IntermediateSymbol
3339
{
3440
public FamilyFileRangesSymbol() : base(SymbolDefinitions.FamilyFileRanges, null, null)
@@ -65,4 +71,4 @@ public string RetainLengths
6571
set => this.Set((int)FamilyFileRangesSymbolFields.RetainLengths, value);
6672
}
6773
}
68-
}
74+
}

src/api/wix/WixToolset.Data/Symbols/ImageFamiliesSymbol.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace WixToolset.Data
44
{
5+
using System;
56
using WixToolset.Data.Symbols;
67

78
public static partial class SymbolDefinitions
89
{
10+
[Obsolete]
911
public static readonly IntermediateSymbolDefinition ImageFamilies = new IntermediateSymbolDefinition(
1012
SymbolDefinitionType.ImageFamilies,
1113
new[]
@@ -23,6 +25,9 @@ public static partial class SymbolDefinitions
2325

2426
namespace WixToolset.Data.Symbols
2527
{
28+
using System;
29+
30+
[Obsolete]
2631
public enum ImageFamiliesSymbolFields
2732
{
2833
Family,
@@ -33,6 +38,7 @@ public enum ImageFamiliesSymbolFields
3338
VolumeLabel,
3439
}
3540

41+
[Obsolete]
3642
public class ImageFamiliesSymbol : IntermediateSymbol
3743
{
3844
public ImageFamiliesSymbol() : base(SymbolDefinitions.ImageFamilies, null, null)
@@ -81,4 +87,4 @@ public string VolumeLabel
8187
set => this.Set((int)ImageFamiliesSymbolFields.VolumeLabel, value);
8288
}
8389
}
84-
}
90+
}

src/api/wix/WixToolset.Data/Symbols/MsiPatchMetadataSymbol.cs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,42 @@ public static partial class SymbolDefinitions
2020

2121
namespace WixToolset.Data.Symbols
2222
{
23+
using System;
24+
2325
public enum MsiPatchMetadataSymbolFields
2426
{
2527
Company,
2628
Property,
2729
Value,
2830
}
2931

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+
3059
public class MsiPatchMetadataSymbol : IntermediateSymbol
3160
{
3261
public MsiPatchMetadataSymbol() : base(SymbolDefinitions.MsiPatchMetadata, null, null)
@@ -57,4 +86,4 @@ public string Value
5786
set => this.Set((int)MsiPatchMetadataSymbolFields.Value, value);
5887
}
5988
}
60-
}
89+
}

src/api/wix/WixToolset.Data/Symbols/PatchMetadataSymbol.cs

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace WixToolset.Data
44
{
5+
using System;
56
using WixToolset.Data.Symbols;
67

78
public static partial class SymbolDefinitions
89
{
10+
[Obsolete]
911
public static readonly IntermediateSymbolDefinition PatchMetadata = new IntermediateSymbolDefinition(
1012
SymbolDefinitionType.PatchMetadata,
1113
new[]
@@ -22,40 +24,15 @@ namespace WixToolset.Data.Symbols
2224
{
2325
using System;
2426

27+
[Obsolete]
2528
public enum PatchMetadataSymbolFields
2629
{
2730
Company,
2831
Property,
2932
Value,
3033
}
3134

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-
35+
[Obsolete]
5936
public class PatchMetadataSymbol : IntermediateSymbol
6037
{
6138
public PatchMetadataSymbol() : base(SymbolDefinitions.PatchMetadata, null, null)

src/api/wix/WixToolset.Data/Symbols/PatchPackageSymbol.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ public int MediaDiskIdRef
4949
set => this.Set((int)PatchPackageSymbolFields.MediaDiskIdRef, value);
5050
}
5151
}
52-
}
52+
}

src/api/wix/WixToolset.Data/Symbols/PatchSequenceSymbol.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace WixToolset.Data
44
{
5+
using System;
56
using WixToolset.Data.Symbols;
67

78
public static partial class SymbolDefinitions
89
{
10+
[Obsolete]
911
public static readonly IntermediateSymbolDefinition PatchSequence = new IntermediateSymbolDefinition(
1012
SymbolDefinitionType.PatchSequence,
1113
new[]
@@ -21,6 +23,9 @@ public static partial class SymbolDefinitions
2123

2224
namespace WixToolset.Data.Symbols
2325
{
26+
using System;
27+
28+
[Obsolete]
2429
public enum PatchSequenceSymbolFields
2530
{
2631
PatchFamily,
@@ -29,6 +34,7 @@ public enum PatchSequenceSymbolFields
2934
Supersede,
3035
}
3136

37+
[Obsolete]
3238
public class PatchSequenceSymbol : IntermediateSymbol
3339
{
3440
public PatchSequenceSymbol() : base(SymbolDefinitions.PatchSequence, null, null)
@@ -65,4 +71,4 @@ public int? Supersede
6571
set => this.Set((int)PatchSequenceSymbolFields.Supersede, value);
6672
}
6773
}
68-
}
74+
}

0 commit comments

Comments
 (0)