aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-02-05 14:41:10 -0800
committerRob Mensching <rob@firegiant.com>2020-02-05 14:43:36 -0800
commita482589448fb6e0f7abc1c725c49c65344c83509 (patch)
tree7d9730baad7c83ad54ef6abdc64147f52ffbed17
parenta91661efa6d4c678d8ddee458bbf4b8643f96377 (diff)
downloadwix-a482589448fb6e0f7abc1c725c49c65344c83509.tar.gz
wix-a482589448fb6e0f7abc1c725c49c65344c83509.tar.bz2
wix-a482589448fb6e0f7abc1c725c49c65344c83509.zip
Fix patch related tuples
-rw-r--r--src/WixToolset.Data/ErrorMessages.cs6
-rw-r--r--src/WixToolset.Data/Tuples/SummaryInformationTuple.cs33
-rw-r--r--src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs24
-rw-r--r--src/WixToolset.Data/Tuples/WixPatchIdTuple.cs8
-rw-r--r--src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs10
5 files changed, 64 insertions, 17 deletions
diff --git a/src/WixToolset.Data/ErrorMessages.cs b/src/WixToolset.Data/ErrorMessages.cs
index 3fa23a74..43398ad2 100644
--- a/src/WixToolset.Data/ErrorMessages.cs
+++ b/src/WixToolset.Data/ErrorMessages.cs
@@ -203,6 +203,11 @@ namespace WixToolset.Data
203 return Message(null, Ids.CorruptFileFormat, "Attempted to load corrupt file from path: {0}. The file with format {1} contained unexpected content. Ensure the correct path was provided and that the file has not been incorrectly modified.", path, format.ToLowerInvariant()); 203 return Message(null, Ids.CorruptFileFormat, "Attempted to load corrupt file from path: {0}. The file with format {1} contained unexpected content. Ensure the correct path was provided and that the file has not been incorrectly modified.", path, format.ToLowerInvariant());
204 } 204 }
205 205
206 public static Message CouldNotDetermineProductCodeFromTransformSummaryInfo()
207 {
208 return Message(null, Ids.CouldNotDetermineProductCodeFromTransformSummaryInfo, "Could not determine ProductCode from transform summary information.");
209 }
210
206 public static Message CreateCabAddFileFailed() 211 public static Message CreateCabAddFileFailed()
207 { 212 {
208 return Message(null, Ids.CreateCabAddFileFailed, "An error (E_FAIL) was returned while adding files to a CAB file. This most commonly happens when creating a CAB file 2 GB or larger. Either reduce the size of your installation package, raise Media/@CompressionLevel to a higher compression level, or split your installation package's files into more than one CAB file."); 213 return Message(null, Ids.CreateCabAddFileFailed, "An error (E_FAIL) was returned while adding files to a CAB file. This most commonly happens when creating a CAB file 2 GB or larger. Either reduce the size of your installation package, raise Media/@CompressionLevel to a higher compression level, or split your installation package's files into more than one CAB file.");
@@ -2640,6 +2645,7 @@ namespace WixToolset.Data
2640 NoSourceFiles = 391, 2645 NoSourceFiles = 391,
2641 WixiplSourceFileIsExclusive = 392, 2646 WixiplSourceFileIsExclusive = 392,
2642 UnableToConvertFieldToNumber = 393, 2647 UnableToConvertFieldToNumber = 393,
2648 CouldNotDetermineProductCodeFromTransformSummaryInfo = 394,
2643 } 2649 }
2644 } 2650 }
2645} 2651}
diff --git a/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs b/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs
index a67f1985..074c2bb1 100644
--- a/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs
+++ b/src/WixToolset.Data/Tuples/SummaryInformationTuple.cs
@@ -30,20 +30,51 @@ namespace WixToolset.Data.Tuples
30 Codepage = 1, 30 Codepage = 1,
31 Title, 31 Title,
32 Subject, 32 Subject,
33 PatchPackageName = 3, //used by patches
33 Author, 34 Author,
34 Keywords, 35 Keywords,
35 Comments, 36 Comments,
36 PlatformAndLanguage, 37 PlatformAndLanguage,
38 PatchProductCodes = 7, // used by patches
37 TransformPlatformAndLanguageOrStorageNames, 39 TransformPlatformAndLanguageOrStorageNames,
40 TransformNames = 8, // used by patches
38 PackageCode, 41 PackageCode,
39 Created = 12, 42 PatchCode = 9, // used by patches
43 TransformProductCodes = 9, // used by transforms
44 Reserved11 = 11, // reserved by patches
45 Created,
40 LastSaved, 46 LastSaved,
41 WindowsInstallerVersion, 47 WindowsInstallerVersion,
48 Reserved14 = 14, // reserved by patches
42 WordCount, 49 WordCount,
50 PatchInstallerRequirement = 15, // used by patches
51 Reserved16, // reserved by patches
52 TransformValidationFlags = 16, // used by transforms
43 CreatingApplication = 18, 53 CreatingApplication = 18,
44 Security 54 Security
45 } 55 }
46 56
57 /// <summary>
58 /// Summary information values for the PachInstallerRequirement property.
59 /// </summary>
60 public enum PatchInstallerRequirement
61 {
62 /// <summary>Any version of the installer will do</summary>
63 Version10 = 1,
64
65 /// <summary>At least 1.2</summary>
66 Version12 = 2,
67
68 /// <summary>At least 2.0</summary>
69 Version20 = 3,
70
71 /// <summary>At least 3.0</summary>
72 Version30 = 4,
73
74 /// <summary>At least 3.1</summary>
75 Version31 = 5,
76 }
77
47 public class SummaryInformationTuple : IntermediateTuple 78 public class SummaryInformationTuple : IntermediateTuple
48 { 79 {
49 public SummaryInformationTuple() : base(TupleDefinitions.SummaryInformation, null, null) 80 public SummaryInformationTuple() : base(TupleDefinitions.SummaryInformation, null, null)
diff --git a/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs b/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs
index f5b6dba0..7358e66e 100644
--- a/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs
+++ b/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs
@@ -12,6 +12,9 @@ namespace WixToolset.Data
12 { 12 {
13 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.DiskId), IntermediateFieldType.Number), 13 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.DiskId), IntermediateFieldType.Number),
14 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.ValidationFlags), IntermediateFieldType.Number), 14 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.ValidationFlags), IntermediateFieldType.Number),
15 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.BaselineFile), IntermediateFieldType.Path),
16 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.UpdateFile), IntermediateFieldType.Path),
17 new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.TransformFile), IntermediateFieldType.Path),
15 }, 18 },
16 typeof(WixPatchBaselineTuple)); 19 typeof(WixPatchBaselineTuple));
17 } 20 }
@@ -23,6 +26,9 @@ namespace WixToolset.Data.Tuples
23 { 26 {
24 DiskId, 27 DiskId,
25 ValidationFlags, 28 ValidationFlags,
29 BaselineFile,
30 UpdateFile,
31 TransformFile,
26 } 32 }
27 33
28 public class WixPatchBaselineTuple : IntermediateTuple 34 public class WixPatchBaselineTuple : IntermediateTuple
@@ -48,5 +54,23 @@ namespace WixToolset.Data.Tuples
48 get => (TransformFlags)this.Fields[(int)WixPatchBaselineTupleFields.ValidationFlags].AsNumber(); 54 get => (TransformFlags)this.Fields[(int)WixPatchBaselineTupleFields.ValidationFlags].AsNumber();
49 set => this.Set((int)WixPatchBaselineTupleFields.ValidationFlags, (int)value); 55 set => this.Set((int)WixPatchBaselineTupleFields.ValidationFlags, (int)value);
50 } 56 }
57
58 public IntermediateFieldPathValue BaselineFile
59 {
60 get => this.Fields[(int)WixPatchBaselineTupleFields.BaselineFile].AsPath();
61 set => this.Set((int)WixPatchBaselineTupleFields.BaselineFile, value);
62 }
63
64 public IntermediateFieldPathValue UpdateFile
65 {
66 get => this.Fields[(int)WixPatchBaselineTupleFields.UpdateFile].AsPath();
67 set => this.Set((int)WixPatchBaselineTupleFields.UpdateFile, value);
68 }
69
70 public IntermediateFieldPathValue TransformFile
71 {
72 get => this.Fields[(int)WixPatchBaselineTupleFields.TransformFile].AsPath();
73 set => this.Set((int)WixPatchBaselineTupleFields.TransformFile, value);
74 }
51 } 75 }
52} 76}
diff --git a/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs b/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs
index 303ccecd..35c99493 100644
--- a/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs
+++ b/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs
@@ -10,7 +10,6 @@ namespace WixToolset.Data
10 TupleDefinitionType.WixPatchId, 10 TupleDefinitionType.WixPatchId,
11 new[] 11 new[]
12 { 12 {
13 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ProductCode), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ClientPatchId), IntermediateFieldType.String), 13 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ClientPatchId), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Bool), 14 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Bool),
16 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), 15 new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number),
@@ -23,7 +22,6 @@ namespace WixToolset.Data.Tuples
23{ 22{
24 public enum WixPatchIdTupleFields 23 public enum WixPatchIdTupleFields
25 { 24 {
26 ProductCode,
27 ClientPatchId, 25 ClientPatchId,
28 OptimizePatchSizeForLargeFiles, 26 OptimizePatchSizeForLargeFiles,
29 ApiPatchingSymbolFlags, 27 ApiPatchingSymbolFlags,
@@ -41,12 +39,6 @@ namespace WixToolset.Data.Tuples
41 39
42 public IntermediateField this[WixPatchIdTupleFields index] => this.Fields[(int)index]; 40 public IntermediateField this[WixPatchIdTupleFields index] => this.Fields[(int)index];
43 41
44 public string ProductCode
45 {
46 get => (string)this.Fields[(int)WixPatchIdTupleFields.ProductCode];
47 set => this.Set((int)WixPatchIdTupleFields.ProductCode, value);
48 }
49
50 public string ClientPatchId 42 public string ClientPatchId
51 { 43 {
52 get => (string)this.Fields[(int)WixPatchIdTupleFields.ClientPatchId]; 44 get => (string)this.Fields[(int)WixPatchIdTupleFields.ClientPatchId];
diff --git a/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs b/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs
index 7c065fe8..b64fd891 100644
--- a/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs
+++ b/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs
@@ -1,5 +1,7 @@
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. 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 2
3// TODO: delete this
4
3namespace WixToolset.Data 5namespace WixToolset.Data
4{ 6{
5 using WixToolset.Data.Tuples; 7 using WixToolset.Data.Tuples;
@@ -10,7 +12,6 @@ namespace WixToolset.Data
10 TupleDefinitionType.WixPatchMetadata, 12 TupleDefinitionType.WixPatchMetadata,
11 new[] 13 new[]
12 { 14 {
13 new IntermediateFieldDefinition(nameof(WixPatchMetadataTupleFields.Property), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixPatchMetadataTupleFields.Value), IntermediateFieldType.String), 15 new IntermediateFieldDefinition(nameof(WixPatchMetadataTupleFields.Value), IntermediateFieldType.String),
15 }, 16 },
16 typeof(WixPatchMetadataTuple)); 17 typeof(WixPatchMetadataTuple));
@@ -21,7 +22,6 @@ namespace WixToolset.Data.Tuples
21{ 22{
22 public enum WixPatchMetadataTupleFields 23 public enum WixPatchMetadataTupleFields
23 { 24 {
24 Property,
25 Value, 25 Value,
26 } 26 }
27 27
@@ -37,12 +37,6 @@ namespace WixToolset.Data.Tuples
37 37
38 public IntermediateField this[WixPatchMetadataTupleFields index] => this.Fields[(int)index]; 38 public IntermediateField this[WixPatchMetadataTupleFields index] => this.Fields[(int)index];
39 39
40 public string Property
41 {
42 get => (string)this.Fields[(int)WixPatchMetadataTupleFields.Property];
43 set => this.Set((int)WixPatchMetadataTupleFields.Property, value);
44 }
45
46 public string Value 40 public string Value
47 { 41 {
48 get => (string)this.Fields[(int)WixPatchMetadataTupleFields.Value]; 42 get => (string)this.Fields[(int)WixPatchMetadataTupleFields.Value];