@joebigelow / wix-1 / commits / 0025fa31

Merge WixFileTuple in to FileTuple and remove File from FileAssemblyType

Rob Mensching committed May 23, 2019 at 15:24 UTC 0025fa31f46c98d37d6d204a1fb7f8ea9a12b620
9 files changed +168 -456
src/WixToolset.Data/Tuples/FileTuple.cs
+137 -36
@@ -16,15 +16,26 @@ namespace WixToolset.Data
16 new IntermediateFieldDefinition(nameof(FileTupleFields.FileSize), IntermediateFieldType.Number),
17 new IntermediateFieldDefinition(nameof(FileTupleFields.Version), IntermediateFieldType.String),
18 new IntermediateFieldDefinition(nameof(FileTupleFields.Language), IntermediateFieldType.String),
19 - new IntermediateFieldDefinition(nameof(FileTupleFields.ReadOnly), IntermediateFieldType.Bool),
20 - new IntermediateFieldDefinition(nameof(FileTupleFields.Hidden), IntermediateFieldType.Bool),
21 - new IntermediateFieldDefinition(nameof(FileTupleFields.System), IntermediateFieldType.Bool),
22 - new IntermediateFieldDefinition(nameof(FileTupleFields.Vital), IntermediateFieldType.Bool),
23 - new IntermediateFieldDefinition(nameof(FileTupleFields.Checksum), IntermediateFieldType.Bool),
24 - new IntermediateFieldDefinition(nameof(FileTupleFields.Compressed), IntermediateFieldType.Bool),
19 + new IntermediateFieldDefinition(nameof(FileTupleFields.Attributes), IntermediateFieldType.Number),
20 + new IntermediateFieldDefinition(nameof(FileTupleFields.DirectoryRef), IntermediateFieldType.String),
21 + new IntermediateFieldDefinition(nameof(FileTupleFields.DiskId), IntermediateFieldType.Number),
22 + new IntermediateFieldDefinition(nameof(FileTupleFields.Source), IntermediateFieldType.Path),
23 +
24 new IntermediateFieldDefinition(nameof(FileTupleFields.FontTitle), IntermediateFieldType.String),
25 new IntermediateFieldDefinition(nameof(FileTupleFields.SelfRegCost), IntermediateFieldType.Number),
26 new IntermediateFieldDefinition(nameof(FileTupleFields.BindPath), IntermediateFieldType.String),
27 +
28 + new IntermediateFieldDefinition(nameof(FileTupleFields.Sequence), IntermediateFieldType.Number),
29 +
30 + new IntermediateFieldDefinition(nameof(FileTupleFields.PatchGroup), IntermediateFieldType.Number),
31 + new IntermediateFieldDefinition(nameof(FileTupleFields.PatchAttributes), IntermediateFieldType.Number),
32 + new IntermediateFieldDefinition(nameof(FileTupleFields.DeltaPatchHeaderSource), IntermediateFieldType.String),
33 +
34 + new IntermediateFieldDefinition(nameof(FileTupleFields.RetainLengths), IntermediateFieldType.String),
35 + new IntermediateFieldDefinition(nameof(FileTupleFields.IgnoreOffsets), IntermediateFieldType.String),
36 + new IntermediateFieldDefinition(nameof(FileTupleFields.IgnoreLengths), IntermediateFieldType.String),
37 + new IntermediateFieldDefinition(nameof(FileTupleFields.RetainOffsets), IntermediateFieldType.String),
38 + new IntermediateFieldDefinition(nameof(FileTupleFields.SymbolPaths), IntermediateFieldType.String),
39 },
40 typeof(FileTuple));
41 }
@@ -32,6 +43,8 @@ namespace WixToolset.Data
43
44 namespace WixToolset.Data.Tuples
45 {
46 + using System;
47 +
48 public enum FileTupleFields
49 {
50 ComponentRef,
@@ -40,15 +53,61 @@ namespace WixToolset.Data.Tuples
53 FileSize,
54 Version,
55 Language,
43 - ReadOnly,
44 - Hidden,
45 - System,
46 - Vital,
47 - Checksum,
48 - Compressed,
56 + Attributes,
57 + DirectoryRef,
58 + DiskId,
59 + Source,
60 +
61 FontTitle,
62 SelfRegCost,
63 BindPath,
64 +
65 + Sequence,
66 +
67 + PatchGroup,
68 + PatchAttributes,
69 + DeltaPatchHeaderSource,
70 +
71 + RetainLengths,
72 + IgnoreOffsets,
73 + IgnoreLengths,
74 + RetainOffsets,
75 + SymbolPaths,
76 + }
77 +
78 + [Flags]
79 + public enum FileTupleAttributes : int
80 + {
81 + None,
82 + ReadOnly = 0x1,
83 + Hidden = 0x2,
84 + System = 0x4,
85 + Vital = 0x8,
86 + Compressed = 0x10,
87 + Uncompressed = 0x20,
88 + Checksum = 0x40,
89 + GeneratedShortFileName = 0x80,
90 + }
91 +
92 + /// <summary>
93 + /// PatchAttribute values
94 + /// </summary>
95 + [Flags]
96 + public enum PatchAttributeType
97 + {
98 + None = 0,
99 +
100 + /// <summary>Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.</summary>
101 + Ignore = 1,
102 +
103 + /// <summary>Set if the entire file should be installed rather than creating a binary patch.</summary>
104 + IncludeWholeFile = 2,
105 +
106 + /// <summary>Set to indicate that the patch is non-vital.</summary>
107 + AllowIgnoreOnError = 4,
108 +
109 + /// <summary>Allowed bits.</summary>
110 + Defined = Ignore | IncludeWholeFile | AllowIgnoreOnError
111 }
112
113 public class FileTuple : IntermediateTuple
@@ -99,40 +158,28 @@ namespace WixToolset.Data.Tuples
158 set => this.Set((int)FileTupleFields.Language, value);
159 }
160
102 - public bool ReadOnly
161 + public FileTupleAttributes Attributes
162 {
104 - get => (bool)this.Fields[(int)FileTupleFields.ReadOnly];
105 - set => this.Set((int)FileTupleFields.ReadOnly, value);
163 + get => (FileTupleAttributes)this.Fields[(int)FileTupleFields.Attributes].AsNumber();
164 + set => this.Set((int)FileTupleFields.Attributes, (int)value);
165 }
166
108 - public bool Hidden
167 + public string DirectoryRef
168 {
110 - get => (bool)this.Fields[(int)FileTupleFields.Hidden];
111 - set => this.Set((int)FileTupleFields.Hidden, value);
169 + get => (string)this.Fields[(int)FileTupleFields.DirectoryRef];
170 + set => this.Set((int)FileTupleFields.DirectoryRef, value);
171 }
172
114 - public bool System
173 + public int? DiskId
174 {
116 - get => (bool)this.Fields[(int)FileTupleFields.System];
117 - set => this.Set((int)FileTupleFields.System, value);
175 + get => (int?)this.Fields[(int)FileTupleFields.DiskId];
176 + set => this.Set((int)FileTupleFields.DiskId, value);
177 }
178
120 - public bool Vital
179 + public IntermediateFieldPathValue Source
180 {
122 - get => (bool)this.Fields[(int)FileTupleFields.Vital];
123 - set => this.Set((int)FileTupleFields.Vital, value);
124 - }
125 -
126 - public bool Checksum
127 - {
128 - get => (bool)this.Fields[(int)FileTupleFields.Checksum];
129 - set => this.Set((int)FileTupleFields.Checksum, value);
130 - }
131 -
132 - public bool? Compressed
133 - {
134 - get => (bool?)this.Fields[(int)FileTupleFields.Compressed];
135 - set => this.Set((int)FileTupleFields.Compressed, value);
181 + get => this.Fields[(int)FileTupleFields.Source].AsPath();
182 + set => this.Set((int)FileTupleFields.Source, value);
183 }
184
185 public string FontTitle
@@ -152,5 +199,59 @@ namespace WixToolset.Data.Tuples
199 get => (string)this.Fields[(int)FileTupleFields.BindPath];
200 set => this.Set((int)FileTupleFields.BindPath, value);
201 }
202 +
203 + public int Sequence
204 + {
205 + get => (int)this.Fields[(int)FileTupleFields.Sequence];
206 + set => this.Set((int)FileTupleFields.Sequence, value);
207 + }
208 +
209 + public int? PatchGroup
210 + {
211 + get => (int?)this.Fields[(int)FileTupleFields.PatchGroup];
212 + set => this.Set((int)FileTupleFields.PatchGroup, value);
213 + }
214 +
215 + public PatchAttributeType? PatchAttributes
216 + {
217 + get => (PatchAttributeType?)this.Fields[(int)FileTupleFields.PatchAttributes].AsNullableNumber();
218 + set => this.Set((int)FileTupleFields.PatchAttributes, (int?)value);
219 + }
220 +
221 + public string DeltaPatchHeaderSource
222 + {
223 + get => (string)this.Fields[(int)FileTupleFields.DeltaPatchHeaderSource];
224 + set => this.Set((int)FileTupleFields.DeltaPatchHeaderSource, value);
225 + }
226 +
227 + public string RetainLengths
228 + {
229 + get => (string)this.Fields[(int)FileTupleFields.RetainLengths];
230 + set => this.Set((int)FileTupleFields.RetainLengths, value);
231 + }
232 +
233 + public string IgnoreOffsets
234 + {
235 + get => (string)this.Fields[(int)FileTupleFields.IgnoreOffsets];
236 + set => this.Set((int)FileTupleFields.IgnoreOffsets, value);
237 + }
238 +
239 + public string IgnoreLengths
240 + {
241 + get => (string)this.Fields[(int)FileTupleFields.IgnoreLengths];
242 + set => this.Set((int)FileTupleFields.IgnoreLengths, value);
243 + }
244 +
245 + public string RetainOffsets
246 + {
247 + get => (string)this.Fields[(int)FileTupleFields.RetainOffsets];
248 + set => this.Set((int)FileTupleFields.RetainOffsets, value);
249 + }
250 +
251 + public string SymbolPaths
252 + {
253 + get => (string)this.Fields[(int)FileTupleFields.SymbolPaths];
254 + set => this.Set((int)FileTupleFields.SymbolPaths, value);
255 + }
256 }
257 }
src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs
+25 -2
@@ -15,6 +15,7 @@ namespace WixToolset.Data
15 new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.ManifestFileRef), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.ApplicationFileRef), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.Attributes), IntermediateFieldType.Number),
18 + //new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.ProcessorArchitecture), IntermediateFieldType.String),
19 },
20 typeof(MsiAssemblyTuple));
21 }
@@ -29,6 +30,22 @@ namespace WixToolset.Data.Tuples
30 ManifestFileRef,
31 ApplicationFileRef,
32 Attributes,
33 + //ProcessorArchitecture,
34 + }
35 +
36 + /// <summary>
37 + /// Every file row has an assembly type.
38 + /// </summary>
39 + public enum AssemblyType
40 + {
41 + /// <summary>File is not an assembly.</summary>
42 + NotAnAssembly,
43 +
44 + /// <summary>File is a Common Language Runtime Assembly.</summary>
45 + DotNetAssembly,
46 +
47 + /// <summary>File is Win32 SxS assembly.</summary>
48 + Win32Assembly,
49 }
50
51 public class MsiAssemblyTuple : IntermediateTuple
@@ -67,10 +84,16 @@ namespace WixToolset.Data.Tuples
84 set => this.Set((int)MsiAssemblyTupleFields.ApplicationFileRef, value);
85 }
86
70 - public FileAssemblyType Type
87 + public AssemblyType Type
88 {
72 - get => (FileAssemblyType)this.Fields[(int)MsiAssemblyTupleFields.Attributes].AsNumber();
89 + get => (AssemblyType)this.Fields[(int)MsiAssemblyTupleFields.Attributes].AsNumber();
90 set => this.Set((int)MsiAssemblyTupleFields.Attributes, (int)value);
91 }
92 +
93 + //public string ProcessorArchitecture
94 + //{
95 + // get => (string)this.Fields[(int)MsiAssemblyTupleFields.ProcessorArchitecture];
96 + // set => this.Set((int)MsiAssemblyTupleFields.ProcessorArchitecture, value);
97 + //}
98 }
99 }
\ No newline at end of file
src/WixToolset.Data/Tuples/TupleDefinitions.cs
-6
@@ -663,9 +663,6 @@ namespace WixToolset.Data
663 case TupleDefinitionType.WixCustomTable:
664 return TupleDefinitions.WixCustomTable;
665
666 - case TupleDefinitionType.WixDeltaPatchFile:
667 - return TupleDefinitions.WixDeltaPatchFile;
668 -
666 case TupleDefinitionType.WixDeltaPatchSymbolPaths:
667 return TupleDefinitions.WixDeltaPatchSymbolPaths;
668
@@ -678,9 +675,6 @@ namespace WixToolset.Data
675 case TupleDefinitionType.WixFeatureModules:
676 return TupleDefinitions.WixFeatureModules;
677
681 - case TupleDefinitionType.WixFile:
682 - return TupleDefinitions.WixFile;
683 -
678 case TupleDefinitionType.WixFileSearch:
679 return TupleDefinitions.WixFileSearch;
680
src/WixToolset.Data/Tuples/WixActionTuple.cs
+1 -3
@@ -24,8 +24,6 @@ namespace WixToolset.Data
24
25 namespace WixToolset.Data.Tuples
26 {
27 - using System;
28 -
27 public enum WixActionTupleFields
28 {
29 SequenceTable,
@@ -100,4 +98,4 @@ namespace WixToolset.Data.Tuples
98 set => this.Set((int)WixActionTupleFields.Overridable, value);
99 }
100 }
103 -}
\ No newline at end of file
101 +}
src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs deleted
-76
@@ -1,76 +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 -
3 -namespace WixToolset.Data
4 -{
5 - using WixToolset.Data.Tuples;
6 -
7 - public static partial class TupleDefinitions
8 - {
9 - public static readonly IntermediateTupleDefinition WixDeltaPatchFile = new IntermediateTupleDefinition(
10 - TupleDefinitionType.WixDeltaPatchFile,
11 - new[]
12 - {
13 - new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainLengths), IntermediateFieldType.String),
14 - new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreOffsets), IntermediateFieldType.String),
15 - new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreLengths), IntermediateFieldType.String),
16 - new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainOffsets), IntermediateFieldType.String),
17 - new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.SymbolPaths), IntermediateFieldType.String),
18 - },
19 - typeof(WixDeltaPatchFileTuple));
20 - }
21 -}
22 -
23 -namespace WixToolset.Data.Tuples
24 -{
25 - public enum WixDeltaPatchFileTupleFields
26 - {
27 - RetainLengths,
28 - IgnoreOffsets,
29 - IgnoreLengths,
30 - RetainOffsets,
31 - SymbolPaths,
32 - }
33 -
34 - public class WixDeltaPatchFileTuple : IntermediateTuple
35 - {
36 - public WixDeltaPatchFileTuple() : base(TupleDefinitions.WixDeltaPatchFile, null, null)
37 - {
38 - }
39 -
40 - public WixDeltaPatchFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchFile, sourceLineNumber, id)
41 - {
42 - }
43 -
44 - public IntermediateField this[WixDeltaPatchFileTupleFields index] => this.Fields[(int)index];
45 -
46 - public string RetainLengths
47 - {
48 - get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainLengths];
49 - set => this.Set((int)WixDeltaPatchFileTupleFields.RetainLengths, value);
50 - }
51 -
52 - public string IgnoreOffsets
53 - {
54 - get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.IgnoreOffsets];
55 - set => this.Set((int)WixDeltaPatchFileTupleFields.IgnoreOffsets, value);
56 - }
57 -
58 - public string IgnoreLengths
59 - {
60 - get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.IgnoreLengths];
61 - set => this.Set((int)WixDeltaPatchFileTupleFields.IgnoreLengths, value);
62 - }
63 -
64 - public string RetainOffsets
65 - {
66 - get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainOffsets];
67 - set => this.Set((int)WixDeltaPatchFileTupleFields.RetainOffsets, value);
68 - }
69 -
70 - public string SymbolPaths
71 - {
72 - get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.SymbolPaths];
73 - set => this.Set((int)WixDeltaPatchFileTupleFields.SymbolPaths, value);
74 - }
75 - }
76 -}
\ No newline at end of file
src/WixToolset.Data/Tuples/WixFileTuple.cs deleted
-162
@@ -1,162 +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 -
3 -namespace WixToolset.Data
4 -{
5 - using WixToolset.Data.Tuples;
6 -
7 - public static partial class TupleDefinitions
8 - {
9 - public static readonly IntermediateTupleDefinition WixFile = new IntermediateTupleDefinition(
10 - TupleDefinitionType.WixFile,
11 - new[]
12 - {
13 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyType), IntermediateFieldType.Number),
14 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyManifestFileRef), IntermediateFieldType.String),
15 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyApplicationFileRef), IntermediateFieldType.String),
16 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.DirectoryRef), IntermediateFieldType.String),
17 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.DiskId), IntermediateFieldType.Number),
18 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.Source), IntermediateFieldType.Path),
19 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.ProcessorArchitecture), IntermediateFieldType.String),
20 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.PatchGroup), IntermediateFieldType.Number),
21 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.Attributes), IntermediateFieldType.Number),
22 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.PatchAttributes), IntermediateFieldType.Number),
23 - new IntermediateFieldDefinition(nameof(WixFileTupleFields.DeltaPatchHeaderSource), IntermediateFieldType.String),
24 - },
25 - typeof(WixFileTuple));
26 - }
27 -}
28 -
29 -namespace WixToolset.Data.Tuples
30 -{
31 - using System;
32 -
33 - public enum WixFileTupleFields
34 - {
35 - AssemblyType,
36 - AssemblyManifestFileRef,
37 - AssemblyApplicationFileRef,
38 - DirectoryRef,
39 - DiskId,
40 - Source,
41 - ProcessorArchitecture,
42 - PatchGroup,
43 - Attributes,
44 - PatchAttributes,
45 - DeltaPatchHeaderSource,
46 - }
47 -
48 - /// <summary>
49 - /// Every file row has an assembly type.
50 - /// </summary>
51 - public enum FileAssemblyType
52 - {
53 - /// <summary>File is not an assembly.</summary>
54 - NotAnAssembly,
55 -
56 - /// <summary>File is a Common Language Runtime Assembly.</summary>
57 - DotNetAssembly,
58 -
59 - /// <summary>File is Win32 SxS assembly.</summary>
60 - Win32Assembly,
61 - }
62 -
63 - /// <summary>
64 - /// PatchAttribute values
65 - /// </summary>
66 - [Flags]
67 - public enum PatchAttributeType
68 - {
69 - None = 0,
70 -
71 - /// <summary>Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.</summary>
72 - Ignore = 1,
73 -
74 - /// <summary>Set if the entire file should be installed rather than creating a binary patch.</summary>
75 - IncludeWholeFile = 2,
76 -
77 - /// <summary>Set to indicate that the patch is non-vital.</summary>
78 - AllowIgnoreOnError = 4,
79 -
80 - /// <summary>Allowed bits.</summary>
81 - Defined = Ignore | IncludeWholeFile | AllowIgnoreOnError
82 - }
83 -
84 - public class WixFileTuple : IntermediateTuple
85 - {
86 - public WixFileTuple() : base(TupleDefinitions.WixFile, null, null)
87 - {
88 - }
89 -
90 - public WixFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFile, sourceLineNumber, id)
91 - {
92 - }
93 -
94 - public IntermediateField this[WixFileTupleFields index] => this.Fields[(int)index];
95 -
96 - public FileAssemblyType AssemblyType
97 - {
98 - get => (FileAssemblyType)(int)this.Fields[(int)WixFileTupleFields.AssemblyType];
99 - set => this.Set((int)WixFileTupleFields.AssemblyType, (int)value);
100 - }
101 -
102 - public string AssemblyManifestFileRef
103 - {
104 - get => (string)this.Fields[(int)WixFileTupleFields.AssemblyManifestFileRef];
105 - set => this.Set((int)WixFileTupleFields.AssemblyManifestFileRef, value);
106 - }
107 -
108 - public string AssemblyApplicationFileRef
109 - {
110 - get => (string)this.Fields[(int)WixFileTupleFields.AssemblyApplicationFileRef];
111 - set => this.Set((int)WixFileTupleFields.AssemblyApplicationFileRef, value);
112 - }
113 -
114 - public string DirectoryRef
115 - {
116 - get => (string)this.Fields[(int)WixFileTupleFields.DirectoryRef];
117 - set => this.Set((int)WixFileTupleFields.DirectoryRef, value);
118 - }
119 -
120 - public int DiskId
121 - {
122 - get => (int)this.Fields[(int)WixFileTupleFields.DiskId];
123 - set => this.Set((int)WixFileTupleFields.DiskId, value);
124 - }
125 -
126 - public IntermediateFieldPathValue Source
127 - {
128 - get => this.Fields[(int)WixFileTupleFields.Source].AsPath();
129 - set => this.Set((int)WixFileTupleFields.Source, value);
130 - }
131 -
132 - public string ProcessorArchitecture
133 - {
134 - get => (string)this.Fields[(int)WixFileTupleFields.ProcessorArchitecture];
135 - set => this.Set((int)WixFileTupleFields.ProcessorArchitecture, value);
136 - }
137 -
138 - public int PatchGroup
139 - {
140 - get => (int)this.Fields[(int)WixFileTupleFields.PatchGroup];
141 - set => this.Set((int)WixFileTupleFields.PatchGroup, value);
142 - }
143 -
144 - public int Attributes
145 - {
146 - get => (int)this.Fields[(int)WixFileTupleFields.Attributes];
147 - set => this.Set((int)WixFileTupleFields.Attributes, value);
148 - }
149 -
150 - public PatchAttributeType? PatchAttributes
151 - {
152 - get => (PatchAttributeType?)this.Fields[(int)WixFileTupleFields.PatchAttributes].AsNullableNumber();
153 - set => this.Set((int)WixFileTupleFields.PatchAttributes, (int?)value);
154 - }
155 -
156 - public string DeltaPatchHeaderSource
157 - {
158 - get => (string)this.Fields[(int)WixFileTupleFields.DeltaPatchHeaderSource];
159 - set => this.Set((int)WixFileTupleFields.DeltaPatchHeaderSource, value);
160 - }
161 - }
162 -}
\ No newline at end of file
src/WixToolset.Data/Tuples/WixMergeTuple.cs
+5 -5
@@ -14,7 +14,7 @@ namespace WixToolset.Data
14 new IntermediateFieldDefinition(nameof(WixMergeTupleFields.DirectoryRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixMergeTupleFields.SourceFile), IntermediateFieldType.Path),
16 new IntermediateFieldDefinition(nameof(WixMergeTupleFields.DiskId), IntermediateFieldType.Number),
17 - new IntermediateFieldDefinition(nameof(WixMergeTupleFields.FileCompression), IntermediateFieldType.Bool),
17 + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.FileAttributes), IntermediateFieldType.Number),
18 new IntermediateFieldDefinition(nameof(WixMergeTupleFields.ConfigurationData), IntermediateFieldType.String),
19 new IntermediateFieldDefinition(nameof(WixMergeTupleFields.FeatureRef), IntermediateFieldType.String),
20 },
@@ -30,7 +30,7 @@ namespace WixToolset.Data.Tuples
30 DirectoryRef,
31 SourceFile,
32 DiskId,
33 - FileCompression,
33 + FileAttributes,
34 ConfigurationData,
35 FeatureRef,
36 }
@@ -71,10 +71,10 @@ namespace WixToolset.Data.Tuples
71 set => this.Set((int)WixMergeTupleFields.DiskId, value);
72 }
73
74 - public bool? FileCompression
74 + public FileTupleAttributes FileAttributes
75 {
76 - get => (bool?)this.Fields[(int)WixMergeTupleFields.FileCompression];
77 - set => this.Set((int)WixMergeTupleFields.FileCompression, value);
76 + get => (FileTupleAttributes)this.Fields[(int)WixMergeTupleFields.FileAttributes].AsNumber();
77 + set => this.Set((int)WixMergeTupleFields.FileAttributes, (int)value);
78 }
79
80 public string ConfigurationData
src/WixToolset.Data/WindowsInstaller/Rows/WixFileRow.cs deleted
-163
@@ -1,163 +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 -
3 -namespace WixToolset.Data.WindowsInstaller.Rows
4 -{
5 - using WixToolset.Data.Tuples;
6 -
7 - /// <summary>
8 - /// Specialization of a row for the WixFile table.
9 - /// </summary>
10 - public sealed class WixFileRow : Row
11 - {
12 - /// <summary>
13 - /// Creates a WixFile row that does not belong to a table.
14 - /// </summary>
15 - /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16 - /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17 - public WixFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18 - base(sourceLineNumbers, tableDef)
19 - {
20 - }
21 -
22 - /// <summary>
23 - /// Creates a WixFile row that belongs to a table.
24 - /// </summary>
25 - /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26 - /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27 - public WixFileRow(SourceLineNumber sourceLineNumbers, Table table) :
28 - base(sourceLineNumbers, table)
29 - {
30 - }
31 -
32 - /// <summary>
33 - /// Gets or sets the primary key of the file row.
34 - /// </summary>
35 - /// <value>Primary key of the file row.</value>
36 - public string File
37 - {
38 - get { return (string)this.Fields[0].Data; }
39 - set { this.Fields[0].Data = value; }
40 - }
41 -
42 - /// <summary>
43 - /// Gets or sets the assembly type of the file row.
44 - /// </summary>
45 - /// <value>Assembly type of the file row.</value>
46 - public FileAssemblyType AssemblyType
47 - {
48 - get { return (null == this.Fields[1]) ? FileAssemblyType.NotAnAssembly : (FileAssemblyType)this.Fields[1].AsInteger(); }
49 - set { this.Fields[1].Data = (int)value; }
50 - }
51 -
52 - /// <summary>
53 - /// Gets or sets the identifier for the assembly manifest.
54 - /// </summary>
55 - /// <value>Identifier for the assembly manifest.</value>
56 - public string AssemblyManifest
57 - {
58 - get { return (string)this.Fields[2].Data; }
59 - set { this.Fields[2].Data = value; }
60 - }
61 -
62 - /// <summary>
63 - /// Gets or sets the application for the assembly.
64 - /// </summary>
65 - /// <value>Application for the assembly.</value>
66 - public string AssemblyApplication
67 - {
68 - get { return (string)this.Fields[3].Data; }
69 - set { this.Fields[3].Data = value; }
70 - }
71 -
72 - /// <summary>
73 - /// Gets or sets the directory of the file.
74 - /// </summary>
75 - /// <value>Directory of the file.</value>
76 - public string Directory
77 - {
78 - get { return (string)this.Fields[4].Data; }
79 - set { this.Fields[4].Data = value; }
80 - }
81 -
82 - /// <summary>
83 - /// Gets or sets the disk id for this file.
84 - /// </summary>
85 - /// <value>Disk id for the file.</value>
86 - public int DiskId
87 - {
88 - get { return (int)this.Fields[5].Data; }
89 - set { this.Fields[5].Data = value; }
90 - }
91 -
92 - /// <summary>
93 - /// Gets or sets the source location to the file.
94 - /// </summary>
95 - /// <value>Source location to the file.</value>
96 - public string Source
97 - {
98 - get { return (string)this.Fields[6].Data; }
99 - set { this.Fields[6].Data = value; }
100 - }
101 -
102 - /// <summary>
103 - /// Gets or sets the source location to the file.
104 - /// </summary>
105 - /// <value>Source location to the file.</value>
106 - public string PreviousSource
107 - {
108 - get { return (string)this.Fields[6].PreviousData; }
109 - set { this.Fields[6].PreviousData = value; }
110 - }
111 -
112 - /// <summary>
113 - /// Gets or sets the architecture the file executes on.
114 - /// </summary>
115 - /// <value>Architecture the file executes on.</value>
116 - public string ProcessorArchitecture
117 - {
118 - get { return (string)this.Fields[7].Data; }
119 - set { this.Fields[7].Data = value; }
120 - }
121 -
122 - /// <summary>
123 - /// Gets or sets the patch group of a patch-added file.
124 - /// </summary>
125 - /// <value>The patch group of a patch-added file.</value>
126 - public int PatchGroup
127 - {
128 - get { return (null == this.Fields[8].Data) ? 0 : (int)this.Fields[8].Data; }
129 - set { this.Fields[8].Data = value; }
130 - }
131 -
132 - /// <summary>
133 - /// Gets or sets the attributes on a file.
134 - /// </summary>
135 - /// <value>Attributes on a file.</value>
136 - public int Attributes
137 - {
138 - get { return (int)this.Fields[9].Data; }
139 - set { this.Fields[9].Data = value; }
140 - }
141 -
142 - /// <summary>
143 - /// Gets or sets the patching attributes to the file.
144 - /// </summary>
145 - /// <value>Patching attributes of the file.</value>
146 - public PatchAttributeType PatchAttributes
147 - {
148 - get { return (PatchAttributeType)this.Fields[10].AsInteger(); }
149 - set { this.Fields[10].Data = (int)value; }
150 - }
151 -
152 - /// <summary>
153 - /// Gets or sets the path to the delta patch header.
154 - /// </summary>
155 - /// <value>Patch header path.</value>
156 - /// <remarks>Set by the binder only when doing delta patching.</remarks>
157 - public string DeltaPatchHeaderSource
158 - {
159 - get { return (string)this.Fields[11].Data; }
160 - set { this.Fields[11].Data = value; }
161 - }
162 - }
163 -}
src/WixToolset.Data/WindowsInstaller/Table.cs
-3
@@ -162,9 +162,6 @@ namespace WixToolset.Data.WindowsInstaller
162 case "WixDeltaPatchSymbolPaths":
163 row = new WixDeltaPatchSymbolPathsRow(sourceLineNumbers, this);
164 break;
165 - case "WixFile":
166 - row = new WixFileRow(sourceLineNumbers, this);
167 - break;
165 case "WixGroup":
166 row = new WixGroupRow(sourceLineNumbers, this);
167 break;