Move to .NET Core 2.0
Rob Mensching committed
Aug 11, 2017 at 00:39 UTC
4ebc33174c02e1c9f5693b5ef38ecfe3292c687f
134 files changed
+31223
WixToolset.Data.sln
new
+43
@@ -0,0 +1,43 @@
1
+
2
+Microsoft Visual Studio Solution File, Format Version 12.00
3
+# Visual Studio 15
4
+VisualStudioVersion = 15.0.26730.0
5
+MinimumVisualStudioVersion = 10.0.40219.1
6
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Data", "src\WixToolset.Data\WixToolset.Data.csproj", "{73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}"
7
+EndProject
8
+Global
9
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
10
+ Debug|Any CPU = Debug|Any CPU
11
+ Debug|arm = Debug|arm
12
+ Debug|x64 = Debug|x64
13
+ Debug|x86 = Debug|x86
14
+ Release|Any CPU = Release|Any CPU
15
+ Release|arm = Release|arm
16
+ Release|x64 = Release|x64
17
+ Release|x86 = Release|x86
18
+ EndGlobalSection
19
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
20
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
22
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|arm.ActiveCfg = Debug|Any CPU
23
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|arm.Build.0 = Debug|Any CPU
24
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|x64.ActiveCfg = Debug|Any CPU
25
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|x64.Build.0 = Debug|Any CPU
26
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|x86.ActiveCfg = Debug|Any CPU
27
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Debug|x86.Build.0 = Debug|Any CPU
28
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
29
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|Any CPU.Build.0 = Release|Any CPU
30
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|arm.ActiveCfg = Release|Any CPU
31
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|arm.Build.0 = Release|Any CPU
32
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|x64.ActiveCfg = Release|Any CPU
33
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|x64.Build.0 = Release|Any CPU
34
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|x86.ActiveCfg = Release|Any CPU
35
+ {73ADBD3A-8FB2-47DB-BC79-9BC61C40F2E0}.Release|x86.Build.0 = Release|Any CPU
36
+ EndGlobalSection
37
+ GlobalSection(SolutionProperties) = preSolution
38
+ HideSolutionNode = FALSE
39
+ EndGlobalSection
40
+ GlobalSection(ExtensibilityGlobals) = postSolution
41
+ SolutionGuid = {2C73DAA1-A584-4542-A2C3-951EF6203ED5}
42
+ EndGlobalSection
43
+EndGlobal
appveyor.yml
new
+24
@@ -0,0 +1,24 @@
1
+image: Visual Studio 2017 Preview
2
+
3
+version: 0.0.0.{build}
4
+configuration: Release
5
+
6
+environment:
7
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8
+ DOTNET_CLI_TELEMETRY_OPTOUT: 1
9
+ NUGET_XMLDOC_MODE: skip
10
+
11
+build_script:
12
+- dotnet pack
13
+
14
+pull_requests:
15
+ do_not_increment_build_number: true
16
+
17
+nuget:
18
+ disable_publish_on_pr: true
19
+
20
+skip_tags: true
21
+
22
+artifacts:
23
+- path: build\Release\**\*.nupkg
24
+ name: nuget
src/Directory.Build.props
new
+12
@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project>
3
+ <PropertyGroup>
4
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5
+ <BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
6
+ <OutputPath>$(MSBuildThisFileDirectory)..\build\$(Configuration)\</OutputPath>
7
+
8
+ <Authors>Rob Mensching, Bob Arnson</Authors>
9
+ <Company>WiX Toolset</Company>
10
+ <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
11
+ </PropertyGroup>
12
+</Project>
src/WixToolset.Data/AccessModifier.cs
new
+27
@@ -0,0 +1,27 @@
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
+ public enum AccessModifier
6
+ {
7
+ /// <summary>
8
+ /// Indicates the identifier is publicly visible to all other sections.
9
+ /// </summary>
10
+ Public,
11
+
12
+ /// <summary>
13
+ /// Indicates the identifier is visible only to sections in the same library.
14
+ /// </summary>
15
+ Internal,
16
+
17
+ /// <summary>
18
+ /// Indicates the identifier is visible only to sections in the same source file.
19
+ /// </summary>
20
+ Protected,
21
+
22
+ /// <summary>
23
+ /// Indicates the identifiers is visible only to the section where it is defined.
24
+ /// </summary>
25
+ Private,
26
+ }
27
+}
src/WixToolset.Data/AssemblyInfo.cs
new
+11
@@ -0,0 +1,11 @@
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
+using System;
4
+using System.Reflection;
5
+using System.Runtime.InteropServices;
6
+
7
+//[assembly: AssemblyTitle("WiX Toolset Data")]
8
+//[assembly: AssemblyDescription("")]
9
+[assembly: AssemblyCulture("")]
10
+[assembly:CLSCompliant(true)]
11
+[assembly: ComVisible(false)]
src/WixToolset.Data/BundleApprovedExeForElevationAttributes.cs
new
+16
@@ -0,0 +1,16 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// Attributes available for an ApprovedExeForElevation.
9
+ /// </summary>
10
+ [Flags]
11
+ public enum BundleApprovedExeForElevationAttributes : int
12
+ {
13
+ None = 0x0,
14
+ Win64 = 0x1,
15
+ }
16
+}
src/WixToolset.Data/ColumnDefinition.cs
new
+1032
@@ -0,0 +1,1032 @@
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 System;
6
+ using System.Globalization;
7
+ using System.Xml;
8
+
9
+ /// <summary>
10
+ /// Defines MSI column types.
11
+ /// </summary>
12
+ public enum ColumnType
13
+ {
14
+ /// <summary>Unknown column type, default and invalid.</summary>
15
+ Unknown,
16
+
17
+ /// <summary>Column is a string.</summary>
18
+ String,
19
+
20
+ /// <summary>Column is a localizable string.</summary>
21
+ Localized,
22
+
23
+ /// <summary>Column is a number.</summary>
24
+ Number,
25
+
26
+ /// <summary>Column is a binary stream.</summary>
27
+ Object,
28
+
29
+ /// <summary>Column is a string that is preserved in transforms (like Object).</summary>
30
+ Preserved,
31
+ }
32
+
33
+ /// <summary>
34
+ /// Specifies if the column should be modularized.
35
+ /// </summary>
36
+ public enum ColumnModularizeType
37
+ {
38
+ /// <summary>Column should not be modularized.</summary>
39
+ None,
40
+
41
+ /// <summary>Column should be modularized.</summary>
42
+ Column,
43
+
44
+ /// <summary>When the column is an primary or foreign key to the Icon table it should be modularized special.</summary>
45
+ Icon,
46
+
47
+ /// <summary>When the column is a companion file it should be modularized.</summary>
48
+ CompanionFile,
49
+
50
+ /// <summary>Column is a condition and should be modularized.</summary>
51
+ Condition,
52
+
53
+ /// <summary>Special modularization type for the ControlEvent table's Argument column.</summary>
54
+ ControlEventArgument,
55
+
56
+ /// <summary>Special modularization type for the Control table's Text column.</summary>
57
+ ControlText,
58
+
59
+ /// <summary>Any Properties in the column should be modularized.</summary>
60
+ Property,
61
+
62
+ /// <summary>Semi-colon list of keys, all of which need to be modularized.</summary>
63
+ SemicolonDelimited,
64
+ }
65
+
66
+ /// <summary>
67
+ /// Column validation category type
68
+ /// </summary>
69
+ public enum ColumnCategory
70
+ {
71
+ /// <summary>Unknown category, default and invalid.</summary>
72
+ Unknown,
73
+
74
+ /// <summary>Text category.</summary>
75
+ Text,
76
+
77
+ /// <summary>UpperCase category.</summary>
78
+ UpperCase,
79
+
80
+ /// <summary>LowerCase category.</summary>
81
+ LowerCase,
82
+
83
+ /// <summary>Integer category.</summary>
84
+ Integer,
85
+
86
+ /// <summary>DoubleInteger category.</summary>
87
+ DoubleInteger,
88
+
89
+ /// <summary>TimeDate category.</summary>
90
+ TimeDate,
91
+
92
+ /// <summary>Identifier category.</summary>
93
+ Identifier,
94
+
95
+ /// <summary>Property category.</summary>
96
+ Property,
97
+
98
+ /// <summary>Filename category.</summary>
99
+ Filename,
100
+
101
+ /// <summary>WildCardFilename category.</summary>
102
+ WildCardFilename,
103
+
104
+ /// <summary>Path category.</summary>
105
+ Path,
106
+
107
+ /// <summary>Paths category.</summary>
108
+ Paths,
109
+
110
+ /// <summary>AnyPath category.</summary>
111
+ AnyPath,
112
+
113
+ /// <summary>DefaultDir category.</summary>
114
+ DefaultDir,
115
+
116
+ /// <summary>RegPath category.</summary>
117
+ RegPath,
118
+
119
+ /// <summary>Formatted category.</summary>
120
+ Formatted,
121
+
122
+ /// <summary>Template category.</summary>
123
+ Template,
124
+
125
+ /// <summary>Condition category.</summary>
126
+ Condition,
127
+
128
+ /// <summary>Guid category.</summary>
129
+ Guid,
130
+
131
+ /// <summary>Version category.</summary>
132
+ Version,
133
+
134
+ /// <summary>Language category.</summary>
135
+ Language,
136
+
137
+ /// <summary>Binary category.</summary>
138
+ Binary,
139
+
140
+ /// <summary>CustomSource category.</summary>
141
+ CustomSource,
142
+
143
+ /// <summary>Cabinet category.</summary>
144
+ Cabinet,
145
+
146
+ /// <summary>Shortcut category.</summary>
147
+ Shortcut,
148
+
149
+ /// <summary>Formatted SDDL category.</summary>
150
+ FormattedSDDLText,
151
+ }
152
+
153
+ /// <summary>
154
+ /// Definition of a table's column.
155
+ /// </summary>
156
+ public sealed class ColumnDefinition : IComparable<ColumnDefinition>
157
+ {
158
+ private string name;
159
+ private ColumnType type;
160
+ private int length;
161
+ private bool primaryKey;
162
+ private bool nullable;
163
+ private ColumnModularizeType modularize;
164
+ private bool localizable;
165
+ private bool added;
166
+
167
+ private bool minValueSet;
168
+ private long minValue;
169
+ private bool maxValueSet;
170
+ private long maxValue;
171
+ private string keyTable;
172
+ private bool keyColumnSet;
173
+ private int keyColumn;
174
+ private ColumnCategory category;
175
+ private string possibilities;
176
+ private string description;
177
+ private bool escapeIdtCharacters;
178
+ private bool useCData;
179
+
180
+ /// <summary>
181
+ /// Creates a new column definition.
182
+ /// </summary>
183
+ /// <param name="name">Name of column.</param>
184
+ /// <param name="type">Type of column</param>
185
+ /// <param name="length">Length of column.</param>
186
+ /// <param name="primaryKey">If column is primary key.</param>
187
+ /// <param name="nullable">If column is nullable.</param>
188
+ /// <param name="modularizeType">Type of modularization for column</param>
189
+ /// <param name="localizable">If the column is localizable.</param>
190
+ /// <param name="minValueSet">If the minimum of the value was set.</param>
191
+ /// <param name="minValue">Minimum value for the column.</param>
192
+ /// <param name="maxValueSet">If the maximum value was set.</param>
193
+ /// <param name="maxValue">Maximum value for the colum.</param>
194
+ /// <param name="keyTable">Optional name of table for foreign key.</param>
195
+ /// <param name="keyColumnSet">If the key column was set.</param>
196
+ /// <param name="keyColumn">Optional name of column for foreign key.</param>
197
+ /// <param name="category">Validation category for column.</param>
198
+ /// <param name="possibilities">Set of possible values for column.</param>
199
+ /// <param name="description">Description of column in vaidation table.</param>
200
+ /// <param name="escapeIdtCharacters">If characters should be escaped in IDT.</param>
201
+ /// <param name="useCData">If whitespace should be preserved in a CDATA node.</param>
202
+ public ColumnDefinition(string name, ColumnType type, int length, bool primaryKey, bool nullable, ColumnModularizeType modularizeType, bool localizable, bool minValueSet, long minValue, bool maxValueSet, long maxValue, string keyTable, bool keyColumnSet, int keyColumn, ColumnCategory category, string possibilities, string description, bool escapeIdtCharacters, bool useCData)
203
+ {
204
+ this.name = name;
205
+ this.type = type;
206
+ this.length = length;
207
+ this.primaryKey = primaryKey;
208
+ this.nullable = nullable;
209
+ this.modularize = modularizeType;
210
+ this.localizable = localizable;
211
+ this.minValueSet = minValueSet;
212
+ this.minValue = minValue;
213
+ this.maxValueSet = maxValueSet;
214
+ this.maxValue = maxValue;
215
+ this.keyTable = keyTable;
216
+ this.keyColumnSet = keyColumnSet;
217
+ this.keyColumn = keyColumn;
218
+ this.category = category;
219
+ this.possibilities = possibilities;
220
+ this.description = description;
221
+ this.escapeIdtCharacters = escapeIdtCharacters;
222
+ this.useCData = useCData;
223
+ }
224
+
225
+ /// <summary>
226
+ /// Gets whether this column was added via a transform.
227
+ /// </summary>
228
+ /// <value>Whether this column was added via a transform.</value>
229
+ public bool Added
230
+ {
231
+ get { return this.added; }
232
+ set { this.added = value; }
233
+ }
234
+
235
+ /// <summary>
236
+ /// Gets the name of the column.
237
+ /// </summary>
238
+ /// <value>Name of column.</value>
239
+ public string Name
240
+ {
241
+ get { return this.name; }
242
+ }
243
+
244
+ /// <summary>
245
+ /// Gets the type of the column.
246
+ /// </summary>
247
+ /// <value>Type of column.</value>
248
+ public ColumnType Type
249
+ {
250
+ get { return this.type; }
251
+ }
252
+
253
+ /// <summary>
254
+ /// Gets the length of the column.
255
+ /// </summary>
256
+ /// <value>Length of column.</value>
257
+ public int Length
258
+ {
259
+ get { return this.length; }
260
+ }
261
+
262
+ /// <summary>
263
+ /// Gets if the column is a primary key.
264
+ /// </summary>
265
+ /// <value>true if column is primary key.</value>
266
+ public bool PrimaryKey
267
+ {
268
+ get { return this.primaryKey; }
269
+ }
270
+
271
+ /// <summary>
272
+ /// Gets if the column is nullable.
273
+ /// </summary>
274
+ /// <value>true if column is nullable.</value>
275
+ public bool Nullable
276
+ {
277
+ get { return this.nullable; }
278
+ }
279
+
280
+ /// <summary>
281
+ /// Gets the type of modularization for this column.
282
+ /// </summary>
283
+ /// <value>Column's modularization type.</value>
284
+ public ColumnModularizeType ModularizeType
285
+ {
286
+ get { return this.modularize; }
287
+ }
288
+
289
+ /// <summary>
290
+ /// Gets if the column is localizable. Can be because the type is localizable, or because the column
291
+ /// was explicitly set to be so.
292
+ /// </summary>
293
+ /// <value>true if column is localizable.</value>
294
+ public bool IsLocalizable
295
+ {
296
+ get { return this.localizable || ColumnType.Localized == this.Type; }
297
+ }
298
+
299
+ /// <summary>
300
+ /// Gets if the minimum value of the column is set.
301
+ /// </summary>
302
+ /// <value>true if minimum value is set.</value>
303
+ public bool IsMinValueSet
304
+ {
305
+ get { return this.minValueSet; }
306
+ }
307
+
308
+ /// <summary>
309
+ /// Gets the minimum value for the column, only valid if IsMinValueSet returns true.
310
+ /// </summary>
311
+ /// <value>Minimum value for the column.</value>
312
+ public long MinValue
313
+ {
314
+ get { return this.minValue; }
315
+ }
316
+
317
+ /// <summary>
318
+ /// Gets if the maximum value of the column is set.
319
+ /// </summary>
320
+ /// <value>true if maximum value is set.</value>
321
+ public bool IsMaxValueSet
322
+ {
323
+ get { return this.maxValueSet; }
324
+ }
325
+
326
+ /// <summary>
327
+ /// Gets the maximum value for the column, only valid if IsMinValueSet returns true.
328
+ /// </summary>
329
+ /// <value>Maximum value for the column.</value>
330
+ public long MaxValue
331
+ {
332
+ get { return this.maxValue; }
333
+ }
334
+
335
+ /// <summary>
336
+ /// Gets the table that has the foreign key for this column
337
+ /// </summary>
338
+ /// <value>Foreign key table name.</value>
339
+ public string KeyTable
340
+ {
341
+ get { return this.keyTable; }
342
+ }
343
+
344
+ /// <summary>
345
+ /// Gets if the key column is set.
346
+ /// </summary>
347
+ /// <value>True if the key column is set.</value>
348
+ public bool IsKeyColumnSet
349
+ {
350
+ get { return this.keyColumnSet; }
351
+ }
352
+
353
+ /// <summary>
354
+ /// Gets the foreign key column that this column refers to.
355
+ /// </summary>
356
+ /// <value>Foreign key column.</value>
357
+ public int KeyColumn
358
+ {
359
+ get { return this.keyColumn; }
360
+ }
361
+
362
+ /// <summary>
363
+ /// Gets the validation category for this column.
364
+ /// </summary>
365
+ /// <value>Validation category.</value>
366
+ public ColumnCategory Category
367
+ {
368
+ get { return this.category; }
369
+ }
370
+
371
+ /// <summary>
372
+ /// Gets the set of possibilities for this column.
373
+ /// </summary>
374
+ /// <value>Set of possibilities for this column.</value>
375
+ public string Possibilities
376
+ {
377
+ get { return this.possibilities; }
378
+ }
379
+
380
+ /// <summary>
381
+ /// Gets the description for this column.
382
+ /// </summary>
383
+ /// <value>Description of column.</value>
384
+ public string Description
385
+ {
386
+ get { return this.description; }
387
+ }
388
+
389
+ /// <summary>
390
+ /// Gets if characters should be escaped to fit into IDT.
391
+ /// </summary>
392
+ /// <value>true if data should be escaped when adding to IDT.</value>
393
+ public bool EscapeIdtCharacters
394
+ {
395
+ get { return this.escapeIdtCharacters; }
396
+ }
397
+
398
+ /// <summary>
399
+ /// Gets if whitespace should be preserved in a CDATA node.
400
+ /// </summary>
401
+ /// <value>true if whitespace should be preserved in a CDATA node.</value>
402
+ public bool UseCData
403
+ {
404
+ get { return this.useCData; }
405
+ }
406
+
407
+ /// <summary>
408
+ /// Gets the type of the column in IDT format.
409
+ /// </summary>
410
+ /// <value>IDT format for column type.</value>
411
+ public string IdtType
412
+ {
413
+ get
414
+ {
415
+ char typeCharacter;
416
+ switch (this.type)
417
+ {
418
+ case ColumnType.Number:
419
+ typeCharacter = this.nullable ? 'I' : 'i';
420
+ break;
421
+ case ColumnType.Preserved:
422
+ case ColumnType.String:
423
+ typeCharacter = this.nullable ? 'S' : 's';
424
+ break;
425
+ case ColumnType.Localized:
426
+ typeCharacter = this.nullable ? 'L' : 'l';
427
+ break;
428
+ case ColumnType.Object:
429
+ typeCharacter = this.nullable ? 'V' : 'v';
430
+ break;
431
+ default:
432
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_UnknownColumnType, this.type));
433
+ }
434
+
435
+ return String.Concat(typeCharacter, this.length);
436
+ }
437
+ }
438
+
439
+ /// <summary>
440
+ /// Parses a column definition in a table definition.
441
+ /// </summary>
442
+ /// <param name="reader">Reader to get data from.</param>
443
+ /// <returns>The ColumnDefintion represented by the Xml.</returns>
444
+ internal static ColumnDefinition Read(XmlReader reader)
445
+ {
446
+ if (!reader.LocalName.Equals("columnDefinition"))
447
+ {
448
+ throw new XmlException();
449
+ }
450
+
451
+ bool added = false;
452
+ ColumnCategory category = ColumnCategory.Unknown;
453
+ string description = null;
454
+ bool empty = reader.IsEmptyElement;
455
+ bool escapeIdtCharacters = false;
456
+ int keyColumn = -1;
457
+ bool keyColumnSet = false;
458
+ string keyTable = null;
459
+ int length = -1;
460
+ bool localizable = false;
461
+ long maxValue = 0;
462
+ bool maxValueSet = false;
463
+ long minValue = 0;
464
+ bool minValueSet = false;
465
+ ColumnModularizeType modularize = ColumnModularizeType.None;
466
+ string name = null;
467
+ bool nullable = false;
468
+ string possibilities = null;
469
+ bool primaryKey = false;
470
+ ColumnType type = ColumnType.Unknown;
471
+ bool useCData = false;
472
+
473
+ // parse the attributes
474
+ while (reader.MoveToNextAttribute())
475
+ {
476
+ switch (reader.LocalName)
477
+ {
478
+ case "added":
479
+ added = reader.Value.Equals("yes");
480
+ break;
481
+ case "category":
482
+ switch (reader.Value)
483
+ {
484
+ case "anyPath":
485
+ category = ColumnCategory.AnyPath;
486
+ break;
487
+ case "binary":
488
+ category = ColumnCategory.Binary;
489
+ break;
490
+ case "cabinet":
491
+ category = ColumnCategory.Cabinet;
492
+ break;
493
+ case "condition":
494
+ category = ColumnCategory.Condition;
495
+ break;
496
+ case "customSource":
497
+ category = ColumnCategory.CustomSource;
498
+ break;
499
+ case "defaultDir":
500
+ category = ColumnCategory.DefaultDir;
501
+ break;
502
+ case "doubleInteger":
503
+ category = ColumnCategory.DoubleInteger;
504
+ break;
505
+ case "filename":
506
+ category = ColumnCategory.Filename;
507
+ break;
508
+ case "formatted":
509
+ category = ColumnCategory.Formatted;
510
+ break;
511
+ case "formattedSddl":
512
+ category = ColumnCategory.FormattedSDDLText;
513
+ break;
514
+ case "guid":
515
+ category = ColumnCategory.Guid;
516
+ break;
517
+ case "identifier":
518
+ category = ColumnCategory.Identifier;
519
+ break;
520
+ case "integer":
521
+ category = ColumnCategory.Integer;
522
+ break;
523
+ case "language":
524
+ category = ColumnCategory.Language;
525
+ break;
526
+ case "lowerCase":
527
+ category = ColumnCategory.LowerCase;
528
+ break;
529
+ case "path":
530
+ category = ColumnCategory.Path;
531
+ break;
532
+ case "paths":
533
+ category = ColumnCategory.Paths;
534
+ break;
535
+ case "property":
536
+ category = ColumnCategory.Property;
537
+ break;
538
+ case "regPath":
539
+ category = ColumnCategory.RegPath;
540
+ break;
541
+ case "shortcut":
542
+ category = ColumnCategory.Shortcut;
543
+ break;
544
+ case "template":
545
+ category = ColumnCategory.Template;
546
+ break;
547
+ case "text":
548
+ category = ColumnCategory.Text;
549
+ break;
550
+ case "timeDate":
551
+ category = ColumnCategory.TimeDate;
552
+ break;
553
+ case "upperCase":
554
+ category = ColumnCategory.UpperCase;
555
+ break;
556
+ case "version":
557
+ category = ColumnCategory.Version;
558
+ break;
559
+ case "wildCardFilename":
560
+ category = ColumnCategory.WildCardFilename;
561
+ break;
562
+ default:
563
+ throw new InvalidOperationException();
564
+ }
565
+ break;
566
+ case "description":
567
+ description = reader.Value;
568
+ break;
569
+ case "escapeIdtCharacters":
570
+ escapeIdtCharacters = reader.Value.Equals("yes");
571
+ break;
572
+ case "keyColumn":
573
+ keyColumnSet = true;
574
+ keyColumn = Convert.ToInt32(reader.Value, 10);
575
+ break;
576
+ case "keyTable":
577
+ keyTable = reader.Value;
578
+ break;
579
+ case "length":
580
+ length = Convert.ToInt32(reader.Value, 10);
581
+ break;
582
+ case "localizable":
583
+ localizable = reader.Value.Equals("yes");
584
+ break;
585
+ case "maxValue":
586
+ maxValueSet = true;
587
+ maxValue = Convert.ToInt32(reader.Value, 10);
588
+ break;
589
+ case "minValue":
590
+ minValueSet = true;
591
+ minValue = Convert.ToInt32(reader.Value, 10);
592
+ break;
593
+ case "modularize":
594
+ switch (reader.Value)
595
+ {
596
+ case "column":
597
+ modularize = ColumnModularizeType.Column;
598
+ break;
599
+ case "companionFile":
600
+ modularize = ColumnModularizeType.CompanionFile;
601
+ break;
602
+ case "condition":
603
+ modularize = ColumnModularizeType.Condition;
604
+ break;
605
+ case "controlEventArgument":
606
+ modularize = ColumnModularizeType.ControlEventArgument;
607
+ break;
608
+ case "controlText":
609
+ modularize = ColumnModularizeType.ControlText;
610
+ break;
611
+ case "icon":
612
+ modularize = ColumnModularizeType.Icon;
613
+ break;
614
+ case "none":
615
+ modularize = ColumnModularizeType.None;
616
+ break;
617
+ case "property":
618
+ modularize = ColumnModularizeType.Property;
619
+ break;
620
+ case "semicolonDelimited":
621
+ modularize = ColumnModularizeType.SemicolonDelimited;
622
+ break;
623
+ default:
624
+ throw new XmlException();
625
+ }
626
+ break;
627
+ case "name":
628
+ switch (reader.Value)
629
+ {
630
+ case "CREATE":
631
+ case "DELETE":
632
+ case "DROP":
633
+ case "INSERT":
634
+ throw new XmlException();
635
+ default:
636
+ name = reader.Value;
637
+ break;
638
+ }
639
+ break;
640
+ case "nullable":
641
+ nullable = reader.Value.Equals("yes");
642
+ break;
643
+ case "primaryKey":
644
+ primaryKey = reader.Value.Equals("yes");
645
+ break;
646
+ case "set":
647
+ possibilities = reader.Value;
648
+ break;
649
+ case "type":
650
+ switch (reader.Value)
651
+ {
652
+ case "localized":
653
+ type = ColumnType.Localized;
654
+ break;
655
+ case "number":
656
+ type = ColumnType.Number;
657
+ break;
658
+ case "object":
659
+ type = ColumnType.Object;
660
+ break;
661
+ case "string":
662
+ type = ColumnType.String;
663
+ break;
664
+ case "preserved":
665
+ type = ColumnType.Preserved;
666
+ break;
667
+ default:
668
+ throw new XmlException();
669
+ }
670
+ break;
671
+ case "useCData":
672
+ useCData = reader.Value.Equals("yes");
673
+ break;
674
+ }
675
+ }
676
+
677
+ // parse the child elements (there should be none)
678
+ if (!empty)
679
+ {
680
+ bool done = false;
681
+
682
+ while (!done && reader.Read())
683
+ {
684
+ switch (reader.NodeType)
685
+ {
686
+ case XmlNodeType.Element:
687
+ throw new XmlException();
688
+ case XmlNodeType.EndElement:
689
+ done = true;
690
+ break;
691
+ }
692
+ }
693
+
694
+ if (!done)
695
+ {
696
+ throw new XmlException();
697
+ }
698
+ }
699
+
700
+ ColumnDefinition columnDefinition = new ColumnDefinition(name, type, length, primaryKey, nullable, modularize, localizable, minValueSet, minValue, maxValueSet, maxValue, keyTable, keyColumnSet, keyColumn, category, possibilities, description, escapeIdtCharacters, useCData);
701
+ columnDefinition.Added = added;
702
+
703
+ return columnDefinition;
704
+ }
705
+
706
+ /// <summary>
707
+ /// Persists a ColumnDefinition in an XML format.
708
+ /// </summary>
709
+ /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param>
710
+ internal void Write(XmlWriter writer)
711
+ {
712
+ writer.WriteStartElement("columnDefinition", TableDefinitionCollection.XmlNamespaceUri);
713
+
714
+ writer.WriteAttributeString("name", this.name);
715
+
716
+ switch (this.type)
717
+ {
718
+ case ColumnType.Localized:
719
+ writer.WriteAttributeString("type", "localized");
720
+ break;
721
+ case ColumnType.Number:
722
+ writer.WriteAttributeString("type", "number");
723
+ break;
724
+ case ColumnType.Object:
725
+ writer.WriteAttributeString("type", "object");
726
+ break;
727
+ case ColumnType.String:
728
+ writer.WriteAttributeString("type", "string");
729
+ break;
730
+ case ColumnType.Preserved:
731
+ writer.WriteAttributeString("type", "preserved");
732
+ break;
733
+ }
734
+
735
+ writer.WriteAttributeString("length", this.length.ToString(CultureInfo.InvariantCulture.NumberFormat));
736
+
737
+ if (this.primaryKey)
738
+ {
739
+ writer.WriteAttributeString("primaryKey", "yes");
740
+ }
741
+
742
+ if (this.nullable)
743
+ {
744
+ writer.WriteAttributeString("nullable", "yes");
745
+ }
746
+
747
+ if (this.localizable)
748
+ {
749
+ writer.WriteAttributeString("localizable", "yes");
750
+ }
751
+
752
+ if (this.added)
753
+ {
754
+ writer.WriteAttributeString("added", "yes");
755
+ }
756
+
757
+ switch (this.modularize)
758
+ {
759
+ case ColumnModularizeType.Column:
760
+ writer.WriteAttributeString("modularize", "column");
761
+ break;
762
+ case ColumnModularizeType.CompanionFile:
763
+ writer.WriteAttributeString("modularize", "companionFile");
764
+ break;
765
+ case ColumnModularizeType.Condition:
766
+ writer.WriteAttributeString("modularize", "condition");
767
+ break;
768
+ case ColumnModularizeType.ControlEventArgument:
769
+ writer.WriteAttributeString("modularize", "controlEventArgument");
770
+ break;
771
+ case ColumnModularizeType.ControlText:
772
+ writer.WriteAttributeString("modularize", "controlText");
773
+ break;
774
+ case ColumnModularizeType.Icon:
775
+ writer.WriteAttributeString("modularize", "icon");
776
+ break;
777
+ case ColumnModularizeType.None:
778
+ // this is the default value
779
+ break;
780
+ case ColumnModularizeType.Property:
781
+ writer.WriteAttributeString("modularize", "property");
782
+ break;
783
+ case ColumnModularizeType.SemicolonDelimited:
784
+ writer.WriteAttributeString("modularize", "semicolonDelimited");
785
+ break;
786
+ }
787
+
788
+ if (this.minValueSet)
789
+ {
790
+ writer.WriteAttributeString("minValue", this.minValue.ToString(CultureInfo.InvariantCulture.NumberFormat));
791
+ }
792
+
793
+ if (this.maxValueSet)
794
+ {
795
+ writer.WriteAttributeString("maxValue", this.maxValue.ToString(CultureInfo.InvariantCulture.NumberFormat));
796
+ }
797
+
798
+ if (!String.IsNullOrEmpty(this.keyTable))
799
+ {
800
+ writer.WriteAttributeString("keyTable", this.keyTable);
801
+ }
802
+
803
+ if (this.keyColumnSet)
804
+ {
805
+ writer.WriteAttributeString("keyColumn", this.keyColumn.ToString(CultureInfo.InvariantCulture.NumberFormat));
806
+ }
807
+
808
+ switch (this.category)
809
+ {
810
+ case ColumnCategory.AnyPath:
811
+ writer.WriteAttributeString("category", "anyPath");
812
+ break;
813
+ case ColumnCategory.Binary:
814
+ writer.WriteAttributeString("category", "binary");
815
+ break;
816
+ case ColumnCategory.Cabinet:
817
+ writer.WriteAttributeString("category", "cabinet");
818
+ break;
819
+ case ColumnCategory.Condition:
820
+ writer.WriteAttributeString("category", "condition");
821
+ break;
822
+ case ColumnCategory.CustomSource:
823
+ writer.WriteAttributeString("category", "customSource");
824
+ break;
825
+ case ColumnCategory.DefaultDir:
826
+ writer.WriteAttributeString("category", "defaultDir");
827
+ break;
828
+ case ColumnCategory.DoubleInteger:
829
+ writer.WriteAttributeString("category", "doubleInteger");
830
+ break;
831
+ case ColumnCategory.Filename:
832
+ writer.WriteAttributeString("category", "filename");
833
+ break;
834
+ case ColumnCategory.Formatted:
835
+ writer.WriteAttributeString("category", "formatted");
836
+ break;
837
+ case ColumnCategory.FormattedSDDLText:
838
+ writer.WriteAttributeString("category", "formattedSddl");
839
+ break;
840
+ case ColumnCategory.Guid:
841
+ writer.WriteAttributeString("category", "guid");
842
+ break;
843
+ case ColumnCategory.Identifier:
844
+ writer.WriteAttributeString("category", "identifier");
845
+ break;
846
+ case ColumnCategory.Integer:
847
+ writer.WriteAttributeString("category", "integer");
848
+ break;
849
+ case ColumnCategory.Language:
850
+ writer.WriteAttributeString("category", "language");
851
+ break;
852
+ case ColumnCategory.LowerCase:
853
+ writer.WriteAttributeString("category", "lowerCase");
854
+ break;
855
+ case ColumnCategory.Path:
856
+ writer.WriteAttributeString("category", "path");
857
+ break;
858
+ case ColumnCategory.Paths:
859
+ writer.WriteAttributeString("category", "paths");
860
+ break;
861
+ case ColumnCategory.Property:
862
+ writer.WriteAttributeString("category", "property");
863
+ break;
864
+ case ColumnCategory.RegPath:
865
+ writer.WriteAttributeString("category", "regPath");
866
+ break;
867
+ case ColumnCategory.Shortcut:
868
+ writer.WriteAttributeString("category", "shortcut");
869
+ break;
870
+ case ColumnCategory.Template:
871
+ writer.WriteAttributeString("category", "template");
872
+ break;
873
+ case ColumnCategory.Text:
874
+ writer.WriteAttributeString("category", "text");
875
+ break;
876
+ case ColumnCategory.TimeDate:
877
+ writer.WriteAttributeString("category", "timeDate");
878
+ break;
879
+ case ColumnCategory.UpperCase:
880
+ writer.WriteAttributeString("category", "upperCase");
881
+ break;
882
+ case ColumnCategory.Version:
883
+ writer.WriteAttributeString("category", "version");
884
+ break;
885
+ case ColumnCategory.WildCardFilename:
886
+ writer.WriteAttributeString("category", "wildCardFilename");
887
+ break;
888
+ }
889
+
890
+ if (!String.IsNullOrEmpty(this.possibilities))
891
+ {
892
+ writer.WriteAttributeString("set", this.possibilities);
893
+ }
894
+
895
+ if (!String.IsNullOrEmpty(this.description))
896
+ {
897
+ writer.WriteAttributeString("description", this.description);
898
+ }
899
+
900
+ if (this.escapeIdtCharacters)
901
+ {
902
+ writer.WriteAttributeString("escapeIdtCharacters", "yes");
903
+ }
904
+
905
+ if (this.useCData)
906
+ {
907
+ writer.WriteAttributeString("useCData", "yes");
908
+ }
909
+
910
+ writer.WriteEndElement();
911
+ }
912
+
913
+ /// <summary>
914
+ /// Validate a value for this column.
915
+ /// </summary>
916
+ /// <param name="value">The value to validate.</param>
917
+ /// <returns>Validated value.</returns>
918
+ internal object ValidateValue(object value)
919
+ {
920
+ if (null == value)
921
+ {
922
+ if (!this.nullable)
923
+ {
924
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with a null value because this is a required field.", this.name));
925
+ }
926
+ }
927
+ else // check numerical values against their specified minimum and maximum values.
928
+ {
929
+ if (ColumnType.Number == this.type && !this.IsLocalizable)
930
+ {
931
+ // For now all enums in the tables can be represented by integers. This if statement would need to
932
+ // be enhanced if that ever changes.
933
+ if (value is int || value.GetType().IsEnum)
934
+ {
935
+ int intValue = (int)value;
936
+
937
+ // validate the value against the minimum allowed value
938
+ if (this.minValueSet && this.minValue > intValue)
939
+ {
940
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is less than the minimum allowed value for this column, {2}.", this.name, intValue, this.minValue));
941
+ }
942
+
943
+ // validate the value against the maximum allowed value
944
+ if (this.maxValueSet && this.maxValue < intValue)
945
+ {
946
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is greater than the maximum allowed value for this column, {2}.", this.name, intValue, this.maxValue));
947
+ }
948
+
949
+ return intValue;
950
+ }
951
+ else if (value is long)
952
+ {
953
+ long longValue = (long)value;
954
+
955
+ // validate the value against the minimum allowed value
956
+ if (this.minValueSet && this.minValue > longValue)
957
+ {
958
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is less than the minimum allowed value for this column, {2}.", this.name, longValue, this.minValue));
959
+ }
960
+
961
+ // validate the value against the maximum allowed value
962
+ if (this.maxValueSet && this.maxValue < longValue)
963
+ {
964
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is greater than the maximum allowed value for this column, {2}.", this.name, longValue, this.maxValue));
965
+ }
966
+
967
+ return longValue;
968
+ }
969
+ else
970
+ {
971
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set number column '{0}' with a value of type '{1}'.", this.name, value.GetType().ToString()));
972
+ }
973
+ }
974
+ else
975
+ {
976
+ if (!(value is string))
977
+ {
978
+ throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set string column '{0}' with a value of type '{1}'.", this.name, value.GetType().ToString()));
979
+ }
980
+ }
981
+ }
982
+
983
+ return value;
984
+ }
985
+
986
+ /// <summary>
987
+ /// Compare this column definition to another column definition.
988
+ /// </summary>
989
+ /// <remarks>
990
+ /// Only Windows Installer traits are compared, allowing for updates to WiX-specific table definitions.
991
+ /// </remarks>
992
+ /// <param name="other">The <see cref="ColumnDefinition"/> to compare with this one.</param>
993
+ /// <returns>0 if the columns' core propeties are the same; otherwise, non-0.</returns>
994
+ public int CompareTo(ColumnDefinition other)
995
+ {
996
+ // by definition, this object is greater than null
997
+ if (null == other)
998
+ {
999
+ return 1;
1000
+ }
1001
+
1002
+ // compare column names
1003
+ int ret = String.Compare(this.Name, other.Name, StringComparison.Ordinal);
1004
+
1005
+ // compare column types
1006
+ if (0 == ret)
1007
+ {
1008
+ ret = this.Type == other.Type ? 0 : -1;
1009
+
1010
+ // compare column lengths
1011
+ if (0 == ret)
1012
+ {
1013
+ ret = this.Length == other.Length ? 0 : -1;
1014
+
1015
+ // compare whether both are primary keys
1016
+ if (0 == ret)
1017
+ {
1018
+ ret = this.PrimaryKey == other.PrimaryKey ? 0 : -1;
1019
+
1020
+ // compare nullability
1021
+ if (0 == ret)
1022
+ {
1023
+ ret = this.Nullable == other.Nullable ? 0 : -1;
1024
+ }
1025
+ }
1026
+ }
1027
+ }
1028
+
1029
+ return ret;
1030
+ }
1031
+ }
1032
+}
src/WixToolset.Data/Common.cs
new
+53
@@ -0,0 +1,53 @@
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 System;
6
+ using System.IO;
7
+ using System.Security.Cryptography;
8
+ using System.Text;
9
+ using System.Text.RegularExpressions;
10
+ using System.Xml.Linq;
11
+
12
+ internal static class Common
13
+ {
14
+ public const int IntegerNotSet = int.MinValue;
15
+
16
+ internal static readonly XNamespace W3SchemaPrefix = "http://www.w3.org/";
17
+
18
+ private static readonly Regex LegalIdentifierCharacters = new Regex(@"^[_A-Za-z][0-9A-Za-z_\.]*$", RegexOptions.Compiled);
19
+
20
+ internal static string GetFileHash(FileInfo fileInfo)
21
+ {
22
+ byte[] hashBytes;
23
+ using (SHA1Managed managed = new SHA1Managed())
24
+ {
25
+ using (FileStream stream = fileInfo.OpenRead())
26
+ {
27
+ hashBytes = managed.ComputeHash(stream);
28
+ }
29
+ }
30
+
31
+ StringBuilder sb = new StringBuilder();
32
+ for (int i = 0; i < hashBytes.Length; i++)
33
+ {
34
+ sb.AppendFormat("{0:X2}", hashBytes[i]);
35
+ }
36
+
37
+ return sb.ToString();
38
+ }
39
+
40
+ public static bool IsIdentifier(string value)
41
+ {
42
+ if (!String.IsNullOrEmpty(value))
43
+ {
44
+ if (LegalIdentifierCharacters.IsMatch(value))
45
+ {
46
+ return true;
47
+ }
48
+ }
49
+
50
+ return false;
51
+ }
52
+ }
53
+}
src/WixToolset.Data/ComplexReferenceChildType.cs
new
+46
@@ -0,0 +1,46 @@
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
+ /// <summary>
6
+ /// Types of children in complex refernece.
7
+ /// </summary>
8
+ public enum ComplexReferenceChildType
9
+ {
10
+ /// <summary>Unknown complex reference type, default and invalid.</summary>
11
+ Unknown,
12
+
13
+ /// <summary>Component child of complex reference.</summary>
14
+ Component,
15
+
16
+ /// <summary>Feature child of complex reference.</summary>
17
+ Feature,
18
+
19
+ /// <summary>ComponentGroup child of complex reference.</summary>
20
+ ComponentGroup,
21
+
22
+ /// <summary>FeatureGroup child of complex reference.</summary>
23
+ FeatureGroup,
24
+
25
+ /// <summary>Module child of complex reference.</summary>
26
+ Module,
27
+
28
+ /// <summary>Payload child of complex reference.</summary>
29
+ Payload,
30
+
31
+ /// <summary>PayloadGroup child of complex reference.</summary>
32
+ PayloadGroup,
33
+
34
+ /// <summary>Package child of complex reference.</summary>
35
+ Package,
36
+
37
+ /// <summary>PackageGroup child of complex reference.</summary>
38
+ PackageGroup,
39
+
40
+ /// <summary>PatchFamily child of complex reference.</summary>
41
+ PatchFamily,
42
+
43
+ /// <summary>PatchFamilyGroup child of complex reference.</summary>
44
+ PatchFamilyGroup,
45
+ }
46
+}
src/WixToolset.Data/ComplexReferenceParentType.cs
new
+49
@@ -0,0 +1,49 @@
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
+ /// <summary>
6
+ /// Types of parents in complex reference.
7
+ /// </summary>
8
+ public enum ComplexReferenceParentType
9
+ {
10
+ /// <summary>Unknown complex reference type, default and invalid.</summary>
11
+ Unknown,
12
+
13
+ /// <summary>Feature parent of complex reference.</summary>
14
+ Feature,
15
+
16
+ /// <summary>ComponentGroup parent of complex reference.</summary>
17
+ ComponentGroup,
18
+
19
+ /// <summary>FeatureGroup parent of complex reference.</summary>
20
+ FeatureGroup,
21
+
22
+ /// <summary>Module parent of complex reference.</summary>
23
+ Module,
24
+
25
+ /// <summary>Product parent of complex reference.</summary>
26
+ Product,
27
+
28
+ /// <summary>PayloadGroup parent of complex reference.</summary>
29
+ PayloadGroup,
30
+
31
+ /// <summary>Package parent of complex reference.</summary>
32
+ Package,
33
+
34
+ /// <summary>PackageGroup parent of complex reference.</summary>
35
+ PackageGroup,
36
+
37
+ /// <summary>Container parent of complex reference.</summary>
38
+ Container,
39
+
40
+ /// <summary>Layout parent of complex reference.</summary>
41
+ Layout,
42
+
43
+ /// <summary>Patch parent of complex reference.</summary>
44
+ Patch,
45
+
46
+ /// <summary>PatchFamilyGroup parent of complex reference.</summary>
47
+ PatchFamilyGroup,
48
+ }
49
+}
src/WixToolset.Data/CompressionLevel.cs
new
+26
@@ -0,0 +1,26 @@
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
+
6
+ /// <summary>
7
+ /// Compression level to use when creating cabinet.
8
+ /// </summary>
9
+ public enum CompressionLevel
10
+ {
11
+ /// <summary>Use no compression.</summary>
12
+ None,
13
+
14
+ /// <summary>Use low compression.</summary>
15
+ Low,
16
+
17
+ /// <summary>Use medium compression.</summary>
18
+ Medium,
19
+
20
+ /// <summary>Use high compression.</summary>
21
+ High,
22
+
23
+ /// <summary>Use ms-zip compression.</summary>
24
+ Mszip
25
+ }
26
+}
src/WixToolset.Data/Data/Xsd/actions.xsd
new
+73
@@ -0,0 +1,73 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="http://wixtoolset.org/schemas/v4/wi/actions"
7
+ xmlns="http://wixtoolset.org/schemas/v4/wi/actions">
8
+ <xs:annotation>
9
+ <xs:documentation>
10
+ Schema for describing standard actions in the Windows Installer.
11
+ </xs:documentation>
12
+ </xs:annotation>
13
+
14
+ <xs:element name="actions">
15
+ <xs:complexType>
16
+ <xs:sequence maxOccurs="unbounded">
17
+ <xs:element ref="action" />
18
+ </xs:sequence>
19
+ </xs:complexType>
20
+ </xs:element>
21
+
22
+ <xs:element name="action">
23
+ <xs:complexType>
24
+ <xs:attribute name="name" type="xs:string" use="required">
25
+ <xs:annotation>
26
+ <xs:documentation>Name of action</xs:documentation>
27
+ </xs:annotation>
28
+ </xs:attribute>
29
+ <xs:attribute name="condition" type="xs:string">
30
+ <xs:annotation>
31
+ <xs:documentation>Default condition for action</xs:documentation>
32
+ </xs:annotation>
33
+ </xs:attribute>
34
+ <xs:attribute name="sequence" type="xs:integer" use="required">
35
+ <xs:annotation>
36
+ <xs:documentation>Sequence of action</xs:documentation>
37
+ </xs:annotation>
38
+ </xs:attribute>
39
+ <xs:attribute name="AdminExecuteSequence" type="ActionsYesNoType">
40
+ <xs:annotation>
41
+ <xs:documentation>Specifies if action is allowed in AdminExecuteSequence</xs:documentation>
42
+ </xs:annotation>
43
+ </xs:attribute>
44
+ <xs:attribute name="AdminUISequence" type="ActionsYesNoType">
45
+ <xs:annotation>
46
+ <xs:documentation>Specifies if action is allowed in AdminUISequence</xs:documentation>
47
+ </xs:annotation>
48
+ </xs:attribute>
49
+ <xs:attribute name="AdvtExecuteSequence" type="ActionsYesNoType">
50
+ <xs:annotation>
51
+ <xs:documentation>Specifies if action is allowed in AdvtExecuteSequence</xs:documentation>
52
+ </xs:annotation>
53
+ </xs:attribute>
54
+ <xs:attribute name="InstallExecuteSequence" type="ActionsYesNoType">
55
+ <xs:annotation>
56
+ <xs:documentation>Specifies if action is allowed in InstallExecuteSequence</xs:documentation>
57
+ </xs:annotation>
58
+ </xs:attribute>
59
+ <xs:attribute name="InstallUISequence" type="ActionsYesNoType">
60
+ <xs:annotation>
61
+ <xs:documentation>Specifies if action is allowed in InstallUISequence</xs:documentation>
62
+ </xs:annotation>
63
+ </xs:attribute>
64
+ </xs:complexType>
65
+ </xs:element>
66
+
67
+ <xs:simpleType name="ActionsYesNoType">
68
+ <xs:restriction base="xs:NMTOKEN">
69
+ <xs:enumeration value="no" />
70
+ <xs:enumeration value="yes" />
71
+ </xs:restriction>
72
+ </xs:simpleType>
73
+</xs:schema>
src/WixToolset.Data/Data/Xsd/libraries.xsd
new
+66
@@ -0,0 +1,66 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="http://wixtoolset.org/schemas/v4/wixlib"
7
+ xmlns="http://wixtoolset.org/schemas/v4/wixlib"
8
+ xmlns:loc="http://wixtoolset.org/schemas/v4/wxl"
9
+ xmlns:objs="http://wixtoolset.org/schemas/v4/wixobj">
10
+ <xs:annotation>
11
+ <xs:documentation>
12
+ Schema for describing WiX Library files (.wixlib).
13
+ </xs:documentation>
14
+ </xs:annotation>
15
+
16
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
17
+
18
+ <xs:element name="wixLibrary">
19
+ <xs:complexType>
20
+ <xs:sequence>
21
+ <xs:element ref="localization" minOccurs="0" maxOccurs="unbounded" />
22
+ <xs:element ref="objs:section" minOccurs="0" maxOccurs="unbounded" />
23
+ </xs:sequence>
24
+
25
+ <xs:attribute name="id" type="xs:string" use="required" />
26
+ <xs:attribute name="version" type="xs:string" use="required">
27
+ <xs:annotation>
28
+ <xs:documentation>Version of WiX used to create this library file</xs:documentation>
29
+ </xs:annotation>
30
+ </xs:attribute>
31
+ </xs:complexType>
32
+ </xs:element>
33
+
34
+ <xs:element name="localization">
35
+ <xs:complexType>
36
+ <xs:sequence>
37
+ <xs:element ref="string" minOccurs="0" maxOccurs="unbounded" />
38
+ <xs:element ref="ui" minOccurs="0" maxOccurs="unbounded" />
39
+ </xs:sequence>
40
+
41
+ <xs:attribute name="codepage" type="xs:string" use="required" />
42
+ <xs:attribute name="culture" type="xs:string" />
43
+ </xs:complexType>
44
+ </xs:element>
45
+
46
+ <xs:element name="string">
47
+ <xs:complexType mixed="true">
48
+ <xs:attribute name="id" type="xs:string" use="required" />
49
+ <xs:attribute name="overridable" type="xs:string" />
50
+ </xs:complexType>
51
+ </xs:element>
52
+
53
+ <xs:element name="ui">
54
+ <xs:complexType>
55
+ <xs:attribute name="dialog" type="xs:string" />
56
+ <xs:attribute name="control" type="xs:string" />
57
+ <xs:attribute name="x" type="xs:int" />
58
+ <xs:attribute name="y" type="xs:int" />
59
+ <xs:attribute name="width" type="xs:int" />
60
+ <xs:attribute name="height" type="xs:int" />
61
+ <xs:attribute name="rightToLeft" type="xs:string" />
62
+ <xs:attribute name="rightAligned" type="xs:string" />
63
+ <xs:attribute name="leftScroll" type="xs:string" />
64
+ </xs:complexType>
65
+ </xs:element>
66
+</xs:schema>
src/WixToolset.Data/Data/Xsd/objects.xsd
new
+143
@@ -0,0 +1,143 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="http://wixtoolset.org/schemas/v4/wixobj"
7
+ xmlns="http://wixtoolset.org/schemas/v4/wixobj">
8
+ <xs:annotation>
9
+ <xs:documentation>
10
+ Schema for describing WiX Object files (.wixobj).
11
+ </xs:documentation>
12
+ </xs:annotation>
13
+
14
+ <xs:element name="wixObject">
15
+ <xs:complexType>
16
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
17
+ <xs:element ref="section" />
18
+ </xs:sequence>
19
+ <xs:attribute name="id" type="xs:string" use="required" />
20
+ <xs:attribute name="version" type="xs:string" use="required">
21
+ <xs:annotation>
22
+ <xs:documentation>Version of WiX used to create this object file.</xs:documentation>
23
+ </xs:annotation>
24
+ </xs:attribute>
25
+ </xs:complexType>
26
+ </xs:element>
27
+
28
+ <xs:element name="section">
29
+ <xs:complexType>
30
+ <xs:sequence>
31
+ <xs:element ref="table" minOccurs="0" maxOccurs="unbounded" />
32
+ </xs:sequence>
33
+ <xs:attribute name="id" type="xs:string">
34
+ <xs:annotation>
35
+ <xs:documentation>Identifier for section (optional for Fragments)</xs:documentation>
36
+ </xs:annotation>
37
+ </xs:attribute>
38
+ <xs:attribute name="type" type="SectionType" use="required">
39
+ <xs:annotation>
40
+ <xs:documentation>Type of section</xs:documentation>
41
+ </xs:annotation>
42
+ </xs:attribute>
43
+ <xs:attribute name="codepage" type="xs:integer" use="optional">
44
+ <xs:annotation>
45
+ <xs:documentation>Codepage for output file, only valid on entry sections.</xs:documentation>
46
+ </xs:annotation>
47
+ </xs:attribute>
48
+ </xs:complexType>
49
+ </xs:element>
50
+
51
+ <xs:element name="table">
52
+ <xs:complexType>
53
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
54
+ <xs:element ref="row" />
55
+ </xs:sequence>
56
+ <xs:attribute name="name" type="TableNameType" use="required">
57
+ <xs:annotation>
58
+ <xs:documentation>Name of table in Windows Installer database</xs:documentation>
59
+ </xs:annotation>
60
+ </xs:attribute>
61
+ <xs:attribute name="op">
62
+ <xs:simpleType>
63
+ <xs:restriction base="xs:string">
64
+ <xs:enumeration value="add" />
65
+ <xs:enumeration value="drop" />
66
+ </xs:restriction>
67
+ </xs:simpleType>
68
+ </xs:attribute>
69
+ </xs:complexType>
70
+ </xs:element>
71
+
72
+ <xs:element name="row">
73
+ <xs:annotation>
74
+ <xs:documentation>Row in a table</xs:documentation>
75
+ </xs:annotation>
76
+ <xs:complexType>
77
+ <xs:sequence maxOccurs="unbounded">
78
+ <xs:element ref="field" />
79
+ </xs:sequence>
80
+ <xs:attribute name="access">
81
+ <xs:simpleType>
82
+ <xs:restriction base="xs:string">
83
+ <xs:enumeration value="public" />
84
+ <xs:enumeration value="internal" />
85
+ <xs:enumeration value="protected" />
86
+ <xs:enumeration value="private" />
87
+ </xs:restriction>
88
+ </xs:simpleType>
89
+ </xs:attribute>
90
+ <xs:attribute name="op">
91
+ <xs:simpleType>
92
+ <xs:restriction base="xs:string">
93
+ <xs:enumeration value="add" />
94
+ <xs:enumeration value="delete" />
95
+ <xs:enumeration value="modify" />
96
+ </xs:restriction>
97
+ </xs:simpleType>
98
+ </xs:attribute>
99
+ <xs:attribute name="redundant" type="YesNoType" />
100
+ <xs:attribute name="sectionId" type="xs:string" />
101
+ <xs:attribute name="sourceLineNumber" type="xs:string" />
102
+ </xs:complexType>
103
+ </xs:element>
104
+
105
+ <xs:element name="field">
106
+ <xs:annotation>
107
+ <xs:documentation>Data for a particular field in a row.</xs:documentation>
108
+ </xs:annotation>
109
+ <xs:complexType mixed="true">
110
+ <xs:attribute name="cabinetFileId" type="xs:string" />
111
+ <xs:attribute name="modified" type="YesNoType" />
112
+ <xs:attribute name="previousData" type="xs:string" />
113
+ <xs:attribute name="unresolvedData" type="xs:string" />
114
+ <xs:attribute name="unresolvedPreviousData" type="xs:string" />
115
+ <xs:attribute name="previousCabinetFileId" type="xs:string" />
116
+ </xs:complexType>
117
+ </xs:element>
118
+
119
+ <xs:simpleType name="SectionType">
120
+ <xs:restriction base="xs:NMTOKEN">
121
+ <xs:enumeration value="bundle"/>
122
+ <xs:enumeration value="fragment" />
123
+ <xs:enumeration value="module" />
124
+ <xs:enumeration value="product" />
125
+ <xs:enumeration value="patchCreation" />
126
+ <xs:enumeration value="patch" />
127
+ </xs:restriction>
128
+ </xs:simpleType>
129
+
130
+ <xs:simpleType name="TableNameType">
131
+ <xs:restriction base="xs:string">
132
+ <xs:minLength value="1" />
133
+ <xs:maxLength value="62" />
134
+ </xs:restriction>
135
+ </xs:simpleType>
136
+
137
+ <xs:simpleType name="YesNoType">
138
+ <xs:restriction base="xs:NMTOKEN">
139
+ <xs:enumeration value="yes" />
140
+ <xs:enumeration value="no" />
141
+ </xs:restriction>
142
+ </xs:simpleType>
143
+</xs:schema>
src/WixToolset.Data/Data/Xsd/outputs.xsd
new
+66
@@ -0,0 +1,66 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="http://wixtoolset.org/schemas/v4/wixout"
7
+ xmlns="http://wixtoolset.org/schemas/v4/wixout"
8
+ xmlns:objs="http://wixtoolset.org/schemas/v4/wixobj"
9
+ xmlns:tbls="http://wixtoolset.org/schemas/v4/wi/tables">
10
+ <xs:annotation>
11
+ <xs:documentation>
12
+ Schema for describing WiX Output files (.wixout).
13
+ </xs:documentation>
14
+ </xs:annotation>
15
+
16
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
17
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" />
18
+
19
+ <xs:element name="wixOutput">
20
+ <xs:complexType>
21
+ <xs:sequence>
22
+ <xs:element ref="tbls:tableDefinitions" />
23
+ <xs:element ref="objs:table" maxOccurs="unbounded" />
24
+ <xs:element ref="subStorage" minOccurs="0" maxOccurs="unbounded" />
25
+ </xs:sequence>
26
+ <xs:attribute name="codepage" type="xs:unsignedInt">
27
+ <xs:annotation>
28
+ <xs:documentation>Codepage of the output.</xs:documentation>
29
+ </xs:annotation>
30
+ </xs:attribute>
31
+ <xs:attribute name="type" use="required">
32
+ <xs:annotation>
33
+ <xs:documentation>Type of the output.</xs:documentation>
34
+ </xs:annotation>
35
+ <xs:simpleType>
36
+ <xs:restriction base="xs:NMTOKEN">
37
+ <xs:enumeration value="Bundle" />
38
+ <xs:enumeration value="Module" />
39
+ <xs:enumeration value="Patch" />
40
+ <xs:enumeration value="PatchCreation" />
41
+ <xs:enumeration value="Product" />
42
+ <xs:enumeration value="Transform" />
43
+ </xs:restriction>
44
+ </xs:simpleType>
45
+ </xs:attribute>
46
+ <xs:attribute name="version" type="xs:string" use="required">
47
+ <xs:annotation>
48
+ <xs:documentation>Version of WiX used to create this output file.</xs:documentation>
49
+ </xs:annotation>
50
+ </xs:attribute>
51
+ </xs:complexType>
52
+ </xs:element>
53
+
54
+ <xs:element name="subStorage">
55
+ <xs:complexType>
56
+ <xs:sequence minOccurs="1" maxOccurs="1">
57
+ <xs:element ref="wixOutput" />
58
+ </xs:sequence>
59
+ <xs:attribute name="name" type="xs:string">
60
+ <xs:annotation>
61
+ <xs:documentation>Name of the substorage.</xs:documentation>
62
+ </xs:annotation>
63
+ </xs:attribute>
64
+ </xs:complexType>
65
+ </xs:element>
66
+</xs:schema>
src/WixToolset.Data/Data/Xsd/pdbs.xsd
new
+32
@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="http://wixtoolset.org/schemas/v4/wixpdb"
7
+ xmlns="http://wixtoolset.org/schemas/v4/wixpdb"
8
+ xmlns:outs="http://wixtoolset.org/schemas/v4/wixout">
9
+ <xs:annotation>
10
+ <xs:documentation>
11
+ Schema for describing WiX Pdb files (.wixpdb).
12
+ </xs:documentation>
13
+ </xs:annotation>
14
+
15
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wixobj" schemaLocation="objects.xsd" />
16
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wixout" schemaLocation="outputs.xsd" />
17
+ <xs:import namespace="http://wixtoolset.org/schemas/v4/wi/tables" schemaLocation="tables.xsd" />
18
+
19
+ <xs:element name="wixPdb">
20
+ <xs:complexType>
21
+ <xs:sequence>
22
+ <xs:element ref="outs:wixOutput" minOccurs="0" maxOccurs="unbounded" />
23
+ </xs:sequence>
24
+
25
+ <xs:attribute name="version" type="xs:string" use="required">
26
+ <xs:annotation>
27
+ <xs:documentation>Version of WiX used to create this pdb file</xs:documentation>
28
+ </xs:annotation>
29
+ </xs:attribute>
30
+ </xs:complexType>
31
+ </xs:element>
32
+</xs:schema>
src/WixToolset.Data/Data/Xsd/tables.xsd
new
+248
@@ -0,0 +1,248 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="http://wixtoolset.org/schemas/v4/wi/tables"
7
+ xmlns="http://wixtoolset.org/schemas/v4/wi/tables">
8
+ <xs:annotation>
9
+ <xs:documentation>
10
+ Schema for describing table definitions in Windows Installer.
11
+ </xs:documentation>
12
+ </xs:annotation>
13
+
14
+ <xs:element name="tableDefinitions">
15
+ <xs:complexType>
16
+ <xs:sequence maxOccurs="unbounded">
17
+ <xs:element ref="tableDefinition" />
18
+ </xs:sequence>
19
+ </xs:complexType>
20
+ </xs:element>
21
+
22
+ <xs:element name="tableDefinition">
23
+ <xs:complexType>
24
+ <xs:sequence maxOccurs="unbounded">
25
+ <xs:element ref="columnDefinition" />
26
+ </xs:sequence>
27
+ <xs:attribute name="createSymbols" type="TablesYesNoType">
28
+ <xs:annotation>
29
+ <xs:documentation>Boolean whether rows in this table create symbols</xs:documentation>
30
+ </xs:annotation>
31
+ </xs:attribute>
32
+ <xs:attribute name="name" type="NameType" use="required">
33
+ <xs:annotation>
34
+ <xs:documentation>Name of table in Windows Installer database</xs:documentation>
35
+ </xs:annotation>
36
+ </xs:attribute>
37
+ <xs:attribute name="unreal" type="TablesYesNoType">
38
+ <xs:annotation>
39
+ <xs:documentation>Specifies if table is virtual or not</xs:documentation>
40
+ </xs:annotation>
41
+ </xs:attribute>
42
+ <xs:attribute name="bootstrapperApplicationData" type="TablesYesNoType">
43
+ <xs:annotation>
44
+ <xs:documentation>Specifies if the table is a part of the Bootstrapper Application Data manifest</xs:documentation>
45
+ </xs:annotation>
46
+ </xs:attribute>
47
+ </xs:complexType>
48
+ </xs:element>
49
+
50
+ <xs:element name="columnDefinition">
51
+ <xs:complexType>
52
+ <xs:attribute name="name" type="NameType" use="required">
53
+ <xs:annotation>
54
+ <xs:documentation>Name of column in Windows Installer table</xs:documentation>
55
+ </xs:annotation>
56
+ </xs:attribute>
57
+
58
+ <xs:attribute name="added" type="TablesYesNoType">
59
+ <xs:annotation>
60
+ <xs:documentation>Whether this column was added by a transform.</xs:documentation>
61
+ </xs:annotation>
62
+ </xs:attribute>
63
+
64
+ <xs:attribute name="type" type="ColumnDefinitionType" use="required">
65
+ <xs:annotation>
66
+ <xs:documentation>Type of column in Windows Installer table</xs:documentation>
67
+ </xs:annotation>
68
+ </xs:attribute>
69
+
70
+ <xs:attribute name="length" use="required">
71
+ <xs:annotation>
72
+ <xs:documentation>Type of column in Windows Installer table</xs:documentation>
73
+ </xs:annotation>
74
+ <xs:simpleType>
75
+ <xs:restriction base="xs:integer">
76
+ <xs:minInclusive value="0" />
77
+ <xs:maxInclusive value="255" />
78
+ </xs:restriction>
79
+ </xs:simpleType>
80
+ </xs:attribute>
81
+
82
+ <xs:attribute name="primaryKey" type="TablesYesNoType">
83
+ <xs:annotation>
84
+ <xs:documentation>Boolean whether column is primary key of Windows Installer table</xs:documentation>
85
+ </xs:annotation>
86
+ </xs:attribute>
87
+
88
+ <xs:attribute name="nullable" type="TablesYesNoType">
89
+ <xs:annotation>
90
+ <xs:documentation>Boolean whether column is nullable in Windows Installer table</xs:documentation>
91
+ </xs:annotation>
92
+ </xs:attribute>
93
+
94
+ <xs:attribute name="unreal" type="TablesYesNoType">
95
+ <xs:annotation>
96
+ <xs:documentation>Boolean whether column is virtual in Windows Installer table</xs:documentation>
97
+ </xs:annotation>
98
+ </xs:attribute>
99
+
100
+ <xs:attribute name="modularize" type="TablesModularizeType">
101
+ <xs:annotation>
102
+ <xs:documentation>Enumeration specifying how column should have the ModuleId appended</xs:documentation>
103
+ </xs:annotation>
104
+ </xs:attribute>
105
+
106
+ <xs:attribute name="localizable" type="TablesYesNoType">
107
+ <xs:annotation>
108
+ <xs:documentation>Set to "yes" in order to allow substitution for localized variables.</xs:documentation>
109
+ </xs:annotation>
110
+ </xs:attribute>
111
+
112
+ <xs:attribute name="minValue" type="xs:long">
113
+ <xs:annotation>
114
+ <xs:documentation>Minimum value for column in Windows Installer table</xs:documentation>
115
+ </xs:annotation>
116
+ </xs:attribute>
117
+
118
+ <xs:attribute name="maxValue" type="xs:long">
119
+ <xs:annotation>
120
+ <xs:documentation>Maximum value for column in Windows Installer table</xs:documentation>
121
+ </xs:annotation>
122
+ </xs:attribute>
123
+
124
+ <xs:attribute name="keyTable" type="NameType">
125
+ <xs:annotation>
126
+ <xs:documentation>Foreign key table for column in Windows Installer table</xs:documentation>
127
+ </xs:annotation>
128
+ </xs:attribute>
129
+
130
+ <xs:attribute name="keyColumn">
131
+ <xs:annotation>
132
+ <xs:documentation>Maximum value for column in Windows Installer table</xs:documentation>
133
+ </xs:annotation>
134
+ <xs:simpleType>
135
+ <xs:restriction base="xs:integer">
136
+ <xs:minInclusive value="1" />
137
+ <xs:maxInclusive value="32" />
138
+ </xs:restriction>
139
+ </xs:simpleType>
140
+ </xs:attribute>
141
+
142
+ <xs:attribute name="category" type="TablesCategoryType">
143
+ <xs:annotation>
144
+ <xs:documentation>Specific column data types for column</xs:documentation>
145
+ </xs:annotation>
146
+ </xs:attribute>
147
+
148
+ <xs:attribute name="set" type="TablesSetType">
149
+ <xs:annotation>
150
+ <xs:documentation>List of permissible values for the column</xs:documentation>
151
+ </xs:annotation>
152
+ </xs:attribute>
153
+
154
+ <xs:attribute name="description" type="xs:string">
155
+ <xs:annotation>
156
+ <xs:documentation>Description of column</xs:documentation>
157
+ </xs:annotation>
158
+ </xs:attribute>
159
+
160
+ <xs:attribute name="escapeIdtCharacters" type="TablesYesNoType">
161
+ <xs:annotation>
162
+ <xs:documentation>Set to "yes" in order to make the idt exporter escape whitespace characters \r, \n, and \t.</xs:documentation>
163
+ </xs:annotation>
164
+ </xs:attribute>
165
+
166
+ <xs:attribute name="useCData" type="TablesYesNoType">
167
+ <xs:annotation>
168
+ <xs:documentation>Set to "yes" in order to make the Intermediate and Output objects wrap their data in a CDATA element to preserve whitespace.</xs:documentation>
169
+ </xs:annotation>
170
+ </xs:attribute>
171
+ </xs:complexType>
172
+ </xs:element>
173
+
174
+ <xs:simpleType name="NameType">
175
+ <xs:restriction base="xs:string">
176
+ <xs:minLength value="1" />
177
+ <xs:maxLength value="64" />
178
+ </xs:restriction>
179
+ </xs:simpleType>
180
+
181
+ <xs:simpleType name="ColumnDefinitionType">
182
+ <xs:restriction base="xs:NMTOKEN">
183
+ <xs:enumeration value="string" />
184
+ <xs:enumeration value="localized" />
185
+ <xs:enumeration value="number" />
186
+ <xs:enumeration value="object" />
187
+ <xs:enumeration value="preserved" />
188
+ </xs:restriction>
189
+ </xs:simpleType>
190
+
191
+ <xs:simpleType name="TablesYesNoType">
192
+ <xs:restriction base="xs:NMTOKEN">
193
+ <xs:enumeration value="yes" />
194
+ <xs:enumeration value="no" />
195
+ </xs:restriction>
196
+ </xs:simpleType>
197
+
198
+ <xs:simpleType name="TablesModularizeType">
199
+ <xs:restriction base="xs:NMTOKEN">
200
+ <xs:enumeration value="column" />
201
+ <xs:enumeration value="companionFile" />
202
+ <xs:enumeration value="condition" />
203
+ <xs:enumeration value="controlEventArgument" />
204
+ <xs:enumeration value="controlText" />
205
+ <xs:enumeration value="icon" />
206
+ <xs:enumeration value="none" />
207
+ <xs:enumeration value="property" />
208
+ <xs:enumeration value="semicolonDelimited" />
209
+ </xs:restriction>
210
+ </xs:simpleType>
211
+
212
+ <xs:simpleType name="TablesCategoryType">
213
+ <xs:restriction base="xs:NMTOKEN">
214
+ <xs:enumeration value="text" />
215
+ <xs:enumeration value="upperCase" />
216
+ <xs:enumeration value="lowerCase" />
217
+ <xs:enumeration value="integer" />
218
+ <xs:enumeration value="doubleInteger" />
219
+ <xs:enumeration value="timeDate" />
220
+ <xs:enumeration value="identifier" />
221
+ <xs:enumeration value="property" />
222
+ <xs:enumeration value="filename" />
223
+ <xs:enumeration value="wildCardFilename" />
224
+ <xs:enumeration value="path" />
225
+ <xs:enumeration value="paths" />
226
+ <xs:enumeration value="anyPath" />
227
+ <xs:enumeration value="defaultDir" />
228
+ <xs:enumeration value="regPath" />
229
+ <xs:enumeration value="formatted" />
230
+ <xs:enumeration value="formattedSddl" />
231
+ <xs:enumeration value="template" />
232
+ <xs:enumeration value="condition" />
233
+ <xs:enumeration value="guid" />
234
+ <xs:enumeration value="version" />
235
+ <xs:enumeration value="language" />
236
+ <xs:enumeration value="binary" />
237
+ <xs:enumeration value="customSource" />
238
+ <xs:enumeration value="cabinet" />
239
+ <xs:enumeration value="shortcut" />
240
+ </xs:restriction>
241
+ </xs:simpleType>
242
+
243
+ <xs:simpleType name="TablesSetType">
244
+ <xs:restriction base="xs:string">
245
+ <xs:pattern value="\w+(;\w+)*" />
246
+ </xs:restriction>
247
+ </xs:simpleType>
248
+</xs:schema>
src/WixToolset.Data/Data/actions.xml
new
+76
@@ -0,0 +1,76 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<actions xmlns="http://wixtoolset.org/schemas/v4/wi/actions">
6
+ <action name="InstallInitialize" sequence="1500" AdminExecuteSequence="yes" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
7
+ <action name="InstallExecute" condition="NOT Installed" sequence="6500" InstallExecuteSequence="yes" />
8
+ <action name="InstallExecuteAgain" condition="NOT Installed" sequence="6550" InstallExecuteSequence="yes" />
9
+ <action name="InstallFinalize" sequence="6600" AdminExecuteSequence="yes" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
10
+ <action name="InstallFiles" sequence="4000" AdminExecuteSequence="yes" InstallExecuteSequence="yes" />
11
+ <action name="InstallAdminPackage" sequence="3900" AdminExecuteSequence="yes" />
12
+ <action name="FileCost" sequence="900" AdminExecuteSequence="yes" AdminUISequence="yes" InstallExecuteSequence="yes" InstallUISequence="yes" />
13
+ <action name="CostInitialize" sequence="800" AdminExecuteSequence="yes" AdminUISequence="yes" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" InstallUISequence="yes" />
14
+ <action name="CostFinalize" sequence="1000" AdminExecuteSequence="yes" AdminUISequence="yes" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" InstallUISequence="yes" />
15
+ <action name="InstallValidate" sequence="1400" AdminExecuteSequence="yes" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
16
+ <action name="ExecuteAction" sequence="1300" AdminUISequence="yes" InstallUISequence="yes" />
17
+ <action name="CreateShortcuts" sequence="4500" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
18
+ <action name="MsiPublishAssemblies" sequence="6250" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
19
+ <action name="PublishComponents" sequence="6200" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
20
+ <action name="PublishFeatures" sequence="6300" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
21
+ <action name="PublishProduct" sequence="6400" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
22
+ <action name="RegisterClassInfo" sequence="4600" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
23
+ <action name="RegisterExtensionInfo" sequence="4700" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
24
+ <action name="RegisterMIMEInfo" sequence="4900" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
25
+ <action name="RegisterProgIdInfo" sequence="4800" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
26
+ <action name="AllocateRegistrySpace" condition="NOT Installed" sequence="1550" InstallExecuteSequence="yes" />
27
+ <action name="AppSearch" sequence="50" InstallExecuteSequence="yes" InstallUISequence="yes" />
28
+ <action name="BindImage" sequence="4300" InstallExecuteSequence="yes" />
29
+ <action name="CCPSearch" condition="NOT Installed" sequence="500" InstallExecuteSequence="yes" InstallUISequence="yes" />
30
+ <action name="CreateFolders" sequence="3700" InstallExecuteSequence="yes" />
31
+ <action name="DeleteServices" condition="VersionNT" sequence="2000" InstallExecuteSequence="yes" />
32
+ <action name="DuplicateFiles" sequence="4210" InstallExecuteSequence="yes" />
33
+ <action name="FindRelatedProducts" sequence="25" InstallExecuteSequence="yes" InstallUISequence="yes" />
34
+ <action name="InstallODBC" sequence="5400" InstallExecuteSequence="yes" />
35
+ <action name="InstallServices" condition="VersionNT" sequence="5800" InstallExecuteSequence="yes" />
36
+ <action name="MsiConfigureServices" condition="VersionNT>=600" sequence="5850" InstallExecuteSequence="yes" />
37
+ <action name="IsolateComponents" sequence="950" InstallExecuteSequence="yes" InstallUISequence="yes" />
38
+ <action name="LaunchConditions" sequence="100" AdminExecuteSequence="yes" AdminUISequence="yes" InstallExecuteSequence="yes" InstallUISequence="yes" />
39
+ <action name="MigrateFeatureStates" sequence="1200" InstallExecuteSequence="yes" InstallUISequence="yes" />
40
+ <action name="MoveFiles" sequence="3800" InstallExecuteSequence="yes" />
41
+ <action name="PatchFiles" sequence="4090" AdminExecuteSequence="yes" InstallExecuteSequence="yes" />
42
+ <action name="ProcessComponents" sequence="1600" InstallExecuteSequence="yes" />
43
+ <action name="RegisterComPlus" sequence="5700" InstallExecuteSequence="yes" />
44
+ <action name="RegisterFonts" sequence="5300" InstallExecuteSequence="yes" />
45
+ <action name="RegisterProduct" sequence="6100" InstallExecuteSequence="yes" />
46
+ <action name="RegisterTypeLibraries" sequence="5500" InstallExecuteSequence="yes" />
47
+ <action name="RegisterUser" sequence="6000" InstallExecuteSequence="yes" />
48
+ <action name="RemoveDuplicateFiles" sequence="3400" InstallExecuteSequence="yes" />
49
+ <action name="RemoveEnvironmentStrings" sequence="3300" InstallExecuteSequence="yes" />
50
+ <action name="RemoveFiles" sequence="3500" InstallExecuteSequence="yes" />
51
+ <action name="RemoveFolders" sequence="3600" InstallExecuteSequence="yes" />
52
+ <action name="RemoveIniValues" sequence="3100" InstallExecuteSequence="yes" />
53
+ <action name="RemoveODBC" sequence="2400" InstallExecuteSequence="yes" />
54
+ <action name="RemoveRegistryValues" sequence="2600" InstallExecuteSequence="yes" />
55
+ <action name="RemoveShortcuts" sequence="3200" InstallExecuteSequence="yes" />
56
+ <action name="RMCCPSearch" condition="NOT Installed" sequence="600" InstallExecuteSequence="yes" InstallUISequence="yes" />
57
+ <action name="SelfRegModules" sequence="5600" InstallExecuteSequence="yes" />
58
+ <action name="SelfUnregModules" sequence="2200" InstallExecuteSequence="yes" />
59
+ <action name="SetODBCFolders" sequence="1100" InstallExecuteSequence="yes" />
60
+ <action name="StartServices" condition="VersionNT" sequence="5900" InstallExecuteSequence="yes" />
61
+ <action name="StopServices" condition="VersionNT" sequence="1900" InstallExecuteSequence="yes" />
62
+ <action name="MsiUnpublishAssemblies" sequence="1750" InstallExecuteSequence="yes" />
63
+ <action name="UnpublishComponents" sequence="1700" InstallExecuteSequence="yes" />
64
+ <action name="UnpublishFeatures" sequence="1800" InstallExecuteSequence="yes" />
65
+ <action name="UnregisterClassInfo" sequence="2700" InstallExecuteSequence="yes" />
66
+ <action name="UnregisterComPlus" sequence="2100" InstallExecuteSequence="yes" />
67
+ <action name="UnregisterExtensionInfo" sequence="2800" InstallExecuteSequence="yes" />
68
+ <action name="UnregisterFonts" sequence="2500" InstallExecuteSequence="yes" />
69
+ <action name="UnregisterMIMEInfo" sequence="3000" InstallExecuteSequence="yes" />
70
+ <action name="UnregisterProgIdInfo" sequence="2900" InstallExecuteSequence="yes" />
71
+ <action name="UnregisterTypeLibraries" sequence="2300" InstallExecuteSequence="yes" />
72
+ <action name="ValidateProductID" sequence="700" InstallExecuteSequence="yes" InstallUISequence="yes" />
73
+ <action name="WriteEnvironmentStrings" sequence="5200" InstallExecuteSequence="yes" />
74
+ <action name="WriteIniValues" sequence="5100" InstallExecuteSequence="yes" />
75
+ <action name="WriteRegistryValues" sequence="5000" InstallExecuteSequence="yes" />
76
+</actions>
src/WixToolset.Data/Data/messages.xml
new
+95
@@ -0,0 +1,95 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<!-- 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. -->
3
+
4
+
5
+<Messages Namespace="WixToolset.Data" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
6
+ <Class Name="WixDataErrors" ContainerName="WixDataErrorEventArgs" BaseContainerName="MessageEventArgs" Level="Error">
7
+ <Message Id="UnexpectedFileFormat" Number="1" SourceLineNumbers="no">
8
+ <Instance>
9
+ Unexpected file format loaded from path: {0}. The file was expected to be a {1} but was actually: {2}. Ensure the correct path was provided.
10
+ <Parameter Type="System.String" Name="path" />
11
+ <Parameter Type="System.String" Name="expectedFormat" />
12
+ <Parameter Type="System.String" Name="actualFormat" />
13
+ </Instance>
14
+ </Message>
15
+ <Message Id="CorruptFileFormat" Number="2" SourceLineNumbers="no">
16
+ <Instance>
17
+ 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.
18
+ <Parameter Type="System.String" Name="path" />
19
+ <Parameter Type="System.String" Name="format" />
20
+ </Instance>
21
+ </Message>
22
+ <Message Id="DuplicateLocalizationIdentifier" Number="100">
23
+ <Instance>
24
+ The localization identifier '{0}' has been duplicated in multiple locations. Please resolve the conflict.
25
+ <Parameter Type="System.String" Name="localizationId" />
26
+ </Instance>
27
+ </Message>
28
+ <Message Id="FileNotFound" Number="103">
29
+ <Instance>
30
+ The system cannot find the file '{0}'.
31
+ <Parameter Type="System.String" Name="file" />
32
+ </Instance>
33
+ <Instance>
34
+ The system cannot find the file '{0}' with type '{1}'.
35
+ <Parameter Type="System.String" Name="file" />
36
+ <Parameter Type="System.String" Name="fileType" />
37
+ </Instance>
38
+ </Message>
39
+ <Message Id="DuplicatePrimaryKey" Number="130">
40
+ <Instance>
41
+ The primary key '{0}' is duplicated in table '{1}'. Please remove one of the entries or rename a part of the primary key to avoid the collision.
42
+ <Parameter Type="System.String" Name="primaryKey" />
43
+ <Parameter Type="System.String" Name="tableName" />
44
+ </Instance>
45
+ </Message>
46
+ <Message Id="InvalidIdt" Number="136">
47
+ <Instance>
48
+ There was an error importing the file '{0}'.
49
+ <Parameter Type="System.String" Name="idtFile" />
50
+ </Instance>
51
+ <Instance>
52
+ There was an error importing table '{1}' from file '{0}'.
53
+ <Parameter Type="System.String" Name="idtFile" />
54
+ <Parameter Type="System.String" Name="tableName" />
55
+ </Instance>
56
+ </Message>
57
+ <Message Id="VersionMismatch" Number="141">
58
+ <Instance>
59
+ The {0} file format version {1} is not compatible with the expected {0} file format version {2}.
60
+ <Parameter Type="System.String" Name="fileType" />
61
+ <Parameter Type="System.String" Name="version" />
62
+ <Parameter Type="System.String" Name="expectedVersion" />
63
+ </Instance>
64
+ </Message>
65
+ <Message Id="IllegalFileCompressionAttributes" Number="167">
66
+ <Instance>Cannot have both the MsidbFileAttributesCompressed and MsidbFileAttributesNoncompressed options set in a file attributes column.</Instance>
67
+ </Message>
68
+ <Message Id="MissingTableDefinition" Number="182" SourceLineNumbers="no">
69
+ <Instance>
70
+ Cannot find the table definitions for the '{0}' table. This is likely due to a typing error or missing extension. Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.
71
+ <Parameter Type="System.String" Name="tableName" />
72
+ </Instance>
73
+ </Message>
74
+ <Message Id="RealTableMissingPrimaryKeyColumn" Number="225">
75
+ <Instance>
76
+ The table '{0}' does not contain any primary key columns. At least one column must be marked as the primary key to ensure this table can be patched.
77
+ <Parameter Type="System.String" Name="tableName" />
78
+ </Instance>
79
+ </Message>
80
+ <Message Id="InvalidStringForCodepage" Number="311">
81
+ <Instance>
82
+ A string was provided with characters that are not available in the specified database code page '{0}'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Product/@Codepage, Module/@Codepage, Patch/@Codepage, PatchCreation/@Codepage, or WixLocalization/@Codepage.
83
+ <Parameter Type="System.String" Name="codepage" />
84
+ </Instance>
85
+ </Message>
86
+ <Message Id="TooManyColumnsInRealTable" Number="386" SourceLineNumbers="no">
87
+ <Instance>
88
+ The table '{0}' contains {1} columns which is not supported by Windows Installer. Windows Installer supports a maximum of {2} columns.
89
+ <Parameter Type="System.String" Name="tableName" />
90
+ <Parameter Type="System.Int32" Name="columnCount" />
91
+ <Parameter Type="System.Int32" Name="supportedColumnCount" />
92
+ </Instance>
93
+ </Message>
94
+ </Class>
95
+</Messages>
src/WixToolset.Data/Data/tables.xml
new
+1962
@@ -0,0 +1,1962 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<tableDefinitions xmlns="http://wixtoolset.org/schemas/v4/wi/tables">
6
+ <tableDefinition name="ActionText">
7
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes" modularize="column"
8
+ category="identifier" description="Name of action to be described."/>
9
+ <columnDefinition name="Description" type="localized" length="0" nullable="yes" escapeIdtCharacters="yes"
10
+ category="text" description="Localized description displayed in progress dialog and log when action is executing."/>
11
+ <columnDefinition name="Template" type="localized" length="0" nullable="yes" escapeIdtCharacters="yes" modularize="property"
12
+ category="template" description="Optional localized format template used to format action data records for display during action execution."/>
13
+ </tableDefinition>
14
+ <tableDefinition name="AdminExecuteSequence">
15
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"
16
+ category="identifier" description="Name of action to invoke, either in the engine or the handler DLL."/>
17
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
18
+ category="condition" description="Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData."/>
19
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
20
+ minValue="-4" maxValue="32767" description="Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action."/>
21
+ </tableDefinition>
22
+ <tableDefinition name="Condition">
23
+ <columnDefinition name="Feature_" type="string" length="38" primaryKey="yes"
24
+ keyTable="Feature" keyColumn="1" category="identifier" description="Reference to a Feature entry in Feature table."/>
25
+ <columnDefinition name="Level" type="number" length="2" primaryKey="yes"
26
+ minValue="0" maxValue="32767" description="New selection Level to set in Feature table if Condition evaluates to TRUE."/>
27
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
28
+ category="condition" description="Expression evaluated to determine if Level in the Feature table is to change."/>
29
+ </tableDefinition>
30
+ <tableDefinition name="AdminUISequence">
31
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"
32
+ category="identifier" description="Name of action to invoke, either in the engine or the handler DLL."/>
33
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
34
+ category="condition" description="Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData."/>
35
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
36
+ minValue="-4" maxValue="32767" description="Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action."/>
37
+ </tableDefinition>
38
+ <tableDefinition name="AdvtExecuteSequence">
39
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"
40
+ category="identifier" description="Name of action to invoke, either in the engine or the handler DLL."/>
41
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
42
+ category="condition" description="Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData."/>
43
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
44
+ minValue="-4" maxValue="32767" description="Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action."/>
45
+ </tableDefinition>
46
+ <tableDefinition name="AdvtUISequence">
47
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"
48
+ category="identifier" description="Name of action to invoke, either in the engine or the handler DLL."/>
49
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
50
+ category="condition" description="Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData."/>
51
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
52
+ minValue="-4" maxValue="32767" description="Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action."/>
53
+ </tableDefinition>
54
+ <tableDefinition name="AppId" createSymbols="yes">
55
+ <columnDefinition name="AppId" type="string" length="38" primaryKey="yes"
56
+ category="guid"/>
57
+ <columnDefinition name="RemoteServerName" type="string" length="255" nullable="yes" modularize="property"
58
+ category="formatted"/>
59
+ <columnDefinition name="LocalService" type="string" length="255" nullable="yes"
60
+ category="text"/>
61
+ <columnDefinition name="ServiceParameters" type="string" length="255" nullable="yes"
62
+ category="text"/>
63
+ <columnDefinition name="DllSurrogate" type="string" length="255" nullable="yes"
64
+ category="text"/>
65
+ <columnDefinition name="ActivateAtStorage" type="number" length="2" nullable="yes"
66
+ minValue="0" maxValue="1"/>
67
+ <columnDefinition name="RunAsInteractiveUser" type="number" length="2" nullable="yes"
68
+ minValue="0" maxValue="1"/>
69
+ </tableDefinition>
70
+ <tableDefinition name="AppSearch">
71
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
72
+ category="identifier" description="The property associated with a Signature"/>
73
+ <columnDefinition name="Signature_" type="string" length="72" primaryKey="yes" modularize="column"
74
+ keyTable="Signature;RegLocator;IniLocator;DrLocator;CompLocator" keyColumn="1" category="identifier" description="The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables."/>
75
+ </tableDefinition>
76
+ <tableDefinition name="Property" createSymbols="yes">
77
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
78
+ category="identifier" description="Name of property, uppercase if settable by launcher or loader."/>
79
+ <columnDefinition name="Value" type="localized" length="0" escapeIdtCharacters="yes"
80
+ category="text" description="String value for property. Never null or empty."/>
81
+ </tableDefinition>
82
+ <tableDefinition name="BBControl" createSymbols="yes">
83
+ <columnDefinition name="Billboard_" type="string" length="50" primaryKey="yes" modularize="column"
84
+ keyTable="Billboard" keyColumn="1" category="identifier" description="External key to the Billboard table, name of the billboard."/>
85
+ <columnDefinition name="BBControl" type="string" length="50" primaryKey="yes"
86
+ category="identifier" description="Name of the control. This name must be unique within a billboard, but can repeat on different billboard."/>
87
+ <columnDefinition name="Type" type="string" length="50"
88
+ category="identifier" description="The type of the control."/>
89
+ <columnDefinition name="X" type="number" length="2" localizable="yes"
90
+ minValue="0" maxValue="32767" description="Horizontal coordinate of the upper left corner of the bounding rectangle of the control."/>
91
+ <columnDefinition name="Y" type="number" length="2" localizable="yes"
92
+ minValue="0" maxValue="32767" description="Vertical coordinate of the upper left corner of the bounding rectangle of the control."/>
93
+ <columnDefinition name="Width" type="number" length="2" localizable="yes"
94
+ minValue="0" maxValue="32767" description="Width of the bounding rectangle of the control."/>
95
+ <columnDefinition name="Height" type="number" length="2" localizable="yes"
96
+ minValue="0" maxValue="32767" description="Height of the bounding rectangle of the control."/>
97
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes"
98
+ minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to this control."/>
99
+ <columnDefinition name="Text" type="localized" length="50" nullable="yes" escapeIdtCharacters="yes"
100
+ category="text" description="A string used to set the initial text contained within a control (if appropriate)."/>
101
+ </tableDefinition>
102
+ <tableDefinition name="Billboard" createSymbols="yes">
103
+ <columnDefinition name="Billboard" type="string" length="50" primaryKey="yes" modularize="column"
104
+ category="identifier" description="Name of the billboard."/>
105
+ <columnDefinition name="Feature_" type="string" length="38"
106
+ keyTable="Feature" keyColumn="1" category="identifier" description="An external key to the Feature Table. The billboard is shown only if this feature is being installed."/>
107
+ <columnDefinition name="Action" type="string" length="50" nullable="yes"
108
+ category="identifier" description="The name of an action. The billboard is displayed during the progress messages received from this action."/>
109
+ <columnDefinition name="Ordering" type="number" length="2" nullable="yes"
110
+ minValue="0" maxValue="32767" description="A positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column."/>
111
+ </tableDefinition>
112
+ <tableDefinition name="Feature" createSymbols="yes">
113
+ <columnDefinition name="Feature" type="string" length="38" primaryKey="yes"
114
+ category="identifier" description="Primary key used to identify a particular feature record."/>
115
+ <columnDefinition name="Feature_Parent" type="string" length="38" nullable="yes"
116
+ keyTable="Feature" keyColumn="1" category="identifier" description="Optional key of a parent record in the same table. If the parent is not selected, then the record will not be installed. Null indicates a root item."/>
117
+ <columnDefinition name="Title" type="localized" length="64" nullable="yes" escapeIdtCharacters="yes"
118
+ category="text" description="Short text identifying a visible feature item."/>
119
+ <columnDefinition name="Description" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes"
120
+ category="text" description="Longer descriptive text describing a visible feature item."/>
121
+ <columnDefinition name="Display" type="number" length="2" nullable="yes"
122
+ minValue="0" maxValue="32767" description="Numeric sort order, used to force a specific display ordering."/>
123
+ <columnDefinition name="Level" type="number" length="2"
124
+ minValue="0" maxValue="32767" description="The install level at which record will be initially selected. An install level of 0 will disable an item and prevent its display."/>
125
+ <columnDefinition name="Directory_" type="string" length="72" nullable="yes" modularize="column"
126
+ keyTable="Directory" keyColumn="1" category="upperCase" description="The name of the Directory that can be configured by the UI. A non-null value will enable the browse button."/>
127
+ <columnDefinition name="Attributes" type="number" length="2"
128
+ set="0;1;2;4;5;6;8;9;10;16;17;18;20;21;22;24;25;26;32;33;34;36;37;38;48;49;50;52;53;54" description="Feature attributes"/>
129
+ </tableDefinition>
130
+ <tableDefinition name="Binary" createSymbols="yes">
131
+ <columnDefinition name="Name" type="string" length="72" primaryKey="yes" modularize="column"
132
+ category="identifier" description="Unique key identifying the binary data."/>
133
+ <columnDefinition name="Data" type="object" length="0"
134
+ category="binary" description="The unformatted binary data."/>
135
+ </tableDefinition>
136
+ <tableDefinition name="BindImage">
137
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
138
+ keyTable="File" keyColumn="1" category="identifier" description="The index into the File table. This must be an executable file."/>
139
+ <columnDefinition name="Path" type="string" length="255" nullable="yes" modularize="property"
140
+ category="paths" description="A list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] ."/>
141
+ </tableDefinition>
142
+ <tableDefinition name="File" createSymbols="yes">
143
+ <columnDefinition name="File" type="string" length="72" primaryKey="yes" modularize="column"
144
+ category="identifier" description="Primary key, non-localized token, must match identifier in cabinet. For uncompressed files, this field is ignored."/>
145
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
146
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the file."/>
147
+ <columnDefinition name="FileName" type="localized" length="255"
148
+ category="filename" description="File name used for installation, may be localized. This may contain a "short name|long name" pair."/>
149
+ <columnDefinition name="FileSize" type="number" length="4"
150
+ minValue="0" maxValue="2147483647" description="Size of file in bytes (long integer)."/>
151
+ <columnDefinition name="Version" type="string" length="72" nullable="yes" modularize="companionFile"
152
+ keyTable="File" keyColumn="1" category="version" description="Version string for versioned files; Blank for unversioned files."/>
153
+ <columnDefinition name="Language" type="string" length="20" nullable="yes"
154
+ category="language" description="List of decimal language Ids, comma-separated if more than one."/>
155
+ <columnDefinition name="Attributes" type="number" length="2" nullable="yes"
156
+ minValue="0" maxValue="32767" description="Integer containing bit flags representing file attributes (with the decimal value of each bit position in parentheses)"/>
157
+ <columnDefinition name="Sequence" type="number" length="4"
158
+ minValue="1" maxValue="2147483647" description="Sequence with respect to the media images; order must track cabinet order."/>
159
+ </tableDefinition>
160
+ <tableDefinition name="CCPSearch">
161
+ <columnDefinition name="Signature_" type="string" length="72" primaryKey="yes"
162
+ keyTable="Signature;RegLocator;IniLocator;DrLocator;CompLocator" keyColumn="1" category="identifier" description="The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables."/>
163
+ </tableDefinition>
164
+ <tableDefinition name="CheckBox" createSymbols="yes">
165
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
166
+ category="identifier" description="A named property to be tied to the item."/>
167
+ <columnDefinition name="Value" type="string" length="64" nullable="yes" modularize="property"
168
+ category="formatted" description="The value string associated with the item."/>
169
+ </tableDefinition>
170
+ <tableDefinition name="Class" createSymbols="yes">
171
+ <columnDefinition name="CLSID" type="string" length="38" primaryKey="yes"
172
+ category="guid" description="The CLSID of an OLE factory."/>
173
+ <columnDefinition name="Context" type="string" length="32" primaryKey="yes"
174
+ category="identifier" description="The numeric server context for this server. CLSCTX_xxxx"/>
175
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
176
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent."/>
177
+ <columnDefinition name="ProgId_Default" type="string" length="255" nullable="yes"
178
+ keyTable="ProgId" keyColumn="1" category="text" description="Optional ProgId associated with this CLSID."/>
179
+ <columnDefinition name="Description" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes"
180
+ category="text" description="Localized description for the Class."/>
181
+ <columnDefinition name="AppId_" type="string" length="38" nullable="yes"
182
+ keyTable="AppId" keyColumn="1" category="guid" description="Optional AppID containing DCOM information for associated application (string GUID)."/>
183
+ <columnDefinition name="FileTypeMask" type="string" length="255" nullable="yes"
184
+ category="text" description="Optional string containing information for the HKCRthis CLSID) key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2..."/>
185
+ <columnDefinition name="Icon_" type="string" length="72" nullable="yes" modularize="icon"
186
+ keyTable="Icon" keyColumn="1" category="identifier" description="Optional foreign key into the Icon Table, specifying the icon file associated with this CLSID. Will be written under the DefaultIcon key."/>
187
+ <columnDefinition name="IconIndex" type="number" length="2" nullable="yes"
188
+ minValue="-32767" maxValue="32767" description="Optional icon index."/>
189
+ <columnDefinition name="DefInprocHandler" type="string" length="32" nullable="yes"
190
+ category="filename" set="1;2;3" description="Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll""/>
191
+ <columnDefinition name="Argument" type="string" length="255" nullable="yes"
192
+ category="formatted" description="optional argument for LocalServers."/>
193
+ <columnDefinition name="Feature_" type="string" length="38"
194
+ keyTable="Feature" keyColumn="1" category="identifier" description="Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational."/>
195
+ <columnDefinition name="Attributes" type="number" length="2" nullable="yes"
196
+ maxValue="32767" description="Class registration attributes."/>
197
+ </tableDefinition>
198
+ <tableDefinition name="Component" createSymbols="yes">
199
+ <columnDefinition name="Component" type="string" length="72" primaryKey="yes" modularize="column"
200
+ category="identifier" description="Primary key used to identify a particular component record."/>
201
+ <columnDefinition name="ComponentId" type="string" length="38" nullable="yes"
202
+ category="guid" description="A string GUID unique to this component, version, and language."/>
203
+ <columnDefinition name="Directory_" type="string" length="72" modularize="column"
204
+ keyTable="Directory" keyColumn="1" category="identifier" description="Required key of a Directory table record. This is actually a property name whose value contains the actual path, set either by the AppSearch action or with the default setting obtained from the Directory table."/>
205
+ <columnDefinition name="Attributes" type="number" length="2"
206
+ description="Remote execution option, one of irsEnum"/>
207
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
208
+ category="condition" description="A conditional statement that will disable this component if the specified condition evaluates to the 'True' state. If a component is disabled, it will not be installed, regardless of the 'Action' state associated with the component."/>
209
+ <columnDefinition name="KeyPath" type="string" length="72" nullable="yes" modularize="column"
210
+ keyTable="File;Registry;ODBCDataSource" keyColumn="1" category="identifier" description="Either the primary key into the File table, Registry table, or ODBCDataSource table. This extract path is stored when the component is installed, and is used to detect the presence of the component and to return the path to it."/>
211
+ </tableDefinition>
212
+ <tableDefinition name="Icon" createSymbols="yes">
213
+ <columnDefinition name="Name" type="string" length="72" primaryKey="yes" modularize="icon"
214
+ category="identifier" description="Primary key. Name of the icon file."/>
215
+ <columnDefinition name="Data" type="object" length="0"
216
+ category="binary" description="Binary stream. The binary icon data in PE (.DLL or .EXE) or icon (.ICO) format."/>
217
+ </tableDefinition>
218
+ <tableDefinition name="ProgId">
219
+ <columnDefinition name="ProgId" type="string" length="255" primaryKey="yes"
220
+ category="text" description="The Program Identifier. Primary key."/>
221
+ <columnDefinition name="ProgId_Parent" type="string" length="255" nullable="yes"
222
+ keyTable="ProgId" keyColumn="1" category="text" description="The Parent Program Identifier. If specified, the ProgId column becomes a version independent prog id."/>
223
+ <columnDefinition name="Class_" type="string" length="38" nullable="yes"
224
+ keyTable="Class" keyColumn="1" category="guid" description="The CLSID of an OLE factory corresponding to the ProgId."/>
225
+ <columnDefinition name="Description" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes"
226
+ category="text" description="Localized description for the Program identifier."/>
227
+ <columnDefinition name="Icon_" type="string" length="72" nullable="yes" modularize="icon"
228
+ keyTable="Icon" keyColumn="1" category="identifier" description="Optional foreign key into the Icon Table, specifying the icon file associated with this ProgId. Will be written under the DefaultIcon key."/>
229
+ <columnDefinition name="IconIndex" type="number" length="2" nullable="yes"
230
+ minValue="-32767" maxValue="32767" description="Optional icon index."/>
231
+ </tableDefinition>
232
+ <tableDefinition name="ComboBox">
233
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
234
+ category="identifier" description="A named property to be tied to this item. All the items tied to the same property become part of the same combobox."/>
235
+ <columnDefinition name="Order" type="number" length="2" primaryKey="yes"
236
+ minValue="1" maxValue="32767" description="A positive integer used to determine the ordering of the items within one list. The integers do not have to be consecutive."/>
237
+ <columnDefinition name="Value" type="string" length="64" modularize="property" localizable="yes"
238
+ category="formatted" description="The value string associated with this item. Selecting the line will set the associated property to this value."/>
239
+ <columnDefinition name="Text" type="localized" length="64" nullable="yes" modularize="property" escapeIdtCharacters="yes"
240
+ category="formatted" description="The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value."/>
241
+ </tableDefinition>
242
+ <tableDefinition name="CompLocator">
243
+ <columnDefinition name="Signature_" type="string" length="72" primaryKey="yes" modularize="column"
244
+ category="identifier" description="The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table."/>
245
+ <columnDefinition name="ComponentId" type="string" length="38"
246
+ category="guid" description="A string GUID unique to this component, version, and language."/>
247
+ <columnDefinition name="Type" type="number" length="2" nullable="yes"
248
+ minValue="0" maxValue="1" description="A boolean value that determines if the registry value is a filename or a directory location."/>
249
+ </tableDefinition>
250
+ <tableDefinition name="Complus">
251
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
252
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the ComPlus component."/>
253
+ <columnDefinition name="ExpType" type="number" length="2" nullable="yes"
254
+ minValue="0" maxValue="32767" description="ComPlus component attributes."/>
255
+ </tableDefinition>
256
+ <tableDefinition name="Directory" createSymbols="yes">
257
+ <columnDefinition name="Directory" type="string" length="72" primaryKey="yes" modularize="column"
258
+ category="identifier" description="Unique identifier for directory entry, primary key. If a property by this name is defined, it contains the full path to the directory."/>
259
+ <columnDefinition name="Directory_Parent" type="string" length="72" nullable="yes" modularize="column"
260
+ keyTable="Directory" keyColumn="1" category="identifier" description="Reference to the entry in this table specifying the default parent directory. A record parented to itself or with a Null parent represents a root of the install tree."/>
261
+ <columnDefinition name="DefaultDir" type="localized" length="255"
262
+ category="defaultDir" description="The default sub-path under parent's path."/>
263
+ </tableDefinition>
264
+ <tableDefinition name="Control">
265
+ <columnDefinition name="Dialog_" type="string" length="72" primaryKey="yes" modularize="column"
266
+ keyTable="Dialog" keyColumn="1" category="identifier" description="External key to the Dialog table, name of the dialog."/>
267
+ <columnDefinition name="Control" type="string" length="50" primaryKey="yes"
268
+ category="identifier" description="Name of the control. This name must be unique within a dialog, but can repeat on different dialogs. "/>
269
+ <columnDefinition name="Type" type="string" length="20"
270
+ category="identifier" description="The type of the control."/>
271
+ <columnDefinition name="X" type="number" length="2" localizable="yes"
272
+ minValue="0" maxValue="32767" description="Horizontal coordinate of the upper left corner of the bounding rectangle of the control."/>
273
+ <columnDefinition name="Y" type="number" length="2" localizable="yes"
274
+ minValue="0" maxValue="32767" description="Vertical coordinate of the upper left corner of the bounding rectangle of the control."/>
275
+ <columnDefinition name="Width" type="number" length="2" localizable="yes"
276
+ minValue="0" maxValue="32767" description="Width of the bounding rectangle of the control."/>
277
+ <columnDefinition name="Height" type="number" length="2" localizable="yes"
278
+ minValue="0" maxValue="32767" description="Height of the bounding rectangle of the control."/>
279
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes"
280
+ minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to this control."/>
281
+ <columnDefinition name="Property" type="string" length="72" nullable="yes" modularize="column"
282
+ category="identifier" description="The name of a defined property to be linked to this control. "/>
283
+ <columnDefinition name="Text" type="localized" length="0" nullable="yes" modularize="controlText" escapeIdtCharacters="yes"
284
+ category="formatted" description="A string used to set the initial text contained within a control (if appropriate)."/>
285
+ <columnDefinition name="Control_Next" type="string" length="50" nullable="yes"
286
+ keyTable="Control" keyColumn="2" category="identifier" description="The name of an other control on the same dialog. This link defines the tab order of the controls. The links have to form one or more cycles!"/>
287
+ <columnDefinition name="Help" type="localized" length="50" nullable="yes" escapeIdtCharacters="yes"
288
+ category="text" description="The help strings used with the button. The text is optional. "/>
289
+ </tableDefinition>
290
+ <tableDefinition name="Dialog" createSymbols="yes">
291
+ <columnDefinition name="Dialog" type="string" length="72" primaryKey="yes" modularize="column"
292
+ category="identifier" description="Name of the dialog."/>
293
+ <columnDefinition name="HCentering" type="number" length="2"
294
+ minValue="0" maxValue="100" description="Horizontal position of the dialog on a 0-100 scale. 0 means left end, 100 means right end of the screen, 50 center."/>
295
+ <columnDefinition name="VCentering" type="number" length="2"
296
+ minValue="0" maxValue="100" description="Vertical position of the dialog on a 0-100 scale. 0 means top end, 100 means bottom end of the screen, 50 center."/>
297
+ <columnDefinition name="Width" type="number" length="2"
298
+ minValue="0" maxValue="32767" description="Width of the bounding rectangle of the dialog."/>
299
+ <columnDefinition name="Height" type="number" length="2"
300
+ minValue="0" maxValue="32767" description="Height of the bounding rectangle of the dialog."/>
301
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes"
302
+ minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to this dialog."/>
303
+ <columnDefinition name="Title" type="localized" length="128" nullable="yes" modularize="property" escapeIdtCharacters="yes"
304
+ category="formatted" description="A text string specifying the title to be displayed in the title bar of the dialog's window."/>
305
+ <columnDefinition name="Control_First" type="string" length="50"
306
+ keyTable="Control" keyColumn="2" category="identifier" description="Defines the control that has the focus when the dialog is created."/>
307
+ <columnDefinition name="Control_Default" type="string" length="50" nullable="yes"
308
+ keyTable="Control" keyColumn="2" category="identifier" description="Defines the default control. Hitting return is equivalent to pushing this button."/>
309
+ <columnDefinition name="Control_Cancel" type="string" length="50" nullable="yes"
310
+ keyTable="Control" keyColumn="2" category="identifier" description="Defines the cancel control. Hitting escape or clicking on the close icon on the dialog is equivalent to pushing this button."/>
311
+ </tableDefinition>
312
+ <tableDefinition name="ControlCondition">
313
+ <columnDefinition name="Dialog_" type="string" length="72" primaryKey="yes" modularize="column"
314
+ keyTable="Dialog" keyColumn="1" category="identifier" description="A foreign key to the Dialog table, name of the dialog."/>
315
+ <columnDefinition name="Control_" type="string" length="50" primaryKey="yes"
316
+ keyTable="Control" keyColumn="2" category="identifier" description="A foreign key to the Control table, name of the control."/>
317
+ <columnDefinition name="Action" type="string" length="50" primaryKey="yes"
318
+ set="Default;Disable;Enable;Hide;Show" description="The desired action to be taken on the specified control."/>
319
+ <columnDefinition name="Condition" type="string" length="255" primaryKey="yes" modularize="condition" localizable="yes"
320
+ category="condition" description="A standard conditional statement that specifies under which conditions the action should be triggered."/>
321
+ </tableDefinition>
322
+ <tableDefinition name="ControlEvent" createSymbols="yes">
323
+ <columnDefinition name="Dialog_" type="string" length="72" primaryKey="yes" modularize="column"
324
+ keyTable="Dialog" keyColumn="1" category="identifier" description="A foreign key to the Dialog table, name of the dialog."/>
325
+ <columnDefinition name="Control_" type="string" length="50" primaryKey="yes"
326
+ keyTable="Control" keyColumn="2" category="identifier" description="A foreign key to the Control table, name of the control"/>
327
+ <columnDefinition name="Event" type="string" length="50" primaryKey="yes" modularize="property"
328
+ category="formatted" description="An identifier that specifies the type of the event that should take place when the user interacts with control specified by the first two entries."/>
329
+ <columnDefinition name="Argument" type="string" length="255" primaryKey="yes" modularize="controlEventArgument" localizable="yes"
330
+ category="formatted" description="A value to be used as a modifier when triggering a particular event."/>
331
+ <columnDefinition name="Condition" type="string" length="255" primaryKey="yes" nullable="yes" modularize="condition" localizable="yes"
332
+ category="condition" description="A standard conditional statement that specifies under which conditions an event should be triggered."/>
333
+ <columnDefinition name="Ordering" type="number" length="2" nullable="yes"
334
+ minValue="0" maxValue="2147483647" description="An integer used to order several events tied to the same control. Can be left blank."/>
335
+ </tableDefinition>
336
+ <tableDefinition name="CreateFolder">
337
+ <columnDefinition name="Directory_" type="string" length="72" primaryKey="yes" modularize="column"
338
+ keyTable="Directory" keyColumn="1" category="identifier" description="Primary key, could be foreign key into the Directory table."/>
339
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
340
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table."/>
341
+ </tableDefinition>
342
+ <tableDefinition name="CustomAction" createSymbols="yes">
343
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes" modularize="column"
344
+ category="identifier" description="Primary key, name of action, normally appears in sequence table unless private use."/>
345
+ <columnDefinition name="Type" type="number" length="2"
346
+ minValue="1" maxValue="32767" description="The numeric custom action type, consisting of source location, code type, entry, option flags."/>
347
+ <columnDefinition name="Source" type="string" length="72" nullable="yes" modularize="column"
348
+ category="customSource" description="The table reference of the source of the code."/>
349
+ <columnDefinition name="Target" type="string" length="255" nullable="yes" modularize="property" escapeIdtCharacters="yes" localizable="yes"
350
+ category="formatted" description="Excecution parameter, depends on the type of custom action"/>
351
+ <columnDefinition name="ExtendedType" type="number" length="4" nullable="yes" minValue="0" maxValue="2147483647"
352
+ description="A numeric custom action type that extends code type or option flags of the Type column."/>
353
+ </tableDefinition>
354
+ <tableDefinition name="DrLocator" createSymbols="yes">
355
+ <columnDefinition name="Signature_" type="string" length="72" primaryKey="yes" modularize="column"
356
+ category="identifier" description="The Signature_ represents a unique file signature and is also the foreign key in the Signature table."/>
357
+ <columnDefinition name="Parent" type="string" length="72" primaryKey="yes" nullable="yes" modularize="column"
358
+ category="identifier" description="The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path."/>
359
+ <columnDefinition name="Path" type="string" length="255" primaryKey="yes" nullable="yes" modularize="property"
360
+ category="anyPath" description="The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded."/>
361
+ <columnDefinition name="Depth" type="number" length="2" nullable="yes"
362
+ minValue="0" maxValue="32767" description="The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0."/>
363
+ </tableDefinition>
364
+ <tableDefinition name="DuplicateFile">
365
+ <columnDefinition name="FileKey" type="string" length="72" primaryKey="yes" modularize="column"
366
+ category="identifier" description="Primary key used to identify a particular file entry"/>
367
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
368
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the duplicate file."/>
369
+ <columnDefinition name="File_" type="string" length="72" modularize="column"
370
+ keyTable="File" keyColumn="1" category="identifier" description="Foreign key referencing the source file to be duplicated."/>
371
+ <columnDefinition name="DestName" type="localized" length="255" nullable="yes"
372
+ category="filename" description="Filename to be given to the duplicate file."/>
373
+ <columnDefinition name="DestFolder" type="string" length="72" nullable="yes" modularize="column"
374
+ category="identifier" description="Name of a property whose value is assumed to resolve to the full pathname to a destination folder."/>
375
+ </tableDefinition>
376
+ <tableDefinition name="Environment">
377
+ <columnDefinition name="Environment" type="string" length="72" primaryKey="yes" modularize="column"
378
+ category="identifier" description="Unique identifier for the environmental variable setting"/>
379
+ <columnDefinition name="Name" type="localized" length="255"
380
+ category="text" description="The name of the environmental value."/>
381
+ <columnDefinition name="Value" type="localized" length="255" nullable="yes" modularize="property"
382
+ category="formatted" description="The value to set in the environmental settings."/>
383
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
384
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the installing of the environmental value."/>
385
+ </tableDefinition>
386
+ <tableDefinition name="Error" createSymbols="yes">
387
+ <columnDefinition name="Error" type="number" length="2" primaryKey="yes"
388
+ minValue="0" maxValue="32767" description="Integer error number, obtained from header file IError(...) macros."/>
389
+ <columnDefinition name="Message" type="localized" length="0" nullable="yes" escapeIdtCharacters="yes" useCData="yes" modularize="property"
390
+ category="template" description="Error formatting template, obtained from user ed. or localizers."/>
391
+ </tableDefinition>
392
+ <tableDefinition name="EventMapping">
393
+ <columnDefinition name="Dialog_" type="string" length="72" primaryKey="yes" modularize="column"
394
+ keyTable="Dialog" keyColumn="1" category="identifier" description="A foreign key to the Dialog table, name of the Dialog."/>
395
+ <columnDefinition name="Control_" type="string" length="50" primaryKey="yes"
396
+ keyTable="Control" keyColumn="2" category="identifier" description="A foreign key to the Control table, name of the control."/>
397
+ <columnDefinition name="Event" type="string" length="50" primaryKey="yes"
398
+ category="identifier" description="An identifier that specifies the type of the event that the control subscribes to."/>
399
+ <columnDefinition name="Attribute" type="string" length="50"
400
+ category="identifier" description="The name of the control attribute, that is set when this event is received."/>
401
+ </tableDefinition>
402
+ <tableDefinition name="Extension">
403
+ <columnDefinition name="Extension" type="string" length="255" primaryKey="yes"
404
+ category="text" description="The extension associated with the table row."/>
405
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
406
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent."/>
407
+ <columnDefinition name="ProgId_" type="string" length="255" nullable="yes"
408
+ keyTable="ProgId" keyColumn="1" category="text" description="Optional ProgId associated with this extension."/>
409
+ <columnDefinition name="MIME_" type="string" length="64" nullable="yes"
410
+ keyTable="MIME" keyColumn="1" category="text" description="Optional Context identifier, typically "type/format" associated with the extension"/>
411
+ <columnDefinition name="Feature_" type="string" length="38"
412
+ keyTable="Feature" keyColumn="1" category="identifier" description="Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational."/>
413
+ </tableDefinition>
414
+ <tableDefinition name="MIME">
415
+ <columnDefinition name="ContentType" type="string" length="64" primaryKey="yes"
416
+ category="text" description="Primary key. Context identifier, typically "type/format"."/>
417
+ <columnDefinition name="Extension_" type="string" length="255"
418
+ keyTable="Extension" keyColumn="1" category="text" description="Optional associated extension (without dot)"/>
419
+ <columnDefinition name="CLSID" type="string" length="38" nullable="yes"
420
+ category="guid" description="Optional associated CLSID."/>
421
+ </tableDefinition>
422
+ <tableDefinition name="FeatureComponents">
423
+ <columnDefinition name="Feature_" type="string" length="38" primaryKey="yes"
424
+ keyTable="Feature" keyColumn="1" category="identifier" description="Foreign key into Feature table."/>
425
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
426
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into Component table."/>
427
+ </tableDefinition>
428
+ <tableDefinition name="FileSFPCatalog">
429
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
430
+ keyTable="File" keyColumn="1" category="identifier" description="File associated with the catalog"/>
431
+ <columnDefinition name="SFPCatalog_" type="string" length="255" primaryKey="yes"
432
+ keyTable="SFPCatalog" keyColumn="1" category="filename" description="Catalog associated with the file"/>
433
+ </tableDefinition>
434
+ <tableDefinition name="SFPCatalog">
435
+ <columnDefinition name="SFPCatalog" type="string" length="255" primaryKey="yes"
436
+ category="filename" description="File name for the catalog."/>
437
+ <columnDefinition name="Catalog" type="object" length="0"
438
+ category="binary" description="SFP Catalog"/>
439
+ <columnDefinition name="Dependency" type="string" length="0" nullable="yes" modularize="property"
440
+ category="formatted" description="Parent catalog - only used by SFP"/>
441
+ </tableDefinition>
442
+ <tableDefinition name="Font">
443
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
444
+ keyTable="File" keyColumn="1" category="identifier" description="Primary key, foreign key into File table referencing font file."/>
445
+ <columnDefinition name="FontTitle" type="string" length="128" nullable="yes"
446
+ category="text" description="Font name."/>
447
+ </tableDefinition>
448
+ <tableDefinition name="IniFile">
449
+ <columnDefinition name="IniFile" type="string" length="72" primaryKey="yes" modularize="column"
450
+ category="identifier" description="Primary key, non-localized token."/>
451
+ <columnDefinition name="FileName" type="localized" length="255"
452
+ category="filename" description="The .INI file name in which to write the information"/>
453
+ <columnDefinition name="DirProperty" type="string" length="72" nullable="yes" modularize="column"
454
+ category="identifier" description="Foreign key into the Directory table denoting the directory where the .INI file is."/>
455
+ <columnDefinition name="Section" type="localized" length="96" modularize="property"
456
+ category="formatted" description="The .INI file Section."/>
457
+ <columnDefinition name="Key" type="localized" length="128" modularize="property"
458
+ category="formatted" description="The .INI file key below Section."/>
459
+ <columnDefinition name="Value" type="localized" length="255" modularize="property" escapeIdtCharacters="yes"
460
+ category="formatted" description="The value to be written."/>
461
+ <columnDefinition name="Action" type="number" length="2"
462
+ set="0;1;3" description="The type of modification to be made, one of iifEnum"/>
463
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
464
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the installing of the .INI value."/>
465
+ </tableDefinition>
466
+ <tableDefinition name="IniLocator">
467
+ <columnDefinition name="Signature_" type="string" length="72" primaryKey="yes" modularize="column"
468
+ category="identifier" description="The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table."/>
469
+ <columnDefinition name="FileName" type="string" length="255"
470
+ category="filename" description="The .INI file name."/>
471
+ <columnDefinition name="Section" type="string" length="96"
472
+ category="text" description="Section name within in file (within square brackets in INI file)."/>
473
+ <columnDefinition name="Key" type="string" length="128"
474
+ category="text" description="Key value (followed by an equals sign in INI file)."/>
475
+ <columnDefinition name="Field" type="number" length="2" nullable="yes"
476
+ minValue="0" maxValue="32767" description="The field in the .INI line. If Field is null or 0 the entire line is read."/>
477
+ <columnDefinition name="Type" type="number" length="2" nullable="yes"
478
+ minValue="0" maxValue="2" description="An integer value that determines if the .INI value read is a filename or a directory location or to be used as is w/o interpretation."/>
479
+ </tableDefinition>
480
+ <tableDefinition name="InstallExecuteSequence">
481
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"
482
+ category="identifier" description="Name of action to invoke, either in the engine or the handler DLL."/>
483
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
484
+ category="condition" description="Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData."/>
485
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
486
+ minValue="-4" maxValue="32767" description="Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action."/>
487
+ </tableDefinition>
488
+ <tableDefinition name="InstallUISequence">
489
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"
490
+ category="identifier" description="Name of action to invoke, either in the engine or the handler DLL."/>
491
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
492
+ category="condition" description="Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData."/>
493
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
494
+ minValue="-4" maxValue="32767" description="Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action."/>
495
+ </tableDefinition>
496
+ <tableDefinition name="IsolatedComponent">
497
+ <columnDefinition name="Component_Shared" type="string" length="72" primaryKey="yes" modularize="column"
498
+ keyTable="Component" keyColumn="1" category="identifier" description="Key to Component table item to be isolated"/>
499
+ <columnDefinition name="Component_Application" type="string" length="72" primaryKey="yes" modularize="column"
500
+ keyTable="Component" keyColumn="1" category="identifier" description="Key to Component table item for application"/>
501
+ </tableDefinition>
502
+ <tableDefinition name="LaunchCondition">
503
+ <columnDefinition name="Condition" type="string" length="255" primaryKey="yes" localizable="yes"
504
+ category="condition" description="Expression which must evaluate to TRUE in order for install to commence."/>
505
+ <columnDefinition name="Description" type="localized" length="255" escapeIdtCharacters="yes"
506
+ category="formatted" description="Localizable text to display when condition fails and install must abort."/>
507
+ </tableDefinition>
508
+ <tableDefinition name="ListBox">
509
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
510
+ category="identifier" description="A named property to be tied to this item. All the items tied to the same property become part of the same listbox."/>
511
+ <columnDefinition name="Order" type="number" length="2" primaryKey="yes"
512
+ minValue="1" maxValue="32767" description="A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive."/>
513
+ <columnDefinition name="Value" type="string" length="64" modularize="property"
514
+ category="formatted" description="The value string associated with this item. Selecting the line will set the associated property to this value."/>
515
+ <columnDefinition name="Text" type="localized" length="64" nullable="yes" escapeIdtCharacters="yes"
516
+ category="text" description="The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value."/>
517
+ </tableDefinition>
518
+ <tableDefinition name="ListView">
519
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
520
+ category="identifier" description="A named property to be tied to this item. All the items tied to the same property become part of the same listview."/>
521
+ <columnDefinition name="Order" type="number" length="2" primaryKey="yes"
522
+ minValue="1" maxValue="32767" description="A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive."/>
523
+ <columnDefinition name="Value" type="string" length="64" modularize="property"
524
+ category="formatted" description="The value string associated with this item. Selecting the line will set the associated property to this value."/>
525
+ <columnDefinition name="Text" type="localized" length="64" nullable="yes" escapeIdtCharacters="yes" modularize="property"
526
+ category="formatted" description="The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value."/>
527
+ <columnDefinition name="Binary_" type="string" length="72" nullable="yes" modularize="column"
528
+ keyTable="Binary" keyColumn="1" category="identifier" description="The name of the icon to be displayed with the icon. The binary information is looked up from the Binary Table."/>
529
+ </tableDefinition>
530
+ <tableDefinition name="LockPermissions">
531
+ <columnDefinition name="LockObject" type="string" length="72" primaryKey="yes" modularize="column"
532
+ category="identifier" description="Foreign key into Registry or File table"/>
533
+ <columnDefinition name="Table" type="string" length="32" primaryKey="yes"
534
+ category="identifier" set="Directory;File;Registry" description="Reference to another table name"/>
535
+ <columnDefinition name="Domain" type="string" length="255" primaryKey="yes" nullable="yes" modularize="property"
536
+ category="formatted" description="Domain name for user whose permissions are being set. (usually a property)"/>
537
+ <columnDefinition name="User" type="string" length="255" primaryKey="yes" modularize="property"
538
+ category="formatted" description="User for permissions to be set. (usually a property)"/>
539
+ <columnDefinition name="Permission" type="number" length="4" nullable="yes"
540
+ minValue="-2147483647" maxValue="2147483647" description="Permission Access mask. Full Control = 268435456 (GENERIC_ALL = 0x10000000)"/>
541
+ </tableDefinition>
542
+ <tableDefinition name="MsiLockPermissionsEx">
543
+ <columnDefinition name="MsiLockPermissionsEx" type="string" length="72" primaryKey="yes" modularize="column"
544
+ category="identifier" description="Primary key, non-localized token"/>
545
+ <columnDefinition name="LockObject" type="string" length="72" modularize="column"
546
+ category="identifier" description="Foreign key into Registry, File, CreateFolder, or ServiceInstall table"/>
547
+ <columnDefinition name="Table" type="string" length="32"
548
+ category="identifier" set="CreateFolder;File;Registry;ServiceInstall" description="Reference to another table name"/>
549
+ <columnDefinition name="SDDLText" type="string" length="0" modularize="property"
550
+ category="formattedSddl" description="String to indicate permissions to be applied to the LockObject"/>
551
+ <columnDefinition name="Condition" type="string" length="255" modularize="property" nullable="yes"
552
+ category="formatted" description="Expression which must evaluate to TRUE in order for this set of permissions to be applied"/>
553
+ </tableDefinition>
554
+ <tableDefinition name="Media" createSymbols="yes">
555
+ <columnDefinition name="DiskId" type="number" length="2" primaryKey="yes"
556
+ minValue="1" maxValue="32767" description="Primary key, integer to determine sort order for table."/>
557
+ <columnDefinition name="LastSequence" type="number" length="4"
558
+ minValue="0" maxValue="2147483647" description="File sequence number for the last file for this media."/>
559
+ <columnDefinition name="DiskPrompt" type="localized" length="64" nullable="yes" escapeIdtCharacters="yes"
560
+ category="text" description="Disk name: the visible text actually printed on the disk. This will be used to prompt the user when this disk needs to be inserted."/>
561
+ <columnDefinition name="Cabinet" type="string" length="255" nullable="yes"
562
+ category="cabinet" description="If some or all of the files stored on the media are compressed in a cabinet, the name of that cabinet."/>
563
+ <columnDefinition name="VolumeLabel" type="string" length="32" nullable="yes"
564
+ category="text" description="The label attributed to the volume."/>
565
+ <columnDefinition name="Source" type="string" length="72" nullable="yes"
566
+ category="property" description="The property defining the location of the cabinet file."/>
567
+ </tableDefinition>
568
+ <tableDefinition name="MoveFile">
569
+ <columnDefinition name="FileKey" type="string" length="72" primaryKey="yes" modularize="column"
570
+ category="identifier" description="Primary key that uniquely identifies a particular MoveFile record"/>
571
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
572
+ keyTable="Component" keyColumn="1" category="identifier" description="If this component is not "selected" for installation or removal, no action will be taken on the associated MoveFile entry"/>
573
+ <columnDefinition name="SourceName" type="localized" length="255" nullable="yes"
574
+ category="text" description="Name of the source file(s) to be moved or copied. Can contain the '*' or '?' wildcards."/>
575
+ <columnDefinition name="DestName" type="localized" length="255" nullable="yes"
576
+ category="filename" description="Name to be given to the original file after it is moved or copied. If blank, the destination file will be given the same name as the source file"/>
577
+ <columnDefinition name="SourceFolder" type="string" length="72" nullable="yes" modularize="column"
578
+ category="identifier" description="Name of a property whose value is assumed to resolve to the full path to the source directory"/>
579
+ <columnDefinition name="DestFolder" type="string" length="72" modularize="column"
580
+ category="identifier" description="Name of a property whose value is assumed to resolve to the full path to the destination directory"/>
581
+ <columnDefinition name="Options" type="number" length="2"
582
+ minValue="0" maxValue="1" description="Integer value specifying the MoveFile operating mode, one of imfoEnum"/>
583
+ </tableDefinition>
584
+ <tableDefinition name="MsiAssembly">
585
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
586
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into Component table."/>
587
+ <columnDefinition name="Feature_" type="string" length="38"
588
+ keyTable="Feature" keyColumn="1" category="identifier" description="Foreign key into Feature table."/>
589
+ <columnDefinition name="File_Manifest" type="string" length="72" nullable="yes" modularize="column"
590
+ keyTable="File" keyColumn="1" category="identifier" description="Foreign key into the File table denoting the manifest file for the assembly."/>
591
+ <columnDefinition name="File_Application" type="string" length="72" nullable="yes" modularize="column"
592
+ keyTable="File" keyColumn="1" category="identifier" description="Foreign key into File table, denoting the application context for private assemblies. Null for global assemblies."/>
593
+ <columnDefinition name="Attributes" type="number" length="2" nullable="yes"
594
+ description="Assembly attributes"/>
595
+ </tableDefinition>
596
+ <tableDefinition name="MsiAssemblyName">
597
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
598
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into Component table."/>
599
+ <columnDefinition name="Name" type="string" length="255" primaryKey="yes"
600
+ category="text" description="The name part of the name-value pairs for the assembly name."/>
601
+ <columnDefinition name="Value" type="string" length="255"
602
+ category="text" description="The value part of the name-value pairs for the assembly name."/>
603
+ </tableDefinition>
604
+ <tableDefinition name="MsiDigitalCertificate">
605
+ <columnDefinition name="DigitalCertificate" type="string" length="72" primaryKey="yes"
606
+ category="identifier" description="A unique identifier for the row"/>
607
+ <columnDefinition name="CertData" type="object" length="0"
608
+ category="binary" description="A certificate context blob for a signer certificate"/>
609
+ </tableDefinition>
610
+ <tableDefinition name="MsiDigitalSignature">
611
+ <columnDefinition name="Table" type="string" length="32" primaryKey="yes"
612
+ set="Media" description="Reference to another table name (only Media table is supported)"/>
613
+ <columnDefinition name="SignObject" type="string" length="72" primaryKey="yes"
614
+ category="text" description="Foreign key to Media table"/>
615
+ <columnDefinition name="DigitalCertificate_" type="string" length="72"
616
+ keyTable="MsiDigitalCertificate" keyColumn="1" category="identifier" description="Foreign key to MsiDigitalCertificate table identifying the signer certificate"/>
617
+ <columnDefinition name="Hash" type="object" length="0" nullable="yes"
618
+ category="binary" description="The encoded hash blob from the digital signature"/>
619
+ </tableDefinition>
620
+ <tableDefinition name="MsiEmbeddedChainer" createSymbols="yes">
621
+ <columnDefinition name="MsiEmbeddedChainer" type="string" length="72" primaryKey="yes" modularize="column"
622
+ category="identifier" description="The primary key for the table."/>
623
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"
624
+ category="condition" description="A conditional statement for running the user-defined function."/>
625
+ <columnDefinition name="CommandLine" type="string" length="255" nullable="yes" modularize="property"
626
+ category="formatted" description="The value in this field is a part of the command line string passed to the executable file identified in the Source column."/>
627
+ <columnDefinition name="Source" type="string" length="72" modularize="column"
628
+ category="customSource" description="The location of the executable file for the user-defined function."/>
629
+ <columnDefinition name="Type" type="number" length="2"
630
+ set="2;18;50" description="The functions listed in the MsiEmbeddedChainer table are described using the following custom action numeric types."/>
631
+ </tableDefinition>
632
+ <tableDefinition name="MsiEmbeddedUI">
633
+ <columnDefinition name="MsiEmbeddedUI" type="string" length="72" primaryKey="yes" modularize="column"
634
+ category="identifier" description="The primary key for the table."/>
635
+ <columnDefinition name="FileName" type="localized" length="255"
636
+ category="text" description="The name of the file that receives the binary information in the Data column."/>
637
+ <columnDefinition name="Attributes" type="number" length="2"
638
+ set="0;1;2;3" description="Information about the data in the Data column."/>
639
+ <columnDefinition name="MessageFilter" type="number" length="4" nullable="yes"
640
+ description="Specifies the types of messages that are sent to the user interface DLL."/>
641
+ <columnDefinition name="Data" type="object" length="0"
642
+ category="binary" description="This column contains binary information."/>
643
+ </tableDefinition>
644
+ <tableDefinition name="MsiFileHash">
645
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
646
+ keyTable="File" keyColumn="1" category="identifier" description="Primary key, foreign key into File table referencing file with this hash"/>
647
+ <columnDefinition name="Options" type="number" length="2"
648
+ minValue="0" maxValue="32767" description="Various options and attributes for this hash."/>
649
+ <columnDefinition name="HashPart1" type="number" length="4"
650
+ description="Size of file in bytes (long integer)."/>
651
+ <columnDefinition name="HashPart2" type="number" length="4"
652
+ description="Size of file in bytes (long integer)."/>
653
+ <columnDefinition name="HashPart3" type="number" length="4"
654
+ description="Size of file in bytes (long integer)."/>
655
+ <columnDefinition name="HashPart4" type="number" length="4"
656
+ description="Size of file in bytes (long integer)."/>
657
+ </tableDefinition>
658
+ <tableDefinition name="MsiPackageCertificate">
659
+ <columnDefinition name="PackageCertificate" type="string" length="72" primaryKey="yes"
660
+ category="identifier" description="Primary key. A unique identifier for the row."/>
661
+ <columnDefinition name="DigitalCertificate_" type="string" length="72" primaryKey="yes"
662
+ keyTable="MsiDigitalCertificate" keyColumn="1" category="identifier" description="Foreign key to MsiDigitalCertificate table identifying the signer certificate."/>
663
+ </tableDefinition>
664
+ <tableDefinition name="MsiPatchCertificate">
665
+ <columnDefinition name="PatchCertificate" type="string" length="72" primaryKey="yes"
666
+ category="identifier" description="Primary key. A unique identifier for the row."/>
667
+ <columnDefinition name="DigitalCertificate_" type="string" length="72" primaryKey="yes"
668
+ keyTable="MsiDigitalCertificate" keyColumn="1" category="identifier" description="Foreign key to MsiDigitalCertificate table identifying the signer certificate."/>
669
+ </tableDefinition>
670
+ <tableDefinition name="MsiPatchHeaders">
671
+ <columnDefinition name="StreamRef" type="string" length="38" primaryKey="yes"
672
+ category="identifier" description="Primary key. A unique identifier for the row."/>
673
+ <columnDefinition name="Header" type="object" length="0"
674
+ category="binary" description="Binary stream. The patch header, used for patch validation."/>
675
+ </tableDefinition>
676
+ <tableDefinition name="PatchMetadata">
677
+ <columnDefinition name="Company" type="string" length="72" primaryKey="yes" nullable="yes"
678
+ category="identifier" description="Primary key. The name of the company."/>
679
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes"
680
+ category="identifier" description="Primary key. The name of the property."/>
681
+ <columnDefinition name="Value" type="localized" length="0" escapeIdtCharacters="yes"
682
+ category="text" description="Non-null, non-empty value of the metadata property."/>
683
+ </tableDefinition>
684
+ <tableDefinition name="MsiPatchMetadata">
685
+ <columnDefinition name="Company" type="string" length="72" primaryKey="yes" nullable="yes"
686
+ />
687
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes"
688
+ />
689
+ <columnDefinition name="Value" type="localized" length="0"
690
+ />
691
+ </tableDefinition>
692
+ <tableDefinition name="MsiPatchOldAssemblyFile">
693
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
694
+ keyTable="File" keyColumn="1" category="identifier" description="Foreign key into File table. Patch-only table."/>
695
+ <columnDefinition name="Assembly_" type="string" length="72" primaryKey="yes" modularize="column"
696
+ keyTable="MsiPatchOldAssemblyName" keyColumn="1" category="identifier" description="Foreign key into MsiPatchOldAssemblyName table."/>
697
+ </tableDefinition>
698
+ <tableDefinition name="MsiPatchOldAssemblyName">
699
+ <columnDefinition name="Assembly" type="string" length="72" primaryKey="yes" modularize="column"
700
+ category="identifier" description="A unique identifier for the row."/>
701
+ <columnDefinition name="Name" type="string" length="255" primaryKey="yes"
702
+ category="text" description="The name part of the name-value pairs for the assembly name. This represents the old name for the assembly."/>
703
+ <columnDefinition name="Value" type="string" length="255"
704
+ category="text" description="The value part of the name-value pairs for the assembly name. This represents the old name for the assembly."/>
705
+ </tableDefinition>
706
+ <tableDefinition name="PatchSequence">
707
+ <columnDefinition name="PatchFamily" type="string" length="72" primaryKey="yes"
708
+ category="identifier" description="Primary key. The name of the family for the patch."/>
709
+ <columnDefinition name="Target" type="string" length="72" primaryKey="yes" nullable="yes"
710
+ category="text" description="Primary key. Determines product code filtering for family."/>
711
+ <columnDefinition name="Sequence" type="string" length="72" nullable="yes"
712
+ category="text" description="Sequence information in version (x.x.x.x) format."/>
713
+ <columnDefinition name="Supersede" type="number" length="4" nullable="yes"
714
+ description="Indicates that this patch supersedes earlier patches."/>
715
+ </tableDefinition>
716
+ <tableDefinition name="MsiPatchSequence" createSymbols="yes">
717
+ <columnDefinition name="PatchFamily" type="string" length="72" primaryKey="yes"
718
+ />
719
+ <columnDefinition name="ProductCode" type="string" length="38" primaryKey="yes" nullable="yes"
720
+ />
721
+ <columnDefinition name="Sequence" type="string" length="72"
722
+ />
723
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes"
724
+ />
725
+ </tableDefinition>
726
+ <tableDefinition name="ODBCAttribute">
727
+ <columnDefinition name="Driver_" type="string" length="72" primaryKey="yes" modularize="column"
728
+ keyTable="ODBCDriver" keyColumn="1" category="identifier" description="Reference to ODBC driver in ODBCDriver table"/>
729
+ <columnDefinition name="Attribute" type="string" length="40" primaryKey="yes"
730
+ category="text" description="Name of ODBC driver attribute"/>
731
+ <columnDefinition name="Value" type="localized" length="255" nullable="yes"
732
+ category="formatted" description="Value for ODBC driver attribute"/>
733
+ </tableDefinition>
734
+ <tableDefinition name="ODBCDriver">
735
+ <columnDefinition name="Driver" type="string" length="72" primaryKey="yes" modularize="column"
736
+ category="identifier" description="Primary key, non-localized.internal token for driver"/>
737
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
738
+ keyTable="Component" keyColumn="1" category="identifier" description="Reference to associated component"/>
739
+ <columnDefinition name="Description" type="string" length="255"
740
+ category="text" description="Text used as registered name for driver, non-localized"/>
741
+ <columnDefinition name="File_" type="string" length="72" modularize="column"
742
+ keyTable="File" keyColumn="1" category="identifier" description="Reference to key driver file"/>
743
+ <columnDefinition name="File_Setup" type="string" length="72" nullable="yes" modularize="column"
744
+ keyTable="File" keyColumn="1" category="identifier" description="Optional reference to key driver setup DLL"/>
745
+ </tableDefinition>
746
+ <tableDefinition name="ODBCDataSource">
747
+ <columnDefinition name="DataSource" type="string" length="72" primaryKey="yes" modularize="column"
748
+ category="identifier" description="Primary key, non-localized.internal token for data source"/>
749
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
750
+ keyTable="Component" keyColumn="1" category="identifier" description="Reference to associated component"/>
751
+ <columnDefinition name="Description" type="string" length="255"
752
+ category="text" description="Text used as registered name for data source"/>
753
+ <columnDefinition name="DriverDescription" type="string" length="255"
754
+ category="text" description="Reference to driver description, may be existing driver"/>
755
+ <columnDefinition name="Registration" type="number" length="2"
756
+ minValue="0" maxValue="1" description="Registration option: 0=machine, 1=user, others t.b.d."/>
757
+ </tableDefinition>
758
+ <tableDefinition name="ODBCSourceAttribute">
759
+ <columnDefinition name="DataSource_" type="string" length="72" primaryKey="yes" modularize="column"
760
+ keyTable="ODBCDataSource" keyColumn="1" category="identifier" description="Reference to ODBC data source in ODBCDataSource table"/>
761
+ <columnDefinition name="Attribute" type="string" length="32" primaryKey="yes"
762
+ category="text" description="Name of ODBC data source attribute"/>
763
+ <columnDefinition name="Value" type="localized" length="255" nullable="yes"
764
+ category="formatted" description="Value for ODBC data source attribute"/>
765
+ </tableDefinition>
766
+ <tableDefinition name="ODBCTranslator">
767
+ <columnDefinition name="Translator" type="string" length="72" primaryKey="yes" modularize="column"
768
+ category="identifier" description="Primary key, non-localized.internal token for translator"/>
769
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
770
+ keyTable="Component" keyColumn="1" category="identifier" description="Reference to associated component"/>
771
+ <columnDefinition name="Description" type="string" length="255"
772
+ category="text" description="Text used as registered name for translator"/>
773
+ <columnDefinition name="File_" type="string" length="72" modularize="column"
774
+ keyTable="File" keyColumn="1" category="identifier" description="Reference to key translator file"/>
775
+ <columnDefinition name="File_Setup" type="string" length="72" nullable="yes" modularize="column"
776
+ keyTable="File" keyColumn="1" category="identifier" description="Optional reference to key translator setup DLL"/>
777
+ </tableDefinition>
778
+ <tableDefinition name="Patch">
779
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
780
+ category="identifier" description="Primary key, non-localized token, foreign key to File table, must match identifier in cabinet."/>
781
+ <columnDefinition name="Sequence" type="number" length="4" primaryKey="yes"
782
+ minValue="0" maxValue="2147483647" description="Primary key, sequence with respect to the media images; order must track cabinet order."/>
783
+ <columnDefinition name="PatchSize" type="number" length="4"
784
+ minValue="0" maxValue="2147483647" description="Size of patch in bytes (long integer)."/>
785
+ <columnDefinition name="Attributes" type="number" length="2"
786
+ minValue="0" maxValue="32767" description="Integer containing bit flags representing patch attributes"/>
787
+ <columnDefinition name="Header" type="object" length="0" nullable="yes"
788
+ category="binary" description="Binary stream. The patch header, used for patch validation."/>
789
+ <columnDefinition name="StreamRef_" type="string" length="38" nullable="yes"
790
+ category="identifier" description="Identifier. Foreign key to the StreamRef column of the MsiPatchHeaders table."/>
791
+ </tableDefinition>
792
+ <tableDefinition name="PatchPackage">
793
+ <columnDefinition name="PatchId" type="string" length="38" primaryKey="yes"
794
+ category="guid" description="A unique string GUID representing this patch."/>
795
+ <columnDefinition name="Media_" type="number" length="2"
796
+ minValue="0" maxValue="32767" description="Foreign key to DiskId column of Media table. Indicates the disk containing the patch package."/>
797
+ </tableDefinition>
798
+ <tableDefinition name="PublishComponent">
799
+ <columnDefinition name="ComponentId" type="string" length="38" primaryKey="yes"
800
+ category="guid" description="A string GUID that represents the component id that will be requested by the alien product."/>
801
+ <columnDefinition name="Qualifier" type="string" length="255" primaryKey="yes"
802
+ category="text" description="This is defined only when the ComponentId column is an Qualified Component Id. This is the Qualifier for ProvideComponentIndirect."/>
803
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
804
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table."/>
805
+ <columnDefinition name="AppData" type="localized" length="0" nullable="yes" escapeIdtCharacters="yes"
806
+ category="text" description="This is localisable Application specific data that can be associated with a Qualified Component."/>
807
+ <columnDefinition name="Feature_" type="string" length="38"
808
+ keyTable="Feature" keyColumn="1" category="identifier" description="Foreign key into the Feature table."/>
809
+ </tableDefinition>
810
+ <tableDefinition name="RadioButton">
811
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes" modularize="column"
812
+ category="identifier" description="A named property to be tied to this radio button. All the buttons tied to the same property become part of the same group."/>
813
+ <columnDefinition name="Order" type="number" length="2" primaryKey="yes"
814
+ minValue="1" maxValue="32767" description="A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive."/>
815
+ <columnDefinition name="Value" type="string" length="64" modularize="property" escapeIdtCharacters="yes"
816
+ category="formatted" description="The value string associated with this button. Selecting the button will set the associated property to this value."/>
817
+ <columnDefinition name="X" type="number" length="2" localizable="yes"
818
+ minValue="0" maxValue="32767" description="The horizontal coordinate of the upper left corner of the bounding rectangle of the radio button."/>
819
+ <columnDefinition name="Y" type="number" length="2" localizable="yes"
820
+ minValue="0" maxValue="32767" description="The vertical coordinate of the upper left corner of the bounding rectangle of the radio button."/>
821
+ <columnDefinition name="Width" type="number" length="2" localizable="yes"
822
+ minValue="0" maxValue="32767" description="The width of the button."/>
823
+ <columnDefinition name="Height" type="number" length="2" localizable="yes"
824
+ minValue="0" maxValue="32767" description="The height of the button."/>
825
+ <columnDefinition name="Text" type="localized" length="0" nullable="yes" escapeIdtCharacters="yes"
826
+ category="text" description="The visible title to be assigned to the radio button."/>
827
+ <columnDefinition name="Help" type="localized" length="50" nullable="yes" escapeIdtCharacters="yes"
828
+ category="text" description="The help strings used with the button. The text is optional."/>
829
+ </tableDefinition>
830
+ <tableDefinition name="Registry">
831
+ <columnDefinition name="Registry" type="string" length="72" primaryKey="yes" modularize="column"
832
+ category="identifier" description="Primary key, non-localized token."/>
833
+ <columnDefinition name="Root" type="number" length="2"
834
+ minValue="-1" maxValue="3" description="The predefined root key for the registry value, one of rrkEnum."/>
835
+ <columnDefinition name="Key" type="localized" length="255" modularize="property"
836
+ category="regPath" description="The key for the registry value."/>
837
+ <columnDefinition name="Name" type="localized" length="255" nullable="yes" modularize="property"
838
+ category="formatted" description="The registry value name."/>
839
+ <columnDefinition name="Value" type="localized" length="0" nullable="yes" modularize="property" escapeIdtCharacters="yes"
840
+ category="formatted" description="The registry value."/>
841
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
842
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the installing of the registry value."/>
843
+ </tableDefinition>
844
+ <tableDefinition name="RegLocator" createSymbols="yes">
845
+ <columnDefinition name="Signature_" type="string" length="72" primaryKey="yes" modularize="column"
846
+ category="identifier" description="The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table. If the type is 0, the registry values refers a directory, and _Signature is not a foreign key."/>
847
+ <columnDefinition name="Root" type="number" length="2"
848
+ minValue="0" maxValue="3" description="The predefined root key for the registry value, one of rrkEnum."/>
849
+ <columnDefinition name="Key" type="string" length="255" modularize="property" localizable="yes"
850
+ category="regPath" description="The key for the registry value."/>
851
+ <columnDefinition name="Name" type="string" length="255" nullable="yes" modularize="property" localizable="yes"
852
+ category="formatted" description="The registry value name."/>
853
+ <columnDefinition name="Type" type="number" length="2" nullable="yes"
854
+ minValue="0" maxValue="18" description="An integer value that determines if the registry value is a filename or a directory location or to be used as is w/o interpretation."/>
855
+ </tableDefinition>
856
+ <tableDefinition name="RemoveFile">
857
+ <columnDefinition name="FileKey" type="string" length="72" primaryKey="yes" modularize="column"
858
+ category="identifier" description="Primary key used to identify a particular file entry"/>
859
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
860
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key referencing Component that controls the file to be removed."/>
861
+ <columnDefinition name="FileName" type="localized" length="255" nullable="yes"
862
+ category="wildCardFilename" description="Name of the file to be removed."/>
863
+ <columnDefinition name="DirProperty" type="string" length="72" modularize="column"
864
+ category="identifier" description="Name of a property whose value is assumed to resolve to the full pathname to the folder of the file to be removed."/>
865
+ <columnDefinition name="InstallMode" type="number" length="2"
866
+ set="1;2;3" description="Installation option, one of iimEnum."/>
867
+ </tableDefinition>
868
+ <tableDefinition name="RemoveIniFile">
869
+ <columnDefinition name="RemoveIniFile" type="string" length="72" primaryKey="yes" modularize="column"
870
+ category="identifier" description="Primary key, non-localized token."/>
871
+ <columnDefinition name="FileName" type="localized" length="255"
872
+ category="filename" description="The .INI file name in which to delete the information"/>
873
+ <columnDefinition name="DirProperty" type="string" length="72" nullable="yes" modularize="column"
874
+ category="identifier" description="Foreign key into the Directory table denoting the directory where the .INI file is."/>
875
+ <columnDefinition name="Section" type="localized" length="96" modularize="property"
876
+ category="formatted" description="The .INI file Section."/>
877
+ <columnDefinition name="Key" type="localized" length="128" modularize="property"
878
+ category="formatted" description="The .INI file key below Section."/>
879
+ <columnDefinition name="Value" type="localized" length="255" nullable="yes" modularize="property"
880
+ category="formatted" description="The value to be deleted. The value is required when Action is iifIniRemoveTag"/>
881
+ <columnDefinition name="Action" type="number" length="2"
882
+ set="2;4" description="The type of modification to be made, one of iifEnum."/>
883
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
884
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the deletion of the .INI value."/>
885
+ </tableDefinition>
886
+ <tableDefinition name="RemoveRegistry">
887
+ <columnDefinition name="RemoveRegistry" type="string" length="72" primaryKey="yes" modularize="column"
888
+ category="identifier" description="Primary key, non-localized token."/>
889
+ <columnDefinition name="Root" type="number" length="2"
890
+ minValue="-1" maxValue="3" description="The predefined root key for the registry value, one of rrkEnum"/>
891
+ <columnDefinition name="Key" type="localized" length="255" modularize="property"
892
+ category="regPath" description="The key for the registry value."/>
893
+ <columnDefinition name="Name" type="localized" length="255" nullable="yes" modularize="property"
894
+ category="formatted" description="The registry value name."/>
895
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
896
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing component that controls the deletion of the registry value."/>
897
+ </tableDefinition>
898
+ <tableDefinition name="ReserveCost">
899
+ <columnDefinition name="ReserveKey" type="string" length="72" primaryKey="yes" modularize="column"
900
+ category="identifier" description="Primary key that uniquely identifies a particular ReserveCost record"/>
901
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
902
+ keyTable="Component" keyColumn="1" category="identifier" description="Reserve a specified amount of space if this component is to be installed."/>
903
+ <columnDefinition name="ReserveFolder" type="string" length="72" nullable="yes" modularize="column"
904
+ category="identifier" description="Name of a property whose value is assumed to resolve to the full path to the destination directory"/>
905
+ <columnDefinition name="ReserveLocal" type="number" length="4"
906
+ minValue="0" maxValue="2147483647" description="Disk space to reserve if linked component is installed locally."/>
907
+ <columnDefinition name="ReserveSource" type="number" length="4"
908
+ minValue="0" maxValue="2147483647" description="Disk space to reserve if linked component is installed to run from the source location."/>
909
+ </tableDefinition>
910
+ <tableDefinition name="SelfReg">
911
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column"
912
+ keyTable="File" keyColumn="1" category="identifier" description="Foreign key into the File table denoting the module that needs to be registered."/>
913
+ <columnDefinition name="Cost" type="number" length="2" nullable="yes"
914
+ minValue="0" maxValue="32767" description="The cost of registering the module."/>
915
+ </tableDefinition>
916
+ <tableDefinition name="ServiceControl">
917
+ <columnDefinition name="ServiceControl" type="string" length="72" primaryKey="yes" modularize="column"
918
+ category="identifier" description="Primary key, non-localized token."/>
919
+ <columnDefinition name="Name" type="localized" length="255" modularize="property"
920
+ category="formatted" description="Name of a service. /, \, comma and space are invalid"/>
921
+ <columnDefinition name="Event" type="number" length="2"
922
+ minValue="0" maxValue="187" description="Bit field: Install: 0x1 = Start, 0x2 = Stop, 0x8 = Delete, Uninstall: 0x10 = Start, 0x20 = Stop, 0x80 = Delete"/>
923
+ <columnDefinition name="Arguments" type="localized" length="255" nullable="yes" modularize="property"
924
+ category="formatted" description="Arguments for the service. Separate by [~]."/>
925
+ <columnDefinition name="Wait" type="number" length="2" nullable="yes"
926
+ minValue="0" maxValue="1" description="Boolean for whether to wait for the service to fully start"/>
927
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
928
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table that controls the startup of the service"/>
929
+ </tableDefinition>
930
+ <tableDefinition name="ServiceInstall">
931
+ <columnDefinition name="ServiceInstall" type="string" length="72" primaryKey="yes" modularize="column"
932
+ category="identifier" description="Primary key, non-localized token."/>
933
+ <columnDefinition name="Name" type="string" length="255" modularize="property"
934
+ category="formatted" description="Internal Name of the Service"/>
935
+ <columnDefinition name="DisplayName" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes" modularize="property"
936
+ category="formatted" description="External Name of the Service"/>
937
+ <columnDefinition name="ServiceType" type="number" length="4"
938
+ minValue="-2147483647" maxValue="2147483647" description="Type of the service"/>
939
+ <columnDefinition name="StartType" type="number" length="4"
940
+ minValue="0" maxValue="4" description="Type of the service"/>
941
+ <columnDefinition name="ErrorControl" type="number" length="4"
942
+ minValue="-2147483647" maxValue="2147483647" description="Severity of error if service fails to start"/>
943
+ <columnDefinition name="LoadOrderGroup" type="string" length="255" nullable="yes" modularize="property"
944
+ category="formatted" description="LoadOrderGroup"/>
945
+ <columnDefinition name="Dependencies" type="string" length="255" nullable="yes" modularize="property"
946
+ category="formatted" description="Other services this depends on to start. Separate by [~], and end with [~][~]"/>
947
+ <columnDefinition name="StartName" type="string" length="255" nullable="yes" modularize="property"
948
+ category="formatted" description="User or object name to run service as"/>
949
+ <columnDefinition name="Password" type="string" length="255" nullable="yes" modularize="property"
950
+ category="formatted" description="password to run service with. (with StartName)"/>
951
+ <columnDefinition name="Arguments" type="string" length="255" nullable="yes" modularize="property"
952
+ category="formatted" description="Arguments to include in every start of the service, passed to WinMain"/>
953
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
954
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table that controls the startup of the service"/>
955
+ <columnDefinition name="Description" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes" modularize="property"
956
+ category="text" description="Description of service."/>
957
+ </tableDefinition>
958
+ <tableDefinition name="MsiServiceConfig">
959
+ <columnDefinition name="MsiServiceConfig" type="string" length="72" primaryKey="yes" modularize="column"
960
+ category="identifier" description="Primary key, non-localized token."/>
961
+ <columnDefinition name="Name" type="localized" length="255" modularize="property"
962
+ category="formatted" description="Name of a service. /, \, comma and space are invalid"/>
963
+ <columnDefinition name="Event" type="number" length="2"
964
+ minValue="0" maxValue="7" description="Bit field: 0x1 = Install, 0x2 = Uninstall, 0x4 = Reinstall"/>
965
+ <columnDefinition name="ConfigType" type="number" length="4"
966
+ minValue="-2147483647" maxValue="2147483647" description="Service Configuration Option"/>
967
+ <columnDefinition name="Argument" type="string" length="0" nullable="yes"
968
+ category="text" description="Argument(s) for service configuration. Value depends on the content of the ConfigType field"/>
969
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
970
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table that controls the configuration of the service"/>
971
+ </tableDefinition>
972
+ <tableDefinition name="MsiServiceConfigFailureActions">
973
+ <columnDefinition name="MsiServiceConfigFailureActions" type="string" length="72" primaryKey="yes" modularize="column"
974
+ category="identifier" description="Primary key, non-localized token"/>
975
+ <columnDefinition name="Name" type="localized" length="255" modularize="property"
976
+ category="formatted" description="Name of a service. /, \, comma and space are invalid"/>
977
+ <columnDefinition name="Event" type="number" length="2"
978
+ minValue="0" maxValue="7" description="Bit field: 0x1 = Install, 0x2 = Uninstall, 0x4 = Reinstall"/>
979
+ <columnDefinition name="ResetPeriod" type="number" length="4" nullable="yes"
980
+ minValue="0" maxValue="2147483647" description="Time in seconds after which to reset the failure count to zero. Leave blank if it should never be reset"/>
981
+ <columnDefinition name="RebootMessage" type="localized" length="255" nullable="yes"
982
+ category="formatted" description="Message to be broadcast to server users before rebooting"/>
983
+ <columnDefinition name="Command" type="localized" length="255" nullable="yes"
984
+ category="formatted" description="Command line of the process to CreateProcess function to execute"/>
985
+ <columnDefinition name="Actions" type="string" length="0" nullable="yes"
986
+ category="text" description="A list of integer actions separated by [~] delimiters: 0 = SC_ACTION_NONE, 1 = SC_ACTION_RESTART, 2 = SC_ACTION_REBOOT, 3 = SC_ACTION_RUN_COMMAND. Terminate with [~][~]"/>
987
+ <columnDefinition name="DelayActions" type="string" length="0" nullable="yes"
988
+ category="text" description="A list of delays (time in milli-seconds), separated by [~] delmiters, to wait before taking the corresponding Action. Terminate with [~][~]"/>
989
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
990
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table that controls the configuration of failure actions for the service"/>
991
+ </tableDefinition>
992
+ <tableDefinition name="Shortcut">
993
+ <columnDefinition name="Shortcut" type="string" length="72" primaryKey="yes" modularize="column"
994
+ category="identifier" description="Primary key, non-localized token."/>
995
+ <columnDefinition name="Directory_" type="string" length="72" modularize="column"
996
+ keyTable="Directory" keyColumn="1" category="identifier" description="Foreign key into the Directory table denoting the directory where the shortcut file is created."/>
997
+ <columnDefinition name="Name" type="localized" length="128"
998
+ category="filename" description="The name of the shortcut to be created."/>
999
+ <columnDefinition name="Component_" type="string" length="72" modularize="column"
1000
+ keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table denoting the component whose selection gates the the shortcut creation/deletion."/>
1001
+ <columnDefinition name="Target" type="string" length="72" modularize="property"
1002
+ category="shortcut" description="The shortcut target. This is usually a property that is expanded to a file or a folder that the shortcut points to."/>
1003
+ <columnDefinition name="Arguments" type="string" length="255" nullable="yes" modularize="property"
1004
+ category="formatted" description="The command-line arguments for the shortcut."/>
1005
+ <columnDefinition name="Description" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes"
1006
+ category="text" description="The description for the shortcut."/>
1007
+ <columnDefinition name="Hotkey" type="number" length="2" nullable="yes"
1008
+ minValue="0" maxValue="32767" description="The hotkey for the shortcut. It has the virtual-key code for the key in the low-order byte, and the modifier flags in the high-order byte. "/>
1009
+ <columnDefinition name="Icon_" type="string" length="72" nullable="yes" modularize="icon"
1010
+ keyTable="Icon" keyColumn="1" category="identifier" description="Foreign key into the File table denoting the external icon file for the shortcut."/>
1011
+ <columnDefinition name="IconIndex" type="number" length="2" nullable="yes"
1012
+ minValue="-32767" maxValue="32767" description="The icon index for the shortcut."/>
1013
+ <columnDefinition name="ShowCmd" type="number" length="2" nullable="yes"
1014
+ set="1;3;7" description="The show command for the application window.The following values may be used."/>
1015
+ <columnDefinition name="WkDir" type="string" length="72" nullable="yes" modularize="column"
1016
+ category="identifier" description="Name of property defining location of working directory."/>
1017
+ <columnDefinition name="DisplayResourceDLL" type="string" length="255" nullable="yes" modularize="property"
1018
+ category="formatted" description="The Formatted string providing the full path to the language neutral file containing the MUI Manifest."/>
1019
+ <columnDefinition name="DisplayResourceId" type="number" length="2" nullable="yes"
1020
+ minValue="0" maxValue="32767" description="The display name index for the shortcut. This must be a non-negative number."/>
1021
+ <columnDefinition name="DescriptionResourceDLL" type="string" length="255" nullable="yes" modularize="property"
1022
+ category="formatted" description="The Formatted string providing the full path to the language neutral file containing the MUI Manifest."/>
1023
+ <columnDefinition name="DescriptionResourceId" type="number" length="2" nullable="yes"
1024
+ minValue="0" maxValue="32767" description="The description name index for the shortcut. This must be a non-negative number."/>
1025
+ </tableDefinition>
1026
+ <tableDefinition name="MsiShortcutProperty">
1027
+ <columnDefinition name="MsiShortcutProperty" type="string" length="72" primaryKey="yes" modularize="column"
1028
+ category="identifier" description="Primary key, non-localized token"/>
1029
+ <columnDefinition name="Shortcut_" type="string" length="72" modularize="column"
1030
+ keyTable="Shortcut" keyColumn="1" category="identifier" description="Foreign key into the Shortcut table"/>
1031
+ <columnDefinition name="PropertyKey" type="string" length="0" modularize="property"
1032
+ category="formatted" description="Canonical string representation of the Property Key being set"/>
1033
+ <columnDefinition name="PropVariantValue" type="string" length="0" modularize="property"
1034
+ category="formatted" description="String representation of the value in the property"/>
1035
+ </tableDefinition>
1036
+ <tableDefinition name="Signature" createSymbols="yes">
1037
+ <columnDefinition name="Signature" type="string" length="72" primaryKey="yes" modularize="column"
1038
+ category="identifier" description="The table key. The Signature represents a unique file signature."/>
1039
+ <columnDefinition name="FileName" type="string" length="255"
1040
+ category="text" description="The name of the file. This may contain a "short name|long name" pair."/>
1041
+ <columnDefinition name="MinVersion" type="string" length="20" nullable="yes"
1042
+ category="text" description="The minimum version of the file."/>
1043
+ <columnDefinition name="MaxVersion" type="string" length="20" nullable="yes"
1044
+ category="text" description="The maximum version of the file."/>
1045
+ <columnDefinition name="MinSize" type="number" length="4" nullable="yes"
1046
+ minValue="0" maxValue="2147483647" description="The minimum size of the file."/>
1047
+ <columnDefinition name="MaxSize" type="number" length="4" nullable="yes"
1048
+ minValue="0" maxValue="2147483647" description="The maximum size of the file. "/>
1049
+ <columnDefinition name="MinDate" type="number" length="4" nullable="yes"
1050
+ minValue="0" maxValue="2147483647" description="The minimum creation date of the file."/>
1051
+ <columnDefinition name="MaxDate" type="number" length="4" nullable="yes"
1052
+ minValue="0" maxValue="2147483647" description="The maximum creation date of the file."/>
1053
+ <columnDefinition name="Languages" type="string" length="255" nullable="yes"
1054
+ category="language" description="The languages supported by the file."/>
1055
+ </tableDefinition>
1056
+ <tableDefinition name="TextStyle">
1057
+ <columnDefinition name="TextStyle" type="string" length="72" primaryKey="yes"
1058
+ category="identifier" description="Name of the style. The primary key of this table. This name is embedded in the texts to indicate a style change."/>
1059
+ <columnDefinition name="FaceName" type="string" length="32" localizable="yes"
1060
+ category="text" description="A string indicating the name of the font used. Required. The string must be at most 31 characters long."/>
1061
+ <columnDefinition name="Size" type="number" length="2" localizable="yes"
1062
+ minValue="0" maxValue="32767" description="The size of the font used. This size is given in our units (1/12 of the system font height). Assuming that the system font is set to 12 point size, this is equivalent to the point size."/>
1063
+ <columnDefinition name="Color" type="number" length="4" nullable="yes"
1064
+ minValue="0" maxValue="16777215" description="A long integer indicating the color of the string in the RGB format (Red, Green, Blue each 0-255, RGB = R + 256*G + 256^2*B)."/>
1065
+ <columnDefinition name="StyleBits" type="number" length="2" nullable="yes"
1066
+ minValue="0" maxValue="15" description="A combination of style bits."/>
1067
+ </tableDefinition>
1068
+ <tableDefinition name="TypeLib">
1069
+ <columnDefinition name="LibID" type="string" length="38" primaryKey="yes"
1070
+ category="guid" description="The GUID that represents the library."/>
1071
+ <columnDefinition name="Language" type="number" length="2" primaryKey="yes"
1072
+ minValue="0" maxValue="32767" description="The language of the library."/>
1073
+ <columnDefinition name="Component_" type="string" length="72" primaryKey="yes" modularize="column"
1074
+ keyTable="Component" keyColumn="1" category="identifier" description="Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent."/>
1075
+ <columnDefinition name="Version" type="number" length="4" nullable="yes"
1076
+ minValue="0" maxValue="16777215" description="The version of the library. The minor version is in the lower 8 bits of the integer. The major version is in the next 16 bits. "/>
1077
+ <columnDefinition name="Description" type="localized" length="128" nullable="yes" escapeIdtCharacters="yes"
1078
+ category="text"/>
1079
+ <columnDefinition name="Directory_" type="string" length="72" nullable="yes" modularize="column"
1080
+ keyTable="Directory" keyColumn="1" category="identifier" description="Optional. The foreign key into the Directory table denoting the path to the help file for the type library."/>
1081
+ <columnDefinition name="Feature_" type="string" length="38"
1082
+ keyTable="Feature" keyColumn="1" category="identifier" description="Required foreign key into the Feature Table, specifying the feature to validate or install in order for the type library to be operational."/>
1083
+ <columnDefinition name="Cost" type="number" length="4" nullable="yes"
1084
+ minValue="0" maxValue="2147483647" description="The cost associated with the registration of the typelib. This column is currently optional."/>
1085
+ </tableDefinition>
1086
+ <tableDefinition name="UIText">
1087
+ <columnDefinition name="Key" type="string" length="72" primaryKey="yes"
1088
+ category="identifier" description="A unique key that identifies the particular string."/>
1089
+ <columnDefinition name="Text" type="localized" length="255" nullable="yes" escapeIdtCharacters="yes"
1090
+ category="text" description="The localized version of the string."/>
1091
+ </tableDefinition>
1092
+ <tableDefinition name="Upgrade">
1093
+ <columnDefinition name="UpgradeCode" type="string" length="38" primaryKey="yes"
1094
+ category="guid" description="The UpgradeCode GUID belonging to the products in this set."/>
1095
+ <columnDefinition name="VersionMin" type="string" length="20" primaryKey="yes" nullable="yes"
1096
+ category="text" description="The minimum ProductVersion of the products in this set. The set may or may not include products with this particular version."/>
1097
+ <columnDefinition name="VersionMax" type="string" length="20" primaryKey="yes" nullable="yes"
1098
+ category="text" description="The maximum ProductVersion of the products in this set. The set may or may not include products with this particular version."/>
1099
+ <columnDefinition name="Language" type="string" length="255" primaryKey="yes" nullable="yes" localizable="yes"
1100
+ category="language" description="A comma-separated list of languages for either products in this set or products not in this set."/>
1101
+ <columnDefinition name="Attributes" type="number" length="4" primaryKey="yes"
1102
+ minValue="0" maxValue="2147483647" description="The attributes of this product set."/>
1103
+ <columnDefinition name="Remove" type="string" length="255" nullable="yes"
1104
+ category="formatted" description="The list of features to remove when uninstalling a product from this set. The default is "ALL"."/>
1105
+ <columnDefinition name="ActionProperty" type="string" length="72"
1106
+ category="upperCase" description="The property to set when a product in this set is found."/>
1107
+ </tableDefinition>
1108
+ <tableDefinition name="Verb">
1109
+ <columnDefinition name="Extension_" type="string" length="255" primaryKey="yes"
1110
+ keyTable="Extension" keyColumn="1" category="text" description="The extension associated with the table row."/>
1111
+ <columnDefinition name="Verb" type="string" length="32" primaryKey="yes"
1112
+ category="text" description="The verb for the command."/>
1113
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1114
+ minValue="0" maxValue="32767" description="Order within the verbs for a particular extension. Also used simply to specify the default verb."/>
1115
+ <columnDefinition name="Command" type="localized" length="255" nullable="yes" modularize="property"
1116
+ category="formatted" description="The command text."/>
1117
+ <columnDefinition name="Argument" type="localized" length="255" nullable="yes" modularize="property"
1118
+ category="formatted" description="Optional value for the command arguments."/>
1119
+ </tableDefinition>
1120
+ <!-- Merge Module -->
1121
+ <tableDefinition name="ModuleAdminExecuteSequence">
1122
+ <columnDefinition name="Action" type="string" length="64" primaryKey="yes" modularize="column"
1123
+ category="identifier" description="Action to insert"/>
1124
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1125
+ minValue="-4" maxValue="32767" description="Standard Sequence number"/>
1126
+ <columnDefinition name="BaseAction" type="string" length="64" nullable="yes" modularize="column"
1127
+ keyTable="ModuleAdminExecuteSequence" keyColumn="1" category="identifier" description="Base action to determine insert location."/>
1128
+ <columnDefinition name="After" type="number" length="2" nullable="yes"
1129
+ minValue="0" maxValue="1" description="Before (0) or After (1)"/>
1130
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
1131
+ category="condition"/>
1132
+ </tableDefinition>
1133
+ <tableDefinition name="ModuleAdminUISequence">
1134
+ <columnDefinition name="Action" type="string" length="64" primaryKey="yes" modularize="column"
1135
+ category="identifier" description="Action to insert"/>
1136
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1137
+ minValue="-4" maxValue="32767" description="Standard Sequence number"/>
1138
+ <columnDefinition name="BaseAction" type="string" length="64" nullable="yes" modularize="column"
1139
+ keyTable="ModuleAdminUISequence" keyColumn="1" category="identifier" description="Base action to determine insert location."/>
1140
+ <columnDefinition name="After" type="number" length="2" nullable="yes"
1141
+ minValue="0" maxValue="1" description="Before (0) or After (1)"/>
1142
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
1143
+ category="condition"/>
1144
+ </tableDefinition>
1145
+ <tableDefinition name="ModuleAdvtExecuteSequence">
1146
+ <columnDefinition name="Action" type="string" length="64" primaryKey="yes" modularize="column"
1147
+ category="identifier" description="Action to insert"/>
1148
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1149
+ minValue="-4" maxValue="32767" description="Standard Sequence number"/>
1150
+ <columnDefinition name="BaseAction" type="string" length="64" nullable="yes" modularize="column"
1151
+ keyTable="ModuleAdvtExecuteSequence" keyColumn="1" category="identifier" description="Base action to determine insert location."/>
1152
+ <columnDefinition name="After" type="number" length="2" nullable="yes"
1153
+ minValue="0" maxValue="1" description="Before (0) or After (1)"/>
1154
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
1155
+ category="condition"/>
1156
+ </tableDefinition>
1157
+ <tableDefinition name="ModuleAdvtUISequence">
1158
+ <columnDefinition name="Action" type="string" length="64" primaryKey="yes" modularize="column"
1159
+ category="identifier" description="Action to insert"/>
1160
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1161
+ minValue="-4" maxValue="32767" description="Standard Sequence number"/>
1162
+ <columnDefinition name="BaseAction" type="string" length="64" nullable="yes" modularize="column"
1163
+ keyTable="ModuleAdvtUISequence" keyColumn="1" category="identifier" description="Base action to determine insert location."/>
1164
+ <columnDefinition name="After" type="number" length="2" nullable="yes"
1165
+ minValue="0" maxValue="1" description="Before (0) or After (1)"/>
1166
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
1167
+ category="condition"/>
1168
+ </tableDefinition>
1169
+ <tableDefinition name="ModuleComponents">
1170
+ <columnDefinition name="Component" type="string" length="72" primaryKey="yes" modularize="column"
1171
+ keyTable="Component" keyColumn="1" category="identifier" description="Component contained in the module."/>
1172
+ <columnDefinition name="ModuleID" type="string" length="72" primaryKey="yes" modularize="column"
1173
+ keyTable="ModuleSignature" keyColumn="1" category="identifier" description="Module containing the component."/>
1174
+ <columnDefinition name="Language" type="number" length="2" primaryKey="yes" localizable="yes"
1175
+ keyTable="ModuleSignature" keyColumn="2" description="Default language ID for module (may be changed by transform)."/>
1176
+ </tableDefinition>
1177
+ <tableDefinition name="ModuleSignature">
1178
+ <columnDefinition name="ModuleID" type="string" length="72" primaryKey="yes" modularize="column"
1179
+ category="identifier" description="Module identifier (String.GUID)."/>
1180
+ <columnDefinition name="Language" type="number" length="2" primaryKey="yes" localizable="yes"
1181
+ description="Default decimal language of module."/>
1182
+ <columnDefinition name="Version" type="string" length="32"
1183
+ category="version" description="Version of the module."/>
1184
+ </tableDefinition>
1185
+ <tableDefinition name="ModuleConfiguration">
1186
+ <columnDefinition name="Name" type="string" length="72" primaryKey="yes"
1187
+ category="identifier" description="Unique identifier for this row."/>
1188
+ <columnDefinition name="Format" type="number" length="2"
1189
+ minValue="0" maxValue="3" description="Format of this item."/>
1190
+ <columnDefinition name="Type" type="string" length="72" nullable="yes"
1191
+ category="identifier" description="Additional type information for this item."/>
1192
+ <columnDefinition name="ContextData" type="localized" length="0" nullable="yes"
1193
+ category="text" description="Additional context information about this item."/>
1194
+ <columnDefinition name="DefaultValue" type="localized" length="0" nullable="yes"
1195
+ category="text" description="Default value for this item."/>
1196
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes"
1197
+ minValue="0" maxValue="3" description="Additional type-specific attributes."/>
1198
+ <columnDefinition name="DisplayName" type="localized" length="72" nullable="yes"
1199
+ category="text" description="A short human-readable name for this item."/>
1200
+ <columnDefinition name="Description" type="localized" length="0" nullable="yes"
1201
+ category="text" description="A human-readable description."/>
1202
+ <columnDefinition name="HelpLocation" type="string" length="0" nullable="yes"
1203
+ category="text" description="Filename or namespace of the context-sensitive help for this item."/>
1204
+ <columnDefinition name="HelpKeyword" type="string" length="0" nullable="yes"
1205
+ category="text" description="Keyword index into the HelpLocation for this item."/>
1206
+ </tableDefinition>
1207
+ <tableDefinition name="ModuleDependency">
1208
+ <columnDefinition name="ModuleID" type="string" length="72" primaryKey="yes" modularize="column"
1209
+ keyTable="ModuleSignature" keyColumn="1" category="identifier" description="Module requiring the dependency."/>
1210
+ <columnDefinition name="ModuleLanguage" type="number" length="2" primaryKey="yes" localizable="yes"
1211
+ keyTable="ModuleSignature" keyColumn="2" description="Language of module requiring the dependency."/>
1212
+ <columnDefinition name="RequiredID" type="string" length="72" primaryKey="yes"
1213
+ description="String.GUID of required module."/>
1214
+ <columnDefinition name="RequiredLanguage" type="number" length="2" primaryKey="yes" localizable="yes"
1215
+ description="LanguageID of the required module."/>
1216
+ <columnDefinition name="RequiredVersion" type="string" length="32" nullable="yes"
1217
+ category="version" description="Version of the required version."/>
1218
+ </tableDefinition>
1219
+ <tableDefinition name="ModuleExclusion">
1220
+ <columnDefinition name="ModuleID" type="string" length="72" primaryKey="yes" modularize="column"
1221
+ keyTable="ModuleSignature" keyColumn="1" category="identifier" description="String.GUID of module with exclusion requirement."/>
1222
+ <columnDefinition name="ModuleLanguage" type="number" length="2" primaryKey="yes" localizable="yes"
1223
+ keyTable="ModuleSignature" keyColumn="2" description="LanguageID of module with exclusion requirement."/>
1224
+ <columnDefinition name="ExcludedID" type="string" length="72" primaryKey="yes"
1225
+ description="String.GUID of excluded module."/>
1226
+ <columnDefinition name="ExcludedLanguage" type="number" length="2" primaryKey="yes" localizable="yes"
1227
+ description="Language of excluded module."/>
1228
+ <columnDefinition name="ExcludedMinVersion" type="string" length="32" nullable="yes"
1229
+ category="version" description="Minimum version of excluded module."/>
1230
+ <columnDefinition name="ExcludedMaxVersion" type="string" length="32" nullable="yes"
1231
+ category="version" description="Maximum version of excluded module."/>
1232
+ </tableDefinition>
1233
+ <tableDefinition name="ModuleIgnoreTable">
1234
+ <columnDefinition name="Table" type="string" length="72" primaryKey="yes"
1235
+ category="identifier" description="Table name to ignore during merge operation."/>
1236
+ </tableDefinition>
1237
+ <tableDefinition name="ModuleInstallExecuteSequence">
1238
+ <columnDefinition name="Action" type="string" length="64" primaryKey="yes" modularize="column"
1239
+ category="identifier" description="Action to insert"/>
1240
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1241
+ minValue="-4" maxValue="32767" description="Standard Sequence number"/>
1242
+ <columnDefinition name="BaseAction" type="string" length="64" nullable="yes" modularize="column"
1243
+ keyTable="ModuleInstallExecuteSequence" keyColumn="1" category="identifier" description="Base action to determine insert location."/>
1244
+ <columnDefinition name="After" type="number" length="2" nullable="yes"
1245
+ minValue="0" maxValue="1" description="Before (0) or After (1)"/>
1246
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
1247
+ category="condition"/>
1248
+ </tableDefinition>
1249
+ <tableDefinition name="ModuleInstallUISequence">
1250
+ <columnDefinition name="Action" type="string" length="64" primaryKey="yes" modularize="column"
1251
+ category="identifier" description="Action to insert"/>
1252
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"
1253
+ minValue="-4" maxValue="32767" description="Standard Sequence number"/>
1254
+ <columnDefinition name="BaseAction" type="string" length="64" nullable="yes" modularize="column"
1255
+ keyTable="ModuleInstallUISequence" keyColumn="1" category="identifier" description="Base action to determine insert location."/>
1256
+ <columnDefinition name="After" type="number" length="2" nullable="yes"
1257
+ minValue="0" maxValue="1" description="Before (0) or After (1)"/>
1258
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" modularize="condition" localizable="yes"
1259
+ category="condition"/>
1260
+ </tableDefinition>
1261
+ <tableDefinition name="ModuleSubstitution">
1262
+ <columnDefinition name="Table" type="string" length="72" primaryKey="yes"
1263
+ category="identifier" description="Table containing the data to be modified."/>
1264
+ <columnDefinition name="Row" type="string" length="0" primaryKey="yes" modularize="semicolonDelimited"
1265
+ category="text" description="Row containing the data to be modified."/>
1266
+ <columnDefinition name="Column" type="string" length="72" primaryKey="yes"
1267
+ category="identifier" description="Column containing the data to be modified."/>
1268
+ <columnDefinition name="Value" type="localized" length="0" nullable="yes"
1269
+ category="text" description="Template for modification data."/>
1270
+ </tableDefinition>
1271
+ <tableDefinition name="Properties">
1272
+ <columnDefinition name="Name" type="string" length="72" primaryKey="yes"
1273
+ category="text" description="Primary key, non-localized token"/>
1274
+ <columnDefinition name="Value" type="string" length="0"
1275
+ category="text" description="Value of the property"/>
1276
+ </tableDefinition>
1277
+ <tableDefinition name="ImageFamilies">
1278
+ <columnDefinition name="Family" type="string" length="8" primaryKey="yes"
1279
+ category="text" description="Primary key"/>
1280
+ <columnDefinition name="MediaSrcPropName" type="string" length="72" nullable="yes"
1281
+ category="text"/>
1282
+ <columnDefinition name="MediaDiskId" type="number" length="0" nullable="yes"
1283
+ category="integer"/>
1284
+ <columnDefinition name="FileSequenceStart" type="number" length="4" nullable="yes"
1285
+ minValue="1" maxValue="214743647" category="integer"/>
1286
+ <columnDefinition name="DiskPrompt" type="string" length="128" nullable="yes" escapeIdtCharacters="yes" localizable="yes"
1287
+ category="text"/>
1288
+ <columnDefinition name="VolumeLabel" type="string" length="32" nullable="yes"
1289
+ category="text"/>
1290
+ </tableDefinition>
1291
+ <tableDefinition name="UpgradedImages">
1292
+ <columnDefinition name="Upgraded" type="string" length="13" primaryKey="yes"
1293
+ category="text" description="Primary key"/>
1294
+ <columnDefinition name="MsiPath" type="string" length="255"
1295
+ category="text"/>
1296
+ <columnDefinition name="PatchMsiPath" type="string" length="255" nullable="yes"
1297
+ category="text"/>
1298
+ <columnDefinition name="SymbolPaths" type="string" length="255" nullable="yes"
1299
+ category="text"/>
1300
+ <columnDefinition name="Family" type="string" length="8"
1301
+ keyTable="ImageFamilies" keyColumn="1" category="text" description="Foreign key, Family to which this image belongs"/>
1302
+ </tableDefinition>
1303
+ <tableDefinition name="UpgradedFilesToIgnore">
1304
+ <columnDefinition name="Upgraded" type="string" length="13" primaryKey="yes"
1305
+ keyTable="UpgradedImages" keyColumn="1" category="text" description="Foreign key, Upgraded image"/>
1306
+ <columnDefinition name="FTK" type="string" length="255" primaryKey="yes" modularize="column"
1307
+ keyTable="File" keyColumn="1" category="text" description="Foreign key, File to ignore"/>
1308
+ </tableDefinition>
1309
+ <tableDefinition name="UpgradedFiles_OptionalData">
1310
+ <columnDefinition name="Upgraded" type="string" length="13" primaryKey="yes"
1311
+ keyTable="UpgradedImages" keyColumn="1" category="text" description="Foreign key, Upgraded image"/>
1312
+ <columnDefinition name="FTK" type="string" length="255" primaryKey="yes" modularize="column"
1313
+ keyTable="File" keyColumn="1" category="text" description="Foreign key, File to ignore"/>
1314
+ <columnDefinition name="SymbolPaths" type="string" length="255" nullable="yes"
1315
+ category="text"/>
1316
+ <columnDefinition name="AllowIgnoreOnPatchError" type="number" length="0" nullable="yes"
1317
+ category="integer"/>
1318
+ <columnDefinition name="IncludeWholeFile" type="number" length="0" nullable="yes"
1319
+ category="integer"/>
1320
+ </tableDefinition>
1321
+ <tableDefinition name="TargetImages" createSymbols="yes">
1322
+ <columnDefinition name="Target" type="string" length="13" primaryKey="yes"
1323
+ category="text"/>
1324
+ <columnDefinition name="MsiPath" type="string" length="255"
1325
+ category="text"/>
1326
+ <columnDefinition name="SymbolPaths" type="string" length="255" nullable="yes"
1327
+ category="text"/>
1328
+ <columnDefinition name="Upgraded" type="string" length="13"
1329
+ keyTable="UpgradedImages" keyColumn="1" category="text" description="Foreign key, Upgraded image"/>
1330
+ <columnDefinition name="Order" type="number" length="0"
1331
+ category="integer"/>
1332
+ <columnDefinition name="ProductValidateFlags" type="string" length="16" nullable="yes"
1333
+ category="text"/>
1334
+ <columnDefinition name="IgnoreMissingSrcFiles" type="number" length="0"
1335
+ category="integer"/>
1336
+ </tableDefinition>
1337
+ <tableDefinition name="TargetFiles_OptionalData">
1338
+ <columnDefinition name="Target" type="string" length="13" primaryKey="yes"
1339
+ keyTable="TargetImages" keyColumn="1" category="text" description="Foreign key, Target image"/>
1340
+ <columnDefinition name="FTK" type="string" length="255" primaryKey="yes" modularize="column"
1341
+ keyTable="File" keyColumn="1" category="text" description="Foreign key, File to ignore"/>
1342
+ <columnDefinition name="SymbolPaths" type="string" length="255" nullable="yes"
1343
+ category="text"/>
1344
+ <columnDefinition name="IgnoreOffsets" type="string" length="255" nullable="yes"
1345
+ category="text"/>
1346
+ <columnDefinition name="IgnoreLengths" type="string" length="255" nullable="yes"
1347
+ category="text"/>
1348
+ <columnDefinition name="RetainOffsets" type="string" length="255" nullable="yes"
1349
+ category="text"/>
1350
+ </tableDefinition>
1351
+ <tableDefinition name="FamilyFileRanges">
1352
+ <columnDefinition name="Family" type="string" length="8" primaryKey="yes"
1353
+ keyTable="ImageFamilies" keyColumn="1" category="text" description="Foreign key, Family"/>
1354
+ <columnDefinition name="FTK" type="string" length="255" primaryKey="yes" modularize="column"
1355
+ keyTable="File" keyColumn="1" category="text" description="Foreign key, File to ignore"/>
1356
+ <columnDefinition name="RetainOffsets" type="string" length="128"
1357
+ category="text"/>
1358
+ <columnDefinition name="RetainLengths" type="string" length="128"
1359
+ category="text"/>
1360
+ </tableDefinition>
1361
+ <tableDefinition name="ExternalFiles">
1362
+ <columnDefinition name="Family" type="string" length="8" primaryKey="yes"
1363
+ keyTable="ImageFamilies" keyColumn="1" category="text" description="Foreign key, Family"/>
1364
+ <columnDefinition name="FTK" type="string" length="255" primaryKey="yes" modularize="column"
1365
+ keyTable="File" keyColumn="1" category="text" description="Foreign key, File to ignore"/>
1366
+ <columnDefinition name="FilePath" type="string" length="255" primaryKey="yes"
1367
+ category="text"/>
1368
+ <columnDefinition name="SymbolPaths" type="string" length="255" nullable="yes"
1369
+ category="text"/>
1370
+ <columnDefinition name="IgnoreOffsets" type="string" length="255" nullable="yes"
1371
+ category="text"/>
1372
+ <columnDefinition name="IgnoreLengths" type="string" length="255" nullable="yes"
1373
+ category="text"/>
1374
+ <columnDefinition name="RetainOffsets" type="string" length="255" nullable="yes"
1375
+ category="text"/>
1376
+ <columnDefinition name="Order" type="number" length="0"
1377
+ category="integer"/>
1378
+ </tableDefinition>
1379
+ <tableDefinition name="WixAction" createSymbols="yes" unreal="yes">
1380
+ <columnDefinition name="SequenceTable" type="string" length="62" primaryKey="yes"/>
1381
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"/>
1382
+ <columnDefinition name="Condition" type="string" length="255" nullable="yes" localizable="yes"/>
1383
+ <columnDefinition name="Sequence" type="number" length="2" nullable="yes"/>
1384
+ <columnDefinition name="Before" type="string" length="72" nullable="yes"/>
1385
+ <columnDefinition name="After" type="string" length="72" nullable="yes"/>
1386
+ <columnDefinition name="Overridable" type="number" length="2" nullable="yes"/>
1387
+ </tableDefinition>
1388
+ <tableDefinition name="WixBBControl" createSymbols="yes" unreal="yes">
1389
+ <columnDefinition name="Billboard_" type="string" length="50" primaryKey="yes" modularize="column"/>
1390
+ <columnDefinition name="BBControl_" type="string" length="50" primaryKey="yes"/>
1391
+ <columnDefinition name="SourceFile" type="object" length="0"/>
1392
+ </tableDefinition>
1393
+ <tableDefinition name="WixComplexReference" unreal="yes">
1394
+ <columnDefinition name="Parent" type="string" length="0" localizable="yes"/>
1395
+ <columnDefinition name="ParentAttributes" type="number" length="4"/>
1396
+ <columnDefinition name="ParentLanguage" type="string" length="0" nullable="yes"/>
1397
+ <columnDefinition name="Child" type="string" length="0" localizable="yes"/>
1398
+ <columnDefinition name="ChildAttributes" type="number" length="4"/>
1399
+ <columnDefinition name="Attributes" type="number" length="4"/>
1400
+ </tableDefinition>
1401
+ <tableDefinition name="WixComponentGroup" createSymbols="yes" unreal="yes">
1402
+ <columnDefinition name="WixComponentGroup" type="string" length="0" primaryKey="yes"/>
1403
+ </tableDefinition>
1404
+ <tableDefinition name="WixControl" unreal="yes">
1405
+ <columnDefinition name="Dialog_" type="string" length="72" primaryKey="yes" modularize="column"/>
1406
+ <columnDefinition name="Control_" type="string" length="50" primaryKey="yes"/>
1407
+ <columnDefinition name="SourceFile" type="object" length="0"/>
1408
+ </tableDefinition>
1409
+ <tableDefinition name="WixCustomRow" unreal="yes">
1410
+ <columnDefinition name="Table" type="string" length="62"/>
1411
+ <columnDefinition name="FieldData" type="string" length="0"/>
1412
+ </tableDefinition>
1413
+ <tableDefinition name="WixCustomTable" createSymbols="yes" unreal="yes">
1414
+ <columnDefinition name="Table" type="string" length="62" primaryKey="yes"/>
1415
+ <columnDefinition name="ColumnCount" type="number" length="2"/>
1416
+ <columnDefinition name="ColumnNames" type="string" length="0"/>
1417
+ <columnDefinition name="ColumnTypes" type="string" length="0"/>
1418
+ <columnDefinition name="PrimaryKeys" type="string" length="0"/>
1419
+ <columnDefinition name="MinValues" type="string" length="0"/>
1420
+ <columnDefinition name="MaxValues" type="string" length="0"/>
1421
+ <columnDefinition name="KeyTables" type="string" length="0"/>
1422
+ <columnDefinition name="KeyColumns" type="string" length="0"/>
1423
+ <columnDefinition name="Categories" type="string" length="0"/>
1424
+ <columnDefinition name="Sets" type="string" length="0"/>
1425
+ <columnDefinition name="Descriptions" type="string" length="0"/>
1426
+ <columnDefinition name="Modularizations" type="string" length="0"/>
1427
+ <columnDefinition name="BootstrapperApplicationData" type="number" length="2"/>
1428
+ </tableDefinition>
1429
+ <tableDefinition name="WixDirectory" unreal="yes">
1430
+ <columnDefinition name="Directory_" type="string" length="0" primaryKey="yes" modularize="column"/>
1431
+ <columnDefinition name="ComponentGuidGenerationSeed" type="string" length="38" nullable="yes"/>
1432
+ </tableDefinition>
1433
+ <tableDefinition name="WixEnsureTable" unreal="yes">
1434
+ <columnDefinition name="Table" type="string" length="31"/>
1435
+ </tableDefinition>
1436
+ <tableDefinition name="WixFeatureGroup" createSymbols="yes" unreal="yes">
1437
+ <columnDefinition name="WixFeatureGroup" type="string" length="0" primaryKey="yes"/>
1438
+ </tableDefinition>
1439
+ <tableDefinition name="WixPatchFamilyGroup" createSymbols="yes" unreal="yes">
1440
+ <columnDefinition name="WixPatchFamilyGroup" type="string" length="0" primaryKey="yes"/>
1441
+ </tableDefinition>
1442
+ <tableDefinition name="WixGroup" unreal="yes">
1443
+ <columnDefinition name="ParentId" type="string" length="0" primaryKey="yes" nullable="no" category="identifier"
1444
+ description="Primary key used to identify a particular record in a parent table."/>
1445
+ <columnDefinition name="ParentType" type="string" length="0" primaryKey="yes" nullable="no"
1446
+ description="Primary key used to identify a particular parent type in a parent table."/>
1447
+ <columnDefinition name="ChildId" type="string" length="0" primaryKey="yes" nullable="no" category="identifier"
1448
+ description="Primary key used to identify a particular record in a child table."/>
1449
+ <columnDefinition name="ChildType" type="string" length="0" primaryKey="yes" nullable="no"
1450
+ description="Primary key used to identify a particular child type in a child table."/>
1451
+ </tableDefinition>
1452
+ <tableDefinition name="WixFeatureModules" unreal="yes">
1453
+ <columnDefinition name="Feature_" type="string" length="38" primaryKey="yes"/>
1454
+ <columnDefinition name="WixMerge_" type="string" length="72" primaryKey="yes"/>
1455
+ </tableDefinition>
1456
+ <tableDefinition name="WixFile" unreal="yes">
1457
+ <columnDefinition name="File_" type="string" length="0" category="identifier" primaryKey="yes"
1458
+ modularize="column" keyTable="File" keyColumn="1" />
1459
+ <columnDefinition name="AssemblyType" type="number" length="2" minValue="0" maxValue="1" />
1460
+ <columnDefinition name="File_AssemblyManifest" type="string" length="72" category="identifier" nullable="yes"
1461
+ modularize="column" keyTable="File" keyColumn="1" />
1462
+ <columnDefinition name="File_AssemblyApplication" type="string" length="72" category="identifier" nullable="yes"
1463
+ modularize="column" keyTable="File" keyColumn="1" />
1464
+ <columnDefinition name="Directory_" type="string" length="72" modularize="column" keyTable="Directory" keyColumn="1" />
1465
+ <columnDefinition name="DiskId" type="number" length="4" nullable="yes"/>
1466
+ <columnDefinition name="Source" type="object" length="0"/>
1467
+ <columnDefinition name="ProcessorArchitecture" type="string" length="0" nullable="yes"/>
1468
+ <columnDefinition name="PatchGroup" type="number" length="4" />
1469
+ <columnDefinition name="Attributes" type="number" length="4"/>
1470
+ <columnDefinition name="PatchAttributes" type="number" length="4" nullable="yes"/>
1471
+ <columnDefinition name="DeltaPatchHeaderSource" type="string" length="0"/>
1472
+ </tableDefinition>
1473
+ <tableDefinition name="WixBindUpdatedFiles" unreal="yes">
1474
+ <columnDefinition name="File_" type="string" length="0" primaryKey="yes" modularize="column" keyTable="File" keyColumn="1" category="identifier" />
1475
+ </tableDefinition>
1476
+ <tableDefinition name="WixBuildInfo" unreal="yes">
1477
+ <columnDefinition name="WixVersion" type="string" length="20"
1478
+ category="text" description="Version number of WiX."/>
1479
+ <columnDefinition name="WixOutputFile" type="string" length="0" nullable="yes" escapeIdtCharacters="yes"
1480
+ category="text" description="Path to output file, if supplied."/>
1481
+ <columnDefinition name="WixProjectFile" type="string" length="0" nullable="yes" escapeIdtCharacters="yes"
1482
+ category="text" description="Path to .wixproj file, if supplied."/>
1483
+ <columnDefinition name="WixPdbFile" type="string" length="0" nullable="yes" escapeIdtCharacters="yes"
1484
+ category="text" description="Path to .wixpdb file, if supplied."/>
1485
+ </tableDefinition>
1486
+ <tableDefinition name="WixFragment" createSymbols="yes" unreal="yes">
1487
+ <columnDefinition name="WixFragment" type="string" length="0" primaryKey="yes"/>
1488
+ </tableDefinition>
1489
+ <tableDefinition name="WixInstanceComponent" unreal="yes">
1490
+ <columnDefinition name="Component_" type="string" length="0" primaryKey="yes" modularize="column"/>
1491
+ </tableDefinition>
1492
+ <tableDefinition name="WixInstanceTransforms" unreal="yes" createSymbols="yes">
1493
+ <columnDefinition name="Id" type="string" length="0" primaryKey="yes"/>
1494
+ <columnDefinition name="PropertyId" type="string" length="0"/>
1495
+ <columnDefinition name="ProductCode" type="string" length="0" category="guid"/>
1496
+ <columnDefinition name="ProductName" type="localized" localizable="yes" length="0" nullable="yes"/>
1497
+ <columnDefinition name="UpgradeCode" type="string" length="38" category="guid" nullable="yes"/>
1498
+ </tableDefinition>
1499
+ <tableDefinition name="WixMedia" unreal="yes">
1500
+ <columnDefinition name="DiskId_" type="number" length="2" primaryKey="yes"/>
1501
+ <columnDefinition name="CompressionLevel" type="number" length="2" nullable="yes" minValue="0" maxValue="4" />
1502
+ <columnDefinition name="Layout" type="string" length="0" nullable="yes"/>
1503
+ </tableDefinition>
1504
+ <tableDefinition name="WixMediaTemplate" unreal="yes">
1505
+ <columnDefinition name="CabinetTemplate" type="string" length="0" nullable="yes"/>
1506
+ <columnDefinition name="CompressionLevel" type="number" length="2" nullable="yes" minValue="0" maxValue="4" />
1507
+ <columnDefinition name="DiskPrompt" type="string" length="0" nullable="yes"/>
1508
+ <columnDefinition name="VolumeLabel" type="string" length="0" nullable="yes"/>
1509
+ <columnDefinition name="MaximumUncompressedMediaSize" type="number" length="4" />
1510
+ <columnDefinition name="MaximumCabinetSizeForLargeFileSplitting" type="number" length="4" />
1511
+ </tableDefinition>
1512
+ <tableDefinition name="WixMerge" createSymbols="yes" unreal="yes">
1513
+ <columnDefinition name="WixMerge" type="string" length="72" primaryKey="yes"/>
1514
+ <columnDefinition name="Language" type="number" length="2" localizable="yes"/>
1515
+ <columnDefinition name="Directory_" type="string" nullable="yes" length="72"/>
1516
+ <columnDefinition name="SourceFile" type="object" length="0"/>
1517
+ <columnDefinition name="DiskId" type="number" length="2"/>
1518
+ <columnDefinition name="FileCompression" type="number" length="2" nullable="yes"/>
1519
+ <columnDefinition name="ConfigurationData" type="string" length="255" nullable="yes"/>
1520
+ <columnDefinition name="Feature_" type="string" length="72"/>
1521
+ </tableDefinition>
1522
+ <tableDefinition name="WixOrdering" createSymbols="yes" unreal="yes">
1523
+ <columnDefinition name="ItemType" type="string" length="0" primaryKey="yes" nullable="no"
1524
+ description="Primary key used to identify the item in another table."/>
1525
+ <columnDefinition name="ItemId_" type="string" length="72" category="identifier" primaryKey="yes"
1526
+ description="Reference to an entry in another table."/>
1527
+ <columnDefinition name="DependsOnType" type="string" length="0" primaryKey="yes" nullable="no"
1528
+ description="Primary key used to identify the item in another table."/>
1529
+ <columnDefinition name="DependsOnId_" type="string" length="72" category="identifier" primaryKey="yes"
1530
+ description="Reference to an entry in another table."/>
1531
+ </tableDefinition>
1532
+ <tableDefinition name="WixDeltaPatchFile" unreal="yes">
1533
+ <columnDefinition name="File_" type="string" length="72" primaryKey="yes" modularize="column" keyTable="File" keyColumn="1" />
1534
+ <columnDefinition name="RetainLengths" type="preserved" length="0" nullable="yes" category="text"/>
1535
+ <columnDefinition name="IgnoreOffsets" type="preserved" length="0" nullable="yes" category="text"/>
1536
+ <columnDefinition name="IgnoreLengths" type="preserved" length="0" nullable="yes" category="text"/>
1537
+ <columnDefinition name="RetainOffsets" type="preserved" length="0" nullable="yes" category="text"/>
1538
+ <columnDefinition name="SymbolPaths" type="preserved" length="0" nullable="yes" category="text"/>
1539
+ </tableDefinition>
1540
+ <tableDefinition name="WixDeltaPatchSymbolPaths" unreal="yes">
1541
+ <columnDefinition name="Id" type="string" length="72" primaryKey="yes" />
1542
+ <columnDefinition name="Type" type="number" length="2" primaryKey="yes" minValue="0" maxValue="4" />
1543
+ <columnDefinition name="SymbolPaths" type="preserved" length="0" category="text"/>
1544
+ </tableDefinition>
1545
+ <tableDefinition name="WixProperty" unreal="yes">
1546
+ <columnDefinition name="Property_" type="string" length="72" modularize="column"/>
1547
+ <columnDefinition name="Attributes" type="number" length="4"/>
1548
+ </tableDefinition>
1549
+ <tableDefinition name="WixSimpleReference" unreal="yes">
1550
+ <columnDefinition name="Table" type="string" length="32"/>
1551
+ <columnDefinition name="PrimaryKeys" type="string" length="0"/>
1552
+ </tableDefinition>
1553
+ <tableDefinition name="WixSuppressAction" unreal="yes">
1554
+ <columnDefinition name="SequenceTable" type="string" length="72" primaryKey="yes"/>
1555
+ <columnDefinition name="Action" type="string" length="72" primaryKey="yes"/>
1556
+ </tableDefinition>
1557
+ <tableDefinition name="WixSuppressModularization" unreal="yes">
1558
+ <columnDefinition name="WixSuppressModularization" type="string" length="72"/>
1559
+ </tableDefinition>
1560
+ <tableDefinition name="WixPatchBaseline" unreal="yes">
1561
+ <columnDefinition name="WixPatchBaseline" type="string" length="72" primaryKey="yes"
1562
+ category="identifier" description="Primary key used to identify sets of transforms in a patch."/>
1563
+ <columnDefinition name="DiskId" type="number" length="2"/>
1564
+ <columnDefinition name="ValidationFlags" type="number" length="4" category="integer" description="Patch transform validation flags for the associated patch baseline."/>
1565
+ </tableDefinition>
1566
+ <tableDefinition name="WixPatchRef" unreal="yes">
1567
+ <columnDefinition name="Table" type="string" length="32"/>
1568
+ <columnDefinition name="PrimaryKeys" type="string" length="0"/>
1569
+ </tableDefinition>
1570
+ <tableDefinition name="WixPatchId" unreal="yes">
1571
+ <columnDefinition name="ProductCode" type="string" length="38" nullable="no"/>
1572
+ <columnDefinition name="ClientPatchId" type="string" length="72" nullable="no"/>
1573
+ <columnDefinition name="OptimizePatchSizeForLargeFiles" type="number" length="2" nullable="yes"
1574
+ minValue="0" maxValue="1"/>
1575
+ <columnDefinition name="ApiPatchingSymbolFlags" type="number" length="4" nullable="yes"
1576
+ minValue="0" maxValue="7"/>
1577
+ </tableDefinition>
1578
+ <tableDefinition name="WixPatchTarget" unreal="yes">
1579
+ <columnDefinition name="ProductCode" type="string" length="38" nullable="no" />
1580
+ </tableDefinition>
1581
+ <tableDefinition name="WixPatchMetadata" unreal="yes">
1582
+ <columnDefinition name="Property" type="string" length="72" primaryKey="yes"/>
1583
+ <columnDefinition name="Value" type="localized" length="0"/>
1584
+ </tableDefinition>
1585
+ <tableDefinition name="WixUI" createSymbols="yes" unreal="yes">
1586
+ <columnDefinition name="WixUI" type="string" length="0" primaryKey="yes"/>
1587
+ </tableDefinition>
1588
+ <tableDefinition name="WixVariable" unreal="yes">
1589
+ <columnDefinition name="WixVariable" type="string" length="0"/>
1590
+ <columnDefinition name="Value" type="localized" length="0" nullable="yes"/>
1591
+ <columnDefinition name="Attributes" type="number" length="4"/>
1592
+ </tableDefinition>
1593
+ <tableDefinition name="WixBundleContainer" createSymbols="yes" unreal="yes">
1594
+ <columnDefinition name="WixBundleContainer" type="string" length="0" category="identifier" primaryKey="yes"/>
1595
+ <columnDefinition name="Name" type="string" length="0"/>
1596
+ <columnDefinition name="Type" type="number" length="2" minValue="0" maxValue="1" />
1597
+ <columnDefinition name="DownloadUrl" type="string" length="0" nullable="yes" />
1598
+ <columnDefinition name="Size" type="number" length="4" minValue="0" nullable="yes" />
1599
+ <columnDefinition name="Hash" type="string" length="0" nullable="yes" />
1600
+ <columnDefinition name="AttachedContainerIndex" type="number" length="2" nullable="yes" />
1601
+ <columnDefinition name="WorkingPath" type="string" length="0" nullable="yes" />
1602
+ </tableDefinition>
1603
+ <tableDefinition name="WixBundlePayloadGroup" createSymbols="yes" unreal="yes">
1604
+ <columnDefinition name="WixBundlePayloadGroup" type="string" length="0" category="identifier" primaryKey="yes"/>
1605
+ </tableDefinition>
1606
+ <tableDefinition name="WixBundlePayload" createSymbols="yes" unreal="yes">
1607
+ <columnDefinition name="WixBundlePayload" type="string" length="0" category="identifier" primaryKey="yes"/>
1608
+ <columnDefinition name="Name" type="string" length="0" nullable="yes"/>
1609
+ <columnDefinition name="SourceFile" type="object" length="0" nullable="yes"/>
1610
+ <columnDefinition name="DownloadUrl" type="string" length="0" nullable="yes" />
1611
+ <columnDefinition name="Compressed" type="number" length="2" minValue="0" maxValue="2" />
1612
+ <columnDefinition name="UnresolvedSourceFile" type="string" length="0" nullable="yes" />
1613
+ <columnDefinition name="DisplayName" type="string" length="0" nullable="yes" />
1614
+ <columnDefinition name="Description" type="string" length="0" nullable="yes" />
1615
+ <columnDefinition name="EnableSignatureValidation" type="number" length="2" nullable="yes" minValue="0" maxValue="1" />
1616
+ <columnDefinition name="FileSize" type="number" length="4" minValue="0" maxValue="2147483647" nullable="yes" />
1617
+ <columnDefinition name="Version" type="string" length="24" nullable="yes" />
1618
+ <columnDefinition name="Hash" type="string" length="0" nullable="yes" />
1619
+ <columnDefinition name="PublicKey" type="string" length="0" nullable="yes" />
1620
+ <columnDefinition name="Thumbprint" type="string" length="0" nullable="yes" />
1621
+ <columnDefinition name="Catalog_" type="string" length="0" nullable="yes" category="identifier"
1622
+ keyTable="WixBundleCatalog" keyColumn="1" description="Reference to a catalog entry in the WixBundleCatalog table."/>
1623
+ <columnDefinition name="Container_" type="string" length="0" nullable="yes"
1624
+ keyTable="WixBundleContainer" keyColumn="1" description="Reference to a container entry in the WixBundleContainer table."/>
1625
+ <columnDefinition name="Package" type="string" length="0" nullable="yes" />
1626
+ <columnDefinition name="ContentFile" type="number" length="2" nullable="yes" minValue="0" maxValue="1" />
1627
+ <columnDefinition name="EmbeddedId" type="string" length="0" nullable="yes" />
1628
+ <columnDefinition name="LayoutOnly" type="number" length="2" nullable="yes" minValue="0" maxValue="1" />
1629
+ <columnDefinition name="Packaging" type="number" length="2" nullable="yes" minValue="1" maxValue="2" />
1630
+ <columnDefinition name="ParentPackagePayload_" type="string" length="0" nullable="yes" />
1631
+ </tableDefinition>
1632
+ <tableDefinition name="WixBundlePatchTargetCode" createSymbols="yes" unreal="yes">
1633
+ <columnDefinition name="PackageId" type="string" length="0" category="identifier" primaryKey="yes" />
1634
+ <columnDefinition name="TargetCode" type="string" length="0" nullable="yes" primaryKey="yes" />
1635
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes" minValue="0" maxValue="2147483647" />
1636
+ </tableDefinition>
1637
+ <tableDefinition name="WixBundle" unreal="yes">
1638
+ <columnDefinition name="Version" type="string" length="24" />
1639
+ <columnDefinition name="Copyright" type="string" length="0" nullable="yes" />
1640
+ <columnDefinition name="Name" type="string" length="0" nullable="yes" />
1641
+ <columnDefinition name="AboutUrl" type="string" length="0" nullable="yes" />
1642
+ <columnDefinition name="DisableModify" type="number" length="2" nullable="yes" minValue="0" maxValue="2"/>
1643
+ <columnDefinition name="DisableRemove" type="number" length="2" nullable="yes" minValue="0" maxValue="1"/>
1644
+ <columnDefinition name="DisableRepair" type="number" length="2" nullable="yes" minValue="0" maxValue="1"/>
1645
+ <columnDefinition name="HelpTelephone" type="string" length="0" nullable="yes" />
1646
+ <columnDefinition name="HelpUrl" type="string" length="0" nullable="yes" />
1647
+ <columnDefinition name="Manufacturer" type="string" length="0" nullable="yes" />
1648
+ <columnDefinition name="UpdateUrl" type="string" length="0" nullable="yes" />
1649
+ <columnDefinition name="Compressed" type="number" length="2" nullable="yes" minValue="0" maxValue="1" />
1650
+ <columnDefinition name="LogPrefixAndExtension" type="string" length="0" nullable="yes" />
1651
+ <columnDefinition name="IconSourceFile" type="object" length="0" nullable="yes" />
1652
+ <columnDefinition name="SplashScreenSourceFile" type="object" length="0" nullable="yes" />
1653
+ <columnDefinition name="Condition" type="string" length="0" nullable="yes" />
1654
+ <columnDefinition name="Tag" type="string" length="0" nullable="yes" />
1655
+ <columnDefinition name="Platform" type="string" length="4" />
1656
+ <columnDefinition name="ParentName" type="string" length="0" nullable="yes" />
1657
+ <columnDefinition name="UpgradeCode" type="string" length="38" category="guid" />
1658
+ <columnDefinition name="BundleId" type="string" length="38" category="guid" description="Only valid after binding." />
1659
+ <columnDefinition name="ProviderKey" type="string" length="38" category="guid" nullable="yes" description="Only valid after binding." />
1660
+ <columnDefinition name="PerMachine" type="number" length="2" nullable="yes" minValue="0" maxValue="1" description="Only valid after binding." />
1661
+ </tableDefinition>
1662
+ <tableDefinition name="WixApprovedExeForElevation" createSymbols="yes" unreal="yes">
1663
+ <columnDefinition name="Id" type="string" length="0" category="identifier" primaryKey="yes" />
1664
+ <columnDefinition name="Key" type="string" length="0" />
1665
+ <columnDefinition name="Value" type="string" length="0" nullable="yes" />
1666
+ <columnDefinition name="Attributes" type="number" length="4" minValue="0" maxValue="1" />
1667
+ </tableDefinition>
1668
+ <tableDefinition name="WixBundleUpdate" unreal="yes">
1669
+ <columnDefinition name="Location" type="string" length="0" />
1670
+ <columnDefinition name="Attributes" type="number" length="4" nullable="yes" />
1671
+ </tableDefinition>
1672
+ <tableDefinition name="WixBootstrapperApplication" createSymbols="yes" unreal="yes">
1673
+ <columnDefinition name="Id" type="string" length="0" category="identifier" primaryKey="yes"/>
1674
+ </tableDefinition>
1675
+ <tableDefinition name="WixUpdateRegistration" unreal="yes">
1676
+ <columnDefinition name="Manufacturer" type="string" length="0" />
1677
+ <columnDefinition name="Department" type="string" length="0" nullable="yes" />
1678
+ <columnDefinition name="ProductFamily" type="string" length="0" nullable="yes" />
1679
+ <columnDefinition name="Name" type="string" length="0" />
1680
+ <columnDefinition name="Classification" type="string" length="0" />
1681
+ </tableDefinition>
1682
+ <tableDefinition name="WixBundleCatalog" createSymbols="yes" unreal="yes">
1683
+ <columnDefinition name="WixBundleCatalog" type="string" length="0" category="identifier" primaryKey="yes"/>
1684
+ <columnDefinition name="Payload_" type="string" length="0" category="identifier"
1685
+ keyTable="WixBundlePayload" keyColumn="1" description="Reference to a payload entry in the WixBundlePayload table." />
1686
+ </tableDefinition>
1687
+ <tableDefinition name="WixChain" unreal="yes">
1688
+ <columnDefinition name="Attributes" type="number" length="4" nullable="no" minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to the chain."/>
1689
+ </tableDefinition>
1690
+ <tableDefinition name="WixChainItem" createSymbols="yes" unreal="yes">
1691
+ <columnDefinition name="Id" type="string" length="0" category="identifier" primaryKey="yes"/>
1692
+ </tableDefinition>
1693
+ <tableDefinition name="WixBundleRollbackBoundary" createSymbols="yes" unreal="yes">
1694
+ <columnDefinition name="WixChainItem_" type="string" length="0" category="identifier" primaryKey="yes"
1695
+ keyTable="WixChainItem" keyColumn="1" description="Reference to a WixChainItem entry in the WixChainItem table."/>
1696
+ <columnDefinition name="Vital" type="number" length="2" nullable="yes" minValue="0" maxValue="1"/>
1697
+ <columnDefinition name="Transaction" type="number" length="2" nullable="yes" minValue="0" maxValue="1"/>
1698
+ </tableDefinition>
1699
+ <tableDefinition name="WixBundlePackageGroup" createSymbols="yes" unreal="yes">
1700
+ <columnDefinition name="WixBundlePackageGroup" type="string" length="0" category="identifier" primaryKey="yes"/>
1701
+ </tableDefinition>
1702
+ <tableDefinition name="WixBundlePackage" createSymbols="yes" unreal="yes">
1703
+ <columnDefinition name="WixChainItem_" type="string" length="0" category="identifier" primaryKey="yes"
1704
+ keyTable="WixChainItem" keyColumn="1" description="Reference to a WixChainItem entry in the WixChainItem table."/>
1705
+ <columnDefinition name="Type" type="number" length="2" minValue="0" maxValue="3" />
1706
+ <columnDefinition name="Payload_" type="string" length="0" category="identifier"
1707
+ keyTable="WixBundlePayload" keyColumn="1" description="Reference to a payload entry in the WixBundlePayload table."/>
1708
+ <columnDefinition name="Attributes" type="number" length="4" nullable="no" minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to this package."/>
1709
+ <columnDefinition name="InstallCondition" type="string" length="0" nullable="yes"/>
1710
+ <columnDefinition name="Cache" type="number" length="2" nullable="yes" minValue="0" maxValue="2"/>
1711
+ <columnDefinition name="CacheId" type="string" length="0" nullable="yes"/>
1712
+ <columnDefinition name="Vital" type="number" length="2" nullable="yes" minValue="0" maxValue="1"/>
1713
+ <columnDefinition name="PerMachine" type="number" length="2" nullable="yes" minValue="0" maxValue="2"/>
1714
+ <columnDefinition name="LogPathVariable" type="string" length="0" nullable="yes"/>
1715
+ <columnDefinition name="RollbackLogPathVariable" type="string" length="0" nullable="yes"/>
1716
+ <columnDefinition name="Size" type="number" length="4"/>
1717
+ <columnDefinition name="InstallSize" type="number" length="4"/>
1718
+ <columnDefinition name="Version" type="string" length="24" category="version" nullable="yes" />
1719
+ <columnDefinition name="Language" type="number" length="2" nullable="yes" />
1720
+ <columnDefinition name="DisplayName" type="string" length="0" nullable="yes" />
1721
+ <columnDefinition name="Description" type="string" length="0" nullable="yes" />
1722
+ <columnDefinition name="RollbackBoundary_" type="string" length="0" nullable="yes"
1723
+ keyTable="WixBundleRollbackBoundary" keyColumn="1" description="Reference to a rollback boundary entry in the WixBundleRollbackBoundary table."/>
1724
+ <columnDefinition name="RollbackBoundaryBackward_" type="string" length="0" nullable="yes"
1725
+ keyTable="WixBundleRollbackBoundary" keyColumn="1" description="Reference to a rollback boundary entry in the WixBundleRollbackBoundary table."/>
1726
+ <columnDefinition name="x64" type="number" length="2" nullable="yes" minValue="0" maxValue="1"/>
1727
+ </tableDefinition>
1728
+ <tableDefinition name="WixBundleExePackage" createSymbols="yes" unreal="yes">
1729
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1730
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1731
+ <columnDefinition name="Attributes" type="number" length="4" nullable="no" minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to this MSI package."/>
1732
+ <columnDefinition name="DetectCondition" type="string" length="0" nullable="yes"/>
1733
+ <columnDefinition name="InstallCommand" type="string" length="0" nullable="yes"/>
1734
+ <columnDefinition name="RepairCommand" type="string" length="0" nullable="yes"/>
1735
+ <columnDefinition name="UninstallCommand" type="string" length="0" nullable="yes"/>
1736
+ <columnDefinition name="ExeProtocol" type="string" length="0" nullable="yes"/>
1737
+ </tableDefinition>
1738
+ <tableDefinition name="WixBundleMsiPackage" createSymbols="yes" unreal="yes">
1739
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1740
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1741
+ <columnDefinition name="Attributes" type="number" length="4" nullable="no" minValue="0" maxValue="2147483647" description="A 32-bit word that specifies the attribute flags to be applied to this MSI package."/>
1742
+ <columnDefinition name="ProductCode" type="string" length="38" category="guid" />
1743
+ <columnDefinition name="UpgradeCode" type="string" length="38" category="guid" nullable="yes" />
1744
+ <columnDefinition name="ProductVersion" type="string" length="20" />
1745
+ <columnDefinition name="ProductLanguage" type="number" length="2" />
1746
+ <columnDefinition name="ProductName" type="string" length="0" />
1747
+ <columnDefinition name="Manufacturer" type="string" length="0" nullable="yes" />
1748
+ </tableDefinition>
1749
+ <tableDefinition name="WixBundleMspPackage" createSymbols="yes" unreal="yes">
1750
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1751
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1752
+ <columnDefinition name="Attributes" type="number" length="2" nullable="yes" minValue="0" maxValue="1" />
1753
+ <columnDefinition name="PatchCode" type="string" length="38" category="guid" nullable="yes" />
1754
+ <columnDefinition name="Manufacturer" type="string" length="0" nullable="yes" />
1755
+ <columnDefinition name="PatchXml" type="string" length="0" nullable="yes" />
1756
+ </tableDefinition>
1757
+ <tableDefinition name="WixBundleMsuPackage" createSymbols="yes" unreal="yes">
1758
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1759
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1760
+ <columnDefinition name="DetectCondition" type="string" length="0" nullable="yes"/>
1761
+ <columnDefinition name="MsuKB" type="string" length="0" nullable="yes"/>
1762
+ </tableDefinition>
1763
+ <tableDefinition name="WixBundlePackageExitCode" createSymbols="yes" unreal="yes">
1764
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1765
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table for the parent Exe."/>
1766
+ <columnDefinition name="Code" type="number" length="0" category="integer" nullable="yes" primaryKey="yes" />
1767
+ <columnDefinition name="Behavior" type="number" length="2" category="integer" minValue="0" maxValue="3" />
1768
+ </tableDefinition>
1769
+ <tableDefinition name="WixBundleMsiFeature" createSymbols="yes" unreal="yes">
1770
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1771
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1772
+ <columnDefinition name="Name" type="string" length="0" category="identifier" primaryKey="yes" />
1773
+ <columnDefinition name="Size" type="number" length="4" />
1774
+ <columnDefinition name="Parent" type="string" length="0" />
1775
+ <columnDefinition name="Title" type="string" length="0" />
1776
+ <columnDefinition name="Description" type="string" length="0" />
1777
+ <columnDefinition name="Display" type="number" length="2" />
1778
+ <columnDefinition name="Level" type="number" length="2" />
1779
+ <columnDefinition name="Directory" type="string" length="0" />
1780
+ <columnDefinition name="Attributes" type="number" length="2" />
1781
+ </tableDefinition>
1782
+ <tableDefinition name="WixBundleMsiProperty" createSymbols="yes" unreal="yes">
1783
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1784
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1785
+ <columnDefinition name="Name" type="string" length="0" category="identifier" primaryKey="yes" />
1786
+ <columnDefinition name="Value" type="string" length="0" />
1787
+ <columnDefinition name="Condition" type="string" length="0" nullable="yes" />
1788
+ </tableDefinition>
1789
+ <tableDefinition name="WixBundleSlipstreamMsp" createSymbols="yes" unreal="yes">
1790
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1791
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table for the parent Msi."/>
1792
+ <columnDefinition name="WixBundlePackage_Msp" type="string" length="0" category="identifier" primaryKey="yes"
1793
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table for the referenced Msp." />
1794
+ </tableDefinition>
1795
+ <tableDefinition name="WixBundlePackageCommandLine" createSymbols="yes" unreal="yes">
1796
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1797
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table." />
1798
+ <columnDefinition name="InstallArgument" type="string" length="0" nullable="yes" />
1799
+ <columnDefinition name="UninstallArgument" type="string" length="0" nullable="yes" />
1800
+ <columnDefinition name="RepairArgument" type="string" length="0" nullable="yes" />
1801
+ <columnDefinition name="Condition" type="string" length="0" nullable="yes" />
1802
+ </tableDefinition>
1803
+ <tableDefinition name="WixRelatedBundle" unreal="yes">
1804
+ <columnDefinition name="Id" type="string" length="38" category="guid" primaryKey="yes" />
1805
+ <columnDefinition name="Action" type="number" length="4" />
1806
+ </tableDefinition>
1807
+ <tableDefinition name="WixBundleRelatedPackage" unreal="yes">
1808
+ <columnDefinition name="WixBundlePackage_" type="string" length="0" category="identifier" primaryKey="yes"
1809
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1810
+ <columnDefinition name="Id" type="string" length="0" category="identifier" primaryKey="yes" />
1811
+ <columnDefinition name="MinVersion" type="string" length="0" />
1812
+ <columnDefinition name="MaxVersion" type="string" length="0" />
1813
+ <columnDefinition name="Languages" type="string" length="0" />
1814
+ <columnDefinition name="MinInclusive" type="number" length="2" minValue="0" maxValue="1"/>
1815
+ <columnDefinition name="MaxInclusive" type="number" length="2" minValue="0" maxValue="1"/>
1816
+ <columnDefinition name="LangInclusive" type="number" length="2" minValue="0" maxValue="1"/>
1817
+ <columnDefinition name="OnlyDetect" type="number" length="2" minValue="0" maxValue="1"/>
1818
+ </tableDefinition>
1819
+ <tableDefinition name="WixBundleVariable" createSymbols="yes" unreal="yes">
1820
+ <columnDefinition name="WixBundleVariable" type="string" length="0" category="identifier" primaryKey="yes" />
1821
+ <columnDefinition name="Value" type="string" length="0" nullable="yes" />
1822
+ <columnDefinition name="Type" type="string" length="0" nullable="yes" />
1823
+ <columnDefinition name="Hidden" type="number" length="2" minValue="0" maxValue="1"/>
1824
+ <columnDefinition name="Persisted" type="number" length="2" minValue="0" maxValue="1"/>
1825
+ </tableDefinition>
1826
+ <tableDefinition name="WixBundleProperties" unreal="yes" bootstrapperApplicationData="yes">
1827
+ <columnDefinition name="DisplayName" type="string" length="0" nullable="yes"/>
1828
+ <columnDefinition name="LogPathVariable" type="string" length="0" nullable="yes"/>
1829
+ <columnDefinition name="Compressed" type="string" length="0" nullable="yes"/>
1830
+ <columnDefinition name="Id" type="string" length="0" nullable="yes"/>
1831
+ <columnDefinition name="UpgradeCode" type="string" length="0" nullable="yes"/>
1832
+ <columnDefinition name="PerMachine" type="string" length="0" nullable="yes"/>
1833
+ </tableDefinition>
1834
+ <tableDefinition name="WixPackageFeatureInfo" unreal="yes" bootstrapperApplicationData="yes">
1835
+ <columnDefinition name="Package" type="string" length="0" />
1836
+ <columnDefinition name="Feature" type="string" length="0" />
1837
+ <columnDefinition name="Size" type="string" length="0" />
1838
+ <columnDefinition name="Parent" type="string" length="0" nullable="yes" />
1839
+ <columnDefinition name="Title" type="string" length="0" nullable="yes" />
1840
+ <columnDefinition name="Description" type="string" length="0" nullable="yes" />
1841
+ <columnDefinition name="Display" type="string" length="0" nullable="yes" />
1842
+ <columnDefinition name="Level" type="string" length="0" />
1843
+ <columnDefinition name="Directory" type="string" length="0" nullable="yes"/>
1844
+ <columnDefinition name="Attributes" type="string" length="0" />
1845
+ </tableDefinition>
1846
+ <tableDefinition name="WixPackageProperties" unreal="yes" bootstrapperApplicationData="yes">
1847
+ <columnDefinition name="Package" type="string" length="0" category="identifier" primaryKey="yes"
1848
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1849
+ <columnDefinition name="Vital" type="string" length="0" nullable="yes" minValue="0" maxValue="1" />
1850
+ <columnDefinition name="DisplayName" type="string" length="0" nullable="yes"/>
1851
+ <columnDefinition name="Description" type="string" length="0" nullable="yes"/>
1852
+ <columnDefinition name="DownloadSize" type="string" length="0" nullable="yes"/>
1853
+ <columnDefinition name="PackageSize" type="string" length="0" nullable="yes"/>
1854
+ <columnDefinition name="InstalledSize" type="string" length="0" nullable="yes"/>
1855
+ <columnDefinition name="PackageType" type="string" length="0" nullable="no"/>
1856
+ <columnDefinition name="Permanent" type="string" length="0" nullable="yes"/>
1857
+ <columnDefinition name="LogPathVariable" type="string" length="0" nullable="yes"/>
1858
+ <columnDefinition name="RollbackLogPathVariable" type="string" length="0" nullable="yes"/>
1859
+ <columnDefinition name="Compressed" type="string" length="0" nullable="yes"/>
1860
+ <columnDefinition name="DisplayInternalUI" type="string" length="0" nullable="yes"/>
1861
+ <columnDefinition name="ProductCode" type="string" length="0" nullable="yes"/>
1862
+ <columnDefinition name="UpgradeCode" type="string" length="0" nullable="yes"/>
1863
+ <columnDefinition name="Version" type="string" length="0" nullable="yes"/>
1864
+ <columnDefinition name="InstallCondition" type="string" length="0" nullable="yes" />
1865
+ <columnDefinition name="Cache" type="string" length="0" nullable="yes" minValue="0" maxValue="2" />
1866
+ </tableDefinition>
1867
+ <tableDefinition name="WixPayloadProperties" unreal="yes" bootstrapperApplicationData="yes">
1868
+ <columnDefinition name="Payload" type="string" length="0" category="identifier" primaryKey="yes" />
1869
+ <columnDefinition name="Package" type="string" length="0" category="identifier" primaryKey="yes" nullable="yes"
1870
+ keyTable="WixBundlePackage" keyColumn="1" description="Reference to a chain package entry in the WixBundlePackage table."/>
1871
+ <columnDefinition name="Container" type="string" length="0" nullable="yes"
1872
+ keyTable="WixBundleContainer" keyColumn="1" description="Reference to a container entry in the WixBundleContainer table."/>
1873
+ <columnDefinition name="Name" type="string" length="0" />
1874
+ <columnDefinition name="Size" type="string" length="0" />
1875
+ <columnDefinition name="DownloadUrl" type="string" length="0" nullable="yes" />
1876
+ <columnDefinition name="LayoutOnly" type="string" length="3" nullable="no" />
1877
+ </tableDefinition>
1878
+ <tableDefinition name="_Streams" unreal="yes">
1879
+ <columnDefinition name="Name" type="string" length="62" primaryKey="yes"/>
1880
+ <columnDefinition name="Data" type="object" length="0" nullable="yes"/>
1881
+ </tableDefinition>
1882
+ <tableDefinition name="_SummaryInformation">
1883
+ <columnDefinition name="PropertyId" type="number" length="2" primaryKey="yes"/>
1884
+ <columnDefinition name="Value" type="localized" length="255" escapeIdtCharacters="yes"/>
1885
+ </tableDefinition>
1886
+ <tableDefinition name="_TransformView" unreal="yes">
1887
+ <columnDefinition name="Table" type="string" length="0" primaryKey="yes"/>
1888
+ <columnDefinition name="Column" type="string" length="0" primaryKey="yes"/>
1889
+ <columnDefinition name="Row" type="string" length="0"/>
1890
+ <columnDefinition name="Data" type="string" length="0"/>
1891
+ <columnDefinition name="Current" type="string" length="0"/>
1892
+ </tableDefinition>
1893
+ <tableDefinition name="_Validation">
1894
+ <columnDefinition name="Table" type="string" length="32" primaryKey="yes"
1895
+ category="identifier" description="Name of table"/>
1896
+ <columnDefinition name="Column" type="string" length="32" primaryKey="yes"
1897
+ category="identifier" description="Name of column"/>
1898
+ <columnDefinition name="Nullable" type="string" length="4"
1899
+ set="Y;N" description="Whether the column is nullable"/>
1900
+ <columnDefinition name="MinValue" type="number" length="4" nullable="yes"
1901
+ minValue="-2147483647" maxValue="2147483647" description="Minimum value allowed"/>
1902
+ <columnDefinition name="MaxValue" type="number" length="4" nullable="yes"
1903
+ minValue="-2147483647" maxValue="2147483647" description="Maximum value allowed"/>
1904
+ <columnDefinition name="KeyTable" type="string" length="255" nullable="yes"
1905
+ category="identifier" description="For foreign key, Name of table to which data must link"/>
1906
+ <columnDefinition name="KeyColumn" type="number" length="2" nullable="yes"
1907
+ minValue="1" maxValue="32" description="Column to which foreign key connects"/>
1908
+ <columnDefinition name="Category" type="string" length="32" nullable="yes"
1909
+ set="Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;CustomSource;Property;Cabinet;Shortcut;FormattedSDDLText;Integer;DoubleInteger;TimeDate;DefaultDir" description="String category"/>
1910
+ <columnDefinition name="Set" type="string" length="255" nullable="yes"
1911
+ category="text" description="Set of values that are permitted"/>
1912
+ <columnDefinition name="Description" type="string" length="255" nullable="yes"
1913
+ category="text" description="Description of column"/>
1914
+ </tableDefinition>
1915
+ <!-- WixSearch tables are used by multiple extensions and binder knows about them. -->
1916
+ <tableDefinition name="WixSearch" createSymbols="yes" unreal="yes">
1917
+ <columnDefinition name="WixSearch" type="string" length="72" category="identifier" primaryKey="yes" />
1918
+ <columnDefinition name="Variable" type="string" length="72" category="identifier" nullable="yes" />
1919
+ <columnDefinition name="Condition" type="string" length="255" category="condition" nullable="yes" />
1920
+ </tableDefinition>
1921
+ <tableDefinition name="WixSearchRelation" createSymbols="yes" unreal="yes">
1922
+ <columnDefinition name="WixSearch_" type="string" length="72" category="identifier" primaryKey="yes"
1923
+ keyTable="WixSearch" keyColumn="1" description="Reference to a WixSearch entry in the WixSearch table."/>
1924
+ <columnDefinition name="ParentId_" type="string" length="72" category="identifier" primaryKey="yes"
1925
+ keyTable="WixSearch" keyColumn="1" description="Reference to a WixSearch entry in the WixSearch table."/>
1926
+ <columnDefinition name="Attributes" type="number" length="4" category="doubleInteger" />
1927
+ </tableDefinition>
1928
+ <tableDefinition name="WixFileSearch" createSymbols="yes" unreal="yes">
1929
+ <columnDefinition name="WixSearch_" type="string" length="72" category="identifier" primaryKey="yes"
1930
+ keyTable="WixSearch" keyColumn="1" description="Reference to a WixSearch entry in the WixSearch table."/>
1931
+ <columnDefinition name="Path" type="string" category="text" length="255" />
1932
+ <columnDefinition name="MinVersion" type="string" length="24" category="version" nullable="yes" />
1933
+ <columnDefinition name="MaxVersion" type="string" length="24" category="version" nullable="yes" />
1934
+ <columnDefinition name="MinSize" type="number" length="4" category="doubleInteger" nullable="yes" />
1935
+ <columnDefinition name="MaxSize" type="number" length="4" category="doubleInteger" nullable="yes" />
1936
+ <columnDefinition name="MinDate" type="number" length="4" category="doubleInteger" nullable="yes" />
1937
+ <columnDefinition name="MaxDate" type="number" length="4" category="doubleInteger" nullable="yes" />
1938
+ <columnDefinition name="Languages" type="string" category="text" length="0" nullable="yes" />
1939
+ <columnDefinition name="Attributes" type="number" length="4" category="doubleInteger" />
1940
+ </tableDefinition>
1941
+ <tableDefinition name="WixRegistrySearch" createSymbols="yes" unreal="yes">
1942
+ <columnDefinition name="WixSearch_" type="string" length="72" category="identifier" primaryKey="yes"
1943
+ keyTable="WixSearch" keyColumn="1" description="Reference to a WixSearch entry in the WixSearch table."/>
1944
+ <columnDefinition name="Root" type="number" length="2" category="doubleInteger" />
1945
+ <columnDefinition name="Key" type="string" category="text" length="255" />
1946
+ <columnDefinition name="Value" type="string" category="text" length="255" nullable="yes" />
1947
+ <columnDefinition name="Attributes" type="number" length="4" category="doubleInteger" />
1948
+ </tableDefinition>
1949
+ <tableDefinition name="WixComponentSearch" createSymbols="yes" unreal="yes">
1950
+ <columnDefinition name="WixSearch_" type="string" length="72" category="identifier" primaryKey="yes"
1951
+ keyTable="WixSearch" keyColumn="1" description="Reference to a WixSearch entry in the WixSearch table."/>
1952
+ <columnDefinition name="Guid" type="string" length="38" category="guid" />
1953
+ <columnDefinition name="ProductCode" type="string" length="38" category="guid" nullable="yes" />
1954
+ <columnDefinition name="Attributes" type="number" length="4" category="doubleInteger" />
1955
+ </tableDefinition>
1956
+ <tableDefinition name="WixProductSearch" createSymbols="yes" unreal="yes">
1957
+ <columnDefinition name="WixSearch_" type="string" length="72" category="identifier" primaryKey="yes"
1958
+ keyTable="WixSearch" keyColumn="1" description="Reference to a WixSearch entry in the WixSearch table."/>
1959
+ <columnDefinition name="Guid" type="string" length="38" category="guid" />
1960
+ <columnDefinition name="Attributes" type="number" length="4" category="doubleInteger" />
1961
+ </tableDefinition>
1962
+</tableDefinitions>
src/WixToolset.Data/DisplayEventArgs.cs
new
+15
@@ -0,0 +1,15 @@
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 System;
6
+
7
+ public delegate void DisplayEventHandler(object sender, DisplayEventArgs e);
8
+
9
+ public class DisplayEventArgs : EventArgs
10
+ {
11
+ public MessageLevel Level { get; set; }
12
+
13
+ public string Message { get; set; }
14
+ }
15
+}
src/WixToolset.Data/DuplicateSymbolsException.cs
new
+35
@@ -0,0 +1,35 @@
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 System;
6
+ using System.Collections;
7
+
8
+ /// <summary>
9
+ /// Duplicate symbols exception.
10
+ /// </summary>
11
+ [Serializable]
12
+ public sealed class DuplicateSymbolsException : Exception
13
+ {
14
+ [NonSerialized]
15
+ private Symbol[] duplicateSymbols;
16
+
17
+ /// <summary>
18
+ /// Instantiate a new DuplicateSymbolException.
19
+ /// </summary>
20
+ /// <param name="symbols">The duplicated symbols.</param>
21
+ public DuplicateSymbolsException(ArrayList symbols)
22
+ {
23
+ this.duplicateSymbols = (Symbol[])symbols.ToArray(typeof(Symbol));
24
+ }
25
+
26
+ /// <summary>
27
+ /// Gets the duplicate symbols.
28
+ /// </summary>
29
+ /// <returns>List of duplicate symbols.</returns>
30
+ public Symbol[] GetDuplicateSymbols()
31
+ {
32
+ return this.duplicateSymbols;
33
+ }
34
+ }
35
+}
src/WixToolset.Data/EmptyRule.cs
new
+22
@@ -0,0 +1,22 @@
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
+ public enum EmptyRule
6
+ {
7
+ /// <summary>
8
+ /// The trimmed value cannot be empty.
9
+ /// </summary>
10
+ MustHaveNonWhitespaceCharacters,
11
+
12
+ /// <summary>
13
+ /// The trimmed value can be empty, but the value itself cannot be empty.
14
+ /// </summary>
15
+ CanBeWhitespaceOnly,
16
+
17
+ /// <summary>
18
+ /// The value can be empty.
19
+ /// </summary>
20
+ CanBeEmpty
21
+ }
22
+}
src/WixToolset.Data/Field.cs
new
+266
@@ -0,0 +1,266 @@
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 System;
6
+ using System.Diagnostics;
7
+ using System.Globalization;
8
+ using System.Xml;
9
+
10
+ /// <summary>
11
+ /// Field containing data for a column in a row.
12
+ /// </summary>
13
+ public class Field
14
+ {
15
+ private object data;
16
+
17
+ /// <summary>
18
+ /// Instantiates a new Field.
19
+ /// </summary>
20
+ /// <param name="columnDefinition">Column definition for this field.</param>
21
+ protected Field(ColumnDefinition columnDefinition)
22
+ {
23
+ this.Column = columnDefinition;
24
+ }
25
+
26
+ /// <summary>
27
+ /// Gets or sets the column definition for this field.
28
+ /// </summary>
29
+ /// <value>Column definition.</value>
30
+ public ColumnDefinition Column { get; private set; }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the data for this field.
34
+ /// </summary>
35
+ /// <value>Data in the field.</value>
36
+ public object Data
37
+ {
38
+ get
39
+ {
40
+ return this.data;
41
+ }
42
+
43
+ set
44
+ {
45
+ // Validate the value before setting it.
46
+ this.data = this.Column.ValidateValue(value);
47
+ }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets whether this field is modified.
52
+ /// </summary>
53
+ /// <value>Whether this field is modified.</value>
54
+ public bool Modified { get; set; }
55
+
56
+ /// <summary>
57
+ /// Gets or sets the previous data.
58
+ /// </summary>
59
+ /// <value>The previous data.</value>
60
+ public string PreviousData { get; set; }
61
+
62
+ /// <summary>
63
+ /// Instantiate a new Field object of the correct type.
64
+ /// </summary>
65
+ /// <param name="columnDefinition">The column definition for the field.</param>
66
+ /// <returns>The new Field object.</returns>
67
+ public static Field Create(ColumnDefinition columnDefinition)
68
+ {
69
+ return (ColumnType.Object == columnDefinition.Type) ? new ObjectField(columnDefinition) : new Field(columnDefinition);
70
+ }
71
+
72
+ /// <summary>
73
+ /// Sets the value of a particular field in the row without validating.
74
+ /// </summary>
75
+ /// <param name="field">field index.</param>
76
+ /// <param name="value">Value of a field in the row.</param>
77
+ /// <returns>True if successful, false if validation failed.</returns>
78
+ public bool BestEffortSet(object value)
79
+ {
80
+ bool success = true;
81
+ object bestEffortValue = value;
82
+
83
+ try
84
+ {
85
+ bestEffortValue = this.Column.ValidateValue(value);
86
+ }
87
+ catch (InvalidOperationException)
88
+ {
89
+ success = false;
90
+ }
91
+
92
+ this.data = bestEffortValue;
93
+ return success;
94
+ }
95
+
96
+ /// <summary>
97
+ /// Determine if this field is identical to another field.
98
+ /// </summary>
99
+ /// <param name="field">The other field to compare to.</param>
100
+ /// <returns>true if they are equal; false otherwise.</returns>
101
+ public bool IsIdentical(Field field)
102
+ {
103
+ return (this.Column.Name == field.Column.Name &&
104
+ ((null != this.data && this.data.Equals(field.data)) || (null == this.data && null == field.data)));
105
+ }
106
+
107
+ /// <summary>
108
+ /// Overrides the built in object implementation to return the field's data as a string.
109
+ /// </summary>
110
+ /// <returns>Field's data as a string.</returns>
111
+ public override string ToString()
112
+ {
113
+ return this.AsString();
114
+ }
115
+
116
+ /// <summary>
117
+ /// Gets the field as an integer.
118
+ /// </summary>
119
+ /// <returns>Field's data as an integer.</returns>
120
+ public int AsInteger()
121
+ {
122
+ return (this.data is int) ? (int)this.data : Convert.ToInt32(this.data, CultureInfo.InvariantCulture);
123
+ }
124
+
125
+ /// <summary>
126
+ /// Gets the field as an integer that could be null.
127
+ /// </summary>
128
+ /// <returns>Field's data as an integer that could be null.</returns>
129
+ public int? AsNullableInteger()
130
+ {
131
+ return (null == this.data) ? (int?)null : (this.data is int) ? (int)this.data : Convert.ToInt32(this.data, CultureInfo.InvariantCulture);
132
+ }
133
+
134
+ /// <summary>
135
+ /// Gets the field as a string.
136
+ /// </summary>
137
+ /// <returns>Field's data as a string.</returns>
138
+ public string AsString()
139
+ {
140
+ return (null == this.data) ? null : Convert.ToString(this.data, CultureInfo.InvariantCulture);
141
+ }
142
+
143
+ /// <summary>
144
+ /// Parse a field from the xml.
145
+ /// </summary>
146
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
147
+ internal virtual void Read(XmlReader reader)
148
+ {
149
+ Debug.Assert("field" == reader.LocalName);
150
+
151
+ bool empty = reader.IsEmptyElement;
152
+
153
+ while (reader.MoveToNextAttribute())
154
+ {
155
+ switch (reader.LocalName)
156
+ {
157
+ case "modified":
158
+ this.Modified = reader.Value.Equals("yes");
159
+ break;
160
+ case "previousData":
161
+ this.PreviousData = reader.Value;
162
+ break;
163
+ }
164
+ }
165
+
166
+ if (!empty)
167
+ {
168
+ bool done = false;
169
+
170
+ while (!done && reader.Read())
171
+ {
172
+ switch (reader.NodeType)
173
+ {
174
+ case XmlNodeType.Element:
175
+ throw new XmlException();
176
+ case XmlNodeType.CDATA:
177
+ case XmlNodeType.Text:
178
+ case XmlNodeType.SignificantWhitespace:
179
+ if (0 < reader.Value.Length)
180
+ {
181
+ if (ColumnType.Number == this.Column.Type && !this.Column.IsLocalizable)
182
+ {
183
+ // older wix files could persist data as a long value (which would overflow an int)
184
+ // since the Convert class always throws exceptions for overflows, read in integral
185
+ // values as a long to avoid the overflow, then cast it to an int (this operation can
186
+ // overflow without throwing an exception inside an unchecked block)
187
+ this.data = unchecked((int)Convert.ToInt64(reader.Value, CultureInfo.InvariantCulture));
188
+ }
189
+ else
190
+ {
191
+ this.data = reader.Value;
192
+ }
193
+ }
194
+ break;
195
+ case XmlNodeType.EndElement:
196
+ done = true;
197
+ break;
198
+ }
199
+ }
200
+
201
+ if (!done)
202
+ {
203
+ throw new XmlException();
204
+ }
205
+ }
206
+ }
207
+
208
+ /// <summary>
209
+ /// Persists a field in an XML format.
210
+ /// </summary>
211
+ /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param>
212
+ internal virtual void Write(XmlWriter writer)
213
+ {
214
+ writer.WriteStartElement("field", Intermediate.XmlNamespaceUri);
215
+
216
+ if (this.Modified)
217
+ {
218
+ writer.WriteAttributeString("modified", "yes");
219
+ }
220
+
221
+ if (null != this.PreviousData)
222
+ {
223
+ writer.WriteAttributeString("previousData", this.PreviousData);
224
+ }
225
+
226
+ // Convert the data to a string that will persist nicely (nulls as String.Empty).
227
+ string text = Convert.ToString(this.data, CultureInfo.InvariantCulture);
228
+ if (this.Column.UseCData)
229
+ {
230
+ writer.WriteCData(text);
231
+ }
232
+ else
233
+ {
234
+ writer.WriteString(text);
235
+ }
236
+
237
+ writer.WriteEndElement();
238
+ }
239
+
240
+ /// <summary>
241
+ /// Returns the field data in a format usable in IDT files.
242
+ /// </summary>
243
+ /// <returns>Field data in string IDT format.</returns>
244
+ internal string ToIdtValue()
245
+ {
246
+ if (null == this.data)
247
+ {
248
+ return null;
249
+ }
250
+ else
251
+ {
252
+ string fieldData = Convert.ToString(this.data, CultureInfo.InvariantCulture);
253
+
254
+ // special idt-specific escaping
255
+ if (this.Column.EscapeIdtCharacters)
256
+ {
257
+ fieldData = fieldData.Replace('\t', '\x10');
258
+ fieldData = fieldData.Replace('\r', '\x11');
259
+ fieldData = fieldData.Replace('\n', '\x19');
260
+ }
261
+
262
+ return fieldData;
263
+ }
264
+ }
265
+ }
266
+}
src/WixToolset.Data/FileFormat.cs
new
+17
@@ -0,0 +1,17 @@
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
+ public enum FileFormat
6
+ {
7
+ Unknown,
8
+
9
+ Wixobj,
10
+
11
+ Wixlib,
12
+
13
+ Wixout,
14
+
15
+ Wixpdb,
16
+ }
17
+}
src/WixToolset.Data/FileStructure.cs
new
+294
@@ -0,0 +1,294 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Diagnostics;
8
+ using System.IO;
9
+ using System.Linq;
10
+
11
+ /// <summary>
12
+ /// Class that understands the standard file structures in the WiX toolset.
13
+ /// </summary>
14
+ public class FileStructure : IDisposable
15
+ {
16
+ private long dataStreamOffset;
17
+ private long[] embeddedFileSizes;
18
+ private Stream stream;
19
+ private bool disposed;
20
+
21
+ private static readonly Dictionary<string, FileFormat> SupportedFileFormats = new Dictionary<string, FileFormat>()
22
+ {
23
+ { "wixobj", FileFormat.Wixobj },
24
+ { "wixlib", FileFormat.Wixlib },
25
+ { "wixout", FileFormat.Wixout },
26
+ { "wixpdb", FileFormat.Wixpdb },
27
+ { "wixmst", FileFormat.Wixout },
28
+ { "wixmsp", FileFormat.Wixout },
29
+ };
30
+
31
+ /// <summary>
32
+ /// Use Create or Read to create a FileStructure.
33
+ /// </summary>
34
+ private FileStructure() { }
35
+
36
+ /// <summary>
37
+ /// Count of embedded files in the file structure.
38
+ /// </summary>
39
+ public int EmbeddedFileCount { get { return this.embeddedFileSizes.Length; } }
40
+
41
+ /// <summary>
42
+ /// File format of the file structure.
43
+ /// </summary>
44
+ public FileFormat FileFormat { get; private set; }
45
+
46
+ /// <summary>
47
+ /// Creates a new file structure.
48
+ /// </summary>
49
+ /// <param name="stream">Stream to write the file structure to.</param>
50
+ /// <param name="fileFormat">File format for the file structure.</param>
51
+ /// <param name="embedFilePaths">Paths to files to embedd in the file structure.</param>
52
+ /// <returns>Newly created file structure.</returns>
53
+ public static FileStructure Create(Stream stream, FileFormat fileFormat, List<string> embedFilePaths)
54
+ {
55
+ FileStructure fs = new FileStructure();
56
+ using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(stream))
57
+ using (BinaryWriter writer = new BinaryWriter(wrapper))
58
+ {
59
+ fs.WriteType(writer, fileFormat);
60
+
61
+ fs.WriteEmbeddedFiles(writer, embedFilePaths ?? new List<string>());
62
+
63
+ // Remember the data stream offset, which is right after the embedded files have been written.
64
+ fs.dataStreamOffset = stream.Position;
65
+ }
66
+
67
+ fs.stream = stream;
68
+
69
+ return fs;
70
+ }
71
+
72
+ /// <summary>
73
+ /// Reads a file structure from an open stream.
74
+ /// </summary>
75
+ /// <param name="stream">Stream to read from.</param>
76
+ /// <returns>File structure populated from the stream.</returns>
77
+ public static FileStructure Read(Stream stream)
78
+ {
79
+ FileStructure fs = new FileStructure();
80
+ using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(stream))
81
+ using (BinaryReader reader = new BinaryReader(wrapper))
82
+ {
83
+ fs.FileFormat = FileStructure.ReadFileFormat(reader);
84
+
85
+ if (FileFormat.Unknown != fs.FileFormat)
86
+ {
87
+ fs.embeddedFileSizes = FileStructure.ReadEmbeddedFileSizes(reader);
88
+
89
+ // Remember the data stream offset, which is right after the embedded files have been written.
90
+ fs.dataStreamOffset = stream.Position;
91
+ foreach (long size in fs.embeddedFileSizes)
92
+ {
93
+ fs.dataStreamOffset += size;
94
+ }
95
+ }
96
+ }
97
+
98
+ fs.stream = stream;
99
+
100
+ return fs;
101
+ }
102
+
103
+ /// <summary>
104
+ /// Guess at the file format based on the file extension.
105
+ /// </summary>
106
+ /// <param name="extension">File extension to guess the file format for.</param>
107
+ /// <returns>Best guess at file format.</returns>
108
+ public static FileFormat GuessFileFormatFromExtension(string extension)
109
+ {
110
+ FileFormat format;
111
+ return FileStructure.SupportedFileFormats.TryGetValue(extension.TrimStart('.').ToLowerInvariant(), out format) ? format : FileFormat.Unknown;
112
+ }
113
+
114
+ /// <summary>
115
+ /// Probes a stream to determine the file format.
116
+ /// </summary>
117
+ /// <param name="stream">Stream to test.</param>
118
+ /// <returns>The file format.</returns>
119
+ public static FileFormat TestFileFormat(Stream stream)
120
+ {
121
+ FileFormat format = FileFormat.Unknown;
122
+
123
+ long position = stream.Position;
124
+
125
+ try
126
+ {
127
+ using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(stream))
128
+ using (BinaryReader reader = new BinaryReader(wrapper))
129
+ {
130
+ format = FileStructure.ReadFileFormat(reader);
131
+ }
132
+ }
133
+ finally
134
+ {
135
+ stream.Seek(position, SeekOrigin.Begin);
136
+ }
137
+
138
+ return format;
139
+ }
140
+
141
+ /// <summary>
142
+ /// Extracts an embedded file.
143
+ /// </summary>
144
+ /// <param name="embeddedIndex">Index to the file to extract.</param>
145
+ /// <param name="outputPath">Path to write the extracted file to.</param>
146
+ public void ExtractEmbeddedFile(int embeddedIndex, string outputPath)
147
+ {
148
+ if (this.EmbeddedFileCount <= embeddedIndex)
149
+ {
150
+ throw new ArgumentOutOfRangeException("embeddedIndex");
151
+ }
152
+
153
+ long header = 6 + 4 + (this.embeddedFileSizes.Length * 8); // skip the type + the count of embedded files + all the sizes of embedded files.
154
+ long position = this.embeddedFileSizes.Take(embeddedIndex).Sum(); // skip to the embedded file we want.
155
+ long size = this.embeddedFileSizes[embeddedIndex];
156
+
157
+ this.stream.Seek(header + position, SeekOrigin.Begin);
158
+
159
+ Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
160
+
161
+ using (FileStream output = File.OpenWrite(outputPath))
162
+ {
163
+ int read;
164
+ int total = 0;
165
+ byte[] buffer = new byte[64 * 1024];
166
+ while (0 < (read = this.stream.Read(buffer, 0, (int)Math.Min(buffer.Length, size - total))))
167
+ {
168
+ output.Write(buffer, 0, read);
169
+ total += read;
170
+ }
171
+ }
172
+ }
173
+
174
+ /// <summary>
175
+ /// Gets a non-closing stream to the data of the file.
176
+ /// </summary>
177
+ /// <returns>Stream to the data of the file.</returns>
178
+ public Stream GetDataStream()
179
+ {
180
+ this.stream.Seek(this.dataStreamOffset, SeekOrigin.Begin);
181
+ return new NonClosingStreamWrapper(this.stream);
182
+ }
183
+
184
+ /// <summary>
185
+ /// Disposes of the internsl state of the file structure.
186
+ /// </summary>
187
+ public void Dispose()
188
+ {
189
+ Dispose(true);
190
+ GC.SuppressFinalize(this);
191
+ }
192
+
193
+ /// <summary>
194
+ /// Disposes of the internsl state of the file structure.
195
+ /// </summary>
196
+ /// <param name="disposing">True if disposing.</param>
197
+ protected virtual void Dispose(bool disposing)
198
+ {
199
+ if (!this.disposed)
200
+ {
201
+ if (disposing)
202
+ {
203
+ if (null != this.stream)
204
+ {
205
+ // We do not own the stream, so we don't close it. We're just resetting our internal state.
206
+ this.embeddedFileSizes = null;
207
+ this.dataStreamOffset = 0;
208
+ this.stream = null;
209
+ }
210
+ }
211
+ }
212
+
213
+ this.disposed = true;
214
+ }
215
+
216
+ private static FileFormat ReadFileFormat(BinaryReader reader)
217
+ {
218
+ FileFormat format = FileFormat.Unknown;
219
+
220
+ string type = new string(reader.ReadChars(6));
221
+ FileStructure.SupportedFileFormats.TryGetValue(type, out format);
222
+
223
+ return format;
224
+ }
225
+
226
+ private static long[] ReadEmbeddedFileSizes(BinaryReader reader)
227
+ {
228
+ uint count = reader.ReadUInt32();
229
+
230
+ long[] embeddedFileSizes = new long[count];
231
+
232
+ for (int i = 0; i < embeddedFileSizes.Length; ++i)
233
+ {
234
+ embeddedFileSizes[i] = (long)reader.ReadUInt64();
235
+ }
236
+
237
+ return embeddedFileSizes;
238
+ }
239
+
240
+ private BinaryWriter WriteType(BinaryWriter writer, FileFormat fileFormat)
241
+ {
242
+ string type = null;
243
+ foreach (var supported in FileStructure.SupportedFileFormats)
244
+ {
245
+ if (supported.Value.Equals(fileFormat))
246
+ {
247
+ type = supported.Key;
248
+ break;
249
+ }
250
+ }
251
+
252
+ if (String.IsNullOrEmpty(type))
253
+ {
254
+ throw new ArgumentException("Unknown file format type", "fileFormat");
255
+ }
256
+
257
+ this.FileFormat = fileFormat;
258
+
259
+ Debug.Assert(6 == type.ToCharArray().Length);
260
+ writer.Write(type.ToCharArray());
261
+ return writer;
262
+ }
263
+
264
+ private BinaryWriter WriteEmbeddedFiles(BinaryWriter writer, List<string> embedFilePaths)
265
+ {
266
+ // First write the count of embedded files as a Uint32;
267
+ writer.Write((uint)embedFilePaths.Count);
268
+
269
+ this.embeddedFileSizes = new long[embedFilePaths.Count];
270
+
271
+ // Next write out the size of each file as a Uint64 in order.
272
+ FileInfo[] files = new FileInfo[embedFilePaths.Count];
273
+ for (int i = 0; i < embedFilePaths.Count; ++i)
274
+ {
275
+ files[i] = new FileInfo(embedFilePaths[i]);
276
+
277
+ this.embeddedFileSizes[i] = files[i].Length;
278
+ writer.Write((ulong)this.embeddedFileSizes[i]);
279
+ }
280
+
281
+ // Next write out the content of each file *after* the sizes of
282
+ // *all* of the files were written.
283
+ foreach (FileInfo file in files)
284
+ {
285
+ using (FileStream stream = file.OpenRead())
286
+ {
287
+ stream.CopyTo(writer.BaseStream);
288
+ }
289
+ }
290
+
291
+ return writer;
292
+ }
293
+ }
294
+}
src/WixToolset.Data/ILibraryBinaryFileResolver.cs
new
+9
@@ -0,0 +1,9 @@
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
+ public interface ILibraryBinaryFileResolver
6
+ {
7
+ string Resolve(SourceLineNumber sourceLineNumber, string table, string path);
8
+ }
9
+}
src/WixToolset.Data/IMessageHandler.cs
new
+18
@@ -0,0 +1,18 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// Interface for handling messages (error/warning/verbose).
9
+ /// </summary>
10
+ public interface IMessageHandler
11
+ {
12
+ /// <summary>
13
+ /// Sends a message with the given arguments.
14
+ /// </summary>
15
+ /// <param name="e">Message arguments.</param>
16
+ void OnMessage(MessageEventArgs e);
17
+ }
18
+}
src/WixToolset.Data/Intermediate.cs
new
+189
@@ -0,0 +1,189 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.IO;
8
+ using System.Xml;
9
+
10
+ /// <summary>
11
+ /// Container class for an intermediate object.
12
+ /// </summary>
13
+ public sealed class Intermediate
14
+ {
15
+ public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixobj";
16
+ private static readonly Version CurrentVersion = new Version("4.0.0.0");
17
+
18
+ private string id;
19
+ private List<Section> sections;
20
+
21
+ /// <summary>
22
+ /// Instantiate a new Intermediate.
23
+ /// </summary>
24
+ public Intermediate()
25
+ {
26
+ this.id = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).TrimEnd('=').Replace('+', '.').Replace('/', '_');
27
+ this.sections = new List<Section>();
28
+ }
29
+
30
+ /// <summary>
31
+ /// Get the sections contained in this intermediate.
32
+ /// </summary>
33
+ /// <value>Sections contained in this intermediate.</value>
34
+ public IEnumerable<Section> Sections { get { return this.sections; } }
35
+
36
+ /// <summary>
37
+ /// Adds a section to the intermediate.
38
+ /// </summary>
39
+ /// <param name="section">Section to add to the intermediate.</param>
40
+ public void AddSection(Section section)
41
+ {
42
+ section.IntermediateId = this.id;
43
+ this.sections.Add(section);
44
+ }
45
+
46
+ /// <summary>
47
+ /// Loads an intermediate from a path on disk.
48
+ /// </summary>
49
+ /// <param name="path">Path to intermediate file saved on disk.</param>
50
+ /// <param name="tableDefinitions">Collection containing TableDefinitions to use when reconstituting the intermediate.</param>
51
+ /// <param name="suppressVersionCheck">Suppress checking for wix.dll version mismatches.</param>
52
+ /// <returns>Returns the loaded intermediate.</returns>
53
+ public static Intermediate Load(string path, TableDefinitionCollection tableDefinitions, bool suppressVersionCheck)
54
+ {
55
+ using (FileStream stream = File.OpenRead(path))
56
+ using (FileStructure fs = FileStructure.Read(stream))
57
+ {
58
+ if (FileFormat.Wixobj != fs.FileFormat)
59
+ {
60
+ throw new WixUnexpectedFileFormatException(path, FileFormat.Wixobj, fs.FileFormat);
61
+ }
62
+
63
+ Uri uri = new Uri(Path.GetFullPath(path));
64
+ using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri))
65
+ {
66
+ try
67
+ {
68
+ reader.MoveToContent();
69
+ return Intermediate.Read(reader, tableDefinitions, suppressVersionCheck);
70
+ }
71
+ catch (XmlException xe)
72
+ {
73
+ throw new WixCorruptFileException(path, fs.FileFormat, xe);
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ /// <summary>
80
+ /// Saves an intermediate to a path on disk.
81
+ /// </summary>
82
+ /// <param name="path">Path to save intermediate file to disk.</param>
83
+ public void Save(string path)
84
+ {
85
+ Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path)));
86
+
87
+ using (FileStream stream = File.Create(path))
88
+ using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixobj, null))
89
+ using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream()))
90
+ {
91
+ writer.WriteStartDocument();
92
+ this.Write(writer);
93
+ writer.WriteEndDocument();
94
+ }
95
+ }
96
+
97
+ /// <summary>
98
+ /// Parse an intermediate from an XML format.
99
+ /// </summary>
100
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
101
+ /// <param name="tableDefinitions">TableDefinitions to use in the intermediate.</param>
102
+ /// <param name="suppressVersionCheck">Suppress checking for wix.dll version mismatch.</param>
103
+ /// <returns>The parsed Intermediate.</returns>
104
+ private static Intermediate Read(XmlReader reader, TableDefinitionCollection tableDefinitions, bool suppressVersionCheck)
105
+ {
106
+ if ("wixObject" != reader.LocalName)
107
+ {
108
+ throw new XmlException();
109
+ }
110
+
111
+ bool empty = reader.IsEmptyElement;
112
+ Version objVersion = null;
113
+ string id = null;
114
+
115
+ while (reader.MoveToNextAttribute())
116
+ {
117
+ switch (reader.LocalName)
118
+ {
119
+ case "version":
120
+ objVersion = new Version(reader.Value);
121
+ break;
122
+ case "id":
123
+ id = reader.Value;
124
+ break;
125
+ }
126
+ }
127
+
128
+ if (!suppressVersionCheck && null != objVersion && !Intermediate.CurrentVersion.Equals(objVersion))
129
+ {
130
+ throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "object", objVersion.ToString(), Intermediate.CurrentVersion.ToString()));
131
+ }
132
+
133
+ Intermediate intermediate = new Intermediate();
134
+ intermediate.id = id;
135
+
136
+ if (!empty)
137
+ {
138
+ bool done = false;
139
+
140
+ while (!done && reader.Read())
141
+ {
142
+ switch (reader.NodeType)
143
+ {
144
+ case XmlNodeType.Element:
145
+ switch (reader.LocalName)
146
+ {
147
+ case "section":
148
+ intermediate.AddSection(Section.Read(reader, tableDefinitions));
149
+ break;
150
+ default:
151
+ throw new XmlException();
152
+ }
153
+ break;
154
+ case XmlNodeType.EndElement:
155
+ done = true;
156
+ break;
157
+ }
158
+ }
159
+
160
+ if (!done)
161
+ {
162
+ throw new XmlException();
163
+ }
164
+ }
165
+
166
+ return intermediate;
167
+ }
168
+
169
+ /// <summary>
170
+ /// Persists an intermediate in an XML format.
171
+ /// </summary>
172
+ /// <param name="writer">XmlWriter where the Intermediate should persist itself as XML.</param>
173
+ private void Write(XmlWriter writer)
174
+ {
175
+ writer.WriteStartElement("wixObject", XmlNamespaceUri);
176
+
177
+ writer.WriteAttributeString("version", Intermediate.CurrentVersion.ToString());
178
+
179
+ writer.WriteAttributeString("id", this.id);
180
+
181
+ foreach (Section section in this.Sections)
182
+ {
183
+ section.Write(writer);
184
+ }
185
+
186
+ writer.WriteEndElement();
187
+ }
188
+ }
189
+}
src/WixToolset.Data/Library.cs
new
+297
@@ -0,0 +1,297 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.IO;
8
+ using System.Linq;
9
+ using System.Xml;
10
+
11
+ /// <summary>
12
+ /// Object that represents a library file.
13
+ /// </summary>
14
+ public sealed class Library
15
+ {
16
+ public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixlib";
17
+ private static readonly Version CurrentVersion = new Version("4.0.0.0");
18
+
19
+ private string id;
20
+ private Dictionary<string, Localization> localizations;
21
+ private List<Section> sections;
22
+
23
+ /// <summary>
24
+ /// Instantiates a new empty library which is only useful from static creating methods.
25
+ /// </summary>
26
+ private Library()
27
+ {
28
+ this.localizations = new Dictionary<string, Localization>();
29
+ this.sections = new List<Section>();
30
+ }
31
+
32
+ /// <summary>
33
+ /// Instantiate a new library populated with sections.
34
+ /// </summary>
35
+ /// <param name="sections">Sections to add to the library.</param>
36
+ public Library(IEnumerable<Section> sections)
37
+ {
38
+ this.localizations = new Dictionary<string, Localization>();
39
+ this.sections = new List<Section>(sections);
40
+
41
+ this.id = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).TrimEnd('=').Replace('+', '.').Replace('/', '_');
42
+ foreach (Section section in this.sections)
43
+ {
44
+ section.LibraryId = this.id;
45
+ }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Get the sections contained in this library.
50
+ /// </summary>
51
+ /// <value>Sections contained in this library.</value>
52
+ public IEnumerable<Section> Sections { get { return this.sections; } }
53
+
54
+ /// <summary>
55
+ /// Add a localization file to this library.
56
+ /// </summary>
57
+ /// <param name="localization">The localization file to add.</param>
58
+ public void AddLocalization(Localization localization)
59
+ {
60
+ Localization existingCulture;
61
+ if (this.localizations.TryGetValue(localization.Culture, out existingCulture))
62
+ {
63
+ existingCulture.Merge(localization);
64
+ }
65
+ else
66
+ {
67
+ this.localizations.Add(localization.Culture, localization);
68
+ }
69
+ }
70
+
71
+ /// <summary>
72
+ /// Gets localization files from this library that match the cultures passed in, in the order of the array of cultures.
73
+ /// </summary>
74
+ /// <param name="cultures">The list of cultures to get localizations for.</param>
75
+ /// <returns>All localizations contained in this library that match the set of cultures provided, in the same order.</returns>
76
+ public IEnumerable<Localization> GetLocalizations(string[] cultures)
77
+ {
78
+ foreach (string culture in cultures ?? new string[0])
79
+ {
80
+ Localization localization;
81
+ if (this.localizations.TryGetValue(culture, out localization))
82
+ {
83
+ yield return localization;
84
+ }
85
+ }
86
+ }
87
+
88
+ /// <summary>
89
+ /// Loads a library from a path on disk.
90
+ /// </summary>
91
+ /// <param name="path">Path to library file saved on disk.</param>
92
+ /// <param name="tableDefinitions">Collection containing TableDefinitions to use when reconstituting the intermediates.</param>
93
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
94
+ /// <returns>Returns the loaded library.</returns>
95
+ public static Library Load(string path, TableDefinitionCollection tableDefinitions, bool suppressVersionCheck)
96
+ {
97
+ using (FileStream stream = File.OpenRead(path))
98
+ {
99
+ return Load(stream, new Uri(Path.GetFullPath(path)), tableDefinitions, suppressVersionCheck);
100
+ }
101
+ }
102
+
103
+ /// <summary>
104
+ /// Loads a library from a stream.
105
+ /// </summary>
106
+ /// <param name="stream">Stream containing the library file.</param>
107
+ /// <param name="uri">Uri for finding this stream.</param>
108
+ /// <param name="tableDefinitions">Collection containing TableDefinitions to use when reconstituting the intermediates.</param>
109
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
110
+ /// <returns>Returns the loaded library.</returns>
111
+ public static Library Load(Stream stream, Uri uri, TableDefinitionCollection tableDefinitions, bool suppressVersionCheck)
112
+ {
113
+ using (FileStructure fs = FileStructure.Read(stream))
114
+ {
115
+ if (FileFormat.Wixlib != fs.FileFormat)
116
+ {
117
+ throw new WixUnexpectedFileFormatException(uri.LocalPath, FileFormat.Wixlib, fs.FileFormat);
118
+ }
119
+
120
+ using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri))
121
+ {
122
+ try
123
+ {
124
+ reader.MoveToContent();
125
+ return Library.Read(reader, tableDefinitions, suppressVersionCheck);
126
+ }
127
+ catch (XmlException xe)
128
+ {
129
+ throw new WixCorruptFileException(uri.LocalPath, fs.FileFormat, xe);
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
+ /// <summary>
136
+ /// Saves a library to a path on disk.
137
+ /// </summary>
138
+ /// <param name="path">Path to save library file to on disk.</param>
139
+ /// <param name="resolver">The WiX path resolver.</param>
140
+ public void Save(string path, ILibraryBinaryFileResolver resolver)
141
+ {
142
+ List<string> embedFilePaths = new List<string>();
143
+
144
+ // Resolve paths to files that are to be embedded in the library.
145
+ if (null != resolver)
146
+ {
147
+ foreach (Table table in this.sections.SelectMany(s => s.Tables))
148
+ {
149
+ foreach (Row row in table.Rows)
150
+ {
151
+ foreach (ObjectField objectField in row.Fields.Where(f => f is ObjectField))
152
+ {
153
+ if (null != objectField.Data)
154
+ {
155
+ string file = resolver.Resolve(row.SourceLineNumbers, table.Name, (string)objectField.Data);
156
+ if (!String.IsNullOrEmpty(file))
157
+ {
158
+ // File was successfully resolved so track the embedded index as the embedded file index.
159
+ objectField.EmbeddedFileIndex = embedFilePaths.Count;
160
+ embedFilePaths.Add(file);
161
+ }
162
+ else
163
+ {
164
+ Messaging.Instance.OnMessage(WixDataErrors.FileNotFound(row.SourceLineNumbers, (string)objectField.Data, table.Name));
165
+ }
166
+ }
167
+ else // clear out embedded file id in case there was one there before.
168
+ {
169
+ objectField.EmbeddedFileIndex = null;
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+
176
+ // Do not save the library if errors were found while resolving object paths.
177
+ if (Messaging.Instance.EncounteredError)
178
+ {
179
+ return;
180
+ }
181
+
182
+ // Ensure the location to output the library exists and write it out.
183
+ Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path)));
184
+
185
+ using (FileStream stream = File.Create(path))
186
+ using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixlib, embedFilePaths))
187
+ using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream()))
188
+ {
189
+ writer.WriteStartDocument();
190
+
191
+ this.Write(writer);
192
+
193
+ writer.WriteEndDocument();
194
+ }
195
+ }
196
+
197
+ /// <summary>
198
+ /// Parse the root library element.
199
+ /// </summary>
200
+ /// <param name="reader">XmlReader with library persisted as Xml.</param>
201
+ /// <param name="tableDefinitions">Collection containing TableDefinitions to use when reconstituting the intermediates.</param>
202
+ /// <param name="suppressVersionCheck">Suppresses check for wix.dll version mismatch.</param>
203
+ /// <returns>The parsed Library.</returns>
204
+ private static Library Read(XmlReader reader, TableDefinitionCollection tableDefinitions, bool suppressVersionCheck)
205
+ {
206
+ if (!reader.LocalName.Equals("wixLibrary"))
207
+ {
208
+ throw new XmlException();
209
+ }
210
+
211
+ bool empty = reader.IsEmptyElement;
212
+ Library library = new Library();
213
+ Version version = null;
214
+
215
+ while (reader.MoveToNextAttribute())
216
+ {
217
+ switch (reader.LocalName)
218
+ {
219
+ case "version":
220
+ version = new Version(reader.Value);
221
+ break;
222
+ case "id":
223
+ library.id = reader.Value;
224
+ break;
225
+ }
226
+ }
227
+
228
+ if (!suppressVersionCheck && null != version && !Library.CurrentVersion.Equals(version))
229
+ {
230
+ throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "library", version.ToString(), Library.CurrentVersion.ToString()));
231
+ }
232
+
233
+ if (!empty)
234
+ {
235
+ bool done = false;
236
+
237
+ while (!done && (XmlNodeType.Element == reader.NodeType || reader.Read()))
238
+ {
239
+ switch (reader.NodeType)
240
+ {
241
+ case XmlNodeType.Element:
242
+ switch (reader.LocalName)
243
+ {
244
+ case "localization":
245
+ Localization localization = Localization.Read(reader, tableDefinitions);
246
+ library.localizations.Add(localization.Culture, localization);
247
+ break;
248
+ case "section":
249
+ Section section = Section.Read(reader, tableDefinitions);
250
+ section.LibraryId = library.id;
251
+ library.sections.Add(section);
252
+ break;
253
+ default:
254
+ throw new XmlException();
255
+ }
256
+ break;
257
+ case XmlNodeType.EndElement:
258
+ done = true;
259
+ break;
260
+ }
261
+ }
262
+
263
+ if (!done)
264
+ {
265
+ throw new XmlException();
266
+ }
267
+ }
268
+
269
+ return library;
270
+ }
271
+
272
+ /// <summary>
273
+ /// Persists a library in an XML format.
274
+ /// </summary>
275
+ /// <param name="writer">XmlWriter where the library should persist itself as XML.</param>
276
+ private void Write(XmlWriter writer)
277
+ {
278
+ writer.WriteStartElement("wixLibrary", XmlNamespaceUri);
279
+
280
+ writer.WriteAttributeString("version", CurrentVersion.ToString());
281
+
282
+ writer.WriteAttributeString("id", this.id);
283
+
284
+ foreach (Localization localization in this.localizations.Values)
285
+ {
286
+ localization.Write(writer);
287
+ }
288
+
289
+ foreach (Section section in this.sections)
290
+ {
291
+ section.Write(writer);
292
+ }
293
+
294
+ writer.WriteEndElement();
295
+ }
296
+ }
297
+}
src/WixToolset.Data/Localization.cs
new
+372
@@ -0,0 +1,372 @@
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 System;
6
+ using System.Collections;
7
+ using System.Collections.Generic;
8
+ using System.Diagnostics;
9
+ using System.Diagnostics.CodeAnalysis;
10
+ using System.Globalization;
11
+ using System.IO;
12
+ using System.Linq;
13
+ using System.Reflection;
14
+ using System.Xml;
15
+ using System.Xml.Linq;
16
+ using System.Xml.Schema;
17
+ using WixToolset.Data.Msi;
18
+ using WixToolset.Data.Rows;
19
+
20
+ /// <summary>
21
+ /// Object that represents a localization file.
22
+ /// </summary>
23
+ public sealed class Localization
24
+ {
25
+ private static string XmlElementName = "localization";
26
+
27
+ private Dictionary<string, WixVariableRow> variables = new Dictionary<string, WixVariableRow>();
28
+ private Dictionary<string, LocalizedControl> localizedControls = new Dictionary<string, LocalizedControl>();
29
+
30
+ /// <summary>
31
+ /// Instantiates a new localization object.
32
+ /// </summary>
33
+ public Localization(int codepage, string culture, IDictionary<string, WixVariableRow> variables, IDictionary<string, LocalizedControl> localizedControls)
34
+ {
35
+ this.Codepage = codepage;
36
+ this.Culture = String.IsNullOrEmpty(culture) ? String.Empty : culture.ToLowerInvariant();
37
+ this.variables = new Dictionary<string, WixVariableRow>(variables);
38
+ this.localizedControls = new Dictionary<string, LocalizedControl>(localizedControls);
39
+ }
40
+
41
+ /// <summary>
42
+ /// Gets the codepage.
43
+ /// </summary>
44
+ /// <value>The codepage.</value>
45
+ public int Codepage { get; private set; }
46
+
47
+ /// <summary>
48
+ /// Gets the culture.
49
+ /// </summary>
50
+ /// <value>The culture.</value>
51
+ public string Culture { get; private set; }
52
+
53
+ /// <summary>
54
+ /// Gets the variables.
55
+ /// </summary>
56
+ /// <value>The variables.</value>
57
+ public ICollection<WixVariableRow> Variables
58
+ {
59
+ get { return this.variables.Values; }
60
+ }
61
+
62
+ /// <summary>
63
+ /// Gets the localized controls.
64
+ /// </summary>
65
+ /// <value>The localized controls.</value>
66
+ public ICollection<KeyValuePair<string, LocalizedControl>> LocalizedControls
67
+ {
68
+ get { return this.localizedControls; }
69
+ }
70
+
71
+ /// <summary>
72
+ /// Merge the information from another localization object into this one.
73
+ /// </summary>
74
+ /// <param name="localization">The localization object to be merged into this one.</param>
75
+ public void Merge(Localization localization)
76
+ {
77
+ foreach (WixVariableRow wixVariableRow in localization.Variables)
78
+ {
79
+ WixVariableRow existingWixVariableRow;
80
+ if (!this.variables.TryGetValue(wixVariableRow.Id, out existingWixVariableRow) || (existingWixVariableRow.Overridable && !wixVariableRow.Overridable))
81
+ {
82
+ variables[wixVariableRow.Id] = wixVariableRow;
83
+ }
84
+ else if (!wixVariableRow.Overridable)
85
+ {
86
+ throw new WixException(WixDataErrors.DuplicateLocalizationIdentifier(wixVariableRow.SourceLineNumbers, wixVariableRow.Id));
87
+ }
88
+ }
89
+ }
90
+
91
+ /// <summary>
92
+ /// Loads a localization file from a stream.
93
+ /// </summary>
94
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
95
+ /// <param name="tableDefinitions">Collection containing TableDefinitions to use when loading the localization file.</param>
96
+ /// <returns>Returns the loaded localization.</returns>
97
+ internal static Localization Read(XmlReader reader, TableDefinitionCollection tableDefinitions)
98
+ {
99
+ Debug.Assert("localization" == reader.LocalName);
100
+
101
+ int codepage = 0;
102
+ string culture = null;
103
+ bool empty = reader.IsEmptyElement;
104
+
105
+ while (reader.MoveToNextAttribute())
106
+ {
107
+ switch (reader.Name)
108
+ {
109
+ case "codepage":
110
+ codepage = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
111
+ break;
112
+ case "culture":
113
+ culture = reader.Value;
114
+ break;
115
+ }
116
+ }
117
+
118
+ TableDefinition wixVariableTable = tableDefinitions["WixVariable"];
119
+ Dictionary<string, WixVariableRow> variables = new Dictionary<string, WixVariableRow>();
120
+ Dictionary<string, LocalizedControl> localizedControls = new Dictionary<string, LocalizedControl>();
121
+
122
+ if (!empty)
123
+ {
124
+ bool done = false;
125
+
126
+ while (!done && reader.Read())
127
+ {
128
+ switch (reader.NodeType)
129
+ {
130
+ case XmlNodeType.Element:
131
+ switch (reader.LocalName)
132
+ {
133
+ case "string":
134
+ WixVariableRow row = Localization.ReadString(reader, wixVariableTable);
135
+ variables.Add(row.Id, row);
136
+ break;
137
+
138
+ case "ui":
139
+ LocalizedControl ui = Localization.ReadUI(reader);
140
+ localizedControls.Add(ui.GetKey(), ui);
141
+ break;
142
+
143
+ default:
144
+ throw new XmlException();
145
+ }
146
+ break;
147
+ case XmlNodeType.EndElement:
148
+ done = true;
149
+ break;
150
+ }
151
+ }
152
+
153
+ if (!done)
154
+ {
155
+ throw new XmlException();
156
+ }
157
+ }
158
+
159
+ return new Localization(codepage, culture, variables, localizedControls);
160
+ }
161
+
162
+ /// <summary>
163
+ /// Writes a localization file into an XML format.
164
+ /// </summary>
165
+ /// <param name="writer">XmlWriter where the localization file should persist itself as XML.</param>
166
+ internal void Write(XmlWriter writer)
167
+ {
168
+ writer.WriteStartElement(Localization.XmlElementName, Library.XmlNamespaceUri);
169
+
170
+ if (-1 != this.Codepage)
171
+ {
172
+ writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture));
173
+ }
174
+
175
+ if (!String.IsNullOrEmpty(this.Culture))
176
+ {
177
+ writer.WriteAttributeString("culture", this.Culture);
178
+ }
179
+
180
+ foreach (WixVariableRow wixVariableRow in this.variables.Values)
181
+ {
182
+ writer.WriteStartElement("string", Library.XmlNamespaceUri);
183
+
184
+ writer.WriteAttributeString("id", wixVariableRow.Id);
185
+
186
+ if (wixVariableRow.Overridable)
187
+ {
188
+ writer.WriteAttributeString("overridable", "yes");
189
+ }
190
+
191
+ writer.WriteCData(wixVariableRow.Value);
192
+
193
+ writer.WriteEndElement();
194
+ }
195
+
196
+ foreach (string controlKey in this.localizedControls.Keys)
197
+ {
198
+ writer.WriteStartElement("ui", Library.XmlNamespaceUri);
199
+
200
+ string[] controlKeys = controlKey.Split('/');
201
+ string dialog = controlKeys[0];
202
+ string control = controlKeys[1];
203
+
204
+ if (!String.IsNullOrEmpty(dialog))
205
+ {
206
+ writer.WriteAttributeString("dialog", dialog);
207
+ }
208
+
209
+ if (!String.IsNullOrEmpty(control))
210
+ {
211
+ writer.WriteAttributeString("control", control);
212
+ }
213
+
214
+ LocalizedControl localizedControl = this.localizedControls[controlKey];
215
+
216
+ if (Common.IntegerNotSet != localizedControl.X)
217
+ {
218
+ writer.WriteAttributeString("x", localizedControl.X.ToString());
219
+ }
220
+
221
+ if (Common.IntegerNotSet != localizedControl.Y)
222
+ {
223
+ writer.WriteAttributeString("y", localizedControl.Y.ToString());
224
+ }
225
+
226
+ if (Common.IntegerNotSet != localizedControl.Width)
227
+ {
228
+ writer.WriteAttributeString("width", localizedControl.Width.ToString());
229
+ }
230
+
231
+ if (Common.IntegerNotSet != localizedControl.Height)
232
+ {
233
+ writer.WriteAttributeString("height", localizedControl.Height.ToString());
234
+ }
235
+
236
+ if (MsiInterop.MsidbControlAttributesRTLRO == (localizedControl.Attributes & MsiInterop.MsidbControlAttributesRTLRO))
237
+ {
238
+ writer.WriteAttributeString("rightToLeft", "yes");
239
+ }
240
+
241
+ if (MsiInterop.MsidbControlAttributesRightAligned == (localizedControl.Attributes & MsiInterop.MsidbControlAttributesRightAligned))
242
+ {
243
+ writer.WriteAttributeString("rightAligned", "yes");
244
+ }
245
+
246
+ if (MsiInterop.MsidbControlAttributesLeftScroll == (localizedControl.Attributes & MsiInterop.MsidbControlAttributesLeftScroll))
247
+ {
248
+ writer.WriteAttributeString("leftScroll", "yes");
249
+ }
250
+
251
+ if (!String.IsNullOrEmpty(localizedControl.Text))
252
+ {
253
+ writer.WriteCData(localizedControl.Text);
254
+ }
255
+
256
+ writer.WriteEndElement();
257
+ }
258
+
259
+ writer.WriteEndElement();
260
+ }
261
+
262
+ /// <summary>
263
+ /// Loads a localization file from a stream.
264
+ /// </summary>
265
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
266
+ /// <param name="tableDefinitions">Collection containing TableDefinitions to use when loading the localization file.</param>
267
+ /// <returns>Returns the loaded localization.</returns>
268
+ private static WixVariableRow ReadString(XmlReader reader, TableDefinition wixVariableTable)
269
+ {
270
+ Debug.Assert("string" == reader.LocalName);
271
+
272
+ string id = null;
273
+ string value = null;
274
+ bool overridable = false;
275
+ bool empty = reader.IsEmptyElement;
276
+
277
+ while (reader.MoveToNextAttribute())
278
+ {
279
+ switch (reader.Name)
280
+ {
281
+ case "id":
282
+ id = reader.Value;
283
+ break;
284
+ case "overridable":
285
+ overridable = reader.Value.Equals("yes");
286
+ break;
287
+ }
288
+ }
289
+
290
+
291
+ if (!empty)
292
+ {
293
+ reader.Read();
294
+
295
+ value = reader.Value;
296
+
297
+ reader.Read();
298
+
299
+ if (XmlNodeType.EndElement != reader.NodeType)
300
+ {
301
+ throw new XmlException();
302
+ }
303
+ }
304
+
305
+ WixVariableRow wixVariableRow = new WixVariableRow(SourceLineNumber.CreateFromUri(reader.BaseURI), wixVariableTable);
306
+ wixVariableRow.Id = id;
307
+ wixVariableRow.Overridable = overridable;
308
+ wixVariableRow.Value = value;
309
+
310
+ return wixVariableRow;
311
+ }
312
+
313
+ private static LocalizedControl ReadUI(XmlReader reader)
314
+ {
315
+ Debug.Assert("ui" == reader.LocalName);
316
+
317
+ string dialog = null;
318
+ string control = null;
319
+ int x = Common.IntegerNotSet;
320
+ int y = Common.IntegerNotSet;
321
+ int width = Common.IntegerNotSet;
322
+ int height = Common.IntegerNotSet;
323
+ int attributes = Common.IntegerNotSet;
324
+ string text = null;
325
+ bool empty = reader.IsEmptyElement;
326
+
327
+ while (reader.MoveToNextAttribute())
328
+ {
329
+ switch (reader.Name)
330
+ {
331
+ case "dialog":
332
+ dialog = reader.Value;
333
+ break;
334
+ case "control":
335
+ control = reader.Value;
336
+ break;
337
+ case "x":
338
+ x = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
339
+ break;
340
+ case "y":
341
+ y = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
342
+ break;
343
+ case "width":
344
+ width = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
345
+ break;
346
+ case "height":
347
+ height = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
348
+ break;
349
+ case "attributes":
350
+ attributes = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
351
+ break;
352
+ }
353
+ }
354
+
355
+ if (!empty)
356
+ {
357
+ reader.Read();
358
+
359
+ text = reader.Value;
360
+
361
+ reader.Read();
362
+
363
+ if (XmlNodeType.EndElement != reader.NodeType)
364
+ {
365
+ throw new XmlException();
366
+ }
367
+ }
368
+
369
+ return new LocalizedControl(dialog, control, x, y, width, height, attributes, text);
370
+ }
371
+ }
372
+}
src/WixToolset.Data/LocalizedControl.cs
new
+57
@@ -0,0 +1,57 @@
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 System;
6
+
7
+ public class LocalizedControl
8
+ {
9
+ public LocalizedControl(string dialog, string control, int x, int y, int width, int height, int attribs, string text)
10
+ {
11
+ this.Dialog = dialog;
12
+ this.Control = control;
13
+ this.X = x;
14
+ this.Y = y;
15
+ this.Width = width;
16
+ this.Height = height;
17
+ this.Attributes = attribs;
18
+ this.Text = text;
19
+ }
20
+
21
+ public string Dialog { get; set; }
22
+
23
+ public string Control { get; set; }
24
+
25
+ public int X { get; private set; }
26
+
27
+ public int Y { get; private set; }
28
+
29
+ public int Width { get; private set; }
30
+
31
+ public int Height { get; private set; }
32
+
33
+ public int Attributes { get; private set; }
34
+
35
+ public string Text { get; private set; }
36
+
37
+ /// <summary>
38
+ /// Get key for a localized control.
39
+ /// </summary>
40
+ /// <returns>The localized control id.</returns>
41
+ public string GetKey()
42
+ {
43
+ return LocalizedControl.GetKey(this.Dialog, this.Control);
44
+ }
45
+
46
+ /// <summary>
47
+ /// Get key for a localized control.
48
+ /// </summary>
49
+ /// <param name="dialog">The optional id of the control's dialog.</param>
50
+ /// <param name="control">The id of the control.</param>
51
+ /// <returns>The localized control id.</returns>
52
+ public static string GetKey(string dialog, string control)
53
+ {
54
+ return String.Concat(String.IsNullOrEmpty(dialog) ? String.Empty : dialog, "/", String.IsNullOrEmpty(control) ? String.Empty : control);
55
+ }
56
+ }
57
+}
src/WixToolset.Data/MessageEventArgs.cs
new
+176
@@ -0,0 +1,176 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Diagnostics.CodeAnalysis;
8
+ using System.Globalization;
9
+ using System.Resources;
10
+ using System.Text;
11
+
12
+ /// <summary>
13
+ /// Event args for message events.
14
+ /// </summary>
15
+ public abstract class MessageEventArgs : EventArgs
16
+ {
17
+ private SourceLineNumber sourceLineNumbers;
18
+ private int id;
19
+ private string resourceName;
20
+ private object[] messageArgs;
21
+ private MessageLevel level;
22
+
23
+ /// <summary>
24
+ /// Creates a new MessageEventArgs.
25
+ /// </summary>
26
+ /// <param name="sourceLineNumbers">Source line numbers for the message.</param>
27
+ /// <param name="id">Id for the message.</param>
28
+ /// <param name="resourceName">Name of the resource.</param>
29
+ /// <param name="messageArgs">Arguments for the format string.</param>
30
+ protected MessageEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs)
31
+ {
32
+ this.sourceLineNumbers = sourceLineNumbers;
33
+ this.id = id;
34
+ this.resourceName = resourceName;
35
+ this.messageArgs = messageArgs;
36
+
37
+ // Default to Nothing, since the default MessageEventArgs container
38
+ // classes define a level, and only WixErrorEventArgs previously
39
+ // determined that an error occured without throwing.
40
+ this.level = MessageLevel.Nothing;
41
+ }
42
+
43
+ /// <summary>
44
+ /// Gets the resource manager for this event args.
45
+ /// </summary>
46
+ /// <value>The resource manager for this event args.</value>
47
+ public ResourceManager ResourceManager { get; protected set; }
48
+
49
+ /// <summary>
50
+ /// Gets the source line numbers.
51
+ /// </summary>
52
+ /// <value>The source line numbers.</value>
53
+ public SourceLineNumber SourceLineNumbers
54
+ {
55
+ get { return this.sourceLineNumbers; }
56
+ }
57
+
58
+ /// <summary>
59
+ /// Gets the Id for the message.
60
+ /// </summary>
61
+ /// <value>The Id for the message.</value>
62
+ public int Id
63
+ {
64
+ get { return this.id; }
65
+ }
66
+
67
+ /// <summary>
68
+ /// Gets the name of the resource.
69
+ /// </summary>
70
+ /// <value>The name of the resource.</value>
71
+ public string ResourceName
72
+ {
73
+ get { return this.resourceName; }
74
+ }
75
+
76
+ /// <summary>
77
+ /// Gets or sets the <see cref="MessageLevel"/> for the message.
78
+ /// </summary>
79
+ /// <value>The <see cref="MessageLevel"/> for the message.</value>
80
+ /// <remarks>
81
+ /// The <see cref="MessageHandler"/> may set the level differently
82
+ /// depending on suppression and escalation of different message levels.
83
+ /// Message handlers should check the level to determine if an error
84
+ /// or other message level was raised.
85
+ /// </remarks>
86
+ public MessageLevel Level
87
+ {
88
+ get { return this.level; }
89
+ set { this.level = value; }
90
+ }
91
+
92
+ /// <summary>
93
+ /// Gets the arguments for the format string.
94
+ /// </summary>
95
+ /// <value>The arguments for the format string.</value>
96
+ [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
97
+ public object[] MessageArgs
98
+ {
99
+ get { return this.messageArgs; }
100
+ }
101
+
102
+ /// <summary>
103
+ /// Creates a properly formatted message string.
104
+ /// </summary>
105
+ /// <param name="shortAppName">Optional short form of the application name that generated the message. Defaults to "WIX" if unspecified.</param>
106
+ /// <param name="longAppName">Optional long form of the application name that generated the message. Defaults to "WIX" if unspecified. Will be overridden by the processed filename if one was provided.</param>
107
+ /// <param name="overrideLevel">Optional override level of the message, as generated by MessageLevel(MessageEventArgs).</param>
108
+ /// <returns>String containing the formatted message.</returns>
109
+ public string GenerateMessageString(string shortAppName = null, string longAppName = null, MessageLevel overrideLevel = MessageLevel.Nothing)
110
+ {
111
+ MessageLevel messageLevel = MessageLevel.Nothing == overrideLevel ? this.Level : overrideLevel;
112
+
113
+ List<string> fileNames = new List<string>();
114
+ string errorFileName = String.IsNullOrEmpty(longAppName) ? "WIX" : longAppName;
115
+ for (SourceLineNumber sln = this.SourceLineNumbers; null != sln; sln = sln.Parent)
116
+ {
117
+ if (String.IsNullOrEmpty(sln.FileName))
118
+ {
119
+ continue;
120
+ }
121
+ else if (sln.LineNumber.HasValue)
122
+ {
123
+ if (0 == fileNames.Count)
124
+ {
125
+ errorFileName = String.Format(CultureInfo.CurrentUICulture, WixDataStrings.Format_FirstLineNumber, sln.FileName, sln.LineNumber);
126
+ }
127
+
128
+ fileNames.Add(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.Format_LineNumber, sln.FileName, sln.LineNumber));
129
+ }
130
+ else
131
+ {
132
+ if (0 == fileNames.Count)
133
+ {
134
+ errorFileName = sln.FileName;
135
+ }
136
+
137
+ fileNames.Add(sln.FileName);
138
+ }
139
+ }
140
+
141
+ string messageType = String.Empty;
142
+ if (MessageLevel.Warning == messageLevel)
143
+ {
144
+ messageType = WixDataStrings.MessageType_Warning;
145
+ }
146
+ else if (MessageLevel.Error == messageLevel)
147
+ {
148
+ messageType = WixDataStrings.MessageType_Error;
149
+ }
150
+
151
+ StringBuilder messageBuilder = new StringBuilder();
152
+ string message = String.Format(CultureInfo.InvariantCulture, this.ResourceManager.GetString(this.ResourceName), this.MessageArgs);
153
+ if (MessageLevel.Information == messageLevel || MessageLevel.Verbose == messageLevel)
154
+ {
155
+ messageBuilder.AppendFormat(WixDataStrings.Format_InfoMessage, message);
156
+ }
157
+ else
158
+ {
159
+ messageBuilder.AppendFormat(WixDataStrings.Format_NonInfoMessage, errorFileName, messageType, String.IsNullOrEmpty(shortAppName) ? "WIX" : shortAppName, this.Id, message);
160
+ }
161
+
162
+ if (1 < fileNames.Count)
163
+ {
164
+ messageBuilder.AppendFormat(WixDataStrings.INF_SourceTrace, Environment.NewLine);
165
+ foreach (string fileName in fileNames)
166
+ {
167
+ messageBuilder.AppendFormat(WixDataStrings.INF_SourceTraceLocation, fileName, Environment.NewLine);
168
+ }
169
+
170
+ messageBuilder.Append(Environment.NewLine);
171
+ }
172
+
173
+ return messageBuilder.ToString();
174
+ }
175
+ }
176
+}
src/WixToolset.Data/MessageLevel.cs
new
+25
@@ -0,0 +1,25 @@
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
+ /// <summary>
6
+ /// Enum for message to display.
7
+ /// </summary>
8
+ public enum MessageLevel
9
+ {
10
+ /// <summary>Display nothing.</summary>
11
+ Nothing,
12
+
13
+ /// <summary>Display verbose information.</summary>
14
+ Verbose,
15
+
16
+ /// <summary>Display information.</summary>
17
+ Information,
18
+
19
+ /// <summary>Display warning.</summary>
20
+ Warning,
21
+
22
+ /// <summary>Display error.</summary>
23
+ Error,
24
+ }
25
+}
src/WixToolset.Data/Messaging.cs
new
+173
@@ -0,0 +1,173 @@
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 System;
6
+ using System.Collections.Generic;
7
+
8
+ public class Messaging : IMessageHandler
9
+ {
10
+ private static readonly Messaging instance = new Messaging();
11
+
12
+ private HashSet<int> suppressedWarnings = new HashSet<int>();
13
+ private HashSet<int> warningsAsErrors = new HashSet<int>();
14
+ private string longAppName;
15
+ private string shortAppName;
16
+
17
+ static Messaging()
18
+ {
19
+ }
20
+
21
+ private Messaging()
22
+ {
23
+ }
24
+
25
+ public static Messaging Instance { get { return Messaging.instance; } }
26
+
27
+ /// <summary>
28
+ /// Event fired when messages are to be displayed.
29
+ /// </summary>
30
+ public event DisplayEventHandler Display;
31
+
32
+ /// <summary>
33
+ /// Gets a bool indicating whether an error has been found.
34
+ /// </summary>
35
+ /// <value>A bool indicating whether an error has been found.</value>
36
+ public bool EncounteredError { get; private set; }
37
+
38
+ /// <summary>
39
+ /// Gets the last error code encountered during messaging.
40
+ /// </summary>
41
+ /// <value>The exit code for the process.</value>
42
+ public int LastErrorNumber { get; private set; }
43
+
44
+ /// <summary>
45
+ /// Gets or sets the option to show verbose messages.
46
+ /// </summary>
47
+ /// <value>The option to show verbose messages.</value>
48
+ public bool ShowVerboseMessages { get; set; }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the option to suppress all warning messages.
52
+ /// </summary>
53
+ /// <value>The option to suppress all warning messages.</value>
54
+ public bool SuppressAllWarnings { get; set; }
55
+
56
+ /// <summary>
57
+ /// Gets and sets the option to treat warnings as errors.
58
+ /// </summary>
59
+ /// <value>The option to treat warnings as errors.</value>
60
+ public bool WarningsAsError { get; set; }
61
+
62
+ /// <summary>
63
+ /// Implements IMessageHandler to display error messages.
64
+ /// </summary>
65
+ /// <param name="mea">Message event arguments.</param>
66
+ public void OnMessage(MessageEventArgs mea)
67
+ {
68
+ MessageLevel messageLevel = this.CalculateMessageLevel(mea);
69
+
70
+ if (MessageLevel.Nothing == messageLevel)
71
+ {
72
+ return;
73
+ }
74
+ else if (MessageLevel.Error == messageLevel)
75
+ {
76
+ this.EncounteredError = true;
77
+ this.LastErrorNumber = mea.Id;
78
+ }
79
+
80
+ if (null != this.Display)
81
+ {
82
+ string message = mea.GenerateMessageString(this.shortAppName, this.longAppName, messageLevel);
83
+ if (!String.IsNullOrEmpty(message))
84
+ {
85
+ this.Display(this, new DisplayEventArgs() { Level = messageLevel, Message = message });
86
+ }
87
+ }
88
+ else if (MessageLevel.Error == mea.Level)
89
+ {
90
+ throw new WixException(mea);
91
+ }
92
+ }
93
+
94
+ /// <summary>
95
+ /// Sets the app names.
96
+ /// </summary>
97
+ /// <param name="shortName">Short application name; usually 4 uppercase characters.</param>
98
+ /// <param name="longName">Long application name; usually the executable name.</param>
99
+ public Messaging InitializeAppName(string shortName, string longName)
100
+ {
101
+ this.EncounteredError = false;
102
+ this.LastErrorNumber = 0;
103
+
104
+ this.Display = null;
105
+ this.ShowVerboseMessages = false;
106
+ this.SuppressAllWarnings = false;
107
+ this.WarningsAsError = false;
108
+ this.suppressedWarnings.Clear();
109
+ this.warningsAsErrors.Clear();
110
+
111
+ this.shortAppName = shortName;
112
+ this.longAppName = longName;
113
+
114
+ return this;
115
+ }
116
+
117
+ /// <summary>
118
+ /// Adds a warning message id to be elevated to an error message.
119
+ /// </summary>
120
+ /// <param name="warningNumber">Id of the message to elevate.</param>
121
+ /// <remarks>
122
+ /// Suppressed warnings will not be elevated as errors.
123
+ /// </remarks>
124
+ public void ElevateWarningMessage(int warningNumber)
125
+ {
126
+ this.warningsAsErrors.Add(warningNumber);
127
+ }
128
+
129
+ /// <summary>
130
+ /// Adds a warning message id to be suppressed in message output.
131
+ /// </summary>
132
+ /// <param name="warningNumber">Id of the message to suppress.</param>
133
+ /// <remarks>
134
+ /// Suppressed warnings will not be elevated as errors.
135
+ /// </remarks>
136
+ public void SuppressWarningMessage(int warningNumber)
137
+ {
138
+ this.suppressedWarnings.Add(warningNumber);
139
+ }
140
+
141
+ /// <summary>
142
+ /// Determines the level of this message, when taking into account warning-as-error,
143
+ /// warning level, verbosity level and message suppressed by the caller.
144
+ /// </summary>
145
+ /// <param name="mea">Event arguments for the message.</param>
146
+ /// <returns>MessageLevel representing the level of this message.</returns>
147
+ private MessageLevel CalculateMessageLevel(MessageEventArgs mea)
148
+ {
149
+ MessageLevel messageLevel = mea.Level;
150
+
151
+ if (MessageLevel.Verbose == messageLevel)
152
+ {
153
+ if (!this.ShowVerboseMessages)
154
+ {
155
+ messageLevel = MessageLevel.Nothing;
156
+ }
157
+ }
158
+ else if (MessageLevel.Warning == messageLevel)
159
+ {
160
+ if (this.SuppressAllWarnings || this.suppressedWarnings.Contains(mea.Id))
161
+ {
162
+ messageLevel = MessageLevel.Nothing;
163
+ }
164
+ else if (this.WarningsAsError || this.warningsAsErrors.Contains(mea.Id))
165
+ {
166
+ messageLevel = MessageLevel.Error;
167
+ }
168
+ }
169
+
170
+ return messageLevel;
171
+ }
172
+ }
173
+}
src/WixToolset.Data/Msi/MsiInterop.cs
new
+313
@@ -0,0 +1,313 @@
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.Msi
4
+{
5
+ class MsiInterop
6
+ {
7
+ // Patching constants
8
+ internal const int MsiMaxStreamNameLength = 62; // http://msdn2.microsoft.com/library/aa370551.aspx
9
+
10
+ // Component.Attributes
11
+ internal const int MsidbComponentAttributesLocalOnly = 0;
12
+ internal const int MsidbComponentAttributesSourceOnly = 1;
13
+ internal const int MsidbComponentAttributesOptional = 2;
14
+ internal const int MsidbComponentAttributesRegistryKeyPath = 4;
15
+ internal const int MsidbComponentAttributesSharedDllRefCount = 8;
16
+ internal const int MsidbComponentAttributesPermanent = 16;
17
+ internal const int MsidbComponentAttributesODBCDataSource = 32;
18
+ internal const int MsidbComponentAttributesTransitive = 64;
19
+ internal const int MsidbComponentAttributesNeverOverwrite = 128;
20
+ internal const int MsidbComponentAttributes64bit = 256;
21
+ internal const int MsidbComponentAttributesDisableRegistryReflection = 512;
22
+ internal const int MsidbComponentAttributesUninstallOnSupersedence = 1024;
23
+ internal const int MsidbComponentAttributesShared = 2048;
24
+
25
+ // BBControl.Attributes & Control.Attributes
26
+ internal const int MsidbControlAttributesVisible = 0x00000001;
27
+ internal const int MsidbControlAttributesEnabled = 0x00000002;
28
+ internal const int MsidbControlAttributesSunken = 0x00000004;
29
+ internal const int MsidbControlAttributesIndirect = 0x00000008;
30
+ internal const int MsidbControlAttributesInteger = 0x00000010;
31
+ internal const int MsidbControlAttributesRTLRO = 0x00000020;
32
+ internal const int MsidbControlAttributesRightAligned = 0x00000040;
33
+ internal const int MsidbControlAttributesLeftScroll = 0x00000080;
34
+ internal const int MsidbControlAttributesBiDi = MsidbControlAttributesRTLRO | MsidbControlAttributesRightAligned | MsidbControlAttributesLeftScroll;
35
+
36
+ // Text controls
37
+ internal const int MsidbControlAttributesTransparent = 0x00010000;
38
+ internal const int MsidbControlAttributesNoPrefix = 0x00020000;
39
+ internal const int MsidbControlAttributesNoWrap = 0x00040000;
40
+ internal const int MsidbControlAttributesFormatSize = 0x00080000;
41
+ internal const int MsidbControlAttributesUsersLanguage = 0x00100000;
42
+
43
+ // Edit controls
44
+ internal const int MsidbControlAttributesMultiline = 0x00010000;
45
+ internal const int MsidbControlAttributesPasswordInput = 0x00200000;
46
+
47
+ // ProgressBar controls
48
+ internal const int MsidbControlAttributesProgress95 = 0x00010000;
49
+
50
+ // VolumeSelectCombo and DirectoryCombo controls
51
+ internal const int MsidbControlAttributesRemovableVolume = 0x00010000;
52
+ internal const int MsidbControlAttributesFixedVolume = 0x00020000;
53
+ internal const int MsidbControlAttributesRemoteVolume = 0x00040000;
54
+ internal const int MsidbControlAttributesCDROMVolume = 0x00080000;
55
+ internal const int MsidbControlAttributesRAMDiskVolume = 0x00100000;
56
+ internal const int MsidbControlAttributesFloppyVolume = 0x00200000;
57
+
58
+ // VolumeCostList controls
59
+ internal const int MsidbControlShowRollbackCost = 0x00400000;
60
+
61
+ // ListBox and ComboBox controls
62
+ internal const int MsidbControlAttributesSorted = 0x00010000;
63
+ internal const int MsidbControlAttributesComboList = 0x00020000;
64
+
65
+ // picture button controls
66
+ internal const int MsidbControlAttributesImageHandle = 0x00010000;
67
+ internal const int MsidbControlAttributesPushLike = 0x00020000;
68
+ internal const int MsidbControlAttributesBitmap = 0x00040000;
69
+ internal const int MsidbControlAttributesIcon = 0x00080000;
70
+ internal const int MsidbControlAttributesFixedSize = 0x00100000;
71
+ internal const int MsidbControlAttributesIconSize16 = 0x00200000;
72
+ internal const int MsidbControlAttributesIconSize32 = 0x00400000;
73
+ internal const int MsidbControlAttributesIconSize48 = 0x00600000;
74
+ internal const int MsidbControlAttributesElevationShield = 0x00800000;
75
+
76
+ // RadioButton controls
77
+ internal const int MsidbControlAttributesHasBorder = 0x01000000;
78
+
79
+ // CustomAction.Type
80
+ // executable types
81
+ internal const int MsidbCustomActionTypeDll = 0x00000001; // Target = entry point name
82
+ internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args
83
+ internal const int MsidbCustomActionTypeTextData = 0x00000003; // Target = text string to be formatted and set into property
84
+ internal const int MsidbCustomActionTypeJScript = 0x00000005; // Target = entry point name; null if none to call
85
+ internal const int MsidbCustomActionTypeVBScript = 0x00000006; // Target = entry point name; null if none to call
86
+ internal const int MsidbCustomActionTypeInstall = 0x00000007; // Target = property list for nested engine initialization
87
+ internal const int MsidbCustomActionTypeSourceBits = 0x00000030;
88
+ internal const int MsidbCustomActionTypeTargetBits = 0x00000007;
89
+ internal const int MsidbCustomActionTypeReturnBits = 0x000000C0;
90
+ internal const int MsidbCustomActionTypeExecuteBits = 0x00000700;
91
+
92
+ // source of code
93
+ internal const int MsidbCustomActionTypeBinaryData = 0x00000000; // Source = Binary.Name; data stored in stream
94
+ internal const int MsidbCustomActionTypeSourceFile = 0x00000010; // Source = File.File; file part of installation
95
+ internal const int MsidbCustomActionTypeDirectory = 0x00000020; // Source = Directory.Directory; folder containing existing file
96
+ internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = Property.Property; full path to executable
97
+
98
+ // return processing; default is syncronous execution; process return code
99
+ internal const int MsidbCustomActionTypeContinue = 0x00000040; // ignore action return status; continue running
100
+ internal const int MsidbCustomActionTypeAsync = 0x00000080; // run asynchronously
101
+
102
+ // execution scheduling flags; default is execute whenever sequenced
103
+ internal const int MsidbCustomActionTypeFirstSequence = 0x00000100; // skip if UI sequence already run
104
+ internal const int MsidbCustomActionTypeOncePerProcess = 0x00000200; // skip if UI sequence already run in same process
105
+ internal const int MsidbCustomActionTypeClientRepeat = 0x00000300; // run on client only if UI already run on client
106
+ internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script
107
+ internal const int MsidbCustomActionTypeRollback = 0x00000100; // in conjunction with InScript: queue in Rollback script
108
+ internal const int MsidbCustomActionTypeCommit = 0x00000200; // in conjunction with InScript: run Commit ops from script on success
109
+
110
+ // security context flag; default to impersonate as user; valid only if InScript
111
+ internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // no impersonation; run in system context
112
+ internal const int MsidbCustomActionTypeTSAware = 0x00004000; // impersonate for per-machine installs on TS machines
113
+ internal const int MsidbCustomActionType64BitScript = 0x00001000; // script should run in 64bit process
114
+ internal const int MsidbCustomActionTypeHideTarget = 0x00002000; // don't record the contents of the Target field in the log file.
115
+
116
+ internal const int MsidbCustomActionTypePatchUninstall = 0x00008000; // run on patch uninstall
117
+
118
+ // Dialog.Attributes
119
+ internal const int MsidbDialogAttributesVisible = 0x00000001;
120
+ internal const int MsidbDialogAttributesModal = 0x00000002;
121
+ internal const int MsidbDialogAttributesMinimize = 0x00000004;
122
+ internal const int MsidbDialogAttributesSysModal = 0x00000008;
123
+ internal const int MsidbDialogAttributesKeepModeless = 0x00000010;
124
+ internal const int MsidbDialogAttributesTrackDiskSpace = 0x00000020;
125
+ internal const int MsidbDialogAttributesUseCustomPalette = 0x00000040;
126
+ internal const int MsidbDialogAttributesRTLRO = 0x00000080;
127
+ internal const int MsidbDialogAttributesRightAligned = 0x00000100;
128
+ internal const int MsidbDialogAttributesLeftScroll = 0x00000200;
129
+ internal const int MsidbDialogAttributesBiDi = MsidbDialogAttributesRTLRO | MsidbDialogAttributesRightAligned | MsidbDialogAttributesLeftScroll;
130
+ internal const int MsidbDialogAttributesError = 0x00010000;
131
+ internal const int CommonControlAttributesInvert = MsidbControlAttributesVisible + MsidbControlAttributesEnabled;
132
+ internal const int DialogAttributesInvert = MsidbDialogAttributesVisible + MsidbDialogAttributesModal + MsidbDialogAttributesMinimize;
133
+
134
+ // Feature.Attributes
135
+ internal const int MsidbFeatureAttributesFavorLocal = 0;
136
+ internal const int MsidbFeatureAttributesFavorSource = 1;
137
+ internal const int MsidbFeatureAttributesFollowParent = 2;
138
+ internal const int MsidbFeatureAttributesFavorAdvertise = 4;
139
+ internal const int MsidbFeatureAttributesDisallowAdvertise = 8;
140
+ internal const int MsidbFeatureAttributesUIDisallowAbsent = 16;
141
+ internal const int MsidbFeatureAttributesNoUnsupportedAdvertise = 32;
142
+
143
+ // File.Attributes
144
+ internal const int MsidbFileAttributesReadOnly = 1;
145
+ internal const int MsidbFileAttributesHidden = 2;
146
+ internal const int MsidbFileAttributesSystem = 4;
147
+ internal const int MsidbFileAttributesVital = 512;
148
+ internal const int MsidbFileAttributesChecksum = 1024;
149
+ internal const int MsidbFileAttributesPatchAdded = 4096;
150
+ internal const int MsidbFileAttributesNoncompressed = 8192;
151
+ internal const int MsidbFileAttributesCompressed = 16384;
152
+
153
+ // IniFile.Action & RemoveIniFile.Action
154
+ internal const int MsidbIniFileActionAddLine = 0;
155
+ internal const int MsidbIniFileActionCreateLine = 1;
156
+ internal const int MsidbIniFileActionRemoveLine = 2;
157
+ internal const int MsidbIniFileActionAddTag = 3;
158
+ internal const int MsidbIniFileActionRemoveTag = 4;
159
+
160
+ // MoveFile.Options
161
+ internal const int MsidbMoveFileOptionsMove = 1;
162
+
163
+ // ServiceInstall.Attributes
164
+ internal const int MsidbServiceInstallOwnProcess = 0x00000010;
165
+ internal const int MsidbServiceInstallShareProcess = 0x00000020;
166
+ internal const int MsidbServiceInstallInteractive = 0x00000100;
167
+ internal const int MsidbServiceInstallAutoStart = 0x00000002;
168
+ internal const int MsidbServiceInstallDemandStart = 0x00000003;
169
+ internal const int MsidbServiceInstallDisabled = 0x00000004;
170
+ internal const int MsidbServiceInstallErrorIgnore = 0x00000000;
171
+ internal const int MsidbServiceInstallErrorNormal = 0x00000001;
172
+ internal const int MsidbServiceInstallErrorCritical = 0x00000003;
173
+ internal const int MsidbServiceInstallErrorControlVital = 0x00008000;
174
+
175
+ // ServiceConfig.Event
176
+ internal const int MsidbServiceConfigEventInstall = 0x00000001;
177
+ internal const int MsidbServiceConfigEventUninstall = 0x00000002;
178
+ internal const int MsidbServiceConfigEventReinstall = 0x00000004;
179
+
180
+ // ServiceControl.Attributes
181
+ internal const int MsidbServiceControlEventStart = 0x00000001;
182
+ internal const int MsidbServiceControlEventStop = 0x00000002;
183
+ internal const int MsidbServiceControlEventDelete = 0x00000008;
184
+ internal const int MsidbServiceControlEventUninstallStart = 0x00000010;
185
+ internal const int MsidbServiceControlEventUninstallStop = 0x00000020;
186
+ internal const int MsidbServiceControlEventUninstallDelete = 0x00000080;
187
+
188
+ // TextStyle.StyleBits
189
+ internal const int MsidbTextStyleStyleBitsBold = 1;
190
+ internal const int MsidbTextStyleStyleBitsItalic = 2;
191
+ internal const int MsidbTextStyleStyleBitsUnderline = 4;
192
+ internal const int MsidbTextStyleStyleBitsStrike = 8;
193
+
194
+ // Upgrade.Attributes
195
+ internal const int MsidbUpgradeAttributesMigrateFeatures = 0x00000001;
196
+ internal const int MsidbUpgradeAttributesOnlyDetect = 0x00000002;
197
+ internal const int MsidbUpgradeAttributesIgnoreRemoveFailure = 0x00000004;
198
+ internal const int MsidbUpgradeAttributesVersionMinInclusive = 0x00000100;
199
+ internal const int MsidbUpgradeAttributesVersionMaxInclusive = 0x00000200;
200
+ internal const int MsidbUpgradeAttributesLanguagesExclusive = 0x00000400;
201
+
202
+ // Registry Hive Roots
203
+ internal const int MsidbRegistryRootClassesRoot = 0;
204
+ internal const int MsidbRegistryRootCurrentUser = 1;
205
+ internal const int MsidbRegistryRootLocalMachine = 2;
206
+ internal const int MsidbRegistryRootUsers = 3;
207
+
208
+ // Locator Types
209
+ internal const int MsidbLocatorTypeDirectory = 0;
210
+ internal const int MsidbLocatorTypeFileName = 1;
211
+ internal const int MsidbLocatorTypeRawValue = 2;
212
+ internal const int MsidbLocatorType64bit = 16;
213
+
214
+ internal const int MsidbClassAttributesRelativePath = 1;
215
+
216
+ // RemoveFile.InstallMode
217
+ internal const int MsidbRemoveFileInstallModeOnInstall = 0x00000001;
218
+ internal const int MsidbRemoveFileInstallModeOnRemove = 0x00000002;
219
+ internal const int MsidbRemoveFileInstallModeOnBoth = 0x00000003;
220
+
221
+ // ODBCDataSource.Registration
222
+ internal const int MsidbODBCDataSourceRegistrationPerMachine = 0;
223
+ internal const int MsidbODBCDataSourceRegistrationPerUser = 1;
224
+
225
+ // ModuleConfiguration.Format
226
+ internal const int MsidbModuleConfigurationFormatText = 0;
227
+ internal const int MsidbModuleConfigurationFormatKey = 1;
228
+ internal const int MsidbModuleConfigurationFormatInteger = 2;
229
+ internal const int MsidbModuleConfigurationFormatBitfield = 3;
230
+
231
+ // ModuleConfiguration.Attributes
232
+ internal const int MsidbMsmConfigurableOptionKeyNoOrphan = 1;
233
+ internal const int MsidbMsmConfigurableOptionNonNullable = 2;
234
+
235
+ // ' Windows API function ShowWindow constants - used in Shortcut table
236
+ internal const int SWSHOWNORMAL = 0x00000001;
237
+ internal const int SWSHOWMAXIMIZED = 0x00000003;
238
+ internal const int SWSHOWMINNOACTIVE = 0x00000007;
239
+
240
+ // NameToBit arrays
241
+ // UI elements
242
+ internal static readonly string[] CommonControlAttributes = { "Hidden", "Disabled", "Sunken", "Indirect", "Integer", "RightToLeft", "RightAligned", "LeftScroll" };
243
+ internal static readonly string[] TextControlAttributes = { "Transparent", "NoPrefix", "NoWrap", "FormatSize", "UserLanguage" };
244
+ internal static readonly string[] HyperlinkControlAttributes = { "Transparent" };
245
+ internal static readonly string[] EditControlAttributes = { "Multiline", null, null, null, null, "Password" };
246
+ internal static readonly string[] ProgressControlAttributes = { "ProgressBlocks" };
247
+ internal static readonly string[] VolumeControlAttributes = { "Removable", "Fixed", "Remote", "CDROM", "RAMDisk", "Floppy", "ShowRollbackCost" };
248
+ internal static readonly string[] ListboxControlAttributes = { "Sorted", null, null, null, "UserLanguage" };
249
+ internal static readonly string[] ListviewControlAttributes = { "Sorted", null, null, null, "FixedSize", "Icon16", "Icon32" };
250
+ internal static readonly string[] ComboboxControlAttributes = { "Sorted", "ComboList", null, null, "UserLanguage" };
251
+ internal static readonly string[] RadioControlAttributes = { "Image", "PushLike", "Bitmap", "Icon", "FixedSize", "Icon16", "Icon32", null, "HasBorder" };
252
+ internal static readonly string[] ButtonControlAttributes = { "Image", null, "Bitmap", "Icon", "FixedSize", "Icon16", "Icon32", "ElevationShield" };
253
+ internal static readonly string[] IconControlAttributes = { "Image", null, null, null, "FixedSize", "Icon16", "Icon32" };
254
+ internal static readonly string[] BitmapControlAttributes = { "Image", null, null, null, "FixedSize" };
255
+ internal static readonly string[] CheckboxControlAttributes = { null, "PushLike", "Bitmap", "Icon", "FixedSize", "Icon16", "Icon32" };
256
+
257
+ internal const int MsidbEmbeddedUI = 0x01;
258
+ internal const int MsidbEmbeddedHandlesBasic = 0x02;
259
+
260
+ internal const int INSTALLLOGMODE_FATALEXIT = 0x00001;
261
+ internal const int INSTALLLOGMODE_ERROR = 0x00002;
262
+ internal const int INSTALLLOGMODE_WARNING = 0x00004;
263
+ internal const int INSTALLLOGMODE_USER = 0x00008;
264
+ internal const int INSTALLLOGMODE_INFO = 0x00010;
265
+ internal const int INSTALLLOGMODE_FILESINUSE = 0x00020;
266
+ internal const int INSTALLLOGMODE_RESOLVESOURCE = 0x00040;
267
+ internal const int INSTALLLOGMODE_OUTOFDISKSPACE = 0x00080;
268
+ internal const int INSTALLLOGMODE_ACTIONSTART = 0x00100;
269
+ internal const int INSTALLLOGMODE_ACTIONDATA = 0x00200;
270
+ internal const int INSTALLLOGMODE_PROGRESS = 0x00400;
271
+ internal const int INSTALLLOGMODE_COMMONDATA = 0x00800;
272
+ internal const int INSTALLLOGMODE_INITIALIZE = 0x01000;
273
+ internal const int INSTALLLOGMODE_TERMINATE = 0x02000;
274
+ internal const int INSTALLLOGMODE_SHOWDIALOG = 0x04000;
275
+ internal const int INSTALLLOGMODE_RMFILESINUSE = 0x02000000;
276
+ internal const int INSTALLLOGMODE_INSTALLSTART = 0x04000000;
277
+ internal const int INSTALLLOGMODE_INSTALLEND = 0x08000000;
278
+
279
+ internal const int MSICONDITIONFALSE = 0; // The table is temporary.
280
+ internal const int MSICONDITIONTRUE = 1; // The table is persistent.
281
+ internal const int MSICONDITIONNONE = 2; // The table is unknown.
282
+ internal const int MSICONDITIONERROR = 3; // An invalid handle or invalid parameter was passed to the function.
283
+
284
+ internal const int MSIDBOPENREADONLY = 0;
285
+ internal const int MSIDBOPENTRANSACT = 1;
286
+ internal const int MSIDBOPENDIRECT = 2;
287
+ internal const int MSIDBOPENCREATE = 3;
288
+ internal const int MSIDBOPENCREATEDIRECT = 4;
289
+ internal const int MSIDBOPENPATCHFILE = 32;
290
+
291
+ internal const int MSIMODIFYSEEK = -1; // Refreshes the information in the supplied record without changing the position in the result set and without affecting subsequent fetch operations. The record may then be used for subsequent Update, Delete, and Refresh. All primary key columns of the table must be in the query and the record must have at least as many fields as the query. Seek cannot be used with multi-table queries. This mode cannot be used with a view containing joins. See also the remarks.
292
+ internal const int MSIMODIFYREFRESH = 0; // Refreshes the information in the record. Must first call MsiViewFetch with the same record. Fails for a deleted row. Works with read-write and read-only records.
293
+ internal const int MSIMODIFYINSERT = 1; // Inserts a record. Fails if a row with the same primary keys exists. Fails with a read-only database. This mode cannot be used with a view containing joins.
294
+ internal const int MSIMODIFYUPDATE = 2; // Updates an existing record. Nonprimary keys only. Must first call MsiViewFetch. Fails with a deleted record. Works only with read-write records.
295
+ internal const int MSIMODIFYASSIGN = 3; // Writes current data in the cursor to a table row. Updates record if the primary keys match an existing row and inserts if they do not match. Fails with a read-only database. This mode cannot be used with a view containing joins.
296
+ internal const int MSIMODIFYREPLACE = 4; // Updates or deletes and inserts a record into a table. Must first call MsiViewFetch with the same record. Updates record if the primary keys are unchanged. Deletes old row and inserts new if primary keys have changed. Fails with a read-only database. This mode cannot be used with a view containing joins.
297
+ internal const int MSIMODIFYMERGE = 5; // Inserts or validates a record in a table. Inserts if primary keys do not match any row and validates if there is a match. Fails if the record does not match the data in the table. Fails if there is a record with a duplicate key that is not identical. Works only with read-write records. This mode cannot be used with a view containing joins.
298
+ internal const int MSIMODIFYDELETE = 6; // Remove a row from the table. You must first call the MsiViewFetch function with the same record. Fails if the row has been deleted. Works only with read-write records. This mode cannot be used with a view containing joins.
299
+ internal const int MSIMODIFYINSERTTEMPORARY = 7; // Inserts a temporary record. The information is not persistent. Fails if a row with the same primary key exists. Works only with read-write records. This mode cannot be used with a view containing joins.
300
+ internal const int MSIMODIFYVALIDATE = 8; // Validates a record. Does not validate across joins. You must first call the MsiViewFetch function with the same record. Obtain validation errors with MsiViewGetError. Works with read-write and read-only records. This mode cannot be used with a view containing joins.
301
+ internal const int MSIMODIFYVALIDATENEW = 9; // Validate a new record. Does not validate across joins. Checks for duplicate keys. Obtain validation errors by calling MsiViewGetError. Works with read-write and read-only records. This mode cannot be used with a view containing joins.
302
+ internal const int MSIMODIFYVALIDATEFIELD = 10; // Validates fields of a fetched or new record. Can validate one or more fields of an incomplete record. Obtain validation errors by calling MsiViewGetError. Works with read-write and read-only records. This mode cannot be used with a view containing joins.
303
+ internal const int MSIMODIFYVALIDATEDELETE = 11; // Validates a record that will be deleted later. You must first call MsiViewFetch. Fails if another row refers to the primary keys of this row. Validation does not check for the existence of the primary keys of this row in properties or strings. Does not check if a column is a foreign key to multiple tables. Obtain validation errors by calling MsiViewGetError. Works with read-write and read-only records. This mode cannot be used with a view containing joins.
304
+
305
+ internal const uint VTI2 = 2;
306
+ internal const uint VTI4 = 3;
307
+ internal const uint VTLPWSTR = 30;
308
+ internal const uint VTFILETIME = 64;
309
+
310
+ internal const int MSICOLINFONAMES = 0; // return column names
311
+ internal const int MSICOLINFOTYPES = 1; // return column definitions, datatype code followed by width
312
+ }
313
+}
src/WixToolset.Data/NonClosingStreamWrapper.cs
new
+105
@@ -0,0 +1,105 @@
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 System;
6
+ using System.IO;
7
+
8
+ /// <summary>
9
+ /// Wrapper around stream to prevent other streams (like BinaryReader/Writer) from prematurely
10
+ /// closing a parent stream.
11
+ /// </summary>
12
+ internal class NonClosingStreamWrapper : Stream
13
+ {
14
+ private Stream stream;
15
+
16
+ public NonClosingStreamWrapper(Stream stream)
17
+ {
18
+ this.stream = stream;
19
+ }
20
+
21
+ public override bool CanRead { get { return this.stream.CanRead; } }
22
+
23
+ public override bool CanSeek { get { return this.stream.CanSeek; } }
24
+
25
+ public override bool CanTimeout { get { return this.stream.CanTimeout; } }
26
+
27
+ public override bool CanWrite { get { return this.stream.CanWrite; } }
28
+
29
+ public override long Length { get { return this.stream.Length; } }
30
+
31
+ public override long Position { get { return this.stream.Position; } set { this.stream.Position = value; } }
32
+
33
+ public override int ReadTimeout { get { return this.stream.ReadTimeout; } set { this.stream.ReadTimeout = value; } }
34
+
35
+ public override int WriteTimeout { get { return this.stream.WriteTimeout; } set { this.stream.WriteTimeout = value; } }
36
+
37
+ public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
38
+ {
39
+ return this.stream.BeginRead(buffer, offset, count, callback, state);
40
+ }
41
+
42
+ public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
43
+ {
44
+ return this.stream.BeginWrite(buffer, offset, count, callback, state);
45
+ }
46
+
47
+ public override void Close()
48
+ {
49
+ // Do not pass through the call since this is what we are overriding.
50
+ }
51
+
52
+ protected override void Dispose(bool disposing)
53
+ {
54
+ if (disposing)
55
+ {
56
+ this.stream.Flush();
57
+ }
58
+ }
59
+
60
+ public override int EndRead(IAsyncResult asyncResult)
61
+ {
62
+ return this.stream.EndRead(asyncResult);
63
+ }
64
+
65
+ public override void EndWrite(IAsyncResult asyncResult)
66
+ {
67
+ this.stream.EndWrite(asyncResult);
68
+ }
69
+
70
+ public override void Flush()
71
+ {
72
+ this.stream.Flush();
73
+ }
74
+
75
+ public override int Read(byte[] buffer, int offset, int count)
76
+ {
77
+ return this.stream.Read(buffer, offset, count);
78
+ }
79
+
80
+ public override int ReadByte()
81
+ {
82
+ return this.stream.ReadByte();
83
+ }
84
+
85
+ public override long Seek(long offset, SeekOrigin origin)
86
+ {
87
+ return this.stream.Seek(offset, origin);
88
+ }
89
+
90
+ public override void SetLength(long value)
91
+ {
92
+ this.stream.SetLength(value);
93
+ }
94
+
95
+ public override void Write(byte[] buffer, int offset, int count)
96
+ {
97
+ this.stream.Write(buffer, offset, count);
98
+ }
99
+
100
+ public override void WriteByte(byte value)
101
+ {
102
+ this.stream.WriteByte(value);
103
+ }
104
+ }
105
+}
src/WixToolset.Data/ObjectField.cs
new
+183
@@ -0,0 +1,183 @@
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 System;
6
+ using System.Diagnostics;
7
+ using System.Globalization;
8
+ using System.Xml;
9
+
10
+ /// <summary>
11
+ /// Field containing data for an object column in a row.
12
+ /// </summary>
13
+ public sealed class ObjectField : Field
14
+ {
15
+ /// <summary>
16
+ /// Instantiates a new Field.
17
+ /// </summary>
18
+ /// <param name="columnDefinition">Column definition for this field.</param>
19
+ internal ObjectField(ColumnDefinition columnDefinition) :
20
+ base(columnDefinition)
21
+ {
22
+ }
23
+
24
+ /// <summary>
25
+ /// Gets or sets the index of the embedded file in a library.
26
+ /// </summary>
27
+ /// <value>The index of the embedded file.</value>
28
+ public int? EmbeddedFileIndex { get; set; }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the previous index of the embedded file in the library.
32
+ /// </summary>
33
+ /// <value>The previous index of the embedded file.</value>
34
+ public int? PreviousEmbeddedFileIndex { get; set; }
35
+
36
+ /// <summary>
37
+ /// Gets or sets the path to the embedded cabinet of the previous file.
38
+ /// </summary>
39
+ /// <value>The path of the cabinet containing the previous file.</value>
40
+ public Uri PreviousBaseUri { get; set; }
41
+
42
+ /// <summary>
43
+ /// Gets the base URI of the object field.
44
+ /// </summary>
45
+ /// <value>The base URI of the object field.</value>
46
+ public Uri BaseUri { get; private set; }
47
+
48
+ /// <summary>
49
+ /// Gets or sets the unresolved data for this field.
50
+ /// </summary>
51
+ /// <value>Unresolved Data in the field.</value>
52
+ public string UnresolvedData { get; set; }
53
+
54
+ /// <summary>
55
+ /// Gets or sets the unresolved previous data.
56
+ /// </summary>
57
+ /// <value>The unresolved previous data.</value>
58
+ public string UnresolvedPreviousData { get; set; }
59
+
60
+ /// <summary>
61
+ /// Parse a field from the xml.
62
+ /// </summary>
63
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
64
+ internal override void Read(XmlReader reader)
65
+ {
66
+ Debug.Assert("field" == reader.LocalName);
67
+
68
+ bool empty = reader.IsEmptyElement;
69
+
70
+ this.BaseUri = new Uri(reader.BaseURI);
71
+
72
+ while (reader.MoveToNextAttribute())
73
+ {
74
+ switch (reader.LocalName)
75
+ {
76
+ case "cabinetFileId":
77
+ this.EmbeddedFileIndex = Convert.ToInt32(reader.Value);
78
+ break;
79
+ case "modified":
80
+ this.Modified = reader.Value.Equals("yes");
81
+ break;
82
+ case "previousData":
83
+ this.PreviousData = reader.Value;
84
+ break;
85
+ case "unresolvedPreviousData":
86
+ this.UnresolvedPreviousData = reader.Value;
87
+ break;
88
+ case "unresolvedData":
89
+ this.UnresolvedData = reader.Value;
90
+ break;
91
+ case "previousCabinetFileId":
92
+ this.PreviousEmbeddedFileIndex = Convert.ToInt32(reader.Value);
93
+ break;
94
+ }
95
+ }
96
+
97
+ if (!empty)
98
+ {
99
+ bool done = false;
100
+
101
+ while (!done && reader.Read())
102
+ {
103
+ switch (reader.NodeType)
104
+ {
105
+ case XmlNodeType.Element:
106
+ throw new XmlException();
107
+ case XmlNodeType.CDATA:
108
+ case XmlNodeType.Text:
109
+ if (0 < reader.Value.Length)
110
+ {
111
+ this.Data = reader.Value;
112
+ }
113
+ break;
114
+ case XmlNodeType.EndElement:
115
+ done = true;
116
+ break;
117
+ }
118
+ }
119
+
120
+ if (!done)
121
+ {
122
+ throw new XmlException();
123
+ }
124
+ }
125
+ }
126
+
127
+ /// <summary>
128
+ /// Persists a field in an XML format.
129
+ /// </summary>
130
+ /// <param name="writer">XmlWriter where the Field should persist itself as XML.</param>
131
+ internal override void Write(XmlWriter writer)
132
+ {
133
+ writer.WriteStartElement("field", Intermediate.XmlNamespaceUri);
134
+
135
+ if (this.EmbeddedFileIndex.HasValue)
136
+ {
137
+ writer.WriteStartAttribute("cabinetFileId");
138
+ writer.WriteValue(this.EmbeddedFileIndex);
139
+ writer.WriteEndAttribute();
140
+ }
141
+
142
+ if (this.Modified)
143
+ {
144
+ writer.WriteAttributeString("modified", "yes");
145
+ }
146
+
147
+ if (null != this.UnresolvedPreviousData)
148
+ {
149
+ writer.WriteAttributeString("unresolvedPreviousData", this.UnresolvedPreviousData);
150
+ }
151
+
152
+ if (null != this.PreviousData)
153
+ {
154
+ writer.WriteAttributeString("previousData", this.PreviousData);
155
+ }
156
+
157
+ if (null != this.UnresolvedData)
158
+ {
159
+ writer.WriteAttributeString("unresolvedData", this.UnresolvedData);
160
+ }
161
+
162
+ if (this.PreviousEmbeddedFileIndex.HasValue)
163
+ {
164
+ writer.WriteStartAttribute("previousCabinetFileId");
165
+ writer.WriteValue(this.PreviousEmbeddedFileIndex);
166
+ writer.WriteEndAttribute();
167
+ }
168
+
169
+ // Convert the data to a string that will persist nicely (nulls as String.Empty).
170
+ string text = Convert.ToString(this.Data, CultureInfo.InvariantCulture);
171
+ if (this.Column.UseCData)
172
+ {
173
+ writer.WriteCData(text);
174
+ }
175
+ else
176
+ {
177
+ writer.WriteString(text);
178
+ }
179
+
180
+ writer.WriteEndElement();
181
+ }
182
+ }
183
+}
src/WixToolset.Data/Output.cs
new
+394
@@ -0,0 +1,394 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Globalization;
8
+ using System.IO;
9
+ using System.Linq;
10
+ using System.Xml;
11
+
12
+ /// <summary>
13
+ /// Output is generated by the linker.
14
+ /// </summary>
15
+ public sealed class Output
16
+ {
17
+ public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixout";
18
+ private static readonly Version CurrentVersion = new Version("4.0.0.0");
19
+
20
+ private Section entrySection;
21
+
22
+ /// <summary>
23
+ /// Creates a new empty output object.
24
+ /// </summary>
25
+ /// <param name="sourceLineNumbers">The source line information for the output.</param>
26
+ public Output(SourceLineNumber sourceLineNumbers)
27
+ {
28
+ this.Sections = new List<Section>();
29
+ this.SourceLineNumbers = sourceLineNumbers;
30
+ this.SubStorages = new List<SubStorage>();
31
+ this.Tables = new TableIndexedCollection();
32
+ }
33
+
34
+ /// <summary>
35
+ /// Gets the entry section for the output
36
+ /// </summary>
37
+ /// <value>Entry section for the output.</value>
38
+ public Section EntrySection
39
+ {
40
+ get
41
+ {
42
+ return this.entrySection;
43
+ }
44
+
45
+ set
46
+ {
47
+ this.entrySection = value;
48
+ this.Codepage = value.Codepage;
49
+
50
+ switch (this.entrySection.Type)
51
+ {
52
+ case SectionType.Bundle:
53
+ this.Type = OutputType.Bundle;
54
+ break;
55
+ case SectionType.Product:
56
+ this.Type = OutputType.Product;
57
+ break;
58
+ case SectionType.Module:
59
+ this.Type = OutputType.Module;
60
+ break;
61
+ case SectionType.PatchCreation:
62
+ this.Type = OutputType.PatchCreation;
63
+ break;
64
+ case SectionType.Patch:
65
+ this.Type = OutputType.Patch;
66
+ break;
67
+ default:
68
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_UnexpectedEntrySectionType, this.entrySection.Type));
69
+ }
70
+ }
71
+ }
72
+
73
+ /// <summary>
74
+ /// Gets the type of the output.
75
+ /// </summary>
76
+ /// <value>Type of the output.</value>
77
+ public OutputType Type { get; set; }
78
+
79
+ /// <summary>
80
+ /// Gets or sets the codepage for this output.
81
+ /// </summary>
82
+ /// <value>Codepage of the output.</value>
83
+ public int Codepage { get; set; }
84
+
85
+ /// <summary>
86
+ /// Gets the sections contained in the output.
87
+ /// </summary>
88
+ /// <value>Sections in the output.</value>
89
+ public ICollection<Section> Sections { get; private set; }
90
+
91
+ /// <summary>
92
+ /// Gets the source line information for this output.
93
+ /// </summary>
94
+ /// <value>The source line information for this output.</value>
95
+ public SourceLineNumber SourceLineNumbers { get; private set; }
96
+
97
+ /// <summary>
98
+ /// Gets the substorages in this output.
99
+ /// </summary>
100
+ /// <value>The substorages in this output.</value>
101
+ public ICollection<SubStorage> SubStorages { get; private set; }
102
+
103
+ /// <summary>
104
+ /// Gets the tables contained in this output.
105
+ /// </summary>
106
+ /// <value>Collection of tables.</value>
107
+ public TableIndexedCollection Tables { get; private set; }
108
+
109
+ /// <summary>
110
+ /// Gets the output type corresponding to a given output filename extension.
111
+ /// </summary>
112
+ /// <param name="extension">Case-insensitive output filename extension.</param>
113
+ /// <returns>Output type for the extension.</returns>
114
+ public static OutputType GetOutputType(string extension)
115
+ {
116
+ if (extension.Equals(".exe", StringComparison.OrdinalIgnoreCase))
117
+ {
118
+ return OutputType.Bundle;
119
+ }
120
+ if (extension.Equals(".msi", StringComparison.OrdinalIgnoreCase))
121
+ {
122
+ return OutputType.Product;
123
+ }
124
+ else if (extension.Equals(".msm", StringComparison.OrdinalIgnoreCase))
125
+ {
126
+ return OutputType.Module;
127
+ }
128
+ else if (extension.Equals(".msp", StringComparison.OrdinalIgnoreCase))
129
+ {
130
+ return OutputType.Patch;
131
+ }
132
+ else if (extension.Equals(".mst", StringComparison.OrdinalIgnoreCase))
133
+ {
134
+ return OutputType.Transform;
135
+ }
136
+ else if (extension.Equals(".pcp", StringComparison.OrdinalIgnoreCase))
137
+ {
138
+ return OutputType.PatchCreation;
139
+ }
140
+ else
141
+ {
142
+ return OutputType.Unknown;
143
+ }
144
+ }
145
+
146
+ /// <summary>
147
+ /// Gets the filename extension corresponding to a given output type.
148
+ /// </summary>
149
+ /// <param name="type">One of the WiX output types.</param>
150
+ /// <returns>Filename extension for the output type, for example ".msi".</returns>
151
+ public static string GetExtension(OutputType type)
152
+ {
153
+ switch (type)
154
+ {
155
+ case OutputType.Bundle:
156
+ return ".exe";
157
+ case OutputType.Product:
158
+ return ".msi";
159
+ case OutputType.Module:
160
+ return ".msm";
161
+ case OutputType.Patch:
162
+ return ".msp";
163
+ case OutputType.Transform:
164
+ return ".mst";
165
+ case OutputType.PatchCreation:
166
+ return ".pcp";
167
+ default:
168
+ return ".wix";
169
+ }
170
+ }
171
+
172
+ /// <summary>
173
+ /// Loads an output from a path on disk.
174
+ /// </summary>
175
+ /// <param name="path">Path to output file saved on disk.</param>
176
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
177
+ /// <returns>Output object.</returns>
178
+ public static Output Load(string path, bool suppressVersionCheck)
179
+ {
180
+ using (FileStream stream = File.OpenRead(path))
181
+ using (FileStructure fs = FileStructure.Read(stream))
182
+ {
183
+ if (FileFormat.Wixout != fs.FileFormat)
184
+ {
185
+ throw new WixUnexpectedFileFormatException(path, FileFormat.Wixout, fs.FileFormat);
186
+ }
187
+
188
+ Uri uri = new Uri(Path.GetFullPath(path));
189
+ using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri))
190
+ {
191
+ try
192
+ {
193
+ reader.MoveToContent();
194
+ return Output.Read(reader, suppressVersionCheck);
195
+ }
196
+ catch (XmlException xe)
197
+ {
198
+ throw new WixCorruptFileException(path, fs.FileFormat, xe);
199
+ }
200
+ }
201
+ }
202
+ }
203
+
204
+ /// <summary>
205
+ /// Saves an output to a path on disk.
206
+ /// </summary>
207
+ /// <param name="path">Path to save output file to on disk.</param>
208
+ public void Save(string path)
209
+ {
210
+ Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path)));
211
+
212
+ using (FileStream stream = File.Create(path))
213
+ using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixout, null))
214
+ using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream()))
215
+ {
216
+ writer.WriteStartDocument();
217
+ this.Write(writer);
218
+ writer.WriteEndDocument();
219
+ }
220
+ }
221
+
222
+ /// <summary>
223
+ /// Processes an XmlReader and builds up the output object.
224
+ /// </summary>
225
+ /// <param name="reader">Reader to get data from.</param>
226
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
227
+ /// <returns>The Output represented by the Xml.</returns>
228
+ internal static Output Read(XmlReader reader, bool suppressVersionCheck)
229
+ {
230
+ if (!reader.LocalName.Equals("wixOutput"))
231
+ {
232
+ throw new XmlException();
233
+ }
234
+
235
+ bool empty = reader.IsEmptyElement;
236
+ Output output = new Output(SourceLineNumber.CreateFromUri(reader.BaseURI));
237
+ SectionType sectionType = SectionType.Unknown;
238
+ Version version = null;
239
+
240
+ while (reader.MoveToNextAttribute())
241
+ {
242
+ switch (reader.LocalName)
243
+ {
244
+ case "codepage":
245
+ output.Codepage = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture.NumberFormat);
246
+ break;
247
+ case "type":
248
+ switch (reader.Value)
249
+ {
250
+ case "Bundle":
251
+ output.Type = OutputType.Bundle;
252
+ sectionType = SectionType.Bundle;
253
+ break;
254
+ case "Module":
255
+ output.Type = OutputType.Module;
256
+ sectionType = SectionType.Module;
257
+ break;
258
+ case "Patch":
259
+ output.Type = OutputType.Patch;
260
+ break;
261
+ case "PatchCreation":
262
+ output.Type = OutputType.PatchCreation;
263
+ sectionType = SectionType.PatchCreation;
264
+ break;
265
+ case "Product":
266
+ output.Type = OutputType.Product;
267
+ sectionType = SectionType.Product;
268
+ break;
269
+ case "Transform":
270
+ output.Type = OutputType.Transform;
271
+ break;
272
+ default:
273
+ throw new XmlException();
274
+ }
275
+ break;
276
+ case "version":
277
+ version = new Version(reader.Value);
278
+ break;
279
+ }
280
+ }
281
+
282
+ if (!suppressVersionCheck && null != version && !Output.CurrentVersion.Equals(version))
283
+ {
284
+ throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixOutput", version.ToString(), Output.CurrentVersion.ToString()));
285
+ }
286
+
287
+ // create a section for all the rows to belong to
288
+ output.entrySection = new Section(null, sectionType, output.Codepage);
289
+
290
+ // loop through the rest of the xml building up the Output object
291
+ TableDefinitionCollection tableDefinitions = null;
292
+ List<Table> tables = new List<Table>();
293
+ if (!empty)
294
+ {
295
+ bool done = false;
296
+
297
+ // loop through all the fields in a row
298
+ while (!done && reader.Read())
299
+ {
300
+ switch (reader.NodeType)
301
+ {
302
+ case XmlNodeType.Element:
303
+ switch (reader.LocalName)
304
+ {
305
+ case "subStorage":
306
+ output.SubStorages.Add(SubStorage.Read(reader));
307
+ break;
308
+ case "table":
309
+ if (null == tableDefinitions)
310
+ {
311
+ throw new XmlException();
312
+ }
313
+ tables.Add(Table.Read(reader, output.entrySection, tableDefinitions));
314
+ break;
315
+ case "tableDefinitions":
316
+ tableDefinitions = TableDefinitionCollection.Read(reader);
317
+ break;
318
+ default:
319
+ throw new XmlException();
320
+ }
321
+ break;
322
+ case XmlNodeType.EndElement:
323
+ done = true;
324
+ break;
325
+ }
326
+ }
327
+
328
+ if (!done)
329
+ {
330
+ throw new XmlException();
331
+ }
332
+ }
333
+
334
+ output.Tables = new TableIndexedCollection(tables);
335
+ return output;
336
+ }
337
+
338
+ /// <summary>
339
+ /// Ensure this output contains a particular table.
340
+ /// </summary>
341
+ /// <param name="tableDefinition">Definition of the table that should exist.</param>
342
+ /// <param name="section">Optional section to use for the table. If one is not provided, the entry section will be used.</param>
343
+ /// <returns>The table in this output.</returns>
344
+ public Table EnsureTable(TableDefinition tableDefinition, Section section = null)
345
+ {
346
+ Table table;
347
+ if (!this.Tables.TryGetTable(tableDefinition.Name, out table))
348
+ {
349
+ table = new Table(section ?? this.entrySection, tableDefinition);
350
+ this.Tables.Add(table);
351
+ }
352
+
353
+ return table;
354
+ }
355
+
356
+ /// <summary>
357
+ /// Persists an output in an XML format.
358
+ /// </summary>
359
+ /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param>
360
+ internal void Write(XmlWriter writer)
361
+ {
362
+ writer.WriteStartElement("wixOutput", XmlNamespaceUri);
363
+
364
+ writer.WriteAttributeString("type", this.Type.ToString());
365
+
366
+ if (0 != this.Codepage)
367
+ {
368
+ writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture));
369
+ }
370
+
371
+ writer.WriteAttributeString("version", Output.CurrentVersion.ToString());
372
+
373
+ // Collect all the table definitions and write them.
374
+ TableDefinitionCollection tableDefinitions = new TableDefinitionCollection();
375
+ foreach (Table table in this.Tables)
376
+ {
377
+ tableDefinitions.Add(table.Definition);
378
+ }
379
+ tableDefinitions.Write(writer);
380
+
381
+ foreach (Table table in this.Tables.OrderBy(t => t.Name))
382
+ {
383
+ table.Write(writer);
384
+ }
385
+
386
+ foreach (SubStorage subStorage in this.SubStorages)
387
+ {
388
+ subStorage.Write(writer);
389
+ }
390
+
391
+ writer.WriteEndElement();
392
+ }
393
+ }
394
+}
src/WixToolset.Data/OutputType.cs
new
+31
@@ -0,0 +1,31 @@
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
+ /// <summary>
6
+ /// Various types of output.
7
+ /// </summary>
8
+ public enum OutputType
9
+ {
10
+ /// <summary>Unknown output type.</summary>
11
+ Unknown,
12
+
13
+ /// <summary>Bundle output type.</summary>
14
+ Bundle,
15
+
16
+ /// <summary>Module output type.</summary>
17
+ Module,
18
+
19
+ /// <summary>Patch output type.</summary>
20
+ Patch,
21
+
22
+ /// <summary>Patch Creation output type.</summary>
23
+ PatchCreation,
24
+
25
+ /// <summary>Product output type.</summary>
26
+ Product,
27
+
28
+ /// <summary>Transform output type.</summary>
29
+ Transform
30
+ }
31
+}
src/WixToolset.Data/PackagingType.cs
new
+11
@@ -0,0 +1,11 @@
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
+ public enum PackagingType
6
+ {
7
+ Unknown,
8
+ Embedded,
9
+ External,
10
+ }
11
+}
src/WixToolset.Data/Pdb.cs
new
+163
@@ -0,0 +1,163 @@
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 System;
6
+ using System.IO;
7
+ using System.Xml;
8
+
9
+ /// <summary>
10
+ /// Pdb generated by the binder.
11
+ /// </summary>
12
+ public sealed class Pdb
13
+ {
14
+ public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixpdb";
15
+ private static readonly Version CurrentVersion = new Version("4.0.0.0");
16
+
17
+ /// <summary>
18
+ /// Creates a new empty pdb object.
19
+ /// </summary>
20
+ /// <param name="sourceLineNumbers">The source line information for the pdb.</param>
21
+ public Pdb()
22
+ {
23
+ }
24
+
25
+ /// <summary>
26
+ /// Gets or sets the output that is a part of this pdb.
27
+ /// </summary>
28
+ /// <value>Type of the output.</value>
29
+ public Output Output { get; set; }
30
+
31
+ /// <summary>
32
+ /// Loads a pdb from a path on disk.
33
+ /// </summary>
34
+ /// <param name="path">Path to pdb file saved on disk.</param>
35
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
36
+ /// <returns>Pdb pdb.</returns>
37
+ public static Pdb Load(string path, bool suppressVersionCheck)
38
+ {
39
+ using (FileStream stream = File.OpenRead(path))
40
+ using (FileStructure fs = FileStructure.Read(stream))
41
+ {
42
+ if (FileFormat.Wixpdb != fs.FileFormat)
43
+ {
44
+ throw new WixUnexpectedFileFormatException(path, FileFormat.Wixpdb, fs.FileFormat);
45
+ }
46
+
47
+ Uri uri = new Uri(Path.GetFullPath(path));
48
+ using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri))
49
+ {
50
+ try
51
+ {
52
+ reader.MoveToContent();
53
+ return Pdb.Read(reader, suppressVersionCheck);
54
+ }
55
+ catch (XmlException xe)
56
+ {
57
+ throw new WixCorruptFileException(path, fs.FileFormat, xe);
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ /// <summary>
64
+ /// Saves a pdb to a path on disk.
65
+ /// </summary>
66
+ /// <param name="path">Path to save pdb file to on disk.</param>
67
+ public void Save(string path)
68
+ {
69
+ Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path)));
70
+
71
+ using (FileStream stream = File.Create(path))
72
+ using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixpdb, null))
73
+ using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream()))
74
+ {
75
+ writer.WriteStartDocument();
76
+ this.Write(writer);
77
+ writer.WriteEndDocument();
78
+ }
79
+ }
80
+
81
+ /// <summary>
82
+ /// Processes an XmlReader and builds up the pdb object.
83
+ /// </summary>
84
+ /// <param name="reader">Reader to get data from.</param>
85
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
86
+ /// <returns>The Pdb represented by the Xml.</returns>
87
+ internal static Pdb Read(XmlReader reader, bool suppressVersionCheck)
88
+ {
89
+ if ("wixPdb" != reader.LocalName)
90
+ {
91
+ throw new XmlException();
92
+ }
93
+
94
+ bool empty = reader.IsEmptyElement;
95
+ Pdb pdb = new Pdb();
96
+ Version version = null;
97
+
98
+ while (reader.MoveToNextAttribute())
99
+ {
100
+ switch (reader.LocalName)
101
+ {
102
+ case "version":
103
+ version = new Version(reader.Value);
104
+ break;
105
+ }
106
+ }
107
+
108
+ if (!suppressVersionCheck && null != version && !Pdb.CurrentVersion.Equals(version))
109
+ {
110
+ throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixPdb", version.ToString(), Pdb.CurrentVersion.ToString()));
111
+ }
112
+
113
+ // loop through the rest of the pdb building up the Output object
114
+ if (!empty)
115
+ {
116
+ bool done = false;
117
+
118
+ // loop through all the fields in a row
119
+ while (!done && reader.Read())
120
+ {
121
+ switch (reader.NodeType)
122
+ {
123
+ case XmlNodeType.Element:
124
+ switch (reader.LocalName)
125
+ {
126
+ case "wixOutput":
127
+ pdb.Output = Output.Read(reader, suppressVersionCheck);
128
+ break;
129
+ default:
130
+ throw new XmlException();
131
+ }
132
+ break;
133
+ case XmlNodeType.EndElement:
134
+ done = true;
135
+ break;
136
+ }
137
+ }
138
+
139
+ if (!done)
140
+ {
141
+ throw new XmlException();
142
+ }
143
+ }
144
+
145
+ return pdb;
146
+ }
147
+
148
+ /// <summary>
149
+ /// Persists a pdb in an XML format.
150
+ /// </summary>
151
+ /// <param name="writer">XmlWriter where the Pdb should persist itself as XML.</param>
152
+ internal void Write(XmlWriter writer)
153
+ {
154
+ writer.WriteStartElement("wixPdb", XmlNamespaceUri);
155
+
156
+ writer.WriteAttributeString("version", Pdb.CurrentVersion.ToString());
157
+
158
+ this.Output.Write(writer);
159
+
160
+ writer.WriteEndElement();
161
+ }
162
+ }
163
+}
src/WixToolset.Data/Platform.cs
new
+22
@@ -0,0 +1,22 @@
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
+ /// <summary>
6
+ /// Platforms supported by compiler.
7
+ /// </summary>
8
+ public enum Platform
9
+ {
10
+ /// <summary>x86.</summary>
11
+ X86,
12
+
13
+ /// <summary>x64.</summary>
14
+ X64,
15
+
16
+ /// <summary>ia64.</summary>
17
+ IA64,
18
+
19
+ /// <summary>arm.</summary>
20
+ ARM
21
+ }
22
+}
src/WixToolset.Data/Row.cs
new
+626
@@ -0,0 +1,626 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Diagnostics;
8
+ using System.Diagnostics.CodeAnalysis;
9
+ using System.Globalization;
10
+ using System.Text;
11
+ using System.Text.RegularExpressions;
12
+ using System.Xml;
13
+
14
+ /// <summary>
15
+ /// Row containing data for a table.
16
+ /// </summary>
17
+ public class Row
18
+ {
19
+ private static long rowCount;
20
+
21
+ private Field[] fields;
22
+
23
+ /// <summary>
24
+ /// Creates a row that belongs to a table.
25
+ /// </summary>
26
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
27
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
28
+ /// <remarks>The compiler should use this constructor exclusively.</remarks>
29
+ public Row(SourceLineNumber sourceLineNumbers, Table table)
30
+ : this(sourceLineNumbers, table.Definition)
31
+ {
32
+ this.Table = table;
33
+ }
34
+
35
+ /// <summary>
36
+ /// Creates a row that does not belong to a table.
37
+ /// </summary>
38
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
39
+ /// <param name="tableDefinition">TableDefinition this row should get its column definitions from.</param>
40
+ /// <remarks>This constructor is used in cases where there isn't a clear owner of the row. The linker uses this constructor for the rows it generates.</remarks>
41
+ public Row(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition)
42
+ {
43
+ this.Number = rowCount++;
44
+ this.SourceLineNumbers = sourceLineNumbers;
45
+ this.fields = new Field[tableDefinition.Columns.Count];
46
+ this.TableDefinition = tableDefinition;
47
+
48
+ for (int i = 0; i < this.fields.Length; ++i)
49
+ {
50
+ this.fields[i] = Field.Create(this.TableDefinition.Columns[i]);
51
+ }
52
+ }
53
+
54
+ /// <summary>
55
+ /// Creates a shallow copy of a row from another row.
56
+ /// </summary>
57
+ /// <param name="source">The row the data is copied from.</param>
58
+ protected Row(Row source)
59
+ {
60
+ this.Table = source.Table;
61
+ this.TableDefinition = source.TableDefinition;
62
+ this.Number = source.Number;
63
+ this.Access = source.Access;
64
+ this.Operation = source.Operation;
65
+ this.Redundant = source.Redundant;
66
+ this.SectionId = source.SectionId;
67
+ this.SourceLineNumbers = source.SourceLineNumbers;
68
+ this.fields = source.fields;
69
+ }
70
+
71
+ /// <summary>
72
+ /// Gets or sets the access to the row's primary key.
73
+ /// </summary>
74
+ /// <value>The row access modifier.</value>
75
+ public AccessModifier Access { get; set; }
76
+
77
+ /// <summary>
78
+ /// Gets or sets the row transform operation.
79
+ /// </summary>
80
+ /// <value>The row transform operation.</value>
81
+ public RowOperation Operation { get; set; }
82
+
83
+ /// <summary>
84
+ /// Gets or sets wether the row is a duplicate of another row thus redundant.
85
+ /// </summary>
86
+ public bool Redundant { get; set; }
87
+
88
+ /// <summary>
89
+ /// Gets the section for the row.
90
+ /// </summary>
91
+ /// <value>Section for the row.</value>
92
+ public Section Section { get { return (null == this.Table) ? null : this.Table.Section; } }
93
+
94
+ /// <summary>
95
+ /// Gets or sets the SectionId property on the row.
96
+ /// </summary>
97
+ /// <value>The SectionId property on the row.</value>
98
+ public string SectionId { get; set; }
99
+
100
+ /// <summary>
101
+ /// Gets the source file and line number for the row.
102
+ /// </summary>
103
+ /// <value>Source file and line number.</value>
104
+ public SourceLineNumber SourceLineNumbers { get; private set; }
105
+
106
+ /// <summary>
107
+ /// Gets the table this row belongs to.
108
+ /// </summary>
109
+ /// <value>null if Row does not belong to a Table, or owner Table otherwise.</value>
110
+ public Table Table { get; private set; }
111
+
112
+ /// <summary>
113
+ /// Gets the table definition for this row.
114
+ /// </summary>
115
+ /// <remarks>A Row always has a TableDefinition, even if the Row does not belong to a Table.</remarks>
116
+ /// <value>TableDefinition for Row.</value>
117
+ public TableDefinition TableDefinition { get; private set; }
118
+
119
+ /// <summary>
120
+ /// Gets the fields contained by this row.
121
+ /// </summary>
122
+ /// <value>Array of field objects</value>
123
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
124
+ public Field[] Fields
125
+ {
126
+ get { return this.fields; }
127
+ }
128
+
129
+ /// <summary>
130
+ /// Gets the unique number for the row.
131
+ /// </summary>
132
+ /// <value>Number for row.</value>
133
+ public long Number { get; private set; }
134
+
135
+ /// <summary>
136
+ /// Gets or sets the value of a particular field in the row.
137
+ /// </summary>
138
+ /// <param name="field">field index.</param>
139
+ /// <value>Value of a field in the row.</value>
140
+ public object this[int field]
141
+ {
142
+ get { return this.fields[field].Data; }
143
+ set { this.fields[field].Data = value; }
144
+ }
145
+
146
+ /// <summary>
147
+ /// Gets the field as an integer.
148
+ /// </summary>
149
+ /// <returns>Field's data as an integer.</returns>
150
+ public int FieldAsInteger(int field)
151
+ {
152
+ return this.fields[field].AsInteger();
153
+ }
154
+
155
+ /// <summary>
156
+ /// Gets the field as an integer that could be null.
157
+ /// </summary>
158
+ /// <returns>Field's data as an integer that could be null.</returns>
159
+ public int? FieldAsNullableInteger(int field)
160
+ {
161
+ return this.fields[field].AsNullableInteger();
162
+ }
163
+
164
+ /// <summary>
165
+ /// Gets the field as a string.
166
+ /// </summary>
167
+ /// <returns>Field's data as a string.</returns>
168
+ public string FieldAsString(int field)
169
+ {
170
+ return this.fields[field].AsString();
171
+ }
172
+
173
+ /// <summary>
174
+ /// Sets the value of a particular field in the row without validating.
175
+ /// </summary>
176
+ /// <param name="field">field index.</param>
177
+ /// <param name="value">Value of a field in the row.</param>
178
+ /// <returns>True if successful, false if validation failed.</returns>
179
+ public bool BestEffortSetField(int field, object value)
180
+ {
181
+ return this.fields[field].BestEffortSet(value);
182
+ }
183
+
184
+ /// <summary>
185
+ /// Get the value used to represent the row in a keyed row collection.
186
+ /// </summary>
187
+ /// <returns>Primary key or row number if no primary key is available.</returns>
188
+ public string GetKey()
189
+ {
190
+ return this.GetPrimaryKey() ?? Convert.ToString(this.Number, CultureInfo.InvariantCulture);
191
+ }
192
+
193
+ /// <summary>
194
+ /// Get the primary key of this row.
195
+ /// </summary>
196
+ /// <param name="delimiter">Delimiter character for multiple column primary keys.</param>
197
+ /// <returns>The primary key or null if the row's table has no primary key columns.</returns>
198
+ public string GetPrimaryKey(char delimiter = '/')
199
+ {
200
+ return this.GetPrimaryKey(delimiter, String.Empty);
201
+ }
202
+
203
+ /// <summary>
204
+ /// Get the primary key of this row.
205
+ /// </summary>
206
+ /// <param name="delimiter">Delimiter character for multiple column primary keys.</param>
207
+ /// <param name="nullReplacement">String to represent null values in the primary key.</param>
208
+ /// <returns>The primary key or null if the row's table has no primary key columns.</returns>
209
+ public string GetPrimaryKey(char delimiter, string nullReplacement)
210
+ {
211
+ bool foundPrimaryKey = false;
212
+ StringBuilder primaryKey = new StringBuilder();
213
+
214
+ foreach (Field field in this.fields)
215
+ {
216
+ if (field.Column.PrimaryKey)
217
+ {
218
+ if (foundPrimaryKey)
219
+ {
220
+ primaryKey.Append(delimiter);
221
+ }
222
+
223
+ primaryKey.Append((null == field.Data) ? nullReplacement : Convert.ToString(field.Data, CultureInfo.InvariantCulture));
224
+
225
+ foundPrimaryKey = true;
226
+ }
227
+ else // primary keys must be the first columns of a row so the first non-primary key means we can stop looking.
228
+ {
229
+ break;
230
+ }
231
+ }
232
+
233
+ return foundPrimaryKey ? primaryKey.ToString() : null;
234
+ }
235
+
236
+ /// <summary>
237
+ /// Returns true if the specified field is null or an empty string.
238
+ /// </summary>
239
+ /// <param name="field">Index of the field to check.</param>
240
+ /// <returns>true if the specified field is null or an empty string, false otherwise.</returns>
241
+ public bool IsColumnEmpty(int field)
242
+ {
243
+ if (null == this.fields[field].Data)
244
+ {
245
+ return true;
246
+ }
247
+
248
+ string dataString = this.fields[field].Data as string;
249
+ if (null != dataString && 0 == dataString.Length)
250
+ {
251
+ return true;
252
+ }
253
+
254
+ return false;
255
+ }
256
+
257
+ /// <summary>
258
+ /// Tests if the passed in row is identical.
259
+ /// </summary>
260
+ /// <param name="row">Row to compare against.</param>
261
+ /// <returns>True if two rows are identical.</returns>
262
+ public bool IsIdentical(Row row)
263
+ {
264
+ bool identical = (this.TableDefinition.Name == row.TableDefinition.Name && this.fields.Length == row.fields.Length);
265
+
266
+ for (int i = 0; identical && i < this.fields.Length; ++i)
267
+ {
268
+ if (!(this.fields[i].IsIdentical(row.fields[i])))
269
+ {
270
+ identical = false;
271
+ }
272
+ }
273
+
274
+ return identical;
275
+ }
276
+
277
+ /// <summary>
278
+ /// Returns a string representation of the Row.
279
+ /// </summary>
280
+ /// <returns>A string representation of the Row.</returns>
281
+ public override string ToString()
282
+ {
283
+ return String.Join("/", (object[])this.fields);
284
+ }
285
+
286
+ /// <summary>
287
+ /// Creates a Row from the XmlReader.
288
+ /// </summary>
289
+ /// <param name="reader">Reader to get data from.</param>
290
+ /// <param name="table">Table for this row.</param>
291
+ /// <returns>New row object.</returns>
292
+ internal static Row Read(XmlReader reader, Table table)
293
+ {
294
+ Debug.Assert("row" == reader.LocalName);
295
+
296
+ bool empty = reader.IsEmptyElement;
297
+ AccessModifier access = AccessModifier.Public;
298
+ RowOperation operation = RowOperation.None;
299
+ bool redundant = false;
300
+ string sectionId = null;
301
+ SourceLineNumber sourceLineNumbers = null;
302
+
303
+ while (reader.MoveToNextAttribute())
304
+ {
305
+ switch (reader.LocalName)
306
+ {
307
+ case "access":
308
+ access = (AccessModifier)Enum.Parse(typeof(AccessModifier), reader.Value, true);
309
+ break;
310
+ case "op":
311
+ operation = (RowOperation)Enum.Parse(typeof(RowOperation), reader.Value, true);
312
+ break;
313
+ case "redundant":
314
+ redundant = reader.Value.Equals("yes");
315
+ break;
316
+ case "sectionId":
317
+ sectionId = reader.Value;
318
+ break;
319
+ case "sourceLineNumber":
320
+ sourceLineNumbers = SourceLineNumber.CreateFromEncoded(reader.Value);
321
+ break;
322
+ }
323
+ }
324
+
325
+ Row row = table.CreateRow(sourceLineNumbers);
326
+ row.Access = access;
327
+ row.Operation = operation;
328
+ row.Redundant = redundant;
329
+ row.SectionId = sectionId;
330
+
331
+ // loop through all the fields in a row
332
+ if (!empty)
333
+ {
334
+ bool done = false;
335
+ int field = 0;
336
+
337
+ // loop through all the fields in a row
338
+ while (!done && reader.Read())
339
+ {
340
+ switch (reader.NodeType)
341
+ {
342
+ case XmlNodeType.Element:
343
+ switch (reader.LocalName)
344
+ {
345
+ case "field":
346
+ if (row.Fields.Length <= field)
347
+ {
348
+ if (!reader.IsEmptyElement)
349
+ {
350
+ throw new XmlException();
351
+ }
352
+ }
353
+ else
354
+ {
355
+ row.fields[field].Read(reader);
356
+ }
357
+ ++field;
358
+ break;
359
+ default:
360
+ throw new XmlException();
361
+ }
362
+ break;
363
+ case XmlNodeType.EndElement:
364
+ done = true;
365
+ break;
366
+ }
367
+ }
368
+
369
+ if (!done)
370
+ {
371
+ throw new XmlException();
372
+ }
373
+ }
374
+
375
+ return row;
376
+ }
377
+
378
+ /// <summary>
379
+ /// Returns the row in a format usable in IDT files.
380
+ /// </summary>
381
+ /// <param name="keepAddedColumns">Whether to keep columns added in a transform.</param>
382
+ /// <returns>String with tab delimited field values.</returns>
383
+ internal string ToIdtDefinition(bool keepAddedColumns)
384
+ {
385
+ bool first = true;
386
+ StringBuilder sb = new StringBuilder();
387
+
388
+ foreach (Field field in this.fields)
389
+ {
390
+ // Conditionally keep columns added in a transform; otherwise,
391
+ // break because columns can only be added at the end.
392
+ if (field.Column.Added && !keepAddedColumns)
393
+ {
394
+ break;
395
+ }
396
+
397
+ if (first)
398
+ {
399
+ first = false;
400
+ }
401
+ else
402
+ {
403
+ sb.Append('\t');
404
+ }
405
+
406
+ sb.Append(field.ToIdtValue());
407
+ }
408
+ sb.Append("\r\n");
409
+
410
+ return sb.ToString();
411
+ }
412
+
413
+ /// <summary>
414
+ /// Gets the modularized version of the field data.
415
+ /// </summary>
416
+ /// <param name="field">The field to modularize.</param>
417
+ /// <param name="modularizationGuid">String containing the GUID of the Merge Module to append the the field value, if appropriate.</param>
418
+ /// <param name="suppressModularizationIdentifiers">Optional collection of identifiers that should not be modularized.</param>
419
+ /// <remarks>moduleGuid is expected to be null when not being used to compile a Merge Module.</remarks>
420
+ /// <returns>The modularized version of the field data.</returns>
421
+ internal string GetModularizedValue(Field field, string modularizationGuid, ISet<string> suppressModularizationIdentifiers)
422
+ {
423
+ Debug.Assert(null != field.Data && 0 < ((string)field.Data).Length);
424
+ string fieldData = Convert.ToString(field.Data, CultureInfo.InvariantCulture);
425
+
426
+ if (null != modularizationGuid && ColumnModularizeType.None != field.Column.ModularizeType && !(WindowsInstallerStandard.IsStandardAction(fieldData) || WindowsInstallerStandard.IsStandardProperty(fieldData)))
427
+ {
428
+ StringBuilder sb;
429
+ int start;
430
+ ColumnModularizeType modularizeType = field.Column.ModularizeType;
431
+
432
+ // special logic for the ControlEvent table's Argument column
433
+ // this column requires different modularization methods depending upon the value of the Event column
434
+ if (ColumnModularizeType.ControlEventArgument == field.Column.ModularizeType)
435
+ {
436
+ switch (this[2].ToString())
437
+ {
438
+ case "CheckExistingTargetPath": // redirectable property name
439
+ case "CheckTargetPath":
440
+ case "DoAction": // custom action name
441
+ case "NewDialog": // dialog name
442
+ case "SelectionBrowse":
443
+ case "SetTargetPath":
444
+ case "SpawnDialog":
445
+ case "SpawnWaitDialog":
446
+ if (Common.IsIdentifier(fieldData))
447
+ {
448
+ modularizeType = ColumnModularizeType.Column;
449
+ }
450
+ else
451
+ {
452
+ modularizeType = ColumnModularizeType.Property;
453
+ }
454
+ break;
455
+ default: // formatted
456
+ modularizeType = ColumnModularizeType.Property;
457
+ break;
458
+ }
459
+ }
460
+ else if (ColumnModularizeType.ControlText == field.Column.ModularizeType)
461
+ {
462
+ // icons are stored in the Binary table, so they get column-type modularization
463
+ if (("Bitmap" == this[2].ToString() || "Icon" == this[2].ToString()) && Common.IsIdentifier(fieldData))
464
+ {
465
+ modularizeType = ColumnModularizeType.Column;
466
+ }
467
+ else
468
+ {
469
+ modularizeType = ColumnModularizeType.Property;
470
+ }
471
+ }
472
+
473
+ switch (modularizeType)
474
+ {
475
+ case ColumnModularizeType.Column:
476
+ // ensure the value is an identifier (otherwise it shouldn't be modularized this way)
477
+ if (!Common.IsIdentifier(fieldData))
478
+ {
479
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotModularizeIllegalID, fieldData));
480
+ }
481
+
482
+ // if we're not supposed to suppress modularization of this identifier
483
+ if (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData))
484
+ {
485
+ fieldData = String.Concat(fieldData, ".", modularizationGuid);
486
+ }
487
+ break;
488
+
489
+ case ColumnModularizeType.Property:
490
+ case ColumnModularizeType.Condition:
491
+ Regex regex;
492
+ if (ColumnModularizeType.Property == modularizeType)
493
+ {
494
+ regex = new Regex(@"\[(?<identifier>[#$!]?[a-zA-Z_][a-zA-Z0-9_\.]*)]", RegexOptions.Singleline | RegexOptions.ExplicitCapture);
495
+ }
496
+ else
497
+ {
498
+ Debug.Assert(ColumnModularizeType.Condition == modularizeType);
499
+
500
+ // This heinous looking regular expression is actually quite an elegant way
501
+ // to shred the entire condition into the identifiers that need to be
502
+ // modularized. Let's break it down piece by piece:
503
+ //
504
+ // 1. Look for the operators: NOT, EQV, XOR, OR, AND, IMP (plus a space). Note that the
505
+ // regular expression is case insensitive so we don't have to worry about
506
+ // all the permutations of these strings.
507
+ // 2. Look for quoted strings. Quoted strings are just text and are ignored
508
+ // outright.
509
+ // 3. Look for environment variables. These look like identifiers we might
510
+ // otherwise be interested in but start with a percent sign. Like quoted
511
+ // strings these enviroment variable references are ignored outright.
512
+ // 4. Match all identifiers that are things that need to be modularized. Note
513
+ // the special characters (!, $, ?, &) that denote Component and Feature states.
514
+ regex = new Regex(@"NOT\s|EQV\s|XOR\s|OR\s|AND\s|IMP\s|"".*?""|%[a-zA-Z_][a-zA-Z0-9_\.]*|(?<identifier>[!$\?&]?[a-zA-Z_][a-zA-Z0-9_\.]*)", RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
515
+
516
+ // less performant version of the above with captures showing where everything lives
517
+ // regex = new Regex(@"(?<operator>NOT|EQV|XOR|OR|AND|IMP)|(?<string>"".*?"")|(?<environment>%[a-zA-Z_][a-zA-Z0-9_\.]*)|(?<identifier>[!$\?&]?[a-zA-Z_][a-zA-Z0-9_\.]*)",RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
518
+ }
519
+
520
+ MatchCollection matches = regex.Matches(fieldData);
521
+
522
+ sb = new StringBuilder(fieldData);
523
+
524
+ // notice how this code walks backward through the list
525
+ // because it modifies the string as we through it
526
+ for (int i = matches.Count - 1; 0 <= i; i--)
527
+ {
528
+ Group group = matches[i].Groups["identifier"];
529
+ if (group.Success)
530
+ {
531
+ string identifier = group.Value;
532
+ if (!WindowsInstallerStandard.IsStandardProperty(identifier) && (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(identifier)))
533
+ {
534
+ sb.Insert(group.Index + group.Length, '.');
535
+ sb.Insert(group.Index + group.Length + 1, modularizationGuid);
536
+ }
537
+ }
538
+ }
539
+
540
+ fieldData = sb.ToString();
541
+ break;
542
+
543
+ case ColumnModularizeType.CompanionFile:
544
+ // if we're not supposed to ignore this identifier and the value does not start with
545
+ // a digit, we must have a companion file so modularize it
546
+ if ((null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData)) &&
547
+ 0 < fieldData.Length && !Char.IsDigit(fieldData, 0))
548
+ {
549
+ fieldData = String.Concat(fieldData, ".", modularizationGuid);
550
+ }
551
+ break;
552
+
553
+ case ColumnModularizeType.Icon:
554
+ if (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData))
555
+ {
556
+ start = fieldData.LastIndexOf(".", StringComparison.Ordinal);
557
+ if (-1 == start)
558
+ {
559
+ fieldData = String.Concat(fieldData, ".", modularizationGuid);
560
+ }
561
+ else
562
+ {
563
+ fieldData = String.Concat(fieldData.Substring(0, start), ".", modularizationGuid, fieldData.Substring(start));
564
+ }
565
+ }
566
+ break;
567
+
568
+ case ColumnModularizeType.SemicolonDelimited:
569
+ string[] keys = fieldData.Split(';');
570
+ for (int i = 0; i < keys.Length; ++i)
571
+ {
572
+ keys[i] = String.Concat(keys[i], ".", modularizationGuid);
573
+ }
574
+ fieldData = String.Join(";", keys);
575
+ break;
576
+ }
577
+ }
578
+
579
+ return fieldData;
580
+ }
581
+
582
+ /// <summary>
583
+ /// Persists a row in an XML format.
584
+ /// </summary>
585
+ /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param>
586
+ [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " +
587
+ "in a change to the way intermediate files are generated, potentially causing extra churn in patches on an MSI built from an older version of WiX. " +
588
+ "Furthermore, there is no security hole here, as the strings won't need to make a round trip")]
589
+ internal void Write(XmlWriter writer)
590
+ {
591
+ writer.WriteStartElement("row", Intermediate.XmlNamespaceUri);
592
+
593
+ if (AccessModifier.Public != this.Access)
594
+ {
595
+ writer.WriteAttributeString("access", this.Access.ToString().ToLowerInvariant());
596
+ }
597
+
598
+ if (RowOperation.None != this.Operation)
599
+ {
600
+ writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant());
601
+ }
602
+
603
+ if (this.Redundant)
604
+ {
605
+ writer.WriteAttributeString("redundant", "yes");
606
+ }
607
+
608
+ if (null != this.SectionId)
609
+ {
610
+ writer.WriteAttributeString("sectionId", this.SectionId);
611
+ }
612
+
613
+ if (null != this.SourceLineNumbers)
614
+ {
615
+ writer.WriteAttributeString("sourceLineNumber", this.SourceLineNumbers.GetEncoded());
616
+ }
617
+
618
+ for (int i = 0; i < this.fields.Length; ++i)
619
+ {
620
+ this.fields[i].Write(writer);
621
+ }
622
+
623
+ writer.WriteEndElement();
624
+ }
625
+ }
626
+}
src/WixToolset.Data/RowDictionary.cs
new
+84
@@ -0,0 +1,84 @@
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 System;
6
+ using System.Collections.Generic;
7
+
8
+ /// <summary>
9
+ /// A dictionary of rows. Unlike the <see cref="RowIndexedCollection"/> this
10
+ /// will throw when multiple rows with the same key are added.
11
+ /// </summary>
12
+ public sealed class RowDictionary<T> : Dictionary<string, T> where T : Row
13
+ {
14
+ /// <summary>
15
+ /// Creates an empty <see cref="RowDictionary"/>.
16
+ /// </summary>
17
+ public RowDictionary()
18
+ : base(StringComparer.InvariantCulture)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given enumerator.
24
+ /// </summary>
25
+ /// <param name="Rows">Rows to add.</param>
26
+ public RowDictionary(IEnumerable<T> rows)
27
+ : this()
28
+ {
29
+ foreach (T row in rows)
30
+ {
31
+ this.Add(row);
32
+ }
33
+ }
34
+
35
+ /// <summary>
36
+ /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given <see cref="Table"/>.
37
+ /// </summary>
38
+ /// <param name="table">The table to index.</param>
39
+ /// <remarks>
40
+ /// Rows added to the index are not automatically added to the given <paramref name="table"/>.
41
+ /// </remarks>
42
+ public RowDictionary(Table table)
43
+ : this()
44
+ {
45
+ if (null != table)
46
+ {
47
+ foreach (T row in table.Rows)
48
+ {
49
+ this.Add(row);
50
+ }
51
+ }
52
+ }
53
+
54
+ /// <summary>
55
+ /// Adds a row to the dictionary using the row key.
56
+ /// </summary>
57
+ /// <param name="row">Row to add to the dictionary.</param>
58
+ public void Add(T row)
59
+ {
60
+ this.Add(row.GetKey(), row);
61
+ }
62
+
63
+ /// <summary>
64
+ /// Gets the row by integer key.
65
+ /// </summary>
66
+ /// <param name="key">Integer key to look up.</param>
67
+ /// <returns>Row or null if key is not found.</returns>
68
+ public T Get(int key)
69
+ {
70
+ return this.Get(key.ToString());
71
+ }
72
+
73
+ /// <summary>
74
+ /// Gets the row by string key.
75
+ /// </summary>
76
+ /// <param name="key">String key to look up.</param>
77
+ /// <returns>Row or null if key is not found.</returns>
78
+ public T Get(string key)
79
+ {
80
+ T result;
81
+ return this.TryGetValue(key, out result) ? result : null;
82
+ }
83
+ }
84
+}
src/WixToolset.Data/RowIndexedList.cs
new
+301
@@ -0,0 +1,301 @@
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 System;
6
+ using System.Collections.Generic;
7
+
8
+ /// <summary>
9
+ /// A list of rows indexed by their primary key. Unlike a <see cref="RowDictionary"/>
10
+ /// this indexed list will track rows in their added order and will allow rows with
11
+ /// duplicate keys to be added to the list, although only the first row will be indexed.
12
+ /// </summary>
13
+ public sealed class RowIndexedList<T> : IList<T> where T : Row
14
+ {
15
+ private Dictionary<string, T> index;
16
+ private List<T> rows;
17
+ private List<T> duplicates;
18
+
19
+ /// <summary>
20
+ /// Creates an empty <see cref="RowIndexedList"/>.
21
+ /// </summary>
22
+ public RowIndexedList()
23
+ {
24
+ this.index = new Dictionary<string, T>(StringComparer.InvariantCulture);
25
+ this.rows = new List<T>();
26
+ this.duplicates = new List<T>();
27
+ }
28
+
29
+ /// <summary>
30
+ /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given enumerator.
31
+ /// </summary>
32
+ /// <param name="rows">Rows to index.</param>
33
+ public RowIndexedList(IEnumerable<T> rows)
34
+ : this()
35
+ {
36
+ foreach (T row in rows)
37
+ {
38
+ this.Add(row);
39
+ }
40
+ }
41
+
42
+ /// <summary>
43
+ /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given <see cref="Table"/>.
44
+ /// </summary>
45
+ /// <param name="table">The table to index.</param>
46
+ /// <remarks>
47
+ /// Rows added to the index are not automatically added to the given <paramref name="table"/>.
48
+ /// </remarks>
49
+ public RowIndexedList(Table table)
50
+ : this()
51
+ {
52
+ if (null != table)
53
+ {
54
+ foreach (T row in table.Rows)
55
+ {
56
+ this.Add(row);
57
+ }
58
+ }
59
+ }
60
+
61
+ /// <summary>
62
+ /// Gets the duplicates in the list.
63
+ /// </summary>
64
+ public IEnumerable<T> Duplicates { get { return this.duplicates; } }
65
+
66
+ /// <summary>
67
+ /// Gets the row by integer key.
68
+ /// </summary>
69
+ /// <param name="key">Integer key to look up.</param>
70
+ /// <returns>Row or null if key is not found.</returns>
71
+ public T Get(int key)
72
+ {
73
+ return this.Get(key.ToString());
74
+ }
75
+
76
+ /// <summary>
77
+ /// Gets the row by string key.
78
+ /// </summary>
79
+ /// <param name="key">String key to look up.</param>
80
+ /// <returns>Row or null if key is not found.</returns>
81
+ public T Get(string key)
82
+ {
83
+ T result;
84
+ return this.TryGet(key, out result) ? result : null;
85
+ }
86
+
87
+ /// <summary>
88
+ /// Gets the row by string key if it exists.
89
+ /// </summary>
90
+ /// <param name="key">Key of row to get.</param>
91
+ /// <param name="row">Row found.</param>
92
+ /// <returns>True if key was found otherwise false.</returns>
93
+ public bool TryGet(string key, out T row)
94
+ {
95
+ return this.index.TryGetValue(key, out row);
96
+ }
97
+
98
+ /// <summary>
99
+ /// Tries to add a row as long as it would not create a duplicate.
100
+ /// </summary>
101
+ /// <param name="row">Row to add.</param>
102
+ /// <returns>True if the row as added otherwise false.</returns>
103
+ public bool TryAdd(T row)
104
+ {
105
+ try
106
+ {
107
+ this.index.Add(row.GetKey(), row);
108
+ }
109
+ catch (ArgumentException) // if the key already exists, bail.
110
+ {
111
+ return false;
112
+ }
113
+
114
+ this.rows.Add(row);
115
+ return true;
116
+ }
117
+
118
+ /// <summary>
119
+ /// Adds a row to the list. If a row with the same key is already index, the row is
120
+ /// is not in the index but will still be part of the list and added to the duplicates
121
+ /// list.
122
+ /// </summary>
123
+ /// <param name="row"></param>
124
+ public void Add(T row)
125
+ {
126
+ this.rows.Add(row);
127
+ try
128
+ {
129
+ this.index.Add(row.GetKey(), row);
130
+ }
131
+ catch (ArgumentException) // if the key already exists, we have a duplicate.
132
+ {
133
+ this.duplicates.Add(row);
134
+ }
135
+ }
136
+
137
+ /// <summary>
138
+ /// Gets the index of a row.
139
+ /// </summary>
140
+ /// <param name="row">Iterates through the list of rows to find the index of a particular row.</param>
141
+ /// <returns>Index of row or -1 if not found.</returns>
142
+ public int IndexOf(T row)
143
+ {
144
+ return this.rows.IndexOf(row);
145
+ }
146
+
147
+ /// <summary>
148
+ /// Inserts a row at a particular index of the list.
149
+ /// </summary>
150
+ /// <param name="index">Index to insert the row after.</param>
151
+ /// <param name="row">Row to insert.</param>
152
+ public void Insert(int index, T row)
153
+ {
154
+ this.rows.Insert(index, row);
155
+ try
156
+ {
157
+ this.index.Add(row.GetKey(), row);
158
+ }
159
+ catch (ArgumentException) // if the key already exists, we have a duplicate.
160
+ {
161
+ this.duplicates.Add(row);
162
+ }
163
+ }
164
+
165
+ /// <summary>
166
+ /// Removes a row from a particular index.
167
+ /// </summary>
168
+ /// <param name="index">Index to remove the row at.</param>
169
+ public void RemoveAt(int index)
170
+ {
171
+ T row = this.rows[index];
172
+
173
+ this.rows.RemoveAt(index);
174
+
175
+ T indexRow;
176
+ if (this.index.TryGetValue(row.GetKey(), out indexRow) && indexRow == row)
177
+ {
178
+ this.index.Remove(row.GetKey());
179
+ }
180
+ else // only try to remove from duplicates if the row was not indexed (if it was indexed, it wasn't a dupe).
181
+ {
182
+ this.duplicates.Remove(row);
183
+ }
184
+ }
185
+
186
+ /// <summary>
187
+ /// Gets or sets a row at the specified index.
188
+ /// </summary>
189
+ /// <param name="index">Index to get the row.</param>
190
+ /// <returns>Row at specified index.</returns>
191
+ public T this[int index]
192
+ {
193
+ get
194
+ {
195
+ return this.rows[index];
196
+ }
197
+ set
198
+ {
199
+ this.rows[index] = value;
200
+ try
201
+ {
202
+ this.index.Add(value.GetKey(), value);
203
+ }
204
+ catch (ArgumentException) // if the key already exists, we have a duplicate.
205
+ {
206
+ this.duplicates.Add(value);
207
+ }
208
+ }
209
+ }
210
+
211
+ /// <summary>
212
+ /// Empties the list and it's index.
213
+ /// </summary>
214
+ public void Clear()
215
+ {
216
+ this.index.Clear();
217
+ this.rows.Clear();
218
+ this.duplicates.Clear();
219
+ }
220
+
221
+ /// <summary>
222
+ /// Searches the list for a row without using the index.
223
+ /// </summary>
224
+ /// <param name="row">Row to look for in the list.</param>
225
+ /// <returns>True if the row is in the list, otherwise false.</returns>
226
+ public bool Contains(T row)
227
+ {
228
+ return this.rows.Contains(row);
229
+ }
230
+
231
+ /// <summary>
232
+ /// Copies the rows of the list to an array.
233
+ /// </summary>
234
+ /// <param name="array">Array to copy the list into.</param>
235
+ /// <param name="arrayIndex">Index to start copying at.</param>
236
+ public void CopyTo(T[] array, int arrayIndex)
237
+ {
238
+ this.rows.CopyTo(array, arrayIndex);
239
+ }
240
+
241
+ /// <summary>
242
+ /// Number of rows in the list.
243
+ /// </summary>
244
+ public int Count
245
+ {
246
+ get { return this.rows.Count; }
247
+ }
248
+
249
+ /// <summary>
250
+ /// Indicates whether the list is read-only. Always false.
251
+ /// </summary>
252
+ public bool IsReadOnly
253
+ {
254
+ get { return false; }
255
+ }
256
+
257
+ /// <summary>
258
+ /// Removes a row from the list. Indexed rows will be removed but the colleciton will NOT
259
+ /// promote duplicates to the index automatically. The duplicate would also need to be removed
260
+ /// and re-added to be indexed.
261
+ /// </summary>
262
+ /// <param name="row"></param>
263
+ /// <returns></returns>
264
+ public bool Remove(T row)
265
+ {
266
+ bool removed = this.rows.Remove(row);
267
+ if (removed)
268
+ {
269
+ T indexRow;
270
+ if (this.index.TryGetValue(row.GetKey(), out indexRow) && indexRow == row)
271
+ {
272
+ this.index.Remove(row.GetKey());
273
+ }
274
+ else // only try to remove from duplicates if the row was not indexed (if it was indexed, it wasn't a dupe).
275
+ {
276
+ this.duplicates.Remove(row);
277
+ }
278
+ }
279
+
280
+ return removed;
281
+ }
282
+
283
+ /// <summary>
284
+ /// Gets an enumerator over the whole list.
285
+ /// </summary>
286
+ /// <returns>List enumerator.</returns>
287
+ public IEnumerator<T> GetEnumerator()
288
+ {
289
+ return this.rows.GetEnumerator();
290
+ }
291
+
292
+ /// <summary>
293
+ /// Gets an untyped enumerator over the whole list.
294
+ /// </summary>
295
+ /// <returns>Untyped list enumerator.</returns>
296
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
297
+ {
298
+ return this.rows.GetEnumerator();
299
+ }
300
+ }
301
+}
src/WixToolset.Data/RowOperation.cs
new
+30
@@ -0,0 +1,30 @@
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
+ /// <summary>
6
+ /// The row transform operations.
7
+ /// </summary>
8
+ public enum RowOperation
9
+ {
10
+ /// <summary>
11
+ /// No operation.
12
+ /// </summary>
13
+ None,
14
+
15
+ /// <summary>
16
+ /// Added row.
17
+ /// </summary>
18
+ Add,
19
+
20
+ /// <summary>
21
+ /// Deleted row.
22
+ /// </summary>
23
+ Delete,
24
+
25
+ /// <summary>
26
+ /// Modified row.
27
+ /// </summary>
28
+ Modify
29
+ }
30
+}
src/WixToolset.Data/Rows/BBControlRow.cs
new
+113
@@ -0,0 +1,113 @@
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.Rows
4
+{
5
+ using System.Diagnostics.CodeAnalysis;
6
+
7
+ /// <summary>
8
+ /// Specialization of a row for the Control table.
9
+ /// </summary>
10
+ public sealed class BBControlRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a Control row that belongs to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="table">Table this Control row belongs to and should get its column definitions from.</param>
17
+ public BBControlRow(SourceLineNumber sourceLineNumbers, Table table) :
18
+ base(sourceLineNumbers, table)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Gets or sets the dialog of the Control row.
24
+ /// </summary>
25
+ /// <value>Primary key of the Control row.</value>
26
+ public string Billboard
27
+ {
28
+ get { return (string)this.Fields[0].Data; }
29
+ set { this.Fields[0].Data = value; }
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the identifier for this Control row.
34
+ /// </summary>
35
+ /// <value>Identifier for this Control row.</value>
36
+ public string BBControl
37
+ {
38
+ get { return (string)this.Fields[1].Data; }
39
+ set { this.Fields[1].Data = value; }
40
+ }
41
+
42
+ /// <summary>
43
+ /// Gets or sets the type of the BBControl.
44
+ /// </summary>
45
+ /// <value>Name of the BBControl.</value>
46
+ [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
47
+ public string Type
48
+ {
49
+ get { return this.Fields[2].AsString(); }
50
+ set { this.Fields[2].Data = value; }
51
+ }
52
+
53
+ /// <summary>
54
+ /// Gets or sets the X location of the BBControl.
55
+ /// </summary>
56
+ /// <value>X location of the BBControl.</value>
57
+ public string X
58
+ {
59
+ get { return this.Fields[3].AsString(); }
60
+ set { this.Fields[3].Data = value; }
61
+ }
62
+
63
+ /// <summary>
64
+ /// Gets or sets the Y location of the BBControl.
65
+ /// </summary>
66
+ /// <value>Y location of the BBControl.</value>
67
+ public string Y
68
+ {
69
+ get { return this.Fields[4].AsString(); }
70
+ set { this.Fields[4].Data = value; }
71
+ }
72
+
73
+ /// <summary>
74
+ /// Gets or sets the width of the BBControl.
75
+ /// </summary>
76
+ /// <value>Width of the BBControl.</value>
77
+ public string Width
78
+ {
79
+ get { return this.Fields[5].AsString(); }
80
+ set { this.Fields[5].Data = value; }
81
+ }
82
+
83
+ /// <summary>
84
+ /// Gets or sets the height of the BBControl.
85
+ /// </summary>
86
+ /// <value>Height of the BBControl.</value>
87
+ public string Height
88
+ {
89
+ get { return this.Fields[6].AsString(); }
90
+ set { this.Fields[6].Data = value; }
91
+ }
92
+
93
+ /// <summary>
94
+ /// Gets or sets the attributes for the BBControl.
95
+ /// </summary>
96
+ /// <value>Attributes for the BBControl.</value>
97
+ public int Attributes
98
+ {
99
+ get { return (int)this.Fields[7].Data; }
100
+ set { this.Fields[7].Data = value; }
101
+ }
102
+
103
+ /// <summary>
104
+ /// Gets or sets the text of the BBControl.
105
+ /// </summary>
106
+ /// <value>Text of the BBControl.</value>
107
+ public string Text
108
+ {
109
+ get { return (string)this.Fields[8].Data; }
110
+ set { this.Fields[8].Data = value; }
111
+ }
112
+ }
113
+}
src/WixToolset.Data/Rows/ComponentRow.cs
new
+245
@@ -0,0 +1,245 @@
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.Rows
4
+{
5
+ using System;
6
+ using WixToolset.Data.Msi;
7
+
8
+ /// <summary>
9
+ /// Specialization of a row for the Component table.
10
+ /// </summary>
11
+ public sealed class ComponentRow : Row
12
+ {
13
+ private string sourceFile;
14
+
15
+ /// <summary>
16
+ /// Creates a Control row that belongs to a table.
17
+ /// </summary>
18
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
19
+ /// <param name="table">Table this Component row belongs to and should get its column definitions from.</param>
20
+ public ComponentRow(SourceLineNumber sourceLineNumbers, Table table) :
21
+ base(sourceLineNumbers, table)
22
+ {
23
+ }
24
+
25
+ /// <summary>
26
+ /// Gets or sets the identifier for this Component row.
27
+ /// </summary>
28
+ /// <value>Identifier for this Component row.</value>
29
+ public string Component
30
+ {
31
+ get { return (string)this.Fields[0].Data; }
32
+ set { this.Fields[0].Data = value; }
33
+ }
34
+
35
+ /// <summary>
36
+ /// Gets or sets the ComponentId for this Component row.
37
+ /// </summary>
38
+ /// <value>guid for this Component row.</value>
39
+ public string Guid
40
+ {
41
+ get { return (string)this.Fields[1].Data; }
42
+ set { this.Fields[1].Data = value; }
43
+ }
44
+
45
+ /// <summary>
46
+ /// Gets or sets the Directory_ of the Component.
47
+ /// </summary>
48
+ /// <value>Directory of the Component.</value>
49
+ public string Directory
50
+ {
51
+ get { return (string)this.Fields[2].Data; }
52
+ set { this.Fields[2].Data = value; }
53
+ }
54
+
55
+ /// <summary>
56
+ /// Gets or sets the local only attribute of the Component.
57
+ /// </summary>
58
+ /// <value>Local only attribute of the component.</value>
59
+ public bool IsLocalOnly
60
+ {
61
+ get { return MsiInterop.MsidbComponentAttributesLocalOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesLocalOnly); }
62
+ set
63
+ {
64
+ if (value)
65
+ {
66
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesLocalOnly;
67
+ }
68
+ else
69
+ {
70
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesLocalOnly;
71
+ }
72
+ }
73
+ }
74
+
75
+ /// <summary>
76
+ /// Gets or sets the source only attribute of the Component.
77
+ /// </summary>
78
+ /// <value>Source only attribute of the component.</value>
79
+ public bool IsSourceOnly
80
+ {
81
+ get { return MsiInterop.MsidbComponentAttributesSourceOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSourceOnly); }
82
+ set
83
+ {
84
+ if (value)
85
+ {
86
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSourceOnly;
87
+ }
88
+ else
89
+ {
90
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSourceOnly;
91
+ }
92
+ }
93
+ }
94
+
95
+ /// <summary>
96
+ /// Gets or sets the optional attribute of the Component.
97
+ /// </summary>
98
+ /// <value>Optional attribute of the component.</value>
99
+ public bool IsOptional
100
+ {
101
+ get { return MsiInterop.MsidbComponentAttributesOptional == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesOptional); }
102
+ set
103
+ {
104
+ if (value)
105
+ {
106
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesOptional;
107
+ }
108
+ else
109
+ {
110
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesOptional;
111
+ }
112
+ }
113
+ }
114
+
115
+ /// <summary>
116
+ /// Gets or sets the registry key path attribute of the Component.
117
+ /// </summary>
118
+ /// <value>Registry key path attribute of the component.</value>
119
+ public bool IsRegistryKeyPath
120
+ {
121
+ get { return MsiInterop.MsidbComponentAttributesRegistryKeyPath == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesRegistryKeyPath); }
122
+ set
123
+ {
124
+ if (value)
125
+ {
126
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesRegistryKeyPath;
127
+ }
128
+ else
129
+ {
130
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesRegistryKeyPath;
131
+ }
132
+ }
133
+ }
134
+
135
+ /// <summary>
136
+ /// Gets or sets the shared dll ref count attribute of the Component.
137
+ /// </summary>
138
+ /// <value>Shared dll ref countattribute of the component.</value>
139
+ public bool IsSharedDll
140
+ {
141
+ get { return MsiInterop.MsidbComponentAttributesSharedDllRefCount == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSharedDllRefCount); }
142
+ set
143
+ {
144
+ if (value)
145
+ {
146
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSharedDllRefCount;
147
+ }
148
+ else
149
+ {
150
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSharedDllRefCount;
151
+ }
152
+ }
153
+ }
154
+
155
+ /// <summary>
156
+ /// Gets or sets the permanent attribute of the Component.
157
+ /// </summary>
158
+ /// <value>Permanent attribute of the component.</value>
159
+ public bool IsPermanent
160
+ {
161
+ get { return MsiInterop.MsidbComponentAttributesPermanent == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesPermanent); }
162
+ set
163
+ {
164
+ if (value)
165
+ {
166
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesPermanent;
167
+ }
168
+ else
169
+ {
170
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesPermanent;
171
+ }
172
+ }
173
+ }
174
+
175
+ /// <summary>
176
+ /// Gets or sets the ODBC data source key path attribute of the Component.
177
+ /// </summary>
178
+ /// <value>ODBC data source key path attribute of the component.</value>
179
+ public bool IsOdbcDataSourceKeyPath
180
+ {
181
+ get { return MsiInterop.MsidbComponentAttributesODBCDataSource == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesODBCDataSource); }
182
+ set
183
+ {
184
+ if (value)
185
+ {
186
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesODBCDataSource;
187
+ }
188
+ else
189
+ {
190
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesODBCDataSource;
191
+ }
192
+ }
193
+ }
194
+
195
+ /// <summary>
196
+ /// Gets or sets the 64 bit attribute of the Component.
197
+ /// </summary>
198
+ /// <value>64-bitness of the component.</value>
199
+ public bool Is64Bit
200
+ {
201
+ get { return MsiInterop.MsidbComponentAttributes64bit == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributes64bit); }
202
+ set
203
+ {
204
+ if (value)
205
+ {
206
+ this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributes64bit;
207
+ }
208
+ else
209
+ {
210
+ this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributes64bit;
211
+ }
212
+ }
213
+ }
214
+
215
+ /// <summary>
216
+ /// Gets or sets the condition of the Component.
217
+ /// </summary>
218
+ /// <value>Condition of the Component.</value>
219
+ public string Condition
220
+ {
221
+ get { return (string)this.Fields[4].Data; }
222
+ set { this.Fields[4].Data = value; }
223
+ }
224
+
225
+ /// <summary>
226
+ /// Gets or sets the key path of the Component.
227
+ /// </summary>
228
+ /// <value>Key path of the Component.</value>
229
+ public string KeyPath
230
+ {
231
+ get { return (string)this.Fields[5].Data; }
232
+ set { this.Fields[5].Data = value; }
233
+ }
234
+
235
+ /// <summary>
236
+ /// Gets or sets the source location to the file to fill in the Text of the control.
237
+ /// </summary>
238
+ /// <value>Source location to the file to fill in the Text of the control.</value>
239
+ public string SourceFile
240
+ {
241
+ get { return this.sourceFile; }
242
+ set { this.sourceFile = value; }
243
+ }
244
+ }
245
+}
src/WixToolset.Data/Rows/ContainerType.cs
new
+13
@@ -0,0 +1,13 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Types of bundle packages.
7
+ /// </summary>
8
+ public enum ContainerType
9
+ {
10
+ Attached,
11
+ Detached,
12
+ }
13
+}
src/WixToolset.Data/Rows/ControlRow.cs
new
+143
@@ -0,0 +1,143 @@
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.Rows
4
+{
5
+ using System.Diagnostics.CodeAnalysis;
6
+
7
+ /// <summary>
8
+ /// Specialization of a row for the Control table.
9
+ /// </summary>
10
+ public sealed class ControlRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a Control row that belongs to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="table">Table this Control row belongs to and should get its column definitions from.</param>
17
+ public ControlRow(SourceLineNumber sourceLineNumbers, Table table) :
18
+ base(sourceLineNumbers, table)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Gets or sets the dialog of the Control row.
24
+ /// </summary>
25
+ /// <value>Primary key of the Control row.</value>
26
+ public string Dialog
27
+ {
28
+ get { return (string)this.Fields[0].Data; }
29
+ set { this.Fields[0].Data = value; }
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the identifier for this Control row.
34
+ /// </summary>
35
+ /// <value>Identifier for this Control row.</value>
36
+ public string Control
37
+ {
38
+ get { return (string)this.Fields[1].Data; }
39
+ set { this.Fields[1].Data = value; }
40
+ }
41
+
42
+ /// <summary>
43
+ /// Gets or sets the type of the control.
44
+ /// </summary>
45
+ /// <value>Name of the control.</value>
46
+ [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
47
+ public string Type
48
+ {
49
+ get { return (string)this.Fields[2].Data; }
50
+ set { this.Fields[2].Data = value; }
51
+ }
52
+
53
+ /// <summary>
54
+ /// Gets or sets the X location of the control.
55
+ /// </summary>
56
+ /// <value>X location of the control.</value>
57
+ public string X
58
+ {
59
+ get { return this.Fields[3].AsString(); }
60
+ set { this.Fields[3].Data = value; }
61
+ }
62
+
63
+ /// <summary>
64
+ /// Gets or sets the Y location of the control.
65
+ /// </summary>
66
+ /// <value>Y location of the control.</value>
67
+ public string Y
68
+ {
69
+ get { return this.Fields[4].AsString(); }
70
+ set { this.Fields[4].Data = value; }
71
+ }
72
+
73
+ /// <summary>
74
+ /// Gets or sets the width of the control.
75
+ /// </summary>
76
+ /// <value>Width of the control.</value>
77
+ public string Width
78
+ {
79
+ get { return this.Fields[5].AsString(); }
80
+ set { this.Fields[5].Data = value; }
81
+ }
82
+
83
+ /// <summary>
84
+ /// Gets or sets the height of the control.
85
+ /// </summary>
86
+ /// <value>Height of the control.</value>
87
+ public string Height
88
+ {
89
+ get { return this.Fields[6].AsString(); }
90
+ set { this.Fields[6].Data = value; }
91
+ }
92
+
93
+ /// <summary>
94
+ /// Gets or sets the attributes for the control.
95
+ /// </summary>
96
+ /// <value>Attributes for the control.</value>
97
+ public int Attributes
98
+ {
99
+ get { return (int)this.Fields[7].Data; }
100
+ set { this.Fields[7].Data = value; }
101
+ }
102
+
103
+ /// <summary>
104
+ /// Gets or sets the Property associated with the control.
105
+ /// </summary>
106
+ /// <value>Property associated with the control.</value>
107
+ public string Property
108
+ {
109
+ get { return (string)this.Fields[8].Data; }
110
+ set { this.Fields[8].Data = value; }
111
+ }
112
+
113
+ /// <summary>
114
+ /// Gets or sets the text of the control.
115
+ /// </summary>
116
+ /// <value>Text of the control.</value>
117
+ public string Text
118
+ {
119
+ get { return (string)this.Fields[9].Data; }
120
+ set { this.Fields[9].Data = value; }
121
+ }
122
+
123
+ /// <summary>
124
+ /// Gets or sets the next control.
125
+ /// </summary>
126
+ /// <value>Next control.</value>
127
+ public string Next
128
+ {
129
+ get { return (string)this.Fields[10].Data; }
130
+ set { this.Fields[10].Data = value; }
131
+ }
132
+
133
+ /// <summary>
134
+ /// Gets or sets the help for the control.
135
+ /// </summary>
136
+ /// <value>Help for the control.</value>
137
+ public string Help
138
+ {
139
+ get { return (string)this.Fields[11].Data; }
140
+ set { this.Fields[11].Data = value; }
141
+ }
142
+ }
143
+}
src/WixToolset.Data/Rows/ExitCodeBehaviorType.cs
new
+13
@@ -0,0 +1,13 @@
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.Rows
4
+{
5
+ public enum ExitCodeBehaviorType
6
+ {
7
+ NotSet = -1,
8
+ Success,
9
+ Error,
10
+ ScheduleReboot,
11
+ ForceReboot,
12
+ }
13
+}
src/WixToolset.Data/Rows/FileAssemblyType.cs
new
+19
@@ -0,0 +1,19 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Every file row has an assembly type.
7
+ /// </summary>
8
+ public enum FileAssemblyType
9
+ {
10
+ /// <summary>File is not an assembly.</summary>
11
+ NotAnAssembly,
12
+
13
+ /// <summary>File is a Common Language Runtime Assembly.</summary>
14
+ DotNetAssembly,
15
+
16
+ /// <summary>File is Win32 SxS assembly.</summary>
17
+ Win32Assembly,
18
+ }
19
+}
src/WixToolset.Data/Rows/FileRow.cs
new
+640
@@ -0,0 +1,640 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Diagnostics;
7
+ using System.Globalization;
8
+ using WixToolset.Data.Msi;
9
+
10
+ /// <summary>
11
+ /// Specialization of a row for the file table.
12
+ /// </summary>
13
+ public sealed class FileRow : Row //, IComparable
14
+ {
15
+ //private string assemblyApplication;
16
+ //private string assemblyManifest;
17
+ //private FileAssemblyType assemblyType;
18
+ //private string directory;
19
+ //private int diskId;
20
+ //private bool fromModule;
21
+ //private bool isGeneratedShortFileName;
22
+ //private int patchGroup;
23
+ //private string processorArchitecture;
24
+ //private string source;
25
+ //private Row hashRow;
26
+ //private List<Row> assemblyNameRows;
27
+ //private string[] previousSource;
28
+ //private string symbols;
29
+ //private string[] previousSymbols;
30
+ //private PatchAttributeType patchAttributes;
31
+ //private string retainOffsets;
32
+ //private string retainLengths;
33
+ //private string ignoreOffsets;
34
+ //private string ignoreLengths;
35
+ //private string[] previousRetainOffsets;
36
+ //private string[] previousRetainLengths;
37
+ //private string[] previousIgnoreOffsets;
38
+ //private string[] previousIgnoreLengths;
39
+ //private string patch;
40
+
41
+ /// <summary>
42
+ /// Creates a File row that belongs to a table.
43
+ /// </summary>
44
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
45
+ /// <param name="table">Table this File row belongs to and should get its column definitions from.</param>
46
+ public FileRow(SourceLineNumber sourceLineNumbers, Table table)
47
+ : base(sourceLineNumbers, table)
48
+ {
49
+ //this.assemblyType = FileAssemblyType.NotAnAssembly;
50
+ //this.previousSource = new string[1];
51
+ //this.previousSymbols = new string[1];
52
+ //this.previousRetainOffsets = new string[1];
53
+ //this.previousRetainLengths = new string[1];
54
+ //this.previousIgnoreOffsets = new string[1];
55
+ //this.previousIgnoreLengths = new string[1];
56
+ }
57
+
58
+ /// <summary>
59
+ /// Creates a File row that does not belong to a table.
60
+ /// </summary>
61
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
62
+ /// <param name="tableDefinition">TableDefinition this Media row belongs to and should get its column definitions from.</param>
63
+ public FileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition)
64
+ : base(sourceLineNumbers, tableDefinition)
65
+ {
66
+ //this.assemblyType = FileAssemblyType.NotAnAssembly;
67
+ //this.previousSource = new string[1];
68
+ //this.previousSymbols = new string[1];
69
+ //this.previousRetainOffsets = new string[1];
70
+ //this.previousRetainLengths = new string[1];
71
+ //this.previousIgnoreOffsets = new string[1];
72
+ //this.previousIgnoreLengths = new string[1];
73
+ }
74
+
75
+ /// <summary>
76
+ /// Gets or sets the primary key of the file row.
77
+ /// </summary>
78
+ /// <value>Primary key of the file row.</value>
79
+ public string File
80
+ {
81
+ get { return (string)this.Fields[0].Data; }
82
+ set { this.Fields[0].Data = value; }
83
+ }
84
+
85
+ /// <summary>
86
+ /// Gets or sets the component this file row belongs to.
87
+ /// </summary>
88
+ /// <value>Component this file row belongs to.</value>
89
+ public string Component
90
+ {
91
+ get { return (string)this.Fields[1].Data; }
92
+ set { this.Fields[1].Data = value; }
93
+ }
94
+
95
+ /// <summary>
96
+ /// Gets or sets the name of the file.
97
+ /// </summary>
98
+ /// <value>Name of the file.</value>
99
+ public string FileName
100
+ {
101
+ get { return (string)this.Fields[2].Data; }
102
+ set { this.Fields[2].Data = value; }
103
+ }
104
+
105
+ /// <summary>
106
+ /// Gets or sets the real filesystem name of the file (without a pipe). This is typically the long name of the file.
107
+ /// However, if no long name is available, falls back to the short name.
108
+ /// </summary>
109
+ /// <value>Long Name of the file - or if no long name is available, falls back to the short name.</value>
110
+ public string LongFileName
111
+ {
112
+ get
113
+ {
114
+ string fileName = this.FileName;
115
+ int index = fileName.IndexOf('|');
116
+
117
+ // If it doesn't contain a pipe, just return the whole string
118
+ if (-1 == index)
119
+ {
120
+ return fileName;
121
+ }
122
+ else // otherwise, extract the part of the string after the pipe
123
+ {
124
+ return fileName.Substring(index + 1);
125
+ }
126
+ }
127
+ }
128
+
129
+ /// <summary>
130
+ /// Gets or sets the size of the file.
131
+ /// </summary>
132
+ /// <value>Size of the file.</value>
133
+ public int FileSize
134
+ {
135
+ get { return (int)this.Fields[3].Data; }
136
+ set { this.Fields[3].Data = value; }
137
+ }
138
+
139
+ /// <summary>
140
+ /// Gets or sets the version of the file.
141
+ /// </summary>
142
+ /// <value>Version of the file.</value>
143
+ public string Version
144
+ {
145
+ get { return (string)this.Fields[4].Data; }
146
+ set { this.Fields[4].Data = value; }
147
+ }
148
+
149
+ /// <summary>
150
+ /// Gets or sets the LCID of the file.
151
+ /// </summary>
152
+ /// <value>LCID of the file.</value>
153
+ public string Language
154
+ {
155
+ get { return (string)this.Fields[5].Data; }
156
+ set { this.Fields[5].Data = value; }
157
+ }
158
+
159
+ /// <summary>
160
+ /// Gets or sets the attributes on a file.
161
+ /// </summary>
162
+ /// <value>Attributes on a file.</value>
163
+ public int Attributes
164
+ {
165
+ get { return Convert.ToInt32(this.Fields[6].Data, CultureInfo.InvariantCulture); }
166
+ set { this.Fields[6].Data = value; }
167
+ }
168
+
169
+ /// <summary>
170
+ /// Gets or sets whether this file should be compressed.
171
+ /// </summary>
172
+ /// <value>Whether this file should be compressed.</value>
173
+ public YesNoType Compressed
174
+ {
175
+ get
176
+ {
177
+ bool compressedFlag = (0 < (this.Attributes & MsiInterop.MsidbFileAttributesCompressed));
178
+ bool noncompressedFlag = (0 < (this.Attributes & MsiInterop.MsidbFileAttributesNoncompressed));
179
+
180
+ if (compressedFlag && noncompressedFlag)
181
+ {
182
+ throw new WixException(WixDataErrors.IllegalFileCompressionAttributes(this.SourceLineNumbers));
183
+ }
184
+ else if (compressedFlag)
185
+ {
186
+ return YesNoType.Yes;
187
+ }
188
+ else if (noncompressedFlag)
189
+ {
190
+ return YesNoType.No;
191
+ }
192
+ else
193
+ {
194
+ return YesNoType.NotSet;
195
+ }
196
+ }
197
+
198
+ set
199
+ {
200
+ if (YesNoType.Yes == value)
201
+ {
202
+ // these are mutually exclusive
203
+ this.Attributes |= MsiInterop.MsidbFileAttributesCompressed;
204
+ this.Attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed;
205
+ }
206
+ else if (YesNoType.No == value)
207
+ {
208
+ // these are mutually exclusive
209
+ this.Attributes |= MsiInterop.MsidbFileAttributesNoncompressed;
210
+ this.Attributes &= ~MsiInterop.MsidbFileAttributesCompressed;
211
+ }
212
+ else // not specified
213
+ {
214
+ Debug.Assert(YesNoType.NotSet == value);
215
+
216
+ // clear any compression bits
217
+ this.Attributes &= ~MsiInterop.MsidbFileAttributesCompressed;
218
+ this.Attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed;
219
+ }
220
+ }
221
+ }
222
+
223
+ /// <summary>
224
+ /// Gets or sets the sequence of the file row.
225
+ /// </summary>
226
+ /// <value>Sequence of the file row.</value>
227
+ public int Sequence
228
+ {
229
+ get { return (int)this.Fields[7].Data; }
230
+ set { this.Fields[7].Data = value; }
231
+ }
232
+
233
+ /////// <summary>
234
+ /////// Gets or sets the type of assembly of file row.
235
+ /////// </summary>
236
+ /////// <value>Assembly type for file row.</value>
237
+ ////public FileAssemblyType AssemblyType
238
+ ////{
239
+ //// get { return this.assemblyType; }
240
+ //// set { this.assemblyType = value; }
241
+ ////}
242
+
243
+ /////// <summary>
244
+ /////// Gets or sets the identifier for the assembly application.
245
+ /////// </summary>
246
+ /////// <value>Identifier for the assembly application.</value>
247
+ ////public string AssemblyApplication
248
+ ////{
249
+ //// get { return this.assemblyApplication; }
250
+ //// set { this.assemblyApplication = value; }
251
+ ////}
252
+
253
+ /////// <summary>
254
+ /////// Gets or sets the identifier for the assembly manifest.
255
+ /////// </summary>
256
+ /////// <value>Identifier for the assembly manifest.</value>
257
+ ////public string AssemblyManifest
258
+ ////{
259
+ //// get { return this.assemblyManifest; }
260
+ //// set { this.assemblyManifest = value; }
261
+ ////}
262
+
263
+ /////// <summary>
264
+ /////// Gets or sets the directory of the file.
265
+ /////// </summary>
266
+ /////// <value>Directory of the file.</value>
267
+ ////public string Directory
268
+ ////{
269
+ //// get { return this.directory; }
270
+ //// set { this.directory = value; }
271
+ ////}
272
+
273
+ /////// <summary>
274
+ /////// Gets or sets the disk id for this file.
275
+ /////// </summary>
276
+ /////// <value>Disk id for the file.</value>
277
+ ////public int DiskId
278
+ ////{
279
+ //// get { return this.diskId; }
280
+ //// set { this.diskId = value; }
281
+ ////}
282
+
283
+ /////// <summary>
284
+ /////// Gets or sets the source location to the file.
285
+ /////// </summary>
286
+ /////// <value>Source location to the file.</value>
287
+ ////public string Source
288
+ ////{
289
+ //// get { return this.source; }
290
+ //// set { this.source = value; }
291
+ ////}
292
+
293
+ /////// <summary>
294
+ /////// Gets or sets the source location to the previous file.
295
+ /////// </summary>
296
+ /////// <value>Source location to the previous file.</value>
297
+ ////public string PreviousSource
298
+ ////{
299
+ //// get { return this.previousSource[0]; }
300
+ //// set { this.previousSource[0] = value; }
301
+ ////}
302
+
303
+ /////// <summary>
304
+ /////// Gets the source location to the previous files.
305
+ /////// </summary>
306
+ /////// <value>Source location to the previous files.</value>
307
+ ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
308
+ ////public string[] PreviousSourceArray
309
+ ////{
310
+ //// get { return this.previousSource; }
311
+ ////}
312
+
313
+ /////// <summary>
314
+ /////// Gets or sets the architecture the file executes on.
315
+ /////// </summary>
316
+ /////// <value>Architecture the file executes on.</value>
317
+ ////public string ProcessorArchitecture
318
+ ////{
319
+ //// get { return this.processorArchitecture; }
320
+ //// set { this.processorArchitecture = value; }
321
+ ////}
322
+
323
+ /////// <summary>
324
+ /////// Gets of sets the patch group of a patch-added file.
325
+ /////// </summary>
326
+ /////// <value>The patch group of a patch-added file.</value>
327
+ ////public int PatchGroup
328
+ ////{
329
+ //// get { return this.patchGroup; }
330
+ //// set { this.patchGroup = value; }
331
+ ////}
332
+
333
+ /////// <summary>
334
+ /////// Gets or sets the patch header of the file.
335
+ /////// </summary>
336
+ /////// <value>Patch header of the file.</value>
337
+ ////public string Patch
338
+ ////{
339
+ //// get { return this.patch; }
340
+ //// set { this.patch = value; }
341
+ ////}
342
+
343
+ /////// <summary>
344
+ /////// Gets or sets the locations to find the file's symbols.
345
+ /////// </summary>
346
+ /////// <value>Symbol paths for the file.</value>
347
+ ////public string Symbols
348
+ ////{
349
+ //// get { return this.symbols; }
350
+ //// set { this.symbols = value; }
351
+ ////}
352
+
353
+ /////// <summary>
354
+ /////// Gets or sets the locations to find the file's previous symbols.
355
+ /////// </summary>
356
+ /////// <value>Symbol paths for the previous file.</value>
357
+ ////public string PreviousSymbols
358
+ ////{
359
+ //// get { return this.previousSymbols[0]; }
360
+ //// set { this.previousSymbols[0] = value; }
361
+ ////}
362
+
363
+ /////// <summary>
364
+ /////// Gets the locations to find the files' previous symbols.
365
+ /////// </summary>
366
+ /////// <value>Symbol paths for the previous files.</value>
367
+ ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
368
+ ////public string[] PreviousSymbolsArray
369
+ ////{
370
+ //// get { return this.previousSymbols; }
371
+ ////}
372
+
373
+ /////// <summary>
374
+ /////// Gets or sets the generated short file name attribute.
375
+ /////// </summary>
376
+ /////// <value>The generated short file name attribute.</value>
377
+ ////public bool IsGeneratedShortFileName
378
+ ////{
379
+ //// get { return this.isGeneratedShortFileName; }
380
+
381
+ //// set { this.isGeneratedShortFileName = value; }
382
+ ////}
383
+
384
+ /////// <summary>
385
+ /////// Gets or sets whether this row came from a merge module.
386
+ /////// </summary>
387
+ /////// <value>Whether this row came from a merge module.</value>
388
+ ////public bool FromModule
389
+ ////{
390
+ //// get { return this.fromModule; }
391
+ //// set { this.fromModule = value; }
392
+ ////}
393
+
394
+ /////// <summary>
395
+ /////// Gets or sets the MsiFileHash row created for this FileRow.
396
+ /////// </summary>
397
+ /////// <value>Row for MsiFileHash table.</value>
398
+ ////public Row HashRow
399
+ ////{
400
+ //// get { return this.hashRow; }
401
+ //// set { this.hashRow = value; }
402
+ ////}
403
+
404
+ /////// <summary>
405
+ /////// Gets or sets the set of MsiAssemblyName rows created for this FileRow.
406
+ /////// </summary>
407
+ /////// <value>RowCollection of MsiAssemblyName table.</value>
408
+ ////[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
409
+ ////public List<Row> AssemblyNameRows
410
+ ////{
411
+ //// get { return this.assemblyNameRows; }
412
+ //// set { this.assemblyNameRows = value; }
413
+ ////}
414
+
415
+ /////// <summary>
416
+ /////// Gets or sets the patching attributes to the file.
417
+ /////// </summary>
418
+ /////// <value>Patching attributes of the file.</value>
419
+ ////public PatchAttributeType PatchAttributes
420
+ ////{
421
+ //// get { return this.patchAttributes; }
422
+ //// set { this.patchAttributes = value; }
423
+ ////}
424
+
425
+ /////// <summary>
426
+ /////// Gets or sets the delta patch retain-length list for the file.
427
+ /////// </summary>
428
+ /////// <value>RetainLength list for the file.</value>
429
+ ////public string RetainLengths
430
+ ////{
431
+ //// get { return this.retainLengths; }
432
+ //// set { this.retainLengths = value; }
433
+ ////}
434
+
435
+ /////// <summary>
436
+ /////// Gets or sets the delta patch ignore-offset list for the file.
437
+ /////// </summary>
438
+ /////// <value>IgnoreOffset list for the file.</value>
439
+ ////public string IgnoreOffsets
440
+ ////{
441
+ //// get { return this.ignoreOffsets; }
442
+ //// set { this.ignoreOffsets = value; }
443
+ ////}
444
+
445
+ /////// <summary>
446
+ /////// Gets or sets the delta patch ignore-length list for the file.
447
+ /////// </summary>
448
+ /////// <value>IgnoreLength list for the file.</value>
449
+ ////public string IgnoreLengths
450
+ ////{
451
+ //// get { return this.ignoreLengths; }
452
+ //// set { this.ignoreLengths = value; }
453
+ ////}
454
+
455
+ /////// <summary>
456
+ /////// Gets or sets the delta patch retain-offset list for the file.
457
+ /////// </summary>
458
+ /////// <value>RetainOffset list for the file.</value>
459
+ ////public string RetainOffsets
460
+ ////{
461
+ //// get { return this.retainOffsets; }
462
+ //// set { this.retainOffsets = value; }
463
+ ////}
464
+
465
+ /////// <summary>
466
+ /////// Gets or sets the delta patch retain-length list for the previous file.
467
+ /////// </summary>
468
+ /////// <value>RetainLength list for the previous file.</value>
469
+ ////public string PreviousRetainLengths
470
+ ////{
471
+ //// get { return this.previousRetainLengths[0]; }
472
+ //// set { this.previousRetainLengths[0] = value; }
473
+ ////}
474
+
475
+ /////// <summary>
476
+ /////// Gets the delta patch retain-length list for the previous files.
477
+ /////// </summary>
478
+ /////// <value>RetainLength list for the previous files.</value>
479
+ ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
480
+ ////public string[] PreviousRetainLengthsArray
481
+ ////{
482
+ //// get { return this.previousRetainLengths; }
483
+ ////}
484
+
485
+ /////// <summary>
486
+ /////// Gets or sets the delta patch ignore-offset list for the previous file.
487
+ /////// </summary>
488
+ /////// <value>IgnoreOffset list for the previous file.</value>
489
+ ////public string PreviousIgnoreOffsets
490
+ ////{
491
+ //// get { return this.previousIgnoreOffsets[0]; }
492
+ //// set { this.previousIgnoreOffsets[0] = value; }
493
+ ////}
494
+
495
+ /////// <summary>
496
+ /////// Gets the delta patch ignore-offset list for the previous files.
497
+ /////// </summary>
498
+ /////// <value>IgnoreOffset list for the previous files.</value>
499
+ ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
500
+ ////public string[] PreviousIgnoreOffsetsArray
501
+ ////{
502
+ //// get { return this.previousIgnoreOffsets; }
503
+ ////}
504
+
505
+ /////// <summary>
506
+ /////// Gets or sets the delta patch ignore-length list for the previous file.
507
+ /////// </summary>
508
+ /////// <value>IgnoreLength list for the previous file.</value>
509
+ ////public string PreviousIgnoreLengths
510
+ ////{
511
+ //// get { return this.previousIgnoreLengths[0]; }
512
+ //// set { this.previousIgnoreLengths[0] = value; }
513
+ ////}
514
+
515
+ /////// <summary>
516
+ /////// Gets the delta patch ignore-length list for the previous files.
517
+ /////// </summary>
518
+ /////// <value>IgnoreLength list for the previous files.</value>
519
+ ////[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
520
+ ////public string[] PreviousIgnoreLengthsArray
521
+ ////{
522
+ //// get { return this.previousIgnoreLengths; }
523
+ ////}
524
+
525
+ /////// <summary>
526
+ /////// Gets or sets the delta patch retain-offset list for the previous file.
527
+ /////// </summary>
528
+ /////// <value>RetainOffset list for the previous file.</value>
529
+ ////public string PreviousRetainOffsets
530
+ ////{
531
+ //// get { return this.previousRetainOffsets[0]; }
532
+ //// set { this.previousRetainOffsets[0] = value; }
533
+ ////}
534
+
535
+ /////// <summary>
536
+ /////// Gets the delta patch retain-offset list for the previous files.
537
+ /////// </summary>
538
+ /////// <value>RetainOffset list for the previous files.</value>
539
+ ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
540
+ ////public string[] PreviousRetainOffsetsArray
541
+ ////{
542
+ //// get { return this.previousRetainOffsets; }
543
+ ////}
544
+
545
+ /////// <summary>
546
+ /////// Compares the current FileRow with another object of the same type.
547
+ /////// </summary>
548
+ /////// <param name="obj">An object to compare with this instance.</param>
549
+ /////// <returns>An integer that indicates the relative order of the comparands.</returns>
550
+ ////[SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.ArgumentException.#ctor(System.String)")]
551
+ ////[SuppressMessage("Microsoft.Globalization", "CA1309:UseOrdinalStringComparison")]
552
+ ////public int CompareTo(object obj)
553
+ ////{
554
+ //// if (this == obj)
555
+ //// {
556
+ //// return 0;
557
+ //// }
558
+
559
+ //// FileRow fileRow = obj as FileRow;
560
+ //// if (null == fileRow)
561
+ //// {
562
+ //// throw new ArgumentException(WixDataStrings.EXP_OtherObjectIsNotFileRow);
563
+ //// }
564
+
565
+ //// int compared = this.DiskId - fileRow.DiskId;
566
+ //// if (0 == compared)
567
+ //// {
568
+ //// compared = this.patchGroup - fileRow.patchGroup;
569
+
570
+ //// if (0 == compared)
571
+ //// {
572
+ //// compared = String.Compare(this.File, fileRow.File, StringComparison.InvariantCulture);
573
+ //// }
574
+ //// }
575
+
576
+ //// return compared;
577
+ ////}
578
+
579
+ /////// <summary>
580
+ /////// Copies data from another FileRow object.
581
+ /////// </summary>
582
+ /////// <param name="src">An row to get data from.</param>
583
+ ////public void CopyFrom(FileRow src)
584
+ ////{
585
+ //// for (int i = 0; i < src.Fields.Length; i++)
586
+ //// {
587
+ //// this[i] = src[i];
588
+ //// }
589
+ //// this.assemblyManifest = src.assemblyManifest;
590
+ //// this.assemblyType = src.assemblyType;
591
+ //// this.directory = src.directory;
592
+ //// this.diskId = src.diskId;
593
+ //// this.fromModule = src.fromModule;
594
+ //// this.isGeneratedShortFileName = src.isGeneratedShortFileName;
595
+ //// this.patchGroup = src.patchGroup;
596
+ //// this.processorArchitecture = src.processorArchitecture;
597
+ //// this.source = src.source;
598
+ //// this.PreviousSource = src.PreviousSource;
599
+ //// this.Operation = src.Operation;
600
+ //// this.symbols = src.symbols;
601
+ //// this.PreviousSymbols = src.PreviousSymbols;
602
+ //// this.patchAttributes = src.patchAttributes;
603
+ //// this.retainOffsets = src.retainOffsets;
604
+ //// this.retainLengths = src.retainLengths;
605
+ //// this.ignoreOffsets = src.ignoreOffsets;
606
+ //// this.ignoreLengths = src.ignoreLengths;
607
+ //// this.PreviousRetainOffsets = src.PreviousRetainOffsets;
608
+ //// this.PreviousRetainLengths = src.PreviousRetainLengths;
609
+ //// this.PreviousIgnoreOffsets = src.PreviousIgnoreOffsets;
610
+ //// this.PreviousIgnoreLengths = src.PreviousIgnoreLengths;
611
+ ////}
612
+
613
+ /////// <summary>
614
+ /////// Appends previous data from another FileRow object.
615
+ /////// </summary>
616
+ /////// <param name="src">An row to get data from.</param>
617
+ ////public void AppendPreviousDataFrom(FileRow src)
618
+ ////{
619
+ //// AppendStringToArray(ref this.previousSource, src.previousSource[0]);
620
+ //// AppendStringToArray(ref this.previousSymbols, src.previousSymbols[0]);
621
+ //// AppendStringToArray(ref this.previousRetainOffsets, src.previousRetainOffsets[0]);
622
+ //// AppendStringToArray(ref this.previousRetainLengths, src.previousRetainLengths[0]);
623
+ //// AppendStringToArray(ref this.previousIgnoreOffsets, src.previousIgnoreOffsets[0]);
624
+ //// AppendStringToArray(ref this.previousIgnoreLengths, src.previousIgnoreLengths[0]);
625
+ ////}
626
+
627
+ /////// <summary>
628
+ /////// Helper method for AppendPreviousDataFrom.
629
+ /////// </summary>
630
+ /////// <param name="source">Destination array.</param>
631
+ /////// <param name="destination">Source string.</param>
632
+ ////private static void AppendStringToArray(ref string[] destination, string source)
633
+ ////{
634
+ //// string[] result = new string[destination.Length + 1];
635
+ //// destination.CopyTo(result, 0);
636
+ //// result[destination.Length] = source;
637
+ //// destination = result;
638
+ ////}
639
+ }
640
+}
src/WixToolset.Data/Rows/MediaRow.cs
new
+80
@@ -0,0 +1,80 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the Media table.
7
+ /// </summary>
8
+ public sealed class MediaRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a Media row that belongs to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
15
+ public MediaRow(SourceLineNumber sourceLineNumbers, Table table)
16
+ : base(sourceLineNumbers, table)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Gets or sets the disk id for this media row.
22
+ /// </summary>
23
+ /// <value>Disk id.</value>
24
+ public int DiskId
25
+ {
26
+ get { return (int)this.Fields[0].Data; }
27
+ set { this.Fields[0].Data = value; }
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the last sequence number for this media row.
32
+ /// </summary>
33
+ /// <value>Last sequence number.</value>
34
+ public int LastSequence
35
+ {
36
+ get { return (int)this.Fields[1].Data; }
37
+ set { this.Fields[1].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the disk prompt for this media row.
42
+ /// </summary>
43
+ /// <value>Disk prompt.</value>
44
+ public string DiskPrompt
45
+ {
46
+ get { return (string)this.Fields[2].Data; }
47
+ set { this.Fields[2].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the cabinet name for this media row.
52
+ /// </summary>
53
+ /// <value>Cabinet name.</value>
54
+ public string Cabinet
55
+ {
56
+ get { return (string)this.Fields[3].Data; }
57
+ set { this.Fields[3].Data = value; }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets or sets the volume label for this media row.
62
+ /// </summary>
63
+ /// <value>Volume label.</value>
64
+ public string VolumeLabel
65
+ {
66
+ get { return (string)this.Fields[4].Data; }
67
+ set { this.Fields[4].Data = value; }
68
+ }
69
+
70
+ /// <summary>
71
+ /// Gets or sets the source for this media row.
72
+ /// </summary>
73
+ /// <value>Source.</value>
74
+ public string Source
75
+ {
76
+ get { return (string)this.Fields[5].Data; }
77
+ set { this.Fields[5].Data = value; }
78
+ }
79
+ }
80
+}
src/WixToolset.Data/Rows/PatchAttributeType.cs
new
+27
@@ -0,0 +1,27 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// PatchAttribute values
9
+ /// </summary>
10
+ [Flags]
11
+ public enum PatchAttributeType
12
+ {
13
+ None = 0,
14
+
15
+ /// <summary>Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.</summary>
16
+ Ignore = 1,
17
+
18
+ /// <summary>Set if the entire file should be installed rather than creating a binary patch.</summary>
19
+ IncludeWholeFile = 2,
20
+
21
+ /// <summary>Set to indicate that the patch is non-vital.</summary>
22
+ AllowIgnoreOnError = 4,
23
+
24
+ /// <summary>Allowed bits.</summary>
25
+ Defined = Ignore | IncludeWholeFile | AllowIgnoreOnError
26
+ }
27
+}
src/WixToolset.Data/Rows/PropertyRow.cs
new
+42
@@ -0,0 +1,42 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// Specialization of a row for the upgrade table.
9
+ /// </summary>
10
+ public sealed class PropertyRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates an Upgrade row that belongs to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="table">Table this Upgrade row belongs to and should get its column definitions from.</param>
17
+ public PropertyRow(SourceLineNumber sourceLineNumbers, Table table) :
18
+ base(sourceLineNumbers, table)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Gets and sets the upgrade code for the row.
24
+ /// </summary>
25
+ /// <value>Property identifier for the row.</value>
26
+ public string Property
27
+ {
28
+ get { return (string)this.Fields[0].Data; }
29
+ set { this.Fields[0].Data = value; }
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets and sets the value for the row.
34
+ /// </summary>
35
+ /// <value>Property value for the row.</value>
36
+ public string Value
37
+ {
38
+ get { return (string)this.Fields[1].Data; }
39
+ set { this.Fields[1].Data = value; }
40
+ }
41
+ }
42
+}
src/WixToolset.Data/Rows/SummaryInfoRowCollection.cs
new
+42
@@ -0,0 +1,42 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Collections;
7
+ using System.Collections.ObjectModel;
8
+
9
+ /// <summary>
10
+ /// Indexed container class for summary information rows.
11
+ /// </summary>
12
+ public sealed class SummaryInfoRowCollection : KeyedCollection<int, Row>
13
+ {
14
+ /// <summary>
15
+ /// Creates the keyed collection from existing rows in a table.
16
+ /// </summary>
17
+ /// <param name="table">The summary information table to index.</param>
18
+ public SummaryInfoRowCollection(Table table)
19
+ {
20
+ if (0 != String.CompareOrdinal("_SummaryInformation", table.Name))
21
+ {
22
+ string message = string.Format(WixDataStrings.EXP_UnsupportedTable, table.Name);
23
+ throw new ArgumentException(message, "table");
24
+ }
25
+
26
+ foreach (Row row in table.Rows)
27
+ {
28
+ this.Add(row);
29
+ }
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets the summary property ID for the <paramref name="row"/>.
34
+ /// </summary>
35
+ /// <param name="row">The row to index.</param>
36
+ /// <returns>The summary property ID for the <paramref name="row"/>.
37
+ protected override int GetKeyForItem(Row row)
38
+ {
39
+ return (int)row[0];
40
+ }
41
+ }
42
+}
src/WixToolset.Data/Rows/SymbolPathType.cs
new
+17
@@ -0,0 +1,17 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// The types that the WixDeltaPatchSymbolPaths table can hold.
7
+ /// </summary>
8
+ /// <remarks>The order of these values is important since WixDeltaPatchSymbolPaths are sorted by this type.</remarks>
9
+ public enum SymbolPathType
10
+ {
11
+ File,
12
+ Component,
13
+ Directory,
14
+ Media,
15
+ Product
16
+ };
17
+}
src/WixToolset.Data/Rows/UpgradeRow.cs
new
+90
@@ -0,0 +1,90 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the upgrade table.
7
+ /// </summary>
8
+ public sealed class UpgradeRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates an Upgrade row that belongs to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="table">Table this Upgrade row belongs to and should get its column definitions from.</param>
15
+ public UpgradeRow(SourceLineNumber sourceLineNumbers, Table table) :
16
+ base(sourceLineNumbers, table)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Gets and sets the upgrade code for the row.
22
+ /// </summary>
23
+ /// <value>Upgrade code for the row.</value>
24
+ public string UpgradeCode
25
+ {
26
+ get { return (string)this.Fields[0].Data; }
27
+ set { this.Fields[0].Data = value; }
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets and sets the version minimum for the row.
32
+ /// </summary>
33
+ /// <value>Version minimum for the row.</value>
34
+ public string VersionMin
35
+ {
36
+ get { return (string)this.Fields[1].Data; }
37
+ set { this.Fields[1].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets and sets the version maximum for the row.
42
+ /// </summary>
43
+ /// <value>Version maximum for the row.</value>
44
+ public string VersionMax
45
+ {
46
+ get { return (string)this.Fields[2].Data; }
47
+ set { this.Fields[2].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets and sets the language for the row.
52
+ /// </summary>
53
+ /// <value>Language for the row.</value>
54
+ public string Language
55
+ {
56
+ get { return (string)this.Fields[3].Data; }
57
+ set { this.Fields[3].Data = value; }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets and sets the attributes for the row.
62
+ /// </summary>
63
+ /// <value>Attributes for the row.</value>
64
+ public int Attributes
65
+ {
66
+ get { return (int)this.Fields[4].Data; }
67
+ set { this.Fields[4].Data = value; }
68
+ }
69
+
70
+ /// <summary>
71
+ /// Gets and sets the remove code for the row.
72
+ /// </summary>
73
+ /// <value>Remove code for the row.</value>
74
+ public string Remove
75
+ {
76
+ get { return (string)this.Fields[5].Data; }
77
+ set { this.Fields[5].Data = value; }
78
+ }
79
+
80
+ /// <summary>
81
+ /// Gets and sets the action property for the row.
82
+ /// </summary>
83
+ /// <value>Action property for the row.</value>
84
+ public string ActionProperty
85
+ {
86
+ get { return (string)this.Fields[6].Data; }
87
+ set { this.Fields[6].Data = value; }
88
+ }
89
+ }
90
+}
src/WixToolset.Data/Rows/WixActionRow.cs
new
+374
@@ -0,0 +1,374 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using System.Diagnostics;
8
+ using System.Globalization;
9
+ using System.Xml;
10
+ using System.Xml.Schema;
11
+
12
+ /// <summary>
13
+ /// The Sequence tables that actions may belong to.
14
+ /// </summary>
15
+ public enum SequenceTable
16
+ {
17
+ /// <summary>AdminUISequence</summary>
18
+ AdminUISequence,
19
+
20
+ /// <summary>AdminExecuteSequence</summary>
21
+ AdminExecuteSequence,
22
+
23
+ /// <summary>AdvtExecuteSequence</summary>
24
+ AdvtExecuteSequence,
25
+
26
+ /// <summary>InstallUISequence</summary>
27
+ InstallUISequence,
28
+
29
+ /// <summary>InstallExecuteSequence</summary>
30
+ InstallExecuteSequence
31
+ }
32
+
33
+ /// <summary>
34
+ /// Specialization of a row for the sequence tables.
35
+ /// </summary>
36
+ public sealed class WixActionRow : Row, IComparable
37
+ {
38
+ private WixActionRowCollection previousActionRows;
39
+ private WixActionRowCollection nextActionRows;
40
+
41
+ /// <summary>
42
+ /// Instantiates an ActionRow that belongs to a table.
43
+ /// </summary>
44
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
45
+ /// <param name="table">Table this Action row belongs to and should get its column definitions from.</param>
46
+ public WixActionRow(SourceLineNumber sourceLineNumbers, Table table) :
47
+ base(sourceLineNumbers, table)
48
+ {
49
+ }
50
+
51
+ /// <summary>
52
+ /// Instantiates a standard ActionRow.
53
+ /// </summary>
54
+ /// <param name="sequenceTable">The sequence table of the standard action.</param>
55
+ /// <param name="action">The name of the standard action.</param>
56
+ /// <param name="condition">The condition of the standard action.</param>
57
+ /// <param name="sequence">The suggested sequence number of the standard action.</param>
58
+ private WixActionRow(SequenceTable sequenceTable, string action, string condition, int sequence) :
59
+ base(null, WindowsInstallerStandard.GetTableDefinitions()["WixAction"])
60
+ {
61
+ this.SequenceTable = sequenceTable;
62
+ this.Action = action;
63
+ this.Condition = condition;
64
+ this.Sequence = sequence;
65
+ this.Overridable = true; // all standard actions are overridable by default
66
+ }
67
+
68
+ /// <summary>
69
+ /// Instantiates an ActionRow by copying data from another ActionRow.
70
+ /// </summary>
71
+ /// <param name="source">The row the data is copied from.</param>
72
+ /// <remarks>The previous and next action collections are not copied.</remarks>
73
+ private WixActionRow(WixActionRow source)
74
+ : base(source)
75
+ {
76
+ }
77
+
78
+ /// <summary>
79
+ /// Gets or sets the name of the action.
80
+ /// </summary>
81
+ /// <value>The name of the action.</value>
82
+ public string Action
83
+ {
84
+ get { return (string)this.Fields[1].Data; }
85
+ set { this.Fields[1].Data = value; }
86
+ }
87
+
88
+ /// <summary>
89
+ /// Gets the name of the action this action should be scheduled after.
90
+ /// </summary>
91
+ /// <value>The name of the action this action should be scheduled after.</value>
92
+ public string After
93
+ {
94
+ get { return (string)this.Fields[5].Data; }
95
+ set { this.Fields[5].Data = value; }
96
+ }
97
+
98
+ /// <summary>
99
+ /// Gets the name of the action this action should be scheduled before.
100
+ /// </summary>
101
+ /// <value>The name of the action this action should be scheduled before.</value>
102
+ public string Before
103
+ {
104
+ get { return (string)this.Fields[4].Data; }
105
+ set { this.Fields[4].Data = value; }
106
+ }
107
+
108
+ /// <summary>
109
+ /// Gets or sets the condition of the action.
110
+ /// </summary>
111
+ /// <value>The condition of the action.</value>
112
+ public string Condition
113
+ {
114
+ get { return (string)this.Fields[2].Data; }
115
+ set { this.Fields[2].Data = value; }
116
+ }
117
+
118
+ /// <summary>
119
+ /// Gets or sets whether this action is overridable.
120
+ /// </summary>
121
+ /// <value>Whether this action is overridable.</value>
122
+ public bool Overridable
123
+ {
124
+ get { return (1 == Convert.ToInt32(this.Fields[6].Data, CultureInfo.InvariantCulture)); }
125
+ set { this.Fields[6].Data = (value ? 1 : 0); }
126
+ }
127
+
128
+ /// <summary>
129
+ /// Gets or sets the sequence number of this action.
130
+ /// </summary>
131
+ /// <value>The sequence number of this action.</value>
132
+ public int Sequence
133
+ {
134
+ get { return Convert.ToInt32(this.Fields[3].Data, CultureInfo.InvariantCulture); }
135
+ set { this.Fields[3].Data = value; }
136
+ }
137
+
138
+ /// <summary>
139
+ /// Gets of sets the sequence table of this action.
140
+ /// </summary>
141
+ /// <value>The sequence table of this action.</value>
142
+ public SequenceTable SequenceTable
143
+ {
144
+ get { return (SequenceTable)Enum.Parse(typeof(SequenceTable), (string)this.Fields[0].Data); }
145
+ set { this.Fields[0].Data = value.ToString(); }
146
+ }
147
+
148
+ /// <summary>
149
+ /// Gets the actions that should be scheduled after this action.
150
+ /// </summary>
151
+ /// <value>The actions that should be scheduled after this action.</value>
152
+ public WixActionRowCollection NextActionRows
153
+ {
154
+ get
155
+ {
156
+ if (null == this.nextActionRows)
157
+ {
158
+ this.nextActionRows = new WixActionRowCollection();
159
+ }
160
+
161
+ return this.nextActionRows;
162
+ }
163
+ }
164
+
165
+ /// <summary>
166
+ /// Gets the actions that should be scheduled before this action.
167
+ /// </summary>
168
+ /// <value>The actions that should be scheduled before this action.</value>
169
+ public WixActionRowCollection PreviousActionRows
170
+ {
171
+ get
172
+ {
173
+ if (null == this.previousActionRows)
174
+ {
175
+ this.previousActionRows = new WixActionRowCollection();
176
+ }
177
+
178
+ return this.previousActionRows;
179
+ }
180
+ }
181
+
182
+ /// <summary>
183
+ /// Creates a clone of the action row.
184
+ /// </summary>
185
+ /// <returns>A shallow copy of the source object.</returns>
186
+ /// <remarks>The previous and next action collections are not copied.</remarks>
187
+ public WixActionRow Clone()
188
+ {
189
+ return new WixActionRow(this);
190
+ }
191
+
192
+ /// <summary>
193
+ /// Compares the current instance with another object of the same type.
194
+ /// </summary>
195
+ /// <param name="obj">Other reference to compare this one to.</param>
196
+ /// <returns>Returns less than 0 for less than, 0 for equals, and greater than 0 for greater.</returns>
197
+ public int CompareTo(object obj)
198
+ {
199
+ WixActionRow otherActionRow = (WixActionRow)obj;
200
+
201
+ return this.Sequence.CompareTo(otherActionRow.Sequence);
202
+ }
203
+
204
+ /// <summary>
205
+ /// Parses ActionRows from the Xml reader.
206
+ /// </summary>
207
+ /// <param name="reader">Xml reader that contains serialized ActionRows.</param>
208
+ /// <returns>The parsed ActionRows.</returns>
209
+ internal static WixActionRow[] Parse(XmlReader reader)
210
+ {
211
+ Debug.Assert("action" == reader.LocalName);
212
+
213
+ string id = null;
214
+ string condition = null;
215
+ bool empty = reader.IsEmptyElement;
216
+ int sequence = int.MinValue;
217
+ int sequenceCount = 0;
218
+ SequenceTable[] sequenceTables = new SequenceTable[Enum.GetValues(typeof(SequenceTable)).Length];
219
+
220
+ while (reader.MoveToNextAttribute())
221
+ {
222
+ switch (reader.Name)
223
+ {
224
+ case "name":
225
+ id = reader.Value;
226
+ break;
227
+ case "AdminExecuteSequence":
228
+ if (reader.Value.Equals("yes"))
229
+ {
230
+ sequenceTables[sequenceCount] = SequenceTable.AdminExecuteSequence;
231
+ ++sequenceCount;
232
+ }
233
+ break;
234
+ case "AdminUISequence":
235
+ if (reader.Value.Equals("yes"))
236
+ {
237
+ sequenceTables[sequenceCount] = SequenceTable.AdminUISequence;
238
+ ++sequenceCount;
239
+ }
240
+ break;
241
+ case "AdvtExecuteSequence":
242
+ if (reader.Value.Equals("yes"))
243
+ {
244
+ sequenceTables[sequenceCount] = SequenceTable.AdvtExecuteSequence;
245
+ ++sequenceCount;
246
+ }
247
+ break;
248
+ case "condition":
249
+ condition = reader.Value;
250
+ break;
251
+ case "InstallExecuteSequence":
252
+ if (reader.Value.Equals("yes"))
253
+ {
254
+ sequenceTables[sequenceCount] = SequenceTable.InstallExecuteSequence;
255
+ ++sequenceCount;
256
+ }
257
+ break;
258
+ case "InstallUISequence":
259
+ if (reader.Value.Equals("yes"))
260
+ {
261
+ sequenceTables[sequenceCount] = SequenceTable.InstallUISequence;
262
+ ++sequenceCount;
263
+ }
264
+ break;
265
+ case "sequence":
266
+ sequence = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
267
+ break;
268
+ }
269
+ }
270
+
271
+ if (null == id)
272
+ {
273
+ throw new XmlException();
274
+ }
275
+
276
+ if (int.MinValue == sequence)
277
+ {
278
+ throw new XmlException();
279
+ }
280
+ else if (1 > sequence)
281
+ {
282
+ throw new XmlException();
283
+ }
284
+
285
+ if (0 == sequenceCount)
286
+ {
287
+ throw new XmlException();
288
+ }
289
+
290
+ if (!empty && reader.Read() && XmlNodeType.EndElement != reader.MoveToContent())
291
+ {
292
+ throw new XmlException();
293
+ }
294
+
295
+ // create the actions
296
+ WixActionRow[] actionRows = new WixActionRow[sequenceCount];
297
+ for (int i = 0; i < sequenceCount; i++)
298
+ {
299
+ WixActionRow actionRow = new WixActionRow(sequenceTables[i], id, condition, sequence);
300
+ actionRows[i] = actionRow;
301
+ }
302
+
303
+ return actionRows;
304
+ }
305
+
306
+ /// <summary>
307
+ /// Determines whether this ActionRow contains the specified ActionRow as a child in its dependency tree.
308
+ /// </summary>
309
+ /// <param name="actionRow">The possible child ActionRow.</param>
310
+ /// <returns>true if the ActionRow is a child of this ActionRow; false otherwise.</returns>
311
+ public bool ContainsChildActionRow(WixActionRow actionRow)
312
+ {
313
+ if (null != this.previousActionRows)
314
+ {
315
+ if (this.previousActionRows.Contains(actionRow.SequenceTable, actionRow.Action))
316
+ {
317
+ return true;
318
+ }
319
+ }
320
+
321
+ if (null != this.nextActionRows)
322
+ {
323
+ if (this.nextActionRows.Contains(actionRow.SequenceTable, actionRow.Action))
324
+ {
325
+ return true;
326
+ }
327
+ }
328
+
329
+ return false;
330
+ }
331
+
332
+ /// <summary>
333
+ /// Get all the actions scheduled before this one in a particular sequence table.
334
+ /// </summary>
335
+ /// <param name="sequenceTable">The sequence table.</param>
336
+ /// <param name="allPreviousActionRows">A RowCollection which will contain all the previous actions.</param>
337
+ public void GetAllPreviousActionRows(SequenceTable sequenceTable, IList<WixActionRow> allPreviousActionRows)
338
+ {
339
+ if (null != this.previousActionRows)
340
+ {
341
+ foreach (WixActionRow actionRow in this.previousActionRows)
342
+ {
343
+ if (sequenceTable == actionRow.SequenceTable)
344
+ {
345
+ actionRow.GetAllPreviousActionRows(sequenceTable, allPreviousActionRows);
346
+ allPreviousActionRows.Add(actionRow);
347
+ actionRow.GetAllNextActionRows(sequenceTable, allPreviousActionRows);
348
+ }
349
+ }
350
+ }
351
+ }
352
+
353
+ /// <summary>
354
+ /// Get all the actions scheduled after this one in a particular sequence table.
355
+ /// </summary>
356
+ /// <param name="sequenceTable">The sequence table.</param>
357
+ /// <param name="allNextActionRows">A RowCollection which will contain all the next actions.</param>
358
+ public void GetAllNextActionRows(SequenceTable sequenceTable, IList<WixActionRow> allNextActionRows)
359
+ {
360
+ if (null != this.nextActionRows)
361
+ {
362
+ foreach (WixActionRow actionRow in this.nextActionRows)
363
+ {
364
+ if (sequenceTable == actionRow.SequenceTable)
365
+ {
366
+ actionRow.GetAllPreviousActionRows(sequenceTable, allNextActionRows);
367
+ allNextActionRows.Add(actionRow);
368
+ actionRow.GetAllNextActionRows(sequenceTable, allNextActionRows);
369
+ }
370
+ }
371
+ }
372
+ }
373
+ }
374
+}
src/WixToolset.Data/Rows/WixActionRowCollection.cs
new
+222
@@ -0,0 +1,222 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Collections;
7
+ using System.Diagnostics;
8
+ using System.Xml;
9
+
10
+ /// <summary>
11
+ /// A collection of action rows sorted by their sequence table and action name.
12
+ /// </summary>
13
+ public sealed class WixActionRowCollection : ICollection
14
+ {
15
+ private SortedList collection;
16
+
17
+ /// <summary>
18
+ /// Creates a new action table object.
19
+ /// </summary>
20
+ public WixActionRowCollection()
21
+ {
22
+ this.collection = new SortedList();
23
+ }
24
+
25
+ /// <summary>
26
+ /// Gets the number of items in the collection.
27
+ /// </summary>
28
+ /// <value>Number of items in collection.</value>
29
+ public int Count
30
+ {
31
+ get { return this.collection.Count; }
32
+ }
33
+
34
+ /// <summary>
35
+ /// Gets if the collection has been synchronized.
36
+ /// </summary>
37
+ /// <value>True if the collection has been synchronized.</value>
38
+ public bool IsSynchronized
39
+ {
40
+ get { return this.collection.IsSynchronized; }
41
+ }
42
+
43
+ /// <summary>
44
+ /// Gets the object used to synchronize the collection.
45
+ /// </summary>
46
+ /// <value>Oject used the synchronize the collection.</value>
47
+ public object SyncRoot
48
+ {
49
+ get { return this; }
50
+ }
51
+
52
+ /// <summary>
53
+ /// Get an ActionRow by its sequence table and action name.
54
+ /// </summary>
55
+ /// <param name="sequenceTable">The sequence table of the ActionRow.</param>
56
+ /// <param name="action">The action name of the ActionRow.</param>
57
+ public WixActionRow this[SequenceTable sequenceTable, string action]
58
+ {
59
+ get { return (WixActionRow)this.collection[GetKey(sequenceTable, action)]; }
60
+ }
61
+
62
+ /// <summary>
63
+ /// Add an ActionRow to the collection.
64
+ /// </summary>
65
+ /// <param name="actionRow">The ActionRow to add.</param>
66
+ /// <param name="overwrite">true to overwrite an existing ActionRow; false otherwise.</param>
67
+ public void Add(WixActionRow actionRow, bool overwrite)
68
+ {
69
+ string key = GetKey(actionRow.SequenceTable, actionRow.Action);
70
+
71
+ if (overwrite)
72
+ {
73
+ this.collection[key] = actionRow;
74
+ }
75
+ else
76
+ {
77
+ this.collection.Add(key, actionRow);
78
+ }
79
+ }
80
+
81
+ /// <summary>
82
+ /// Add an ActionRow to the collection.
83
+ /// </summary>
84
+ /// <param name="actionRow">The ActionRow to add.</param>
85
+ public void Add(WixActionRow actionRow)
86
+ {
87
+ this.Add(actionRow, false);
88
+ }
89
+
90
+ /// <summary>
91
+ /// Determines if the collection contains an ActionRow with a specific sequence table and name.
92
+ /// </summary>
93
+ /// <param name="sequenceTable">The sequence table of the ActionRow.</param>
94
+ /// <param name="action">The action name of the ActionRow.</param>
95
+ /// <returns>true if the ActionRow was found; false otherwise.</returns>
96
+ public bool Contains(SequenceTable sequenceTable, string action)
97
+ {
98
+ return this.collection.Contains(GetKey(sequenceTable, action));
99
+ }
100
+
101
+ /// <summary>
102
+ /// Copies the collection into an array.
103
+ /// </summary>
104
+ /// <param name="array">Array to copy the collection into.</param>
105
+ /// <param name="index">Index to start copying from.</param>
106
+ public void CopyTo(System.Array array, int index)
107
+ {
108
+ this.collection.Values.CopyTo(array, index);
109
+ }
110
+
111
+ /// <summary>
112
+ /// Gets the enumerator for the collection.
113
+ /// </summary>
114
+ /// <returns>The enumerator for the collection.</returns>
115
+ public IEnumerator GetEnumerator()
116
+ {
117
+ return this.collection.Values.GetEnumerator();
118
+ }
119
+
120
+ /// <summary>
121
+ /// Remove an ActionRow from the collection.
122
+ /// </summary>
123
+ /// <param name="sequenceTable">The sequence table of the ActionRow.</param>
124
+ /// <param name="action">The action name of the ActionRow.</param>
125
+ public void Remove(SequenceTable sequenceTable, string action)
126
+ {
127
+ this.collection.Remove(GetKey(sequenceTable, action));
128
+ }
129
+
130
+ /// <summary>
131
+ /// Load an action table from an XmlReader.
132
+ /// </summary>
133
+ /// <param name="reader">Reader to get data from.</param>
134
+ /// <returns>The ActionRowCollection represented by the xml.</returns>
135
+ internal static WixActionRowCollection Load(XmlReader reader)
136
+ {
137
+ reader.MoveToContent();
138
+
139
+ return Parse(reader);
140
+ }
141
+
142
+ /// <summary>
143
+ /// Creates a new action table object and populates it from an Xml reader.
144
+ /// </summary>
145
+ /// <param name="reader">Reader to get data from.</param>
146
+ /// <returns>The parsed ActionTable.</returns>
147
+ private static WixActionRowCollection Parse(XmlReader reader)
148
+ {
149
+ if (!reader.LocalName.Equals("actions"))
150
+ {
151
+ throw new XmlException();
152
+ }
153
+
154
+ WixActionRowCollection actionRows = new WixActionRowCollection();
155
+ bool empty = reader.IsEmptyElement;
156
+
157
+ while (reader.MoveToNextAttribute())
158
+ {
159
+ }
160
+
161
+ if (!empty)
162
+ {
163
+ bool done = false;
164
+
165
+ // loop through all the fields in a row
166
+ while (!done && reader.Read())
167
+ {
168
+ switch (reader.NodeType)
169
+ {
170
+ case XmlNodeType.Element:
171
+ switch (reader.LocalName)
172
+ {
173
+ case "action":
174
+ WixActionRow[] parsedActionRows = WixActionRow.Parse(reader);
175
+
176
+ foreach (WixActionRow actionRow in parsedActionRows)
177
+ {
178
+ actionRows.Add(actionRow);
179
+ }
180
+ break;
181
+ default:
182
+ throw new XmlException();
183
+ }
184
+ break;
185
+ case XmlNodeType.EndElement:
186
+ done = true;
187
+ break;
188
+ }
189
+ }
190
+
191
+ if (!done)
192
+ {
193
+ throw new XmlException();
194
+ }
195
+ }
196
+
197
+ return actionRows;
198
+ }
199
+
200
+ /// <summary>
201
+ /// Get the key for storing an ActionRow.
202
+ /// </summary>
203
+ /// <param name="sequenceTable">The sequence table of the ActionRow.</param>
204
+ /// <param name="action">The action name of the ActionRow.</param>
205
+ /// <returns>The string key.</returns>
206
+ private static string GetKey(SequenceTable sequenceTable, string action)
207
+ {
208
+ return GetKey(sequenceTable.ToString(), action);
209
+ }
210
+
211
+ /// <summary>
212
+ /// Get the key for storing an ActionRow.
213
+ /// </summary>
214
+ /// <param name="sequenceTable">The sequence table of the ActionRow.</param>
215
+ /// <param name="action">The action name of the ActionRow.</param>
216
+ /// <returns>The string key.</returns>
217
+ private static string GetKey(string sequenceTable, string action)
218
+ {
219
+ return String.Concat(sequenceTable, '/', action);
220
+ }
221
+ }
222
+}
src/WixToolset.Data/Rows/WixApprovedExeForElevationRow.cs
new
+79
@@ -0,0 +1,79 @@
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.Rows
4
+{
5
+
6
+ /// <summary>
7
+ /// Specialization of a row for the WixApprovedExeForElevation table.
8
+ /// </summary>
9
+ public class WixApprovedExeForElevationRow : Row
10
+ {
11
+ /// <summary>
12
+ /// Creates an ApprovedExeForElevation row that does not belong to a table.
13
+ /// </summary>
14
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
15
+ /// <param name="tableDef">TableDefinition this ApprovedExeForElevation row belongs to and should get its column definitions from.</param>
16
+ public WixApprovedExeForElevationRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
17
+ base(sourceLineNumbers, tableDef)
18
+ {
19
+ }
20
+
21
+ /// <summary>
22
+ /// Creates an ApprovedExeForElevation row that belongs to a table.
23
+ /// </summary>
24
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
25
+ /// <param name="table">Table this ApprovedExeForElevation row belongs to and should get its column definitions from.</param>
26
+ public WixApprovedExeForElevationRow(SourceLineNumber sourceLineNumbers, Table table)
27
+ : base(sourceLineNumbers, table)
28
+ {
29
+ }
30
+
31
+ /// <summary>
32
+ /// Gets or sets the ApprovedExeForElevation identifier.
33
+ /// </summary>
34
+ /// <value>The ApprovedExeForElevation identifier.</value>
35
+ public string Id
36
+ {
37
+ get { return (string)this.Fields[0].Data; }
38
+ set { this.Fields[0].Data = value; }
39
+ }
40
+
41
+ /// <summary>
42
+ /// Gets or sets the Key path.
43
+ /// </summary>
44
+ /// <value>The Key path.</value>
45
+ public string Key
46
+ {
47
+ get { return (string)this.Fields[1].Data; }
48
+ set { this.Fields[1].Data = value; }
49
+ }
50
+
51
+ /// <summary>
52
+ /// Gets or sets the Value name.
53
+ /// </summary>
54
+ /// <value>The Value name.</value>
55
+ public string ValueName
56
+ {
57
+ get { return (string)this.Fields[2].Data; }
58
+ set { this.Fields[2].Data = value; }
59
+ }
60
+
61
+ /// <summary>
62
+ /// Gets or sets the attibutes.
63
+ /// </summary>
64
+ /// <value>The BundleApprovedExeForElevationAttributes.</value>
65
+ public BundleApprovedExeForElevationAttributes Attributes
66
+ {
67
+ get { return (BundleApprovedExeForElevationAttributes)this.Fields[3].Data; }
68
+ set { this.Fields[3].Data = (int)value; }
69
+ }
70
+
71
+ /// <summary>
72
+ /// Gets whether this row is 64-bit.
73
+ /// </summary>
74
+ public bool Win64
75
+ {
76
+ get { return BundleApprovedExeForElevationAttributes.Win64 == (this.Attributes & BundleApprovedExeForElevationAttributes.Win64); }
77
+ }
78
+ }
79
+}
src/WixToolset.Data/Rows/WixBundleCatalogRow.cs
new
+50
@@ -0,0 +1,50 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixCatalog table.
7
+ /// </summary>
8
+ public sealed class WixBundleCatalogRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a Catalog row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Catalog row belongs to and should get its column definitions from.</param>
15
+ public WixBundleCatalogRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a Catalog row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Catalog row belongs to and should get its column definitions from.</param>
25
+ public WixBundleCatalogRow(SourceLineNumber sourceLineNumbers, Table table)
26
+ : base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the catalog identifier.
32
+ /// </summary>
33
+ /// <value>The catalog identifier.</value>
34
+ public string Id
35
+ {
36
+ get { return (string)this.Fields[0].Data; }
37
+ set { this.Fields[0].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the payload identifier.
42
+ /// </summary>
43
+ /// <value>The payload identifier.</value>
44
+ public string Payload
45
+ {
46
+ get { return (string)this.Fields[1].Data; }
47
+ set { this.Fields[1].Data = value; }
48
+ }
49
+ }
50
+}
src/WixToolset.Data/Rows/WixBundleContainerRow.cs
new
+78
@@ -0,0 +1,78 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the Container table.
7
+ /// </summary>
8
+ public class WixBundleContainerRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a ContainerRow row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixBundleContainerRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a ContainerRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixBundleContainerRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ public string Id
31
+ {
32
+ get { return (string)this.Fields[0].Data; }
33
+ set { this.Fields[0].Data = value; }
34
+ }
35
+
36
+ public string Name
37
+ {
38
+ get { return (string)this.Fields[1].Data; }
39
+ set { this.Fields[1].Data = value; }
40
+ }
41
+
42
+ public ContainerType Type
43
+ {
44
+ get { return (ContainerType)this.Fields[2].Data; }
45
+ set { this.Fields[2].Data = (int)value; }
46
+ }
47
+
48
+ public string DownloadUrl
49
+ {
50
+ get { return (string)this.Fields[3].Data; }
51
+ set { this.Fields[3].Data = value; }
52
+ }
53
+
54
+ public long Size
55
+ {
56
+ get { return (long)this.Fields[4].Data; }
57
+ set { this.Fields[4].Data = value; }
58
+ }
59
+
60
+ public string Hash
61
+ {
62
+ get { return (string)this.Fields[5].Data; }
63
+ set { this.Fields[5].Data = value; }
64
+ }
65
+
66
+ public int AttachedContainerIndex
67
+ {
68
+ get { return (null == this.Fields[6].Data) ? -1 : (int)this.Fields[6].Data; }
69
+ set { this.Fields[6].Data = value; }
70
+ }
71
+
72
+ public string WorkingPath
73
+ {
74
+ get { return (string)this.Fields[7].Data; }
75
+ set { this.Fields[7].Data = value; }
76
+ }
77
+ }
78
+}
src/WixToolset.Data/Rows/WixBundleExePackageAttributes.cs
new
+12
@@ -0,0 +1,12 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ [Flags]
8
+ public enum WixBundleExePackageAttributes
9
+ {
10
+ Repairable = 0x1,
11
+ }
12
+}
src/WixToolset.Data/Rows/WixBundleExePackageRow.cs
new
+101
@@ -0,0 +1,101 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixBundleExePackage table.
7
+ /// </summary>
8
+ public sealed class WixBundleExePackageRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixBundleExePackage row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixBundleExePackageRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets or sets the raw Exe attributes of a patch.
41
+ /// </summary>
42
+ public WixBundleExePackageAttributes Attributes
43
+ {
44
+ get { return (WixBundleExePackageAttributes)this.Fields[1].Data; }
45
+ set { this.Fields[1].Data = value; }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Gets or sets the protcol for the executable package.
50
+ /// </summary>
51
+ public string DetectCondition
52
+ {
53
+ get { return (string)this.Fields[2].Data; }
54
+ set { this.Fields[2].Data = value; }
55
+ }
56
+
57
+ /// <summary>
58
+ /// Gets or sets the install command for the executable package.
59
+ /// </summary>
60
+ public string InstallCommand
61
+ {
62
+ get { return (string)this.Fields[3].Data; }
63
+ set { this.Fields[3].Data = value; }
64
+ }
65
+
66
+ /// <summary>
67
+ /// Gets or sets the repair command for the executable package.
68
+ /// </summary>
69
+ public string RepairCommand
70
+ {
71
+ get { return (string)this.Fields[4].Data; }
72
+ set { this.Fields[4].Data = value; }
73
+ }
74
+
75
+ /// <summary>
76
+ /// Gets or sets the uninstall command for the executable package.
77
+ /// </summary>
78
+ public string UninstallCommand
79
+ {
80
+ get { return (string)this.Fields[5].Data; }
81
+ set { this.Fields[5].Data = value; }
82
+ }
83
+
84
+ /// <summary>
85
+ /// Gets or sets the protcol for the executable package.
86
+ /// </summary>
87
+ public string ExeProtocol
88
+ {
89
+ get { return (string)this.Fields[6].Data; }
90
+ set { this.Fields[6].Data = value; }
91
+ }
92
+
93
+ /// <summary>
94
+ /// Gets whether the executable package is repairable.
95
+ /// </summary>
96
+ public bool Repairable
97
+ {
98
+ get { return 0 != (this.Attributes & WixBundleExePackageAttributes.Repairable); }
99
+ }
100
+ }
101
+}
src/WixToolset.Data/Rows/WixBundleMsiFeatureRow.cs
new
+93
@@ -0,0 +1,93 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the MsiFeature table.
7
+ /// </summary>
8
+ public class WixBundleMsiFeatureRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a MsiFeatureRow row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixBundleMsiFeatureRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a MsiFeatureRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixBundleMsiFeatureRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ public string Name
40
+ {
41
+ get { return (string)this.Fields[1].Data; }
42
+ set { this.Fields[1].Data = value; }
43
+ }
44
+
45
+ public long Size
46
+ {
47
+ get { return (long)this.Fields[2].Data; }
48
+ set { this.Fields[2].Data = value; }
49
+ }
50
+
51
+ public string Parent
52
+ {
53
+ get { return (string)this.Fields[3].Data; }
54
+ set { this.Fields[3].Data = value; }
55
+ }
56
+
57
+ public string Title
58
+ {
59
+ get { return (string)this.Fields[4].Data; }
60
+ set { this.Fields[4].Data = value; }
61
+ }
62
+
63
+ public string Description
64
+ {
65
+ get { return (string)this.Fields[5].Data; }
66
+ set { this.Fields[5].Data = value; }
67
+ }
68
+
69
+ public int Display
70
+ {
71
+ get { return (int)this.Fields[6].Data; }
72
+ set { this.Fields[6].Data = value; }
73
+ }
74
+
75
+ public int Level
76
+ {
77
+ get { return (int)this.Fields[7].Data; }
78
+ set { this.Fields[7].Data = value; }
79
+ }
80
+
81
+ public string Directory
82
+ {
83
+ get { return (string)this.Fields[8].Data; }
84
+ set { this.Fields[8].Data = value; }
85
+ }
86
+
87
+ public int Attributes
88
+ {
89
+ get { return (int)this.Fields[9].Data; }
90
+ set { this.Fields[9].Data = value; }
91
+ }
92
+ }
93
+}
src/WixToolset.Data/Rows/WixBundleMsiPackageAttributes.cs
new
+15
@@ -0,0 +1,15 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ [Flags]
8
+ public enum WixBundleMsiPackageAttributes
9
+ {
10
+ DisplayInternalUI = 0x1,
11
+ EnableFeatureSelection = 0x4,
12
+ ForcePerMachine = 0x2,
13
+ SuppressLooseFilePayloadGeneration = 0x8,
14
+ }
15
+}
src/WixToolset.Data/Rows/WixBundleMsiPackageRow.cs
new
+137
@@ -0,0 +1,137 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Globalization;
7
+
8
+ /// <summary>
9
+ /// Specialization of a row for the WixBundleMsiPackage table.
10
+ /// </summary>
11
+ public sealed class WixBundleMsiPackageRow : Row
12
+ {
13
+ /// <summary>
14
+ /// Creates a WixBundleMsiPackage row that does not belong to a table.
15
+ /// </summary>
16
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
17
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
18
+ public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
19
+ base(sourceLineNumbers, tableDef)
20
+ {
21
+ }
22
+
23
+ /// <summary>
24
+ /// Creates a WixBundleMsiPackageRow row that belongs to a table.
25
+ /// </summary>
26
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
27
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
28
+ public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, Table table) :
29
+ base(sourceLineNumbers, table)
30
+ {
31
+ }
32
+
33
+ /// <summary>
34
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
35
+ /// </summary>
36
+ public string ChainPackageId
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 raw MSI attributes of a package.
44
+ /// </summary>
45
+ public WixBundleMsiPackageAttributes Attributes
46
+ {
47
+ get { return (WixBundleMsiPackageAttributes)this.Fields[1].Data; }
48
+ set { this.Fields[1].Data = value; }
49
+ }
50
+
51
+ /// <summary>
52
+ /// Gets or sets the MSI package's product code.
53
+ /// </summary>
54
+ public string ProductCode
55
+ {
56
+ get { return (string)this.Fields[2].Data; }
57
+ set { this.Fields[2].Data = value; }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets or sets the MSI package's upgrade code.
62
+ /// </summary>
63
+ public string UpgradeCode
64
+ {
65
+ get { return (string)this.Fields[3].Data; }
66
+ set { this.Fields[3].Data = value; }
67
+ }
68
+
69
+ /// <summary>
70
+ /// Gets or sets the product version of the MSI package.
71
+ /// </summary>
72
+ public string ProductVersion
73
+ {
74
+ get { return (string)this.Fields[4].Data; }
75
+ set { this.Fields[4].Data = value; }
76
+ }
77
+
78
+ /// <summary>
79
+ /// Gets or sets the language of the MSI package.
80
+ /// </summary>
81
+ public int ProductLanguage
82
+ {
83
+ get { return Convert.ToInt32(this.Fields[5].Data, CultureInfo.InvariantCulture); }
84
+ set { this.Fields[5].Data = value; }
85
+ }
86
+
87
+ /// <summary>
88
+ /// Gets or sets the product name of the MSI package.
89
+ /// </summary>
90
+ public string ProductName
91
+ {
92
+ get { return (string)this.Fields[6].Data; }
93
+ set { this.Fields[6].Data = value; }
94
+ }
95
+
96
+ /// <summary>
97
+ /// Gets or sets the MSI package's manufacturer.
98
+ /// </summary>
99
+ public string Manufacturer
100
+ {
101
+ get { return (string)this.Fields[7].Data; }
102
+ set { this.Fields[7].Data = value; }
103
+ }
104
+
105
+ /// <summary>
106
+ /// Gets the display internal UI of a package.
107
+ /// </summary>
108
+ public bool DisplayInternalUI
109
+ {
110
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.DisplayInternalUI); }
111
+ }
112
+
113
+ /// <summary>
114
+ /// Gets the display internal UI of a package.
115
+ /// </summary>
116
+ public bool EnableFeatureSelection
117
+ {
118
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.EnableFeatureSelection); }
119
+ }
120
+
121
+ /// <summary>
122
+ /// Gets the display internal UI of a package.
123
+ /// </summary>
124
+ public bool ForcePerMachine
125
+ {
126
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.ForcePerMachine); }
127
+ }
128
+
129
+ /// <summary>
130
+ /// Gets the suppress loose file payload generation of a package.
131
+ /// </summary>
132
+ public bool SuppressLooseFilePayloadGeneration
133
+ {
134
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.SuppressLooseFilePayloadGeneration); }
135
+ }
136
+ }
137
+}
src/WixToolset.Data/Rows/WixBundleMsiPropertyRow.cs
new
+58
@@ -0,0 +1,58 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixBundleMsiProperty table.
7
+ /// </summary>
8
+ public sealed class WixBundleMsiPropertyRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates an WixBundleMsiProperty row that belongs to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="table">Table this WixBundleMsiProperty row belongs to and should get its column definitions from.</param>
15
+ public WixBundleMsiPropertyRow(SourceLineNumber sourceLineNumbers, Table table) :
16
+ base(sourceLineNumbers, table)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
22
+ /// </summary>
23
+ public string ChainPackageId
24
+ {
25
+ get { return (string)this.Fields[0].Data; }
26
+ set { this.Fields[0].Data = value; }
27
+ }
28
+
29
+ /// <summary>
30
+ /// Gets and sets the property identity.
31
+ /// </summary>
32
+ public string Name
33
+ {
34
+ get { return (string)this.Fields[1].Data; }
35
+ set { this.Fields[1].Data = value; }
36
+ }
37
+
38
+ /// <summary>
39
+ /// Gets and sets the value for the row.
40
+ /// </summary>
41
+ /// <value>MsiProperty value for the row.</value>
42
+ public string Value
43
+ {
44
+ get { return (string)this.Fields[2].Data; }
45
+ set { this.Fields[2].Data = value; }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Gets and sets the condition for the row.
50
+ /// </summary>
51
+ /// <value>MsiProperty condition for the row.</value>
52
+ public string Condition
53
+ {
54
+ get { return (string)this.Fields[3].Data; }
55
+ set { this.Fields[3].Data = value; }
56
+ }
57
+ }
58
+}
src/WixToolset.Data/Rows/WixBundleMspPackageAttributes.cs
new
+14
@@ -0,0 +1,14 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ [Flags]
8
+ public enum WixBundleMspPackageAttributes
9
+ {
10
+ DisplayInternalUI = 0x1,
11
+ Slipstream = 0x2,
12
+ TargetUnspecified = 0x4,
13
+ }
14
+}
src/WixToolset.Data/Rows/WixBundleMspPackageRow.cs
new
+99
@@ -0,0 +1,99 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the ChainMspPackage table.
7
+ /// </summary>
8
+ public sealed class WixBundleMspPackageRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a ChainMspPackage row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixBundleMspPackage row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets or sets the raw MSP attributes of a patch.
41
+ /// </summary>
42
+ public WixBundleMspPackageAttributes Attributes
43
+ {
44
+ get { return (WixBundleMspPackageAttributes)this.Fields[1].Data; }
45
+ set { this.Fields[1].Data = value; }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Gets or sets the patch code.
50
+ /// </summary>
51
+ public string PatchCode
52
+ {
53
+ get { return (string)this.Fields[2].Data; }
54
+ set { this.Fields[2].Data = value; }
55
+ }
56
+
57
+ /// <summary>
58
+ /// Gets or sets the patch's manufacturer.
59
+ /// </summary>
60
+ public string Manufacturer
61
+ {
62
+ get { return (string)this.Fields[3].Data; }
63
+ set { this.Fields[3].Data = value; }
64
+ }
65
+
66
+ /// <summary>
67
+ /// Gets or sets the patch's xml.
68
+ /// </summary>
69
+ public string PatchXml
70
+ {
71
+ get { return (string)this.Fields[4].Data; }
72
+ set { this.Fields[4].Data = value; }
73
+ }
74
+
75
+ /// <summary>
76
+ /// Gets the display internal UI of a patch.
77
+ /// </summary>
78
+ public bool DisplayInternalUI
79
+ {
80
+ get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.DisplayInternalUI); }
81
+ }
82
+
83
+ /// <summary>
84
+ /// Gets whether to slipstream the patch.
85
+ /// </summary>
86
+ public bool Slipstream
87
+ {
88
+ get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.Slipstream); }
89
+ }
90
+
91
+ /// <summary>
92
+ /// Gets whether the patch targets an unspecified number of packages.
93
+ /// </summary>
94
+ public bool TargetUnspecified
95
+ {
96
+ get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.TargetUnspecified); }
97
+ }
98
+ }
99
+}
src/WixToolset.Data/Rows/WixBundleMsuPackageRow.cs
new
+57
@@ -0,0 +1,57 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixBundleMsuPackage table.
7
+ /// </summary>
8
+ public sealed class WixBundleMsuPackageRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixBundleMsuPackage row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixBundleMsuPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixBundleMsuPackage row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixBundleMsuPackageRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets or sets the detection condition the package.
41
+ /// </summary>
42
+ public string DetectCondition
43
+ {
44
+ get { return (string)this.Fields[1].Data; }
45
+ set { this.Fields[1].Data = value; }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Gets or sets the KB of the package.
50
+ /// </summary>
51
+ public string MsuKB
52
+ {
53
+ get { return (string)this.Fields[2].Data; }
54
+ set { this.Fields[2].Data = value; }
55
+ }
56
+ }
57
+}
src/WixToolset.Data/Rows/WixBundlePackageAttributes.cs
new
+13
@@ -0,0 +1,13 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ [Flags]
8
+ public enum WixBundlePackageAttributes
9
+ {
10
+ Permanent = 0x1,
11
+ Visible = 0x2,
12
+ }
13
+}
src/WixToolset.Data/Rows/WixBundlePackageCommandLineRow.cs
new
+82
@@ -0,0 +1,82 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// Specialization of a row for the WixBundlePackageCommandLine table.
9
+ /// </summary>
10
+ public class WixBundlePackageCommandLineRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixBundlePackageCommandLineRow 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 WixBundlePackageCommandLineRow row belongs to and should get its column definitions from.</param>
17
+ public WixBundlePackageCommandLineRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates an WixBundlePackageCommandLineRow 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 WixBundlePackageCommandLineRow row belongs to and should get its column definitions from.</param>
27
+ public WixBundlePackageCommandLineRow(SourceLineNumber sourceLineNumbers, Table table)
28
+ : base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the package identifier.
34
+ /// </summary>
35
+ /// <value>The package identifier.</value>
36
+ public string ChainPackageId
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 command-line argument for installation.
44
+ /// </summary>
45
+ /// <value>The command-line argument.</value>
46
+ public string InstallArgument
47
+ {
48
+ get { return (string)this.Fields[1].Data; }
49
+ set { this.Fields[1].Data = value; }
50
+ }
51
+
52
+ /// <summary>
53
+ /// Gets or sets the command-line argument for uninstallation.
54
+ /// </summary>
55
+ /// <value>The command-line argument.</value>
56
+ public string UninstallArgument
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 command-line argument for repair.
64
+ /// </summary>
65
+ /// <value>The command-line argument.</value>
66
+ public string RepairArgument
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 condition.
74
+ /// </summary>
75
+ /// <value>The condition.</value>
76
+ public string Condition
77
+ {
78
+ get { return (string)this.Fields[4].Data; }
79
+ set { this.Fields[4].Data = value; }
80
+ }
81
+ }
82
+}
src/WixToolset.Data/Rows/WixBundlePackageExitCodeRow.cs
new
+51
@@ -0,0 +1,51 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the ExitCode table.
7
+ /// </summary>
8
+ public class WixBundlePackageExitCodeRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a ExitCodeRow row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a ExitCodeRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ public int? Code
40
+ {
41
+ get { return (null == this.Fields[1].Data) ? (int?)null : (int?)this.Fields[1].Data; }
42
+ set { this.Fields[1].Data = value; }
43
+ }
44
+
45
+ public ExitCodeBehaviorType Behavior
46
+ {
47
+ get { return (ExitCodeBehaviorType)this.Fields[2].Data; }
48
+ set { this.Fields[2].Data = (int)value; }
49
+ }
50
+ }
51
+}
src/WixToolset.Data/Rows/WixBundlePackageRow.cs
new
+226
@@ -0,0 +1,226 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixBundlePackage table.
7
+ /// </summary>
8
+ public sealed class WixBundlePackageRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixBundlePackage row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixBundlePackage row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key to the WixChainItem.
32
+ /// </summary>
33
+ public string WixChainItemId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets or sets the item type.
41
+ /// </summary>
42
+ public WixBundlePackageType Type
43
+ {
44
+ get { return (WixBundlePackageType)this.Fields[1].Data; }
45
+ set { this.Fields[1].Data = (int)value; }
46
+ }
47
+
48
+ /// <summary>
49
+ /// Gets or sets the indentifier of the package's payload.
50
+ /// </summary>
51
+ public string PackagePayload
52
+ {
53
+ get { return (string)this.Fields[2].Data; }
54
+ set { this.Fields[2].Data = value; }
55
+ }
56
+
57
+ /// <summary>
58
+ /// Gets or sets the raw attributes of a package.
59
+ /// </summary>
60
+ public WixBundlePackageAttributes Attributes
61
+ {
62
+ get { return (WixBundlePackageAttributes)this.Fields[3].Data; }
63
+ set { this.Fields[3].Data = value; }
64
+ }
65
+
66
+ /// <summary>
67
+ /// Gets or sets the install condition of the package.
68
+ /// </summary>
69
+ public string InstallCondition
70
+ {
71
+ get { return (string)this.Fields[4].Data; }
72
+ set { this.Fields[4].Data = value; }
73
+ }
74
+
75
+ /// <summary>
76
+ /// Gets or sets the language of the package.
77
+ /// </summary>
78
+ public YesNoAlwaysType Cache
79
+ {
80
+ get { return (null == this.Fields[5].Data) ? YesNoAlwaysType.NotSet : (YesNoAlwaysType)this.Fields[5].Data; }
81
+ set { this.Fields[5].Data = (int)value; }
82
+ }
83
+
84
+ /// <summary>
85
+ /// Gets or sets the indentifier of the package's cache.
86
+ /// </summary>
87
+ public string CacheId
88
+ {
89
+ get { return (string)this.Fields[6].Data; }
90
+ set { this.Fields[6].Data = value; }
91
+ }
92
+
93
+ /// <summary>
94
+ /// Gets or sets whether the package is vital.
95
+ /// </summary>
96
+ public YesNoType Vital
97
+ {
98
+ get { return (null == this.Fields[7].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[7].Data; }
99
+ set { this.Fields[7].Data = (int)value; }
100
+ }
101
+
102
+ /// <summary>
103
+ /// Gets or sets whether the package is per-machine.
104
+ /// </summary>
105
+ public YesNoDefaultType PerMachine
106
+ {
107
+ get { return (null == this.Fields[8].Data) ? YesNoDefaultType.NotSet : (YesNoDefaultType)this.Fields[8].Data; }
108
+ set { this.Fields[8].Data = (int)value; }
109
+ }
110
+
111
+ /// <summary>
112
+ /// Gets or sets the variable that points to the log for the package.
113
+ /// </summary>
114
+ public string LogPathVariable
115
+ {
116
+ get { return (string)this.Fields[9].Data; }
117
+ set { this.Fields[9].Data = value; }
118
+ }
119
+
120
+ /// <summary>
121
+ /// Gets or sets the variable that points to the rollback log for the package.
122
+ /// </summary>
123
+ public string RollbackLogPathVariable
124
+ {
125
+ get { return (string)this.Fields[10].Data; }
126
+ set { this.Fields[10].Data = value; }
127
+ }
128
+
129
+ /// <summary>
130
+ /// Gets or sets the size of the package.
131
+ /// </summary>
132
+ public long Size
133
+ {
134
+ get { return (long)this.Fields[11].Data; }
135
+ set { this.Fields[11].Data = value; }
136
+ }
137
+
138
+ /// <summary>
139
+ /// Gets or sets the install size of the package.
140
+ /// </summary>
141
+ public long? InstallSize
142
+ {
143
+ get { return (long?)this.Fields[12].Data; }
144
+ set { this.Fields[12].Data = value; }
145
+ }
146
+
147
+ /// <summary>
148
+ /// Gets or sets the version of the package.
149
+ /// </summary>
150
+ public string Version
151
+ {
152
+ get { return (string)this.Fields[13].Data; }
153
+ set { this.Fields[13].Data = value; }
154
+ }
155
+
156
+ /// <summary>
157
+ /// Gets or sets the language of the package.
158
+ /// </summary>
159
+ public int Language
160
+ {
161
+ get { return (int)this.Fields[14].Data; }
162
+ set { this.Fields[14].Data = value; }
163
+ }
164
+
165
+ /// <summary>
166
+ /// Gets or sets the display name of the package.
167
+ /// </summary>
168
+ public string DisplayName
169
+ {
170
+ get { return (string)this.Fields[15].Data; }
171
+ set { this.Fields[15].Data = value; }
172
+ }
173
+
174
+ /// <summary>
175
+ /// Gets or sets the description of the package.
176
+ /// </summary>
177
+ public string Description
178
+ {
179
+ get { return (string)this.Fields[16].Data; }
180
+ set { this.Fields[16].Data = value; }
181
+ }
182
+
183
+ /// <summary>
184
+ /// Gets or sets the rollback boundary identifier for the package.
185
+ /// </summary>
186
+ public string RollbackBoundary
187
+ {
188
+ get { return (string)this.Fields[17].Data; }
189
+ set { this.Fields[17].Data = value; }
190
+ }
191
+
192
+ /// <summary>
193
+ /// Gets or sets the backward rollback boundary identifier for the package.
194
+ /// </summary>
195
+ public string RollbackBoundaryBackward
196
+ {
197
+ get { return (string)this.Fields[18].Data; }
198
+ set { this.Fields[18].Data = value; }
199
+ }
200
+
201
+ /// <summary>
202
+ /// Gets or sets whether the package is x64.
203
+ /// </summary>
204
+ public YesNoType x64
205
+ {
206
+ get { return (null == this.Fields[19].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[19].Data; }
207
+ set { this.Fields[19].Data = (int)value; }
208
+ }
209
+
210
+ /// <summary>
211
+ /// Gets whether the package is permanent.
212
+ /// </summary>
213
+ public bool Permanent
214
+ {
215
+ get { return 0 != (this.Attributes & WixBundlePackageAttributes.Permanent); }
216
+ }
217
+
218
+ /// <summary>
219
+ /// Gets whether the package is visible.
220
+ /// </summary>
221
+ public bool Visible
222
+ {
223
+ get { return 0 != (this.Attributes & WixBundlePackageAttributes.Visible); }
224
+ }
225
+ }
226
+}
src/WixToolset.Data/Rows/WixBundlePackageType.cs
new
+15
@@ -0,0 +1,15 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Types of bundle packages.
7
+ /// </summary>
8
+ public enum WixBundlePackageType
9
+ {
10
+ Exe,
11
+ Msi,
12
+ Msp,
13
+ Msu,
14
+ }
15
+}
src/WixToolset.Data/Rows/WixBundlePatchTargetCodeRow.cs
new
+81
@@ -0,0 +1,81 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using System.Text;
8
+
9
+ /// <summary>
10
+ /// Attributes for the PatchTargetCode table.
11
+ /// </summary>
12
+ [Flags]
13
+ public enum WixBundlePatchTargetCodeAttributes : int
14
+ {
15
+ None = 0,
16
+
17
+ /// <summary>
18
+ /// The transform targets a specific ProductCode.
19
+ /// </summary>
20
+ TargetsProductCode = 1,
21
+
22
+ /// <summary>
23
+ /// The transform targets a specific UpgradeCode.
24
+ /// </summary>
25
+ TargetsUpgradeCode = 2,
26
+ }
27
+
28
+ /// <summary>
29
+ /// Specialization of a row for the PatchTargetCode table.
30
+ /// </summary>
31
+ public class WixBundlePatchTargetCodeRow : Row
32
+ {
33
+ /// <summary>
34
+ /// Creates a PatchTargetCodeRow row that does not belong to a table.
35
+ /// </summary>
36
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
37
+ /// <param name="tableDef">TableDefinition this PatchTargetCode row belongs to and should get its column definitions from.</param>
38
+ public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
39
+ base(sourceLineNumbers, tableDef)
40
+ {
41
+ }
42
+
43
+ /// <summary>
44
+ /// Creates a PatchTargetCodeRow row that belongs to a table.
45
+ /// </summary>
46
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
47
+ /// <param name="table">Table this PatchTargetCode row belongs to and should get its column definitions from.</param>
48
+ public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, Table table) :
49
+ base(sourceLineNumbers, table)
50
+ {
51
+ }
52
+
53
+ public string MspPackageId
54
+ {
55
+ get { return (string)this.Fields[0].Data; }
56
+ set { this.Fields[0].Data = value; }
57
+ }
58
+
59
+ public string TargetCode
60
+ {
61
+ get { return (string)this.Fields[1].Data; }
62
+ set { this.Fields[1].Data = value; }
63
+ }
64
+
65
+ public WixBundlePatchTargetCodeAttributes Attributes
66
+ {
67
+ get { return (WixBundlePatchTargetCodeAttributes)this.Fields[2].Data; }
68
+ set { this.Fields[2].Data = (int)value; }
69
+ }
70
+
71
+ public bool TargetsProductCode
72
+ {
73
+ get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsProductCode & this.Attributes); }
74
+ }
75
+
76
+ public bool TargetsUpgradeCode
77
+ {
78
+ get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsUpgradeCode & this.Attributes); }
79
+ }
80
+ }
81
+}
src/WixToolset.Data/Rows/WixBundlePayloadRow.cs
new
+185
@@ -0,0 +1,185 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.IO;
7
+
8
+ /// <summary>
9
+ /// Specialization of a row for the PayloadInfo table.
10
+ /// </summary>
11
+ public class WixBundlePayloadRow : Row
12
+ {
13
+ /// <summary>
14
+ /// Creates a PayloadRow row that does not belong to a table.
15
+ /// </summary>
16
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
17
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
18
+ public WixBundlePayloadRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
19
+ base(sourceLineNumbers, tableDef)
20
+ {
21
+ }
22
+
23
+ /// <summary>
24
+ /// Creates a PayloadRow row that belongs to a table.
25
+ /// </summary>
26
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
27
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
28
+ public WixBundlePayloadRow(SourceLineNumber sourceLineNumbers, Table table) :
29
+ base(sourceLineNumbers, table)
30
+ {
31
+ }
32
+
33
+ public string Id
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ public string Name
40
+ {
41
+ get { return (string)this.Fields[1].Data; }
42
+ set { this.Fields[1].Data = value; }
43
+ }
44
+
45
+ public string SourceFile
46
+ {
47
+ get { return (string)this.Fields[2].Data; }
48
+ set { this.Fields[2].Data = value; }
49
+ }
50
+
51
+ public string DownloadUrl
52
+ {
53
+ get { return (string)this.Fields[3].Data; }
54
+ set { this.Fields[3].Data = value; }
55
+ }
56
+
57
+ public YesNoDefaultType Compressed
58
+ {
59
+ get { return (YesNoDefaultType)this.Fields[4].Data; }
60
+ set { this.Fields[4].Data = (int)value; }
61
+ }
62
+
63
+ public string UnresolvedSourceFile
64
+ {
65
+ get { return (string)this.Fields[5].Data; }
66
+ set { this.Fields[5].Data = value; }
67
+ }
68
+
69
+ public string DisplayName
70
+ {
71
+ get { return (string)this.Fields[6].Data; }
72
+ set { this.Fields[6].Data = value; }
73
+ }
74
+
75
+ public string Description
76
+ {
77
+ get { return (string)this.Fields[7].Data; }
78
+ set { this.Fields[7].Data = value; }
79
+ }
80
+
81
+ public bool EnableSignatureValidation
82
+ {
83
+ get { return (null != this.Fields[8].Data) && (1 == (int)this.Fields[8].Data); }
84
+ set { this.Fields[8].Data = value ? 1 : 0; }
85
+ }
86
+
87
+ public int FileSize
88
+ {
89
+ get { return (int)this.Fields[9].Data; }
90
+ set { this.Fields[9].Data = value; }
91
+ }
92
+
93
+ public string Version
94
+ {
95
+ get { return (string)this.Fields[10].Data; }
96
+ set { this.Fields[10].Data = value; }
97
+ }
98
+
99
+ public string Hash
100
+ {
101
+ get { return (string)this.Fields[11].Data; }
102
+ set { this.Fields[11].Data = value; }
103
+ }
104
+
105
+ public string PublicKey
106
+ {
107
+ get { return (string)this.Fields[12].Data; }
108
+ set { this.Fields[12].Data = value; }
109
+ }
110
+
111
+ public string Thumbprint
112
+ {
113
+ get { return (string)this.Fields[13].Data; }
114
+ set { this.Fields[13].Data = value; }
115
+ }
116
+
117
+ public string Catalog
118
+ {
119
+ get { return (string)this.Fields[14].Data; }
120
+ set { this.Fields[14].Data = value; }
121
+ }
122
+
123
+ public string Container
124
+ {
125
+ get { return (string)this.Fields[15].Data; }
126
+ set { this.Fields[15].Data = value; }
127
+ }
128
+
129
+ public string Package
130
+ {
131
+ get { return (string)this.Fields[16].Data; }
132
+ set { this.Fields[16].Data = value; }
133
+ }
134
+
135
+ public bool ContentFile
136
+ {
137
+ get { return (null != this.Fields[17].Data) && (1 == (int)this.Fields[17].Data); }
138
+ set { this.Fields[17].Data = value ? 1 : 0; }
139
+ }
140
+
141
+ public string EmbeddedId
142
+ {
143
+ get { return (string)this.Fields[18].Data; }
144
+ set { this.Fields[18].Data = value; }
145
+ }
146
+
147
+ public bool LayoutOnly
148
+ {
149
+ get { return (null != this.Fields[19].Data) && (1 == (int)this.Fields[19].Data); }
150
+ set { this.Fields[19].Data = value ? 1 : 0; }
151
+ }
152
+
153
+ public PackagingType Packaging
154
+ {
155
+ get
156
+ {
157
+ object data = this.Fields[20].Data;
158
+ return (null == data) ? PackagingType.Unknown : (PackagingType)data;
159
+ }
160
+
161
+ set
162
+ {
163
+ if (PackagingType.Unknown == value)
164
+ {
165
+ this.Fields[20].Data = null;
166
+ }
167
+ else
168
+ {
169
+ this.Fields[20].Data = (int)value;
170
+ }
171
+ }
172
+ }
173
+
174
+ public string ParentPackagePayload
175
+ {
176
+ get { return (string)this.Fields[21].Data; }
177
+ set { this.Fields[21].Data = value; }
178
+ }
179
+
180
+ public string FullFileName
181
+ {
182
+ get { return String.IsNullOrEmpty(this.SourceFile) ? String.Empty : Path.GetFullPath(this.SourceFile); }
183
+ }
184
+ }
185
+}
src/WixToolset.Data/Rows/WixBundleRelatedPackageRow.cs
new
+87
@@ -0,0 +1,87 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the RelatedPackage table.
7
+ /// </summary>
8
+ public class WixBundleRelatedPackageRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a RelatedPackageRow row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixBundleRelatedPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a RelatedPackageRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixBundleRelatedPackageRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ public string Id
40
+ {
41
+ get { return (string)this.Fields[1].Data; }
42
+ set { this.Fields[1].Data = value; }
43
+ }
44
+
45
+ public string MinVersion
46
+ {
47
+ get { return (string)this.Fields[2].Data; }
48
+ set { this.Fields[2].Data = value; }
49
+ }
50
+
51
+ public string MaxVersion
52
+ {
53
+ get { return (string)this.Fields[3].Data; }
54
+ set { this.Fields[3].Data = value; }
55
+ }
56
+
57
+ public string Languages
58
+ {
59
+ get { return (string)this.Fields[4].Data; }
60
+ set { this.Fields[4].Data = value; }
61
+ }
62
+
63
+ public bool MinInclusive
64
+ {
65
+ get { return 1 == (int)this.Fields[5].Data; }
66
+ set { this.Fields[5].Data = value ? 1 : 0; }
67
+ }
68
+
69
+ public bool MaxInclusive
70
+ {
71
+ get { return 1 == (int)this.Fields[6].Data; }
72
+ set { this.Fields[6].Data = value ? 1 : 0; }
73
+ }
74
+
75
+ public bool LangInclusive
76
+ {
77
+ get { return 1 == (int)this.Fields[7].Data; }
78
+ set { this.Fields[7].Data = value ? 1 : 0; }
79
+ }
80
+
81
+ public bool OnlyDetect
82
+ {
83
+ get { return 1 == (int)this.Fields[8].Data; }
84
+ set { this.Fields[8].Data = value ? 1 : 0; }
85
+ }
86
+ }
87
+}
src/WixToolset.Data/Rows/WixBundleRollbackBoundaryRow.cs
new
+59
@@ -0,0 +1,59 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixBundleRollbackBoundary table.
7
+ /// </summary>
8
+ public sealed class WixBundleRollbackBoundaryRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixBundleRollbackBoundary row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixBundleRollbackBoundaryRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a RollbackBoundaryRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixBundleRollbackBoundaryRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets or sets whether the package is vital.
41
+ /// </summary>
42
+ /// <value>Vitality of the package.</value>
43
+ public YesNoType Vital
44
+ {
45
+ get { return (null == this.Fields[1].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[1].Data; }
46
+ set { this.Fields[1].Data = (int)value; }
47
+ }
48
+
49
+ /// <summary>
50
+ /// Gets or sets whether the rollback-boundary should be installed as an MSI transaction.
51
+ /// </summary>
52
+ /// <value>Vitality of the package.</value>
53
+ public YesNoType Transaction
54
+ {
55
+ get { return (null == this.Fields[2].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[2].Data; }
56
+ set { this.Fields[2].Data = (int)value; }
57
+ }
58
+ }
59
+}
src/WixToolset.Data/Rows/WixBundleRow.cs
new
+228
@@ -0,0 +1,228 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// Bundle info for binding Bundles.
9
+ /// </summary>
10
+ public class WixBundleRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixBundleRow 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 WixBundleRow row belongs to and should get its column definitions from.</param>
17
+ public WixBundleRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixBundleRow 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 WixBundleRow row belongs to and should get its column definitions from.</param>
27
+ public WixBundleRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ public string Version
33
+ {
34
+ get { return (string)this.Fields[0].Data; }
35
+ set { this.Fields[0].Data = value; }
36
+ }
37
+
38
+ public string Copyright
39
+ {
40
+ get { return (string)this.Fields[1].Data; }
41
+ set { this.Fields[1].Data = value; }
42
+ }
43
+
44
+ public string Name
45
+ {
46
+ get { return (string)this.Fields[2].Data; }
47
+ set { this.Fields[2].Data = value; }
48
+ }
49
+
50
+ public string AboutUrl
51
+ {
52
+ get { return (string)this.Fields[3].Data; }
53
+ set { this.Fields[3].Data = value; }
54
+ }
55
+
56
+ public int DisableModify
57
+ {
58
+ get { return (null == this.Fields[4].Data) ? 0 : (int)this.Fields[4].Data; }
59
+ set { this.Fields[4].Data = value; }
60
+ }
61
+
62
+ public bool DisableRemove
63
+ {
64
+ get { return (null != this.Fields[5].Data && 0 != (int)this.Fields[5].Data); }
65
+ set { this.Fields[5].Data = value ? 1 : 0; }
66
+ }
67
+
68
+ // There is no 6. It used to be DisableRepair.
69
+
70
+ public string HelpTelephone
71
+ {
72
+ get { return (string)this.Fields[7].Data; }
73
+ set { this.Fields[7].Data = value; }
74
+ }
75
+
76
+ public string HelpLink
77
+ {
78
+ get { return (string)this.Fields[8].Data; }
79
+ set { this.Fields[8].Data = value; }
80
+ }
81
+
82
+ public string Publisher
83
+ {
84
+ get { return (string)this.Fields[9].Data; }
85
+ set { this.Fields[9].Data = value; }
86
+ }
87
+
88
+ public string UpdateUrl
89
+ {
90
+ get { return (string)this.Fields[10].Data; }
91
+ set { this.Fields[10].Data = value; }
92
+ }
93
+
94
+ public YesNoDefaultType Compressed
95
+ {
96
+ get { return (null == this.Fields[11].Data) ? YesNoDefaultType.Default : (0 == (int)this.Fields[11].Data) ? YesNoDefaultType.No : YesNoDefaultType.Yes; }
97
+ set { this.Fields[11].Data = (int)value; }
98
+ }
99
+
100
+ public PackagingType DefaultPackagingType
101
+ {
102
+ get { return (YesNoDefaultType.No == this.Compressed) ? PackagingType.External : PackagingType.Embedded; }
103
+ }
104
+
105
+ public string LogPathPrefixExtension
106
+ {
107
+ get { return (string)this.Fields[12].Data ?? String.Empty; }
108
+ set { this.Fields[12].Data = value; }
109
+ }
110
+
111
+ public string LogPathVariable
112
+ {
113
+ get
114
+ {
115
+ string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':');
116
+ return logVariableAndPrefixExtension[0];
117
+ }
118
+ }
119
+
120
+ public string LogPrefix
121
+ {
122
+ get
123
+ {
124
+ string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':');
125
+ if (2 > logVariableAndPrefixExtension.Length)
126
+ {
127
+ return String.Empty;
128
+ }
129
+ string logPrefixAndExtension = logVariableAndPrefixExtension[1];
130
+ int extensionIndex = logPrefixAndExtension.LastIndexOf('.');
131
+ return logPrefixAndExtension.Substring(0, extensionIndex);
132
+ }
133
+ }
134
+
135
+ public string LogExtension
136
+ {
137
+ get
138
+ {
139
+ string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':');
140
+ if (2 > logVariableAndPrefixExtension.Length)
141
+ {
142
+ return String.Empty;
143
+ }
144
+ string logPrefixAndExtension = logVariableAndPrefixExtension[1];
145
+ int extensionIndex = logPrefixAndExtension.LastIndexOf('.');
146
+ return logPrefixAndExtension.Substring(extensionIndex + 1);
147
+ }
148
+ }
149
+
150
+ public string IconPath
151
+ {
152
+ get { return (string)this.Fields[13].Data; }
153
+ set { this.Fields[13].Data = value; }
154
+ }
155
+
156
+ public string SplashScreenBitmapPath
157
+ {
158
+ get { return (string)this.Fields[14].Data; }
159
+ set { this.Fields[14].Data = value; }
160
+ }
161
+
162
+ public string Condition
163
+ {
164
+ get { return (string)this.Fields[15].Data; }
165
+ set { this.Fields[15].Data = value; }
166
+ }
167
+
168
+ public string Tag
169
+ {
170
+ get { return (string)this.Fields[16].Data; }
171
+ set { this.Fields[16].Data = value; }
172
+ }
173
+
174
+ public Platform Platform
175
+ {
176
+ get { return (Platform)Enum.Parse(typeof(Platform), (string)this.Fields[17].Data); }
177
+ set { this.Fields[17].Data = value.ToString(); }
178
+ }
179
+
180
+ public string ParentName
181
+ {
182
+ get { return (string)this.Fields[18].Data; }
183
+ set { this.Fields[18].Data = value; }
184
+ }
185
+
186
+ public string UpgradeCode
187
+ {
188
+ get { return (string)this.Fields[19].Data; }
189
+ set { this.Fields[19].Data = value; }
190
+ }
191
+
192
+ public Guid BundleId
193
+ {
194
+ get
195
+ {
196
+ if (null == this.Fields[20].Data)
197
+ {
198
+ this.Fields[20].Data = Guid.NewGuid().ToString("B");
199
+ }
200
+
201
+ return new Guid((string)this.Fields[20].Data);
202
+ }
203
+
204
+ set { this.Fields[20].Data = value.ToString(); }
205
+ }
206
+
207
+ public string ProviderKey
208
+ {
209
+ get
210
+ {
211
+ if (null == this.Fields[21].Data)
212
+ {
213
+ this.Fields[21].Data = this.BundleId.ToString("B");
214
+ }
215
+
216
+ return (string)this.Fields[21].Data;
217
+ }
218
+
219
+ set { this.Fields[21].Data = value; }
220
+ }
221
+
222
+ public bool PerMachine
223
+ {
224
+ get { return (null != this.Fields[22].Data && 0 != (int)this.Fields[22].Data); }
225
+ set { this.Fields[22].Data = value ? 1 : 0; }
226
+ }
227
+ }
228
+}
src/WixToolset.Data/Rows/WixBundleSlipstreamMspRow.cs
new
+48
@@ -0,0 +1,48 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the SlipstreamMsp table.
7
+ /// </summary>
8
+ public class WixBundleSlipstreamMspRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a SlipstreamMspRow row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixBundleSlipstreamMspRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a SlipstreamMspRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixBundleSlipstreamMspRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
32
+ /// </summary>
33
+ public string ChainPackageId
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets or sets the foreign key identifier to the ChainPackage row for the MSP package.
41
+ /// </summary>
42
+ public string MspPackageId
43
+ {
44
+ get { return (string)this.Fields[1].Data; }
45
+ set { this.Fields[1].Data = value; }
46
+ }
47
+ }
48
+}
src/WixToolset.Data/Rows/WixBundleUpdateRow.cs
new
+38
@@ -0,0 +1,38 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// Bundle update info for binding Bundles.
9
+ /// </summary>
10
+ public class WixBundleUpdateRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixBundleUpdateRow 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 WixBundleUpdateRow row belongs to and should get its column definitions from.</param>
17
+ public WixBundleUpdateRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixBundleUpdateRow 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 WixBundleUpdateRow row belongs to and should get its column definitions from.</param>
27
+ public WixBundleUpdateRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ public string Location
33
+ {
34
+ get { return (string)this.Fields[0].Data; }
35
+ set { this.Fields[0].Data = value; }
36
+ }
37
+ }
38
+}
src/WixToolset.Data/Rows/WixBundleVariableRow.cs
new
+80
@@ -0,0 +1,80 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the Variable table.
7
+ /// </summary>
8
+ public sealed class WixBundleVariableRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a Variable row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a Variable row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, Table table)
26
+ : base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the variable identifier.
32
+ /// </summary>
33
+ /// <value>The variable identifier.</value>
34
+ public string Id
35
+ {
36
+ get { return (string)this.Fields[0].Data; }
37
+ set { this.Fields[0].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the variable's value.
42
+ /// </summary>
43
+ /// <value>The variable's value.</value>
44
+ public string Value
45
+ {
46
+ get { return (string)this.Fields[1].Data; }
47
+ set { this.Fields[1].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the variable's type.
52
+ /// </summary>
53
+ /// <value>The variable's type.</value>
54
+ public string Type
55
+ {
56
+ get { return (string)this.Fields[2].Data; }
57
+ set { this.Fields[2].Data = value; }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets or sets whether this variable is hidden.
62
+ /// </summary>
63
+ /// <value>Whether this variable is hidden.</value>
64
+ public bool Hidden
65
+ {
66
+ get { return (null == this.Fields[3].Data || 0 == ((int)this.Fields[3].Data)) ? false : true; }
67
+ set { this.Fields[3].Data = value ? 1 : 0; }
68
+ }
69
+
70
+ /// <summary>
71
+ /// Gets or sets whether this variable is persisted.
72
+ /// </summary>
73
+ /// <value>Whether this variable is persisted.</value>
74
+ public bool Persisted
75
+ {
76
+ get { return (null == this.Fields[4].Data || 0 == ((int)this.Fields[4].Data)) ? false : true; }
77
+ set { this.Fields[4].Data = value ? 1 : 0; }
78
+ }
79
+ }
80
+}
src/WixToolset.Data/Rows/WixChainAttributes.cs
new
+15
@@ -0,0 +1,15 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ [Flags]
8
+ public enum WixChainAttributes
9
+ {
10
+ None = 0x0,
11
+ DisableRollback = 0x1,
12
+ DisableSystemRestore = 0x2,
13
+ ParallelCache = 0x4,
14
+ }
15
+}
src/WixToolset.Data/Rows/WixChainItemRow.cs
new
+39
@@ -0,0 +1,39 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixChainItem table.
7
+ /// </summary>
8
+ public sealed class WixChainItemRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixChainItem row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this ChainItem row belongs to and should get its column definitions from.</param>
15
+ public WixChainItemRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixChainItem row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this ChainItem row belongs to and should get its column definitions from.</param>
25
+ public WixChainItemRow(SourceLineNumber sourceLineNumbers, Table table)
26
+ : base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the WixChainItem identifier.
32
+ /// </summary>
33
+ public string Id
34
+ {
35
+ get { return (string)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+ }
39
+}
src/WixToolset.Data/Rows/WixChainRow.cs
new
+63
@@ -0,0 +1,63 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixChain table.
7
+ /// </summary>
8
+ public sealed class WixChainRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixChain row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixChainRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixChainRow row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixChainRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the raw chain attributes.
32
+ /// </summary>
33
+ public WixChainAttributes Attributes
34
+ {
35
+ get { return (WixChainAttributes)this.Fields[0].Data; }
36
+ set { this.Fields[0].Data = value; }
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets the disable rollback state of a chain.
41
+ /// </summary>
42
+ public bool DisableRollback
43
+ {
44
+ get { return 0 != (this.Attributes & WixChainAttributes.DisableRollback); }
45
+ }
46
+
47
+ /// <summary>
48
+ /// Gets disable system restore state of a chain.
49
+ /// </summary>
50
+ public bool DisableSystemRestore
51
+ {
52
+ get { return 0 != (this.Attributes & WixChainAttributes.DisableSystemRestore); }
53
+ }
54
+
55
+ /// <summary>
56
+ /// Gets parallel cache of a chain.
57
+ /// </summary>
58
+ public bool ParallelCache
59
+ {
60
+ get { return 0 != (this.Attributes & WixChainAttributes.ParallelCache); }
61
+ }
62
+ }
63
+}
src/WixToolset.Data/Rows/WixComplexReferenceRow.cs
new
+208
@@ -0,0 +1,208 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Diagnostics;
7
+ using System.Diagnostics.CodeAnalysis;
8
+ using System.Xml;
9
+
10
+ /// <summary>
11
+ /// Specialization of a row for the WixComplexReference table.
12
+ /// </summary>
13
+ public sealed class WixComplexReferenceRow : Row, IComparable
14
+ {
15
+ /// <summary>
16
+ /// Creates a WixComplexReferenceRow row that belongs to a table.
17
+ /// </summary>
18
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
19
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
20
+ public WixComplexReferenceRow(SourceLineNumber sourceLineNumbers, Table table)
21
+ : base(sourceLineNumbers, table)
22
+ {
23
+ }
24
+
25
+ /// <summary>
26
+ /// Gets the parent type of the complex reference.
27
+ /// </summary>
28
+ /// <value>Parent type of the complex reference.</value>
29
+ public ComplexReferenceParentType ParentType
30
+ {
31
+ get { return (ComplexReferenceParentType)Enum.ToObject(typeof(ComplexReferenceParentType), (int)this.Fields[1].Data); }
32
+ set { this.Fields[1].Data = (int)value; }
33
+ }
34
+
35
+ /// <summary>
36
+ /// Gets or sets the parent identifier of the complex reference.
37
+ /// </summary>
38
+ /// <value>Parent identifier of the complex reference.</value>
39
+ public string ParentId
40
+ {
41
+ get { return (string)this.Fields[0].Data; }
42
+ set { this.Fields[0].Data = value; }
43
+ }
44
+
45
+ /// <summary>
46
+ /// Gets the parent language of the complex reference.
47
+ /// </summary>
48
+ /// <value>Parent language of the complex reference.</value>
49
+ public string ParentLanguage
50
+ {
51
+ get { return (string)this.Fields[2].Data; }
52
+ set { this.Fields[2].Data = value; }
53
+ }
54
+
55
+ /// <summary>
56
+ /// Gets the child type of the complex reference.
57
+ /// </summary>
58
+ /// <value>Child type of the complex reference.</value>
59
+ public ComplexReferenceChildType ChildType
60
+ {
61
+ get { return (ComplexReferenceChildType)Enum.ToObject(typeof(ComplexReferenceChildType), (int)this.Fields[4].Data); }
62
+ set { this.Fields[4].Data = (int)value; }
63
+ }
64
+
65
+ /// <summary>
66
+ /// Gets the child identifier of the complex reference.
67
+ /// </summary>
68
+ /// <value>Child identifier of the complex reference.</value>
69
+ public string ChildId
70
+ {
71
+ get { return (string)this.Fields[3].Data; }
72
+ set { this.Fields[3].Data = value; }
73
+ }
74
+
75
+ /// <summary>
76
+ /// Gets if this is the primary complex reference.
77
+ /// </summary>
78
+ /// <value>true if primary complex reference.</value>
79
+ public bool IsPrimary
80
+ {
81
+ get
82
+ {
83
+ return (0x1 == ((int)this.Fields[5].Data & 0x1));
84
+ }
85
+
86
+ set
87
+ {
88
+ if (null == this.Fields[5].Data)
89
+ {
90
+ this.Fields[5].Data = 0;
91
+ }
92
+
93
+ if (value)
94
+ {
95
+ this.Fields[5].Data = (int)this.Fields[5].Data | 0x1;
96
+ }
97
+ else
98
+ {
99
+ this.Fields[5].Data = (int)this.Fields[5].Data & ~0x1;
100
+ }
101
+ }
102
+ }
103
+
104
+ /// <summary>
105
+ /// Determines if two complex references are equivalent.
106
+ /// </summary>
107
+ /// <param name="obj">Complex reference to compare.</param>
108
+ /// <returns>True if complex references are equivalent.</returns>
109
+ public override bool Equals(object obj)
110
+ {
111
+ return 0 == this.CompareTo(obj);
112
+ }
113
+
114
+ /// <summary>
115
+ /// Gets the hash code for the complex reference.
116
+ /// </summary>
117
+ /// <returns>Hash code for the complex reference.</returns>
118
+ public override int GetHashCode()
119
+ {
120
+ return this.ChildType.GetHashCode() ^ this.ChildId.GetHashCode() ^ this.ParentType.GetHashCode() ^ this.ParentLanguage.GetHashCode() ^ this.ParentId.GetHashCode() ^ this.IsPrimary.GetHashCode();
121
+ }
122
+
123
+ /// <summary>
124
+ /// Compares two complex references.
125
+ /// </summary>
126
+ /// <param name="obj">Complex reference to compare to.</param>
127
+ /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns>
128
+ public int CompareTo(object obj)
129
+ {
130
+ int comparison = this.CompareToWithoutConsideringPrimary(obj);
131
+ if (0 == comparison)
132
+ {
133
+ comparison = ((WixComplexReferenceRow)obj).IsPrimary.CompareTo(this.IsPrimary); // Note: the order of these is purposely switched to ensure that "Yes" is lower than "No" and "NotSet"
134
+ }
135
+ return comparison;
136
+ }
137
+
138
+ /// <summary>
139
+ /// Compares two complex references without considering the primary bit.
140
+ /// </summary>
141
+ /// <param name="obj">Complex reference to compare to.</param>
142
+ /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns>
143
+ [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.ArgumentException.#ctor(System.String,System.String)")]
144
+ public int CompareToWithoutConsideringPrimary(object obj)
145
+ {
146
+ WixComplexReferenceRow other = obj as WixComplexReferenceRow;
147
+ if (null == other)
148
+ {
149
+ throw new ArgumentException(WixDataStrings.EXP_ExpectedComplexReferenceType, "obj");
150
+ }
151
+
152
+ int comparison = this.ChildType - other.ChildType;
153
+ if (0 == comparison)
154
+ {
155
+ comparison = String.Compare(this.ChildId, other.ChildId, StringComparison.Ordinal);
156
+ if (0 == comparison)
157
+ {
158
+ comparison = this.ParentType - other.ParentType;
159
+ if (0 == comparison)
160
+ {
161
+ string thisParentLanguage = null == this.ParentLanguage ? String.Empty : this.ParentLanguage;
162
+ string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage;
163
+ comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal);
164
+ if (0 == comparison)
165
+ {
166
+ comparison = String.Compare(this.ParentId, other.ParentId, StringComparison.Ordinal);
167
+ }
168
+ }
169
+ }
170
+ }
171
+
172
+ return comparison;
173
+ }
174
+
175
+ /// <summary>
176
+ /// Creates a shallow copy of the ComplexReference.
177
+ /// </summary>
178
+ /// <returns>A shallow copy of the ComplexReference.</returns>
179
+ public WixComplexReferenceRow Clone()
180
+ {
181
+ WixComplexReferenceRow wixComplexReferenceRow = new WixComplexReferenceRow(this.SourceLineNumbers, this.Table);
182
+ wixComplexReferenceRow.ParentType = this.ParentType;
183
+ wixComplexReferenceRow.ParentId = this.ParentId;
184
+ wixComplexReferenceRow.ParentLanguage = this.ParentLanguage;
185
+ wixComplexReferenceRow.ChildType = this.ChildType;
186
+ wixComplexReferenceRow.ChildId = this.ChildId;
187
+ wixComplexReferenceRow.IsPrimary = this.IsPrimary;
188
+
189
+ return wixComplexReferenceRow;
190
+ }
191
+
192
+ /// <summary>
193
+ /// Changes all of the parent references to point to the passed in parent reference.
194
+ /// </summary>
195
+ /// <param name="parent">New parent complex reference.</param>
196
+ public void Reparent(WixComplexReferenceRow parent)
197
+ {
198
+ this.ParentId = parent.ParentId;
199
+ this.ParentLanguage = parent.ParentLanguage;
200
+ this.ParentType = parent.ParentType;
201
+
202
+ if (!this.IsPrimary)
203
+ {
204
+ this.IsPrimary = parent.IsPrimary;
205
+ }
206
+ }
207
+ }
208
+}
src/WixToolset.Data/Rows/WixDeltaPatchFileRow.cs
new
+142
@@ -0,0 +1,142 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixDeltaPatchFile table.
7
+ /// </summary>
8
+ public sealed class WixDeltaPatchFileRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixDeltaPatchFile row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixDeltaPatchFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixDeltaPatchFile row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this File row belongs to and should get its column definitions from.</param>
25
+ public WixDeltaPatchFileRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the primary key of the file row.
32
+ /// </summary>
33
+ /// <value>Primary key of the file row.</value>
34
+ public string File
35
+ {
36
+ get { return (string)this.Fields[0].Data; }
37
+ set { this.Fields[0].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the delta patch retain-length list for the file.
42
+ /// </summary>
43
+ /// <value>RetainLength list for the file.</value>
44
+ public string RetainLengths
45
+ {
46
+ get { return (string)this.Fields[1].Data; }
47
+ set { this.Fields[1].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the previous delta patch retain-length list for the file.
52
+ /// </summary>
53
+ /// <value>Previous RetainLength list for the file.</value>
54
+ public string PreviousRetainLengths
55
+ {
56
+ get { return this.Fields[1].PreviousData; }
57
+ set { this.Fields[1].PreviousData = value; }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets or sets the delta patch ignore-offset list for the file.
62
+ /// </summary>
63
+ /// <value>IgnoreOffset list for the file.</value>
64
+ public string IgnoreOffsets
65
+ {
66
+ get { return (string)this.Fields[2].Data; }
67
+ set { this.Fields[2].Data = value; }
68
+ }
69
+
70
+ /// <summary>
71
+ /// Gets or sets the previous delta patch ignore-offset list for the file.
72
+ /// </summary>
73
+ /// <value>Previous IgnoreOffset list for the file.</value>
74
+ public string PreviousIgnoreOffsets
75
+ {
76
+ get { return this.Fields[2].PreviousData; }
77
+ set { this.Fields[2].PreviousData = value; }
78
+ }
79
+
80
+ /// <summary>
81
+ /// Gets or sets the delta patch ignore-length list for the file.
82
+ /// </summary>
83
+ /// <value>IgnoreLength list for the file.</value>
84
+ public string IgnoreLengths
85
+ {
86
+ get { return (string)this.Fields[3].Data; }
87
+ set { this.Fields[3].Data = value; }
88
+ }
89
+
90
+ /// <summary>
91
+ /// Gets or sets the previous delta patch ignore-length list for the file.
92
+ /// </summary>
93
+ /// <value>Previous IgnoreLength list for the file.</value>
94
+ public string PreviousIgnoreLengths
95
+ {
96
+ get { return this.Fields[3].PreviousData; }
97
+ set { this.Fields[3].PreviousData = value; }
98
+ }
99
+
100
+ /// <summary>
101
+ /// Gets or sets the delta patch retain-offset list for the file.
102
+ /// </summary>
103
+ /// <value>RetainOffset list for the file.</value>
104
+ public string RetainOffsets
105
+ {
106
+ get { return (string)this.Fields[4].Data; }
107
+ set { this.Fields[4].Data = value; }
108
+ }
109
+
110
+ /// <summary>
111
+ /// Gets or sets the previous delta patch retain-offset list for the file.
112
+ /// </summary>
113
+ /// <value>PreviousRetainOffset list for the file.</value>
114
+ public string PreviousRetainOffsets
115
+ {
116
+ get { return this.Fields[4].PreviousData; }
117
+ set { this.Fields[4].PreviousData = value; }
118
+ }
119
+
120
+ /// <summary>
121
+ /// Gets or sets the symbol paths for the file.
122
+ /// </summary>
123
+ /// <value>SymbolPath list for the file.</value>
124
+ /// <remarks>This is set during binding.</remarks>
125
+ public string Symbols
126
+ {
127
+ get { return (string)this.Fields[5].Data; }
128
+ set { this.Fields[5].Data = value; }
129
+ }
130
+
131
+ /// <summary>
132
+ /// Gets or sets the previous symbol paths for the file.
133
+ /// </summary>
134
+ /// <value>PreviousSymbolPath list for the file.</value>
135
+ /// <remarks>This is set during binding.</remarks>
136
+ public string PreviousSymbols
137
+ {
138
+ get { return (string)this.Fields[5].PreviousData; }
139
+ set { this.Fields[5].PreviousData = value; }
140
+ }
141
+ }
142
+}
src/WixToolset.Data/Rows/WixDeltaPatchSymbolPathsRow.cs
new
+58
@@ -0,0 +1,58 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixDeltaPatchSymbolPaths table.
7
+ /// </summary>
8
+ public sealed class WixDeltaPatchSymbolPathsRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixDeltaPatchSymbolPaths row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixDeltaPatchSymbolPathsRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixDeltaPatchSymbolPaths row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixDeltaPatchSymbolPathsRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the identifier the symbol paths apply to.
32
+ /// </summary>
33
+ /// <value>RetainLength list for the file.</value>
34
+ public string Id
35
+ {
36
+ get { return (string)this.Fields[0].Data; }
37
+ set { this.Fields[0].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the type of the identifier.
42
+ /// </summary>
43
+ public SymbolPathType Type
44
+ {
45
+ get { return (SymbolPathType)this.Fields[1].AsInteger(); }
46
+ set { this.Fields[1].Data = value; }
47
+ }
48
+
49
+ /// <summary>
50
+ /// Gets or sets the delta patch symbol paths.
51
+ /// </summary>
52
+ public string SymbolPaths
53
+ {
54
+ get { return (string)this.Fields[2].Data; }
55
+ set { this.Fields[2].Data = value; }
56
+ }
57
+ }
58
+}
src/WixToolset.Data/Rows/WixFileRow.cs
new
+161
@@ -0,0 +1,161 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixFile table.
7
+ /// </summary>
8
+ public sealed class WixFileRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixFile row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
15
+ public WixFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixFile row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
25
+ public WixFileRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the primary key of the file row.
32
+ /// </summary>
33
+ /// <value>Primary key of the file row.</value>
34
+ public string File
35
+ {
36
+ get { return (string)this.Fields[0].Data; }
37
+ set { this.Fields[0].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the assembly type of the file row.
42
+ /// </summary>
43
+ /// <value>Assembly type of the file row.</value>
44
+ public FileAssemblyType AssemblyType
45
+ {
46
+ get { return (null == this.Fields[1]) ? FileAssemblyType.NotAnAssembly : (FileAssemblyType)this.Fields[1].AsInteger(); }
47
+ set { this.Fields[1].Data = (int)value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the identifier for the assembly manifest.
52
+ /// </summary>
53
+ /// <value>Identifier for the assembly manifest.</value>
54
+ public string AssemblyManifest
55
+ {
56
+ get { return (string)this.Fields[2].Data; }
57
+ set { this.Fields[2].Data = value; }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets or sets the application for the assembly.
62
+ /// </summary>
63
+ /// <value>Application for the assembly.</value>
64
+ public string AssemblyApplication
65
+ {
66
+ get { return (string)this.Fields[3].Data; }
67
+ set { this.Fields[3].Data = value; }
68
+ }
69
+
70
+ /// <summary>
71
+ /// Gets or sets the directory of the file.
72
+ /// </summary>
73
+ /// <value>Directory of the file.</value>
74
+ public string Directory
75
+ {
76
+ get { return (string)this.Fields[4].Data; }
77
+ set { this.Fields[4].Data = value; }
78
+ }
79
+
80
+ /// <summary>
81
+ /// Gets or sets the disk id for this file.
82
+ /// </summary>
83
+ /// <value>Disk id for the file.</value>
84
+ public int DiskId
85
+ {
86
+ get { return (int)this.Fields[5].Data; }
87
+ set { this.Fields[5].Data = value; }
88
+ }
89
+
90
+ /// <summary>
91
+ /// Gets or sets the source location to the file.
92
+ /// </summary>
93
+ /// <value>Source location to the file.</value>
94
+ public string Source
95
+ {
96
+ get { return (string)this.Fields[6].Data; }
97
+ set { this.Fields[6].Data = value; }
98
+ }
99
+
100
+ /// <summary>
101
+ /// Gets or sets the source location to the file.
102
+ /// </summary>
103
+ /// <value>Source location to the file.</value>
104
+ public string PreviousSource
105
+ {
106
+ get { return (string)this.Fields[6].PreviousData; }
107
+ set { this.Fields[6].PreviousData = value; }
108
+ }
109
+
110
+ /// <summary>
111
+ /// Gets or sets the architecture the file executes on.
112
+ /// </summary>
113
+ /// <value>Architecture the file executes on.</value>
114
+ public string ProcessorArchitecture
115
+ {
116
+ get { return (string)this.Fields[7].Data; }
117
+ set { this.Fields[7].Data = value; }
118
+ }
119
+
120
+ /// <summary>
121
+ /// Gets or sets the patch group of a patch-added file.
122
+ /// </summary>
123
+ /// <value>The patch group of a patch-added file.</value>
124
+ public int PatchGroup
125
+ {
126
+ get { return (null == this.Fields[8].Data) ? 0 : (int)this.Fields[8].Data; }
127
+ set { this.Fields[8].Data = value; }
128
+ }
129
+
130
+ /// <summary>
131
+ /// Gets or sets the attributes on a file.
132
+ /// </summary>
133
+ /// <value>Attributes on a file.</value>
134
+ public int Attributes
135
+ {
136
+ get { return (int)this.Fields[9].Data; }
137
+ set { this.Fields[9].Data = value; }
138
+ }
139
+
140
+ /// <summary>
141
+ /// Gets or sets the patching attributes to the file.
142
+ /// </summary>
143
+ /// <value>Patching attributes of the file.</value>
144
+ public PatchAttributeType PatchAttributes
145
+ {
146
+ get { return (PatchAttributeType)this.Fields[10].AsInteger(); }
147
+ set { this.Fields[10].Data = (int)value; }
148
+ }
149
+
150
+ /// <summary>
151
+ /// Gets or sets the path to the delta patch header.
152
+ /// </summary>
153
+ /// <value>Patch header path.</value>
154
+ /// <remarks>Set by the binder only when doing delta patching.</remarks>
155
+ public string DeltaPatchHeaderSource
156
+ {
157
+ get { return (string)this.Fields[11].Data; }
158
+ set { this.Fields[11].Data = value; }
159
+ }
160
+ }
161
+}
src/WixToolset.Data/Rows/WixGroupRow.cs
new
+62
@@ -0,0 +1,62 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// Specialization of a row for the WixGroup table.
9
+ /// </summary>
10
+ public sealed class WixGroupRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixGroupRow row that belongs to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
17
+ public WixGroupRow(SourceLineNumber sourceLineNumbers, Table table)
18
+ : base(sourceLineNumbers, table)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Gets or sets the parent identifier of the complex reference.
24
+ /// </summary>
25
+ /// <value>Parent identifier of the complex reference.</value>
26
+ public string ParentId
27
+ {
28
+ get { return (string)this.Fields[0].Data; }
29
+ set { this.Fields[0].Data = value; }
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets the parent type of the complex reference.
34
+ /// </summary>
35
+ /// <value>Parent type of the complex reference.</value>
36
+ public ComplexReferenceParentType ParentType
37
+ {
38
+ get { return (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), (string)this.Fields[1].Data); }
39
+ set { this.Fields[1].Data = value.ToString(); }
40
+ }
41
+
42
+ /// <summary>
43
+ /// Gets the child identifier of the complex reference.
44
+ /// </summary>
45
+ /// <value>Child identifier of the complex reference.</value>
46
+ public string ChildId
47
+ {
48
+ get { return (string)this.Fields[2].Data; }
49
+ set { this.Fields[2].Data = value; }
50
+ }
51
+
52
+ /// <summary>
53
+ /// Gets the child type of the complex reference.
54
+ /// </summary>
55
+ /// <value>Child type of the complex reference.</value>
56
+ public ComplexReferenceChildType ChildType
57
+ {
58
+ get { return (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), (string)this.Fields[3].Data); }
59
+ set { this.Fields[3].Data = value.ToString(); }
60
+ }
61
+ }
62
+}
src/WixToolset.Data/Rows/WixMediaRow.cs
new
+60
@@ -0,0 +1,60 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the WixMedia table.
7
+ /// </summary>
8
+ public sealed class WixMediaRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a WixMedia row that does not belong to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="tableDef">TableDefinition this Media row belongs to and should get its column definitions from.</param>
15
+ public WixMediaRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
16
+ base(sourceLineNumbers, tableDef)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Creates a WixMedia row that belongs to a table.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
24
+ /// <param name="table">Table this Media row belongs to and should get its column definitions from.</param>
25
+ public WixMediaRow(SourceLineNumber sourceLineNumbers, Table table) :
26
+ base(sourceLineNumbers, table)
27
+ {
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the disk id for this media.
32
+ /// </summary>
33
+ /// <value>Disk id for the media.</value>
34
+ public int DiskId
35
+ {
36
+ get { return (int)this.Fields[0].Data; }
37
+ set { this.Fields[0].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the compression level for this media row.
42
+ /// </summary>
43
+ /// <value>Compression level.</value>
44
+ public CompressionLevel? CompressionLevel
45
+ {
46
+ get { return (CompressionLevel?)this.Fields[1].AsNullableInteger(); }
47
+ set { this.Fields[1].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the layout location for this media row.
52
+ /// </summary>
53
+ /// <value>Layout location to the root of the media.</value>
54
+ public string Layout
55
+ {
56
+ get { return (string)this.Fields[2].Data; }
57
+ set { this.Fields[2].Data = value; }
58
+ }
59
+ }
60
+}
src/WixToolset.Data/Rows/WixMediaTemplateRow.cs
new
+81
@@ -0,0 +1,81 @@
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.Rows
4
+{
5
+ /// <summary>
6
+ /// Specialization of a row for the MediaTemplate table.
7
+ /// </summary>
8
+ public sealed class WixMediaTemplateRow : Row
9
+ {
10
+ /// <summary>
11
+ /// Creates a MediaTemplate row that belongs to a table.
12
+ /// </summary>
13
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
14
+ /// <param name="table">Table this MediaTeplate row belongs to and should get its column definitions from.</param>
15
+ public WixMediaTemplateRow(SourceLineNumber sourceLineNumbers, Table table)
16
+ : base(sourceLineNumbers, table)
17
+ {
18
+ }
19
+
20
+ /// <summary>
21
+ /// Gets or sets the cabinet template name for this media template row.
22
+ /// </summary>
23
+ /// <value>Cabinet name.</value>
24
+ public string CabinetTemplate
25
+ {
26
+ get { return (string)this.Fields[0].Data; }
27
+ set { this.Fields[0].Data = value; }
28
+ }
29
+
30
+ /// <summary>
31
+ /// Gets or sets the compression level for this media template row.
32
+ /// </summary>
33
+ /// <value>Compression level.</value>
34
+ public CompressionLevel? CompressionLevel
35
+ {
36
+ get { return (CompressionLevel?)this.Fields[1].AsNullableInteger(); }
37
+ set { this.Fields[1].Data = value; }
38
+ }
39
+
40
+ /// <summary>
41
+ /// Gets or sets the disk prompt for this media template row.
42
+ /// </summary>
43
+ /// <value>Disk prompt.</value>
44
+ public string DiskPrompt
45
+ {
46
+ get { return (string)this.Fields[2].Data; }
47
+ set { this.Fields[2].Data = value; }
48
+ }
49
+
50
+
51
+ /// <summary>
52
+ /// Gets or sets the volume label for this media template row.
53
+ /// </summary>
54
+ /// <value>Volume label.</value>
55
+ public string VolumeLabel
56
+ {
57
+ get { return (string)this.Fields[3].Data; }
58
+ set { this.Fields[3].Data = value; }
59
+ }
60
+
61
+ /// <summary>
62
+ /// Gets or sets the maximum uncompressed media size for this media template row.
63
+ /// </summary>
64
+ /// <value>Disk id.</value>
65
+ public int MaximumUncompressedMediaSize
66
+ {
67
+ get { return (int)this.Fields[4].Data; }
68
+ set { this.Fields[4].Data = value; }
69
+ }
70
+
71
+ /// <summary>
72
+ /// Gets or sets the Maximum Cabinet Size For Large File Splitting for this media template row.
73
+ /// </summary>
74
+ /// <value>Disk id.</value>
75
+ public int MaximumCabinetSizeForLargeFileSplitting
76
+ {
77
+ get { return (int)this.Fields[5].Data; }
78
+ set { this.Fields[5].Data = value; }
79
+ }
80
+ }
81
+}
src/WixToolset.Data/Rows/WixMergeRow.cs
new
+149
@@ -0,0 +1,149 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Globalization;
7
+ using System.Text;
8
+ using System.Xml;
9
+
10
+ /// <summary>
11
+ /// Specialization of a row for tracking merge statements.
12
+ /// </summary>
13
+ public sealed class WixMergeRow : Row
14
+ {
15
+ /// <summary>
16
+ /// Creates a Merge row that does not belong to a table.
17
+ /// </summary>
18
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
19
+ /// <param name="tableDef">TableDefinition this Merge row belongs to and should get its column definitions from.</param>
20
+ public WixMergeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
21
+ base(sourceLineNumbers, tableDef)
22
+ {
23
+ }
24
+
25
+ /// <summary>Creates a Merge row that belongs to a table.</summary>
26
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
27
+ /// <param name="table">Table this Merge row belongs to and should get its column definitions from.</param>
28
+ public WixMergeRow(SourceLineNumber sourceLineNumbers, Table table) :
29
+ base(sourceLineNumbers, table)
30
+ {
31
+ }
32
+
33
+ /// <summary>
34
+ /// Gets and sets the id for a merge row.
35
+ /// </summary>
36
+ /// <value>Id for the row.</value>
37
+ public string Id
38
+ {
39
+ get { return (string)this.Fields[0].Data; }
40
+ set { this.Fields[0].Data = value; }
41
+ }
42
+
43
+ /// <summary>
44
+ /// Gets and sets the language for a merge row.
45
+ /// </summary>
46
+ /// <value>Language for the row.</value>
47
+ public string Language
48
+ {
49
+ get { return (string)this.Fields[1].Data; }
50
+ set { this.Fields[1].Data = value; }
51
+ }
52
+
53
+ /// <summary>
54
+ /// Gets and sets the directory for a merge row.
55
+ /// </summary>
56
+ /// <value>Direcotory for the row.</value>
57
+ public string Directory
58
+ {
59
+ get { return (string)this.Fields[2].Data; }
60
+ set { this.Fields[2].Data = value; }
61
+ }
62
+
63
+ /// <summary>
64
+ /// Gets and sets the path to the merge module for a merge row.
65
+ /// </summary>
66
+ /// <value>Source path for the row.</value>
67
+ public string SourceFile
68
+ {
69
+ get { return (string)this.Fields[3].Data; }
70
+ set { this.Fields[3].Data = value; }
71
+ }
72
+
73
+ /// <summary>
74
+ /// Gets and sets the disk id the merge module should be placed on for a merge row.
75
+ /// </summary>
76
+ /// <value>Disk identifier for row.</value>
77
+ public int DiskId
78
+ {
79
+ get { return (int)this.Fields[4].Data; }
80
+ set { this.Fields[4].Data = value; }
81
+ }
82
+
83
+ /// <summary>
84
+ /// Gets and sets the compression value for a merge row.
85
+ /// </summary>
86
+ /// <value>Compression for a merge row.</value>
87
+ public YesNoType FileCompression
88
+ {
89
+ get
90
+ {
91
+ if (null == this.Fields[5].Data)
92
+ {
93
+ return YesNoType.NotSet;
94
+ }
95
+ else if (1 == (int)this.Fields[5].Data)
96
+ {
97
+ return YesNoType.Yes;
98
+ }
99
+ else if (0 == (int)this.Fields[5].Data)
100
+ {
101
+ return YesNoType.No;
102
+ }
103
+ else
104
+ {
105
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_MergeTableFileCompressionColumnContainsInvalidValue, this.Fields[5].Data));
106
+ }
107
+ }
108
+ set
109
+ {
110
+ if (YesNoType.Yes == value)
111
+ {
112
+ this.Fields[5].Data = 1;
113
+ }
114
+ else if (YesNoType.No == value)
115
+ {
116
+ this.Fields[5].Data = 0;
117
+ }
118
+ else if (YesNoType.NotSet == value)
119
+ {
120
+ this.Fields[5].Data = null;
121
+ }
122
+ else
123
+ {
124
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue, value));
125
+ }
126
+ }
127
+ }
128
+
129
+ /// <summary>
130
+ /// Gets and sets the configuration data for a merge row.
131
+ /// </summary>
132
+ /// <value>Comma delimited string of "name=value" pairs.</value>
133
+ public string ConfigurationData
134
+ {
135
+ get { return (string)this.Fields[6].Data; }
136
+ set { this.Fields[6].Data = value; }
137
+ }
138
+
139
+ /// <summary>
140
+ /// Gets and sets the primary feature for a merge row.
141
+ /// </summary>
142
+ /// <value>The primary feature for a merge row.</value>
143
+ public string Feature
144
+ {
145
+ get { return (string)this.Fields[7].Data; }
146
+ set { this.Fields[7].Data = value; }
147
+ }
148
+ }
149
+}
src/WixToolset.Data/Rows/WixPayloadPropertiesRow.cs
new
+81
@@ -0,0 +1,81 @@
1
+//-------------------------------------------------------------------------------------------------
2
+// <copyright file="WixPayloadPropertiesRow.cs" company="Outercurve Foundation">
3
+// Copyright (c) 2004, Outercurve Foundation.
4
+// This software is released under Microsoft Reciprocal License (MS-RL).
5
+// The license and further copyright text can be found in the file
6
+// LICENSE.TXT at the root directory of the distribution.
7
+// </copyright>
8
+//-------------------------------------------------------------------------------------------------
9
+
10
+namespace WixToolset.Data.Rows
11
+{
12
+ using System;
13
+
14
+ /// <summary>
15
+ /// Specialization of a row for the WixPayloadProperties table.
16
+ /// </summary>
17
+ public class WixPayloadPropertiesRow : Row
18
+ {
19
+ /// <summary>
20
+ /// Creates a WixPayloadProperties row that does not belong to a table.
21
+ /// </summary>
22
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
23
+ /// <param name="tableDef">TableDefinition this WixPayloadProperties row belongs to and should get its column definitions from.</param>
24
+ public WixPayloadPropertiesRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
25
+ base(sourceLineNumbers, tableDef)
26
+ {
27
+ }
28
+
29
+ /// <summary>
30
+ /// Creates a WixPayloadProperties row that belongs to a table.
31
+ /// </summary>
32
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
33
+ /// <param name="table">Table this WixPayloadProperties row belongs to and should get its column definitions from.</param>
34
+ public WixPayloadPropertiesRow(SourceLineNumber sourceLineNumbers, Table table) :
35
+ base(sourceLineNumbers, table)
36
+ {
37
+ }
38
+
39
+ public string Id
40
+ {
41
+ get { return (string)this.Fields[0].Data; }
42
+ set { this.Fields[0].Data = value; }
43
+ }
44
+
45
+ public string Package
46
+ {
47
+ get { return (string)this.Fields[1].Data; }
48
+ set { this.Fields[1].Data = value; }
49
+ }
50
+
51
+ public string Container
52
+ {
53
+ get { return (string)this.Fields[2].Data; }
54
+ set { this.Fields[2].Data = value; }
55
+ }
56
+
57
+ public string Name
58
+ {
59
+ get { return (string)this.Fields[3].Data; }
60
+ set { this.Fields[3].Data = value; }
61
+ }
62
+
63
+ public string Size
64
+ {
65
+ get { return (string)this.Fields[4].Data; }
66
+ set { this.Fields[4].Data = value; }
67
+ }
68
+
69
+ public string DownloadUrl
70
+ {
71
+ get { return (string)this.Fields[5].Data; }
72
+ set { this.Fields[5].Data = value; }
73
+ }
74
+
75
+ public string LayoutOnly
76
+ {
77
+ get { return (string)this.Fields[6].Data; }
78
+ set { this.Fields[6].Data = value; }
79
+ }
80
+ }
81
+}
src/WixToolset.Data/Rows/WixPropertyRow.cs
new
+118
@@ -0,0 +1,118 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Globalization;
7
+
8
+ /// <summary>
9
+ /// Specialization of a row for the WixProperty table.
10
+ /// </summary>
11
+ public sealed class WixPropertyRow : Row
12
+ {
13
+ /// <summary>Creates a WixProperty row that belongs to a table.</summary>
14
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
15
+ /// <param name="table">Table this WixProperty row belongs to and should get its column definitions from.</param>
16
+ public WixPropertyRow(SourceLineNumber sourceLineNumbers, Table table) :
17
+ base(sourceLineNumbers, table)
18
+ {
19
+ }
20
+
21
+ /// <summary>
22
+ /// Gets and sets the id for this property row.
23
+ /// </summary>
24
+ /// <value>Id for the property.</value>
25
+ public string Id
26
+ {
27
+ get { return (string)this.Fields[0].Data; }
28
+ set { this.Fields[0].Data = value; }
29
+ }
30
+
31
+ /// <summary>
32
+ /// Gets and sets if this is an admin property row.
33
+ /// </summary>
34
+ /// <value>Flag if this is an admin property.</value>
35
+ public bool Admin
36
+ {
37
+ get
38
+ {
39
+ return (0x1 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x1));
40
+ }
41
+
42
+ set
43
+ {
44
+ if (null == this.Fields[1].Data)
45
+ {
46
+ this.Fields[1].Data = 0;
47
+ }
48
+
49
+ if (value)
50
+ {
51
+ this.Fields[1].Data = (int)this.Fields[1].Data | 0x1;
52
+ }
53
+ else
54
+ {
55
+ this.Fields[1].Data = (int)this.Fields[1].Data & ~0x1;
56
+ }
57
+ }
58
+ }
59
+
60
+ /// <summary>
61
+ /// Gets and sets if this is a hidden property row.
62
+ /// </summary>
63
+ /// <value>Flag if this is a hidden property.</value>
64
+ public bool Hidden
65
+ {
66
+ get
67
+ {
68
+ return (0x2 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x2));
69
+ }
70
+
71
+ set
72
+ {
73
+ if (null == this.Fields[1].Data)
74
+ {
75
+ this.Fields[1].Data = 0;
76
+ }
77
+
78
+ if (value)
79
+ {
80
+ this.Fields[1].Data = (int)this.Fields[1].Data | 0x2;
81
+ }
82
+ else
83
+ {
84
+ this.Fields[1].Data = (int)this.Fields[1].Data & ~0x2;
85
+ }
86
+ }
87
+ }
88
+
89
+ /// <summary>
90
+ /// Gets and sets if this is a secure property row.
91
+ /// </summary>
92
+ /// <value>Flag if this is a secure property.</value>
93
+ public bool Secure
94
+ {
95
+ get
96
+ {
97
+ return (0x4 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x4));
98
+ }
99
+
100
+ set
101
+ {
102
+ if (null == this.Fields[1].Data)
103
+ {
104
+ this.Fields[1].Data = 0;
105
+ }
106
+
107
+ if (value)
108
+ {
109
+ this.Fields[1].Data = (int)this.Fields[1].Data | 0x4;
110
+ }
111
+ else
112
+ {
113
+ this.Fields[1].Data = (int)this.Fields[1].Data & ~0x4;
114
+ }
115
+ }
116
+ }
117
+ }
118
+}
src/WixToolset.Data/Rows/WixRelatedBundleRow.cs
new
+52
@@ -0,0 +1,52 @@
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.Rows
4
+{
5
+ using Serialize = WixToolset.Data.Serialize;
6
+
7
+ /// <summary>
8
+ /// Specialization of a row for the RelatedBundle table.
9
+ /// </summary>
10
+ public sealed class WixRelatedBundleRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a RelatedBundle 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 RelatedBundle row belongs to and should get its column definitions from.</param>
17
+ public WixRelatedBundleRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a RelatedBundle 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 RelatedBundle row belongs to and should get its column definitions from.</param>
27
+ public WixRelatedBundleRow(SourceLineNumber sourceLineNumbers, Table table)
28
+ : base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the related bundle identifier.
34
+ /// </summary>
35
+ /// <value>The related bundle identifier.</value>
36
+ public string Id
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 related bundle action.
44
+ /// </summary>
45
+ /// <value>The related bundle action.</value>
46
+ public Serialize.RelatedBundle.ActionType Action
47
+ {
48
+ get { return (Serialize.RelatedBundle.ActionType)this.Fields[1].Data; }
49
+ set { this.Fields[1].Data = (int)value; }
50
+ }
51
+ }
52
+}
src/WixToolset.Data/Rows/WixSimpleReferenceRow.cs
new
+63
@@ -0,0 +1,63 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Diagnostics;
7
+ using System.Xml;
8
+
9
+ /// <summary>
10
+ /// Specialization of a row for the WixSimpleReference table.
11
+ /// </summary>
12
+ public sealed class WixSimpleReferenceRow : Row
13
+ {
14
+ /// <summary>
15
+ /// Creates a WixSimpleReferenceRow that belongs to a table.
16
+ /// </summary>
17
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
18
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
19
+ public WixSimpleReferenceRow(SourceLineNumber sourceLineNumbers, Table table)
20
+ : base(sourceLineNumbers, table)
21
+ {
22
+ }
23
+
24
+ /// <summary>
25
+ /// Creates a WixSimpleReferenceRow that belongs to a table.
26
+ /// </summary>
27
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
28
+ /// <param name="tableDefinitions">Table definitions for this row.</param>
29
+ public WixSimpleReferenceRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinitions)
30
+ : base(sourceLineNumbers, tableDefinitions)
31
+ {
32
+ }
33
+
34
+ /// <summary>
35
+ /// Gets or sets the primary keys of the simple reference.
36
+ /// </summary>
37
+ /// <value>The primary keys of the simple reference.</value>
38
+ public string PrimaryKeys
39
+ {
40
+ get { return (string)this.Fields[1].Data; }
41
+ set { this.Fields[1].Data = value; }
42
+ }
43
+
44
+ /// <summary>
45
+ /// Gets the symbolic name.
46
+ /// </summary>
47
+ /// <value>Symbolic name.</value>
48
+ public string SymbolicName
49
+ {
50
+ get { return String.Concat(this.TableName, ":", this.PrimaryKeys); }
51
+ }
52
+
53
+ /// <summary>
54
+ /// Gets or sets the table name of the simple reference.
55
+ /// </summary>
56
+ /// <value>The table name of the simple reference.</value>
57
+ public string TableName
58
+ {
59
+ get { return (string)this.Fields[0].Data; }
60
+ set { this.Fields[0].Data = value; }
61
+ }
62
+ }
63
+}
src/WixToolset.Data/Rows/WixUpdateRegistrationRow.cs
new
+62
@@ -0,0 +1,62 @@
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.Rows
4
+{
5
+ using System;
6
+
7
+ /// <summary>
8
+ /// Update registration information for Binding.
9
+ /// </summary>
10
+ public class WixUpdateRegistrationRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixUpdateRegistrationRow 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 WixUpdateRegistrationRow row belongs to and should get its column definitions from.</param>
17
+ public WixUpdateRegistrationRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixUpdateRegistrationRow 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 WixUpdateRegistrationRow row belongs to and should get its column definitions from.</param>
27
+ public WixUpdateRegistrationRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ public string Manufacturer
33
+ {
34
+ get { return (string)this.Fields[0].Data; }
35
+ set { this.Fields[0].Data = value; }
36
+ }
37
+
38
+ public string Department
39
+ {
40
+ get { return (string)this.Fields[1].Data; }
41
+ set { this.Fields[1].Data = value; }
42
+ }
43
+
44
+ public string ProductFamily
45
+ {
46
+ get { return (string)this.Fields[2].Data; }
47
+ set { this.Fields[2].Data = value; }
48
+ }
49
+
50
+ public string Name
51
+ {
52
+ get { return (string)this.Fields[3].Data; }
53
+ set { this.Fields[3].Data = value; }
54
+ }
55
+
56
+ public string Classification
57
+ {
58
+ get { return (string)this.Fields[4].Data; }
59
+ set { this.Fields[4].Data = value; }
60
+ }
61
+ }
62
+}
src/WixToolset.Data/Rows/WixVariableRow.cs
new
+81
@@ -0,0 +1,81 @@
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.Rows
4
+{
5
+ using System;
6
+ using System.Globalization;
7
+
8
+ /// <summary>
9
+ /// Specialization of a row for the WixVariable table.
10
+ /// </summary>
11
+ public sealed class WixVariableRow : Row
12
+ {
13
+ /// <summary>
14
+ /// Creates a WixVariable row that does not belong to a table.
15
+ /// </summary>
16
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
17
+ /// <param name="tableDef">TableDefinition this WixVariable row belongs to and should get its column definitions from.</param>
18
+ public WixVariableRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
19
+ base(sourceLineNumbers, tableDef)
20
+ {
21
+ }
22
+
23
+ /// <summary>
24
+ /// Creates a WixVariable row that belongs to a table.
25
+ /// </summary>
26
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
27
+ /// <param name="table">Table this WixVariable row belongs to and should get its column definitions from.</param>
28
+ public WixVariableRow(SourceLineNumber sourceLineNumbers, Table table) : base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the variable identifier.
34
+ /// </summary>
35
+ /// <value>The variable identifier.</value>
36
+ public string Id
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 variable's value.
44
+ /// </summary>
45
+ /// <value>The variable's value.</value>
46
+ public string Value
47
+ {
48
+ get { return (string)this.Fields[1].Data; }
49
+ set { this.Fields[1].Data = value; }
50
+ }
51
+
52
+ /// <summary>
53
+ /// Gets or sets whether this variable is overridable.
54
+ /// </summary>
55
+ /// <value>Whether this variable is overridable.</value>
56
+ public bool Overridable
57
+ {
58
+ get
59
+ {
60
+ return (0x1 == (Convert.ToInt32(this.Fields[2].Data, CultureInfo.InvariantCulture) & 0x1));
61
+ }
62
+
63
+ set
64
+ {
65
+ if (null == this.Fields[2].Data)
66
+ {
67
+ this.Fields[2].Data = 0;
68
+ }
69
+
70
+ if (value)
71
+ {
72
+ this.Fields[2].Data = (int)this.Fields[2].Data | 0x1;
73
+ }
74
+ else
75
+ {
76
+ this.Fields[2].Data = (int)this.Fields[2].Data & ~0x1;
77
+ }
78
+ }
79
+ }
80
+ }
81
+}
src/WixToolset.Data/Section.cs
new
+240
@@ -0,0 +1,240 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Diagnostics;
8
+ using System.Globalization;
9
+ using System.Linq;
10
+ using System.Xml;
11
+
12
+ /// <summary>
13
+ /// Section in an object file.
14
+ /// </summary>
15
+ public sealed class Section
16
+ {
17
+ /// <summary>
18
+ /// Creates a new section as part of an intermediate.
19
+ /// </summary>
20
+ /// <param name="id">Identifier for section.</param>
21
+ /// <param name="type">Type of section.</param>
22
+ /// <param name="codepage">Codepage for resulting database.</param>
23
+ public Section(string id, SectionType type, int codepage)
24
+ {
25
+ this.Id = id;
26
+ this.Type = type;
27
+ this.Codepage = codepage;
28
+
29
+ this.Tables = new TableIndexedCollection();
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets the identifier for the section.
34
+ /// </summary>
35
+ /// <value>Section identifier.</value>
36
+ public string Id { get; private set; }
37
+
38
+ /// <summary>
39
+ /// Gets the type of the section.
40
+ /// </summary>
41
+ /// <value>Type of section.</value>
42
+ public SectionType Type { get; private set; }
43
+
44
+ /// <summary>
45
+ /// Gets the codepage for the section.
46
+ /// </summary>
47
+ /// <value>Codepage for the section.</value>
48
+ public int Codepage { get; private set; }
49
+
50
+ /// <summary>
51
+ /// Gets the tables in the section.
52
+ /// </summary>
53
+ /// <value>Tables in section.</value>
54
+ public TableIndexedCollection Tables { get; private set; }
55
+
56
+ /// <summary>
57
+ /// Gets the source line information of the file containing this section.
58
+ /// </summary>
59
+ /// <value>The source line information of the file containing this section.</value>
60
+ public SourceLineNumber SourceLineNumbers { get; private set; }
61
+
62
+ /// <summary>
63
+ /// Gets the identity of the intermediate the section is contained within.
64
+ /// </summary>
65
+ public string IntermediateId { get; internal set; }
66
+
67
+ /// <summary>
68
+ /// Gets the identity of the library when the section is contained within one.
69
+ /// </summary>
70
+ public string LibraryId { get; internal set; }
71
+
72
+ /// <summary>
73
+ /// Ensures a table is added to the section's table collection.
74
+ /// </summary>
75
+ /// <param name="tableDefinition">Table definition for the table.</param>
76
+ /// <returns>Table in the section.</returns>
77
+ public Table EnsureTable(TableDefinition tableDefinition)
78
+ {
79
+ Table table;
80
+ if (!this.Tables.TryGetTable(tableDefinition.Name, out table))
81
+ {
82
+ table = new Table(this, tableDefinition);
83
+ this.Tables.Add(table);
84
+ }
85
+
86
+ return table;
87
+ }
88
+
89
+ /// <summary>
90
+ /// Parse a section from the xml.
91
+ /// </summary>
92
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
93
+ /// <param name="tableDefinitions">TableDefinitions to use in the intermediate.</param>
94
+ /// <returns>The parsed Section.</returns>
95
+ internal static Section Read(XmlReader reader, TableDefinitionCollection tableDefinitions)
96
+ {
97
+ Debug.Assert("section" == reader.LocalName);
98
+
99
+ int codepage = 0;
100
+ bool empty = reader.IsEmptyElement;
101
+ string id = null;
102
+ SectionType type = SectionType.Unknown;
103
+
104
+ while (reader.MoveToNextAttribute())
105
+ {
106
+ switch (reader.Name)
107
+ {
108
+ case "codepage":
109
+ codepage = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture);
110
+ break;
111
+ case "id":
112
+ id = reader.Value;
113
+ break;
114
+ case "type":
115
+ switch (reader.Value)
116
+ {
117
+ case "bundle":
118
+ type = SectionType.Bundle;
119
+ break;
120
+ case "fragment":
121
+ type = SectionType.Fragment;
122
+ break;
123
+ case "module":
124
+ type = SectionType.Module;
125
+ break;
126
+ case "patchCreation":
127
+ type = SectionType.PatchCreation;
128
+ break;
129
+ case "product":
130
+ type = SectionType.Product;
131
+ break;
132
+ case "patch":
133
+ type = SectionType.Patch;
134
+ break;
135
+ default:
136
+ throw new XmlException();
137
+ }
138
+ break;
139
+ }
140
+ }
141
+
142
+ if (null == id && (SectionType.Unknown != type && SectionType.Fragment != type))
143
+ {
144
+ throw new XmlException();
145
+ }
146
+
147
+ if (SectionType.Unknown == type)
148
+ {
149
+ throw new XmlException();
150
+ }
151
+
152
+ Section section = new Section(id, type, codepage);
153
+ section.SourceLineNumbers = SourceLineNumber.CreateFromUri(reader.BaseURI);
154
+
155
+ List<Table> tables = new List<Table>();
156
+ if (!empty)
157
+ {
158
+ bool done = false;
159
+
160
+ while (!done && reader.Read())
161
+ {
162
+ switch (reader.NodeType)
163
+ {
164
+ case XmlNodeType.Element:
165
+ switch (reader.LocalName)
166
+ {
167
+ case "table":
168
+ tables.Add(Table.Read(reader, section, tableDefinitions));
169
+ break;
170
+ default:
171
+ throw new XmlException();
172
+ }
173
+ break;
174
+ case XmlNodeType.EndElement:
175
+ done = true;
176
+ break;
177
+ }
178
+ }
179
+
180
+ if (!done)
181
+ {
182
+ throw new XmlException();
183
+ }
184
+ }
185
+
186
+ section.Tables = new TableIndexedCollection(tables);
187
+
188
+ return section;
189
+ }
190
+
191
+ /// <summary>
192
+ /// Persist the Section to an XmlWriter.
193
+ /// </summary>
194
+ /// <param name="writer">XmlWriter which reference will be persisted to.</param>
195
+ internal void Write(XmlWriter writer)
196
+ {
197
+ writer.WriteStartElement("section", Intermediate.XmlNamespaceUri);
198
+
199
+ if (null != this.Id)
200
+ {
201
+ writer.WriteAttributeString("id", this.Id);
202
+ }
203
+
204
+ switch (this.Type)
205
+ {
206
+ case SectionType.Bundle:
207
+ writer.WriteAttributeString("type", "bundle");
208
+ break;
209
+ case SectionType.Fragment:
210
+ writer.WriteAttributeString("type", "fragment");
211
+ break;
212
+ case SectionType.Module:
213
+ writer.WriteAttributeString("type", "module");
214
+ break;
215
+ case SectionType.Product:
216
+ writer.WriteAttributeString("type", "product");
217
+ break;
218
+ case SectionType.PatchCreation:
219
+ writer.WriteAttributeString("type", "patchCreation");
220
+ break;
221
+ case SectionType.Patch:
222
+ writer.WriteAttributeString("type", "patch");
223
+ break;
224
+ }
225
+
226
+ if (0 != this.Codepage)
227
+ {
228
+ writer.WriteAttributeString("codepage", this.Codepage.ToString());
229
+ }
230
+
231
+ // save the rows in table order
232
+ foreach (Table table in this.Tables.OrderBy(t => t.Name))
233
+ {
234
+ table.Write(writer);
235
+ }
236
+
237
+ writer.WriteEndElement();
238
+ }
239
+ }
240
+}
src/WixToolset.Data/SectionType.cs
new
+31
@@ -0,0 +1,31 @@
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
+ /// <summary>
6
+ /// Type of section.
7
+ /// </summary>
8
+ public enum SectionType
9
+ {
10
+ /// <summary>Unknown section type, default and invalid.</summary>
11
+ Unknown,
12
+
13
+ /// <summary>Bundle section type.</summary>
14
+ Bundle,
15
+
16
+ /// <summary>Fragment section type.</summary>
17
+ Fragment,
18
+
19
+ /// <summary>Module section type.</summary>
20
+ Module,
21
+
22
+ /// <summary>Product section type.</summary>
23
+ Product,
24
+
25
+ /// <summary>Patch creation section type.</summary>
26
+ PatchCreation,
27
+
28
+ /// <summary>Patch section type.</summary>
29
+ Patch
30
+ }
31
+}
src/WixToolset.Data/Serialize/CodeDomInterfaces.cs
new
+96
@@ -0,0 +1,96 @@
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.Serialize
4
+{
5
+ using System;
6
+ using System.Collections;
7
+ using System.Xml;
8
+
9
+ /// <summary>
10
+ /// Interface for generated schema elements.
11
+ /// </summary>
12
+ public interface ISchemaElement
13
+ {
14
+ /// <summary>
15
+ /// Gets and sets the parent of this element. May be null.
16
+ /// </summary>
17
+ /// <value>An ISchemaElement that has this element as a child.</value>
18
+ ISchemaElement ParentElement
19
+ {
20
+ get;
21
+ set;
22
+ }
23
+
24
+ /// <summary>
25
+ /// Outputs xml representing this element, including the associated attributes
26
+ /// and any nested elements.
27
+ /// </summary>
28
+ /// <param name="writer">XmlWriter to be used when outputting the element.</param>
29
+ void OutputXml(XmlWriter writer);
30
+ }
31
+
32
+ /// <summary>
33
+ /// Interface for generated schema elements. Implemented by elements that have child
34
+ /// elements.
35
+ /// </summary>
36
+ public interface IParentElement
37
+ {
38
+ /// <summary>
39
+ /// Gets an enumerable collection of the children of this element.
40
+ /// </summary>
41
+ /// <value>An enumerable collection of the children of this element.</value>
42
+ IEnumerable Children
43
+ {
44
+ get;
45
+ }
46
+
47
+ /// <summary>
48
+ /// Gets an enumerable collection of the children of this element, filtered
49
+ /// by the passed in type.
50
+ /// </summary>
51
+ /// <param name="childType">The type of children to retrieve.</param>
52
+ IEnumerable this[Type childType]
53
+ {
54
+ get;
55
+ }
56
+
57
+ /// <summary>
58
+ /// Adds a child to this element.
59
+ /// </summary>
60
+ /// <param name="child">Child to add.</param>
61
+ void AddChild(ISchemaElement child);
62
+
63
+ /// <summary>
64
+ /// Removes a child from this element.
65
+ /// </summary>
66
+ /// <param name="child">Child to remove.</param>
67
+ void RemoveChild(ISchemaElement child);
68
+ }
69
+
70
+ /// <summary>
71
+ /// Interface for generated schema elements. Implemented by classes with attributes.
72
+ /// </summary>
73
+ public interface ISetAttributes
74
+ {
75
+ /// <summary>
76
+ /// Sets the attribute with the given name to the given value. The value here is
77
+ /// a string, and is converted to the strongly-typed version inside this method.
78
+ /// </summary>
79
+ /// <param name="name">The name of the attribute to set.</param>
80
+ /// <param name="value">The value to assign to the attribute.</param>
81
+ void SetAttribute(string name, string value);
82
+ }
83
+
84
+ /// <summary>
85
+ /// Interface for generated schema elements. Implemented by classes with children.
86
+ /// </summary>
87
+ public interface ICreateChildren
88
+ {
89
+ /// <summary>
90
+ /// Creates an instance of the child with the passed in name.
91
+ /// </summary>
92
+ /// <param name="childName">String matching the element name of the child when represented in XML.</param>
93
+ /// <returns>An instance of that child.</returns>
94
+ ISchemaElement CreateChild(string childName);
95
+ }
96
+}
src/WixToolset.Data/Serialize/CodeDomReader.cs
new
+161
@@ -0,0 +1,161 @@
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.Serialize
4
+{
5
+ using System;
6
+ using System.Diagnostics.CodeAnalysis;
7
+ using System.Globalization;
8
+ using System.Reflection;
9
+ using System.Xml;
10
+
11
+ /// <summary>
12
+ /// Class used for reading XML files in to the CodeDom.
13
+ /// </summary>
14
+ public class CodeDomReader
15
+ {
16
+ private Assembly[] assemblies;
17
+
18
+ /// <summary>
19
+ /// Creates a new CodeDomReader, using the current assembly.
20
+ /// </summary>
21
+ public CodeDomReader()
22
+ {
23
+ this.assemblies = new Assembly[] { Assembly.GetExecutingAssembly() };
24
+ }
25
+
26
+ /// <summary>
27
+ /// Creates a new CodeDomReader, and takes in a list of assemblies in which to
28
+ /// look for elements.
29
+ /// </summary>
30
+ /// <param name="assemblies">Assemblies in which to look for types that correspond
31
+ /// to elements.</param>
32
+ public CodeDomReader(Assembly[] assemblies)
33
+ {
34
+ this.assemblies = assemblies;
35
+ }
36
+
37
+ /// <summary>
38
+ /// Loads an XML file into a strongly-typed code dom.
39
+ /// </summary>
40
+ /// <param name="filePath">File to load into the code dom.</param>
41
+ /// <returns>The strongly-typed object at the root of the tree.</returns>
42
+ [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
43
+ public ISchemaElement Load(string filePath)
44
+ {
45
+ XmlDocument document = new XmlDocument();
46
+ document.Load(filePath);
47
+ ISchemaElement schemaElement = null;
48
+
49
+ foreach (XmlNode node in document.ChildNodes)
50
+ {
51
+ XmlElement element = node as XmlElement;
52
+ if (element != null)
53
+ {
54
+ if (schemaElement != null)
55
+ {
56
+ throw new InvalidOperationException(WixDataStrings.EXP_MultipleRootElementsFoundInFile);
57
+ }
58
+
59
+ schemaElement = this.CreateObjectFromElement(element);
60
+ this.ParseObjectFromElement(schemaElement, element);
61
+ }
62
+ }
63
+ return schemaElement;
64
+ }
65
+
66
+ /// <summary>
67
+ /// Sets an attribute on an ISchemaElement.
68
+ /// </summary>
69
+ /// <param name="schemaElement">Schema element to set attribute on.</param>
70
+ /// <param name="name">Name of the attribute to set.</param>
71
+ /// <param name="value">Value to set on the attribute.</param>
72
+ [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
73
+ private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value)
74
+ {
75
+ ISetAttributes setAttributes = schemaElement as ISetAttributes;
76
+ if (setAttributes == null)
77
+ {
78
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_ISchemaElementDoesnotImplementISetAttribute, schemaElement.GetType().FullName));
79
+ }
80
+ else
81
+ {
82
+ setAttributes.SetAttribute(name, value);
83
+ }
84
+ }
85
+
86
+ /// <summary>
87
+ /// Parses an ISchemaElement from the XmlElement.
88
+ /// </summary>
89
+ /// <param name="schemaElement">ISchemaElement to fill in.</param>
90
+ /// <param name="element">XmlElement to parse from.</param>
91
+ [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
92
+ private void ParseObjectFromElement(ISchemaElement schemaElement, XmlElement element)
93
+ {
94
+ foreach (XmlAttribute attribute in element.Attributes)
95
+ {
96
+ SetAttributeOnObject(schemaElement, attribute.LocalName, attribute.Value);
97
+ }
98
+
99
+ foreach (XmlNode node in element.ChildNodes)
100
+ {
101
+ XmlElement childElement = node as XmlElement;
102
+ if (childElement != null)
103
+ {
104
+ ISchemaElement childSchemaElement = null;
105
+ ICreateChildren createChildren = schemaElement as ICreateChildren;
106
+ if (createChildren == null)
107
+ {
108
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_ISchemaElementDoesnotImplementICreateChildren, element.LocalName));
109
+ }
110
+ else
111
+ {
112
+ childSchemaElement = createChildren.CreateChild(childElement.LocalName);
113
+ }
114
+
115
+ if (childSchemaElement == null)
116
+ {
117
+ childSchemaElement = this.CreateObjectFromElement(childElement);
118
+ if (childSchemaElement == null)
119
+ {
120
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_XmlElementDoesnotHaveISchemaElement, childElement.LocalName));
121
+ }
122
+ }
123
+
124
+ this.ParseObjectFromElement(childSchemaElement, childElement);
125
+ IParentElement parentElement = (IParentElement)schemaElement;
126
+ parentElement.AddChild(childSchemaElement);
127
+ }
128
+ else
129
+ {
130
+ XmlText childText = node as XmlText;
131
+ if (childText != null)
132
+ {
133
+ SetAttributeOnObject(schemaElement, "Content", childText.Value);
134
+ }
135
+ }
136
+ }
137
+ }
138
+
139
+ /// <summary>
140
+ /// Creates an object from an XML element by digging through the assembly list.
141
+ /// </summary>
142
+ /// <param name="element">XML Element to create an ISchemaElement from.</param>
143
+ /// <returns>A constructed ISchemaElement.</returns>
144
+ private ISchemaElement CreateObjectFromElement(XmlElement element)
145
+ {
146
+ ISchemaElement schemaElement = null;
147
+ foreach (Assembly assembly in this.assemblies)
148
+ {
149
+ foreach (Type type in assembly.GetTypes())
150
+ {
151
+ if (type.FullName.EndsWith(element.LocalName, StringComparison.Ordinal)
152
+ && typeof(ISchemaElement).IsAssignableFrom(type))
153
+ {
154
+ schemaElement = (ISchemaElement)Activator.CreateInstance(type);
155
+ }
156
+ }
157
+ }
158
+ return schemaElement;
159
+ }
160
+ }
161
+}
src/WixToolset.Data/Serialize/ElementCollection.cs
new
+617
@@ -0,0 +1,617 @@
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.Serialize
4
+{
5
+ using System;
6
+ using System.Collections;
7
+ using System.Globalization;
8
+
9
+ /// <summary>
10
+ /// Collection used in the CodeDOM for the children of a given element. Provides type-checking
11
+ /// on the allowed children to ensure that only allowed types are added.
12
+ /// </summary>
13
+ public class ElementCollection : ICollection, IEnumerable
14
+ {
15
+ private CollectionType collectionType;
16
+ private int totalContainedItems;
17
+ private int containersUsed;
18
+ private ArrayList items;
19
+
20
+ /// <summary>
21
+ /// Creates a new element collection.
22
+ /// </summary>
23
+ /// <param name="collectionType">Type of the collection to create.</param>
24
+ public ElementCollection(CollectionType collectionType)
25
+ {
26
+ this.collectionType = collectionType;
27
+ this.items = new ArrayList();
28
+ }
29
+
30
+ /// <summary>
31
+ /// Enum representing types of XML collections.
32
+ /// </summary>
33
+ public enum CollectionType
34
+ {
35
+ /// <summary>
36
+ /// A choice type, corresponding to the XSD choice element.
37
+ /// </summary>
38
+ Choice,
39
+
40
+ /// <summary>
41
+ /// A sequence type, corresponding to the XSD sequence element.
42
+ /// </summary>
43
+ Sequence
44
+ }
45
+
46
+ /// <summary>
47
+ /// Gets the type of collection.
48
+ /// </summary>
49
+ /// <value>The type of collection.</value>
50
+ public CollectionType Type
51
+ {
52
+ get { return this.collectionType; }
53
+ }
54
+
55
+ /// <summary>
56
+ /// Gets the count of child elements in this collection (counts ISchemaElements, not nested collections).
57
+ /// </summary>
58
+ /// <value>The count of child elements in this collection (counts ISchemaElements, not nested collections).</value>
59
+ public int Count
60
+ {
61
+ get { return this.totalContainedItems; }
62
+ }
63
+
64
+ /// <summary>
65
+ /// Gets the flag specifying whether this collection is synchronized. Always returns false.
66
+ /// </summary>
67
+ /// <value>The flag specifying whether this collection is synchronized. Always returns false.</value>
68
+ public bool IsSynchronized
69
+ {
70
+ get { return false; }
71
+ }
72
+
73
+ /// <summary>
74
+ /// Gets an object external callers can synchronize on.
75
+ /// </summary>
76
+ /// <value>An object external callers can synchronize on.</value>
77
+ public object SyncRoot
78
+ {
79
+ get { return this; }
80
+ }
81
+
82
+ /// <summary>
83
+ /// Adds a child element to this collection.
84
+ /// </summary>
85
+ /// <param name="element">The element to add.</param>
86
+ /// <exception cref="ArgumentException">Thrown if the child is not of an allowed type.</exception>
87
+ public void AddElement(ISchemaElement element)
88
+ {
89
+ foreach (object obj in this.items)
90
+ {
91
+ bool containerUsed;
92
+
93
+ CollectionItem collectionItem = obj as CollectionItem;
94
+ if (collectionItem != null)
95
+ {
96
+ containerUsed = collectionItem.Elements.Count != 0;
97
+ if (collectionItem.ElementType.IsAssignableFrom(element.GetType()))
98
+ {
99
+ collectionItem.AddElement(element);
100
+
101
+ if (!containerUsed)
102
+ {
103
+ this.containersUsed++;
104
+ }
105
+
106
+ this.totalContainedItems++;
107
+ return;
108
+ }
109
+
110
+ continue;
111
+ }
112
+
113
+ ElementCollection collection = obj as ElementCollection;
114
+ if (collection != null)
115
+ {
116
+ containerUsed = collection.Count != 0;
117
+
118
+ try
119
+ {
120
+ collection.AddElement(element);
121
+
122
+ if (!containerUsed)
123
+ {
124
+ this.containersUsed++;
125
+ }
126
+
127
+ this.totalContainedItems++;
128
+ return;
129
+ }
130
+ catch (ArgumentException)
131
+ {
132
+ // Eat the exception and keep looking. We'll throw our own if we can't find its home.
133
+ }
134
+
135
+ continue;
136
+ }
137
+ }
138
+
139
+ throw new ArgumentException(String.Format(
140
+ CultureInfo.InvariantCulture,
141
+ WixDataStrings.EXP_ElementOfTypeIsNotValidForThisCollection,
142
+ element.GetType().Name));
143
+ }
144
+
145
+ /// <summary>
146
+ /// Removes a child element from this collection.
147
+ /// </summary>
148
+ /// <param name="element">The element to remove.</param>
149
+ /// <exception cref="ArgumentException">Thrown if the element is not of an allowed type.</exception>
150
+ public void RemoveElement(ISchemaElement element)
151
+ {
152
+ foreach (object obj in this.items)
153
+ {
154
+ CollectionItem collectionItem = obj as CollectionItem;
155
+ if (collectionItem != null)
156
+ {
157
+ if (collectionItem.ElementType.IsAssignableFrom(element.GetType()))
158
+ {
159
+ if (collectionItem.Elements.Count == 0)
160
+ {
161
+ return;
162
+ }
163
+
164
+ collectionItem.RemoveElement(element);
165
+
166
+ if (collectionItem.Elements.Count == 0)
167
+ {
168
+ this.containersUsed--;
169
+ }
170
+
171
+ this.totalContainedItems--;
172
+ return;
173
+ }
174
+
175
+ continue;
176
+ }
177
+
178
+ ElementCollection collection = obj as ElementCollection;
179
+ if (collection != null)
180
+ {
181
+ if (collection.Count == 0)
182
+ {
183
+ continue;
184
+ }
185
+
186
+ try
187
+ {
188
+ collection.RemoveElement(element);
189
+
190
+ if (collection.Count == 0)
191
+ {
192
+ this.containersUsed--;
193
+ }
194
+
195
+ this.totalContainedItems--;
196
+ return;
197
+ }
198
+ catch (ArgumentException)
199
+ {
200
+ // Eat the exception and keep looking. We'll throw our own if we can't find its home.
201
+ }
202
+
203
+ continue;
204
+ }
205
+ }
206
+
207
+ throw new ArgumentException(String.Format(
208
+ CultureInfo.InvariantCulture,
209
+ WixDataStrings.EXP_ElementOfTypeIsNotValidForThisCollection,
210
+ element.GetType().Name));
211
+ }
212
+
213
+ /// <summary>
214
+ /// Copies this collection to an array.
215
+ /// </summary>
216
+ /// <param name="array">Array to copy to.</param>
217
+ /// <param name="index">Offset into the array.</param>
218
+ public void CopyTo(Array array, int index)
219
+ {
220
+ int item = 0;
221
+ foreach (ISchemaElement element in this)
222
+ {
223
+ array.SetValue(element, (long)(item + index));
224
+ item++;
225
+ }
226
+ }
227
+
228
+ /// <summary>
229
+ /// Creates an enumerator for walking the elements in this collection.
230
+ /// </summary>
231
+ /// <returns>A newly created enumerator.</returns>
232
+ public IEnumerator GetEnumerator()
233
+ {
234
+ return new ElementCollectionEnumerator(this);
235
+ }
236
+
237
+ /// <summary>
238
+ /// Gets an enumerable collection of children of a given type.
239
+ /// </summary>
240
+ /// <param name="childType">Type of children to get.</param>
241
+ /// <returns>A collection of children.</returns>
242
+ /// <exception cref="ArgumentException">Thrown if the type isn't a valid child type.</exception>
243
+ public IEnumerable Filter(Type childType)
244
+ {
245
+ foreach (object container in this.items)
246
+ {
247
+ CollectionItem collectionItem = container as CollectionItem;
248
+ if (collectionItem != null)
249
+ {
250
+ if (collectionItem.ElementType.IsAssignableFrom(childType))
251
+ {
252
+ return collectionItem.Elements;
253
+ }
254
+
255
+ continue;
256
+ }
257
+
258
+ ElementCollection elementCollection = container as ElementCollection;
259
+ if (elementCollection != null)
260
+ {
261
+ IEnumerable nestedFilter = elementCollection.Filter(childType);
262
+ if (nestedFilter != null)
263
+ {
264
+ return nestedFilter;
265
+ }
266
+
267
+ continue;
268
+ }
269
+ }
270
+
271
+ throw new ArgumentException(String.Format(
272
+ CultureInfo.InvariantCulture,
273
+ WixDataStrings.EXP_TypeIsNotValidForThisCollection,
274
+ childType.Name));
275
+ }
276
+
277
+ /// <summary>
278
+ /// Adds a type to this collection.
279
+ /// </summary>
280
+ /// <param name="collectionItem">CollectionItem representing the type to add.</param>
281
+ public void AddItem(CollectionItem collectionItem)
282
+ {
283
+ this.items.Add(collectionItem);
284
+ }
285
+
286
+ /// <summary>
287
+ /// Adds a nested collection to this collection.
288
+ /// </summary>
289
+ /// <param name="collection">ElementCollection to add.</param>
290
+ public void AddCollection(ElementCollection collection)
291
+ {
292
+ this.items.Add(collection);
293
+ }
294
+
295
+ /// <summary>
296
+ /// Class used to represent a given type in the child collection of an element. Abstract,
297
+ /// has subclasses for choice and sequence (which can do cardinality checks).
298
+ /// </summary>
299
+ public abstract class CollectionItem
300
+ {
301
+ private Type elementType;
302
+ private ArrayList elements;
303
+
304
+ /// <summary>
305
+ /// Creates a new CollectionItem for the given element type.
306
+ /// </summary>
307
+ /// <param name="elementType">Type of the element for this collection item.</param>
308
+ protected CollectionItem(Type elementType)
309
+ {
310
+ this.elementType = elementType;
311
+ this.elements = new ArrayList();
312
+ }
313
+
314
+ /// <summary>
315
+ /// Gets the type of this collection's items.
316
+ /// </summary>
317
+ /// <value>The type of this collection's items.</value>
318
+ public Type ElementType
319
+ {
320
+ get { return this.elementType; }
321
+ }
322
+
323
+ /// <summary>
324
+ /// Gets the elements of this collection.
325
+ /// </summary>
326
+ /// <value>The elements of this collection.</value>
327
+ public ArrayList Elements
328
+ {
329
+ get { return this.elements; }
330
+ }
331
+
332
+ /// <summary>
333
+ /// Adds an element to this collection. Must be of an assignable type to the collection's
334
+ /// type.
335
+ /// </summary>
336
+ /// <param name="element">The element to add.</param>
337
+ /// <exception cref="ArgumentException">Thrown if the type isn't assignable to the collection's type.</exception>
338
+ public void AddElement(ISchemaElement element)
339
+ {
340
+ if (!this.elementType.IsAssignableFrom(element.GetType()))
341
+ {
342
+ throw new ArgumentException(
343
+ String.Format(
344
+ CultureInfo.InvariantCulture,
345
+ WixDataStrings.EXP_ElementIsSubclassOfDifferentType,
346
+ this.elementType.Name,
347
+ element.GetType().Name),
348
+ "element");
349
+ }
350
+
351
+ this.elements.Add(element);
352
+ }
353
+
354
+ /// <summary>
355
+ /// Removes an element from this collection.
356
+ /// </summary>
357
+ /// <param name="element">The element to remove.</param>
358
+ /// <exception cref="ArgumentException">Thrown if the element's type isn't assignable to the collection's type.</exception>
359
+ public void RemoveElement(ISchemaElement element)
360
+ {
361
+ if (!this.elementType.IsAssignableFrom(element.GetType()))
362
+ {
363
+ throw new ArgumentException(
364
+ String.Format(
365
+ CultureInfo.InvariantCulture,
366
+ WixDataStrings.EXP_ElementIsSubclassOfDifferentType,
367
+ this.elementType.Name,
368
+ element.GetType().Name),
369
+ "element");
370
+ }
371
+
372
+ this.elements.Remove(element);
373
+ }
374
+ }
375
+
376
+ /// <summary>
377
+ /// Class representing a choice item. Doesn't do cardinality checks.
378
+ /// </summary>
379
+ public class ChoiceItem : CollectionItem
380
+ {
381
+ /// <summary>
382
+ /// Creates a new choice item.
383
+ /// </summary>
384
+ /// <param name="elementType">Type of the created item.</param>
385
+ public ChoiceItem(Type elementType)
386
+ : base(elementType)
387
+ {
388
+ }
389
+ }
390
+
391
+ /// <summary>
392
+ /// Class representing a sequence item. Can do cardinality checks, if required.
393
+ /// </summary>
394
+ public class SequenceItem : CollectionItem
395
+ {
396
+ /// <summary>
397
+ /// Creates a new sequence item.
398
+ /// </summary>
399
+ /// <param name="elementType">Type of the created item.</param>
400
+ public SequenceItem(Type elementType)
401
+ : base(elementType)
402
+ {
403
+ }
404
+ }
405
+
406
+ /// <summary>
407
+ /// Enumerator for the ElementCollection.
408
+ /// </summary>
409
+ private class ElementCollectionEnumerator : IEnumerator
410
+ {
411
+ private ElementCollection collection;
412
+ private Stack collectionStack;
413
+
414
+ /// <summary>
415
+ /// Creates a new ElementCollectionEnumerator.
416
+ /// </summary>
417
+ /// <param name="collection">The collection to create an enumerator for.</param>
418
+ public ElementCollectionEnumerator(ElementCollection collection)
419
+ {
420
+ this.collection = collection;
421
+ }
422
+
423
+ /// <summary>
424
+ /// Gets the current object from the enumerator.
425
+ /// </summary>
426
+ public object Current
427
+ {
428
+ get
429
+ {
430
+ if (this.collectionStack != null && this.collectionStack.Count > 0)
431
+ {
432
+ CollectionTuple tuple = (CollectionTuple)this.collectionStack.Peek();
433
+ object container = tuple.Collection.items[tuple.ContainerIndex];
434
+
435
+ CollectionItem collectionItem = container as CollectionItem;
436
+ if (collectionItem != null)
437
+ {
438
+ return collectionItem.Elements[tuple.ItemIndex];
439
+ }
440
+
441
+ throw new InvalidOperationException(String.Format(
442
+ CultureInfo.InvariantCulture,
443
+ WixDataStrings.EXP_ElementMustBeChoiceItemOrSequenceItem,
444
+ container.GetType().Name));
445
+ }
446
+
447
+ return null;
448
+ }
449
+ }
450
+
451
+ /// <summary>
452
+ /// Resets the enumerator to the beginning.
453
+ /// </summary>
454
+ public void Reset()
455
+ {
456
+ if (this.collectionStack != null)
457
+ {
458
+ this.collectionStack.Clear();
459
+ this.collectionStack = null;
460
+ }
461
+ }
462
+
463
+ /// <summary>
464
+ /// Moves the enumerator to the next item.
465
+ /// </summary>
466
+ /// <returns>True if there is a next item, false otherwise.</returns>
467
+ public bool MoveNext()
468
+ {
469
+ if (this.collectionStack == null)
470
+ {
471
+ if (this.collection.Count == 0)
472
+ {
473
+ return false;
474
+ }
475
+
476
+ this.collectionStack = new Stack();
477
+ this.collectionStack.Push(new CollectionTuple(this.collection));
478
+ }
479
+
480
+ CollectionTuple tuple = (CollectionTuple)this.collectionStack.Peek();
481
+
482
+ if (this.FindNext(tuple))
483
+ {
484
+ return true;
485
+ }
486
+
487
+ this.collectionStack.Pop();
488
+ if (this.collectionStack.Count == 0)
489
+ {
490
+ return false;
491
+ }
492
+
493
+ return this.MoveNext();
494
+ }
495
+
496
+ /// <summary>
497
+ /// Pushes a collection onto the stack.
498
+ /// </summary>
499
+ /// <param name="elementCollection">The collection to push.</param>
500
+ private void PushCollection(ElementCollection elementCollection)
501
+ {
502
+ if (elementCollection.Count <= 0)
503
+ {
504
+ throw new ArgumentException(String.Format(
505
+ CultureInfo.InvariantCulture,
506
+ WixDataStrings.EXP_CollectionMustHaveAtLeastOneElement,
507
+ elementCollection.Count));
508
+ }
509
+
510
+ CollectionTuple tuple = new CollectionTuple(elementCollection);
511
+ this.collectionStack.Push(tuple);
512
+ this.FindNext(tuple);
513
+ }
514
+
515
+ /// <summary>
516
+ /// Finds the next item from a given tuple.
517
+ /// </summary>
518
+ /// <param name="tuple">The tuple to start looking from.</param>
519
+ /// <returns>True if a next element is found, false otherwise.</returns>
520
+ private bool FindNext(CollectionTuple tuple)
521
+ {
522
+ object container = tuple.Collection.items[tuple.ContainerIndex];
523
+
524
+ CollectionItem collectionItem = container as CollectionItem;
525
+ if (collectionItem != null)
526
+ {
527
+ if (tuple.ItemIndex + 1 < collectionItem.Elements.Count)
528
+ {
529
+ tuple.ItemIndex++;
530
+ return true;
531
+ }
532
+ }
533
+
534
+ ElementCollection elementCollection = container as ElementCollection;
535
+ if (elementCollection != null && elementCollection.Count > 0 && tuple.ItemIndex == -1)
536
+ {
537
+ tuple.ItemIndex++;
538
+ this.PushCollection(elementCollection);
539
+ return true;
540
+ }
541
+
542
+ tuple.ItemIndex = 0;
543
+
544
+ for (int i = tuple.ContainerIndex + 1; i < tuple.Collection.items.Count; ++i)
545
+ {
546
+ object nestedContainer = tuple.Collection.items[i];
547
+
548
+ CollectionItem nestedCollectionItem = nestedContainer as CollectionItem;
549
+ if (nestedCollectionItem != null)
550
+ {
551
+ if (nestedCollectionItem.Elements.Count > 0)
552
+ {
553
+ tuple.ContainerIndex = i;
554
+ return true;
555
+ }
556
+ }
557
+
558
+ ElementCollection nestedElementCollection = nestedContainer as ElementCollection;
559
+ if (nestedElementCollection != null && nestedElementCollection.Count > 0)
560
+ {
561
+ tuple.ContainerIndex = i;
562
+ this.PushCollection(nestedElementCollection);
563
+ return true;
564
+ }
565
+ }
566
+
567
+ return false;
568
+ }
569
+
570
+ /// <summary>
571
+ /// Class representing a single point in the collection. Consists of an ElementCollection,
572
+ /// a container index, and an index into the container.
573
+ /// </summary>
574
+ private class CollectionTuple
575
+ {
576
+ private ElementCollection collection;
577
+ private int containerIndex;
578
+ private int itemIndex = -1;
579
+
580
+ /// <summary>
581
+ /// Creates a new CollectionTuple.
582
+ /// </summary>
583
+ /// <param name="collection">The collection for the tuple.</param>
584
+ public CollectionTuple(ElementCollection collection)
585
+ {
586
+ this.collection = collection;
587
+ }
588
+
589
+ /// <summary>
590
+ /// Gets the collection for the tuple.
591
+ /// </summary>
592
+ public ElementCollection Collection
593
+ {
594
+ get { return this.collection; }
595
+ }
596
+
597
+ /// <summary>
598
+ /// Gets and sets the index of the container in the collection.
599
+ /// </summary>
600
+ public int ContainerIndex
601
+ {
602
+ get { return this.containerIndex; }
603
+ set { this.containerIndex = value; }
604
+ }
605
+
606
+ /// <summary>
607
+ /// Gets and sets the index of the item in the container.
608
+ /// </summary>
609
+ public int ItemIndex
610
+ {
611
+ get { return this.itemIndex; }
612
+ set { this.itemIndex = value; }
613
+ }
614
+ }
615
+ }
616
+ }
617
+}
src/WixToolset.Data/SourceLineNumber.cs
new
+205
@@ -0,0 +1,205 @@
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 System;
6
+ using System.IO;
7
+ using System.Text;
8
+ using System.Xml;
9
+ using System.Xml.Linq;
10
+
11
+ /// <summary>
12
+ /// Represents file name and line number for source file
13
+ /// </summary>
14
+ public sealed class SourceLineNumber
15
+ {
16
+ /// <summary>
17
+ /// Constructor for a source with no line information.
18
+ /// </summary>
19
+ /// <param name="fileName">File name of the source.</param>
20
+ public SourceLineNumber(string fileName)
21
+ {
22
+ this.FileName = fileName;
23
+ }
24
+
25
+ /// <summary>
26
+ /// Constructor for a source with line information.
27
+ /// </summary>
28
+ /// <param name="fileName">File name of the source.</param>
29
+ /// <param name="lineNumber">Line number of the source.</param>
30
+ public SourceLineNumber(string fileName, int lineNumber)
31
+ {
32
+ this.FileName = fileName;
33
+ this.LineNumber = lineNumber;
34
+ }
35
+
36
+ /// <summary>
37
+ /// Gets the file name of the source.
38
+ /// </summary>
39
+ /// <value>File name for the source.</value>
40
+ public string FileName { get; private set; }
41
+
42
+ /// <summary>
43
+ /// Gets or sets the line number of the source.
44
+ /// </summary>
45
+ /// <value>Line number of the source.</value>
46
+ public int? LineNumber { get; set; }
47
+
48
+ /// <summary>
49
+ /// Gets or sets the parent source line number that included this source line number.
50
+ /// </summary>
51
+ public SourceLineNumber Parent { get; set; }
52
+
53
+ /// <summary>
54
+ /// Gets the file name and line information.
55
+ /// </summary>
56
+ /// <value>File name and line information.</value>
57
+ public string QualifiedFileName
58
+ {
59
+ get
60
+ {
61
+ return this.LineNumber.HasValue ? String.Concat(this.FileName, "*", this.LineNumber) : this.FileName;
62
+ }
63
+ }
64
+
65
+ /// <summary>
66
+ /// Creates a source line number from an encoded string.
67
+ /// </summary>
68
+ /// <param name="encodedSourceLineNumbers">Encoded string to parse.</param>
69
+ public static SourceLineNumber CreateFromEncoded(string encodedSourceLineNumbers)
70
+ {
71
+ string[] linesSplit = encodedSourceLineNumbers.Split('|');
72
+
73
+ SourceLineNumber first = null;
74
+ SourceLineNumber parent = null;
75
+ for (int i = 0; i < linesSplit.Length; ++i)
76
+ {
77
+ string[] filenameSplit = linesSplit[i].Split('*');
78
+ SourceLineNumber source;
79
+
80
+ if (2 == filenameSplit.Length)
81
+ {
82
+ source = new SourceLineNumber(filenameSplit[0], Convert.ToInt32(filenameSplit[1]));
83
+ }
84
+ else
85
+ {
86
+ source = new SourceLineNumber(filenameSplit[0]);
87
+ }
88
+
89
+ if (null != parent)
90
+ {
91
+ parent.Parent = source;
92
+ }
93
+
94
+ parent = source;
95
+ if (null == first)
96
+ {
97
+ first = parent;
98
+ }
99
+ }
100
+
101
+ return first;
102
+ }
103
+
104
+ /// <summary>
105
+ /// Creates a source line number from a URI.
106
+ /// </summary>
107
+ /// <param name="uri">Uri to convert into source line number</param>
108
+ public static SourceLineNumber CreateFromUri(string uri)
109
+ {
110
+ if (String.IsNullOrEmpty(uri))
111
+ {
112
+ return null;
113
+ }
114
+
115
+ // make the local path look like a normal local path
116
+ string localPath = new Uri(uri).LocalPath;
117
+ localPath = localPath.TrimStart(Path.AltDirectorySeparatorChar).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
118
+
119
+ return new SourceLineNumber(localPath);
120
+ }
121
+
122
+ /// <summary>
123
+ /// Creates a source line number from an XObject.
124
+ /// </summary>
125
+ /// <param name="node">XML node to create source line number from.</param>
126
+ /// <param name="offset">Optional line number offset into XML file not already included in the line information.</param>
127
+ public static SourceLineNumber CreateFromXObject(XObject node, int offset = 0)
128
+ {
129
+ string uri = node.BaseUri;
130
+ IXmlLineInfo lineInfo = node as IXmlLineInfo;
131
+
132
+ SourceLineNumber result = CreateFromUri(uri);
133
+ if (null != result && null != lineInfo)
134
+ {
135
+ result.LineNumber = lineInfo.LineNumber + offset;
136
+ }
137
+
138
+ return result;
139
+ }
140
+
141
+ /// <summary>
142
+ /// Get the source line information for the current element. Typically this information
143
+ /// is set by the precompiler for each element that it encounters.
144
+ /// </summary>
145
+ /// <param name="node">Element to get source line information for.</param>
146
+ /// <returns>
147
+ /// The source line number used to author the element being processed or
148
+ /// null if the preprocessor did not process the element or the node is
149
+ /// not an element.
150
+ /// </returns>
151
+ public static SourceLineNumber GetFromXAnnotation(XObject node)
152
+ {
153
+ return node.Annotation<SourceLineNumber>();
154
+ }
155
+
156
+ /// <summary>
157
+ /// Returns the SourceLineNumber and parents encoded as a string.
158
+ /// </summary>
159
+ public string GetEncoded()
160
+ {
161
+ StringBuilder sb = new StringBuilder(this.QualifiedFileName);
162
+
163
+ for (SourceLineNumber source = this.Parent; null != source; source = source.Parent)
164
+ {
165
+ sb.Append("|");
166
+ sb.Append(source.QualifiedFileName);
167
+ }
168
+
169
+ return sb.ToString();
170
+ }
171
+
172
+ /// <summary>
173
+ /// Determines if two SourceLineNumbers are equivalent.
174
+ /// </summary>
175
+ /// <param name="obj">Object to compare.</param>
176
+ /// <returns>True if SourceLineNumbers are equivalent.</returns>
177
+ public override bool Equals(object obj)
178
+ {
179
+ SourceLineNumber other = obj as SourceLineNumber;
180
+ return null != other &&
181
+ this.LineNumber.HasValue == other.LineNumber.HasValue &&
182
+ (!this.LineNumber.HasValue || this.LineNumber == other.LineNumber) &&
183
+ this.FileName.Equals(other.FileName, StringComparison.OrdinalIgnoreCase) &&
184
+ (null == this.Parent && null == other.Parent || this.Parent.Equals(other.Parent));
185
+ }
186
+
187
+ /// <summary>
188
+ /// Serves as a hash code for a particular type.
189
+ /// </summary>
190
+ /// <returns>The hash code.</returns>
191
+ public override int GetHashCode()
192
+ {
193
+ return this.GetEncoded().GetHashCode();
194
+ }
195
+
196
+ /// <summary>
197
+ /// Shows a string representation of a source line number.
198
+ /// </summary>
199
+ /// <returns>String representation of a source line number.</returns>
200
+ public override string ToString()
201
+ {
202
+ return this.LineNumber.HasValue && !String.IsNullOrEmpty(this.FileName) ? String.Concat(this.FileName, "(", this.LineNumber, ")") : this.FileName ?? String.Empty;
203
+ }
204
+ }
205
+}
src/WixToolset.Data/SubStorage.cs
new
+109
@@ -0,0 +1,109 @@
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 System.Xml;
6
+
7
+ /// <summary>
8
+ /// Substorage inside an output.
9
+ /// </summary>
10
+ public sealed class SubStorage
11
+ {
12
+ /// <summary>
13
+ /// Instantiate a new substorage.
14
+ /// </summary>
15
+ /// <param name="name">The substorage name.</param>
16
+ /// <param name="data">The substorage data.</param>
17
+ public SubStorage(string name, Output data)
18
+ {
19
+ this.Name = name;
20
+ this.Data = data;
21
+ }
22
+
23
+ /// <summary>
24
+ /// Gets the substorage name.
25
+ /// </summary>
26
+ /// <value>The substorage name.</value>
27
+ public string Name { get; private set; }
28
+
29
+ /// <summary>
30
+ /// Gets the substorage data.
31
+ /// </summary>
32
+ /// <value>The substorage data.</value>
33
+ public Output Data { get; private set; }
34
+
35
+ /// <summary>
36
+ /// Creates a SubStorage from the XmlReader.
37
+ /// </summary>
38
+ /// <param name="reader">Reader to get data from.</param>
39
+ /// <returns>New SubStorage object.</returns>
40
+ internal static SubStorage Read(XmlReader reader)
41
+ {
42
+ if (!reader.LocalName.Equals("subStorage" == reader.LocalName))
43
+ {
44
+ throw new XmlException();
45
+ }
46
+
47
+ Output data = null;
48
+ bool empty = reader.IsEmptyElement;
49
+ string name = null;
50
+
51
+ while (reader.MoveToNextAttribute())
52
+ {
53
+ switch (reader.LocalName)
54
+ {
55
+ case "name":
56
+ name = reader.Value;
57
+ break;
58
+ }
59
+ }
60
+
61
+ if (!empty)
62
+ {
63
+ bool done = false;
64
+
65
+ while (!done && reader.Read())
66
+ {
67
+ switch (reader.NodeType)
68
+ {
69
+ case XmlNodeType.Element:
70
+ switch (reader.LocalName)
71
+ {
72
+ case "wixOutput":
73
+ data = Output.Read(reader, true);
74
+ break;
75
+ default:
76
+ throw new XmlException();
77
+ }
78
+ break;
79
+ case XmlNodeType.EndElement:
80
+ done = true;
81
+ break;
82
+ }
83
+ }
84
+
85
+ if (!done)
86
+ {
87
+ throw new XmlException();
88
+ }
89
+ }
90
+
91
+ return new SubStorage(name, data);
92
+ }
93
+
94
+ /// <summary>
95
+ /// Persists a SubStorage in an XML format.
96
+ /// </summary>
97
+ /// <param name="writer">XmlWriter where the SubStorage should persist itself as XML.</param>
98
+ internal void Write(XmlWriter writer)
99
+ {
100
+ writer.WriteStartElement("subStorage", Output.XmlNamespaceUri);
101
+
102
+ writer.WriteAttributeString("name", this.Name);
103
+
104
+ this.Data.Write(writer);
105
+
106
+ writer.WriteEndElement();
107
+ }
108
+ }
109
+}
src/WixToolset.Data/Symbol.cs
new
+89
@@ -0,0 +1,89 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Linq;
8
+
9
+ /// <summary>
10
+ /// Symbol representing a single row in a database.
11
+ /// </summary>
12
+ public sealed class Symbol
13
+ {
14
+ private HashSet<Symbol> possibleConflictSymbols;
15
+ private HashSet<Symbol> redundantSymbols;
16
+
17
+ /// <summary>
18
+ /// Creates a symbol for a row.
19
+ /// </summary>
20
+ /// <param name="row">Row for the symbol</param>
21
+ public Symbol(Row row)
22
+ {
23
+ this.Row = row;
24
+ this.Name = String.Concat(this.Row.TableDefinition.Name, ":", this.Row.GetPrimaryKey());
25
+ }
26
+
27
+ /// <summary>
28
+ /// Gets the accessibility of the symbol which is a direct reflection of the accessibility of the row's accessibility.
29
+ /// </summary>
30
+ /// <value>Accessbility of the symbol.</value>
31
+ public AccessModifier Access { get { return this.Row.Access; } }
32
+
33
+ /// <summary>
34
+ /// Gets the name of the symbol.
35
+ /// </summary>
36
+ /// <value>Name of the symbol.</value>
37
+ public string Name { get; private set; }
38
+
39
+ /// <summary>
40
+ /// Gets the row for this symbol.
41
+ /// </summary>
42
+ /// <value>Row for this symbol.</value>
43
+ public Row Row { get; private set; }
44
+
45
+ /// <summary>
46
+ /// Gets the section for the symbol.
47
+ /// </summary>
48
+ /// <value>Section for the symbol.</value>
49
+ public Section Section { get { return this.Row.Section; } }
50
+
51
+ /// <summary>
52
+ /// Gets any duplicates of this symbol that are possible conflicts.
53
+ /// </summary>
54
+ public IEnumerable<Symbol> PossiblyConflictingSymbols { get { return this.possibleConflictSymbols ?? Enumerable.Empty<Symbol>(); } }
55
+
56
+ /// <summary>
57
+ /// Gets any duplicates of this symbol that are redundant.
58
+ /// </summary>
59
+ public IEnumerable<Symbol> RedundantSymbols { get { return this.redundantSymbols ?? Enumerable.Empty<Symbol>(); } }
60
+
61
+ /// <summary>
62
+ /// Adds a duplicate symbol that is a possible conflict.
63
+ /// </summary>
64
+ /// <param name="symbol">Symbol that is a possible conflict of this symbol.</param>
65
+ public void AddPossibleConflict(Symbol symbol)
66
+ {
67
+ if (null == this.possibleConflictSymbols)
68
+ {
69
+ this.possibleConflictSymbols = new HashSet<Symbol>();
70
+ }
71
+
72
+ this.possibleConflictSymbols.Add(symbol);
73
+ }
74
+
75
+ /// <summary>
76
+ /// Adds a duplicate symbol that is redundant.
77
+ /// </summary>
78
+ /// <param name="symbol">Symbol that is redundant of this symbol.</param>
79
+ public void AddRedundant(Symbol symbol)
80
+ {
81
+ if (null == this.redundantSymbols)
82
+ {
83
+ this.redundantSymbols = new HashSet<Symbol>();
84
+ }
85
+
86
+ this.redundantSymbols.Add(symbol);
87
+ }
88
+ }
89
+}
src/WixToolset.Data/Table.cs
new
+446
@@ -0,0 +1,446 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Diagnostics;
8
+ using System.Diagnostics.CodeAnalysis;
9
+ using System.Globalization;
10
+ using System.IO;
11
+ using System.Text;
12
+ using System.Xml;
13
+ using WixToolset.Data.Rows;
14
+
15
+ /// <summary>
16
+ /// Object that represents a table in a database.
17
+ /// </summary>
18
+ public sealed class Table
19
+ {
20
+ /// <summary>
21
+ /// Creates a table in a section.
22
+ /// </summary>
23
+ /// <param name="section">Section to add table to.</param>
24
+ /// <param name="tableDefinition">Definition of the table.</param>
25
+ public Table(Section section, TableDefinition tableDefinition)
26
+ {
27
+ this.Section = section;
28
+ this.Definition = tableDefinition;
29
+ this.Rows = new List<Row>();
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets the section for the table.
34
+ /// </summary>
35
+ /// <value>Section for the table.</value>
36
+ public Section Section { get; private set; }
37
+
38
+ /// <summary>
39
+ /// Gets the table definition.
40
+ /// </summary>
41
+ /// <value>Definition of the table.</value>
42
+ public TableDefinition Definition { get; private set; }
43
+
44
+ /// <summary>
45
+ /// Gets the name of the table.
46
+ /// </summary>
47
+ /// <value>Name of the table.</value>
48
+ public string Name
49
+ {
50
+ get { return this.Definition.Name; }
51
+ }
52
+
53
+ /// <summary>
54
+ /// Gets or sets the table transform operation.
55
+ /// </summary>
56
+ /// <value>The table transform operation.</value>
57
+ public TableOperation Operation { get; set; }
58
+
59
+ /// <summary>
60
+ /// Gets the rows contained in the table.
61
+ /// </summary>
62
+ /// <value>Rows contained in the table.</value>
63
+ public IList<Row> Rows { get; private set; }
64
+
65
+ /// <summary>
66
+ /// Creates a new row in the table.
67
+ /// </summary>
68
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
69
+ /// <param name="add">Specifies whether to only create the row or add it to the table automatically.</param>
70
+ /// <returns>Row created in table.</returns>
71
+ public Row CreateRow(SourceLineNumber sourceLineNumbers, bool add = true)
72
+ {
73
+ Row row;
74
+
75
+ switch (this.Name)
76
+ {
77
+ case "BBControl":
78
+ row = new BBControlRow(sourceLineNumbers, this);
79
+ break;
80
+ case "WixBundlePackage":
81
+ row = new WixBundlePackageRow(sourceLineNumbers, this);
82
+ break;
83
+ case "WixBundleExePackage":
84
+ row = new WixBundleExePackageRow(sourceLineNumbers, this);
85
+ break;
86
+ case "WixBundleMsiPackage":
87
+ row = new WixBundleMsiPackageRow(sourceLineNumbers, this);
88
+ break;
89
+ case "WixBundleMspPackage":
90
+ row = new WixBundleMspPackageRow(sourceLineNumbers, this);
91
+ break;
92
+ case "WixBundleMsuPackage":
93
+ row = new WixBundleMsuPackageRow(sourceLineNumbers, this);
94
+ break;
95
+ case "Component":
96
+ row = new ComponentRow(sourceLineNumbers, this);
97
+ break;
98
+ case "WixBundleContainer":
99
+ row = new WixBundleContainerRow(sourceLineNumbers, this);
100
+ break;
101
+ case "Control":
102
+ row = new ControlRow(sourceLineNumbers, this);
103
+ break;
104
+ case "File":
105
+ row = new FileRow(sourceLineNumbers, this);
106
+ break;
107
+ case "WixBundleMsiFeature":
108
+ row = new WixBundleMsiFeatureRow(sourceLineNumbers, this);
109
+ break;
110
+ case "WixBundleMsiProperty":
111
+ row = new WixBundleMsiPropertyRow(sourceLineNumbers, this);
112
+ break;
113
+ case "Media":
114
+ row = new MediaRow(sourceLineNumbers, this);
115
+ break;
116
+ case "WixBundlePayload":
117
+ row = new WixBundlePayloadRow(sourceLineNumbers, this);
118
+ break;
119
+ case "Property":
120
+ row = new PropertyRow(sourceLineNumbers, this);
121
+ break;
122
+ case "WixRelatedBundle":
123
+ row = new WixRelatedBundleRow(sourceLineNumbers, this);
124
+ break;
125
+ case "WixBundleRelatedPackage":
126
+ row = new WixBundleRelatedPackageRow(sourceLineNumbers, this);
127
+ break;
128
+ case "WixBundleRollbackBoundary":
129
+ row = new WixBundleRollbackBoundaryRow(sourceLineNumbers, this);
130
+ break;
131
+ case "Upgrade":
132
+ row = new UpgradeRow(sourceLineNumbers, this);
133
+ break;
134
+ case "WixBundleVariable":
135
+ row = new WixBundleVariableRow(sourceLineNumbers, this);
136
+ break;
137
+ case "WixAction":
138
+ row = new WixActionRow(sourceLineNumbers, this);
139
+ break;
140
+ case "WixApprovedExeForElevation":
141
+ row = new WixApprovedExeForElevationRow(sourceLineNumbers, this);
142
+ break;
143
+ case "WixBundle":
144
+ row = new WixBundleRow(sourceLineNumbers, this);
145
+ break;
146
+ case "WixBundlePackageExitCode":
147
+ row = new WixBundlePackageExitCodeRow(sourceLineNumbers, this);
148
+ break;
149
+ case "WixBundlePatchTargetCode":
150
+ row = new WixBundlePatchTargetCodeRow(sourceLineNumbers, this);
151
+ break;
152
+ case "WixBundleSlipstreamMsp":
153
+ row = new WixBundleSlipstreamMspRow(sourceLineNumbers, this);
154
+ break;
155
+ case "WixBundleUpdate":
156
+ row = new WixBundleUpdateRow(sourceLineNumbers, this);
157
+ break;
158
+ case "WixBundleCatalog":
159
+ row = new WixBundleCatalogRow(sourceLineNumbers, this);
160
+ break;
161
+ case "WixChain":
162
+ row = new WixChainRow(sourceLineNumbers, this);
163
+ break;
164
+ case "WixChainItem":
165
+ row = new WixChainItemRow(sourceLineNumbers, this);
166
+ break;
167
+ case "WixBundlePackageCommandLine":
168
+ row = new WixBundlePackageCommandLineRow(sourceLineNumbers, this);
169
+ break;
170
+ case "WixComplexReference":
171
+ row = new WixComplexReferenceRow(sourceLineNumbers, this);
172
+ break;
173
+ case "WixDeltaPatchFile":
174
+ row = new WixDeltaPatchFileRow(sourceLineNumbers, this);
175
+ break;
176
+ case "WixDeltaPatchSymbolPaths":
177
+ row = new WixDeltaPatchSymbolPathsRow(sourceLineNumbers, this);
178
+ break;
179
+ case "WixFile":
180
+ row = new WixFileRow(sourceLineNumbers, this);
181
+ break;
182
+ case "WixGroup":
183
+ row = new WixGroupRow(sourceLineNumbers, this);
184
+ break;
185
+ case "WixMedia":
186
+ row = new WixMediaRow(sourceLineNumbers, this);
187
+ break;
188
+ case "WixMediaTemplate":
189
+ row = new WixMediaTemplateRow(sourceLineNumbers, this);
190
+ break;
191
+ case "WixMerge":
192
+ row = new WixMergeRow(sourceLineNumbers, this);
193
+ break;
194
+ case "WixPayloadProperties":
195
+ row = new WixPayloadPropertiesRow(sourceLineNumbers, this);
196
+ break;
197
+ case "WixProperty":
198
+ row = new WixPropertyRow(sourceLineNumbers, this);
199
+ break;
200
+ case "WixSimpleReference":
201
+ row = new WixSimpleReferenceRow(sourceLineNumbers, this);
202
+ break;
203
+ case "WixUpdateRegistration":
204
+ row = new WixUpdateRegistrationRow(sourceLineNumbers, this);
205
+ break;
206
+ case "WixVariable":
207
+ row = new WixVariableRow(sourceLineNumbers, this);
208
+ break;
209
+
210
+ default:
211
+ row = new Row(sourceLineNumbers, this);
212
+ break;
213
+ }
214
+
215
+ if (add)
216
+ {
217
+ this.Rows.Add(row);
218
+ }
219
+
220
+ return row;
221
+ }
222
+
223
+ /// <summary>
224
+ /// Parse a table from the xml.
225
+ /// </summary>
226
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
227
+ /// <param name="section">Section to populate with persisted data.</param>
228
+ /// <param name="tableDefinitions">TableDefinitions to use in the intermediate.</param>
229
+ /// <returns>The parsed table.</returns>
230
+ internal static Table Read(XmlReader reader, Section section, TableDefinitionCollection tableDefinitions)
231
+ {
232
+ Debug.Assert("table" == reader.LocalName);
233
+
234
+ bool empty = reader.IsEmptyElement;
235
+ TableOperation operation = TableOperation.None;
236
+ string name = null;
237
+
238
+ while (reader.MoveToNextAttribute())
239
+ {
240
+ switch (reader.LocalName)
241
+ {
242
+ case "name":
243
+ name = reader.Value;
244
+ break;
245
+ case "op":
246
+ switch (reader.Value)
247
+ {
248
+ case "add":
249
+ operation = TableOperation.Add;
250
+ break;
251
+ case "drop":
252
+ operation = TableOperation.Drop;
253
+ break;
254
+ default:
255
+ throw new XmlException();
256
+ }
257
+ break;
258
+ }
259
+ }
260
+
261
+ if (null == name)
262
+ {
263
+ throw new XmlException();
264
+ }
265
+
266
+ TableDefinition tableDefinition = tableDefinitions[name];
267
+ Table table = new Table(section, tableDefinition);
268
+ table.Operation = operation;
269
+
270
+ if (!empty)
271
+ {
272
+ bool done = false;
273
+
274
+ // loop through all the rows in a table
275
+ while (!done && reader.Read())
276
+ {
277
+ switch (reader.NodeType)
278
+ {
279
+ case XmlNodeType.Element:
280
+ switch (reader.LocalName)
281
+ {
282
+ case "row":
283
+ Row.Read(reader, table);
284
+ break;
285
+ default:
286
+ throw new XmlException();
287
+ }
288
+ break;
289
+ case XmlNodeType.EndElement:
290
+ done = true;
291
+ break;
292
+ }
293
+ }
294
+
295
+ if (!done)
296
+ {
297
+ throw new XmlException();
298
+ }
299
+ }
300
+
301
+ return table;
302
+ }
303
+
304
+ /// <summary>
305
+ /// Modularize the table.
306
+ /// </summary>
307
+ /// <param name="modularizationGuid">String containing the GUID of the Merge Module, if appropriate.</param>
308
+ /// <param name="suppressModularizationIdentifiers">Optional collection of identifiers that should not be modularized.</param>
309
+ public void Modularize(string modularizationGuid, ISet<string> suppressModularizationIdentifiers)
310
+ {
311
+ List<int> modularizedColumns = new List<int>();
312
+
313
+ // find the modularized columns
314
+ for (int i = 0; i < this.Definition.Columns.Count; i++)
315
+ {
316
+ if (ColumnModularizeType.None != this.Definition.Columns[i].ModularizeType)
317
+ {
318
+ modularizedColumns.Add(i);
319
+ }
320
+ }
321
+
322
+ if (0 < modularizedColumns.Count)
323
+ {
324
+ foreach (Row row in this.Rows)
325
+ {
326
+ foreach (int modularizedColumn in modularizedColumns)
327
+ {
328
+ Field field = row.Fields[modularizedColumn];
329
+
330
+ if (null != field.Data)
331
+ {
332
+ field.Data = row.GetModularizedValue(field, modularizationGuid, suppressModularizationIdentifiers);
333
+ }
334
+ }
335
+ }
336
+ }
337
+ }
338
+
339
+ /// <summary>
340
+ /// Persists a row in an XML format.
341
+ /// </summary>
342
+ /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param>
343
+ [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " +
344
+ "in a change to the way the intermediate files are generated, potentially causing extra churn in patches on an MSI built from an older version of WiX. " +
345
+ "Furthermore, there is no security hole here, as the strings won't need to make a round trip")]
346
+ internal void Write(XmlWriter writer)
347
+ {
348
+ if (null == writer)
349
+ {
350
+ throw new ArgumentNullException("writer");
351
+ }
352
+
353
+ writer.WriteStartElement("table", Intermediate.XmlNamespaceUri);
354
+ writer.WriteAttributeString("name", this.Name);
355
+
356
+ if (TableOperation.None != this.Operation)
357
+ {
358
+ writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant());
359
+ }
360
+
361
+ foreach (Row row in this.Rows)
362
+ {
363
+ row.Write(writer);
364
+ }
365
+
366
+ writer.WriteEndElement();
367
+ }
368
+
369
+ /// <summary>
370
+ /// Writes the table in IDT format to the provided stream.
371
+ /// </summary>
372
+ /// <param name="writer">Stream to write the table to.</param>
373
+ /// <param name="keepAddedColumns">Whether to keep columns added in a transform.</param>
374
+ public void ToIdtDefinition(StreamWriter writer, bool keepAddedColumns)
375
+ {
376
+ if (this.Definition.Unreal)
377
+ {
378
+ return;
379
+ }
380
+
381
+ if (TableDefinition.MaxColumnsInRealTable < this.Definition.Columns.Count)
382
+ {
383
+ throw new WixException(WixDataErrors.TooManyColumnsInRealTable(this.Definition.Name, this.Definition.Columns.Count, TableDefinition.MaxColumnsInRealTable));
384
+ }
385
+
386
+ // Tack on the table header, and flush before we start writing bytes directly to the stream.
387
+ writer.Write(this.Definition.ToIdtDefinition(keepAddedColumns));
388
+ writer.Flush();
389
+
390
+ using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(writer.BaseStream))
391
+ using (BufferedStream buffStream = new BufferedStream(wrapper))
392
+ {
393
+ // Create an encoding that replaces characters with question marks, and doesn't throw. We'll
394
+ // use this in case of errors
395
+ Encoding convertEncoding = Encoding.GetEncoding(writer.Encoding.CodePage);
396
+
397
+ foreach (Row row in this.Rows)
398
+ {
399
+ if (row.Redundant)
400
+ {
401
+ continue;
402
+ }
403
+
404
+ string rowString = row.ToIdtDefinition(keepAddedColumns);
405
+ byte[] rowBytes;
406
+
407
+ try
408
+ {
409
+ // GetBytes will throw an exception if any character doesn't match our current encoding
410
+ rowBytes = writer.Encoding.GetBytes(rowString);
411
+ }
412
+ catch (EncoderFallbackException)
413
+ {
414
+ Messaging.Instance.OnMessage(WixDataErrors.InvalidStringForCodepage(row.SourceLineNumbers, Convert.ToString(writer.Encoding.WindowsCodePage, CultureInfo.InvariantCulture)));
415
+
416
+ rowBytes = convertEncoding.GetBytes(rowString);
417
+ }
418
+
419
+ buffStream.Write(rowBytes, 0, rowBytes.Length);
420
+ }
421
+ }
422
+ }
423
+
424
+ /// <summary>
425
+ /// Validates the rows of this OutputTable and throws if it collides on
426
+ /// primary keys.
427
+ /// </summary>
428
+ public void ValidateRows()
429
+ {
430
+ Dictionary<string, SourceLineNumber> primaryKeys = new Dictionary<string, SourceLineNumber>();
431
+
432
+ foreach (Row row in this.Rows)
433
+ {
434
+ string primaryKey = row.GetPrimaryKey();
435
+
436
+ SourceLineNumber collisionSourceLineNumber;
437
+ if (primaryKeys.TryGetValue(primaryKey, out collisionSourceLineNumber))
438
+ {
439
+ throw new WixException(WixDataErrors.DuplicatePrimaryKey(collisionSourceLineNumber, primaryKey, this.Definition.Name));
440
+ }
441
+
442
+ primaryKeys.Add(primaryKey, row.SourceLineNumbers);
443
+ }
444
+ }
445
+ }
446
+}
src/WixToolset.Data/TableDefinition.cs
new
+334
@@ -0,0 +1,334 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Collections.ObjectModel;
8
+ using System.Text;
9
+ using System.Xml;
10
+
11
+ /// <summary>
12
+ /// Definition of a table in a database.
13
+ /// </summary>
14
+ public sealed class TableDefinition : IComparable<TableDefinition>
15
+ {
16
+ /// <summary>
17
+ /// Tracks the maximum number of columns supported in a real table.
18
+ /// This is a Windows Installer limitation.
19
+ /// </summary>
20
+ public const int MaxColumnsInRealTable = 32;
21
+
22
+ /// <summary>
23
+ /// Creates a table definition.
24
+ /// </summary>
25
+ /// <param name="name">Name of table to create.</param>
26
+ /// <param name="createSymbols">Flag if rows in this table create symbols.</param>
27
+ /// <param name="unreal">Flag if table is unreal.</param>
28
+ /// <param name="bootstrapperApplicationData">Flag if table is part of UX Manifest.</param>
29
+ public TableDefinition(string name, IList<ColumnDefinition> columns, bool createSymbols, bool unreal, bool bootstrapperApplicationData = false)
30
+ {
31
+ this.Name = name;
32
+ this.CreateSymbols = createSymbols;
33
+ this.Unreal = unreal;
34
+ this.BootstrapperApplicationData = bootstrapperApplicationData;
35
+
36
+ this.Columns = new ReadOnlyCollection<ColumnDefinition>(columns);
37
+ }
38
+
39
+ /// <summary>
40
+ /// Gets if rows in this table create symbols.
41
+ /// </summary>
42
+ /// <value>Flag if rows in this table create symbols.</value>
43
+ public bool CreateSymbols { get; private set; }
44
+
45
+ /// <summary>
46
+ /// Gets the name of the table.
47
+ /// </summary>
48
+ /// <value>Name of the table.</value>
49
+ public string Name { get; private set; }
50
+
51
+ /// <summary>
52
+ /// Gets if the table is unreal.
53
+ /// </summary>
54
+ /// <value>Flag if table is unreal.</value>
55
+ public bool Unreal { get; private set; }
56
+
57
+ /// <summary>
58
+ /// Gets if the table is a part of the bootstrapper application data manifest.
59
+ /// </summary>
60
+ /// <value>Flag if table is a part of the bootstrapper application data manifest.</value>
61
+ public bool BootstrapperApplicationData { get; private set; }
62
+
63
+ /// <summary>
64
+ /// Gets the collection of column definitions for this table.
65
+ /// </summary>
66
+ /// <value>Collection of column definitions for this table.</value>
67
+ public IList<ColumnDefinition> Columns { get; private set; }
68
+
69
+ /// <summary>
70
+ /// Gets the column definition in the table by index.
71
+ /// </summary>
72
+ /// <param name="columnIndex">Index of column to locate.</param>
73
+ /// <value>Column definition in the table by index.</value>
74
+ public ColumnDefinition this[int columnIndex]
75
+ {
76
+ get { return this.Columns[columnIndex]; }
77
+ }
78
+
79
+ /// <summary>
80
+ /// Gets the table definition in IDT format.
81
+ /// </summary>
82
+ /// <param name="keepAddedColumns">Whether to keep columns added in a transform.</param>
83
+ /// <returns>Table definition in IDT format.</returns>
84
+ public string ToIdtDefinition(bool keepAddedColumns)
85
+ {
86
+ bool first = true;
87
+ StringBuilder columnString = new StringBuilder();
88
+ StringBuilder dataString = new StringBuilder();
89
+ StringBuilder tableString = new StringBuilder();
90
+
91
+ tableString.Append(this.Name);
92
+ foreach (ColumnDefinition column in this.Columns)
93
+ {
94
+ // conditionally keep columns added in a transform; otherwise,
95
+ // break because columns can only be added at the end
96
+ if (column.Added && !keepAddedColumns)
97
+ {
98
+ break;
99
+ }
100
+
101
+ if (!first)
102
+ {
103
+ columnString.Append('\t');
104
+ dataString.Append('\t');
105
+ }
106
+
107
+ columnString.Append(column.Name);
108
+ dataString.Append(column.IdtType);
109
+
110
+ if (column.PrimaryKey)
111
+ {
112
+ tableString.AppendFormat("\t{0}", column.Name);
113
+ }
114
+
115
+ first = false;
116
+ }
117
+ columnString.Append("\r\n");
118
+ columnString.Append(dataString);
119
+ columnString.Append("\r\n");
120
+ columnString.Append(tableString);
121
+ columnString.Append("\r\n");
122
+
123
+ return columnString.ToString();
124
+ }
125
+
126
+ /// <summary>
127
+ /// Adds the validation rows to the _Validation table.
128
+ /// </summary>
129
+ /// <param name="validationTable">The _Validation table.</param>
130
+ public void AddValidationRows(Table validationTable)
131
+ {
132
+ foreach (ColumnDefinition columnDef in this.Columns)
133
+ {
134
+ Row row = validationTable.CreateRow(null);
135
+
136
+ row[0] = this.Name;
137
+
138
+ row[1] = columnDef.Name;
139
+
140
+ if (columnDef.Nullable)
141
+ {
142
+ row[2] = "Y";
143
+ }
144
+ else
145
+ {
146
+ row[2] = "N";
147
+ }
148
+
149
+ if (columnDef.IsMinValueSet)
150
+ {
151
+ row[3] = columnDef.MinValue;
152
+ }
153
+
154
+ if (columnDef.IsMaxValueSet)
155
+ {
156
+ row[4] = columnDef.MaxValue;
157
+ }
158
+
159
+ row[5] = columnDef.KeyTable;
160
+
161
+ if (columnDef.IsKeyColumnSet)
162
+ {
163
+ row[6] = columnDef.KeyColumn;
164
+ }
165
+
166
+ if (ColumnCategory.Unknown != columnDef.Category)
167
+ {
168
+ row[7] = columnDef.Category.ToString();
169
+ }
170
+
171
+ row[8] = columnDef.Possibilities;
172
+
173
+ row[9] = columnDef.Description;
174
+ }
175
+ }
176
+
177
+ /// <summary>
178
+ /// Compares this table definition to another table definition.
179
+ /// </summary>
180
+ /// <remarks>
181
+ /// Only Windows Installer traits are compared, allowing for updates to WiX-specific table definitions.
182
+ /// </remarks>
183
+ /// <param name="updated">The updated <see cref="TableDefinition"/> to compare with this target definition.</param>
184
+ /// <returns>0 if the tables' core properties are the same; otherwise, non-0.</returns>
185
+ public int CompareTo(TableDefinition updated)
186
+ {
187
+ // by definition, this object is greater than null
188
+ if (null == updated)
189
+ {
190
+ return 1;
191
+ }
192
+
193
+ // compare the table names
194
+ int ret = String.Compare(this.Name, updated.Name, StringComparison.Ordinal);
195
+
196
+ // compare the column count
197
+ if (0 == ret)
198
+ {
199
+ // transforms can only add columns
200
+ ret = Math.Min(0, updated.Columns.Count - this.Columns.Count);
201
+
202
+ // compare name, type, and length of each column
203
+ for (int i = 0; 0 == ret && this.Columns.Count > i; i++)
204
+ {
205
+ ColumnDefinition thisColumnDef = this.Columns[i];
206
+ ColumnDefinition updatedColumnDef = updated.Columns[i];
207
+
208
+ ret = thisColumnDef.CompareTo(updatedColumnDef);
209
+ }
210
+ }
211
+
212
+ return ret;
213
+ }
214
+
215
+ /// <summary>
216
+ /// Parses table definition from xml reader.
217
+ /// </summary>
218
+ /// <param name="reader">Reader to get data from.</param>
219
+ /// <returns>The TableDefintion represented by the Xml.</returns>
220
+ internal static TableDefinition Read(XmlReader reader)
221
+ {
222
+ bool empty = reader.IsEmptyElement;
223
+ bool createSymbols = false;
224
+ string name = null;
225
+ bool unreal = false;
226
+ bool bootstrapperApplicationData = false;
227
+
228
+ while (reader.MoveToNextAttribute())
229
+ {
230
+ switch (reader.LocalName)
231
+ {
232
+ case "createSymbols":
233
+ createSymbols = reader.Value.Equals("yes");
234
+ break;
235
+ case "name":
236
+ name = reader.Value;
237
+ break;
238
+ case "unreal":
239
+ unreal = reader.Value.Equals("yes");
240
+ break;
241
+ case "bootstrapperApplicationData":
242
+ bootstrapperApplicationData = reader.Value.Equals("yes");
243
+ break;
244
+ }
245
+ }
246
+
247
+ if (null == name)
248
+ {
249
+ throw new XmlException();
250
+ }
251
+
252
+ List<ColumnDefinition> columns = new List<ColumnDefinition>();
253
+ bool hasPrimaryKeyColumn = false;
254
+
255
+ // parse the child elements
256
+ if (!empty)
257
+ {
258
+ bool done = false;
259
+
260
+ while (!done && reader.Read())
261
+ {
262
+ switch (reader.NodeType)
263
+ {
264
+ case XmlNodeType.Element:
265
+ switch (reader.LocalName)
266
+ {
267
+ case "columnDefinition":
268
+ ColumnDefinition columnDefinition = ColumnDefinition.Read(reader);
269
+ columns.Add(columnDefinition);
270
+
271
+ if (columnDefinition.PrimaryKey)
272
+ {
273
+ hasPrimaryKeyColumn = true;
274
+ }
275
+ break;
276
+ default:
277
+ throw new XmlException();
278
+ }
279
+ break;
280
+ case XmlNodeType.EndElement:
281
+ done = true;
282
+ break;
283
+ }
284
+ }
285
+
286
+ if (!unreal && !bootstrapperApplicationData && !hasPrimaryKeyColumn)
287
+ {
288
+ throw new WixException(WixDataErrors.RealTableMissingPrimaryKeyColumn(SourceLineNumber.CreateFromUri(reader.BaseURI), name));
289
+ }
290
+
291
+ if (!done)
292
+ {
293
+ throw new XmlException();
294
+ }
295
+ }
296
+
297
+ TableDefinition tableDefinition = new TableDefinition(name, columns, createSymbols, unreal, bootstrapperApplicationData);
298
+ return tableDefinition;
299
+ }
300
+
301
+ /// <summary>
302
+ /// Persists an output in an XML format.
303
+ /// </summary>
304
+ /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param>
305
+ internal void Write(XmlWriter writer)
306
+ {
307
+ writer.WriteStartElement("tableDefinition", TableDefinitionCollection.XmlNamespaceUri);
308
+
309
+ writer.WriteAttributeString("name", this.Name);
310
+
311
+ if (this.CreateSymbols)
312
+ {
313
+ writer.WriteAttributeString("createSymbols", "yes");
314
+ }
315
+
316
+ if (this.Unreal)
317
+ {
318
+ writer.WriteAttributeString("unreal", "yes");
319
+ }
320
+
321
+ if (this.BootstrapperApplicationData)
322
+ {
323
+ writer.WriteAttributeString("bootstrapperApplicationData", "yes");
324
+ }
325
+
326
+ foreach (ColumnDefinition columnDefinition in this.Columns)
327
+ {
328
+ columnDefinition.Write(writer);
329
+ }
330
+
331
+ writer.WriteEndElement();
332
+ }
333
+ }
334
+}
src/WixToolset.Data/TableDefinitionCollection.cs
new
+229
@@ -0,0 +1,229 @@
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 System;
6
+ using System.Collections;
7
+ using System.Collections.Generic;
8
+ using System.Linq;
9
+ using System.Xml;
10
+
11
+ /// <summary>
12
+ /// Collection for table definitions indexed by table name.
13
+ /// </summary>
14
+ public sealed class TableDefinitionCollection : ICollection<TableDefinition>
15
+ {
16
+ public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wi/tables";
17
+
18
+ private Dictionary<string, TableDefinition> collection;
19
+
20
+ /// <summary>
21
+ /// Instantiate a new TableDefinitionCollection class.
22
+ /// </summary>
23
+ public TableDefinitionCollection()
24
+ {
25
+ this.collection = new Dictionary<string,TableDefinition>();
26
+ }
27
+
28
+ /// <summary>
29
+ /// Creates a shallow copy of the provided table definition collection.
30
+ /// </summary>
31
+ public TableDefinitionCollection(TableDefinitionCollection tableDefinitions)
32
+ {
33
+ this.collection = new Dictionary<string, TableDefinition>(tableDefinitions.collection);
34
+ }
35
+
36
+ /// <summary>
37
+ /// Gets the number of items in the collection.
38
+ /// </summary>
39
+ /// <value>Number of items in collection.</value>
40
+ public int Count
41
+ {
42
+ get { return this.collection.Count; }
43
+ }
44
+
45
+ /// <summary>
46
+ /// Table definition collections are never read-only.
47
+ /// </summary>
48
+ public bool IsReadOnly
49
+ {
50
+ get { return false; }
51
+ }
52
+
53
+ /// <summary>
54
+ /// Gets a table definition by name.
55
+ /// </summary>
56
+ /// <param name="tableName">Name of table to locate.</param>
57
+ public TableDefinition this[string tableName]
58
+ {
59
+ get
60
+ {
61
+ TableDefinition table;
62
+ if (!this.collection.TryGetValue(tableName, out table))
63
+ {
64
+ throw new WixMissingTableDefinitionException(WixDataErrors.MissingTableDefinition(tableName));
65
+ }
66
+
67
+ return table;
68
+ }
69
+ }
70
+
71
+ /// <summary>
72
+ /// Load a table definition collection from an XmlReader.
73
+ /// </summary>
74
+ /// <param name="reader">Reader to get data from.</param>
75
+ /// <param name="suppressSchema">Suppress xml schema validation while loading.</param>
76
+ /// <returns>The TableDefinitionCollection represented by the xml.</returns>
77
+ public static TableDefinitionCollection Load(XmlReader reader)
78
+ {
79
+ reader.MoveToContent();
80
+
81
+ return Read(reader);
82
+ }
83
+
84
+ /// <summary>
85
+ /// Adds a table definition to the collection.
86
+ /// </summary>
87
+ /// <param name="tableDefinition">Table definition to add to the collection.</param>
88
+ /// <value>Indexes by table definition name.</value>
89
+ public void Add(TableDefinition tableDefinition)
90
+ {
91
+ this.collection.Add(tableDefinition.Name, tableDefinition);
92
+ }
93
+
94
+ /// <summary>
95
+ /// Removes all table definitions from the collection.
96
+ /// </summary>
97
+ public void Clear()
98
+ {
99
+ this.collection.Clear();
100
+ }
101
+
102
+ /// <summary>
103
+ /// Checks if the collection contains a table name.
104
+ /// </summary>
105
+ /// <param name="tableName">The table to check in the collection.</param>
106
+ /// <returns>True if collection contains the table.</returns>
107
+ public bool Contains(string tableName)
108
+ {
109
+ return this.collection.ContainsKey(tableName);
110
+ }
111
+
112
+ /// <summary>
113
+ /// Checks if the collection contains a table.
114
+ /// </summary>
115
+ /// <param name="table">The table to check in the collection.</param>
116
+ /// <returns>True if collection contains the table.</returns>
117
+ public bool Contains(TableDefinition table)
118
+ {
119
+ return this.collection.ContainsKey(table.Name);
120
+ }
121
+
122
+ /// <summary>
123
+ /// Copies table definitions to an arry.
124
+ /// </summary>
125
+ /// <param name="array">Array to copy the table definitions to.</param>
126
+ /// <param name="index">Index in the array to start copying at.</param>
127
+ public void CopyTo(TableDefinition[] array, int index)
128
+ {
129
+ this.collection.Values.CopyTo(array, index);
130
+ }
131
+
132
+ /// <summary>
133
+ /// Removes a table definition from the collection.
134
+ /// </summary>
135
+ /// <param name="table">Table to remove from the collection.</param>
136
+ /// <returns>True if the table definition existed in the collection and was removed.</returns>
137
+ public bool Remove(TableDefinition table)
138
+ {
139
+ return this.collection.Remove(table.Name);
140
+ }
141
+
142
+ /// <summary>
143
+ /// Gets enumerator for the collection.
144
+ /// </summary>
145
+ /// <returns>Enumerator for the collection.</returns>
146
+ public IEnumerator<TableDefinition> GetEnumerator()
147
+ {
148
+ return this.collection.Values.GetEnumerator();
149
+ }
150
+
151
+ /// <summary>
152
+ /// Gets the untyped enumerator for the collection.
153
+ /// </summary>
154
+ /// <returns>Untyped enumerator for the collection.</returns>
155
+ IEnumerator IEnumerable.GetEnumerator()
156
+ {
157
+ return this.collection.Values.GetEnumerator();
158
+ }
159
+
160
+ /// <summary>
161
+ /// Loads a collection of table definitions from a XmlReader in memory.
162
+ /// </summary>
163
+ /// <param name="reader">Reader to get data from.</param>
164
+ /// <returns>The TableDefinitionCollection represented by the xml.</returns>
165
+ internal static TableDefinitionCollection Read(XmlReader reader)
166
+ {
167
+ if ("tableDefinitions" != reader.LocalName)
168
+ {
169
+ throw new XmlException();
170
+ }
171
+
172
+ bool empty = reader.IsEmptyElement;
173
+ TableDefinitionCollection tableDefinitionCollection = new TableDefinitionCollection();
174
+
175
+ while (reader.MoveToNextAttribute())
176
+ {
177
+ }
178
+
179
+ // parse the child elements
180
+ if (!empty)
181
+ {
182
+ bool done = false;
183
+
184
+ while (!done && reader.Read())
185
+ {
186
+ switch (reader.NodeType)
187
+ {
188
+ case XmlNodeType.Element:
189
+ switch (reader.LocalName)
190
+ {
191
+ case "tableDefinition":
192
+ tableDefinitionCollection.Add(TableDefinition.Read(reader));
193
+ break;
194
+ default:
195
+ throw new XmlException();
196
+ }
197
+ break;
198
+ case XmlNodeType.EndElement:
199
+ done = true;
200
+ break;
201
+ }
202
+ }
203
+
204
+ if (!done)
205
+ {
206
+ throw new XmlException();
207
+ }
208
+ }
209
+
210
+ return tableDefinitionCollection;
211
+ }
212
+
213
+ /// <summary>
214
+ /// Persists a TableDefinitionCollection in an XML format.
215
+ /// </summary>
216
+ /// <param name="writer">XmlWriter where the TableDefinitionCollection should persist itself as XML.</param>
217
+ internal void Write(XmlWriter writer)
218
+ {
219
+ writer.WriteStartElement("tableDefinitions", XmlNamespaceUri);
220
+
221
+ foreach (TableDefinition tableDefinition in this.collection.Values.OrderBy(t => t.Name))
222
+ {
223
+ tableDefinition.Write(writer);
224
+ }
225
+
226
+ writer.WriteEndElement();
227
+ }
228
+ }
229
+}
src/WixToolset.Data/TableExtensions.cs
new
+23
@@ -0,0 +1,23 @@
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 System.Collections.Generic;
6
+ using System.Linq;
7
+
8
+ /// <summary>
9
+ /// Methods that extend <see cref="Table"/>.
10
+ /// </summary>
11
+ public static class TableExtensions
12
+ {
13
+ /// <summary>
14
+ /// Gets the rows contained in the table as a particular row type.
15
+ /// </summary>
16
+ /// <param name="table">Table to get rows from.</param>
17
+ /// <remarks>If the <paramref name="table"/> is null, an empty enumerable will be returned.</remarks>
18
+ public static IEnumerable<T> RowsAs<T>(this Table table) where T : Row
19
+ {
20
+ return (null == table) ? Enumerable.Empty<T>() : table.Rows.Cast<T>();
21
+ }
22
+ }
23
+}
src/WixToolset.Data/TableIndexedCollection.cs
new
+153
@@ -0,0 +1,153 @@
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 System;
6
+ using System.Collections.Generic;
7
+ using System.Linq;
8
+
9
+ /// <summary>
10
+ /// Collection for tables.
11
+ /// </summary>
12
+ public sealed class TableIndexedCollection : ICollection<Table>
13
+ {
14
+ private Dictionary<string, Table> collection;
15
+
16
+ /// <summary>
17
+ /// Instantiate a new empty collection.
18
+ /// </summary>
19
+ public TableIndexedCollection()
20
+ {
21
+ this.collection = new Dictionary<string,Table>();
22
+ }
23
+
24
+ /// <summary>
25
+ /// Instantiate a new collection populated with a set of tables.
26
+ /// </summary>
27
+ /// <param name="tables">Set of tables.</param>
28
+ public TableIndexedCollection(IEnumerable<Table> tables)
29
+ {
30
+ this.collection = tables.ToDictionary(t => t.Name);
31
+ }
32
+
33
+ /// <summary>
34
+ /// Gets the number of items in the collection.
35
+ /// </summary>
36
+ /// <value>Number of items in collection.</value>
37
+ public int Count
38
+ {
39
+ get { return this.collection.Count; }
40
+ }
41
+
42
+ /// <summary>
43
+ /// Table indexed collection is never read only.
44
+ /// </summary>
45
+ public bool IsReadOnly
46
+ {
47
+ get { return false; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Adds a table to the collection.
52
+ /// </summary>
53
+ /// <param name="table">Table to add to the collection.</param>
54
+ /// <remarks>Indexes the table by name.</remarks>
55
+ public void Add(Table table)
56
+ {
57
+ this.collection.Add(table.Name, table);
58
+ }
59
+
60
+ /// <summary>
61
+ /// Clear the tables from the collection.
62
+ /// </summary>
63
+ public void Clear()
64
+ {
65
+ this.collection.Clear();
66
+ }
67
+
68
+ /// <summary>
69
+ /// Determines if a table is in the collection.
70
+ /// </summary>
71
+ /// <param name="table">Table to check if it is in the collection.</param>
72
+ /// <returns>True if the table name is in the collection, otherwise false.</returns>
73
+ public bool Contains(Table table)
74
+ {
75
+ return this.collection.ContainsKey(table.Name);
76
+ }
77
+
78
+ /// <summary>
79
+ /// Copies the collection into an array.
80
+ /// </summary>
81
+ /// <param name="array">Array to copy the collection into.</param>
82
+ /// <param name="arrayIndex">Index to start copying from.</param>
83
+ public void CopyTo(Table[] array, int arrayIndex)
84
+ {
85
+ this.collection.Values.CopyTo(array, arrayIndex);
86
+ }
87
+
88
+ /// <summary>
89
+ /// Remove a table from the collection by name.
90
+ /// </summary>
91
+ /// <param name="tableName">Table name to remove from the collection.</param>
92
+ public void Remove(string tableName)
93
+ {
94
+ this.collection.Remove(tableName);
95
+ }
96
+
97
+ /// <summary>
98
+ /// Remove a table from the collection.
99
+ /// </summary>
100
+ /// <param name="table">Table with matching name to remove from the collection.</param>
101
+ public bool Remove(Table table)
102
+ {
103
+ return this.collection.Remove(table.Name);
104
+ }
105
+
106
+ /// <summary>
107
+ /// Gets an enumerator over the whole collection.
108
+ /// </summary>
109
+ /// <returns>Collection enumerator.</returns>
110
+ public IEnumerator<Table> GetEnumerator()
111
+ {
112
+ return this.collection.Values.GetEnumerator();
113
+ }
114
+
115
+ /// <summary>
116
+ /// Gets an untyped enumerator over the whole collection.
117
+ /// </summary>
118
+ /// <returns>Untyped collection enumerator.</returns>
119
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
120
+ {
121
+ return this.collection.Values.GetEnumerator();
122
+ }
123
+
124
+ /// <summary>
125
+ /// Gets a table by name.
126
+ /// </summary>
127
+ /// <param name="tableName">Name of table to locate.</param>
128
+ public Table this[string tableName]
129
+ {
130
+ get
131
+ {
132
+ Table table;
133
+ return this.collection.TryGetValue(tableName, out table) ? table : null;
134
+ }
135
+
136
+ set
137
+ {
138
+ this.collection[tableName] = value;
139
+ }
140
+ }
141
+
142
+ /// <summary>
143
+ /// Tries to find a table by name.
144
+ /// </summary>
145
+ /// <param name="tableName">Table name to locate.</param>
146
+ /// <param name="table">Found table.</param>
147
+ /// <returns>True if table with table name was found, otherwise false.</returns>
148
+ public bool TryGetTable(string tableName, out Table table)
149
+ {
150
+ return this.collection.TryGetValue(tableName, out table);
151
+ }
152
+ }
153
+}
src/WixToolset.Data/TableOperation.cs
new
+25
@@ -0,0 +1,25 @@
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
+ /// <summary>
6
+ /// The table transform operations.
7
+ /// </summary>
8
+ public enum TableOperation
9
+ {
10
+ /// <summary>
11
+ /// No operation.
12
+ /// </summary>
13
+ None,
14
+
15
+ /// <summary>
16
+ /// Added table.
17
+ /// </summary>
18
+ Add,
19
+
20
+ /// <summary>
21
+ /// Dropped table.
22
+ /// </summary>
23
+ Drop,
24
+ }
25
+}
src/WixToolset.Data/WindowsInstallerStandard.cs
new
+444
@@ -0,0 +1,444 @@
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 System.Collections.Generic;
6
+ using System.Reflection;
7
+ using System.Xml;
8
+ using WixToolset.Data.Rows;
9
+
10
+ /// <summary>
11
+ /// Represents the Windows Installer standard objects.
12
+ /// </summary>
13
+ public static class WindowsInstallerStandard
14
+ {
15
+ private static readonly object lockObject = new object();
16
+
17
+ private static TableDefinitionCollection tableDefinitions;
18
+ private static WixActionRowCollection standardActions;
19
+
20
+ private static HashSet<string> standardActionNames;
21
+ private static HashSet<string> standardDirectories;
22
+ private static HashSet<string> standardProperties;
23
+
24
+
25
+ /// <summary>
26
+ /// Gets the table definitions stored in this assembly.
27
+ /// </summary>
28
+ /// <returns>Table definition collection for tables stored in this assembly.</returns>
29
+ public static TableDefinitionCollection GetTableDefinitions()
30
+ {
31
+ lock (lockObject)
32
+ {
33
+ if (null == WindowsInstallerStandard.tableDefinitions)
34
+ {
35
+ using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.tables.xml")))
36
+ {
37
+ tableDefinitions = TableDefinitionCollection.Load(reader);
38
+ }
39
+ }
40
+ }
41
+
42
+ return WindowsInstallerStandard.tableDefinitions;
43
+ }
44
+
45
+ /// <summary>
46
+ /// Gets the standard actions stored in this assembly.
47
+ /// </summary>
48
+ /// <returns>Collection of standard actions in this assembly.</returns>
49
+ public static WixActionRowCollection GetStandardActions()
50
+ {
51
+ lock (lockObject)
52
+ {
53
+ if (null == standardActions)
54
+ {
55
+ using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.actions.xml")))
56
+ {
57
+ standardActions = WixActionRowCollection.Load(reader);
58
+ }
59
+ }
60
+ }
61
+
62
+ return standardActions;
63
+ }
64
+
65
+
66
+ /// <summary>
67
+ /// Gets (and loads if not yet loaded) the list of standard MSI directories.
68
+ /// </summary>
69
+ /// <value>The list of standard MSI directories.</value>
70
+ public static HashSet<string> GetStandardDirectories()
71
+ {
72
+ lock (lockObject)
73
+ {
74
+ if (null == standardDirectories)
75
+ {
76
+ LoadStandardDirectories();
77
+ }
78
+ }
79
+
80
+ return standardDirectories;
81
+ }
82
+
83
+ /// <summary>
84
+ /// Find out if an action is a standard action.
85
+ /// </summary>
86
+ /// <param name="actionName">Name of the action.</param>
87
+ /// <returns>true if the action is standard, false otherwise.</returns>
88
+ public static bool IsStandardAction(string actionName)
89
+ {
90
+ lock (lockObject)
91
+ {
92
+ if (null == standardActionNames)
93
+ {
94
+ standardActionNames = new HashSet<string>();
95
+ standardActionNames.Add("AllocateRegistrySpace");
96
+ standardActionNames.Add("AppSearch");
97
+ standardActionNames.Add("BindImage");
98
+ standardActionNames.Add("CCPSearch");
99
+ standardActionNames.Add("CostFinalize");
100
+ standardActionNames.Add("CostInitialize");
101
+ standardActionNames.Add("CreateFolders");
102
+ standardActionNames.Add("CreateShortcuts");
103
+ standardActionNames.Add("DeleteServices");
104
+ standardActionNames.Add("DisableRollback");
105
+ standardActionNames.Add("DuplicateFiles");
106
+ standardActionNames.Add("ExecuteAction");
107
+ standardActionNames.Add("FileCost");
108
+ standardActionNames.Add("FindRelatedProducts");
109
+ standardActionNames.Add("ForceReboot");
110
+ standardActionNames.Add("InstallAdminPackage");
111
+ standardActionNames.Add("InstallExecute");
112
+ standardActionNames.Add("InstallExecuteAgain");
113
+ standardActionNames.Add("InstallFiles");
114
+ standardActionNames.Add("InstallFinalize");
115
+ standardActionNames.Add("InstallInitialize");
116
+ standardActionNames.Add("InstallODBC");
117
+ standardActionNames.Add("InstallServices");
118
+ standardActionNames.Add("InstallSFPCatalogFile");
119
+ standardActionNames.Add("InstallValidate");
120
+ standardActionNames.Add("IsolateComponents");
121
+ standardActionNames.Add("LaunchConditions");
122
+ standardActionNames.Add("MigrateFeatureStates");
123
+ standardActionNames.Add("MoveFiles");
124
+ standardActionNames.Add("MsiConfigureServices");
125
+ standardActionNames.Add("MsiPublishAssemblies");
126
+ standardActionNames.Add("MsiUnpublishAssemblies");
127
+ standardActionNames.Add("PatchFiles");
128
+ standardActionNames.Add("ProcessComponents");
129
+ standardActionNames.Add("PublishComponents");
130
+ standardActionNames.Add("PublishFeatures");
131
+ standardActionNames.Add("PublishProduct");
132
+ standardActionNames.Add("RegisterClassInfo");
133
+ standardActionNames.Add("RegisterComPlus");
134
+ standardActionNames.Add("RegisterExtensionInfo");
135
+ standardActionNames.Add("RegisterFonts");
136
+ standardActionNames.Add("RegisterMIMEInfo");
137
+ standardActionNames.Add("RegisterProduct");
138
+ standardActionNames.Add("RegisterProgIdInfo");
139
+ standardActionNames.Add("RegisterTypeLibraries");
140
+ standardActionNames.Add("RegisterUser");
141
+ standardActionNames.Add("RemoveDuplicateFiles");
142
+ standardActionNames.Add("RemoveEnvironmentStrings");
143
+ standardActionNames.Add("RemoveExistingProducts");
144
+ standardActionNames.Add("RemoveFiles");
145
+ standardActionNames.Add("RemoveFolders");
146
+ standardActionNames.Add("RemoveIniValues");
147
+ standardActionNames.Add("RemoveODBC");
148
+ standardActionNames.Add("RemoveRegistryValues");
149
+ standardActionNames.Add("RemoveShortcuts");
150
+ standardActionNames.Add("ResolveSource");
151
+ standardActionNames.Add("RMCCPSearch");
152
+ standardActionNames.Add("ScheduleReboot");
153
+ standardActionNames.Add("SelfRegModules");
154
+ standardActionNames.Add("SelfUnregModules");
155
+ standardActionNames.Add("SetODBCFolders");
156
+ standardActionNames.Add("StartServices");
157
+ standardActionNames.Add("StopServices");
158
+ standardActionNames.Add("UnpublishComponents");
159
+ standardActionNames.Add("UnpublishFeatures");
160
+ standardActionNames.Add("UnregisterClassInfo");
161
+ standardActionNames.Add("UnregisterComPlus");
162
+ standardActionNames.Add("UnregisterExtensionInfo");
163
+ standardActionNames.Add("UnregisterFonts");
164
+ standardActionNames.Add("UnregisterMIMEInfo");
165
+ standardActionNames.Add("UnregisterProgIdInfo");
166
+ standardActionNames.Add("UnregisterTypeLibraries");
167
+ standardActionNames.Add("ValidateProductID");
168
+ standardActionNames.Add("WriteEnvironmentStrings");
169
+ standardActionNames.Add("WriteIniValues");
170
+ standardActionNames.Add("WriteRegistryValues");
171
+ }
172
+ }
173
+
174
+ return standardActionNames.Contains(actionName);
175
+ }
176
+
177
+ /// <summary>
178
+ /// Find out if a directory is a standard directory.
179
+ /// </summary>
180
+ /// <param name="directoryName">Name of the directory.</param>
181
+ /// <returns>true if the directory is standard, false otherwise.</returns>
182
+ public static bool IsStandardDirectory(string directoryName)
183
+ {
184
+ lock (lockObject)
185
+ {
186
+ if (null == standardDirectories)
187
+ {
188
+ LoadStandardDirectories();
189
+ }
190
+ }
191
+
192
+ return standardDirectories.Contains(directoryName);
193
+ }
194
+
195
+ /// <summary>
196
+ /// Find out if a property is a standard property.
197
+ /// References:
198
+ /// Title: Property Reference [Windows Installer]:
199
+ /// URL: http://msdn.microsoft.com/library/en-us/msi/setup/property_reference.asp
200
+ /// </summary>
201
+ /// <param name="propertyName">Name of the property.</param>
202
+ /// <returns>true if a property is standard, false otherwise.</returns>
203
+ public static bool IsStandardProperty(string propertyName)
204
+ {
205
+ lock (lockObject)
206
+ {
207
+ if (null == standardProperties)
208
+ {
209
+ standardProperties = new HashSet<string>();
210
+ standardProperties.Add("~"); // REG_MULTI_SZ/NULL marker
211
+ standardProperties.Add("ACTION");
212
+ standardProperties.Add("ADDDEFAULT");
213
+ standardProperties.Add("ADDLOCAL");
214
+ standardProperties.Add("ADDDSOURCE");
215
+ standardProperties.Add("AdminProperties");
216
+ standardProperties.Add("AdminUser");
217
+ standardProperties.Add("ADVERTISE");
218
+ standardProperties.Add("AFTERREBOOT");
219
+ standardProperties.Add("AllowProductCodeMismatches");
220
+ standardProperties.Add("AllowProductVersionMajorMismatches");
221
+ standardProperties.Add("ALLUSERS");
222
+ standardProperties.Add("Alpha");
223
+ standardProperties.Add("ApiPatchingSymbolFlags");
224
+ standardProperties.Add("ARPAUTHORIZEDCDFPREFIX");
225
+ standardProperties.Add("ARPCOMMENTS");
226
+ standardProperties.Add("ARPCONTACT");
227
+ standardProperties.Add("ARPHELPLINK");
228
+ standardProperties.Add("ARPHELPTELEPHONE");
229
+ standardProperties.Add("ARPINSTALLLOCATION");
230
+ standardProperties.Add("ARPNOMODIFY");
231
+ standardProperties.Add("ARPNOREMOVE");
232
+ standardProperties.Add("ARPNOREPAIR");
233
+ standardProperties.Add("ARPPRODUCTIONICON");
234
+ standardProperties.Add("ARPREADME");
235
+ standardProperties.Add("ARPSIZE");
236
+ standardProperties.Add("ARPSYSTEMCOMPONENT");
237
+ standardProperties.Add("ARPULRINFOABOUT");
238
+ standardProperties.Add("ARPURLUPDATEINFO");
239
+ standardProperties.Add("AVAILABLEFREEREG");
240
+ standardProperties.Add("BorderSize");
241
+ standardProperties.Add("BorderTop");
242
+ standardProperties.Add("CaptionHeight");
243
+ standardProperties.Add("CCP_DRIVE");
244
+ standardProperties.Add("ColorBits");
245
+ standardProperties.Add("COMPADDLOCAL");
246
+ standardProperties.Add("COMPADDSOURCE");
247
+ standardProperties.Add("COMPANYNAME");
248
+ standardProperties.Add("ComputerName");
249
+ standardProperties.Add("CostingComplete");
250
+ standardProperties.Add("Date");
251
+ standardProperties.Add("DefaultUIFont");
252
+ standardProperties.Add("DISABLEADVTSHORTCUTS");
253
+ standardProperties.Add("DISABLEMEDIA");
254
+ standardProperties.Add("DISABLEROLLBACK");
255
+ standardProperties.Add("DiskPrompt");
256
+ standardProperties.Add("DontRemoveTempFolderWhenFinished");
257
+ standardProperties.Add("EnableUserControl");
258
+ standardProperties.Add("EXECUTEACTION");
259
+ standardProperties.Add("EXECUTEMODE");
260
+ standardProperties.Add("FASTOEM");
261
+ standardProperties.Add("FILEADDDEFAULT");
262
+ standardProperties.Add("FILEADDLOCAL");
263
+ standardProperties.Add("FILEADDSOURCE");
264
+ standardProperties.Add("IncludeWholeFilesOnly");
265
+ standardProperties.Add("Installed");
266
+ standardProperties.Add("INSTALLLEVEL");
267
+ standardProperties.Add("Intel");
268
+ standardProperties.Add("Intel64");
269
+ standardProperties.Add("IsAdminPackage");
270
+ standardProperties.Add("LeftUnit");
271
+ standardProperties.Add("LIMITUI");
272
+ standardProperties.Add("ListOfPatchGUIDsToReplace");
273
+ standardProperties.Add("ListOfTargetProductCode");
274
+ standardProperties.Add("LOGACTION");
275
+ standardProperties.Add("LogonUser");
276
+ standardProperties.Add("Manufacturer");
277
+ standardProperties.Add("MEDIAPACKAGEPATH");
278
+ standardProperties.Add("MediaSourceDir");
279
+ standardProperties.Add("MinimumRequiredMsiVersion");
280
+ standardProperties.Add("MsiAMD64");
281
+ standardProperties.Add("MSIAPRSETTINGSIDENTIFIER");
282
+ standardProperties.Add("MSICHECKCRCS");
283
+ standardProperties.Add("MSIDISABLERMRESTART");
284
+ standardProperties.Add("MSIENFORCEUPGRADECOMPONENTRULES");
285
+ standardProperties.Add("MSIFASTINSTALL");
286
+ standardProperties.Add("MsiFileToUseToCreatePatchTables");
287
+ standardProperties.Add("MsiHiddenProperties");
288
+ standardProperties.Add("MSIINSTALLPERUSER");
289
+ standardProperties.Add("MSIINSTANCEGUID");
290
+ standardProperties.Add("MsiLogFileLocation");
291
+ standardProperties.Add("MsiLogging");
292
+ standardProperties.Add("MsiNetAssemblySupport");
293
+ standardProperties.Add("MSINEWINSTANCE");
294
+ standardProperties.Add("MSINODISABLEMEDIA");
295
+ standardProperties.Add("MsiNTProductType");
296
+ standardProperties.Add("MsiNTSuiteBackOffice");
297
+ standardProperties.Add("MsiNTSuiteDataCenter");
298
+ standardProperties.Add("MsiNTSuiteEnterprise");
299
+ standardProperties.Add("MsiNTSuiteSmallBusiness");
300
+ standardProperties.Add("MsiNTSuiteSmallBusinessRestricted");
301
+ standardProperties.Add("MsiNTSuiteWebServer");
302
+ standardProperties.Add("MsiNTSuitePersonal");
303
+ standardProperties.Add("MsiPatchRemovalList");
304
+ standardProperties.Add("MSIPATCHREMOVE");
305
+ standardProperties.Add("MSIRESTARTMANAGERCONTROL");
306
+ standardProperties.Add("MsiRestartManagerSessionKey");
307
+ standardProperties.Add("MSIRMSHUTDOWN");
308
+ standardProperties.Add("MsiRunningElevated");
309
+ standardProperties.Add("MsiUIHideCancel");
310
+ standardProperties.Add("MsiUIProgressOnly");
311
+ standardProperties.Add("MsiUISourceResOnly");
312
+ standardProperties.Add("MsiSystemRebootPending");
313
+ standardProperties.Add("MsiWin32AssemblySupport");
314
+ standardProperties.Add("NOCOMPANYNAME");
315
+ standardProperties.Add("NOUSERNAME");
316
+ standardProperties.Add("OLEAdvtSupport");
317
+ standardProperties.Add("OptimizePatchSizeForLargeFiles");
318
+ standardProperties.Add("OriginalDatabase");
319
+ standardProperties.Add("OutOfDiskSpace");
320
+ standardProperties.Add("OutOfNoRbDiskSpace");
321
+ standardProperties.Add("ParentOriginalDatabase");
322
+ standardProperties.Add("ParentProductCode");
323
+ standardProperties.Add("PATCH");
324
+ standardProperties.Add("PATCH_CACHE_DIR");
325
+ standardProperties.Add("PATCH_CACHE_ENABLED");
326
+ standardProperties.Add("PatchGUID");
327
+ standardProperties.Add("PATCHNEWPACKAGECODE");
328
+ standardProperties.Add("PATCHNEWSUMMARYCOMMENTS");
329
+ standardProperties.Add("PATCHNEWSUMMARYSUBJECT");
330
+ standardProperties.Add("PatchOutputPath");
331
+ standardProperties.Add("PatchSourceList");
332
+ standardProperties.Add("PhysicalMemory");
333
+ standardProperties.Add("PIDKEY");
334
+ standardProperties.Add("PIDTemplate");
335
+ standardProperties.Add("Preselected");
336
+ standardProperties.Add("PRIMARYFOLDER");
337
+ standardProperties.Add("PrimaryVolumePath");
338
+ standardProperties.Add("PrimaryVolumeSpaceAvailable");
339
+ standardProperties.Add("PrimaryVolumeSpaceRemaining");
340
+ standardProperties.Add("PrimaryVolumeSpaceRequired");
341
+ standardProperties.Add("Privileged");
342
+ standardProperties.Add("ProductCode");
343
+ standardProperties.Add("ProductID");
344
+ standardProperties.Add("ProductLanguage");
345
+ standardProperties.Add("ProductName");
346
+ standardProperties.Add("ProductState");
347
+ standardProperties.Add("ProductVersion");
348
+ standardProperties.Add("PROMPTROLLBACKCOST");
349
+ standardProperties.Add("REBOOT");
350
+ standardProperties.Add("REBOOTPROMPT");
351
+ standardProperties.Add("RedirectedDllSupport");
352
+ standardProperties.Add("REINSTALL");
353
+ standardProperties.Add("REINSTALLMODE");
354
+ standardProperties.Add("RemoveAdminTS");
355
+ standardProperties.Add("REMOVE");
356
+ standardProperties.Add("ReplacedInUseFiles");
357
+ standardProperties.Add("RestrictedUserControl");
358
+ standardProperties.Add("RESUME");
359
+ standardProperties.Add("RollbackDisabled");
360
+ standardProperties.Add("ROOTDRIVE");
361
+ standardProperties.Add("ScreenX");
362
+ standardProperties.Add("ScreenY");
363
+ standardProperties.Add("SecureCustomProperties");
364
+ standardProperties.Add("ServicePackLevel");
365
+ standardProperties.Add("ServicePackLevelMinor");
366
+ standardProperties.Add("SEQUENCE");
367
+ standardProperties.Add("SharedWindows");
368
+ standardProperties.Add("ShellAdvtSupport");
369
+ standardProperties.Add("SHORTFILENAMES");
370
+ standardProperties.Add("SourceDir");
371
+ standardProperties.Add("SOURCELIST");
372
+ standardProperties.Add("SystemLanguageID");
373
+ standardProperties.Add("TARGETDIR");
374
+ standardProperties.Add("TerminalServer");
375
+ standardProperties.Add("TextHeight");
376
+ standardProperties.Add("Time");
377
+ standardProperties.Add("TRANSFORMS");
378
+ standardProperties.Add("TRANSFORMSATSOURCE");
379
+ standardProperties.Add("TRANSFORMSSECURE");
380
+ standardProperties.Add("TTCSupport");
381
+ standardProperties.Add("UILevel");
382
+ standardProperties.Add("UpdateStarted");
383
+ standardProperties.Add("UpgradeCode");
384
+ standardProperties.Add("UPGRADINGPRODUCTCODE");
385
+ standardProperties.Add("UserLanguageID");
386
+ standardProperties.Add("USERNAME");
387
+ standardProperties.Add("UserSID");
388
+ standardProperties.Add("Version9X");
389
+ standardProperties.Add("VersionDatabase");
390
+ standardProperties.Add("VersionMsi");
391
+ standardProperties.Add("VersionNT");
392
+ standardProperties.Add("VersionNT64");
393
+ standardProperties.Add("VirtualMemory");
394
+ standardProperties.Add("WindowsBuild");
395
+ standardProperties.Add("WindowsVolume");
396
+ }
397
+ }
398
+
399
+ return standardProperties.Contains(propertyName);
400
+ }
401
+
402
+ /// <summary>
403
+ /// Sets up a hashtable with the set of standard MSI directories
404
+ /// </summary>
405
+ private static void LoadStandardDirectories()
406
+ {
407
+ lock (lockObject)
408
+ {
409
+ if (null == standardDirectories)
410
+ {
411
+ standardDirectories = new HashSet<string>();
412
+ standardDirectories.Add("TARGETDIR");
413
+ standardDirectories.Add("AdminToolsFolder");
414
+ standardDirectories.Add("AppDataFolder");
415
+ standardDirectories.Add("CommonAppDataFolder");
416
+ standardDirectories.Add("CommonFilesFolder");
417
+ standardDirectories.Add("DesktopFolder");
418
+ standardDirectories.Add("FavoritesFolder");
419
+ standardDirectories.Add("FontsFolder");
420
+ standardDirectories.Add("LocalAppDataFolder");
421
+ standardDirectories.Add("MyPicturesFolder");
422
+ standardDirectories.Add("PersonalFolder");
423
+ standardDirectories.Add("ProgramFilesFolder");
424
+ standardDirectories.Add("ProgramMenuFolder");
425
+ standardDirectories.Add("SendToFolder");
426
+ standardDirectories.Add("StartMenuFolder");
427
+ standardDirectories.Add("StartupFolder");
428
+ standardDirectories.Add("System16Folder");
429
+ standardDirectories.Add("SystemFolder");
430
+ standardDirectories.Add("TempFolder");
431
+ standardDirectories.Add("TemplateFolder");
432
+ standardDirectories.Add("WindowsFolder");
433
+ standardDirectories.Add("CommonFiles64Folder");
434
+ standardDirectories.Add("ProgramFiles64Folder");
435
+ standardDirectories.Add("System64Folder");
436
+ standardDirectories.Add("NetHoodFolder");
437
+ standardDirectories.Add("PrintHoodFolder");
438
+ standardDirectories.Add("RecentFolder");
439
+ standardDirectories.Add("WindowsVolume");
440
+ }
441
+ }
442
+ }
443
+ }
444
+}
src/WixToolset.Data/WixCorruptFileException.cs
new
+29
@@ -0,0 +1,29 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// Exception when file does not match the expected format.
9
+ /// </summary>
10
+ public class WixCorruptFileException : WixException
11
+ {
12
+ public WixCorruptFileException(string path, FileFormat format, Exception innerException = null)
13
+ : base(WixDataErrors.CorruptFileFormat(path, format.ToString().ToLowerInvariant()), innerException)
14
+ {
15
+ this.Path = path;
16
+ this.FileFormat = format;
17
+ }
18
+
19
+ /// <summary>
20
+ /// Gets the actual file format found in the file.
21
+ /// </summary>
22
+ public FileFormat FileFormat { get; private set; }
23
+
24
+ /// <summary>
25
+ /// Gets the path to the file with unexpected format.
26
+ /// </summary>
27
+ public string Path { get; set; }
28
+ }
29
+}
src/WixToolset.Data/WixDataStrings.Designer.cs
new
+307
@@ -0,0 +1,307 @@
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
+ using System;
5
+
6
+
7
+ /// <summary>
8
+ /// A strongly-typed resource class, for looking up localized strings, etc.
9
+ /// </summary>
10
+ // This class was auto-generated by the StronglyTypedResourceBuilder
11
+ // class via a tool like ResGen or Visual Studio.
12
+ // To add or remove a member, edit your .ResX file then rerun ResGen
13
+ // with the /str option, or rebuild your VS project.
14
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
15
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
16
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
17
+ internal class WixDataStrings {
18
+
19
+ private static global::System.Resources.ResourceManager resourceMan;
20
+
21
+ private static global::System.Globalization.CultureInfo resourceCulture;
22
+
23
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
24
+ internal WixDataStrings() {
25
+ }
26
+
27
+ /// <summary>
28
+ /// Returns the cached ResourceManager instance used by this class.
29
+ /// </summary>
30
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
31
+ internal static global::System.Resources.ResourceManager ResourceManager {
32
+ get {
33
+ if (object.ReferenceEquals(resourceMan, null)) {
34
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WixToolset.Data.WixDataStrings", typeof(WixDataStrings).Assembly);
35
+ resourceMan = temp;
36
+ }
37
+ return resourceMan;
38
+ }
39
+ }
40
+
41
+ /// <summary>
42
+ /// Overrides the current thread's CurrentUICulture property for all
43
+ /// resource lookups using this strongly typed resource class.
44
+ /// </summary>
45
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
46
+ internal static global::System.Globalization.CultureInfo Culture {
47
+ get {
48
+ return resourceCulture;
49
+ }
50
+ set {
51
+ resourceCulture = value;
52
+ }
53
+ }
54
+
55
+ /// <summary>
56
+ /// Looks up a localized string similar to Cannot index into a FileRowCollection that allows duplicate FileIds.
57
+ /// </summary>
58
+ internal static string EXP_CannotIndexIntoFileRowCollection {
59
+ get {
60
+ return ResourceManager.GetString("EXP_CannotIndexIntoFileRowCollection", resourceCulture);
61
+ }
62
+ }
63
+
64
+ /// <summary>
65
+ /// Looks up a localized string similar to The value '{0}' is not a legal identifier and therefore cannot be modularized..
66
+ /// </summary>
67
+ internal static string EXP_CannotModularizeIllegalID {
68
+ get {
69
+ return ResourceManager.GetString("EXP_CannotModularizeIllegalID", resourceCulture);
70
+ }
71
+ }
72
+
73
+ /// <summary>
74
+ /// Looks up a localized string similar to A Merge table FileCompression column cannot be set to the invalid value '{0}'..
75
+ /// </summary>
76
+ internal static string EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue {
77
+ get {
78
+ return ResourceManager.GetString("EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue", resourceCulture);
79
+ }
80
+ }
81
+
82
+ /// <summary>
83
+ /// Looks up a localized string similar to Collection has {0} elements. Must have at least one..
84
+ /// </summary>
85
+ internal static string EXP_CollectionMustHaveAtLeastOneElement {
86
+ get {
87
+ return ResourceManager.GetString("EXP_CollectionMustHaveAtLeastOneElement", resourceCulture);
88
+ }
89
+ }
90
+
91
+ /// <summary>
92
+ /// Looks up a localized string similar to Didn't find duplicated symbol..
93
+ /// </summary>
94
+ internal static string EXP_DidnotFindDuplicateSymbol {
95
+ get {
96
+ return ResourceManager.GetString("EXP_DidnotFindDuplicateSymbol", resourceCulture);
97
+ }
98
+ }
99
+
100
+ /// <summary>
101
+ /// Looks up a localized string similar to Element must be a subclass of {0}, but was of type {1}..
102
+ /// </summary>
103
+ internal static string EXP_ElementIsSubclassOfDifferentType {
104
+ get {
105
+ return ResourceManager.GetString("EXP_ElementIsSubclassOfDifferentType", resourceCulture);
106
+ }
107
+ }
108
+
109
+ /// <summary>
110
+ /// Looks up a localized string similar to Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem..
111
+ /// </summary>
112
+ internal static string EXP_ElementMustBeChoiceItemOrSequenceItem {
113
+ get {
114
+ return ResourceManager.GetString("EXP_ElementMustBeChoiceItemOrSequenceItem", resourceCulture);
115
+ }
116
+ }
117
+
118
+ /// <summary>
119
+ /// Looks up a localized string similar to Element of type {0} is not valid for this collection..
120
+ /// </summary>
121
+ internal static string EXP_ElementOfTypeIsNotValidForThisCollection {
122
+ get {
123
+ return ResourceManager.GetString("EXP_ElementOfTypeIsNotValidForThisCollection", resourceCulture);
124
+ }
125
+ }
126
+
127
+ /// <summary>
128
+ /// Looks up a localized string similar to Expected ComplexReference type..
129
+ /// </summary>
130
+ internal static string EXP_ExpectedComplexReferenceType {
131
+ get {
132
+ return ResourceManager.GetString("EXP_ExpectedComplexReferenceType", resourceCulture);
133
+ }
134
+ }
135
+
136
+ /// <summary>
137
+ /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ICreateChildren..
138
+ /// </summary>
139
+ internal static string EXP_ISchemaElementDoesnotImplementICreateChildren {
140
+ get {
141
+ return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementICreateChildren", resourceCulture);
142
+ }
143
+ }
144
+
145
+ /// <summary>
146
+ /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ISetAttributes..
147
+ /// </summary>
148
+ internal static string EXP_ISchemaElementDoesnotImplementISetAttribute {
149
+ get {
150
+ return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementISetAttribute", resourceCulture);
151
+ }
152
+ }
153
+
154
+ /// <summary>
155
+ /// Looks up a localized string similar to A Merge table FileCompression column contains an invalid value '{0}'..
156
+ /// </summary>
157
+ internal static string EXP_MergeTableFileCompressionColumnContainsInvalidValue {
158
+ get {
159
+ return ResourceManager.GetString("EXP_MergeTableFileCompressionColumnContainsInvalidValue", resourceCulture);
160
+ }
161
+ }
162
+
163
+ /// <summary>
164
+ /// Looks up a localized string similar to Multiple root elements found in file..
165
+ /// </summary>
166
+ internal static string EXP_MultipleRootElementsFoundInFile {
167
+ get {
168
+ return ResourceManager.GetString("EXP_MultipleRootElementsFoundInFile", resourceCulture);
169
+ }
170
+ }
171
+
172
+ /// <summary>
173
+ /// Looks up a localized string similar to The other object is not a FileRow..
174
+ /// </summary>
175
+ internal static string EXP_OtherObjectIsNotFileRow {
176
+ get {
177
+ return ResourceManager.GetString("EXP_OtherObjectIsNotFileRow", resourceCulture);
178
+ }
179
+ }
180
+
181
+ /// <summary>
182
+ /// Looks up a localized string similar to Type {0} is not valid for this collection..
183
+ /// </summary>
184
+ internal static string EXP_TypeIsNotValidForThisCollection {
185
+ get {
186
+ return ResourceManager.GetString("EXP_TypeIsNotValidForThisCollection", resourceCulture);
187
+ }
188
+ }
189
+
190
+ /// <summary>
191
+ /// Looks up a localized string similar to Unexpected entry section type: {0}.
192
+ /// </summary>
193
+ internal static string EXP_UnexpectedEntrySectionType {
194
+ get {
195
+ return ResourceManager.GetString("EXP_UnexpectedEntrySectionType", resourceCulture);
196
+ }
197
+ }
198
+
199
+ /// <summary>
200
+ /// Looks up a localized string similar to Unknown column type: {0}.
201
+ /// </summary>
202
+ internal static string EXP_UnknownColumnType {
203
+ get {
204
+ return ResourceManager.GetString("EXP_UnknownColumnType", resourceCulture);
205
+ }
206
+ }
207
+
208
+ /// <summary>
209
+ /// Looks up a localized string similar to Unknown compression level type: {0}.
210
+ /// </summary>
211
+ internal static string EXP_UnknownCompressionLevelType {
212
+ get {
213
+ return ResourceManager.GetString("EXP_UnknownCompressionLevelType", resourceCulture);
214
+ }
215
+ }
216
+
217
+ /// <summary>
218
+ /// Looks up a localized string similar to The table {0} is not supported..
219
+ /// </summary>
220
+ internal static string EXP_UnsupportedTable {
221
+ get {
222
+ return ResourceManager.GetString("EXP_UnsupportedTable", resourceCulture);
223
+ }
224
+ }
225
+
226
+ /// <summary>
227
+ /// Looks up a localized string similar to XmlElement with name {0} does not have a corresponding ISchemaElement..
228
+ /// </summary>
229
+ internal static string EXP_XmlElementDoesnotHaveISchemaElement {
230
+ get {
231
+ return ResourceManager.GetString("EXP_XmlElementDoesnotHaveISchemaElement", resourceCulture);
232
+ }
233
+ }
234
+
235
+ /// <summary>
236
+ /// Looks up a localized string similar to {0}({1}).
237
+ /// </summary>
238
+ internal static string Format_FirstLineNumber {
239
+ get {
240
+ return ResourceManager.GetString("Format_FirstLineNumber", resourceCulture);
241
+ }
242
+ }
243
+
244
+ /// <summary>
245
+ /// Looks up a localized string similar to {0}.
246
+ /// </summary>
247
+ internal static string Format_InfoMessage {
248
+ get {
249
+ return ResourceManager.GetString("Format_InfoMessage", resourceCulture);
250
+ }
251
+ }
252
+
253
+ /// <summary>
254
+ /// Looks up a localized string similar to {0}: line {1}.
255
+ /// </summary>
256
+ internal static string Format_LineNumber {
257
+ get {
258
+ return ResourceManager.GetString("Format_LineNumber", resourceCulture);
259
+ }
260
+ }
261
+
262
+ /// <summary>
263
+ /// Looks up a localized string similar to {0} : {1} {2}{3:0000} : {4}.
264
+ /// </summary>
265
+ internal static string Format_NonInfoMessage {
266
+ get {
267
+ return ResourceManager.GetString("Format_NonInfoMessage", resourceCulture);
268
+ }
269
+ }
270
+
271
+ /// <summary>
272
+ /// Looks up a localized string similar to Source trace:{0}.
273
+ /// </summary>
274
+ internal static string INF_SourceTrace {
275
+ get {
276
+ return ResourceManager.GetString("INF_SourceTrace", resourceCulture);
277
+ }
278
+ }
279
+
280
+ /// <summary>
281
+ /// Looks up a localized string similar to at {0}{1}.
282
+ /// </summary>
283
+ internal static string INF_SourceTraceLocation {
284
+ get {
285
+ return ResourceManager.GetString("INF_SourceTraceLocation", resourceCulture);
286
+ }
287
+ }
288
+
289
+ /// <summary>
290
+ /// Looks up a localized string similar to error.
291
+ /// </summary>
292
+ internal static string MessageType_Error {
293
+ get {
294
+ return ResourceManager.GetString("MessageType_Error", resourceCulture);
295
+ }
296
+ }
297
+
298
+ /// <summary>
299
+ /// Looks up a localized string similar to warning.
300
+ /// </summary>
301
+ internal static string MessageType_Warning {
302
+ get {
303
+ return ResourceManager.GetString("MessageType_Warning", resourceCulture);
304
+ }
305
+ }
306
+ }
307
+}
src/WixToolset.Data/WixDataStrings.resx
new
+204
@@ -0,0 +1,204 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+ <!--
4
+ Microsoft ResX Schema
5
+
6
+ Version 2.0
7
+
8
+ The primary goals of this format is to allow a simple XML format
9
+ that is mostly human readable. The generation and parsing of the
10
+ various data types are done through the TypeConverter classes
11
+ associated with the data types.
12
+
13
+ Example:
14
+
15
+ ... ado.net/XML headers & schema ...
16
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+ <resheader name="version">2.0</resheader>
18
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+ </data>
25
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+ <comment>This is a comment</comment>
28
+ </data>
29
+
30
+ There are any number of "resheader" rows that contain simple
31
+ name/value pairs.
32
+
33
+ Each data row contains a name, and value. The row also contains a
34
+ type or mimetype. Type corresponds to a .NET class that support
35
+ text/value conversion through the TypeConverter architecture.
36
+ Classes that don't support this are serialized and stored with the
37
+ mimetype set.
38
+
39
+ The mimetype is used for serialized objects, and tells the
40
+ ResXResourceReader how to depersist the object. This is currently not
41
+ extensible. For a given mimetype the value must be set accordingly:
42
+
43
+ Note - application/x-microsoft.net.object.binary.base64 is the format
44
+ that the ResXResourceWriter will generate, however the reader can
45
+ read any of the formats listed below.
46
+
47
+ mimetype: application/x-microsoft.net.object.binary.base64
48
+ value : The object must be serialized with
49
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+ : and then encoded with base64 encoding.
51
+
52
+ mimetype: application/x-microsoft.net.object.soap.base64
53
+ value : The object must be serialized with
54
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+ : and then encoded with base64 encoding.
56
+
57
+ mimetype: application/x-microsoft.net.object.bytearray.base64
58
+ value : The object must be serialized into a byte array
59
+ : using a System.ComponentModel.TypeConverter
60
+ : and then encoded with base64 encoding.
61
+ -->
62
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+ <xsd:element name="root" msdata:IsDataSet="true">
65
+ <xsd:complexType>
66
+ <xsd:choice maxOccurs="unbounded">
67
+ <xsd:element name="metadata">
68
+ <xsd:complexType>
69
+ <xsd:sequence>
70
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+ </xsd:sequence>
72
+ <xsd:attribute name="name" use="required" type="xsd:string" />
73
+ <xsd:attribute name="type" type="xsd:string" />
74
+ <xsd:attribute name="mimetype" type="xsd:string" />
75
+ <xsd:attribute ref="xml:space" />
76
+ </xsd:complexType>
77
+ </xsd:element>
78
+ <xsd:element name="assembly">
79
+ <xsd:complexType>
80
+ <xsd:attribute name="alias" type="xsd:string" />
81
+ <xsd:attribute name="name" type="xsd:string" />
82
+ </xsd:complexType>
83
+ </xsd:element>
84
+ <xsd:element name="data">
85
+ <xsd:complexType>
86
+ <xsd:sequence>
87
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+ </xsd:sequence>
90
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+ <xsd:attribute ref="xml:space" />
94
+ </xsd:complexType>
95
+ </xsd:element>
96
+ <xsd:element name="resheader">
97
+ <xsd:complexType>
98
+ <xsd:sequence>
99
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+ </xsd:sequence>
101
+ <xsd:attribute name="name" type="xsd:string" use="required" />
102
+ </xsd:complexType>
103
+ </xsd:element>
104
+ </xsd:choice>
105
+ </xsd:complexType>
106
+ </xsd:element>
107
+ </xsd:schema>
108
+ <resheader name="resmimetype">
109
+ <value>text/microsoft-resx</value>
110
+ </resheader>
111
+ <resheader name="version">
112
+ <value>2.0</value>
113
+ </resheader>
114
+ <resheader name="reader">
115
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+ </resheader>
117
+ <resheader name="writer">
118
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+ </resheader>
120
+ <data name="EXP_UnexpectedEntrySectionType" xml:space="preserve">
121
+ <value>Unexpected entry section type: {0}</value>
122
+ </data>
123
+ <data name="EXP_UnsupportedTable" xml:space="preserve">
124
+ <value>The table {0} is not supported.</value>
125
+ </data>
126
+ <data name="EXP_MergeTableFileCompressionColumnContainsInvalidValue" xml:space="preserve">
127
+ <value>A Merge table FileCompression column contains an invalid value '{0}'.</value>
128
+ </data>
129
+ <data name="EXP_OtherObjectIsNotFileRow" xml:space="preserve">
130
+ <value>The other object is not a FileRow.</value>
131
+ </data>
132
+ <data name="EXP_CannotIndexIntoFileRowCollection" xml:space="preserve">
133
+ <value>Cannot index into a FileRowCollection that allows duplicate FileIds</value>
134
+ </data>
135
+ <data name="EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue" xml:space="preserve">
136
+ <value>A Merge table FileCompression column cannot be set to the invalid value '{0}'.</value>
137
+ </data>
138
+ <data name="EXP_ExpectedComplexReferenceType" xml:space="preserve">
139
+ <value>Expected ComplexReference type.</value>
140
+ </data>
141
+ <data name="EXP_CannotModularizeIllegalID" xml:space="preserve">
142
+ <value>The value '{0}' is not a legal identifier and therefore cannot be modularized.</value>
143
+ </data>
144
+ <data name="EXP_DidnotFindDuplicateSymbol" xml:space="preserve">
145
+ <value>Didn't find duplicated symbol.</value>
146
+ </data>
147
+ <data name="EXP_UnknownColumnType" xml:space="preserve">
148
+ <value>Unknown column type: {0}</value>
149
+ </data>
150
+ <data name="EXP_UnknownCompressionLevelType" xml:space="preserve">
151
+ <value>Unknown compression level type: {0}</value>
152
+ </data>
153
+ <data name="Format_FirstLineNumber" xml:space="preserve">
154
+ <value>{0}({1})</value>
155
+ </data>
156
+ <data name="Format_InfoMessage" xml:space="preserve">
157
+ <value>{0}</value>
158
+ </data>
159
+ <data name="Format_LineNumber" xml:space="preserve">
160
+ <value>{0}: line {1}</value>
161
+ </data>
162
+ <data name="Format_NonInfoMessage" xml:space="preserve">
163
+ <value>{0} : {1} {2}{3:0000} : {4}</value>
164
+ </data>
165
+ <data name="INF_SourceTrace" xml:space="preserve">
166
+ <value>Source trace:{0}</value>
167
+ </data>
168
+ <data name="INF_SourceTraceLocation" xml:space="preserve">
169
+ <value>at {0}{1}</value>
170
+ </data>
171
+ <data name="MessageType_Error" xml:space="preserve">
172
+ <value>error</value>
173
+ </data>
174
+ <data name="MessageType_Warning" xml:space="preserve">
175
+ <value>warning</value>
176
+ </data>
177
+ <data name="EXP_MultipleRootElementsFoundInFile" xml:space="preserve">
178
+ <value>Multiple root elements found in file.</value>
179
+ </data>
180
+ <data name="EXP_ISchemaElementDoesnotImplementICreateChildren" xml:space="preserve">
181
+ <value>ISchemaElement with name {0} does not implement ICreateChildren.</value>
182
+ </data>
183
+ <data name="EXP_ISchemaElementDoesnotImplementISetAttribute" xml:space="preserve">
184
+ <value>ISchemaElement with name {0} does not implement ISetAttributes.</value>
185
+ </data>
186
+ <data name="EXP_XmlElementDoesnotHaveISchemaElement" xml:space="preserve">
187
+ <value>XmlElement with name {0} does not have a corresponding ISchemaElement.</value>
188
+ </data>
189
+ <data name="EXP_CollectionMustHaveAtLeastOneElement" xml:space="preserve">
190
+ <value>Collection has {0} elements. Must have at least one.</value>
191
+ </data>
192
+ <data name="EXP_ElementIsSubclassOfDifferentType" xml:space="preserve">
193
+ <value>Element must be a subclass of {0}, but was of type {1}.</value>
194
+ </data>
195
+ <data name="EXP_ElementOfTypeIsNotValidForThisCollection" xml:space="preserve">
196
+ <value>Element of type {0} is not valid for this collection.</value>
197
+ </data>
198
+ <data name="EXP_TypeIsNotValidForThisCollection" xml:space="preserve">
199
+ <value>Type {0} is not valid for this collection.</value>
200
+ </data>
201
+ <data name="EXP_ElementMustBeChoiceItemOrSequenceItem" xml:space="preserve">
202
+ <value>Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem.</value>
203
+ </data>
204
+</root>
\ No newline at end of file
src/WixToolset.Data/WixException.cs
new
+44
@@ -0,0 +1,44 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// Base class for all WiX exceptions.
9
+ /// </summary>
10
+ [Serializable]
11
+ public class WixException : Exception
12
+ {
13
+ private MessageEventArgs error;
14
+
15
+ /// <summary>
16
+ /// Instantiate a new WixException with a given WixError.
17
+ /// </summary>
18
+ /// <param name="error">The localized error information.</param>
19
+ public WixException(MessageEventArgs error)
20
+ : this(error, null)
21
+ {
22
+ }
23
+
24
+ /// <summary>
25
+ /// Instantiate a new WixException with a given WixError.
26
+ /// </summary>
27
+ /// <param name="error">The localized error information.</param>
28
+ /// <param name="exception">Original exception.</param>
29
+ public WixException(MessageEventArgs error, Exception exception) :
30
+ base(error.GenerateMessageString(), exception)
31
+ {
32
+ this.error = error;
33
+ }
34
+
35
+ /// <summary>
36
+ /// Gets the error message.
37
+ /// </summary>
38
+ /// <value>The error message.</value>
39
+ public MessageEventArgs Error
40
+ {
41
+ get { return this.error; }
42
+ }
43
+ }
44
+}
src/WixToolset.Data/WixInvalidIdtException.cs
new
+32
@@ -0,0 +1,32 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// WiX invalid idt exception.
9
+ /// </summary>
10
+ [Serializable]
11
+ public sealed class WixInvalidIdtException : WixException
12
+ {
13
+ /// <summary>
14
+ /// Instantiate a new WixInvalidIdtException.
15
+ /// </summary>
16
+ /// <param name="idtFile">The invalid idt file.</param>
17
+ public WixInvalidIdtException(string idtFile) :
18
+ base(WixDataErrors.InvalidIdt(new SourceLineNumber(idtFile), idtFile))
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Instantiate a new WixInvalidIdtException.
24
+ /// </summary>
25
+ /// <param name="idtFile">The invalid idt file.</param>
26
+ /// <param name="tableName">The table name of the invalid idt file.</param>
27
+ public WixInvalidIdtException(string idtFile, string tableName) :
28
+ base(WixDataErrors.InvalidIdt(new SourceLineNumber(idtFile), idtFile, tableName))
29
+ {
30
+ }
31
+ }
32
+}
src/WixToolset.Data/WixMissingTableDefinitionException.cs
new
+22
@@ -0,0 +1,22 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// Exception thrown when a table definition is missing.
9
+ /// </summary>
10
+ [Serializable]
11
+ public class WixMissingTableDefinitionException : WixException
12
+ {
13
+ /// <summary>
14
+ /// Instantiate new WixMissingTableDefinitionException.
15
+ /// </summary>
16
+ /// <param name="error">Localized error information.</param>
17
+ public WixMissingTableDefinitionException(MessageEventArgs error)
18
+ : base(error)
19
+ {
20
+ }
21
+ }
22
+}
src/WixToolset.Data/WixToolset.Data.csproj
new
+195
@@ -0,0 +1,195 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<Project Sdk="Microsoft.NET.Sdk">
6
+
7
+ <PropertyGroup>
8
+ <TargetFramework>netstandard2.0</TargetFramework>
9
+ <Title>WiX Toolset Data</Title>
10
+ <Description></Description>
11
+ </PropertyGroup>
12
+
13
+<!--
14
+ <ItemGroup>
15
+ <Compile Include="AssemblyInfo.cs" />
16
+ <Compile Include="BundleApprovedExeForElevationAttributes.cs" />
17
+ <Compile Include="ColumnDefinition.cs" />
18
+ <Compile Include="Common.cs" />
19
+ <Compile Include="ComplexReferenceChildType.cs" />
20
+ <Compile Include="ComplexReferenceParentType.cs" />
21
+ <Compile Include="CompressionLevel.cs" />
22
+ <Compile Include="NonClosingStreamWrapper.cs" />
23
+ <Compile Include="DisplayEventArgs.cs" />
24
+ <Compile Include="DuplicateSymbolsException.cs" />
25
+ <Compile Include="EmptyRule.cs" />
26
+ <Compile Include="Field.cs" />
27
+ <Compile Include="FileFormat.cs" />
28
+ <Compile Include="FileStructure.cs" />
29
+ <Compile Include="ILibraryBinaryFileResolver.cs" />
30
+ <Compile Include="IMessageHandler.cs" />
31
+ <Compile Include="Intermediate.cs" />
32
+ <Compile Include="Library.cs" />
33
+ <Compile Include="Localization.cs" />
34
+ <Compile Include="LocalizedControl.cs" />
35
+ <Compile Include="MessageEventArgs.cs" />
36
+ <Compile Include="Messaging.cs" />
37
+ <Compile Include="MessageLevel.cs" />
38
+ <Compile Include="Msi\MsiInterop.cs" />
39
+ <Compile Include="ObjectField.cs" />
40
+ <Compile Include="Output.cs" />
41
+ <Compile Include="OutputType.cs" />
42
+ <Compile Include="PackagingType.cs" />
43
+ <Compile Include="Pdb.cs" />
44
+ <Compile Include="Platform.cs" />
45
+ <Compile Include="Row.cs" />
46
+ <Compile Include="AccessModifier.cs" />
47
+ <Compile Include="RowIndexedList.cs" />
48
+ <Compile Include="RowDictionary.cs" />
49
+ <Compile Include="RowOperation.cs" />
50
+ <Compile Include="Rows\BBControlRow.cs" />
51
+ <Compile Include="Rows\FileAssemblyType.cs" />
52
+ <Compile Include="Rows\SymbolPathType.cs" />
53
+ <Compile Include="Rows\PatchAttributeType.cs" />
54
+ <Compile Include="Rows\WixBundleExePackageAttributes.cs" />
55
+ <Compile Include="Rows\ExitCodeBehaviorType.cs" />
56
+ <Compile Include="Rows\WixBundlePackageCommandLineRow.cs" />
57
+ <Compile Include="Rows\WixBundlePackageExitCodeRow.cs" />
58
+ <Compile Include="Rows\WixBundleSlipstreamMspRow.cs" />
59
+ <Compile Include="Rows\WixChainAttributes.cs" />
60
+ <Compile Include="Rows\WixChainRow.cs" />
61
+ <Compile Include="Rows\WixBundlePackageAttributes.cs" />
62
+ <Compile Include="Rows\WixBundleMspPackageAttributes.cs" />
63
+ <Compile Include="Rows\WixBundleMsiPackageAttributes.cs" />
64
+ <Compile Include="Rows\WixBundleExePackageRow.cs" />
65
+ <Compile Include="Rows\WixBundleMsiFeatureRow.cs" />
66
+ <Compile Include="Rows\WixBundleRelatedPackageRow.cs" />
67
+ <Compile Include="Rows\ContainerType.cs" />
68
+ <Compile Include="Rows\WixBundlePackageType.cs" />
69
+ <Compile Include="Rows\WixBundleContainerRow.cs" />
70
+ <Compile Include="Rows\WixBundleMsiPropertyRow.cs" />
71
+ <Compile Include="Rows\WixBundleRollbackBoundaryRow.cs" />
72
+ <Compile Include="Rows\WixBundleMsuPackageRow.cs" />
73
+ <Compile Include="Rows\WixBundleMspPackageRow.cs" />
74
+ <Compile Include="Rows\WixBundlePackageRow.cs" />
75
+ <Compile Include="Rows\WixBundleMsiPackageRow.cs" />
76
+ <Compile Include="Rows\ComponentRow.cs" />
77
+ <Compile Include="Rows\ControlRow.cs" />
78
+ <Compile Include="Rows\FileRow.cs" />
79
+ <Compile Include="Rows\MediaRow.cs" />
80
+ <Compile Include="Rows\WixBundlePayloadRow.cs" />
81
+ <Compile Include="Rows\SummaryInfoRowCollection.cs" />
82
+ <Compile Include="Rows\PropertyRow.cs" />
83
+ <Compile Include="Rows\UpgradeRow.cs" />
84
+ <Compile Include="Rows\WixBundleVariableRow.cs" />
85
+ <Compile Include="Rows\WixActionRow.cs" />
86
+ <Compile Include="Rows\WixActionRowCollection.cs" />
87
+ <Compile Include="Rows\WixApprovedExeForElevationRow.cs" />
88
+ <Compile Include="Rows\WixBundlePatchTargetCodeRow.cs" />
89
+ <Compile Include="Rows\WixBundleRow.cs" />
90
+ <Compile Include="Rows\WixBundleUpdateRow.cs" />
91
+ <Compile Include="Rows\WixChainItemRow.cs" />
92
+ <Compile Include="Rows\WixBundleCatalogRow.cs" />
93
+ <Compile Include="Rows\WixDeltaPatchSymbolPathsRow.cs" />
94
+ <Compile Include="Rows\WixDeltaPatchFileRow.cs" />
95
+ <Compile Include="Rows\WixGroupRow.cs" />
96
+ <Compile Include="Rows\WixComplexReferenceRow.cs" />
97
+ <Compile Include="Rows\WixFileRow.cs" />
98
+ <Compile Include="Rows\WixMediaRow.cs" />
99
+ <Compile Include="Rows\WixMediaTemplateRow.cs" />
100
+ <Compile Include="Rows\WixMergeRow.cs" />
101
+ <Compile Include="Rows\WixPayloadPropertiesRow.cs" />
102
+ <Compile Include="Rows\WixPropertyRow.cs" />
103
+ <Compile Include="Rows\WixRelatedBundleRow.cs" />
104
+ <Compile Include="Rows\WixSimpleReferenceRow.cs" />
105
+ <Compile Include="Rows\WixUpdateRegistrationRow.cs" />
106
+ <Compile Include="Rows\WixVariableRow.cs" />
107
+ <Compile Include="Section.cs" />
108
+ <Compile Include="SectionType.cs" />
109
+ <Compile Include="Serialize\CodeDomInterfaces.cs" />
110
+ <Compile Include="Serialize\CodeDomReader.cs" />
111
+ <Compile Include="Serialize\ElementCollection.cs" />
112
+ <Compile Include="SourceLineNumber.cs" />
113
+ <Compile Include="SubStorage.cs" />
114
+ <Compile Include="Symbol.cs" />
115
+ <Compile Include="TableExtensions.cs" />
116
+ <Compile Include="Table.cs" />
117
+ <Compile Include="TableIndexedCollection.cs" />
118
+ <Compile Include="TableDefinition.cs" />
119
+ <Compile Include="TableDefinitionCollection.cs" />
120
+ <Compile Include="TableOperation.cs" />
121
+ <Compile Include="WindowsInstallerStandard.cs" />
122
+ <Compile Include="WixCorruptFileException.cs" />
123
+ <Compile Include="WixDataStrings.Designer.cs">
124
+ <DependentUpon>WixDataStrings.resx</DependentUpon>
125
+ <AutoGen>True</AutoGen>
126
+ <DesignTime>True</DesignTime>
127
+ </Compile>
128
+ <Compile Include="WixException.cs" />
129
+ <Compile Include="WixUnexpectedFileFormatException.cs" />
130
+ <Compile Include="WixInvalidIdtException.cs" />
131
+ <Compile Include="WixMissingTableDefinitionException.cs" />
132
+ <Compile Include="YesNoAlwaysType.cs" />
133
+ <Compile Include="YesNoDefaultType.cs" />
134
+ <Compile Include="YesNoType.cs" />
135
+ </ItemGroup>
136
+ <ItemGroup>
137
+ <EmbeddedResource Include="WixDataStrings.resx">
138
+ <Generator>ResXFileCodeGenerator</Generator>
139
+ <LastGenOutput>WixDataStrings.Designer.cs</LastGenOutput>
140
+ <SubType>Designer</SubType>
141
+ </EmbeddedResource>
142
+ </ItemGroup>
143
+ <ItemGroup>
144
+ <EmbeddedFlattenedResource Include="Data\actions.xml">
145
+ <LogicalName>$(RootNamespace).Data.actions.xml</LogicalName>
146
+ </EmbeddedFlattenedResource>
147
+ <EmbeddedFlattenedResource Include="Data\tables.xml">
148
+ <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
149
+ <SubType>Designer</SubType>
150
+ </EmbeddedFlattenedResource>
151
+ </ItemGroup>
152
+ <ItemGroup>
153
+ <MsgGenSource Include="Data\messages.xml">
154
+ <ResourcesLogicalName>$(RootNamespace).Data.messages.resources</ResourcesLogicalName>
155
+ <SubType>Designer</SubType>
156
+ </MsgGenSource>
157
+ </ItemGroup>
158
+ <ItemGroup>
159
+ <XsdGenSource Include="Xsd\wix.xsd">
160
+ <Namespace>WixToolset.Data.Serialize</Namespace>
161
+ </XsdGenSource>
162
+ </ItemGroup>
163
+ <ItemGroup>
164
+ <None Include="Data\Xsd\actions.xsd" />
165
+ <None Include="Data\Xsd\libraries.xsd" />
166
+ <None Include="Data\Xsd\objects.xsd" />
167
+ <None Include="Data\Xsd\outputs.xsd" />
168
+ <None Include="Data\Xsd\pdbs.xsd" />
169
+ <None Include="Data\Xsd\tables.xsd" />
170
+ <None Include="Xsd\wixloc.xsd" />
171
+ </ItemGroup>
172
+ <ItemGroup>
173
+ <Reference Include="System" />
174
+ <Reference Include="System.Xml" />
175
+ <Reference Include="System.Xml.Linq" />
176
+ </ItemGroup>
177
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
178
+ -->
179
+
180
+ <ItemGroup>
181
+ <MsgGenSource Include="Data\messages.xml">
182
+ <ResourcesLogicalName>$(RootNamespace).Data.messages.resources</ResourcesLogicalName>
183
+ </MsgGenSource>
184
+ <XsdGenSource Include="Xsd\wix.xsd">
185
+ <Namespace>WixToolset.Data.Serialize</Namespace>
186
+ </XsdGenSource>
187
+ </ItemGroup>
188
+
189
+ <ItemGroup>
190
+ <PackageReference Include="Nerdbank.GitVersioning" Version="2.0.37-beta" PrivateAssets="all" />
191
+ <PackageReference Include="WixBuildTools.MsgGen" Version="4.0.*" PrivateAssets="all" />
192
+ <PackageReference Include="WixBuildTools.XsdGen" Version="4.0.*" PrivateAssets="all" />
193
+ </ItemGroup>
194
+
195
+</Project>
src/WixToolset.Data/WixUnexpectedFileFormatException.cs
new
+35
@@ -0,0 +1,35 @@
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 System;
6
+
7
+ /// <summary>
8
+ /// Exception when file does not match the expected format.
9
+ /// </summary>
10
+ public class WixUnexpectedFileFormatException : WixException
11
+ {
12
+ public WixUnexpectedFileFormatException(string path, FileFormat expectedFormat, FileFormat format, Exception innerException = null)
13
+ : base(WixDataErrors.UnexpectedFileFormat(path, expectedFormat.ToString().ToLowerInvariant(), format.ToString().ToLowerInvariant()), innerException)
14
+ {
15
+ this.Path = path;
16
+ this.ExpectedFileFormat = expectedFormat;
17
+ this.FileFormat = format;
18
+ }
19
+
20
+ /// <summary>
21
+ /// Gets the expected file format.
22
+ /// </summary>
23
+ public FileFormat ExpectedFileFormat { get; private set; }
24
+
25
+ /// <summary>
26
+ /// Gets the actual file format found in the file.
27
+ /// </summary>
28
+ public FileFormat FileFormat { get; private set; }
29
+
30
+ /// <summary>
31
+ /// Gets the path to the file with unexpected format.
32
+ /// </summary>
33
+ public string Path { get; set; }
34
+ }
35
+}
src/WixToolset.Data/Xsd/wix.xsd
new
+13036
@@ -0,0 +1,13036 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension"
7
+ xmlns:html="http://www.w3.org/1999/xhtml"
8
+ targetNamespace="http://wixtoolset.org/schemas/v4/wxs"
9
+ xmlns="http://wixtoolset.org/schemas/v4/wxs">
10
+ <xs:annotation>
11
+ <xs:documentation>
12
+ Schema for describing Windows Installer database files (.msi/.msm/.pcp).
13
+ </xs:documentation>
14
+ <xs:appinfo>
15
+ <xse:main />
16
+ </xs:appinfo>
17
+ </xs:annotation>
18
+ <xs:import namespace="http://www.w3.org/1999/xhtml" />
19
+ <xs:element name="Wix">
20
+ <xs:annotation>
21
+ <xs:documentation>
22
+ This is the top-level container element for every wxs file. Among the possible children,
23
+ the Bundle, Product, Module, Patch, and PatchCreation elements are analogous to the main function in a C program.
24
+ There can only be one of these present when linking occurs. Product compiles into an msi file,
25
+ Module compiles into an msm file, PatchCreation compiles into a pcp file. The Fragment element
26
+ is an atomic unit which ultimately links into either a Product, Module, or PatchCreation. The
27
+ Fragment can either be completely included or excluded during linking.
28
+ </xs:documentation>
29
+ </xs:annotation>
30
+ <xs:complexType>
31
+ <xs:choice minOccurs="0">
32
+ <xs:sequence>
33
+ <xs:choice minOccurs="0">
34
+ <xs:element ref="Bundle" />
35
+ <xs:element ref="Product" />
36
+ <xs:element ref="Module" />
37
+ <xs:element ref="Patch" />
38
+ </xs:choice>
39
+ <xs:element ref="Fragment" minOccurs="0" maxOccurs="unbounded" />
40
+ </xs:sequence>
41
+ <xs:element ref="PatchCreation" />
42
+ </xs:choice>
43
+ <xs:attribute name="RequiredVersion" type="VersionType">
44
+ <xs:annotation>
45
+ <xs:documentation>Required version of the WiX toolset to compile this input file.</xs:documentation>
46
+ </xs:annotation>
47
+ </xs:attribute>
48
+ <xs:anyAttribute namespace="##other" processContents="lax">
49
+ <xs:annotation>
50
+ <xs:documentation>
51
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional attributes at this point in the schema.
52
+ </xs:documentation>
53
+ </xs:annotation>
54
+ </xs:anyAttribute>
55
+ </xs:complexType>
56
+ </xs:element>
57
+ <xs:element name="Include">
58
+ <xs:annotation>
59
+ <xs:documentation>
60
+ This is the top-level container element for every wxi file.
61
+ </xs:documentation>
62
+ </xs:annotation>
63
+ <xs:complexType>
64
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
65
+ <xs:any namespace="##any" processContents="lax" />
66
+ </xs:choice>
67
+ </xs:complexType>
68
+ </xs:element>
69
+ <xs:element name="Bundle">
70
+ <xs:annotation>
71
+ <xs:documentation>The root element for creating bundled packages.</xs:documentation>
72
+ </xs:annotation>
73
+ <xs:complexType>
74
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
75
+ <xs:element ref="ApprovedExeForElevation" minOccurs="0" maxOccurs="unbounded" />
76
+ <xs:element ref="Log" minOccurs="0" maxOccurs="1" />
77
+ <xs:element ref="Catalog" minOccurs="0" maxOccurs="unbounded" />
78
+ <xs:element ref="BootstrapperApplication" minOccurs="0" maxOccurs="1" />
79
+ <xs:element ref="BootstrapperApplicationRef" minOccurs="0" maxOccurs="1" />
80
+ <xs:element ref="OptionalUpdateRegistration" minOccurs="0" maxOccurs="1" />
81
+ <xs:element ref="Chain" minOccurs="1" maxOccurs="1" />
82
+ <xs:element ref="Container" />
83
+ <xs:element ref="ContainerRef" />
84
+ <xs:element ref="PayloadGroup" />
85
+ <xs:element ref="PayloadGroupRef" />
86
+ <xs:element ref="RelatedBundle" />
87
+ <xs:element ref="Update" />
88
+ <xs:element ref="Variable" />
89
+ <xs:element ref="WixVariable" />
90
+ <xs:any namespace="##other" processContents="lax">
91
+ <xs:annotation>
92
+ <xs:documentation>
93
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
94
+ elements at this point in the schema.
95
+ </xs:documentation>
96
+ </xs:annotation>
97
+ </xs:any>
98
+ </xs:choice>
99
+ <xs:attribute name="AboutUrl" type="xs:string">
100
+ <xs:annotation>
101
+ <xs:documentation>
102
+ A URL for more information about the bundle to display in Programs and Features (also
103
+ known as Add/Remove Programs).
104
+ </xs:documentation>
105
+ </xs:annotation>
106
+ </xs:attribute>
107
+ <xs:attribute name="Copyright" type="xs:string">
108
+ <xs:annotation>
109
+ <xs:documentation>
110
+ The legal copyright found in the version resources of final bundle executable. If
111
+ this attribute is not provided the copyright will be set to "Copyright (c) [Bundle/@Manufacturer]. All rights reserved.".
112
+ </xs:documentation>
113
+ </xs:annotation>
114
+ </xs:attribute>
115
+ <xs:attribute name="Compressed" type="YesNoDefaultTypeUnion">
116
+ <xs:annotation>
117
+ <xs:documentation>Whether Packages and Payloads not assigned to a container should be added to the default attached container or if they should be external. The default is yes.</xs:documentation>
118
+ </xs:annotation>
119
+ </xs:attribute>
120
+ <xs:attribute name="DisableModify" type="YesNoButtonTypeUnion">
121
+ <xs:annotation>
122
+ <xs:documentation>
123
+ Determines whether the bundle can be modified via the Programs and Features (also known as
124
+ Add/Remove Programs). If the value is "button" then Programs and Features will show a single
125
+ "Uninstall/Change" button. If the value is "yes" then Programs and Features will only show
126
+ the "Uninstall" button". If the value is "no", the default, then a "Change" button is shown.
127
+ See the DisableRemove attribute for information how to not display the bundle in Programs
128
+ and Features.
129
+ </xs:documentation>
130
+ </xs:annotation>
131
+ </xs:attribute>
132
+ <xs:attribute name="DisableRemove" type="YesNoTypeUnion">
133
+ <xs:annotation>
134
+ <xs:documentation>
135
+ Determines whether the bundle can be removed via the Programs and Features (also
136
+ known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will
137
+ not be displayed. The default is "no" which ensures there is an "Uninstall" button to
138
+ remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the
139
+ bundle will not be displayed in Progams and Features and another mechanism (such as
140
+ registering as a related bundle addon) must be used to ensure the bundle can be removed.
141
+ </xs:documentation>
142
+ </xs:annotation>
143
+ </xs:attribute>
144
+ <xs:attribute name="DisableRepair" type="YesNoTypeUnion">
145
+ <xs:annotation>
146
+ <xs:appinfo>
147
+ <xse:deprecated />
148
+ </xs:appinfo>
149
+ </xs:annotation>
150
+ </xs:attribute>
151
+ <xs:attribute name="HelpTelephone" type="xs:string">
152
+ <xs:annotation>
153
+ <xs:documentation>
154
+ A telephone number for help to display in Programs and Features (also known as
155
+ Add/Remove Programs).
156
+ </xs:documentation>
157
+ </xs:annotation>
158
+ </xs:attribute>
159
+ <xs:attribute name="HelpUrl" type="xs:string">
160
+ <xs:annotation>
161
+ <xs:documentation>
162
+ A URL to the help for the bundle to display in Programs and Features (also known as
163
+ Add/Remove Programs).
164
+ </xs:documentation>
165
+ </xs:annotation>
166
+ </xs:attribute>
167
+ <xs:attribute name="IconSourceFile" type="xs:string">
168
+ <xs:annotation>
169
+ <xs:documentation>
170
+ Path to an icon that will replace the default icon in the final Bundle executable.
171
+ This icon will also be displayed in Programs and Features (also known as Add/Remove
172
+ Programs).
173
+ </xs:documentation>
174
+ </xs:annotation>
175
+ </xs:attribute>
176
+ <xs:attribute name="Manufacturer" type="xs:string">
177
+ <xs:annotation>
178
+ <xs:documentation>
179
+ The publisher of the bundle to display in Programs and Features (also known as
180
+ Add/Remove Programs).
181
+ </xs:documentation>
182
+ </xs:annotation>
183
+ </xs:attribute>
184
+ <xs:attribute name="Name" type="xs:string">
185
+ <xs:annotation>
186
+ <xs:documentation>
187
+ The name of the bundle to display in Programs and Features (also known as Add/Remove
188
+ Programs). This name can be accessed and overwritten by a BootstrapperApplication
189
+ using the WixBundleName bundle variable.
190
+ </xs:documentation>
191
+ </xs:annotation>
192
+ </xs:attribute>
193
+ <xs:attribute name="ParentName" type="xs:string">
194
+ <xs:annotation>
195
+ <xs:documentation>
196
+ The name of the parent bundle to display in Installed Updates (also known as Add/Remove
197
+ Programs). This name is used to nest or group bundles that will appear as updates.
198
+ If the parent name does not actually exist, a virtual parent is created automatically.
199
+ </xs:documentation>
200
+ </xs:annotation>
201
+ </xs:attribute>
202
+ <xs:attribute name="SplashScreenSourceFile" type="xs:string">
203
+ <xs:annotation>
204
+ <xs:documentation>Path to a bitmap that will be shown as the bootstrapper application is being loaded. If this attribute is not specified, no splash screen will be displayed.</xs:documentation>
205
+ </xs:annotation>
206
+ </xs:attribute>
207
+ <xs:attribute name="Tag" type="xs:string">
208
+ <xs:annotation>
209
+ <xs:documentation>Set this string to uniquely identify this bundle to its own BA, and to related bundles. The value of this string only matters to the BA, and its value has no direct effect on engine functionality.</xs:documentation>
210
+ </xs:annotation>
211
+ </xs:attribute>
212
+ <xs:attribute name="UpdateUrl" type="xs:string">
213
+ <xs:annotation>
214
+ <xs:documentation>
215
+ A URL for updates of the bundle to display in Programs and Features (also
216
+ known as Add/Remove Programs).
217
+ </xs:documentation>
218
+ </xs:annotation>
219
+ </xs:attribute>
220
+ <xs:attribute name="UpgradeCode" type="Guid" use="required">
221
+ <xs:annotation>
222
+ <xs:documentation>
223
+ Unique identifier for a family of bundles. If two bundles have the same UpgradeCode the
224
+ bundle with the highest version will be installed.
225
+ </xs:documentation>
226
+ </xs:annotation>
227
+ </xs:attribute>
228
+ <xs:attribute name="Version" type="xs:string" use="required">
229
+ <xs:annotation>
230
+ <xs:documentation>
231
+ The version of the bundle. Newer versions upgrade earlier versions of the bundles
232
+ with matching UpgradeCodes. If the bundle is registered in Programs and Features
233
+ then this attribute will be displayed in the Programs and Features user interface.
234
+ </xs:documentation>
235
+ </xs:annotation>
236
+ </xs:attribute>
237
+ <xs:attribute name="Condition" type="xs:string">
238
+ <xs:annotation>
239
+ <xs:documentation>
240
+ The condition of the bundle. If the condition is not met, the bundle will
241
+ refuse to run. Conditions are checked before the bootstrapper application is loaded
242
+ (before detect), and thus can only reference built-in variables such as
243
+ variables which indicate the version of the OS.
244
+ </xs:documentation>
245
+ </xs:annotation>
246
+ </xs:attribute>
247
+ <xs:anyAttribute namespace="##other" processContents="lax">
248
+ <xs:annotation>
249
+ <xs:documentation>
250
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
251
+ attributes at this point in the schema.
252
+ </xs:documentation>
253
+ </xs:annotation>
254
+ </xs:anyAttribute>
255
+ </xs:complexType>
256
+ </xs:element>
257
+ <xs:element name="ApprovedExeForElevation">
258
+ <xs:annotation>
259
+ <xs:documentation>Provides information about an .exe so that the BA can request the engine to run it elevated from any secure location.</xs:documentation>
260
+ <xs:appinfo>
261
+ <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Bundle" />
262
+ </xs:appinfo>
263
+ </xs:annotation>
264
+ <xs:complexType>
265
+ <xs:attribute name="Id" type="xs:string" use="required">
266
+ <xs:annotation>
267
+ <xs:documentation>The identifier of the ApprovedExeForElevation element.</xs:documentation>
268
+ </xs:annotation>
269
+ </xs:attribute>
270
+ <xs:attribute name="Key" type="xs:string" use="required">
271
+ <xs:annotation>
272
+ <xs:documentation>
273
+ The key path.
274
+ For security purposes, the root key will be HKLM and Variables are not supported.
275
+ </xs:documentation>
276
+ </xs:annotation>
277
+ </xs:attribute>
278
+ <xs:attribute name="Value" type="xs:string">
279
+ <xs:annotation>
280
+ <xs:documentation>
281
+ The value name.
282
+ For security purposes, Variables are not supported.
283
+ </xs:documentation>
284
+ </xs:annotation>
285
+ </xs:attribute>
286
+ <xs:attribute name="Win64" type="YesNoTypeUnion">
287
+ <xs:annotation>
288
+ <xs:documentation>
289
+ Instructs the search to look in the 64-bit registry when the value is 'yes'.
290
+ When the value is 'no', the search looks in the 32-bit registry.
291
+ The default value is 'no'.
292
+ </xs:documentation>
293
+ </xs:annotation>
294
+ </xs:attribute>
295
+ </xs:complexType>
296
+ </xs:element>
297
+ <xs:element name="Log">
298
+ <xs:annotation>
299
+ <xs:documentation>Overrides the default log settings for a bundle.</xs:documentation>
300
+ <xs:appinfo>
301
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
302
+ </xs:appinfo>
303
+ </xs:annotation>
304
+ <xs:complexType>
305
+ <xs:attribute name="Disable" type="YesNoTypeUnion">
306
+ <xs:annotation>
307
+ <xs:documentation>
308
+ Disables the default logging in the Bundle. The end user can still generate a
309
+ log file by specifying the "-l" command-line argument when installing the
310
+ Bundle.
311
+ </xs:documentation>
312
+ </xs:annotation>
313
+ </xs:attribute>
314
+ <xs:attribute name="PathVariable" type="xs:string">
315
+ <xs:annotation>
316
+ <xs:documentation>
317
+ Name of a Variable that will hold the path to the log file. An empty value
318
+ will cause the variable to not be set. The default is "WixBundleLog".
319
+ </xs:documentation>
320
+ </xs:annotation>
321
+ </xs:attribute>
322
+ <xs:attribute name="Prefix" type="xs:string">
323
+ <xs:annotation>
324
+ <xs:documentation>
325
+ File name and optionally a relative path to use as the prefix for the log file. The
326
+ default is to use the Bundle/@Name or, if Bundle/@Name is not specified, the value
327
+ "Setup".
328
+ </xs:documentation>
329
+ </xs:annotation>
330
+ </xs:attribute>
331
+ <xs:attribute name="Extension" type="xs:string">
332
+ <xs:annotation>
333
+ <xs:documentation>The extension to use for the log. The default is ".log".</xs:documentation>
334
+ </xs:annotation>
335
+ </xs:attribute>
336
+ </xs:complexType>
337
+ </xs:element>
338
+ <xs:element name="Catalog">
339
+ <xs:annotation>
340
+ <xs:documentation>Specify one or more catalog files that will be used to verify the contents of the bundle.</xs:documentation>
341
+ <xs:appinfo>
342
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
343
+ </xs:appinfo>
344
+ </xs:annotation>
345
+ <xs:complexType>
346
+ <xs:attribute name="Id" type="xs:string">
347
+ <xs:annotation>
348
+ <xs:documentation>The identifier of the catalog element.</xs:documentation>
349
+ </xs:annotation>
350
+ </xs:attribute>
351
+ <xs:attribute name="SourceFile" type="xs:string">
352
+ <xs:annotation>
353
+ <xs:documentation>The catalog file</xs:documentation>
354
+ </xs:annotation>
355
+ </xs:attribute>
356
+ </xs:complexType>
357
+ </xs:element>
358
+ <xs:element name="BootstrapperApplication">
359
+ <xs:annotation>
360
+ <xs:documentation>Contains all the relevant information about the setup UI.</xs:documentation>
361
+ <xs:appinfo>
362
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
363
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
364
+ </xs:appinfo>
365
+ </xs:annotation>
366
+ <xs:complexType>
367
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
368
+ <xs:element ref="Payload" />
369
+ <xs:element ref="PayloadGroupRef" />
370
+ <xs:any namespace="##other" processContents="lax">
371
+ <xs:annotation>
372
+ <xs:documentation>
373
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
374
+ elements at this point in the schema.
375
+ </xs:documentation>
376
+ </xs:annotation>
377
+ </xs:any>
378
+ </xs:choice>
379
+ <xs:attribute name="Id" type="xs:string">
380
+ <xs:annotation>
381
+ <xs:documentation>The identifier of the BootstrapperApplication element. Only required if you want to reference this element using a BootstrapperApplicationRef element.</xs:documentation>
382
+ </xs:annotation>
383
+ </xs:attribute>
384
+ <xs:attribute name="SourceFile" type="xs:string">
385
+ <xs:annotation>
386
+ <xs:documentation>The DLL with the bootstrapper application entry function.</xs:documentation>
387
+ </xs:annotation>
388
+ </xs:attribute>
389
+ <xs:attribute name="Name" type="xs:string">
390
+ <xs:annotation>
391
+ <xs:documentation>The relative destination path and file name for the bootstrapper application DLL. The default is the source file name. Use this attribute to rename the bootstrapper application DLL or extract it into a subfolder. The use of '..' directories is not allowed.</xs:documentation>
392
+ </xs:annotation>
393
+ </xs:attribute>
394
+ </xs:complexType>
395
+ </xs:element>
396
+ <xs:element name="BootstrapperApplicationRef">
397
+ <xs:annotation>
398
+ <xs:documentation>Used to reference a BootstrapperApplication element and optionally add additional payloads to the bootstrapper application.</xs:documentation>
399
+ <xs:appinfo>
400
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
401
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
402
+ </xs:appinfo>
403
+ </xs:annotation>
404
+ <xs:complexType>
405
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
406
+ <xs:element ref="Payload" />
407
+ <xs:element ref="PayloadGroupRef" />
408
+ <xs:any namespace="##other" processContents="lax">
409
+ <xs:annotation>
410
+ <xs:documentation>
411
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
412
+ elements at this point in the schema.
413
+ </xs:documentation>
414
+ </xs:annotation>
415
+ </xs:any>
416
+ </xs:choice>
417
+ <xs:attribute name="Id" type="xs:string" use="required">
418
+ <xs:annotation>
419
+ <xs:documentation>The identifier of the BootstrapperApplication element to reference.</xs:documentation>
420
+ </xs:annotation>
421
+ </xs:attribute>
422
+ <xs:anyAttribute namespace="##other" processContents="lax">
423
+ <xs:annotation>
424
+ <xs:documentation>
425
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
426
+ attributes at this point in the schema.
427
+ </xs:documentation>
428
+ </xs:annotation>
429
+ </xs:anyAttribute>
430
+ </xs:complexType>
431
+ </xs:element>
432
+ <xs:element name="UX">
433
+ <xs:annotation>
434
+ <xs:documentation>This element has been deprecated. Use the BootstrapperApplication element instead.</xs:documentation>
435
+ <xs:appinfo>
436
+ <xse:deprecated ref="BootstrapperApplication" />
437
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
438
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
439
+ </xs:appinfo>
440
+ </xs:annotation>
441
+ <xs:complexType>
442
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
443
+ <xs:element ref="Payload" />
444
+ <xs:element ref="PayloadGroupRef" />
445
+ </xs:choice>
446
+ <xs:attribute name="SourceFile" type="xs:string">
447
+ <xs:annotation>
448
+ <xs:documentation>See the BootstrapperApplication instead.</xs:documentation>
449
+ </xs:annotation>
450
+ </xs:attribute>
451
+ <xs:attribute name="Name" type="xs:string">
452
+ <xs:annotation>
453
+ <xs:documentation>See the BootstrapperApplication instead.</xs:documentation>
454
+ </xs:annotation>
455
+ </xs:attribute>
456
+ <xs:attribute name="SplashScreenSourceFile" type="xs:string">
457
+ <xs:annotation>
458
+ <xs:documentation>See the BootstrapperApplication instead.</xs:documentation>
459
+ </xs:annotation>
460
+ </xs:attribute>
461
+ </xs:complexType>
462
+ </xs:element>
463
+ <xs:element name="OptionalUpdateRegistration">
464
+ <xs:annotation>
465
+ <xs:documentation>Writes additional information to the Windows registry that can be used to detect the bundle.
466
+ This registration is intended primarily for update to an existing product.</xs:documentation>
467
+ <xs:appinfo>
468
+ <xse:remarks>
469
+ <html:p>The attributes are used to write the following registry values to the key:
470
+ <html:code>SOFTWARE\[Manufacturer]\Updates\[ProductFamily]\[Name]</html:code></html:p>
471
+ <html:ul>
472
+ <html:li>ThisVersionInstalled: Y</html:li>
473
+ <html:li>PackageName: >bundle name<</html:li>
474
+ <html:li>PackageVersion: >bundle version<</html:li>
475
+ <html:li>Publisher: [Manufacturer]</html:li>
476
+ <html:li>PublishingGroup: [Department]</html:li>
477
+ <html:li>ReleaseType: [Classification]</html:li>
478
+ <html:li>InstalledBy: [LogonUser]</html:li>
479
+ <html:li>InstalledDate: [Date]</html:li>
480
+ <html:li>InstallerName: >installer name<</html:li>
481
+ <html:li>InstallerVersion: >installer version<</html:li>
482
+ </html:ul>
483
+ </xse:remarks>
484
+ </xs:appinfo>
485
+ </xs:annotation>
486
+ <xs:complexType>
487
+ <xs:attribute name="Manufacturer" type="xs:string">
488
+ <xs:annotation>
489
+ <xs:documentation>The name of the manufacturer. The default is the Bundle/@Manufacturer attribute,
490
+ but may also be a short form, ex: Acme instead of Acme Corporation.
491
+ An error is generated at build time if neither attribute is specified.</xs:documentation>
492
+ </xs:annotation>
493
+ </xs:attribute>
494
+ <xs:attribute name="Department" type="xs:string">
495
+ <xs:annotation>
496
+ <xs:documentation>The name of the department or division publishing the update bundle.
497
+ The PublishingGroup registry value is not written if this attribute is not specified.</xs:documentation>
498
+ </xs:annotation>
499
+ </xs:attribute>
500
+ <xs:attribute name="ProductFamily" type="xs:string">
501
+ <xs:annotation>
502
+ <xs:documentation>The name of the family of products being updated. The default is the Bundle/@ParentName attribute.
503
+ The corresponding registry key is not created if neither attribute is specified.</xs:documentation>
504
+ </xs:annotation>
505
+ </xs:attribute>
506
+ <xs:attribute name="Name" type="xs:string">
507
+ <xs:annotation>
508
+ <xs:documentation>The name of the bundle. The default is the Bundle/@Name attribute,
509
+ but may also be a short form, ex: KB12345 instead of Update to Product (KB12345).
510
+ An error is generated at build time if neither attribute is specified.</xs:documentation>
511
+ </xs:annotation>
512
+ </xs:attribute>
513
+ <xs:attribute name="Classification" type="xs:string" default="Update">
514
+ <xs:annotation>
515
+ <xs:documentation>The release type of the update bundle, such as Update, Security Update, Service Pack, etc.
516
+ The default value is Update.</xs:documentation>
517
+ </xs:annotation>
518
+ </xs:attribute>
519
+ </xs:complexType>
520
+ </xs:element>
521
+ <xs:element name="Chain">
522
+ <xs:annotation>
523
+ <xs:documentation>Contains the chain of packages to install.</xs:documentation>
524
+ <xs:appinfo>
525
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
526
+ </xs:appinfo>
527
+ </xs:annotation>
528
+ <xs:complexType>
529
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
530
+ <xs:element ref="MsiPackage" />
531
+ <xs:element ref="MspPackage" />
532
+ <xs:element ref="MsuPackage" />
533
+ <xs:element ref="ExePackage" />
534
+ <xs:element ref="RollbackBoundary" />
535
+ <xs:element ref="PackageGroupRef" />
536
+ </xs:choice>
537
+ <xs:attribute name="DisableRollback" type="YesNoTypeUnion">
538
+ <xs:annotation>
539
+ <xs:documentation>
540
+ Specifies whether the bundle will attempt to rollback packages
541
+ executed in the chain. If "yes" is specified then when a vital
542
+ package fails to install only that package will rollback and the
543
+ chain will stop with the error. The default is "no" which
544
+ indicates all packages executed during the chain will be
545
+ rolledback to their previous state when a vital package fails.
546
+ </xs:documentation>
547
+ </xs:annotation>
548
+ </xs:attribute>
549
+ <xs:attribute name="DisableSystemRestore" type="YesNoTypeUnion">
550
+ <xs:annotation>
551
+ <xs:documentation>
552
+ Specifies whether the bundle will attempt to create a system
553
+ restore point when executing the chain. If "yes" is specified then
554
+ a system restore point will not be created. The default is "no" which
555
+ indicates a system restore point will be created when the bundle is
556
+ installed, uninstalled, repaired, modified, etc. If the system restore
557
+ point cannot be created, the bundle will log the issue and continue.
558
+ </xs:documentation>
559
+ </xs:annotation>
560
+ </xs:attribute>
561
+ <xs:attribute name="ParallelCache" type="YesNoTypeUnion">
562
+ <xs:annotation>
563
+ <xs:documentation>
564
+ Specifies whether the bundle will start installing packages
565
+ while other packages are still being cached. If "yes",
566
+ packages will start executing when a rollback boundary is
567
+ encountered. The default is "no" which dictates all packages
568
+ must be cached before any packages will start to be installed.
569
+ </xs:documentation>
570
+ </xs:annotation>
571
+ </xs:attribute>
572
+ </xs:complexType>
573
+ </xs:element>
574
+ <xs:element name="MsiPackage">
575
+ <xs:annotation>
576
+ <xs:documentation>Describes a single msi package to install.</xs:documentation>
577
+ <xs:appinfo>
578
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Chain" />
579
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PackageGroup" />
580
+ </xs:appinfo>
581
+ </xs:annotation>
582
+ <xs:complexType>
583
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
584
+ <xs:element ref="MsiProperty" />
585
+ <xs:element ref="SlipstreamMsp" />
586
+ <xs:element ref="Payload" />
587
+ <xs:element ref="PayloadGroupRef" />
588
+ <xs:any namespace="##other" processContents="lax">
589
+ <xs:annotation>
590
+ <xs:documentation>
591
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
592
+ elements at this point in the schema. The extension's
593
+ <html:code><html:nobr>CompilerExtension.ParseElement()</html:nobr></html:code>
594
+ method will be called with the package identifier as the first value in
595
+ <html:code>contextValues</html:code>.
596
+ </xs:documentation>
597
+ </xs:annotation>
598
+ </xs:any>
599
+ </xs:choice>
600
+ <xs:attributeGroup ref="ChainPackageCommonAttributes" />
601
+ <xs:attribute name="DisplayInternalUI" type="YesNoTypeUnion">
602
+ <xs:annotation>
603
+ <xs:documentation>
604
+ Specifies whether the bundle will show the UI authored into the msi package. The default is "no"
605
+ which means all information is routed to the bootstrapper application to provide a unified installation
606
+ experience. If "yes" is specified the UI authored into the msi package will be displayed on top of
607
+ any bootstrapper application UI.
608
+ </xs:documentation>
609
+ </xs:annotation>
610
+ </xs:attribute>
611
+ <xs:attribute name="EnableFeatureSelection" type="YesNoTypeUnion">
612
+ <xs:annotation>
613
+ <xs:documentation>
614
+ Specifies whether the bundle will allow individual control over the installation state of Features inside
615
+ the msi package. Managing feature selection requires special care to ensure the install, modify, update and
616
+ uninstall behavior of the package is always correct. The default is "no".
617
+ </xs:documentation>
618
+ </xs:annotation>
619
+ </xs:attribute>
620
+ <xs:attribute name="ForcePerMachine" type="YesNoTypeUnion">
621
+ <xs:annotation>
622
+ <xs:documentation>
623
+ Override the automatic per-machine detection of MSI packages and force the package to be per-machine.
624
+ The default is "no", which allows the tools to detect the expected value.
625
+ </xs:documentation>
626
+ </xs:annotation>
627
+ </xs:attribute>
628
+ <xs:attribute name="SuppressLooseFilePayloadGeneration" type="YesNoTypeUnion">
629
+ <xs:annotation>
630
+ <xs:documentation>
631
+ This attribute has been deprecated. When the value is "yes", the Binder will not read the MSI package
632
+ to detect uncompressed files that would otherwise be automatically included in the Bundle as Payloads.
633
+ The resulting Bundle may not be able to install the MSI package correctly. The default is "no".
634
+ </xs:documentation>
635
+ </xs:annotation>
636
+ </xs:attribute>
637
+ <xs:attribute name="Visible" type="YesNoTypeUnion">
638
+ <xs:annotation>
639
+ <xs:documentation>
640
+ Specifies whether the MSI will be displayed in Programs and Features (also known as Add/Remove Programs). If "yes" is
641
+ specified the MSI package information will be displayed in Programs and Features. The default "no" indicates the MSI
642
+ will not be displayed.
643
+ </xs:documentation>
644
+ </xs:annotation>
645
+ </xs:attribute>
646
+ </xs:complexType>
647
+ </xs:element>
648
+ <xs:element name="MspPackage">
649
+ <xs:annotation>
650
+ <xs:documentation>Describes a single msp package to install.</xs:documentation>
651
+ <xs:appinfo>
652
+ <xse:seeAlso ref="SlipstreamMsp" />
653
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Chain" />
654
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PackageGroup" />
655
+ </xs:appinfo>
656
+ </xs:annotation>
657
+ <xs:complexType>
658
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
659
+ <xs:element ref="MsiProperty" />
660
+ <xs:element ref="Payload" />
661
+ <xs:element ref="PayloadGroupRef" />
662
+ <xs:any namespace="##other" processContents="lax">
663
+ <xs:annotation>
664
+ <xs:documentation>
665
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
666
+ elements at this point in the schema. The extension's
667
+ <html:code><html:nobr>CompilerExtension.ParseElement()</html:nobr></html:code>
668
+ method will be called with the package identifier as the first value in
669
+ <html:code>contextValues</html:code>.
670
+ </xs:documentation>
671
+ </xs:annotation>
672
+ </xs:any>
673
+ </xs:choice>
674
+ <xs:attributeGroup ref="ChainPackageCommonAttributes" />
675
+ <xs:attribute name="DisplayInternalUI" type="YesNoTypeUnion">
676
+ <xs:annotation>
677
+ <xs:documentation>
678
+ Specifies whether the bundle will show the UI authored into the msp package. The default is "no"
679
+ which means all information is routed to the bootstrapper application to provide a unified installation
680
+ experience. If "yes" is specified the UI authored into the msp package will be displayed on top of
681
+ any bootstrapper application UI.
682
+ </xs:documentation>
683
+ </xs:annotation>
684
+ </xs:attribute>
685
+ <xs:attribute name="PerMachine" type="YesNoDefaultTypeUnion">
686
+ <xs:annotation>
687
+ <xs:documentation>Indicates the package must be executed elevated. The default is "no".</xs:documentation>
688
+ </xs:annotation>
689
+ </xs:attribute>
690
+ <xs:attribute name="Slipstream" type="YesNoTypeUnion">
691
+ <xs:annotation>
692
+ <xs:documentation>
693
+ Specifies whether to automatically slipstream the patch for any target msi packages in the chain. The default is "no".
694
+ Even when the value is "no", you can still author the SlipstreamMsp element under MsiPackage elements as desired.
695
+ </xs:documentation>
696
+ </xs:annotation>
697
+ </xs:attribute>
698
+ </xs:complexType>
699
+ </xs:element>
700
+ <xs:element name="MsuPackage">
701
+ <xs:annotation>
702
+ <xs:documentation>Describes a single msu package to install.</xs:documentation>
703
+ <xs:appinfo>
704
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Chain" />
705
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PackageGroup" />
706
+ </xs:appinfo>
707
+ </xs:annotation>
708
+ <xs:complexType>
709
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
710
+ <xs:element ref="Payload" />
711
+ <xs:element ref="PayloadGroupRef" />
712
+ <xs:element ref="RemotePayload" />
713
+ <xs:any namespace="##other" processContents="lax">
714
+ <xs:annotation>
715
+ <xs:documentation>
716
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
717
+ elements at this point in the schema. The extension's
718
+ <html:code><html:nobr>CompilerExtension.ParseElement()</html:nobr></html:code>
719
+ method will be called with the package identifier as the first value in
720
+ <html:code>contextValues</html:code>.
721
+ </xs:documentation>
722
+ </xs:annotation>
723
+ </xs:any>
724
+ </xs:choice>
725
+ <xs:attributeGroup ref="ChainPackageCommonAttributes" />
726
+ <xs:attribute name="DetectCondition" type="xs:string">
727
+ <xs:annotation>
728
+ <xs:documentation>
729
+ A condition that determines if the package is present on the target system. This condition can use built-in
730
+ variables and variables returned by searches. This condition is necessary because Windows doesn't provide a
731
+ method to detect the presence of an MsuPackage. Burn uses this condition to determine how to treat this
732
+ package during a bundle action; for example, if this condition is false or omitted and the bundle is being
733
+ installed, Burn will install this package.
734
+ </xs:documentation>
735
+ </xs:annotation>
736
+ </xs:attribute>
737
+ <xs:attribute name="KB" type="xs:string">
738
+ <xs:annotation>
739
+ <xs:documentation>
740
+ The knowledge base identifier for the MSU. The KB attribute must be specified to enable the MSU package to
741
+ be uninstalled. Even then MSU uninstallation is only supported on Windows 7 and later. When the KB attribute
742
+ is specified, the Permanent attribute will the control whether the package is uninstalled.
743
+ </xs:documentation>
744
+ </xs:annotation>
745
+ </xs:attribute>
746
+ </xs:complexType>
747
+ </xs:element>
748
+ <xs:element name="ExePackage">
749
+ <xs:annotation>
750
+ <xs:documentation>Describes a single exe package to install.</xs:documentation>
751
+ <xs:appinfo>
752
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Chain" />
753
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PackageGroup" />
754
+ </xs:appinfo>
755
+ </xs:annotation>
756
+ <xs:complexType>
757
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
758
+ <xs:element ref="Payload" />
759
+ <xs:element ref="PayloadGroupRef" />
760
+ <xs:element ref="RemotePayload" />
761
+ <xs:element ref="ExitCode" />
762
+ <xs:element ref="CommandLine" />
763
+ <xs:any namespace="##other" processContents="lax">
764
+ <xs:annotation>
765
+ <xs:documentation>
766
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
767
+ elements at this point in the schema. The extension's
768
+ <html:code><html:nobr>CompilerExtension.ParseElement()</html:nobr></html:code>
769
+ method will be called with the package identifier as the first value in
770
+ <html:code>contextValues</html:code>.
771
+ </xs:documentation>
772
+ </xs:annotation>
773
+ </xs:any>
774
+ </xs:choice>
775
+ <xs:attributeGroup ref="ChainPackageCommonAttributes" />
776
+ <xs:attribute name="DetectCondition" type="xs:string">
777
+ <xs:annotation>
778
+ <xs:documentation>
779
+ A condition that determines if the package is present on the target system. This condition can use built-in
780
+ variables and variables returned by searches. This condition is necessary because Windows doesn't provide a
781
+ method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this
782
+ package during a bundle action; for example, if this condition is false or omitted and the bundle is being
783
+ installed, Burn will install this package.
784
+ </xs:documentation>
785
+ </xs:annotation>
786
+ </xs:attribute>
787
+ <xs:attribute name="InstallCommand" type="xs:string">
788
+ <xs:annotation>
789
+ <xs:documentation>The command-line arguments provided to the ExePackage during install. If this attribute is absent the executable will be launched with no command-line arguments.</xs:documentation>
790
+ </xs:annotation>
791
+ </xs:attribute>
792
+ <xs:attribute name="RepairCommand" type="xs:string">
793
+ <xs:annotation>
794
+ <xs:documentation>
795
+ The command-line arguments to specify to indicate a repair. If the executable package can be repaired but
796
+ does not require any special command-line arguments to do so then set the attribute's value to blank. To
797
+ indicate that the package does not support repair, omit this attribute.
798
+ </xs:documentation>
799
+ </xs:annotation>
800
+ </xs:attribute>
801
+ <xs:attribute name="UninstallCommand" type="xs:string">
802
+ <xs:annotation>
803
+ <xs:documentation>The command-line arguments provided to the ExePackage during uninstall. If this attribute is absent the executable will be launched with no command-line arguments. To prevent an ExePackage from being uninstalled set the Permanent attribute to "yes".</xs:documentation>
804
+ </xs:annotation>
805
+ </xs:attribute>
806
+ <xs:attribute name="PerMachine" type="YesNoDefaultTypeUnion">
807
+ <xs:annotation>
808
+ <xs:documentation>Indicates the package must be executed elevated. The default is "no".</xs:documentation>
809
+ </xs:annotation>
810
+ </xs:attribute>
811
+ <xs:attribute name="Protocol" type="BurnExeProtocolType">
812
+ <xs:annotation>
813
+ <xs:documentation>Indicates the communication protocol the package supports for extended progress and error reporting. The default is "none".</xs:documentation>
814
+ </xs:annotation>
815
+ </xs:attribute>
816
+ </xs:complexType>
817
+ </xs:element>
818
+ <xs:element name="RollbackBoundary">
819
+ <xs:annotation>
820
+ <xs:documentation>Describes a rollback boundary in the chain.</xs:documentation>
821
+ <xs:appinfo>
822
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Chain" />
823
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PackageGroup" />
824
+ </xs:appinfo>
825
+ </xs:annotation>
826
+ <xs:complexType>
827
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
828
+ <xs:any namespace="##other" processContents="lax">
829
+ <xs:annotation>
830
+ <xs:documentation>
831
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
832
+ elements at this point in the schema. The extension's
833
+ <html:code><html:nobr>CompilerExtension.ParseElement()</html:nobr></html:code>
834
+ method will be called with the rollback boundary identifier as the 'RollbackBoundaryId' key in
835
+ <html:code>contextValues</html:code>.
836
+ </xs:documentation>
837
+ </xs:annotation>
838
+ </xs:any>
839
+ </xs:choice>
840
+ <xs:attribute name="Id" type="xs:string">
841
+ <xs:annotation>
842
+ <xs:documentation>
843
+ Identifier for this rollback boundary, for ordering and cross-referencing. If this attribute is
844
+ not provided a stable identifier will be generated.
845
+ </xs:documentation>
846
+ </xs:annotation>
847
+ </xs:attribute>
848
+ <xs:attribute name="Vital" type="YesNoTypeUnion">
849
+ <xs:annotation>
850
+ <xs:documentation>
851
+ Specifies whether the rollback boundary aborts the chain. The default "yes" indicates that if
852
+ the rollback boundary is encountered then the chain will fail and rollback or stop. If "no"
853
+ is specified then the chain should continue successfuly at the next rollback boundary.
854
+ </xs:documentation>
855
+ </xs:annotation>
856
+ </xs:attribute>
857
+ <xs:attribute name="Transaction" type="YesNoTypeUnion">
858
+ <xs:annotation>
859
+ <xs:documentation>
860
+ Specifies whether the rollback boundary is wrapped in an MSI transaction. The default is "no"
861
+ </xs:documentation>
862
+ </xs:annotation>
863
+ </xs:attribute>
864
+ </xs:complexType>
865
+ </xs:element>
866
+ <xs:attributeGroup name="ChainPackageCommonAttributes">
867
+ <xs:attribute name="SourceFile" type="xs:string">
868
+ <xs:annotation>
869
+ <xs:documentation>
870
+ Location of the package to add to the bundle. The default value is the Name attribute, if provided.
871
+ At a minimum, the SourceFile or Name attribute must be specified.
872
+ </xs:documentation>
873
+ </xs:annotation>
874
+ </xs:attribute>
875
+ <xs:attribute name="Name" type="xs:string">
876
+ <xs:annotation>
877
+ <xs:documentation>
878
+ The destination path and file name for this chain payload. Use this attribute to rename the
879
+ chain entry point or extract it into a subfolder. The default value is the file name from the
880
+ SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
881
+ The use of '..' directories is not allowed.
882
+ </xs:documentation>
883
+ </xs:annotation>
884
+ </xs:attribute>
885
+ <xs:attribute name="DownloadUrl" type="xs:string">
886
+ <xs:annotation>
887
+ <xs:documentation>
888
+ <html:p>The URL to use to download the package. The following substitutions are supported:</html:p>
889
+ <html:ul>
890
+ <html:li>{0} is replaced by the package Id.</html:li>
891
+ <html:li>{1} is replaced by the payload Id.</html:li>
892
+ <html:li>{2} is replaced by the payload file name.</html:li>
893
+ </html:ul>
894
+ </xs:documentation>
895
+ </xs:annotation>
896
+ </xs:attribute>
897
+ <xs:attribute name="Id" type="xs:string">
898
+ <xs:annotation>
899
+ <xs:documentation>
900
+ Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
901
+ modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
902
+ </xs:documentation>
903
+ </xs:annotation>
904
+ </xs:attribute>
905
+ <xs:attribute name="After" type="xs:string">
906
+ <xs:annotation>
907
+ <xs:documentation>
908
+ The identifier of another package that this one should be installed after. By default the After
909
+ attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
910
+ attribute is specified ensure that a cycle is not created explicitly or implicitly.
911
+ </xs:documentation>
912
+ </xs:annotation>
913
+ </xs:attribute>
914
+ <xs:attribute name="InstallSize" type="xs:string">
915
+ <xs:annotation>
916
+ <xs:documentation>
917
+ The size this package will take on disk in bytes after it is installed. By default, the binder will
918
+ calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
919
+ and use the total for the install size of the package.
920
+ </xs:documentation>
921
+ </xs:annotation>
922
+ </xs:attribute>
923
+ <xs:attribute name="InstallCondition" type="xs:string">
924
+ <xs:annotation>
925
+ <xs:documentation>A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.</xs:documentation>
926
+ </xs:annotation>
927
+ </xs:attribute>
928
+ <xs:attribute name="Cache" type="YesNoAlwaysTypeUnion">
929
+ <xs:annotation>
930
+ <xs:documentation>Whether to cache the package. The default is "yes".</xs:documentation>
931
+ </xs:annotation>
932
+ </xs:attribute>
933
+ <xs:attribute name="CacheId" type="xs:string">
934
+ <xs:annotation>
935
+ <xs:documentation>The identifier to use when caching the package.</xs:documentation>
936
+ </xs:annotation>
937
+ </xs:attribute>
938
+ <xs:attribute name="DisplayName" type="xs:string">
939
+ <xs:annotation>
940
+ <xs:documentation>
941
+ Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
942
+ use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
943
+ the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
944
+ bootstrapper application data manifest.
945
+ </xs:documentation>
946
+ </xs:annotation>
947
+ </xs:attribute>
948
+ <xs:attribute name="Description" type="xs:string">
949
+ <xs:annotation>
950
+ <xs:documentation>
951
+ Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
952
+ use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
953
+ the Description patch metadata property. Other package types must use this attribute to define a description in the
954
+ bootstrapper application data manifest.
955
+ </xs:documentation>
956
+ </xs:annotation>
957
+ </xs:attribute>
958
+ <xs:attribute name="LogPathVariable" type="xs:string">
959
+ <xs:annotation>
960
+ <xs:documentation>
961
+ Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
962
+ be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
963
+ </xs:documentation>
964
+ </xs:annotation>
965
+ </xs:attribute>
966
+ <xs:attribute name="RollbackLogPathVariable" type="xs:string">
967
+ <xs:annotation>
968
+ <xs:documentation>
969
+ Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
970
+ the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
971
+ default to no logging.
972
+ </xs:documentation>
973
+ </xs:annotation>
974
+ </xs:attribute>
975
+ <xs:attribute name="Permanent" type="YesNoTypeUnion">
976
+ <xs:annotation>
977
+ <xs:documentation>
978
+ Specifies whether the package can be uninstalled. The default is "no".
979
+ </xs:documentation>
980
+ </xs:annotation>
981
+ </xs:attribute>
982
+ <xs:attribute name="Vital" type="YesNoTypeUnion">
983
+ <xs:annotation>
984
+ <xs:documentation>
985
+ Specifies whether the package must succeed for the chain to continue. The default "yes"
986
+ indicates that if the package fails then the chain will fail and rollback or stop. If
987
+ "no" is specified then the chain will continue even if the package reports failure.
988
+ </xs:documentation>
989
+ </xs:annotation>
990
+ </xs:attribute>
991
+ <xs:attribute name="Compressed" type="YesNoDefaultTypeUnion">
992
+ <xs:annotation>
993
+ <xs:documentation>Whether the package payload should be embedded in a container or left as an external payload.</xs:documentation>
994
+ </xs:annotation>
995
+ </xs:attribute>
996
+ <xs:attribute name="EnableSignatureVerification" type="YesNoTypeUnion">
997
+ <xs:annotation>
998
+ <xs:documentation>
999
+ By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
1000
+ and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
1001
+ signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
1002
+ Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
1003
+ </xs:documentation>
1004
+ </xs:annotation>
1005
+ </xs:attribute>
1006
+ <xs:anyAttribute namespace="##other" processContents="lax">
1007
+ <xs:annotation>
1008
+ <xs:documentation>
1009
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1010
+ attributes at this point in the schema. The extension's
1011
+ <html:code><html:nobr>CompilerExtension.ParseAttribute()</html:nobr></html:code>
1012
+ method will be called with the package identifier in
1013
+ <html:code><html:nobr>contextValues["PackageId"]</html:nobr></html:code>.
1014
+ </xs:documentation>
1015
+ </xs:annotation>
1016
+ </xs:anyAttribute>
1017
+ </xs:attributeGroup>
1018
+ <xs:element name="PackageGroup">
1019
+ <xs:annotation>
1020
+ <xs:documentation>Describes a package group to a bootstrapper.</xs:documentation>
1021
+ <xs:appinfo>
1022
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1023
+ </xs:appinfo>
1024
+ </xs:annotation>
1025
+ <xs:complexType>
1026
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1027
+ <xs:element ref="MsiPackage" />
1028
+ <xs:element ref="MspPackage" />
1029
+ <xs:element ref="MsuPackage" />
1030
+ <xs:element ref="ExePackage" />
1031
+ <xs:element ref="RollbackBoundary" />
1032
+ <xs:element ref="PackageGroupRef" />
1033
+ </xs:choice>
1034
+ <xs:attribute name="Id" type="xs:string" use="required">
1035
+ <xs:annotation>
1036
+ <xs:documentation>Identifier for package group.</xs:documentation>
1037
+ </xs:annotation>
1038
+ </xs:attribute>
1039
+ </xs:complexType>
1040
+ </xs:element>
1041
+ <xs:element name="PackageGroupRef">
1042
+ <xs:annotation>
1043
+ <xs:documentation>Create a reference to PackageGroup element that exists inside a Bundle or Fragment element.</xs:documentation>
1044
+ <xs:appinfo>
1045
+ <xse:seeAlso ref="PackageGroup" />
1046
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Chain" />
1047
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Container" />
1048
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PackageGroup" />
1049
+ </xs:appinfo>
1050
+ </xs:annotation>
1051
+ <xs:complexType>
1052
+ <xs:attribute name="Id" type="xs:string" use="required">
1053
+ <xs:annotation>
1054
+ <xs:documentation>The identifier of the PackageGroup element to reference.</xs:documentation>
1055
+ </xs:annotation>
1056
+ </xs:attribute>
1057
+ <xs:attribute name="After" type="xs:string">
1058
+ <xs:annotation>
1059
+ <xs:documentation>The identifier of a package that this group should be installed after.</xs:documentation>
1060
+ </xs:annotation>
1061
+ </xs:attribute>
1062
+ </xs:complexType>
1063
+ </xs:element>
1064
+ <xs:element name="MsiProperty">
1065
+ <xs:annotation>
1066
+ <xs:documentation>Allows an MSI property to be set based on the value of a burn engine expression.</xs:documentation>
1067
+ <xs:appinfo>
1068
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" />
1069
+ </xs:appinfo>
1070
+ </xs:annotation>
1071
+ <xs:complexType>
1072
+ <xs:attribute name="Name" type="xs:string" use="required">
1073
+ <xs:annotation>
1074
+ <xs:documentation>The name of the MSI property to set. Burn controls the follow MSI properties so they cannot be set with MsiProperty: ACTION, ALLUSERS, REBOOT, REINSTALL, REINSTALLMODE</xs:documentation>
1075
+ </xs:annotation>
1076
+ </xs:attribute>
1077
+ <xs:attribute name="Value" type="xs:string" use="required">
1078
+ <xs:annotation>
1079
+ <xs:documentation>The value to set the property to. This string is evaluated by the burn engine and can be as simple as a burn engine variable reference or as complex as a full expression.</xs:documentation>
1080
+ </xs:annotation>
1081
+ </xs:attribute>
1082
+ </xs:complexType>
1083
+ </xs:element>
1084
+ <xs:element name="SlipstreamMsp">
1085
+ <xs:annotation>
1086
+ <xs:documentation>Specifies a patch included in the same bundle that is installed when the parent MSI package is installed.</xs:documentation>
1087
+ <xs:appinfo>
1088
+ <xse:seeAlso ref="MspPackage" />
1089
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" />
1090
+ <xse:remarks>
1091
+ <html:p>You can also specify that any MspPackage elements in the chain are automatically slipstreamed by setting the Slipstream attribute of an MspPackage to "yes". This will reduce the amount of authoring you need to write and will determine which msi packages can slipstream patches when building a bundle.</html:p>
1092
+ </xse:remarks>
1093
+ </xs:appinfo>
1094
+ </xs:annotation>
1095
+ <xs:complexType>
1096
+ <xs:attribute name="Id" type="xs:string" use="required">
1097
+ <xs:annotation>
1098
+ <xs:documentation>The identifier for a MspPackage in the bundle.</xs:documentation>
1099
+ </xs:annotation>
1100
+ </xs:attribute>
1101
+ </xs:complexType>
1102
+ </xs:element>
1103
+ <xs:element name="Variable">
1104
+ <xs:annotation>
1105
+ <xs:documentation>Describes a burn engine variable to define.</xs:documentation>
1106
+ <xs:appinfo>
1107
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
1108
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1109
+ </xs:appinfo>
1110
+ </xs:annotation>
1111
+ <xs:complexType>
1112
+ <xs:attribute name="Hidden" type="YesNoTypeUnion">
1113
+ <xs:annotation>
1114
+ <xs:documentation>Whether the value of the variable should be hidden.</xs:documentation>
1115
+ </xs:annotation>
1116
+ </xs:attribute>
1117
+ <xs:attribute name="Name" type="xs:string" use="required">
1118
+ <xs:annotation>
1119
+ <xs:documentation>The name for the variable.</xs:documentation>
1120
+ </xs:annotation>
1121
+ </xs:attribute>
1122
+ <xs:attribute name="Persisted" type="YesNoTypeUnion">
1123
+ <xs:annotation>
1124
+ <xs:documentation>Whether the variable should be persisted.</xs:documentation>
1125
+ </xs:annotation>
1126
+ </xs:attribute>
1127
+ <xs:attribute name="Value" type="xs:string">
1128
+ <xs:annotation>
1129
+ <xs:documentation>Starting value for the variable.</xs:documentation>
1130
+ </xs:annotation>
1131
+ </xs:attribute>
1132
+ <xs:attribute name="Type">
1133
+ <xs:annotation>
1134
+ <xs:documentation>Type of the variable, inferred from the value if not specified.</xs:documentation>
1135
+ </xs:annotation>
1136
+ <xs:simpleType>
1137
+ <xs:restriction base="xs:string">
1138
+ <xs:enumeration value="string" />
1139
+ <xs:enumeration value="numeric" />
1140
+ <xs:enumeration value="version" />
1141
+ </xs:restriction>
1142
+ </xs:simpleType>
1143
+ </xs:attribute>
1144
+ <xs:anyAttribute namespace="##other" processContents="lax">
1145
+ <xs:annotation>
1146
+ <xs:documentation>
1147
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1148
+ attributes at this point in the schema.
1149
+ </xs:documentation>
1150
+ </xs:annotation>
1151
+ </xs:anyAttribute>
1152
+ </xs:complexType>
1153
+ </xs:element>
1154
+ <xs:element name="Container">
1155
+ <xs:annotation>
1156
+ <xs:documentation>Representation of a file that contains one or more files.</xs:documentation>
1157
+ <xs:appinfo>
1158
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
1159
+ </xs:appinfo>
1160
+ </xs:annotation>
1161
+ <xs:complexType>
1162
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1163
+ <xs:element ref="PackageGroupRef" />
1164
+ </xs:choice>
1165
+ <xs:attribute name="DownloadUrl" type="xs:string">
1166
+ <xs:annotation>
1167
+ <xs:documentation>
1168
+ <html:p>The URL to use to download the container. This attribute is only valid when the container is detached. The
1169
+ following substitutions are supported:</html:p>
1170
+ <html:ul>
1171
+ <html:li>{0} is always null.</html:li>
1172
+ <html:li>{1} is replaced by the container Id.</html:li>
1173
+ <html:li>{2} is replaced by the container file name.</html:li>
1174
+ </html:ul>
1175
+ </xs:documentation>
1176
+ </xs:annotation>
1177
+ </xs:attribute>
1178
+ <xs:attribute name="Id" type="xs:string">
1179
+ <xs:annotation>
1180
+ <xs:documentation>The unique identifier for the container. If this attribute is not specified the Name attribute will be used.</xs:documentation>
1181
+ </xs:annotation>
1182
+ </xs:attribute>
1183
+ <xs:attribute name="Name" type="xs:string">
1184
+ <xs:annotation>
1185
+ <xs:documentation>The file name for this container. A relative path may be provided to place the container in a sub-folder of the bundle.</xs:documentation>
1186
+ </xs:annotation>
1187
+ </xs:attribute>
1188
+ <xs:attribute name="Type" type="BurnContainerType">
1189
+ <xs:annotation>
1190
+ <xs:documentation>
1191
+ Indicates whether the container is "attached" to the bundle executable or placed external to the bundle extecutable as "detached". If
1192
+ this attribute is not specified, the default is to create a detached container.
1193
+ </xs:documentation>
1194
+ </xs:annotation>
1195
+ </xs:attribute>
1196
+ </xs:complexType>
1197
+ </xs:element>
1198
+ <xs:element name="ContainerRef">
1199
+ <xs:annotation>
1200
+ <xs:documentation>Create a reference to an existing Container element.</xs:documentation>
1201
+ <xs:appinfo>
1202
+ <xse:seeAlso ref="Container" />
1203
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
1204
+ </xs:appinfo>
1205
+ </xs:annotation>
1206
+ <xs:complexType>
1207
+ <xs:attribute name="Id" type="xs:string" use="required">
1208
+ <xs:annotation>
1209
+ <xs:documentation>The identifier of Container element to reference.</xs:documentation>
1210
+ </xs:annotation>
1211
+ </xs:attribute>
1212
+ </xs:complexType>
1213
+ </xs:element>
1214
+ <xs:element name="ExitCode">
1215
+ <xs:annotation>
1216
+ <xs:documentation>Describes map of exit code returned from executable package to a bootstrapper behavior.</xs:documentation>
1217
+ <xs:appinfo>
1218
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="ExePackage" />
1219
+ </xs:appinfo>
1220
+ </xs:annotation>
1221
+ <xs:complexType>
1222
+ <xs:attribute name="Value" type="xs:integer">
1223
+ <xs:annotation>
1224
+ <xs:documentation>Exit code returned from executable package. If no value is provided it means all values not explicitly set default to this behavior.</xs:documentation>
1225
+ </xs:annotation>
1226
+ </xs:attribute>
1227
+ <xs:attribute name="Behavior" use="required">
1228
+ <xs:annotation>
1229
+ <xs:documentation>Choose one of the supported behaviors error codes: success, error, scheduleReboot, forceReboot.</xs:documentation>
1230
+ </xs:annotation>
1231
+ <xs:simpleType>
1232
+ <xs:restriction base="xs:string">
1233
+ <xs:enumeration value="success" />
1234
+ <xs:enumeration value="error" />
1235
+ <xs:enumeration value="scheduleReboot" />
1236
+ <xs:enumeration value="forceReboot" />
1237
+ </xs:restriction>
1238
+ </xs:simpleType>
1239
+ </xs:attribute>
1240
+ </xs:complexType>
1241
+ </xs:element>
1242
+ <xs:element name="CommandLine">
1243
+ <xs:annotation>
1244
+ <xs:documentation>Describes additional, conditional command-line arguments for an ExePackage.</xs:documentation>
1245
+ </xs:annotation>
1246
+ <xs:complexType>
1247
+ <xs:attribute name="InstallArgument" type="xs:string">
1248
+ <xs:annotation>
1249
+ <xs:documentation>Additional command-line arguments to apply during package installation if Condition is true.</xs:documentation>
1250
+ </xs:annotation>
1251
+ </xs:attribute>
1252
+ <xs:attribute name="UninstallArgument" type="xs:string">
1253
+ <xs:annotation>
1254
+ <xs:documentation>Additional command-line arguments to apply during package uninstallation if Condition is true.</xs:documentation>
1255
+ </xs:annotation>
1256
+ </xs:attribute>
1257
+ <xs:attribute name="RepairArgument" type="xs:string">
1258
+ <xs:annotation>
1259
+ <xs:documentation>Additional command-line arguments to apply during package repair if Condition is true.</xs:documentation>
1260
+ </xs:annotation>
1261
+ </xs:attribute>
1262
+ <xs:attribute name="Condition" type="xs:string">
1263
+ <xs:annotation>
1264
+ <xs:documentation>
1265
+ The condition that controls whether the command-line arguments specified in the
1266
+ InstallArgument, UninstallArgument, or RepairArgument attributes are appended to the
1267
+ command line passed to the ExePackage. Which attribute is used depends on the
1268
+ action being applied to the ExePackage. For example, when the ExePackage is
1269
+ being installed, the InstallArgument attribute value is appended to the command
1270
+ line when the ExePackage is executed.
1271
+ </xs:documentation>
1272
+ </xs:annotation>
1273
+ </xs:attribute>
1274
+ </xs:complexType>
1275
+ </xs:element>
1276
+ <xs:element name="Payload">
1277
+ <xs:annotation>
1278
+ <xs:documentation>Describes a payload to a bootstrapper.</xs:documentation>
1279
+ <xs:appinfo>
1280
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="BootstrapperApplication" />
1281
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="ExePackage" />
1282
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsiPackage" />
1283
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MspPackage" />
1284
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="MsuPackage" />
1285
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UX" />
1286
+ </xs:appinfo>
1287
+ </xs:annotation>
1288
+ <xs:complexType>
1289
+ <xs:attribute name="Id" type="xs:string">
1290
+ <xs:annotation>
1291
+ <xs:documentation>The identifier of Payload element.</xs:documentation>
1292
+ </xs:annotation>
1293
+ </xs:attribute>
1294
+ <xs:attribute name="Compressed" type="YesNoDefaultTypeUnion">
1295
+ <xs:annotation>
1296
+ <xs:documentation>Whether the payload should be embedded in a container or left as an external payload.</xs:documentation>
1297
+ </xs:annotation>
1298
+ </xs:attribute>
1299
+ <xs:attribute name="SourceFile" type="xs:string" use="required">
1300
+ <xs:annotation>
1301
+ <xs:documentation>Location of the source file.</xs:documentation>
1302
+ </xs:annotation>
1303
+ </xs:attribute>
1304
+ <xs:attribute name="Name" type="xs:string">
1305
+ <xs:annotation>
1306
+ <xs:documentation>The destination path and file name for this payload. The default is the source file name. The use of '..' directories is not allowed.</xs:documentation>
1307
+ </xs:annotation>
1308
+ </xs:attribute>
1309
+ <xs:attribute name="DownloadUrl" type="xs:string">
1310
+ <xs:annotation>
1311
+ <xs:documentation>
1312
+ <html:p>The URL to use to download the package. The following substitutions are supported:</html:p>
1313
+ <html:ul>
1314
+ <html:li>{0} is replaced by the package Id.</html:li>
1315
+ <html:li>{1} is replaced by the payload Id.</html:li>
1316
+ <html:li>{2} is replaced by the payload file name.</html:li>
1317
+ </html:ul>
1318
+ </xs:documentation>
1319
+ </xs:annotation>
1320
+ </xs:attribute>
1321
+ <xs:attribute name="EnableSignatureVerification" type="YesNoTypeUnion">
1322
+ <xs:annotation>
1323
+ <xs:documentation>
1324
+ By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
1325
+ and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
1326
+ signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
1327
+ Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
1328
+ </xs:documentation>
1329
+ </xs:annotation>
1330
+ </xs:attribute>
1331
+ </xs:complexType>
1332
+ </xs:element>
1333
+ <xs:element name="PayloadGroup">
1334
+ <xs:annotation>
1335
+ <xs:documentation>Describes a payload group to a bootstrapper. PayloadGroups referenced from within a Bundle are tied to the Bundle.
1336
+ PayloadGroups referenced from a Fragment are tied to the context of whatever references them such as an ExePackage or MsiPackage.
1337
+ It is possible to share a PayloadGroup between multiple Packages and/or a Bundle by creating multiple references to it.</xs:documentation>
1338
+ <xs:appinfo>
1339
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1340
+ </xs:appinfo>
1341
+ </xs:annotation>
1342
+ <xs:complexType>
1343
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1344
+ <xs:element ref="Payload" />
1345
+ <xs:element ref="PayloadGroupRef" />
1346
+ </xs:choice>
1347
+ <xs:attribute name="Id" type="xs:string" use="required">
1348
+ <xs:annotation>
1349
+ <xs:documentation>Identifier for payload group.</xs:documentation>
1350
+ </xs:annotation>
1351
+ </xs:attribute>
1352
+ </xs:complexType>
1353
+ </xs:element>
1354
+ <xs:element name="PayloadGroupRef">
1355
+ <xs:annotation>
1356
+ <xs:documentation>Create a reference to PayloadGroup element that exists inside a Bundle or Fragment element.</xs:documentation>
1357
+ <xs:appinfo>
1358
+ <xse:seeAlso ref="PayloadGroup" />
1359
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="BootstrapperApplication" />
1360
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="UX" />
1361
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="PayloadGroup" />
1362
+ </xs:appinfo>
1363
+ </xs:annotation>
1364
+ <xs:complexType>
1365
+ <xs:attribute name="Id" type="xs:string" use="required">
1366
+ <xs:annotation>
1367
+ <xs:documentation>The identifier of the PayloadGroup element to reference.</xs:documentation>
1368
+ </xs:annotation>
1369
+ </xs:attribute>
1370
+ </xs:complexType>
1371
+ </xs:element>
1372
+ <xs:element name="RemotePayload">
1373
+ <xs:annotation>
1374
+ <xs:documentation>Describes information about a remote file payload that is not available at the time of building the bundle.
1375
+ The parent must specify DownloadUrl and must not specify SourceFile when using this element.</xs:documentation>
1376
+ <xs:appinfo>
1377
+ <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="ExePackage" />
1378
+ <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MsuPackage" />
1379
+ </xs:appinfo>
1380
+ </xs:annotation>
1381
+ <xs:complexType>
1382
+ <xs:attribute name="CertificatePublicKey" type="HexType">
1383
+ <xs:annotation>
1384
+ <xs:documentation>Public key of the authenticode certificate used to sign the RemotePayload. Include this attribute if the remote file is signed.</xs:documentation>
1385
+ </xs:annotation>
1386
+ </xs:attribute>
1387
+ <xs:attribute name="CertificateThumbprint" type="HexType">
1388
+ <xs:annotation>
1389
+ <xs:documentation>Thumbprint of the authenticode certificate used to sign the RemotePayload. Include this attribute if the remote file is signed.</xs:documentation>
1390
+ </xs:annotation>
1391
+ </xs:attribute>
1392
+ <xs:attribute name="Description" type="xs:string" use="required">
1393
+ <xs:annotation>
1394
+ <xs:documentation>Description of the file from version resources.</xs:documentation>
1395
+ </xs:annotation>
1396
+ </xs:attribute>
1397
+ <xs:attribute name="Hash" type="HexType" use="required">
1398
+ <xs:annotation>
1399
+ <xs:documentation>SHA-1 hash of the RemotePayload. Include this attribute if the remote file is unsigned or SuppressSignatureVerification is set to Yes.</xs:documentation>
1400
+ </xs:annotation>
1401
+ </xs:attribute>
1402
+ <xs:attribute name="ProductName" type="xs:string" use="required">
1403
+ <xs:annotation>
1404
+ <xs:documentation>Product name of the file from version resouces.</xs:documentation>
1405
+ </xs:annotation>
1406
+ </xs:attribute>
1407
+ <xs:attribute name="Size" type="xs:integer" use="required">
1408
+ <xs:annotation>
1409
+ <xs:documentation>Size of the remote file in bytes.</xs:documentation>
1410
+ </xs:annotation>
1411
+ </xs:attribute>
1412
+ <xs:attribute name="Version" type="VersionType" use="required">
1413
+ <xs:annotation>
1414
+ <xs:documentation>Version of the remote file</xs:documentation>
1415
+ </xs:annotation>
1416
+ </xs:attribute>
1417
+ </xs:complexType>
1418
+ </xs:element>
1419
+ <xs:element name="RelatedBundle">
1420
+ <xs:annotation>
1421
+ <xs:documentation>Create a RelatedBundle element.</xs:documentation>
1422
+ <xs:appinfo>
1423
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
1424
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1425
+ </xs:appinfo>
1426
+ </xs:annotation>
1427
+ <xs:complexType>
1428
+ <xs:attribute name="Id" type="Guid" use="required">
1429
+ <xs:annotation>
1430
+ <xs:documentation>The identifier of the RelatedBundle group.</xs:documentation>
1431
+ </xs:annotation>
1432
+ </xs:attribute>
1433
+ <xs:attribute name="Action" use="optional">
1434
+ <xs:annotation>
1435
+ <xs:documentation>The action to take on bundles related to this one. Detect is the default.</xs:documentation>
1436
+ </xs:annotation>
1437
+ <xs:simpleType>
1438
+ <xs:restriction base="xs:string">
1439
+ <xs:enumeration value="Detect" />
1440
+ <xs:enumeration value="Upgrade" />
1441
+ <xs:enumeration value="Addon" />
1442
+ <xs:enumeration value="Patch" />
1443
+ </xs:restriction>
1444
+ </xs:simpleType>
1445
+ </xs:attribute>
1446
+ </xs:complexType>
1447
+ </xs:element>
1448
+ <xs:element name="Update">
1449
+ <xs:annotation>
1450
+ <xs:documentation>Defines the update for a Bundle.</xs:documentation>
1451
+ <xs:appinfo>
1452
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Bundle" />
1453
+ <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
1454
+ </xs:appinfo>
1455
+ </xs:annotation>
1456
+ <xs:complexType>
1457
+ <xs:attribute name="Location" type="xs:string" use="required">
1458
+ <xs:annotation>
1459
+ <xs:documentation>
1460
+ The absolute path or URL to check for an update bundle. Currently the engine provides this value
1461
+ in the IBootstrapperApplication::OnDetectUpdateBegin() and otherwise ignores the value. In the
1462
+ future the engine will be able to acquire an update bundle from the location and determine if it
1463
+ is newer than the current executing bundle.
1464
+ </xs:documentation>
1465
+ </xs:annotation>
1466
+ </xs:attribute>
1467
+ </xs:complexType>
1468
+ </xs:element>
1469
+ <xs:element name="Product">
1470
+ <xs:annotation>
1471
+ <xs:documentation>
1472
+ The Product element is analogous to the main function in a C program. When linking, only one Product section
1473
+ can be given to the linker to produce a successful result. Using this element creates an msi file.
1474
+ </xs:documentation>
1475
+ <xs:appinfo>
1476
+ <xse:remarks>
1477
+ <html:p>You can specify any valid Windows code page by integer like 1252, or by web name like Windows-1252. See <html:a href="~/overview/codepage.html">Code Pages</html:a> for more information.</html:p>
1478
+ </xse:remarks>
1479
+ </xs:appinfo>
1480
+ </xs:annotation>
1481
+ <xs:complexType>
1482
+ <xs:sequence>
1483
+ <xs:element ref="Package" />
1484
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1485
+ <xs:element ref="AppId" />
1486
+ <xs:element ref="Binary" />
1487
+ <xs:element ref="ComplianceCheck" />
1488
+ <xs:element ref="Component" />
1489
+ <xs:element ref="ComponentGroup" />
1490
+ <xs:element ref="Condition" />
1491
+ <xs:element ref="CustomAction" />
1492
+ <xs:element ref="CustomActionRef" />
1493
+ <xs:element ref="CustomTable" />
1494
+ <xs:element ref="Directory" />
1495
+ <xs:element ref="DirectoryRef" />
1496
+ <xs:element ref="EmbeddedChainer" />
1497
+ <xs:element ref="EmbeddedChainerRef" />
1498
+ <xs:element ref="EnsureTable" />
1499
+ <xs:element ref="Feature" />
1500
+ <xs:element ref="FeatureRef" />
1501
+ <xs:element ref="FeatureGroupRef" />
1502
+ <xs:element ref="Icon" />
1503
+ <xs:element ref="InstanceTransforms" />
1504
+ <xs:element ref="MajorUpgrade" />
1505
+ <xs:element ref="Media" />
1506
+ <xs:element ref="MediaTemplate" />
1507
+ <xs:element ref="PackageCertificates" />
1508
+ <xs:element ref="PatchCertificates" />
1509
+ <xs:element ref="Property" />
1510
+ <xs:element ref="PropertyRef" />
1511
+ <xs:element ref="SetDirectory" />
1512
+ <xs:element ref="SetProperty" />
1513
+ <xs:element ref="SFPCatalog" />
1514
+ <xs:element ref="SymbolPath" />
1515
+ <xs:element ref="UI" />
1516
+ <xs:element ref="UIRef" />
1517
+ <xs:element ref="Upgrade" />
1518
+ <xs:element ref="WixVariable" />
1519
+ <xs:sequence>
1520
+ <xs:element ref="InstallExecuteSequence" minOccurs="0" />
1521
+ <xs:element ref="InstallUISequence" minOccurs="0" />
1522
+ <xs:element ref="AdminExecuteSequence" minOccurs="0" />
1523
+ <xs:element ref="AdminUISequence" minOccurs="0" />
1524
+ <xs:element ref="AdvertiseExecuteSequence" minOccurs="0" />
1525
+ </xs:sequence>
1526
+ <xs:any namespace="##other" processContents="lax">
1527
+ <xs:annotation>
1528
+ <xs:documentation>
1529
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1530
+ elements at this point in the schema.
1531
+ </xs:documentation>
1532
+ </xs:annotation>
1533
+ </xs:any>
1534
+ </xs:choice>
1535
+ </xs:sequence>
1536
+ <xs:attribute name="Id" type="AutogenGuid" use="required">
1537
+ <xs:annotation>
1538
+ <xs:documentation>The product code GUID for the product.</xs:documentation>
1539
+ </xs:annotation>
1540
+ </xs:attribute>
1541
+ <xs:attribute name="Codepage" type="xs:string">
1542
+ <xs:annotation>
1543
+ <xs:documentation>The code page integer value or web name for the resulting MSI. See remarks for more information.</xs:documentation>
1544
+ </xs:annotation>
1545
+ </xs:attribute>
1546
+ <xs:attribute name="Language" type="LocalizableInteger" use="required">
1547
+ <xs:annotation>
1548
+ <xs:documentation>The decimal language ID (LCID) for the product.</xs:documentation>
1549
+ </xs:annotation>
1550
+ </xs:attribute>
1551
+ <xs:attribute name="Manufacturer" type="xs:string" use="required">
1552
+ <xs:annotation>
1553
+ <xs:documentation>The manufacturer of the product.</xs:documentation>
1554
+ </xs:annotation>
1555
+ </xs:attribute>
1556
+ <xs:attribute name="Name" type="xs:string" use="required">
1557
+ <xs:annotation>
1558
+ <xs:documentation>The descriptive name of the product.</xs:documentation>
1559
+ </xs:annotation>
1560
+ </xs:attribute>
1561
+ <xs:attribute name="UpgradeCode" type="Guid">
1562
+ <xs:annotation>
1563
+ <xs:documentation>The upgrade code GUID for the product.</xs:documentation>
1564
+ </xs:annotation>
1565
+ </xs:attribute>
1566
+ <xs:attribute name="Version" type="xs:string" use="required">
1567
+ <xs:annotation>
1568
+ <xs:documentation>The product's version string.</xs:documentation>
1569
+ </xs:annotation>
1570
+ </xs:attribute>
1571
+ <xs:anyAttribute namespace="##other" processContents="lax">
1572
+ <xs:annotation>
1573
+ <xs:documentation>
1574
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1575
+ attributes at this point in the schema.
1576
+ </xs:documentation>
1577
+ </xs:annotation>
1578
+ </xs:anyAttribute>
1579
+ </xs:complexType>
1580
+ </xs:element>
1581
+ <xs:element name="Module">
1582
+ <xs:annotation>
1583
+ <xs:documentation>
1584
+ The Module element is analogous to the main function in a C program. When linking, only
1585
+ one Module section can be given to the linker to produce a successful result. Using this
1586
+ element creates an msm file.
1587
+ </xs:documentation>
1588
+ <xs:appinfo>
1589
+ <xse:remarks>
1590
+ <html:p>You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See <html:a href="~/overview/codepage.html">Code Pages</html:a> for more information.</html:p>
1591
+ </xse:remarks>
1592
+ </xs:appinfo>
1593
+ </xs:annotation>
1594
+ <xs:complexType>
1595
+ <xs:sequence>
1596
+ <xs:element ref="Package" />
1597
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1598
+ <xs:element ref="AppId" />
1599
+ <xs:element ref="Binary" />
1600
+ <xs:element ref="Component" />
1601
+ <xs:element ref="ComponentGroupRef" />
1602
+ <xs:element ref="ComponentRef" />
1603
+ <xs:element ref="Configuration" />
1604
+ <xs:element ref="CustomAction" />
1605
+ <xs:element ref="CustomActionRef" />
1606
+ <xs:element ref="CustomTable" />
1607
+ <xs:element ref="Dependency" />
1608
+ <xs:element ref="Directory" />
1609
+ <xs:element ref="DirectoryRef" />
1610
+ <xs:element ref="EmbeddedChainer" />
1611
+ <xs:element ref="EmbeddedChainerRef" />
1612
+ <xs:element ref="EnsureTable" />
1613
+ <xs:element ref="Exclusion" />
1614
+ <xs:element ref="Icon" />
1615
+ <xs:element ref="IgnoreModularization" />
1616
+ <xs:element ref="IgnoreTable" />
1617
+ <xs:element ref="Property" />
1618
+ <xs:element ref="PropertyRef" />
1619
+ <xs:element ref="SetDirectory" />
1620
+ <xs:element ref="SetProperty" />
1621
+ <xs:element ref="SFPCatalog" />
1622
+ <xs:element ref="Substitution" />
1623
+ <xs:element ref="UI" />
1624
+ <xs:element ref="UIRef" />
1625
+ <xs:element ref="WixVariable" />
1626
+ <xs:sequence>
1627
+ <xs:element ref="InstallExecuteSequence" minOccurs="0" />
1628
+ <xs:element ref="InstallUISequence" minOccurs="0" />
1629
+ <xs:element ref="AdminExecuteSequence" minOccurs="0" />
1630
+ <xs:element ref="AdminUISequence" minOccurs="0" />
1631
+ <xs:element ref="AdvertiseExecuteSequence" minOccurs="0" />
1632
+ </xs:sequence>
1633
+ <xs:any namespace="##other" processContents="lax">
1634
+ <xs:annotation>
1635
+ <xs:documentation>
1636
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1637
+ elements at this point in the schema.
1638
+ </xs:documentation>
1639
+ </xs:annotation>
1640
+ </xs:any>
1641
+ </xs:choice>
1642
+ </xs:sequence>
1643
+ <xs:attribute name="Id" type="xs:string" use="required">
1644
+ <xs:annotation>
1645
+ <xs:documentation>The name of the merge module (not the file name).</xs:documentation>
1646
+ </xs:annotation>
1647
+ </xs:attribute>
1648
+ <xs:attribute name="Codepage" type="xs:string">
1649
+ <xs:annotation>
1650
+ <xs:documentation>The code page integer value or web name for the resulting MSM. See remarks for more information.</xs:documentation>
1651
+ </xs:annotation>
1652
+ </xs:attribute>
1653
+ <xs:attribute name="Guid" type="Guid">
1654
+ <xs:annotation>
1655
+ <xs:documentation>This attribute is deprecated. Use the Package/@Id attribute instead.</xs:documentation>
1656
+ </xs:annotation>
1657
+ </xs:attribute>
1658
+ <xs:attribute name="Language" type="LocalizableInteger" use="required">
1659
+ <xs:annotation>
1660
+ <xs:documentation>The decimal language ID (LCID) of the merge module.</xs:documentation>
1661
+ </xs:annotation>
1662
+ </xs:attribute>
1663
+ <xs:attribute name="Version" type="xs:string" use="required">
1664
+ <xs:annotation>
1665
+ <xs:documentation>The major and minor versions of the merge module.</xs:documentation>
1666
+ </xs:annotation>
1667
+ </xs:attribute>
1668
+ </xs:complexType>
1669
+ </xs:element>
1670
+ <xs:element name="Dependency">
1671
+ <xs:annotation>
1672
+ <xs:documentation>Declares a dependency on another merge module.</xs:documentation>
1673
+ </xs:annotation>
1674
+ <xs:complexType>
1675
+ <xs:attribute name="RequiredId" type="xs:string" use="required">
1676
+ <xs:annotation>
1677
+ <xs:documentation>Identifier of the merge module required by the merge module.</xs:documentation>
1678
+ </xs:annotation>
1679
+ </xs:attribute>
1680
+ <xs:attribute name="RequiredLanguage" type="xs:integer" use="required">
1681
+ <xs:annotation>
1682
+ <xs:documentation>Numeric language ID of the merge module in RequiredID.</xs:documentation>
1683
+ </xs:annotation>
1684
+ </xs:attribute>
1685
+ <xs:attribute name="RequiredVersion" type="xs:string">
1686
+ <xs:annotation>
1687
+ <xs:documentation>Version of the merge module in RequiredID.</xs:documentation>
1688
+ </xs:annotation>
1689
+ </xs:attribute>
1690
+ </xs:complexType>
1691
+ </xs:element>
1692
+ <xs:element name="Exclusion">
1693
+ <xs:annotation>
1694
+ <xs:documentation>Declares a merge module with which this merge module is incompatible.</xs:documentation>
1695
+ </xs:annotation>
1696
+ <xs:complexType>
1697
+ <xs:attribute name="ExcludedId" type="xs:string" use="required">
1698
+ <xs:annotation>
1699
+ <xs:documentation>Identifier of the merge module that is incompatible.</xs:documentation>
1700
+ </xs:annotation>
1701
+ </xs:attribute>
1702
+ <xs:attribute name="ExcludeExceptLanguage" type="xs:integer">
1703
+ <xs:annotation>
1704
+ <xs:documentation>Numeric language ID of the merge module in ExcludedID. All except this language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified.</xs:documentation>
1705
+ </xs:annotation>
1706
+ </xs:attribute>
1707
+ <xs:attribute name="ExcludeLanguage" type="xs:integer">
1708
+ <xs:annotation>
1709
+ <xs:documentation>Numeric language ID of the merge module in ExcludedID. The specified language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified.</xs:documentation>
1710
+ </xs:annotation>
1711
+ </xs:attribute>
1712
+ <xs:attribute name="ExcludedMinVersion" type="xs:string">
1713
+ <xs:annotation>
1714
+ <xs:documentation>Minimum version excluded from a range. If not set, all versions before max are excluded. If neither max nor min, no exclusion based on version.</xs:documentation>
1715
+ </xs:annotation>
1716
+ </xs:attribute>
1717
+ <xs:attribute name="ExcludedMaxVersion" type="xs:string">
1718
+ <xs:annotation>
1719
+ <xs:documentation>Maximum version excluded from a range. If not set, all versions after min are excluded. If neither max nor min, no exclusion based on version.</xs:documentation>
1720
+ </xs:annotation>
1721
+ </xs:attribute>
1722
+ </xs:complexType>
1723
+ </xs:element>
1724
+ <xs:element name="Configuration">
1725
+ <xs:annotation>
1726
+ <xs:documentation>Defines the configurable attributes of merge module.</xs:documentation>
1727
+ </xs:annotation>
1728
+ <xs:complexType>
1729
+ <xs:attribute name="Name" type="xs:string" use="required">
1730
+ <xs:annotation>
1731
+ <xs:documentation>Defines the name of the configurable item.</xs:documentation>
1732
+ </xs:annotation>
1733
+ </xs:attribute>
1734
+ <xs:attribute name="Format" use="required">
1735
+ <xs:annotation>
1736
+ <xs:documentation>Specifies the format of the data being changed.</xs:documentation>
1737
+ </xs:annotation>
1738
+ <xs:simpleType>
1739
+ <xs:restriction base="xs:string">
1740
+ <xs:enumeration value="Text" />
1741
+ <xs:enumeration value="Key" />
1742
+ <xs:enumeration value="Integer" />
1743
+ <xs:enumeration value="Bitfield" />
1744
+ </xs:restriction>
1745
+ </xs:simpleType>
1746
+ </xs:attribute>
1747
+ <xs:attribute name="Type" type="xs:string">
1748
+ <xs:annotation>
1749
+ <xs:documentation>Specifies the type of the data being changed.</xs:documentation>
1750
+ </xs:annotation>
1751
+ </xs:attribute>
1752
+ <xs:attribute name="ContextData" type="xs:string">
1753
+ <xs:annotation>
1754
+ <xs:documentation>Specifies a semantic context for the requested data.</xs:documentation>
1755
+ </xs:annotation>
1756
+ </xs:attribute>
1757
+ <xs:attribute name="DefaultValue" type="xs:string">
1758
+ <xs:annotation>
1759
+ <xs:documentation>Specifies a default value for the item in this record if the merge tool declines to provide a value.</xs:documentation>
1760
+ </xs:annotation>
1761
+ </xs:attribute>
1762
+ <xs:attribute name="KeyNoOrphan" type="YesNoTypeUnion">
1763
+ <xs:annotation>
1764
+ <xs:documentation>Does not merge rule according to rules in MSI SDK.</xs:documentation>
1765
+ </xs:annotation>
1766
+ </xs:attribute>
1767
+ <xs:attribute name="NonNullable" type="YesNoTypeUnion">
1768
+ <xs:annotation>
1769
+ <xs:documentation>If yes, null is not a valid entry.</xs:documentation>
1770
+ </xs:annotation>
1771
+ </xs:attribute>
1772
+ <xs:attribute name="DisplayName" type="xs:string">
1773
+ <xs:annotation>
1774
+ <xs:documentation>Display name for authoring.</xs:documentation>
1775
+ </xs:annotation>
1776
+ </xs:attribute>
1777
+ <xs:attribute name="Description" type="xs:string">
1778
+ <xs:annotation>
1779
+ <xs:documentation>Description for authoring.</xs:documentation>
1780
+ </xs:annotation>
1781
+ </xs:attribute>
1782
+ <xs:attribute name="HelpLocation" type="xs:string">
1783
+ <xs:annotation>
1784
+ <xs:documentation>Location of chm file for authoring.</xs:documentation>
1785
+ </xs:annotation>
1786
+ </xs:attribute>
1787
+ <xs:attribute name="HelpKeyword" type="xs:string">
1788
+ <xs:annotation>
1789
+ <xs:documentation>Keyword into chm file for authoring.</xs:documentation>
1790
+ </xs:annotation>
1791
+ </xs:attribute>
1792
+ </xs:complexType>
1793
+ </xs:element>
1794
+ <xs:element name="Substitution">
1795
+ <xs:annotation>
1796
+ <xs:documentation>Specifies the configurable fields of a module database and provides a template for the configuration of each field.</xs:documentation>
1797
+ </xs:annotation>
1798
+ <xs:complexType>
1799
+ <xs:attribute name="Table" type="xs:string" use="required">
1800
+ <xs:annotation>
1801
+ <xs:documentation>Specifies the name of the table being modified in the module database.</xs:documentation>
1802
+ </xs:annotation>
1803
+ </xs:attribute>
1804
+ <xs:attribute name="Row" type="xs:string" use="required">
1805
+ <xs:annotation>
1806
+ <xs:documentation>Specifies the primary keys of the target row in the table named in the Table column. If multiple keys, separated by semicolons.</xs:documentation>
1807
+ </xs:annotation>
1808
+ </xs:attribute>
1809
+ <xs:attribute name="Column" type="xs:string" use="required">
1810
+ <xs:annotation>
1811
+ <xs:documentation>Specifies the target column in the row named in the Row column.</xs:documentation>
1812
+ </xs:annotation>
1813
+ </xs:attribute>
1814
+ <xs:attribute name="Value" type="xs:string">
1815
+ <xs:annotation>
1816
+ <xs:documentation>Provides a formatting template for the data being substituted into the target field specified by Table, Row, and Column.</xs:documentation>
1817
+ </xs:annotation>
1818
+ </xs:attribute>
1819
+ </xs:complexType>
1820
+ </xs:element>
1821
+ <xs:element name="IgnoreTable">
1822
+ <xs:annotation>
1823
+ <xs:documentation>
1824
+ Specifies a table from the merge module that is not merged into an .msi file.
1825
+ If the table already exists in an .msi file, it is not modified by the merge.
1826
+ The specified table can therefore contain data that is unneeded after the merge.
1827
+ To minimize the size of the .msm file, it is recommended that developers remove
1828
+ unused tables from modules intended for redistribution rather than creating
1829
+ IgnoreTable elements for those tables.
1830
+ </xs:documentation>
1831
+ </xs:annotation>
1832
+ <xs:complexType>
1833
+ <xs:attribute name="Id" type="xs:string" use="required">
1834
+ <xs:annotation>
1835
+ <xs:documentation>
1836
+ The name of the table in the merge module that is not to be merged into the .msi file.
1837
+ </xs:documentation>
1838
+ </xs:annotation>
1839
+ </xs:attribute>
1840
+ </xs:complexType>
1841
+ </xs:element>
1842
+ <xs:element name="Fragment">
1843
+ <xs:annotation>
1844
+ <xs:documentation>
1845
+ The Fragment element is the building block of creating an installer database in WiX. Once defined,
1846
+ the Fragment becomes an immutable, atomic unit which can either be completely included or excluded
1847
+ from a product. The contents of a Fragment element can be linked into a product by utilizing one
1848
+ of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its
1849
+ individual units. For instance, if a given Fragment contains two Component elements, you must link
1850
+ both under features using ComponentRef for each linked Component. Otherwise, you will get a linker
1851
+ warning and have a floating Component that does not appear under any Feature.
1852
+ </xs:documentation>
1853
+ </xs:annotation>
1854
+ <xs:complexType>
1855
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1856
+ <xs:element ref="AppId" />
1857
+ <xs:element ref="Binary" />
1858
+ <xs:element ref="BootstrapperApplication" />
1859
+ <xs:element ref="BootstrapperApplicationRef" />
1860
+ <xs:element ref="ComplianceCheck" />
1861
+ <xs:element ref="Component" />
1862
+ <xs:element ref="ComponentGroup" />
1863
+ <xs:element ref="Condition" />
1864
+ <xs:element ref="Container" />
1865
+ <xs:element ref="CustomAction" />
1866
+ <xs:element ref="CustomActionRef" />
1867
+ <xs:element ref="CustomTable" />
1868
+ <xs:element ref="Directory" />
1869
+ <xs:element ref="DirectoryRef" />
1870
+ <xs:element ref="EmbeddedChainer" />
1871
+ <xs:element ref="EmbeddedChainerRef" />
1872
+ <xs:element ref="EnsureTable" />
1873
+ <xs:element ref="Feature" />
1874
+ <xs:element ref="FeatureGroup" />
1875
+ <xs:element ref="FeatureRef" />
1876
+ <xs:element ref="Icon" />
1877
+ <xs:element ref="IgnoreModularization" />
1878
+ <xs:element ref="Media" />
1879
+ <xs:element ref="MediaTemplate" />
1880
+ <xs:element ref="PackageGroup" />
1881
+ <xs:element ref="PackageCertificates" />
1882
+ <xs:element ref="PatchCertificates" />
1883
+ <xs:element ref="PatchFamily" />
1884
+ <xs:element ref="PatchFamilyGroup"/>
1885
+ <xs:element ref="PayloadGroup" />
1886
+ <xs:element ref="Property" />
1887
+ <xs:element ref="PropertyRef" />
1888
+ <xs:element ref="RelatedBundle" />
1889
+ <xs:element ref="SetDirectory" />
1890
+ <xs:element ref="SetProperty" />
1891
+ <xs:element ref="SFPCatalog" />
1892
+ <xs:element ref="UI" />
1893
+ <xs:element ref="UIRef" />
1894
+ <xs:element ref="Upgrade" />
1895
+ <xs:element ref="Variable" />
1896
+ <xs:element ref="WixVariable" />
1897
+ <xs:sequence>
1898
+ <xs:element ref="InstallExecuteSequence" minOccurs="0" />
1899
+ <xs:element ref="InstallUISequence" minOccurs="0" />
1900
+ <xs:element ref="AdminExecuteSequence" minOccurs="0" />
1901
+ <xs:element ref="AdminUISequence" minOccurs="0" />
1902
+ <xs:element ref="AdvertiseExecuteSequence" minOccurs="0" />
1903
+ </xs:sequence>
1904
+ <xs:any namespace="##other" processContents="lax">
1905
+ <xs:annotation>
1906
+ <xs:documentation>
1907
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1908
+ elements at this point in the schema.
1909
+ </xs:documentation>
1910
+ </xs:annotation>
1911
+ </xs:any>
1912
+ </xs:choice>
1913
+ <xs:attribute name="Id" type="xs:string">
1914
+ <xs:annotation>
1915
+ <xs:documentation>
1916
+ Optional identifier for a Fragment. Should only be set by advanced users to tag sections.
1917
+ </xs:documentation>
1918
+ </xs:annotation>
1919
+ </xs:attribute>
1920
+ </xs:complexType>
1921
+ </xs:element>
1922
+ <xs:element name="Patch">
1923
+ <xs:annotation>
1924
+ <xs:documentation>
1925
+ The Patch element is analogous to the main function in a C program. When linking, only one Patch section
1926
+ can be given to the linker to produce a successful result. Using this element creates an MSP file.
1927
+ </xs:documentation>
1928
+ <xs:appinfo>
1929
+ <xse:remarks>
1930
+ <html:p>You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See <html:a href="~/overview/codepage.html">Code Pages</html:a> for more information.</html:p>
1931
+ <html:p>The ClientPatchId attribute allows you to specify an easily referenced identity that you can use in product authoring. This identity prefixes properties added by WiX to a patch transform, such as <html:i>ClientPatchId</html:i>.PatchCode and <html:i>ClientPatchId</html:i>.AllowRemoval. If the patch code GUID is auto-generated you could not reference any properties using this auto-generated prefix.</html:p>
1932
+ <html:p>For example, if you were planning to ship a patch referred to as "QFE1" and needed to write your own registry values for Add/Remove Programs in product authoring such as the UninstallString for this patch, you could author a RegistryValue with the name UninstallString and the value <html:code><html:nobr>[SystemFolder]msiexec.exe</html:nobr> /package [ProductCode] /uninstall [QFE1.PatchCode]</html:code>. In your patch authoring you would then set ClientPatchId to "QFE1" and WiX will add the QFE1.PatchCode property to the patch transform when the patch is created. If the Id attribute specified the patch code to be generated automatically, you could not reference the <html:i>prefix</html:i>.PatchCode property as shown above.</html:p>
1933
+ <html:p>The summary information is automatically populated from attribute values of the Patch element including the code page. If you want to override some of these summary information properties or use a different code page for the summary information itself, author the PatchInformation element.</html:p>
1934
+ </xse:remarks>
1935
+ </xs:appinfo>
1936
+ </xs:annotation>
1937
+ <xs:complexType>
1938
+ <xs:sequence>
1939
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
1940
+ <xs:element ref="PatchInformation" minOccurs="0" maxOccurs="1">
1941
+ <xs:annotation>
1942
+ <xs:documentation>Optional element that allows overriding summary information properties.</xs:documentation>
1943
+ </xs:annotation>
1944
+ </xs:element>
1945
+ <xs:element ref="Media" minOccurs="1" maxOccurs="unbounded" />
1946
+ <xs:element ref="OptimizeCustomActions" minOccurs="0" maxOccurs="1">
1947
+ <xs:annotation>
1948
+ <xs:documentation>Indicates whether custom actions can be skipped when applying the patch.</xs:documentation>
1949
+ </xs:annotation>
1950
+ </xs:element>
1951
+ <xs:element ref="PatchFamily" minOccurs="1" maxOccurs="unbounded" />
1952
+ <xs:element ref="PatchFamilyRef" minOccurs="0" maxOccurs="unbounded" />
1953
+ <xs:element ref="PatchFamilyGroup" minOccurs="1" maxOccurs="unbounded"/>
1954
+ <xs:element ref="PatchFamilyGroupRef" minOccurs="0" maxOccurs="unbounded"/>
1955
+ <xs:element ref="PatchProperty" />
1956
+ <xs:element ref="TargetProductCodes" />
1957
+ <xs:any namespace="##other" processContents="lax">
1958
+ <xs:annotation>
1959
+ <xs:documentation>
1960
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
1961
+ elements at this point in the schema.
1962
+ </xs:documentation>
1963
+ </xs:annotation>
1964
+ </xs:any>
1965
+ </xs:choice>
1966
+ </xs:sequence>
1967
+ <xs:attribute name="Id" type="AutogenGuid">
1968
+ <xs:annotation>
1969
+ <xs:documentation>Patch code for this patch.</xs:documentation>
1970
+ </xs:annotation>
1971
+ </xs:attribute>
1972
+ <xs:attribute name="Codepage" type="xs:string">
1973
+ <xs:annotation>
1974
+ <xs:documentation>The code page integer value or web name for the resulting MSP. See remarks for more information.</xs:documentation>
1975
+ </xs:annotation>
1976
+ </xs:attribute>
1977
+ <xs:attribute name="AllowRemoval" type="YesNoTypeUnion">
1978
+ <xs:annotation>
1979
+ <xs:documentation>Whether this is an uninstallable patch.</xs:documentation>
1980
+ </xs:annotation>
1981
+ </xs:attribute>
1982
+ <xs:attribute name="Classification" type="xs:string" use="required">
1983
+ <xs:annotation>
1984
+ <xs:documentation>Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.</xs:documentation>
1985
+ </xs:annotation>
1986
+ </xs:attribute>
1987
+ <xs:attribute name="ClientPatchId" type="xs:string">
1988
+ <xs:annotation>
1989
+ <xs:documentation>An easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information.</xs:documentation>
1990
+ </xs:annotation>
1991
+ </xs:attribute>
1992
+ <xs:attribute name="ApiPatchingSymbolNoImagehlpFlag" type="YesNoTypeUnion">
1993
+ <xs:annotation>
1994
+ <xs:documentation>Flag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll.</xs:documentation>
1995
+ </xs:annotation>
1996
+ </xs:attribute>
1997
+ <xs:attribute name="ApiPatchingSymbolNoFailuresFlag" type="YesNoTypeUnion">
1998
+ <xs:annotation>
1999
+ <xs:documentation>Flag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures.</xs:documentation>
2000
+ </xs:annotation>
2001
+ </xs:attribute>
2002
+ <xs:attribute name="ApiPatchingSymbolUndecoratedTooFlag" type="YesNoTypeUnion">
2003
+ <xs:annotation>
2004
+ <xs:documentation>Flag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names.</xs:documentation>
2005
+ </xs:annotation>
2006
+ </xs:attribute>
2007
+ <xs:attribute name="Description" type="xs:string" use="required">
2008
+ <xs:annotation>
2009
+ <xs:documentation>Description of the patch.</xs:documentation>
2010
+ </xs:annotation>
2011
+ </xs:attribute>
2012
+ <xs:attribute name="DisplayName" type="xs:string" use="required">
2013
+ <xs:annotation>
2014
+ <xs:documentation>A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.</xs:documentation>
2015
+ </xs:annotation>
2016
+ </xs:attribute>
2017
+ <xs:attribute name="Comments" type="xs:string">
2018
+ <xs:annotation>
2019
+ <xs:documentation>Optional comments for browsing.</xs:documentation>
2020
+ </xs:annotation>
2021
+ </xs:attribute>
2022
+ <xs:attribute name="Manufacturer" type="xs:string">
2023
+ <xs:annotation>
2024
+ <xs:documentation>Vendor releasing the package</xs:documentation>
2025
+ </xs:annotation>
2026
+ </xs:attribute>
2027
+ <xs:attribute name="MinorUpdateTargetRTM" type="YesNoTypeUnion">
2028
+ <xs:annotation>
2029
+ <xs:documentation>
2030
+ Indicates that the patch targets the RTM version of the product or the most recent major
2031
+ upgrade patch. Author this optional property in minor update patches that contain sequencing
2032
+ information to indicate that the patch removes all patches up to the RTM version of the
2033
+ product, or up to the most recent major upgrade patch. This property is available beginning
2034
+ with Windows Installer 3.1.
2035
+ </xs:documentation>
2036
+ </xs:annotation>
2037
+ </xs:attribute>
2038
+ <xs:attribute name="MoreInfoURL" type="xs:string">
2039
+ <xs:annotation>
2040
+ <xs:documentation>A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.</xs:documentation>
2041
+ </xs:annotation>
2042
+ </xs:attribute>
2043
+ <xs:attribute name="OptimizedInstallMode" type="YesNoTypeUnion">
2044
+ <xs:annotation>
2045
+ <xs:documentation>
2046
+ If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
2047
+ application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
2048
+ </xs:documentation>
2049
+ </xs:annotation>
2050
+ </xs:attribute>
2051
+ <xs:attribute name="TargetProductName" type="xs:string">
2052
+ <xs:annotation>
2053
+ <xs:documentation>Name of the application or target product suite.</xs:documentation>
2054
+ </xs:annotation>
2055
+ </xs:attribute>
2056
+ <xs:attribute name="OptimizePatchSizeForLargeFiles" type="YesNoTypeUnion">
2057
+ <xs:annotation>
2058
+ <xs:documentation>When this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller.</xs:documentation>
2059
+ </xs:annotation>
2060
+ </xs:attribute>
2061
+ </xs:complexType>
2062
+ </xs:element>
2063
+ <xs:element name="Validate">
2064
+ <xs:annotation>
2065
+ <xs:documentation>Sets information in the patch transform that determines if the transform applies to an installed product and what errors should be ignored when applying the patch transform.</xs:documentation>
2066
+ <xs:appinfo>
2067
+ <xse:remarks>
2068
+ <html:p>A transform contains the differences between the target product and the upgraded product. When a transform or a patch (which contains transforms) is applied, the following properties of the installed product are validated against the properties of the target product stored in a transform.</html:p>
2069
+ <html:ul>
2070
+ <html:li>ProductCode</html:li>
2071
+ <html:li>ProductLanguage</html:li>
2072
+ <html:li>ProductVersion</html:li>
2073
+ <html:li>UpgradeCode</html:li>
2074
+ </html:ul>
2075
+ <html:p>Windows Installer simply validates that the ProductCode, ProductLanguage, and UpgradeCode of an installed product are equivalent to those propeties of the target product used to create the transform; however, the ProductVersion can be validated with a greater range of comparisons.</html:p>
2076
+ <html:p>You can compare up to the first three fields of the ProductVersion. Changes to the fourth field are not validated and are useful for small updates. You can also choose how to compare the target ProductVersion used to create the transform with the installed ProductVersion. For example, while the default value of 'Equals' is recommended, if you wanted a minor upgrade patch to apply to the target ProductVersion and all older products with the same ProductCode, you would use 'LesserOrEqual'.</html:p>
2077
+ </xse:remarks>
2078
+ </xs:appinfo>
2079
+ </xs:annotation>
2080
+ <xs:complexType>
2081
+ <xs:attribute name="ProductId" type="YesNoTypeUnion" default="yes">
2082
+ <xs:annotation>
2083
+ <xs:documentation>Requires that the installed ProductCode match the target ProductCode used to create the transform. The default is 'yes'.</xs:documentation>
2084
+ </xs:annotation>
2085
+ </xs:attribute>
2086
+ <xs:attribute name="ProductLanguage" type="YesNoTypeUnion" default="no">
2087
+ <xs:annotation>
2088
+ <xs:documentation>Requires that the installed ProductLanguage match the target ProductLanguage used to create the transform. The default is 'no'.</xs:documentation>
2089
+ </xs:annotation>
2090
+ </xs:attribute>
2091
+ <xs:attribute name="ProductVersion" default="Update">
2092
+ <xs:annotation>
2093
+ <xs:documentation>Determines how many fields of the installed ProductVersion to compare. See remarks for more information. The default is 'Update'.</xs:documentation>
2094
+ </xs:annotation>
2095
+ <xs:simpleType>
2096
+ <xs:restriction base="xs:NMTOKEN">
2097
+ <xs:enumeration value="Major">
2098
+ <xs:annotation>
2099
+ <xs:documentation>Checks the major version.</xs:documentation>
2100
+ </xs:annotation>
2101
+ </xs:enumeration>
2102
+ <xs:enumeration value="Minor">
2103
+ <xs:annotation>
2104
+ <xs:documentation>Checks the major and minor versions.</xs:documentation>
2105
+ </xs:annotation>
2106
+ </xs:enumeration>
2107
+ <xs:enumeration value="Update">
2108
+ <xs:annotation>
2109
+ <xs:documentation>Checks the major, minor, and update versions.</xs:documentation>
2110
+ </xs:annotation>
2111
+ </xs:enumeration>
2112
+ </xs:restriction>
2113
+ </xs:simpleType>
2114
+ </xs:attribute>
2115
+ <xs:attribute name="ProductVersionOperator" default="Equal">
2116
+ <xs:annotation>
2117
+ <xs:documentation>Determines how the installed ProductVersion is compared to the target ProductVersion used to create the transform. See remarks for more information. The default is 'Equal'.</xs:documentation>
2118
+ </xs:annotation>
2119
+ <xs:simpleType>
2120
+ <xs:restriction base="xs:NMTOKEN">
2121
+ <xs:enumeration value="Lesser">
2122
+ <xs:annotation>
2123
+ <xs:documentation>Installed ProductVersion < target ProductVersion.</xs:documentation>
2124
+ </xs:annotation>
2125
+ </xs:enumeration>
2126
+ <xs:enumeration value="LesserOrEqual">
2127
+ <xs:annotation>
2128
+ <xs:documentation>Installed ProductVersion <= target ProductVersion.</xs:documentation>
2129
+ </xs:annotation>
2130
+ </xs:enumeration>
2131
+ <xs:enumeration value="Equal">
2132
+ <xs:annotation>
2133
+ <xs:documentation>Installed ProductVersion = target ProductVersion.</xs:documentation>
2134
+ </xs:annotation>
2135
+ </xs:enumeration>
2136
+ <xs:enumeration value="GreaterOrEqual">
2137
+ <xs:annotation>
2138
+ <xs:documentation>Installed ProductVersion >= target ProductVersion.</xs:documentation>
2139
+ </xs:annotation>
2140
+ </xs:enumeration>
2141
+ <xs:enumeration value="Greater">
2142
+ <xs:annotation>
2143
+ <xs:documentation>Installed ProductVersion > target ProductVersion.</xs:documentation>
2144
+ </xs:annotation>
2145
+ </xs:enumeration>
2146
+ </xs:restriction>
2147
+ </xs:simpleType>
2148
+ </xs:attribute>
2149
+ <xs:attribute name="UpgradeCode" type="YesNoTypeUnion" default="yes">
2150
+ <xs:annotation>
2151
+ <xs:documentation>Requires that the installed UpgradeCode match the target UpgradeCode used to create the transform. The default is 'yes'.</xs:documentation>
2152
+ </xs:annotation>
2153
+ </xs:attribute>
2154
+ <xs:attribute name="IgnoreAddExistingRow" type="YesNoTypeUnion" default="yes">
2155
+ <xs:annotation>
2156
+ <xs:documentation>Ignore errors when adding existing rows. The default is 'yes'.</xs:documentation>
2157
+ </xs:annotation>
2158
+ </xs:attribute>
2159
+ <xs:attribute name="IgnoreAddExistingTable" type="YesNoTypeUnion" default="yes">
2160
+ <xs:annotation>
2161
+ <xs:documentation>Ignore errors when adding existing tables. The default is 'yes'.</xs:documentation>
2162
+ </xs:annotation>
2163
+ </xs:attribute>
2164
+ <xs:attribute name="IgnoreDeleteMissingRow" type="YesNoTypeUnion" default="yes">
2165
+ <xs:annotation>
2166
+ <xs:documentation>Ignore errors when deleting missing rows. The default is 'yes'.</xs:documentation>
2167
+ </xs:annotation>
2168
+ </xs:attribute>
2169
+ <xs:attribute name="IgnoreDeleteMissingTable" type="YesNoTypeUnion" default="yes">
2170
+ <xs:annotation>
2171
+ <xs:documentation>Ignore errors when deleting missing tables. The default is 'yes'.</xs:documentation>
2172
+ </xs:annotation>
2173
+ </xs:attribute>
2174
+ <xs:attribute name="IgnoreUpdateMissingRow" type="YesNoTypeUnion" default="yes">
2175
+ <xs:annotation>
2176
+ <xs:documentation>Ignore errors when updating missing rows. The default is 'yes'.</xs:documentation>
2177
+ </xs:annotation>
2178
+ </xs:attribute>
2179
+ <xs:attribute name="IgnoreChangingCodePage" type="YesNoTypeUnion" default="no">
2180
+ <xs:annotation>
2181
+ <xs:documentation>Ignore errors when changing the database code page. The default is 'no'.</xs:documentation>
2182
+ </xs:annotation>
2183
+ </xs:attribute>
2184
+ </xs:complexType>
2185
+ </xs:element>
2186
+ <xs:element name="OptimizeCustomActions">
2187
+ <xs:annotation>
2188
+ <xs:documentation>Indicates whether custom actions can be skipped when applying the patch.</xs:documentation>
2189
+ <xs:appinfo>
2190
+ <xse:msiRef table="MsiPatchMetadata" href="http://msdn.microsoft.com/library/aa370344.aspx" />
2191
+ </xs:appinfo>
2192
+ </xs:annotation>
2193
+ <xs:complexType>
2194
+ <xs:attribute name="SkipAssignment" type="YesNoTypeUnion">
2195
+ <xs:annotation>
2196
+ <xs:documentation>Skip property (type 51) and directory (type 35) assignment custom actions.</xs:documentation>
2197
+ </xs:annotation>
2198
+ </xs:attribute>
2199
+ <xs:attribute name="SkipImmediate" type="YesNoTypeUnion">
2200
+ <xs:annotation>
2201
+ <xs:documentation>Skip immediate custom actions that are not property or directory assignment custom actions.</xs:documentation>
2202
+ </xs:annotation>
2203
+ </xs:attribute>
2204
+ <xs:attribute name="SkipDeferred" type="YesNoTypeUnion">
2205
+ <xs:annotation>
2206
+ <xs:documentation>Skip custom actions that run within the script.</xs:documentation>
2207
+ </xs:annotation>
2208
+ </xs:attribute>
2209
+ </xs:complexType>
2210
+ </xs:element>
2211
+ <xs:element name="PatchBaseline">
2212
+ <xs:annotation>
2213
+ <xs:documentation>Identifies a set of product versions.</xs:documentation>
2214
+ </xs:annotation>
2215
+ <xs:complexType>
2216
+ <xs:choice minOccurs="0">
2217
+ <xs:element ref="Validate" minOccurs="0" />
2218
+ </xs:choice>
2219
+ <xs:attribute name="Id" type="xs:string" use="required">
2220
+ <xs:annotation>
2221
+ <xs:documentation>Identifier for a set of product versions.</xs:documentation>
2222
+ </xs:annotation>
2223
+ </xs:attribute>
2224
+ </xs:complexType>
2225
+ </xs:element>
2226
+ <xs:element name="PatchFamily">
2227
+ <xs:annotation>
2228
+ <xs:documentation>Collection of items that should be kept from the differences between two products.</xs:documentation>
2229
+ </xs:annotation>
2230
+ <xs:complexType>
2231
+ <xs:sequence>
2232
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2233
+ <xs:element ref="All" minOccurs="0" />
2234
+ <xs:element ref="BinaryRef" minOccurs="0" maxOccurs="unbounded" />
2235
+ <xs:element ref="ComponentRef" minOccurs="0" maxOccurs="unbounded" />
2236
+ <xs:element ref="CustomActionRef" minOccurs="0" maxOccurs="unbounded" />
2237
+ <xs:element ref="DigitalCertificateRef" minOccurs="0" maxOccurs="unbounded" />
2238
+ <xs:element ref="DirectoryRef" minOccurs="0" maxOccurs="unbounded" />
2239
+ <xs:element ref="FeatureRef" minOccurs="0" maxOccurs="unbounded" />
2240
+ <xs:element ref="IconRef" minOccurs="0" maxOccurs="unbounded" />
2241
+ <xs:element ref="PropertyRef" minOccurs="0" maxOccurs="unbounded" />
2242
+ <xs:element ref="UIRef" minOccurs="0" maxOccurs="unbounded" />
2243
+ <xs:any namespace="##other" processContents="lax">
2244
+ <xs:annotation>
2245
+ <xs:documentation>
2246
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
2247
+ elements at this point in the schema.
2248
+ </xs:documentation>
2249
+ </xs:annotation>
2250
+ </xs:any>
2251
+ </xs:choice>
2252
+ </xs:sequence>
2253
+ <xs:attribute name="Id" type="xs:string" use="required">
2254
+ <xs:annotation>
2255
+ <xs:documentation>Identifier which indicates a sequence family to which this patch belongs.</xs:documentation>
2256
+ </xs:annotation>
2257
+ </xs:attribute>
2258
+ <xs:attribute name="ProductCode" type="Guid">
2259
+ <xs:annotation>
2260
+ <xs:documentation>
2261
+ Specifies the ProductCode of the product that this family applies to.
2262
+ </xs:documentation>
2263
+ </xs:annotation>
2264
+ </xs:attribute>
2265
+ <xs:attribute name="Version" type="xs:string" use="required">
2266
+ <xs:annotation>
2267
+ <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>
2268
+ </xs:annotation>
2269
+ </xs:attribute>
2270
+ <xs:attribute name="Supersede" type="YesNoTypeUnion">
2271
+ <xs:annotation>
2272
+ <xs:documentation>
2273
+ Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
2274
+ The default value is 'no'.
2275
+ </xs:documentation>
2276
+ </xs:annotation>
2277
+ </xs:attribute>
2278
+ </xs:complexType>
2279
+ </xs:element>
2280
+ <xs:element name="PatchFamilyGroup">
2281
+ <xs:annotation>
2282
+ <xs:documentation>
2283
+ Groups together multiple patch families to be used in other locations.
2284
+ </xs:documentation>
2285
+ <xs:appinfo>
2286
+ <xse:seeAlso ref="PatchFamilyGroupRef"/>
2287
+ </xs:appinfo>
2288
+ </xs:annotation>
2289
+ <xs:complexType>
2290
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2291
+ <xs:element ref="PatchFamily"/>
2292
+ <xs:element ref="PatchFamilyRef"/>
2293
+ <xs:element ref="PatchFamilyGroupRef"/>
2294
+ <xs:any namespace="##other" processContents="lax">
2295
+ <xs:annotation>
2296
+ <xs:documentation>
2297
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
2298
+ elements at this point in the schema.
2299
+ </xs:documentation>
2300
+ </xs:annotation>
2301
+ </xs:any>
2302
+ </xs:choice>
2303
+ <xs:attribute name="Id" type="xs:string" use="required">
2304
+ <xs:annotation>
2305
+ <xs:documentation>Identifier for the PatchFamilyGroup.</xs:documentation>
2306
+ </xs:annotation>
2307
+ </xs:attribute>
2308
+ <xs:anyAttribute namespace="##other" processContents="lax">
2309
+ <xs:annotation>
2310
+ <xs:documentation>
2311
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
2312
+ attributes at this point in the schema.
2313
+ </xs:documentation>
2314
+ </xs:annotation>
2315
+ </xs:anyAttribute>
2316
+ </xs:complexType>
2317
+</xs:element>
2318
+<xs:element name="PatchFamilyGroupRef">
2319
+ <xs:annotation>
2320
+ <xs:documentation>Create a reference to a PatchFamilyGroup in another Fragment.</xs:documentation>
2321
+ <xs:appinfo>
2322
+ <xse:seeAlso ref="PatchFamilyGroupRef"/>
2323
+ </xs:appinfo>
2324
+ </xs:annotation>
2325
+ <xs:complexType>
2326
+ <xs:attribute name="Id" type="xs:string" use="required">
2327
+ <xs:annotation>
2328
+ <xs:documentation>The identifier of the PatchFamilyGroup to reference.</xs:documentation>
2329
+ </xs:annotation>
2330
+ </xs:attribute>
2331
+ <xs:anyAttribute namespace="##other" processContents="lax">
2332
+ <xs:annotation>
2333
+ <xs:documentation>
2334
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
2335
+ attributes at this point in the schema.
2336
+ </xs:documentation>
2337
+ </xs:annotation>
2338
+ </xs:anyAttribute>
2339
+ </xs:complexType>
2340
+</xs:element>
2341
+ <xs:element name="PatchCreation">
2342
+ <xs:annotation>
2343
+ <xs:documentation>
2344
+ The PatchCreation element is analogous to the main function in a C program. When linking, only one PatchCreation section
2345
+ can be given to the linker to produce a successful result. Using this element creates a pcp file.
2346
+ </xs:documentation>
2347
+ <xs:appinfo>
2348
+ <xse:remarks>
2349
+ <html:p>You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See <html:a href="~/overview/codepage.html">Code Pages</html:a> for more information.</html:p>
2350
+ </xse:remarks>
2351
+ </xs:appinfo>
2352
+ </xs:annotation>
2353
+ <xs:complexType>
2354
+ <xs:sequence>
2355
+ <xs:element ref="PatchInformation" />
2356
+ <xs:element ref="PatchMetadata" minOccurs="0" />
2357
+ <xs:element ref="Family" maxOccurs="unbounded" />
2358
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2359
+ <xs:element ref="PatchProperty" />
2360
+ <xs:element ref="PatchSequence" />
2361
+ <xs:element ref="ReplacePatch" />
2362
+ <xs:element ref="TargetProductCode" />
2363
+ </xs:choice>
2364
+ </xs:sequence>
2365
+ <xs:attribute name="Id" type="Guid" use="required">
2366
+ <xs:annotation>
2367
+ <xs:documentation>PatchCreation identifier; this is the primary key for identifying patches.</xs:documentation>
2368
+ </xs:annotation>
2369
+ </xs:attribute>
2370
+ <xs:attribute name="AllowMajorVersionMismatches" type="YesNoTypeUnion">
2371
+ <xs:annotation>
2372
+ <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" target="_blank">AllowProductVersionMajorMismatches</html:a> for more information.</xs:documentation>
2373
+ </xs:annotation>
2374
+ </xs:attribute>
2375
+ <xs:attribute name="AllowProductCodeMismatches" type="YesNoTypeUnion">
2376
+ <xs:annotation>
2377
+ <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" target="_blank">AllowProductCodeMismatches</html:a> for more information.</xs:documentation>
2378
+ </xs:annotation>
2379
+ </xs:attribute>
2380
+ <xs:attribute name="CleanWorkingFolder" type="YesNoTypeUnion">
2381
+ <xs:annotation>
2382
+ <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" target="_blank">DontRemoveTempFolderWhenFinished</html:a> for more information. </xs:documentation>
2383
+ </xs:annotation>
2384
+ </xs:attribute>
2385
+ <xs:attribute name="Codepage" type="xs:string">
2386
+ <xs:annotation>
2387
+ <xs:documentation>The code page integer value or web name for the resulting PCP. See remarks for more information.</xs:documentation>
2388
+ </xs:annotation>
2389
+ </xs:attribute>
2390
+ <xs:attribute name="OutputPath" type="xs:string">
2391
+ <xs:annotation>
2392
+ <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" target="_blank">PatchOutputPath</html:a> for more information.</xs:documentation>
2393
+ </xs:annotation>
2394
+ </xs:attribute>
2395
+ <xs:attribute name="SourceList" type="xs:string">
2396
+ <xs:annotation>
2397
+ <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" target="_blank">PatchSourceList</html:a> for more information.</xs:documentation>
2398
+ </xs:annotation>
2399
+ </xs:attribute>
2400
+ <xs:attribute name="SymbolFlags" type="xs:int">
2401
+ <xs:annotation>
2402
+ <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" target="_blank">ApiPatchingSymbolFlags</html:a> for more information.</xs:documentation>
2403
+ </xs:annotation>
2404
+ </xs:attribute>
2405
+ <xs:attribute name="WholeFilesOnly" type="YesNoTypeUnion">
2406
+ <xs:annotation>
2407
+ <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" target="_blank">IncludeWholeFilesOnly</html:a> for more information.</xs:documentation>
2408
+ </xs:annotation>
2409
+ </xs:attribute>
2410
+ </xs:complexType>
2411
+ </xs:element>
2412
+ <xs:element name="PatchInformation">
2413
+ <xs:annotation>
2414
+ <xs:documentation>Properties about the patch to be placed in the Summary Information Stream. These are visible from COM through the IStream interface, and these properties can be seen on the package in Explorer.</xs:documentation>
2415
+ <xs:appinfo>
2416
+ <xse:remarks>
2417
+ <html:p>You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See <html:a href="~/overview/codepage.html">Code Pages</html:a> for more information.</html:p>
2418
+ </xse:remarks>
2419
+ </xs:appinfo>
2420
+ </xs:annotation>
2421
+ <xs:complexType>
2422
+ <xs:attribute name="Description" type="xs:string">
2423
+ <xs:annotation>
2424
+ <xs:documentation>A short description of the patch that includes the name of the product.</xs:documentation>
2425
+ </xs:annotation>
2426
+ </xs:attribute>
2427
+ <xs:attribute name="Platforms" type="xs:string">
2428
+ <xs:annotation>
2429
+ <xs:appinfo>
2430
+ <xse:deprecated />
2431
+ </xs:appinfo>
2432
+ </xs:annotation>
2433
+ </xs:attribute>
2434
+ <xs:attribute name="Languages" type="xs:string">
2435
+ <xs:annotation>
2436
+ <xs:appinfo>
2437
+ <xse:deprecated />
2438
+ </xs:appinfo>
2439
+ </xs:annotation>
2440
+ </xs:attribute>
2441
+ <xs:attribute name="Manufacturer" type="xs:string">
2442
+ <xs:annotation>
2443
+ <xs:documentation>The name of the manufacturer of the patch package.</xs:documentation>
2444
+ </xs:annotation>
2445
+ </xs:attribute>
2446
+ <xs:attribute name="Keywords" type="xs:string">
2447
+ <xs:annotation>
2448
+ <xs:documentation>A semicolon-delimited list of network or URL locations for alternate sources of the patch. The default is "Installer,Patching,PCP,Database".</xs:documentation>
2449
+ </xs:annotation>
2450
+ </xs:attribute>
2451
+ <xs:attribute name="Comments" type="xs:string">
2452
+ <xs:annotation>
2453
+ <xs:documentation>General purpose of the patch package. For example, "This patch contains the logic and data required to install <html:i><product></html:i>."</xs:documentation>
2454
+ </xs:annotation>
2455
+ </xs:attribute>
2456
+ <xs:attribute name="ReadOnly" type="YesNoDefaultTypeUnion">
2457
+ <xs:annotation>
2458
+ <xs:documentation>
2459
+ The value of this attribute conveys whether the package should be opened as read-only.
2460
+ A database editing tool should not modify a read-only enforced database and should
2461
+ issue a warning at attempts to modify a read-only recommended database.
2462
+ </xs:documentation>
2463
+ </xs:annotation>
2464
+ </xs:attribute>
2465
+ <xs:attribute name="SummaryCodepage" type="xs:string">
2466
+ <xs:annotation>
2467
+ <xs:documentation>The code page integer value or web name for summary info strings only. The default is 1252. See remarks for more information.</xs:documentation>
2468
+ </xs:annotation>
2469
+ </xs:attribute>
2470
+ <xs:attribute name="ShortNames" type="YesNoTypeUnion">
2471
+ <xs:annotation>
2472
+ <xs:appinfo>
2473
+ <xse:deprecated />
2474
+ </xs:appinfo>
2475
+ </xs:annotation>
2476
+ </xs:attribute>
2477
+ <xs:attribute name="Compressed" type="YesNoTypeUnion">
2478
+ <xs:annotation>
2479
+ <xs:appinfo>
2480
+ <xse:deprecated />
2481
+ </xs:appinfo>
2482
+ </xs:annotation>
2483
+ </xs:attribute>
2484
+ <xs:attribute name="AdminImage" type="YesNoTypeUnion">
2485
+ <xs:annotation>
2486
+ <xs:appinfo>
2487
+ <xse:deprecated />
2488
+ </xs:appinfo>
2489
+ </xs:annotation>
2490
+ </xs:attribute>
2491
+ </xs:complexType>
2492
+ </xs:element>
2493
+ <xs:element name="PatchMetadata">
2494
+ <xs:annotation>
2495
+ <xs:documentation>Properties about the patch to be placed in the PatchMetadata table.</xs:documentation>
2496
+ <xs:appinfo>
2497
+ <xse:msiRef table="MsiPatchMetadata" href="http://msdn.microsoft.com/library/aa370344.aspx" />
2498
+ </xs:appinfo>
2499
+ </xs:annotation>
2500
+ <xs:complexType>
2501
+ <xs:sequence>
2502
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2503
+ <xs:element ref="CustomProperty" minOccurs="0">
2504
+ <xs:annotation>
2505
+ <xs:documentation>A custom property that extends the standard set.</xs:documentation>
2506
+ </xs:annotation>
2507
+ </xs:element>
2508
+ <xs:element ref="OptimizeCustomActions" minOccurs="0" maxOccurs="1">
2509
+ <xs:annotation>
2510
+ <xs:documentation>Indicates whether custom actions can be skipped when applying the patch.</xs:documentation>
2511
+ </xs:annotation>
2512
+ </xs:element>
2513
+ </xs:choice>
2514
+ </xs:sequence>
2515
+ <xs:attribute name="AllowRemoval" type="YesNoTypeUnion" use="required">
2516
+ <xs:annotation>
2517
+ <xs:documentation>Whether this is an uninstallable patch.</xs:documentation>
2518
+ </xs:annotation>
2519
+ </xs:attribute>
2520
+ <xs:attribute name="Classification" type="xs:string" use="required">
2521
+ <xs:annotation>
2522
+ <xs:documentation>Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.</xs:documentation>
2523
+ </xs:annotation>
2524
+ </xs:attribute>
2525
+ <xs:attribute name="CreationTimeUTC" type="xs:string">
2526
+ <xs:annotation>
2527
+ <xs:documentation>Creation time of the .msp file in the form mm-dd-yy HH:MM (month-day-year hour:minute).</xs:documentation>
2528
+ </xs:annotation>
2529
+ </xs:attribute>
2530
+ <xs:attribute name="Description" type="xs:string" use="required">
2531
+ <xs:annotation>
2532
+ <xs:documentation>Description of the patch.</xs:documentation>
2533
+ </xs:annotation>
2534
+ </xs:attribute>
2535
+ <xs:attribute name="DisplayName" type="xs:string" use="required">
2536
+ <xs:annotation>
2537
+ <xs:documentation>A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.</xs:documentation>
2538
+ </xs:annotation>
2539
+ </xs:attribute>
2540
+ <xs:attribute name="ManufacturerName" type="xs:string" use="required">
2541
+ <xs:annotation>
2542
+ <xs:documentation>Name of the manufacturer.</xs:documentation>
2543
+ </xs:annotation>
2544
+ </xs:attribute>
2545
+ <xs:attribute name="MinorUpdateTargetRTM" type="xs:string">
2546
+ <xs:annotation>
2547
+ <xs:documentation>
2548
+ Indicates that the patch targets the RTM version of the product or the most recent major
2549
+ upgrade patch. Author this optional property in minor update patches that contain sequencing
2550
+ information to indicate that the patch removes all patches up to the RTM version of the
2551
+ product, or up to the most recent major upgrade patch. This property is available beginning
2552
+ with Windows Installer 3.1.
2553
+ </xs:documentation>
2554
+ </xs:annotation>
2555
+ </xs:attribute>
2556
+ <xs:attribute name="MoreInfoURL" type="xs:string" use="required">
2557
+ <xs:annotation>
2558
+ <xs:documentation>A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.</xs:documentation>
2559
+ </xs:annotation>
2560
+ </xs:attribute>
2561
+ <xs:attribute name="OptimizedInstallMode" type="YesNoTypeUnion">
2562
+ <xs:annotation>
2563
+ <xs:documentation>
2564
+ If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
2565
+ application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
2566
+ </xs:documentation>
2567
+ </xs:annotation>
2568
+ </xs:attribute>
2569
+ <xs:attribute name="TargetProductName" type="xs:string" use="required">
2570
+ <xs:annotation>
2571
+ <xs:documentation>Name of the application or target product suite.</xs:documentation>
2572
+ </xs:annotation>
2573
+ </xs:attribute>
2574
+ </xs:complexType>
2575
+ </xs:element>
2576
+ <xs:element name="CustomProperty">
2577
+ <xs:annotation>
2578
+ <xs:documentation>A custom property for the PatchMetadata table.</xs:documentation>
2579
+ </xs:annotation>
2580
+ <xs:complexType>
2581
+ <xs:attribute name="Company" type="xs:string" use="required">
2582
+ <xs:annotation>
2583
+ <xs:documentation>The name of the company.</xs:documentation>
2584
+ </xs:annotation>
2585
+ </xs:attribute>
2586
+ <xs:attribute name="Property" type="xs:string" use="required">
2587
+ <xs:annotation>
2588
+ <xs:documentation>The name of the metadata property.</xs:documentation>
2589
+ </xs:annotation>
2590
+ </xs:attribute>
2591
+ <xs:attribute name="Value" type="xs:string" use="required">
2592
+ <xs:annotation>
2593
+ <xs:documentation>Value of the metadata property.</xs:documentation>
2594
+ </xs:annotation>
2595
+ </xs:attribute>
2596
+ </xs:complexType>
2597
+ </xs:element>
2598
+ <xs:element name="ReplacePatch">
2599
+ <xs:annotation>
2600
+ <xs:documentation>A patch that is deprecated by this patch.</xs:documentation>
2601
+ </xs:annotation>
2602
+ <xs:complexType>
2603
+ <xs:attribute name="Id" type="Guid" use="required">
2604
+ <xs:annotation>
2605
+ <xs:documentation>Patch GUID to be unregistered if it exists on the machine targeted by this patch.</xs:documentation>
2606
+ </xs:annotation>
2607
+ </xs:attribute>
2608
+ </xs:complexType>
2609
+ </xs:element>
2610
+ <xs:element name="TargetProductCodes">
2611
+ <xs:annotation>
2612
+ <xs:documentation>
2613
+ The product codes for products that can accept the patch.
2614
+ </xs:documentation>
2615
+ </xs:annotation>
2616
+ <xs:complexType>
2617
+ <xs:choice maxOccurs="unbounded">
2618
+ <xs:element ref="TargetProductCode" />
2619
+ </xs:choice>
2620
+ <xs:attribute name="Replace" type="YesNoTypeUnion">
2621
+ <xs:annotation>
2622
+ <xs:documentation>Whether to replace the product codes that can accept the patch from the target packages with the child elements.</xs:documentation>
2623
+ </xs:annotation>
2624
+ </xs:attribute>
2625
+ </xs:complexType>
2626
+ </xs:element>
2627
+ <xs:element name="TargetProductCode">
2628
+ <xs:annotation>
2629
+ <xs:documentation>
2630
+ A product code for a product that can accept the patch.
2631
+ </xs:documentation>
2632
+ <xs:appinfo>
2633
+ <xse:remarks>
2634
+ <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>
2635
+ <html:p>When using the Patch element, the Id attribute value must not be '*'. Use the TargetProductCodes/@Replace attribute instead.</html:p>
2636
+ </xse:remarks>
2637
+ </xs:appinfo>
2638
+ </xs:annotation>
2639
+ <xs:complexType>
2640
+ <xs:attribute name="Id" type="xs:string" use="required">
2641
+ <xs:annotation>
2642
+ <xs:documentation>
2643
+ The product code for a product that can accept the patch. This can be '*'. See remarks for more information.
2644
+ </xs:documentation>
2645
+ </xs:annotation>
2646
+ </xs:attribute>
2647
+ </xs:complexType>
2648
+ </xs:element>
2649
+ <xs:element name="PatchProperty">
2650
+ <xs:annotation>
2651
+ <xs:documentation>A property for this patch database.</xs:documentation>
2652
+ <xs:appinfo>
2653
+ <xse:msiRef table="MsiPatchMetadata" href="http://msdn.microsoft.com/library/aa370344.aspx" />
2654
+ <xse:remarks>
2655
+ <html:p>When authored under the Patch element, the PatchProperty defines entries in the MsiPatchMetadata table.</html:p>
2656
+ </xse:remarks>
2657
+ </xs:appinfo>
2658
+ </xs:annotation>
2659
+ <xs:complexType>
2660
+ <xs:attribute name="Company" type="xs:string">
2661
+ <xs:annotation>
2662
+ <xs:documentation>Name of the company for a custom metadata property.</xs:documentation>
2663
+ </xs:annotation>
2664
+ </xs:attribute>
2665
+ <xs:attribute name="Name" type="xs:string" use="required">
2666
+ <xs:annotation>
2667
+ <xs:documentation>Name of the patch property.</xs:documentation>
2668
+ </xs:annotation>
2669
+ </xs:attribute>
2670
+ <xs:attribute name="Value" type="xs:string" use="required">
2671
+ <xs:annotation>
2672
+ <xs:documentation>Value of the patch property.</xs:documentation>
2673
+ </xs:annotation>
2674
+ </xs:attribute>
2675
+ </xs:complexType>
2676
+ </xs:element>
2677
+ <xs:element name="PatchSequence">
2678
+ <xs:annotation>
2679
+ <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>
2680
+ <xs:appinfo>
2681
+ <xse:msiRef table="MsiPatchSequence" href="http://msdn.microsoft.com/library/aa370350.aspx" />
2682
+ </xs:appinfo>
2683
+ </xs:annotation>
2684
+ <xs:complexType>
2685
+ <xs:attribute name="PatchFamily" type="xs:string" use="required">
2686
+ <xs:annotation>
2687
+ <xs:documentation>Identifier which indicates a sequence family to which this patch belongs.</xs:documentation>
2688
+ </xs:annotation>
2689
+ </xs:attribute>
2690
+ <xs:attribute name="ProductCode" type="Guid">
2691
+ <xs:annotation>
2692
+ <xs:documentation>
2693
+ Specifies the ProductCode of the product that this family applies to.
2694
+ This attribute cannot the specified if the TargetImage attribute is specified.
2695
+ </xs:documentation>
2696
+ </xs:annotation>
2697
+ </xs:attribute>
2698
+ <xs:attribute name="Sequence" type="xs:string">
2699
+ <xs:annotation>
2700
+ <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>
2701
+ </xs:annotation>
2702
+ </xs:attribute>
2703
+ <xs:attribute name="Supersede" type="YesNoTypeUnion">
2704
+ <xs:annotation>
2705
+ <xs:documentation>
2706
+ Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
2707
+ The default value is 'no'.
2708
+ </xs:documentation>
2709
+ </xs:annotation>
2710
+ </xs:attribute>
2711
+ <xs:attribute name="Target" type="xs:string">
2712
+ <xs:annotation>
2713
+ <xs:appinfo>
2714
+ <xse:deprecated ref="TargetImage" />
2715
+ </xs:appinfo>
2716
+ </xs:annotation>
2717
+ </xs:attribute>
2718
+ <xs:attribute name="TargetImage" type="xs:string">
2719
+ <xs:annotation>
2720
+ <xs:documentation>
2721
+ Specifies the TargetImage that this family applies to.
2722
+ This attribute cannot the specified if the ProductCode attribute is specified.
2723
+ </xs:documentation>
2724
+ </xs:annotation>
2725
+ </xs:attribute>
2726
+ </xs:complexType>
2727
+ </xs:element>
2728
+ <xs:element name="Family">
2729
+ <xs:annotation>
2730
+ <xs:documentation>Group of one or more upgraded images of a product.</xs:documentation>
2731
+ </xs:annotation>
2732
+ <xs:complexType>
2733
+ <xs:sequence>
2734
+ <xs:element ref="UpgradeImage" maxOccurs="unbounded" />
2735
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2736
+ <xs:element ref="ExternalFile" />
2737
+ <xs:element ref="ProtectFile" />
2738
+ </xs:choice>
2739
+ </xs:sequence>
2740
+ <xs:attribute name="DiskId" type="DiskIdType">
2741
+ <xs:annotation>
2742
+ <xs:documentation>Entered into the DiskId field of the new Media table record.</xs:documentation>
2743
+ </xs:annotation>
2744
+ </xs:attribute>
2745
+ <xs:attribute name="DiskPrompt" type="xs:string">
2746
+ <xs:annotation>
2747
+ <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>
2748
+ </xs:annotation>
2749
+ </xs:attribute>
2750
+ <xs:attribute name="MediaSrcProp" type="xs:string">
2751
+ <xs:annotation>
2752
+ <xs:documentation>Entered into the Source field of the new Media table entry of the upgraded image.</xs:documentation>
2753
+ </xs:annotation>
2754
+ </xs:attribute>
2755
+ <xs:attribute name="Name" type="xs:string" use="required">
2756
+ <xs:annotation>
2757
+ <xs:documentation>Identifier for the family.</xs:documentation>
2758
+ </xs:annotation>
2759
+ </xs:attribute>
2760
+ <xs:attribute name="SequenceStart" type="xs:int">
2761
+ <xs:annotation>
2762
+ <xs:documentation>Sequence number for the starting file.</xs:documentation>
2763
+ </xs:annotation>
2764
+ </xs:attribute>
2765
+ <xs:attribute name="VolumeLabel" type="xs:string">
2766
+ <xs:annotation>
2767
+ <xs:documentation>Entered into the VolumeLabel field of the new Media table record.</xs:documentation>
2768
+ </xs:annotation>
2769
+ </xs:attribute>
2770
+ </xs:complexType>
2771
+ </xs:element>
2772
+ <xs:element name="UpgradeImage">
2773
+ <xs:annotation>
2774
+ <xs:documentation>Contains information about the upgraded images of the product.</xs:documentation>
2775
+ </xs:annotation>
2776
+ <xs:complexType>
2777
+ <xs:sequence>
2778
+ <xs:element ref="TargetImage" maxOccurs="unbounded" />
2779
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2780
+ <xs:element ref="SymbolPath" />
2781
+ <xs:element ref="UpgradeFile" />
2782
+ </xs:choice>
2783
+ </xs:sequence>
2784
+ <xs:attribute name="Id" type="xs:string" use="required">
2785
+ <xs:annotation>
2786
+ <xs:documentation>Identifier to connect target images with upgraded image.</xs:documentation>
2787
+ </xs:annotation>
2788
+ </xs:attribute>
2789
+ <xs:attribute name="SourceFile" type="xs:string">
2790
+ <xs:annotation>
2791
+ <xs:documentation>Full path to location of msi file for upgraded image.</xs:documentation>
2792
+ </xs:annotation>
2793
+ </xs:attribute>
2794
+ <xs:attribute name="src" type="xs:string">
2795
+ <xs:annotation>
2796
+ <xs:appinfo>
2797
+ <xse:deprecated ref="SourceFile" />
2798
+ </xs:appinfo>
2799
+ </xs:annotation>
2800
+ </xs:attribute>
2801
+ <xs:attribute name="SourcePatch" type="xs:string">
2802
+ <xs:annotation>
2803
+ <xs:documentation>Modified copy of the upgraded installation database that contains additional authoring specific to patching.</xs:documentation>
2804
+ </xs:annotation>
2805
+ </xs:attribute>
2806
+ <xs:attribute name="srcPatch" type="xs:string">
2807
+ <xs:annotation>
2808
+ <xs:appinfo>
2809
+ <xse:deprecated ref="SourcePatch" />
2810
+ </xs:appinfo>
2811
+ </xs:annotation>
2812
+ </xs:attribute>
2813
+ </xs:complexType>
2814
+ </xs:element>
2815
+ <xs:element name="TargetImage">
2816
+ <xs:annotation>
2817
+ <xs:documentation>Contains information about the target images of the product.</xs:documentation>
2818
+ </xs:annotation>
2819
+ <xs:complexType>
2820
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2821
+ <xs:element ref="SymbolPath" />
2822
+ <xs:element ref="TargetFile" />
2823
+ </xs:choice>
2824
+ <xs:attribute name="Id" type="xs:string" use="required">
2825
+ <xs:annotation>
2826
+ <xs:documentation>Identifier for the target image.</xs:documentation>
2827
+ </xs:annotation>
2828
+ </xs:attribute>
2829
+ <xs:attribute name="SourceFile" type="xs:string">
2830
+ <xs:annotation>
2831
+ <xs:documentation>Full path to the location of the msi file for the target image.</xs:documentation>
2832
+ </xs:annotation>
2833
+ </xs:attribute>
2834
+ <xs:attribute name="src" type="xs:string">
2835
+ <xs:annotation>
2836
+ <xs:appinfo>
2837
+ <xse:deprecated ref="SourceFile" />
2838
+ </xs:appinfo>
2839
+ </xs:annotation>
2840
+ </xs:attribute>
2841
+ <xs:attribute name="Order" type="xs:int" use="required">
2842
+ <xs:annotation>
2843
+ <xs:documentation>Relative order of the target image.</xs:documentation>
2844
+ </xs:annotation>
2845
+ </xs:attribute>
2846
+ <xs:attribute name="Validation" type="xs:string">
2847
+ <xs:annotation>
2848
+ <xs:documentation>Product checking to avoid applying irrelevant transforms.</xs:documentation>
2849
+ </xs:annotation>
2850
+ </xs:attribute>
2851
+ <xs:attribute name="IgnoreMissingFiles" type="YesNoTypeUnion">
2852
+ <xs:annotation>
2853
+ <xs:documentation>Files missing from the target image are ignored by the installer.</xs:documentation>
2854
+ </xs:annotation>
2855
+ </xs:attribute>
2856
+ </xs:complexType>
2857
+ </xs:element>
2858
+ <xs:element name="TargetFile">
2859
+ <xs:annotation>
2860
+ <xs:documentation>Information about specific files in a target image.</xs:documentation>
2861
+ </xs:annotation>
2862
+ <xs:complexType>
2863
+ <xs:sequence>
2864
+ <xs:element ref="SymbolPath" minOccurs="0" />
2865
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2866
+ <xs:element ref="IgnoreRange" />
2867
+ <xs:element ref="ProtectRange" />
2868
+ </xs:choice>
2869
+ </xs:sequence>
2870
+ <xs:attribute name="Id" type="xs:string" use="required">
2871
+ <xs:annotation>
2872
+ <xs:documentation>Foreign key into the File table.</xs:documentation>
2873
+ </xs:annotation>
2874
+ </xs:attribute>
2875
+ </xs:complexType>
2876
+ </xs:element>
2877
+ <xs:element name="IgnoreRange">
2878
+ <xs:annotation>
2879
+ <xs:documentation>Specifies part of a file that is to be ignored during patching.</xs:documentation>
2880
+ </xs:annotation>
2881
+ <xs:complexType>
2882
+ <xs:attribute name="Offset" type="xs:int" use="required">
2883
+ <xs:annotation>
2884
+ <xs:documentation>Offset of the start of the range.</xs:documentation>
2885
+ </xs:annotation>
2886
+ </xs:attribute>
2887
+ <xs:attribute name="Length" type="xs:int" use="required">
2888
+ <xs:annotation>
2889
+ <xs:documentation>Length of the range.</xs:documentation>
2890
+ </xs:annotation>
2891
+ </xs:attribute>
2892
+ </xs:complexType>
2893
+ </xs:element>
2894
+ <xs:element name="ProtectRange">
2895
+ <xs:annotation>
2896
+ <xs:documentation>Specifies part of a file that cannot be overwritten during patching.</xs:documentation>
2897
+ </xs:annotation>
2898
+ <xs:complexType>
2899
+ <xs:attribute name="Offset" type="xs:int" use="required">
2900
+ <xs:annotation>
2901
+ <xs:documentation>Offset of the start of the range.</xs:documentation>
2902
+ </xs:annotation>
2903
+ </xs:attribute>
2904
+ <xs:attribute name="Length" type="xs:int" use="required">
2905
+ <xs:annotation>
2906
+ <xs:documentation>Length of the range.</xs:documentation>
2907
+ </xs:annotation>
2908
+ </xs:attribute>
2909
+ </xs:complexType>
2910
+ </xs:element>
2911
+ <xs:element name="ProtectFile">
2912
+ <xs:annotation>
2913
+ <xs:documentation>Specifies a file to be protected.</xs:documentation>
2914
+ </xs:annotation>
2915
+ <xs:complexType>
2916
+ <xs:choice maxOccurs="unbounded">
2917
+ <xs:element ref="ProtectRange" />
2918
+ </xs:choice>
2919
+ <xs:attribute name="File" type="xs:string" use="required">
2920
+ <xs:annotation>
2921
+ <xs:documentation>Foreign key into the File table.</xs:documentation>
2922
+ </xs:annotation>
2923
+ </xs:attribute>
2924
+ </xs:complexType>
2925
+ </xs:element>
2926
+ <xs:element name="ExternalFile">
2927
+ <xs:annotation>
2928
+ <xs:documentation>Contains information about specific files that are not part of a regular target image.</xs:documentation>
2929
+ </xs:annotation>
2930
+ <xs:complexType>
2931
+ <xs:sequence>
2932
+ <xs:element ref="ProtectRange" maxOccurs="unbounded" />
2933
+ <xs:element ref="SymbolPath" maxOccurs="unbounded" />
2934
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2935
+ <xs:element ref="IgnoreRange" />
2936
+ </xs:choice>
2937
+ </xs:sequence>
2938
+ <xs:attribute name="File" type="xs:string" use="required">
2939
+ <xs:annotation>
2940
+ <xs:documentation>Foreign key into the File table.</xs:documentation>
2941
+ </xs:annotation>
2942
+ </xs:attribute>
2943
+ <xs:attribute name="Source" type="xs:string">
2944
+ <xs:annotation>
2945
+ <xs:documentation>Full path of the external file.</xs:documentation>
2946
+ </xs:annotation>
2947
+ </xs:attribute>
2948
+ <xs:attribute name="src" type="xs:string">
2949
+ <xs:annotation>
2950
+ <xs:appinfo>
2951
+ <xse:deprecated ref="Source" />
2952
+ </xs:appinfo>
2953
+ </xs:annotation>
2954
+ </xs:attribute>
2955
+ <xs:attribute name="Order" type="xs:int" use="required">
2956
+ <xs:annotation>
2957
+ <xs:documentation>Specifies the order of the external files to use when creating the patch.</xs:documentation>
2958
+ </xs:annotation>
2959
+ </xs:attribute>
2960
+ </xs:complexType>
2961
+ </xs:element>
2962
+ <xs:element name="UpgradeFile">
2963
+ <xs:annotation>
2964
+ <xs:documentation>Specifies files to either ignore or to specify optional data about a file.</xs:documentation>
2965
+ </xs:annotation>
2966
+ <xs:complexType>
2967
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
2968
+ <xs:element ref="SymbolPath" />
2969
+ </xs:choice>
2970
+ <xs:attribute name="File" type="xs:string" use="required">
2971
+ <xs:annotation>
2972
+ <xs:documentation>Foreign key into the File table.</xs:documentation>
2973
+ </xs:annotation>
2974
+ </xs:attribute>
2975
+ <xs:attribute name="Ignore" type="YesNoTypeUnion" use="required">
2976
+ <xs:annotation>
2977
+ <xs:documentation>If yes, the file is ignored during patching, and the next two attributes are ignored.</xs:documentation>
2978
+ </xs:annotation>
2979
+ </xs:attribute>
2980
+ <xs:attribute name="AllowIgnoreOnError" type="YesNoTypeUnion">
2981
+ <xs:annotation>
2982
+ <xs:documentation>Specifies whether patching this file is vital.</xs:documentation>
2983
+ </xs:annotation>
2984
+ </xs:attribute>
2985
+ <xs:attribute name="WholeFile" type="YesNoTypeUnion">
2986
+ <xs:annotation>
2987
+ <xs:documentation>Whether the whole file should be installed, rather than creating a binary patch.</xs:documentation>
2988
+ </xs:annotation>
2989
+ </xs:attribute>
2990
+ </xs:complexType>
2991
+ </xs:element>
2992
+ <xs:element name="SymbolPath">
2993
+ <xs:annotation>
2994
+ <xs:documentation>A path to symbols.</xs:documentation>
2995
+ </xs:annotation>
2996
+ <xs:complexType>
2997
+ <xs:attribute name="Path" type="xs:string" use="required">
2998
+ <xs:annotation>
2999
+ <xs:documentation>The path.</xs:documentation>
3000
+ </xs:annotation>
3001
+ </xs:attribute>
3002
+ </xs:complexType>
3003
+ </xs:element>
3004
+ <xs:element name="Package">
3005
+ <xs:annotation>
3006
+ <xs:documentation>
3007
+ Properties about the package to be placed in the Summary Information Stream. These are
3008
+ visible from COM through the IStream interface, and these properties can be seen on the package in Explorer.
3009
+ </xs:documentation>
3010
+ <xs:appinfo>
3011
+ <xse:remarks>
3012
+ <html:p>You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See <html:a href="~/overview/codepage.html">Code Pages</html:a> for more information.</html:p>
3013
+ </xse:remarks>
3014
+ </xs:appinfo>
3015
+ </xs:annotation>
3016
+ <xs:complexType>
3017
+ <xs:attribute name="Id" type="AutogenGuid">
3018
+ <xs:annotation>
3019
+ <xs:documentation>
3020
+ The package code GUID for a product or merge module.
3021
+ When compiling a product, this attribute should not be set in order to allow the package
3022
+ code to be generated for each build.
3023
+ When compiling a merge module, this attribute must be set to the modularization guid.
3024
+ </xs:documentation>
3025
+ </xs:annotation>
3026
+ </xs:attribute>
3027
+ <xs:attribute name="AdminImage" type="YesNoTypeUnion">
3028
+ <xs:annotation>
3029
+ <xs:documentation>Set to 'yes' if the source is an admin image.</xs:documentation>
3030
+ </xs:annotation>
3031
+ </xs:attribute>
3032
+ <xs:attribute name="Comments" type="xs:string">
3033
+ <xs:annotation>
3034
+ <xs:documentation>Optional comments for browsing.</xs:documentation>
3035
+ </xs:annotation>
3036
+ </xs:attribute>
3037
+ <xs:attribute name="Compressed" type="YesNoTypeUnion">
3038
+ <xs:annotation>
3039
+ <xs:documentation>
3040
+ Set to 'yes' to have compressed files in the source.
3041
+ This attribute cannot be set for merge modules.
3042
+ </xs:documentation>
3043
+ </xs:annotation>
3044
+ </xs:attribute>
3045
+ <xs:attribute name="Description" type="xs:string">
3046
+ <xs:annotation>
3047
+ <xs:documentation>The product full name or description.</xs:documentation>
3048
+ </xs:annotation>
3049
+ </xs:attribute>
3050
+ <xs:attribute name="InstallPrivileges">
3051
+ <xs:annotation>
3052
+ <xs:documentation>Use this attribute to specify the priviliges required to install the package on Windows Vista and above.</xs:documentation>
3053
+ </xs:annotation>
3054
+ <xs:simpleType>
3055
+ <xs:restriction base="xs:NMTOKEN">
3056
+ <xs:enumeration value="limited">
3057
+ <xs:annotation>
3058
+ <xs:documentation>
3059
+ Set this value to declare that the package does not require elevated privileges to install.
3060
+ </xs:documentation>
3061
+ </xs:annotation>
3062
+ </xs:enumeration>
3063
+ <xs:enumeration value="elevated">
3064
+ <xs:annotation>
3065
+ <xs:documentation>
3066
+ Set this value to declare that the package requires elevated privileges to install.
3067
+ This is the default value.
3068
+ </xs:documentation>
3069
+ </xs:annotation>
3070
+ </xs:enumeration>
3071
+ </xs:restriction>
3072
+ </xs:simpleType>
3073
+ </xs:attribute>
3074
+ <xs:attribute name="InstallScope">
3075
+ <xs:annotation>
3076
+ <xs:documentation>Use this attribute to specify the installation scope of this package: per-machine or per-user.</xs:documentation>
3077
+ </xs:annotation>
3078
+ <xs:simpleType>
3079
+ <xs:restriction base="xs:NMTOKEN">
3080
+ <xs:enumeration value="perMachine">
3081
+ <xs:annotation>
3082
+ <xs:documentation>
3083
+ Set this value to declare that the package is a per-machine installation and requires elevated privileges to install.
3084
+ Sets the ALLUSERS property to 1.
3085
+ </xs:documentation>
3086
+ </xs:annotation>
3087
+ </xs:enumeration>
3088
+ <xs:enumeration value="perUser">
3089
+ <xs:annotation>
3090
+ <xs:documentation>
3091
+ Set this value to declare that the package is a per-user installation and does not require elevated privileges to install.
3092
+ Sets the package's InstallPrivileges attribute to "limited."
3093
+ </xs:documentation>
3094
+ </xs:annotation>
3095
+ </xs:enumeration>
3096
+ </xs:restriction>
3097
+ </xs:simpleType>
3098
+ </xs:attribute>
3099
+ <xs:attribute name="InstallerVersion" type="xs:integer">
3100
+ <xs:annotation>
3101
+ <xs:documentation>
3102
+ The minimum version of the Windows Installer required to install this package. Take the major version of the required Windows Installer
3103
+ and multiply by a 100 then add the minor version of the Windows Installer. For example, "200" would represent Windows Installer 2.0 and
3104
+ "405" would represent Windows Installer 4.5. For 64-bit Windows Installer packages, this property is set to 200 by default as
3105
+ Windows Installer 2.0 was the first version to support 64-bit packages.
3106
+ </xs:documentation>
3107
+ </xs:annotation>
3108
+ </xs:attribute>
3109
+ <xs:attribute name="Keywords" type="xs:string">
3110
+ <xs:annotation>
3111
+ <xs:documentation>Optional keywords for browsing.</xs:documentation>
3112
+ </xs:annotation>
3113
+ </xs:attribute>
3114
+ <xs:attribute name="Languages" type="xs:string">
3115
+ <xs:annotation>
3116
+ <xs:documentation>The list of language IDs (LCIDs) supported in the package.</xs:documentation>
3117
+ </xs:annotation>
3118
+ </xs:attribute>
3119
+ <xs:attribute name="Manufacturer" type="xs:string">
3120
+ <xs:annotation>
3121
+ <xs:documentation>The vendor releasing the package.</xs:documentation>
3122
+ </xs:annotation>
3123
+ </xs:attribute>
3124
+ <xs:attribute name="Platforms" type="xs:string">
3125
+ <xs:annotation>
3126
+ <xs:documentation>
3127
+ The list of platforms supported by the package. This attribute has been deprecated.
3128
+ Specify the -arch switch at the candle.exe command line or the InstallerPlatform
3129
+ property in a .wixproj MSBuild project.
3130
+ </xs:documentation>
3131
+ </xs:annotation>
3132
+ </xs:attribute>
3133
+ <xs:attribute name="Platform">
3134
+ <xs:annotation>
3135
+ <xs:documentation>
3136
+ The platform supported by the package. Use of this attribute is discouraged; instead,
3137
+ specify the -arch switch at the candle.exe command line or the InstallerPlatform
3138
+ property in a .wixproj MSBuild project.
3139
+ </xs:documentation>
3140
+ </xs:annotation>
3141
+ <xs:simpleType>
3142
+ <xs:restriction base="xs:NMTOKEN">
3143
+ <xs:enumeration value="x86">
3144
+ <xs:annotation>
3145
+ <xs:documentation>
3146
+ Set this value to declare that the package is an x86 package.
3147
+ </xs:documentation>
3148
+ </xs:annotation>
3149
+ </xs:enumeration>
3150
+ <xs:enumeration value="ia64">
3151
+ <xs:annotation>
3152
+ <xs:documentation>
3153
+ Set this value to declare that the package is an ia64 package.
3154
+ This value requires that the InstallerVersion property be set to 200 or greater.
3155
+ </xs:documentation>
3156
+ </xs:annotation>
3157
+ </xs:enumeration>
3158
+ <xs:enumeration value="x64">
3159
+ <xs:annotation>
3160
+ <xs:documentation>
3161
+ Set this value to declare that the package is an x64 package.
3162
+ This value requires that the InstallerVersion property be set to 200 or greater.
3163
+ </xs:documentation>
3164
+ </xs:annotation>
3165
+ </xs:enumeration>
3166
+ <xs:enumeration value="arm">
3167
+ <xs:annotation>
3168
+ <xs:documentation>
3169
+ Set this value to declare that the package is an arm package.
3170
+ This value requires that the InstallerVersion property be set to 500 or greater.
3171
+ </xs:documentation>
3172
+ </xs:annotation>
3173
+ </xs:enumeration>
3174
+ <xs:enumeration value="intel">
3175
+ <xs:annotation>
3176
+ <xs:documentation>
3177
+ This value has been deprecated. Use "x86" instead.
3178
+ </xs:documentation>
3179
+ </xs:annotation>
3180
+ </xs:enumeration>
3181
+ <xs:enumeration value="intel64">
3182
+ <xs:annotation>
3183
+ <xs:documentation>
3184
+ This value has been deprecated. Use "ia64" instead.
3185
+ </xs:documentation>
3186
+ </xs:annotation>
3187
+ </xs:enumeration>
3188
+ </xs:restriction>
3189
+ </xs:simpleType>
3190
+ </xs:attribute>
3191
+ <xs:attribute name="ReadOnly" type="YesNoDefaultTypeUnion">
3192
+ <xs:annotation>
3193
+ <xs:documentation>
3194
+ The value of this attribute conveys whether the package should be opened as read-only.
3195
+ A database editing tool should not modify a read-only enforced database and should
3196
+ issue a warning at attempts to modify a read-only recommended database.
3197
+ </xs:documentation>
3198
+ </xs:annotation>
3199
+ </xs:attribute>
3200
+ <xs:attribute name="ShortNames" type="YesNoTypeUnion">
3201
+ <xs:annotation>
3202
+ <xs:documentation>Set to 'yes' to have short filenames in the source.</xs:documentation>
3203
+ </xs:annotation>
3204
+ </xs:attribute>
3205
+ <xs:attribute name="SummaryCodepage" type="xs:string">
3206
+ <xs:annotation>
3207
+ <xs:documentation>The code page integer value or web name for summary info strings only. See remarks for more information.</xs:documentation>
3208
+ </xs:annotation>
3209
+ </xs:attribute>
3210
+ </xs:complexType>
3211
+ </xs:element>
3212
+ <xs:element name="AssemblyName">
3213
+ <xs:annotation>
3214
+ <xs:documentation>
3215
+ The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly.
3216
+ Consider using the Assembly attribute on File element to have the toolset populate these entries automatically.
3217
+ </xs:documentation>
3218
+ <xs:appinfo>
3219
+ <xse:msiRef table="MsiAssemblyName" href="http://msdn.microsoft.com/library/aa370062.aspx" />
3220
+ </xs:appinfo>
3221
+ </xs:annotation>
3222
+ <xs:complexType>
3223
+ <xs:attribute name="Id" use="required" type="xs:string">
3224
+ <xs:annotation>
3225
+ <xs:documentation>Name of the attribute associated with the value specified in the Value column.</xs:documentation>
3226
+ </xs:annotation>
3227
+ </xs:attribute>
3228
+ <xs:attribute name="Value" type="xs:string">
3229
+ <xs:annotation>
3230
+ <xs:documentation>Value associated with the name specified in the Name column.</xs:documentation>
3231
+ </xs:annotation>
3232
+ </xs:attribute>
3233
+ </xs:complexType>
3234
+ </xs:element>
3235
+ <xs:element name="PatchCertificates">
3236
+ <xs:annotation>
3237
+ <xs:documentation>
3238
+ Identifies the possible signer certificates used to digitally sign patches.
3239
+ </xs:documentation>
3240
+ <xs:appinfo>
3241
+ <xse:msiRef table="MsiPatchCertificate" href="http://msdn.microsoft.com/library/aa370342.aspx" />
3242
+ </xs:appinfo>
3243
+ </xs:annotation>
3244
+ <xs:complexType>
3245
+ <xs:choice maxOccurs="unbounded">
3246
+ <xs:element ref="DigitalCertificate" />
3247
+ </xs:choice>
3248
+ </xs:complexType>
3249
+ </xs:element>
3250
+ <xs:element name="PackageCertificates">
3251
+ <xs:annotation>
3252
+ <xs:documentation>
3253
+ Digital signatures that identify installation packages in a multi-product transaction.
3254
+ </xs:documentation>
3255
+ <xs:appinfo>
3256
+ <xse:msiRef table="MsiPackageCertificate" href="http://msdn.microsoft.com/library/cc542575.aspx" />
3257
+ </xs:appinfo>
3258
+ </xs:annotation>
3259
+ <xs:complexType>
3260
+ <xs:choice maxOccurs="unbounded">
3261
+ <xs:element ref="DigitalCertificate" />
3262
+ </xs:choice>
3263
+ </xs:complexType>
3264
+ </xs:element>
3265
+ <xs:element name="DigitalCertificate">
3266
+ <xs:annotation>
3267
+ <xs:documentation>
3268
+ Adds a digital certificate.
3269
+ </xs:documentation>
3270
+ <xs:appinfo>
3271
+ <xse:msiRef table="MsiDigitalCertificate" href="http://msdn.microsoft.com/library/aa370086.aspx" />
3272
+ </xs:appinfo>
3273
+ </xs:annotation>
3274
+ <xs:complexType>
3275
+ <xs:attribute name="Id" type="xs:string" use="required">
3276
+ <xs:annotation>
3277
+ <xs:documentation>Identifier for a certificate file.</xs:documentation>
3278
+ </xs:annotation>
3279
+ </xs:attribute>
3280
+ <xs:attribute name="SourceFile" type="xs:string" use="required">
3281
+ <xs:annotation>
3282
+ <xs:documentation>The path to the certificate file.</xs:documentation>
3283
+ </xs:annotation>
3284
+ </xs:attribute>
3285
+ </xs:complexType>
3286
+ </xs:element>
3287
+ <xs:element name="DigitalCertificateRef">
3288
+ <xs:annotation>
3289
+ <xs:documentation>
3290
+ Reference to a DigitalCertificate element. This will force the entire referenced Fragment's contents
3291
+ to be included in the installer database. This is only used for references when patching.
3292
+ </xs:documentation>
3293
+ </xs:annotation>
3294
+ <xs:complexType>
3295
+ <xs:attribute name="Id" type="xs:string" use="required" />
3296
+ <xs:anyAttribute namespace="##other" processContents="lax">
3297
+ <xs:annotation>
3298
+ <xs:documentation>
3299
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
3300
+ attributes at this point in the schema.
3301
+ </xs:documentation>
3302
+ </xs:annotation>
3303
+ </xs:anyAttribute>
3304
+ </xs:complexType>
3305
+ </xs:element>
3306
+ <xs:element name="DigitalSignature">
3307
+ <xs:annotation>
3308
+ <xs:documentation>
3309
+ Adds a digital signature.
3310
+ </xs:documentation>
3311
+ <xs:appinfo>
3312
+ <xse:msiRef table="MsiDigitalSignature" href="http://msdn.microsoft.com/library/aa370087.aspx" />
3313
+ </xs:appinfo>
3314
+ </xs:annotation>
3315
+ <xs:complexType>
3316
+ <xs:choice>
3317
+ <xs:element ref="DigitalCertificate" />
3318
+ </xs:choice>
3319
+ <xs:attribute name="SourceFile" type="xs:string">
3320
+ <xs:annotation>
3321
+ <xs:documentation>The path to signature's optional hash file.</xs:documentation>
3322
+ </xs:annotation>
3323
+ </xs:attribute>
3324
+ </xs:complexType>
3325
+ </xs:element>
3326
+ <xs:element name="SFPCatalog">
3327
+ <xs:annotation>
3328
+ <xs:documentation>
3329
+ Adds a system file protection update catalog file
3330
+ </xs:documentation>
3331
+ <xs:appinfo>
3332
+ <xse:msiRef table="SFPCatalog" href="http://msdn.microsoft.com/library/aa371833.aspx" />
3333
+ </xs:appinfo>
3334
+ </xs:annotation>
3335
+ <xs:complexType>
3336
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
3337
+ <xs:element ref="SFPCatalog" minOccurs="0" maxOccurs="unbounded" />
3338
+ <xs:element ref="SFPFile" minOccurs="0" maxOccurs="unbounded">
3339
+ <xs:annotation>
3340
+ <xs:documentation>Primary Key to File Table.</xs:documentation>
3341
+ </xs:annotation>
3342
+ </xs:element>
3343
+ </xs:choice>
3344
+ <xs:attribute name="Name" type="xs:string">
3345
+ <xs:annotation>
3346
+ <xs:documentation>Filename for catalog file when installed.</xs:documentation>
3347
+ </xs:annotation>
3348
+ </xs:attribute>
3349
+ <xs:attribute name="Dependency" type="xs:string">
3350
+ <xs:annotation>
3351
+ <xs:documentation>Used to define dependency outside of the package.</xs:documentation>
3352
+ </xs:annotation>
3353
+ </xs:attribute>
3354
+ <xs:attribute name="SourceFile" type="xs:string">
3355
+ <xs:annotation>
3356
+ <xs:documentation>Path to catalog file in binary.</xs:documentation>
3357
+ </xs:annotation>
3358
+ </xs:attribute>
3359
+ </xs:complexType>
3360
+ </xs:element>
3361
+ <xs:element name="SFPFile">
3362
+ <xs:annotation>
3363
+ <xs:documentation>
3364
+ Provides a many-to-many mapping from the SFPCatalog table to the File table
3365
+ </xs:documentation>
3366
+ <xs:appinfo>
3367
+ <xse:msiRef table="FileSFPCatalog" href="http://msdn.microsoft.com/library/aa368591.aspx" />
3368
+ </xs:appinfo>
3369
+ </xs:annotation>
3370
+ <xs:complexType>
3371
+ <xs:attribute name="Id" use="required" type="xs:string">
3372
+ <xs:annotation>
3373
+ <xs:documentation>Primary Key to File Table.</xs:documentation>
3374
+ </xs:annotation>
3375
+ </xs:attribute>
3376
+ </xs:complexType>
3377
+ </xs:element>
3378
+ <xs:element name="IniFile">
3379
+ <xs:annotation>
3380
+ <xs:documentation>
3381
+ Adds or removes .ini file entries.
3382
+ </xs:documentation>
3383
+ <xs:appinfo>
3384
+ <xse:msiRef table="IniFile" href="http://msdn.microsoft.com/library/aa369282.aspx" />
3385
+ <xse:msiRef table="RemoveIniFile" href="http://msdn.microsoft.com/library/aa371204.aspx" />
3386
+ </xs:appinfo>
3387
+ </xs:annotation>
3388
+ <xs:complexType>
3389
+ <xs:attribute name="Id" use="required" type="xs:string">
3390
+ <xs:annotation>
3391
+ <xs:documentation>Identifier for ini file.</xs:documentation>
3392
+ </xs:annotation>
3393
+ </xs:attribute>
3394
+ <xs:attribute name="Action" use="required">
3395
+ <xs:annotation>
3396
+ <xs:documentation>The type of modification to be made.</xs:documentation>
3397
+ </xs:annotation>
3398
+ <xs:simpleType>
3399
+ <xs:restriction base="xs:NMTOKEN">
3400
+ <xs:enumeration value="addLine">
3401
+ <xs:annotation>
3402
+ <xs:documentation>Creates or updates an .ini entry.</xs:documentation>
3403
+ </xs:annotation>
3404
+ </xs:enumeration>
3405
+ <xs:enumeration value="addTag">
3406
+ <xs:annotation>
3407
+ <xs:documentation>Creates a new entry or appends a new comma-separated value to an existing entry.</xs:documentation>
3408
+ </xs:annotation>
3409
+ </xs:enumeration>
3410
+ <xs:enumeration value="createLine">
3411
+ <xs:annotation>
3412
+ <xs:documentation>Creates an .ini entry only if the entry does no already exist.</xs:documentation>
3413
+ </xs:annotation>
3414
+ </xs:enumeration>
3415
+ <xs:enumeration value="removeLine">
3416
+ <xs:annotation>
3417
+ <xs:documentation>Removes an .ini entry.</xs:documentation>
3418
+ </xs:annotation>
3419
+ </xs:enumeration>
3420
+ <xs:enumeration value="removeTag">
3421
+ <xs:annotation>
3422
+ <xs:documentation>Removes a tag from an .ini entry.</xs:documentation>
3423
+ </xs:annotation>
3424
+ </xs:enumeration>
3425
+ </xs:restriction>
3426
+ </xs:simpleType>
3427
+ </xs:attribute>
3428
+ <xs:attribute name="Directory" type="xs:string">
3429
+ <xs:annotation>
3430
+ <xs:documentation>Name of a property, the value of which is the full path of the folder containing the .ini file. Can be name of a directory in the Directory table, a property set by the AppSearch table, or any other property representing a full path.</xs:documentation>
3431
+ </xs:annotation>
3432
+ </xs:attribute>
3433
+ <xs:attribute name="Key" use="required" type="xs:string">
3434
+ <xs:annotation>
3435
+ <xs:documentation>The localizable .ini file key within the section.</xs:documentation>
3436
+ </xs:annotation>
3437
+ </xs:attribute>
3438
+ <xs:attribute name="Name" type="LongFileNameType" use="required">
3439
+ <xs:annotation>
3440
+ <xs:documentation>
3441
+ In prior versions of the WiX toolset, this attribute specified the short name.
3442
+ This attribute's value may now be either a short or long name.
3443
+ If a short name is specified, the ShortName attribute may not be specified.
3444
+ Also, if this value is a long name, the ShortName attribute may be omitted to
3445
+ allow WiX to attempt to generate a unique short name.
3446
+ However, if this name collides with another file or you wish to manually specify
3447
+ the short name, then the ShortName attribute may be specified.
3448
+ </xs:documentation>
3449
+ </xs:annotation>
3450
+ </xs:attribute>
3451
+ <xs:attribute name="Section" use="required" type="xs:string">
3452
+ <xs:annotation>
3453
+ <xs:documentation>The localizable .ini file section.</xs:documentation>
3454
+ </xs:annotation>
3455
+ </xs:attribute>
3456
+ <xs:attribute name="ShortName" type="ShortFileNameType">
3457
+ <xs:annotation>
3458
+ <xs:documentation>
3459
+ The short name of the in 8.3 format.
3460
+ This attribute should only be set if there is a conflict between generated short names
3461
+ or the user wants to manually specify the short name.
3462
+ </xs:documentation>
3463
+ </xs:annotation>
3464
+ </xs:attribute>
3465
+ <xs:attribute name="Value" type="xs:string">
3466
+ <xs:annotation>
3467
+ <xs:documentation>
3468
+ The localizable value to be written or deleted. This attribute must be set if
3469
+ the Action attribute's value is "addLine", "addTag", or "createLine".
3470
+ </xs:documentation>
3471
+ </xs:annotation>
3472
+ </xs:attribute>
3473
+ </xs:complexType>
3474
+ </xs:element>
3475
+ <xs:element name="ODBCDataSource">
3476
+ <xs:annotation>
3477
+ <xs:documentation>
3478
+ ODBCDataSource for a Component
3479
+ </xs:documentation>
3480
+ <xs:appinfo>
3481
+ <xse:msiRef table="ODBCDataSource" href="http://msdn.microsoft.com/library/aa370546.aspx" />
3482
+ </xs:appinfo>
3483
+ </xs:annotation>
3484
+ <xs:complexType>
3485
+ <xs:sequence>
3486
+ <xs:element ref="Property" minOccurs="0" maxOccurs="unbounded">
3487
+ <xs:annotation>
3488
+ <xs:documentation>Translates into ODBCSourceAttributes</xs:documentation>
3489
+ </xs:annotation>
3490
+ </xs:element>
3491
+ </xs:sequence>
3492
+ <xs:attribute name="Id" use="required" type="xs:string">
3493
+ <xs:annotation>
3494
+ <xs:documentation>Identifier of the data source.</xs:documentation>
3495
+ </xs:annotation>
3496
+ </xs:attribute>
3497
+ <xs:attribute name="Name" use="required" type="xs:string">
3498
+ <xs:annotation>
3499
+ <xs:documentation>Name for the data source.</xs:documentation>
3500
+ </xs:annotation>
3501
+ </xs:attribute>
3502
+ <xs:attribute name="DriverName" type="xs:string">
3503
+ <xs:annotation>
3504
+ <xs:documentation>Required if not found as child of ODBCDriver element</xs:documentation>
3505
+ </xs:annotation>
3506
+ </xs:attribute>
3507
+ <xs:attribute name="Registration" use="required">
3508
+ <xs:annotation>
3509
+ <xs:documentation>Scope for which the data source should be registered.</xs:documentation>
3510
+ </xs:annotation>
3511
+ <xs:simpleType>
3512
+ <xs:restriction base="xs:NMTOKEN">
3513
+ <xs:enumeration value="machine">
3514
+ <xs:annotation>
3515
+ <xs:documentation>
3516
+ Data source is registered per machine.
3517
+ </xs:documentation>
3518
+ </xs:annotation>
3519
+ </xs:enumeration>
3520
+ <xs:enumeration value="user">
3521
+ <xs:annotation>
3522
+ <xs:documentation>
3523
+ Data source is registered per user.
3524
+ </xs:documentation>
3525
+ </xs:annotation>
3526
+ </xs:enumeration>
3527
+ </xs:restriction>
3528
+ </xs:simpleType>
3529
+ </xs:attribute>
3530
+ <xs:attribute name="KeyPath" type="YesNoTypeUnion">
3531
+ <xs:annotation>
3532
+ <xs:documentation>Set 'yes' to force this file to be key path for parent Component</xs:documentation>
3533
+ </xs:annotation>
3534
+ </xs:attribute>
3535
+ </xs:complexType>
3536
+ </xs:element>
3537
+ <xs:element name="ODBCDriver">
3538
+ <xs:annotation>
3539
+ <xs:documentation>
3540
+ ODBCDriver for a Component
3541
+ </xs:documentation>
3542
+ <xs:appinfo>
3543
+ <xse:msiRef table="ODBCDriver" href="http://msdn.microsoft.com/library/aa370547.aspx" />
3544
+ </xs:appinfo>
3545
+ </xs:annotation>
3546
+ <xs:complexType>
3547
+ <xs:sequence>
3548
+ <xs:element ref="Property" minOccurs="0" maxOccurs="unbounded">
3549
+ <xs:annotation>
3550
+ <xs:documentation>Translates into ODBCSourceAttributes</xs:documentation>
3551
+ </xs:annotation>
3552
+ </xs:element>
3553
+ <xs:element ref="ODBCDataSource" minOccurs="0" maxOccurs="unbounded" />
3554
+ </xs:sequence>
3555
+ <xs:attribute name="Id" use="required" type="xs:string">
3556
+ <xs:annotation>
3557
+ <xs:documentation>Identifier for the driver.</xs:documentation>
3558
+ </xs:annotation>
3559
+ </xs:attribute>
3560
+ <xs:attribute name="Name" use="required" type="xs:string">
3561
+ <xs:annotation>
3562
+ <xs:documentation>Name for the driver.</xs:documentation>
3563
+ </xs:annotation>
3564
+ </xs:attribute>
3565
+ <xs:attribute name="File" type="xs:string">
3566
+ <xs:annotation>
3567
+ <xs:documentation>Required if not found as child of File element</xs:documentation>
3568
+ </xs:annotation>
3569
+ </xs:attribute>
3570
+ <xs:attribute name="SetupFile" type="xs:string">
3571
+ <xs:annotation>
3572
+ <xs:documentation>Required if not found as child of File element or different from File attribute above</xs:documentation>
3573
+ </xs:annotation>
3574
+ </xs:attribute>
3575
+ </xs:complexType>
3576
+ </xs:element>
3577
+ <xs:element name="ODBCTranslator">
3578
+ <xs:annotation>
3579
+ <xs:documentation>
3580
+ ODBCTranslator for a Component
3581
+ </xs:documentation>
3582
+ <xs:appinfo>
3583
+ <xse:msiRef table="ODBCTranslator" href="http://msdn.microsoft.com/library/aa370549.aspx" />
3584
+ </xs:appinfo>
3585
+ </xs:annotation>
3586
+ <xs:complexType>
3587
+ <xs:attribute name="Id" use="required" type="xs:string">
3588
+ <xs:annotation>
3589
+ <xs:documentation>Identifier for the translator.</xs:documentation>
3590
+ </xs:annotation>
3591
+ </xs:attribute>
3592
+ <xs:attribute name="Name" use="required" type="xs:string">
3593
+ <xs:annotation>
3594
+ <xs:documentation>Name for the translator.</xs:documentation>
3595
+ </xs:annotation>
3596
+ </xs:attribute>
3597
+ <xs:attribute name="File" type="xs:string">
3598
+ <xs:annotation>
3599
+ <xs:documentation>Required if not found as child of File element</xs:documentation>
3600
+ </xs:annotation>
3601
+ </xs:attribute>
3602
+ <xs:attribute name="SetupFile" type="xs:string">
3603
+ <xs:annotation>
3604
+ <xs:documentation>Required if not found as child of File element or different from File attribute above</xs:documentation>
3605
+ </xs:annotation>
3606
+ </xs:attribute>
3607
+ </xs:complexType>
3608
+ </xs:element>
3609
+ <xs:element name="FileSearch">
3610
+ <xs:annotation>
3611
+ <xs:appinfo>
3612
+ <xse:seeAlso ref="ComponentSearch" />
3613
+ <xse:seeAlso ref="DirectorySearch" />
3614
+ <xse:seeAlso ref="DirectorySearchRef" />
3615
+ <xse:seeAlso ref="FileSearchRef" />
3616
+ <xse:seeAlso ref="IniFileSearch" />
3617
+ <xse:seeAlso ref="RegistrySearch" />
3618
+ <xse:msiRef table="DrLocator" href="http://msdn.microsoft.com/library/aa368331.aspx" />
3619
+ <xse:msiRef table="Signature" href="http://msdn.microsoft.com/library/aa371853.aspx" />
3620
+ <xse:howtoRef href="files_and_registry/check_the_version_number.html">How To: Check the version number of a file during installation</xse:howtoRef>
3621
+ <xse:remarks>
3622
+ <html:a>When the parent DirectorySearch/@Depth attribute is greater than 0, the FileSearch/@Id attribute must be absent or the same as the parent DirectorySearch/@Id attribute value, unless the parent DirectorySearch/@AssignToProperty attribute value is 'yes'.</html:a>
3623
+ </xse:remarks>
3624
+ </xs:appinfo>
3625
+ <xs:documentation>Searches for file and assigns to fullpath value of parent Property</xs:documentation>
3626
+ </xs:annotation>
3627
+ <xs:complexType>
3628
+ <xs:attribute name="Id" type="xs:string">
3629
+ <xs:annotation>
3630
+ <xs:documentation>Unique identifier for the file search and external key into the Signature table. If this attribute value is not set then the parent element's @Id attribute is used.</xs:documentation>
3631
+ </xs:annotation>
3632
+ </xs:attribute>
3633
+ <xs:attribute name="Name" type="LongFileNameType">
3634
+ <xs:annotation>
3635
+ <xs:documentation>
3636
+ In prior versions of the WiX toolset, this attribute specified the short file name.
3637
+ This attribute's value may now be either a short or long file name.
3638
+ If a short file name is specified, the ShortName attribute may not be specified.
3639
+ If you wish to manually specify the short file name, then the ShortName
3640
+ attribute may be specified.
3641
+ </xs:documentation>
3642
+ </xs:annotation>
3643
+ </xs:attribute>
3644
+ <xs:attribute name="ShortName" type="ShortFileNameType">
3645
+ <xs:annotation>
3646
+ <xs:documentation>
3647
+ The short file name of the file in 8.3 format.
3648
+ There is a Windows Installer bug which prevents the FileSearch functionality from working
3649
+ if both a short and long file name are specified. Since the Name attribute allows either
3650
+ a short or long name to be specified, it is the only attribute related to file names which
3651
+ should be specified.
3652
+ </xs:documentation>
3653
+ </xs:annotation>
3654
+ </xs:attribute>
3655
+ <xs:attribute name="MinSize" type="xs:int">
3656
+ <xs:annotation>
3657
+ <xs:documentation>The minimum size of the file.</xs:documentation>
3658
+ </xs:annotation>
3659
+ </xs:attribute>
3660
+ <xs:attribute name="MaxSize" type="xs:int">
3661
+ <xs:annotation>
3662
+ <xs:documentation>The maximum size of the file.</xs:documentation>
3663
+ </xs:annotation>
3664
+ </xs:attribute>
3665
+ <xs:attribute name="MinVersion" type="xs:string">
3666
+ <xs:annotation>
3667
+ <xs:documentation>The minimum version of the file.</xs:documentation>
3668
+ </xs:annotation>
3669
+ </xs:attribute>
3670
+ <xs:attribute name="MaxVersion" type="xs:string">
3671
+ <xs:annotation>
3672
+ <xs:documentation>The maximum version of the file.</xs:documentation>
3673
+ </xs:annotation>
3674
+ </xs:attribute>
3675
+ <xs:attribute name="MinDate" type="xs:dateTime">
3676
+ <xs:annotation>
3677
+ <xs:documentation>The minimum modification date and time of the file. Formatted as YYYY-MM-DDTHH:mm:ss, where YYYY is the year, MM is month, DD is day, 'T' is literal, HH is hour, mm is minute and ss is second.</xs:documentation>
3678
+ </xs:annotation>
3679
+ </xs:attribute>
3680
+ <xs:attribute name="MaxDate" type="xs:dateTime">
3681
+ <xs:annotation>
3682
+ <xs:documentation>The maximum modification date and time of the file. Formatted as YYYY-MM-DDTHH:mm:ss, where YYYY is the year, MM is month, DD is day, 'T' is literal, HH is hour, mm is minute and ss is second.</xs:documentation>
3683
+ </xs:annotation>
3684
+ </xs:attribute>
3685
+ <xs:attribute name="Languages" type="xs:string">
3686
+ <xs:annotation>
3687
+ <xs:documentation>The languages supported by the file.</xs:documentation>
3688
+ </xs:annotation>
3689
+ </xs:attribute>
3690
+ </xs:complexType>
3691
+ </xs:element>
3692
+ <xs:element name="FileSearchRef">
3693
+ <xs:annotation>
3694
+ <xs:appinfo>
3695
+ <xse:seeAlso ref="FileSearch" />
3696
+ <xse:remarks>
3697
+ <html:p>A reference to another FileSearch element must reference the same Id and the same Parent Id. If any of these attribute values are different you must instead use a FileSearch element.</html:p>
3698
+ </xse:remarks>
3699
+ </xs:appinfo>
3700
+ <xs:documentation>References an existing FileSearch element.</xs:documentation>
3701
+ </xs:annotation>
3702
+ <xs:complexType>
3703
+ <xs:attribute name="Id" use="required" type="xs:string">
3704
+ <xs:annotation>
3705
+ <xs:documentation>Specify the Id to the FileSearch to reference.</xs:documentation>
3706
+ </xs:annotation>
3707
+ </xs:attribute>
3708
+ </xs:complexType>
3709
+ </xs:element>
3710
+ <xs:element name="DirectorySearch">
3711
+ <xs:annotation>
3712
+ <xs:appinfo>
3713
+ <xse:seeAlso ref="ComponentSearch" />
3714
+ <xse:seeAlso ref="IniFileSearch" />
3715
+ <xse:seeAlso ref="RegistrySearch" />
3716
+ <xse:msiRef table="DrLocator" href="http://msdn.microsoft.com/library/aa368331.aspx" />
3717
+ <xse:msiRef table="Signature" href="http://msdn.microsoft.com/library/aa371853.aspx" />
3718
+ <xse:howtoRef href="files_and_registry/check_the_version_number.html">How To: Check the version number of a file during installation</xse:howtoRef>
3719
+ <xse:howtoRef href="files_and_registry/directorysearchref.html">How To: Reference another DirectorySearch element</xse:howtoRef>
3720
+ <xse:howtoRef href="files_and_registry/parentdirectorysearch.html">How To: Get the parent directory of a file search</xse:howtoRef>
3721
+ <xse:remarks>
3722
+ <html:p>Use the AssignToProperty attribute to search for a file but set the outer property to the directory containing the file. When this attribute is set to 'yes', you may only nest a FileSearch element with a unique Id or define no child element.</html:p>
3723
+ <html:a>When the parent DirectorySearch/@Depth attribute is greater than 0, the FileSearch/@Id attribute must be absent or the same as the parent DirectorySearch/@Id attribute value, unless the parent DirectorySearch/@AssignToProperty attribute value is 'yes'.</html:a>
3724
+ </xse:remarks>
3725
+ </xs:appinfo>
3726
+ <xs:documentation>Searches for directory and assigns to value of parent Property.</xs:documentation>
3727
+ </xs:annotation>
3728
+ <xs:complexType>
3729
+ <xs:choice minOccurs="0">
3730
+ <xs:element ref="DirectorySearch" />
3731
+ <xs:element ref="DirectorySearchRef" />
3732
+ <xs:element ref="FileSearch" />
3733
+ <xs:element ref="FileSearchRef" />
3734
+ </xs:choice>
3735
+ <xs:attribute name="Id" use="required" type="xs:string">
3736
+ <xs:annotation>
3737
+ <xs:documentation>Unique identifier for the directory search.</xs:documentation>
3738
+ </xs:annotation>
3739
+ </xs:attribute>
3740
+ <xs:attribute name="Path" type="xs:string">
3741
+ <xs:annotation>
3742
+ <xs:documentation>Path on the user's system. Either absolute, or relative to containing directories.</xs:documentation>
3743
+ </xs:annotation>
3744
+ </xs:attribute>
3745
+ <xs:attribute name="Depth" type="xs:integer">
3746
+ <xs:annotation>
3747
+ <xs:documentation>
3748
+ Depth below the path that the installer searches for the file or directory specified by the search. See remarks for more information.
3749
+ </xs:documentation>
3750
+ </xs:annotation>
3751
+ </xs:attribute>
3752
+ <xs:attribute name="AssignToProperty" type="YesNoTypeUnion">
3753
+ <xs:annotation>
3754
+ <xs:documentation>Set the value of the outer Property to the result of this search. See remarks for more information.</xs:documentation>
3755
+ </xs:annotation>
3756
+ </xs:attribute>
3757
+ </xs:complexType>
3758
+ </xs:element>
3759
+ <xs:element name="DirectorySearchRef">
3760
+ <xs:annotation>
3761
+ <xs:appinfo>
3762
+ <xse:seeAlso ref="ComponentSearch" />
3763
+ <xse:seeAlso ref="IniFileSearch" />
3764
+ <xse:seeAlso ref="RegistrySearch" />
3765
+ <xse:howtoRef href="files_and_registry/directorysearchref.html">How To: Reference another DirectorySearch element</xse:howtoRef>
3766
+ <xse:remarks>
3767
+ <html:p>A reference to another DirectorySearch element must reference the same Id, the same Parent Id, and the same Path. If any of these attribute values are different you must instead use a DirectorySearch element.</html:p>
3768
+ </xse:remarks>
3769
+ </xs:appinfo>
3770
+ <xs:documentation>References an existing DirectorySearch element.</xs:documentation>
3771
+ </xs:annotation>
3772
+ <xs:complexType>
3773
+ <xs:choice minOccurs="0">
3774
+ <xs:element ref="DirectorySearch" />
3775
+ <xs:element ref="DirectorySearchRef" />
3776
+ <xs:element ref="FileSearch" />
3777
+ <xs:element ref="FileSearchRef" />
3778
+ </xs:choice>
3779
+ <xs:attribute name="Id" use="required" type="xs:string">
3780
+ <xs:annotation>
3781
+ <xs:documentation>Id of the search being referred to.</xs:documentation>
3782
+ </xs:annotation>
3783
+ </xs:attribute>
3784
+ <xs:attribute name="Parent" type="xs:string">
3785
+ <xs:annotation>
3786
+ <xs:documentation>This attribute is the signature of the parent directory of the file or directory in the Signature_ column. If this field is null, and the Path column does not expand to a full path, then all the fixed drives of the user's system are searched by using the Path. This field is a key into one of the following tables: the RegLocator, the IniLocator, the CompLocator, or the DrLocator tables.</xs:documentation>
3787
+ </xs:annotation>
3788
+ </xs:attribute>
3789
+ <xs:attribute name="Path" type="xs:string">
3790
+ <xs:annotation>
3791
+ <xs:documentation>Path on the user's system. Either absolute, or relative to containing directories.</xs:documentation>
3792
+ </xs:annotation>
3793
+ </xs:attribute>
3794
+ </xs:complexType>
3795
+ </xs:element>
3796
+ <xs:element name="ComponentSearch">
3797
+ <xs:annotation>
3798
+ <xs:appinfo>
3799
+ <xse:seeAlso ref="IniFileSearch" />
3800
+ <xse:seeAlso ref="RegistrySearch" />
3801
+ <xse:msiRef table="CompLocator" href="http://msdn.microsoft.com/library/aa368001.aspx" />
3802
+ <xse:msiRef table="Signature" href="http://msdn.microsoft.com/library/aa371853.aspx" />
3803
+ </xs:appinfo>
3804
+ <xs:documentation>Searches for file or directory and assigns to value of parent Property.</xs:documentation>
3805
+ </xs:annotation>
3806
+ <xs:complexType>
3807
+ <xs:choice minOccurs="0">
3808
+ <xs:element ref="DirectorySearch" />
3809
+ <xs:element ref="DirectorySearchRef" />
3810
+ <xs:element ref="FileSearch" />
3811
+ <xs:element ref="FileSearchRef" />
3812
+ </xs:choice>
3813
+ <xs:attribute name="Id" use="required" type="xs:string" />
3814
+ <xs:attribute name="Guid" type="Guid">
3815
+ <xs:annotation>
3816
+ <xs:documentation>The component ID of the component whose key path is to be used for the search.</xs:documentation>
3817
+ </xs:annotation>
3818
+ </xs:attribute>
3819
+ <xs:attribute name="Type">
3820
+ <xs:annotation>
3821
+ <xs:documentation>Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element.</xs:documentation>
3822
+ </xs:annotation>
3823
+ <xs:simpleType>
3824
+ <xs:restriction base="xs:NMTOKEN">
3825
+ <xs:enumeration value="directory">
3826
+ <xs:annotation>
3827
+ <xs:documentation>
3828
+ The key path of the component is a directory.
3829
+ </xs:documentation>
3830
+ </xs:annotation>
3831
+ </xs:enumeration>
3832
+ <xs:enumeration value="file">
3833
+ <xs:annotation>
3834
+ <xs:documentation>
3835
+ The key path of the component is a file. This is the default value.
3836
+ </xs:documentation>
3837
+ </xs:annotation>
3838
+ </xs:enumeration>
3839
+ </xs:restriction>
3840
+ </xs:simpleType>
3841
+ </xs:attribute>
3842
+ </xs:complexType>
3843
+ </xs:element>
3844
+ <xs:element name="IniFileSearch">
3845
+ <xs:annotation>
3846
+ <xs:appinfo>
3847
+ <xse:seeAlso ref="ComponentSearch" />
3848
+ <xse:seeAlso ref="RegistrySearch" />
3849
+ <xse:msiRef table="IniLocator" href="http://msdn.microsoft.com/library/aa369283.aspx" />
3850
+ <xse:msiRef table="Signature" href="http://msdn.microsoft.com/library/aa371853.aspx" />
3851
+ </xs:appinfo>
3852
+ <xs:documentation>Searches for file, directory or registry key and assigns to value of parent Property</xs:documentation>
3853
+ </xs:annotation>
3854
+ <xs:complexType>
3855
+ <xs:choice minOccurs="0">
3856
+ <xs:element ref="DirectorySearch" />
3857
+ <xs:element ref="DirectorySearchRef" />
3858
+ <xs:element ref="FileSearch" />
3859
+ <xs:element ref="FileSearchRef" />
3860
+ </xs:choice>
3861
+ <xs:attribute name="Id" use="required" type="xs:string">
3862
+ <xs:annotation>
3863
+ <xs:documentation>External key into the Signature table.</xs:documentation>
3864
+ </xs:annotation>
3865
+ </xs:attribute>
3866
+ <xs:attribute name="Field" type="xs:integer">
3867
+ <xs:annotation>
3868
+ <xs:documentation>The field in the .ini line. If field is Null or 0, the entire line is read.</xs:documentation>
3869
+ </xs:annotation>
3870
+ </xs:attribute>
3871
+ <xs:attribute name="Key" use="required" type="xs:string">
3872
+ <xs:annotation>
3873
+ <xs:documentation>The key value within the section.</xs:documentation>
3874
+ </xs:annotation>
3875
+ </xs:attribute>
3876
+ <xs:attribute name="Name" type="LongFileNameType" use="required">
3877
+ <xs:annotation>
3878
+ <xs:documentation>
3879
+ In prior versions of the WiX toolset, this attribute specified the short name.
3880
+ This attribute's value may now be either a short or long name.
3881
+ If a short name is specified, the ShortName attribute may not be specified.
3882
+ Also, if this value is a long name, the ShortName attribute may be omitted to
3883
+ allow WiX to attempt to generate a unique short name.
3884
+ However, if you wish to manually specify the short name, then the ShortName
3885
+ attribute may be specified.
3886
+ </xs:documentation>
3887
+ </xs:annotation>
3888
+ </xs:attribute>
3889
+ <xs:attribute name="Section" use="required" type="xs:string">
3890
+ <xs:annotation>
3891
+ <xs:documentation>The localizable .ini file section.</xs:documentation>
3892
+ </xs:annotation>
3893
+ </xs:attribute>
3894
+ <xs:attribute name="ShortName" type="ShortFileNameType">
3895
+ <xs:annotation>
3896
+ <xs:documentation>
3897
+ The short name of the file in 8.3 format.
3898
+ This attribute should only be set if the user wants to manually specify the short name.
3899
+ </xs:documentation>
3900
+ </xs:annotation>
3901
+ </xs:attribute>
3902
+ <xs:attribute name="Type">
3903
+ <xs:annotation>
3904
+ <xs:documentation>Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element.</xs:documentation>
3905
+ </xs:annotation>
3906
+ <xs:simpleType>
3907
+ <xs:restriction base="xs:NMTOKEN">
3908
+ <xs:enumeration value="directory">
3909
+ <xs:annotation>
3910
+ <xs:documentation>A directory location.</xs:documentation>
3911
+ </xs:annotation>
3912
+ </xs:enumeration>
3913
+ <xs:enumeration value="file">
3914
+ <xs:annotation>
3915
+ <xs:documentation>A file location. This is the default value.</xs:documentation>
3916
+ </xs:annotation>
3917
+ </xs:enumeration>
3918
+ <xs:enumeration value="raw">
3919
+ <xs:annotation>
3920
+ <xs:documentation>A raw .ini value.</xs:documentation>
3921
+ </xs:annotation>
3922
+ </xs:enumeration>
3923
+ </xs:restriction>
3924
+ </xs:simpleType>
3925
+ </xs:attribute>
3926
+ </xs:complexType>
3927
+ </xs:element>
3928
+ <xs:element name="RegistrySearch">
3929
+ <xs:annotation>
3930
+ <xs:appinfo>
3931
+ <xse:seeAlso ref="ComponentSearch" />
3932
+ <xse:seeAlso ref="IniFileSearch" />
3933
+ <xse:msiRef table="RegLocator" href="http://msdn.microsoft.com/library/aa371171.aspx" />
3934
+ <xse:msiRef table="Signature" href="http://msdn.microsoft.com/library/aa371853.aspx" />
3935
+ <xse:howtoRef href="files_and_registry/read_a_registry_entry.html">How To: Read a registry entry during installation</xse:howtoRef>
3936
+ <xse:remarks>
3937
+ <html:p>
3938
+ When the Type attribute value is 'directory' the registry value must specify the path to a directory excluding the file name.
3939
+ When the Type attribute value is 'file' the registry value must specify the path to a file including the file name;
3940
+ however, if there is no child FileSearch element the parent directory of the file is returned. The FileSearch element requires
3941
+ that you author the name of the file you are searching for. If you do not know the file name
3942
+ you must set the Type attribute to 'raw' to return the full file path including the file name.
3943
+ </html:p>
3944
+ </xse:remarks>
3945
+ </xs:appinfo>
3946
+ <xs:documentation>Searches for file, directory or registry key and assigns to value of parent Property</xs:documentation>
3947
+ </xs:annotation>
3948
+ <xs:complexType>
3949
+ <xs:choice minOccurs="0">
3950
+ <xs:element ref="DirectorySearch" />
3951
+ <xs:element ref="DirectorySearchRef" />
3952
+ <xs:element ref="FileSearch" />
3953
+ <xs:element ref="FileSearchRef" />
3954
+ </xs:choice>
3955
+ <xs:attribute name="Id" use="required" type="xs:string">
3956
+ <xs:annotation>
3957
+ <xs:documentation>Signature to be used for the file, directory or registry key being searched for.</xs:documentation>
3958
+ </xs:annotation>
3959
+ </xs:attribute>
3960
+ <xs:attribute name="Root" use="required">
3961
+ <xs:annotation>
3962
+ <xs:documentation>Root key for the registry value.</xs:documentation>
3963
+ </xs:annotation>
3964
+ <xs:simpleType>
3965
+ <xs:restriction base="xs:NMTOKEN">
3966
+ <xs:enumeration value="HKCR">
3967
+ <xs:annotation>
3968
+ <xs:documentation>
3969
+ HKEY_CLASSES_ROOT
3970
+ </xs:documentation>
3971
+ </xs:annotation>
3972
+ </xs:enumeration>
3973
+ <xs:enumeration value="HKCU">
3974
+ <xs:annotation>
3975
+ <xs:documentation>
3976
+ HKEY_CURRENT_USER
3977
+ </xs:documentation>
3978
+ </xs:annotation>
3979
+ </xs:enumeration>
3980
+ <xs:enumeration value="HKLM">
3981
+ <xs:annotation>
3982
+ <xs:documentation>
3983
+ HKEY_LOCAL_MACHINE
3984
+ </xs:documentation>
3985
+ </xs:annotation>
3986
+ </xs:enumeration>
3987
+ <xs:enumeration value="HKU">
3988
+ <xs:annotation>
3989
+ <xs:documentation>
3990
+ HKEY_USERS
3991
+ </xs:documentation>
3992
+ </xs:annotation>
3993
+ </xs:enumeration>
3994
+ </xs:restriction>
3995
+ </xs:simpleType>
3996
+ </xs:attribute>
3997
+ <xs:attribute name="Key" use="required" type="xs:string">
3998
+ <xs:annotation>
3999
+ <xs:documentation>Key for the registry value.</xs:documentation>
4000
+ </xs:annotation>
4001
+ </xs:attribute>
4002
+ <xs:attribute name="Name" type="xs:string">
4003
+ <xs:annotation>
4004
+ <xs:documentation>Registry value name. If this value is null, then the value from the key's unnamed or default value, if any, is retrieved.</xs:documentation>
4005
+ </xs:annotation>
4006
+ </xs:attribute>
4007
+ <xs:attribute name="Type" use="required">
4008
+ <xs:annotation>
4009
+ <xs:documentation>
4010
+ The value must be 'file' if the child is a FileSearch element, and must be 'directory' if child is a DirectorySearch element.
4011
+ </xs:documentation>
4012
+ </xs:annotation>
4013
+ <xs:simpleType>
4014
+ <xs:restriction base="xs:NMTOKEN">
4015
+ <xs:enumeration value="directory">
4016
+ <xs:annotation>
4017
+ <xs:documentation>
4018
+ The registry value contains the path to a directory.
4019
+ </xs:documentation>
4020
+ </xs:annotation>
4021
+ </xs:enumeration>
4022
+ <xs:enumeration value="file">
4023
+ <xs:annotation>
4024
+ <xs:documentation>
4025
+ The registry value contains the path to a file. To return the full file path you must add a FileSearch element as a child of this element; otherwise, the parent directory of the file path is returned.
4026
+ </xs:documentation>
4027
+ </xs:annotation>
4028
+ </xs:enumeration>
4029
+ <xs:enumeration value="raw">
4030
+ <xs:annotation>
4031
+ <xs:documentation>
4032
+ Sets the raw value from the registry value. Please note that this value will contain a prefix as follows:<html:br /><html:br /><html:dl><html:dt>DWORD</html:dt><html:dd>Starts with '#' optionally followed by '+' or '-'.</html:dd><html:dt>REG_BINARY</html:dt><html:dd>Starts with '#x' and the installer converts and saves each hexadecimal digit (nibble) as an ASCII character prefixed by '#x'.</html:dd><html:dt>REG_EXPAND_SZ</html:dt><html:dd>Starts with '#%'.</html:dd><html:dt>REG_MULTI_SZ</html:dt><html:dd>Starts with '[~]' and ends with '[~]'.</html:dd><html:dt>REG_SZ</html:dt><html:dd>No prefix, but if the first character of the registry value is '#', the installer escapes the character by prefixing it with another '#'.</html:dd></html:dl></xs:documentation>
4033
+ </xs:annotation>
4034
+ </xs:enumeration>
4035
+ </xs:restriction>
4036
+ </xs:simpleType>
4037
+ </xs:attribute>
4038
+ <xs:attribute name="Win64" type="YesNoTypeUnion">
4039
+ <xs:annotation>
4040
+ <xs:documentation>Instructs the search to look in the 64-bit registry when the value is 'yes'. When the value is 'no', the search looks in the 32-bit registry.
4041
+ The default value is based on the platform set by the -arch switch to candle.exe
4042
+ or the InstallerPlatform property in a .wixproj MSBuild project:
4043
+ For x86 and ARM, the default value is 'no'.
4044
+ For x64 and IA64, the default value is 'yes'.
4045
+ </xs:documentation>
4046
+ </xs:annotation>
4047
+ </xs:attribute>
4048
+ </xs:complexType>
4049
+ </xs:element>
4050
+ <xs:element name="RegistrySearchRef">
4051
+ <xs:annotation>
4052
+ <xs:appinfo>
4053
+ <xse:seeAlso ref="RegistrySearch" />
4054
+ </xs:appinfo>
4055
+ <xs:documentation>References an existing RegistrySearch element.</xs:documentation>
4056
+ </xs:annotation>
4057
+ <xs:complexType>
4058
+ <xs:attribute name="Id" type="xs:string" use="required">
4059
+ <xs:annotation>
4060
+ <xs:documentation>Specify the Id of the RegistrySearch to reference.</xs:documentation>
4061
+ </xs:annotation>
4062
+ </xs:attribute>
4063
+ </xs:complexType>
4064
+ </xs:element>
4065
+ <xs:element name="ComplianceDrive">
4066
+ <xs:annotation>
4067
+ <xs:documentation>Sets the parent of a nested DirectorySearch element to CCP_DRIVE.</xs:documentation>
4068
+ </xs:annotation>
4069
+ <xs:complexType>
4070
+ <xs:choice>
4071
+ <xs:element ref="DirectorySearch" />
4072
+ <xs:element ref="DirectorySearchRef" />
4073
+ </xs:choice>
4074
+ </xs:complexType>
4075
+ </xs:element>
4076
+ <xs:element name="ComplianceCheck">
4077
+ <xs:annotation>
4078
+ <xs:appinfo>
4079
+ <xse:seeAlso ref="Property" />
4080
+ <xse:msiRef table="CCPSearch" href="http://msdn.microsoft.com/library/aa367846.aspx" />
4081
+ <xse:msiRef table="Signature" href="http://msdn.microsoft.com/library/aa371853.aspx" />
4082
+ </xs:appinfo>
4083
+ <xs:documentation>Adds a row to the CCPSearch table.</xs:documentation>
4084
+ </xs:annotation>
4085
+ <xs:complexType>
4086
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
4087
+ <xs:sequence>
4088
+ <xs:element ref="ComplianceDrive" minOccurs="0">
4089
+ <xs:annotation>
4090
+ <xs:documentation>Starts searches from the CCP_DRIVE.</xs:documentation>
4091
+ </xs:annotation>
4092
+ </xs:element>
4093
+ <xs:element ref="ComponentSearch" minOccurs="0" maxOccurs="unbounded" />
4094
+ <xs:element ref="RegistrySearch" minOccurs="0" maxOccurs="unbounded" />
4095
+ <xs:element ref="IniFileSearch" minOccurs="0" maxOccurs="unbounded" />
4096
+ <xs:element ref="DirectorySearch" minOccurs="0" maxOccurs="unbounded" />
4097
+ </xs:sequence>
4098
+ <xs:any namespace="##other" processContents="lax">
4099
+ <xs:annotation>
4100
+ <xs:documentation>
4101
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4102
+ elements at this point in the schema.
4103
+ </xs:documentation>
4104
+ </xs:annotation>
4105
+ </xs:any>
4106
+ </xs:choice>
4107
+ <xs:anyAttribute namespace="##other" processContents="lax">
4108
+ <xs:annotation>
4109
+ <xs:documentation>
4110
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4111
+ attributes at this point in the schema.
4112
+ </xs:documentation>
4113
+ </xs:annotation>
4114
+ </xs:anyAttribute>
4115
+ </xs:complexType>
4116
+ </xs:element>
4117
+ <xs:element name="Property">
4118
+ <xs:annotation>
4119
+ <xs:appinfo>
4120
+ <xse:seeAlso ref="PropertyRef" />
4121
+ <xse:msiRef table="Property" href="http://msdn.microsoft.com/library/aa370908.aspx" />
4122
+ <xse:howtoRef href="files_and_registry/check_the_version_number.html">How To: Check the version number of a file during installation</xse:howtoRef>
4123
+ </xs:appinfo>
4124
+ <xs:documentation>Property value for a Product or Module.</xs:documentation>
4125
+ </xs:annotation>
4126
+ <xs:complexType mixed="true">
4127
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
4128
+ <xs:sequence>
4129
+ <xs:element ref="ComplianceDrive" minOccurs="0">
4130
+ <xs:annotation>
4131
+ <xs:documentation>Starts searches from the CCP_DRIVE.</xs:documentation>
4132
+ </xs:annotation>
4133
+ </xs:element>
4134
+ <xs:element ref="ComponentSearch" minOccurs="0" maxOccurs="unbounded" />
4135
+ <xs:element ref="RegistrySearch" minOccurs="0" maxOccurs="unbounded" />
4136
+ <xs:element ref="RegistrySearchRef" minOccurs="0" maxOccurs="unbounded" />
4137
+ <xs:element ref="IniFileSearch" minOccurs="0" maxOccurs="unbounded" />
4138
+ <xs:element ref="DirectorySearch" minOccurs="0" maxOccurs="unbounded" />
4139
+ <xs:element ref="DirectorySearchRef" minOccurs="0" maxOccurs="unbounded" />
4140
+ <xs:element ref="ProductSearch" minOccurs="0" maxOccurs="unbounded" />
4141
+ </xs:sequence>
4142
+ <xs:any namespace="##other" processContents="lax">
4143
+ <xs:annotation>
4144
+ <xs:documentation>
4145
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4146
+ elements at this point in the schema.
4147
+ </xs:documentation>
4148
+ </xs:annotation>
4149
+ </xs:any>
4150
+ </xs:choice>
4151
+ <xs:attribute name="Id" type="xs:string" use="required">
4152
+ <xs:annotation>
4153
+ <xs:documentation>Unique identifier for Property.</xs:documentation>
4154
+ </xs:annotation>
4155
+ </xs:attribute>
4156
+ <xs:attribute name="Value" type="xs:string">
4157
+ <xs:annotation>
4158
+ <xs:documentation>Sets a default value for the property. The value will be overwritten if the Property is used for a search.</xs:documentation>
4159
+ </xs:annotation>
4160
+ </xs:attribute>
4161
+ <xs:attribute name="ComplianceCheck" type="YesNoTypeUnion">
4162
+ <xs:annotation>
4163
+ <xs:documentation>Adds a row to the CCPSearch table. This attribute is only valid when this Property contains a search element.</xs:documentation>
4164
+ </xs:annotation>
4165
+ </xs:attribute>
4166
+ <xs:attribute name="Admin" type="YesNoTypeUnion">
4167
+ <xs:annotation>
4168
+ <xs:documentation>Denotes that the Property is saved during <html:a href="http://msdn.microsoft.com/library/aa367541.aspx" target="_blank">admininistrative installation</html:a>. See the <html:a href="http://msdn.microsoft.com/library/aa367542.aspx" target="_blank">AdminProperties Property</html:a> for more information.</xs:documentation>
4169
+ </xs:annotation>
4170
+ </xs:attribute>
4171
+ <xs:attribute name="Secure" type="YesNoTypeUnion">
4172
+ <xs:annotation>
4173
+ <xs:documentation>Denotes that the Property can be passed to the server side when doing a managed installation with elevated privileges. See the <html:a href="http://msdn.microsoft.com/library/aa371571.aspx" target="_blank">SecureCustomProperties Property</html:a> for more information.</xs:documentation>
4174
+ </xs:annotation>
4175
+ </xs:attribute>
4176
+ <xs:attribute name="Hidden" type="YesNoTypeUnion">
4177
+ <xs:annotation>
4178
+ <xs:documentation>Denotes that the Property is not logged during installation. See the <html:a href="http://msdn.microsoft.com/library/aa370308.aspx" target="_blank">MsiHiddenProperties Property</html:a> for more information.</xs:documentation>
4179
+ </xs:annotation>
4180
+ </xs:attribute>
4181
+ <xs:attribute name="SuppressModularization" type="YesNoTypeUnion">
4182
+ <xs:annotation>
4183
+ <xs:documentation>
4184
+ Use to suppress modularization of this property identifier in merge modules.
4185
+ Using this functionality is strongly discouraged; it should only be
4186
+ necessary as a workaround of last resort in rare scenarios.
4187
+ </xs:documentation>
4188
+ </xs:annotation>
4189
+ </xs:attribute>
4190
+ <xs:anyAttribute namespace="##other" processContents="lax">
4191
+ <xs:annotation>
4192
+ <xs:documentation>
4193
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4194
+ attributes at this point in the schema.
4195
+ </xs:documentation>
4196
+ </xs:annotation>
4197
+ </xs:anyAttribute>
4198
+ </xs:complexType>
4199
+ </xs:element>
4200
+ <xs:element name="PropertyRef">
4201
+ <xs:annotation>
4202
+ <xs:appinfo>
4203
+ <xse:seeAlso ref="Property" />
4204
+ <xse:howtoRef href="redistributables_and_install_checks/check_for_dotnet.html">How To: Check for .NET Framework versions</xse:howtoRef>
4205
+ </xs:appinfo>
4206
+ <xs:documentation>Reference to a Property value.</xs:documentation>
4207
+ </xs:annotation>
4208
+ <xs:complexType>
4209
+ <xs:attribute name="Id" type="xs:string" use="required">
4210
+ <xs:annotation>
4211
+ <xs:documentation>Identifier of Property to reference.</xs:documentation>
4212
+ </xs:annotation>
4213
+ </xs:attribute>
4214
+ <xs:anyAttribute namespace="##other" processContents="lax">
4215
+ <xs:annotation>
4216
+ <xs:documentation>
4217
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4218
+ attributes at this point in the schema.
4219
+ </xs:documentation>
4220
+ </xs:annotation>
4221
+ </xs:anyAttribute>
4222
+ </xs:complexType>
4223
+ </xs:element>
4224
+ <xs:element name="Shortcut">
4225
+ <xs:annotation>
4226
+ <xs:documentation>
4227
+ Shortcut, default target is parent File, CreateFolder, or Component's Directory
4228
+ </xs:documentation>
4229
+ <xs:appinfo>
4230
+ <xse:msiRef table="Shortcut" href="http://msdn.microsoft.com/library/aa371847.aspx" />
4231
+ <xse:howtoRef href="files_and_registry/create_start_menu_shortcut.html">How To: Create a shortcut on the Start Menu</xse:howtoRef>
4232
+ </xs:appinfo>
4233
+ </xs:annotation>
4234
+ <xs:complexType>
4235
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
4236
+ <xs:element ref="Icon" minOccurs="0" />
4237
+ <xs:element ref="ShortcutProperty" minOccurs="0" />
4238
+ </xs:choice>
4239
+ <xs:attribute name="Id" type="xs:string" use="required">
4240
+ <xs:annotation>
4241
+ <xs:documentation>Unique identifier for the shortcut. This value will serve as the primary key for the row.</xs:documentation>
4242
+ </xs:annotation>
4243
+ </xs:attribute>
4244
+ <xs:attribute name="Directory" type="xs:string">
4245
+ <xs:annotation>
4246
+ <xs:documentation>Identifier reference to Directory element where shortcut is to be created. When nested under a Component element, this attribute's value will default to the parent directory. Otherwise, this attribute is required.</xs:documentation>
4247
+ </xs:annotation>
4248
+ </xs:attribute>
4249
+ <xs:attribute name="Name" type="LongFileNameType" use="required">
4250
+ <xs:annotation>
4251
+ <xs:documentation>
4252
+ In prior versions of the WiX toolset, this attribute specified the short name.
4253
+ This attribute's value may now be either a short or long name.
4254
+ If a short name is specified, the ShortName attribute may not be specified.
4255
+ Also, if this value is a long name, the ShortName attribute may be omitted to
4256
+ allow WiX to attempt to generate a unique short name.
4257
+ However, if this name collides with another shortcut or you wish to manually specify
4258
+ the short name, then the ShortName attribute may be specified.
4259
+ </xs:documentation>
4260
+ </xs:annotation>
4261
+ </xs:attribute>
4262
+ <xs:attribute name="ShortName" type="ShortFileNameType">
4263
+ <xs:annotation>
4264
+ <xs:documentation>
4265
+ The short name of the shortcut in 8.3 format.
4266
+ This attribute should only be set if there is a conflict between generated short names
4267
+ or the user wants to manually specify the short name.
4268
+ </xs:documentation>
4269
+ </xs:annotation>
4270
+ </xs:attribute>
4271
+ <xs:attribute name="Target" type="xs:string">
4272
+ <xs:annotation>
4273
+ <xs:documentation>
4274
+ This attribute can only be set if this Shortcut element is nested under a Component element.
4275
+ When nested under a Component element, this attribute's value will default to the parent directory.
4276
+ This attribute's value is the target for a non-advertised shortcut.
4277
+ This attribute is not valid for advertised shortcuts.
4278
+ If you specify this value, its value should be a property identifier enclosed by square brackets ([ ]), that is expanded into the file or a folder pointed to by the shortcut.
4279
+ </xs:documentation>
4280
+ </xs:annotation>
4281
+ </xs:attribute>
4282
+ <xs:attribute name="Description" type="xs:string">
4283
+ <xs:annotation>
4284
+ <xs:documentation>The localizable description for the shortcut.</xs:documentation>
4285
+ </xs:annotation>
4286
+ </xs:attribute>
4287
+ <xs:attribute name="Arguments" type="xs:string">
4288
+ <xs:annotation>
4289
+ <xs:documentation>The command-line arguments for the shortcut. Note that the resolution of properties
4290
+ in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the
4291
+ property already has the intended value when the component owning the shortcut is installed. For example, for the
4292
+ argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and
4293
+ the component that owns the shortcut.</xs:documentation>
4294
+ </xs:annotation>
4295
+ </xs:attribute>
4296
+ <xs:attribute name="Hotkey" type="xs:integer">
4297
+ <xs:annotation>
4298
+ <xs:documentation>The hotkey for the shortcut. The low-order byte contains the virtual-key code for
4299
+ the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of
4300
+ installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a
4301
+ users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys
4302
+ for accessibility.</xs:documentation>
4303
+ </xs:annotation>
4304
+ </xs:attribute>
4305
+ <xs:attribute name="Icon" type="xs:string">
4306
+ <xs:annotation>
4307
+ <xs:documentation>Identifier reference to Icon element. The Icon identifier should have the same extension
4308
+ as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier
4309
+ like "MyIcon.exe"</xs:documentation>
4310
+ </xs:annotation>
4311
+ </xs:attribute>
4312
+ <xs:attribute name="IconIndex" type="xs:integer">
4313
+ <xs:annotation>
4314
+ <xs:documentation>Identifier reference to Icon element.</xs:documentation>
4315
+ </xs:annotation>
4316
+ </xs:attribute>
4317
+ <xs:attribute name="Show">
4318
+ <xs:simpleType>
4319
+ <xs:restriction base="xs:NMTOKEN">
4320
+ <xs:enumeration value="normal">
4321
+ <xs:annotation>
4322
+ <xs:documentation>
4323
+ The shortcut target will be displayed using the SW_SHOWNORMAL attribute.
4324
+ </xs:documentation>
4325
+ </xs:annotation>
4326
+ </xs:enumeration>
4327
+ <xs:enumeration value="minimized">
4328
+ <xs:annotation>
4329
+ <xs:documentation>
4330
+ The shortcut target will be displayed using the SW_SHOWMINNOACTIVE attribute.
4331
+ </xs:documentation>
4332
+ </xs:annotation>
4333
+ </xs:enumeration>
4334
+ <xs:enumeration value="maximized">
4335
+ <xs:annotation>
4336
+ <xs:documentation>
4337
+ The shortcut target will be displayed using the SW_SHOWMAXIMIZED attribute.
4338
+ </xs:documentation>
4339
+ </xs:annotation>
4340
+ </xs:enumeration>
4341
+ </xs:restriction>
4342
+ </xs:simpleType>
4343
+ </xs:attribute>
4344
+ <xs:attribute name="WorkingDirectory" type="xs:string">
4345
+ <xs:annotation>
4346
+ <xs:documentation>Directory identifier (or Property identifier that resolves to a directory) that resolves
4347
+ to the path of the working directory for the shortcut.</xs:documentation>
4348
+ </xs:annotation>
4349
+ </xs:attribute>
4350
+ <xs:attribute name="Advertise" type="YesNoTypeUnion">
4351
+ <xs:annotation>
4352
+ <xs:documentation>Specifies if the shortcut should be advertised or not. Note that advertised shortcuts
4353
+ always point at a particular application, identified by a ProductCode, and should not be shared between applications.
4354
+ Advertised shortcuts only work for the most recently installed application, and are removed when that application is
4355
+ removed. The default value is 'no'.</xs:documentation>
4356
+ </xs:annotation>
4357
+ </xs:attribute>
4358
+ <xs:attribute name="DisplayResourceDll" type="xs:string">
4359
+ <xs:annotation>
4360
+ <xs:documentation>
4361
+ The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally
4362
+ authored using [#filekey] form. When this attribute is specified, the DisplayResourceId attribute must also
4363
+ be provided.
4364
+
4365
+ This attribute is only used on Windows Vista and above. If this attribute is not populated and the install
4366
+ is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and
4367
+ the install is running on Vista and above, the value in the Name attribute is ignored.
4368
+ </xs:documentation>
4369
+ </xs:annotation>
4370
+ </xs:attribute>
4371
+ <xs:attribute name="DisplayResourceId" type="xs:integer">
4372
+ <xs:annotation>
4373
+ <xs:documentation>
4374
+ The display name index for the shortcut. This must be a non-negative number. When this attribute is specified, the
4375
+ DisplayResourceDll attribute must also be provided.
4376
+
4377
+ This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
4378
+ is running on Vista and above, the value in the Name attribute is used. If this attribute is specified and
4379
+ the install is running on Vista and above, the value in the Name attribute is ignored.
4380
+ </xs:documentation>
4381
+ </xs:annotation>
4382
+ </xs:attribute>
4383
+ <xs:attribute name="DescriptionResourceDll" type="xs:string">
4384
+ <xs:annotation>
4385
+ <xs:documentation>
4386
+ The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally
4387
+ authored using [#filekey] form. When this attribute is specified, the DescriptionResourceId attribute must also
4388
+ be provided.
4389
+
4390
+ This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
4391
+ is running on Vista and above, the value in the Name attribute is used. If this attribute is provided and
4392
+ the install is running on Vista and above, the value in the Name attribute is ignored.
4393
+ </xs:documentation>
4394
+ </xs:annotation>
4395
+ </xs:attribute>
4396
+ <xs:attribute name="DescriptionResourceId" type="xs:integer">
4397
+ <xs:annotation>
4398
+ <xs:documentation>
4399
+ The description name index for the shortcut. This must be a non-negative number. When this attribute is specified,
4400
+ the DescriptionResourceDll attribute must also be populated.
4401
+
4402
+ This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
4403
+ is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the
4404
+ install is running on Vista and above, the value in the Name attribute is ignored.
4405
+ </xs:documentation>
4406
+ </xs:annotation>
4407
+ </xs:attribute>
4408
+ </xs:complexType>
4409
+ </xs:element>
4410
+ <xs:element name="ShortcutProperty">
4411
+ <xs:annotation>
4412
+ <xs:appinfo>
4413
+ <xse:seeAlso ref="Shortcut" />
4414
+ <xse:msiRef table="MsiShortcutProperty" />
4415
+ </xs:appinfo>
4416
+ <xs:documentation>Property values for a shortcut. This element's functionality is available starting with MSI 5.0.</xs:documentation>
4417
+ </xs:annotation>
4418
+ <xs:complexType mixed="true">
4419
+ <xs:attribute name="Id" type="xs:string">
4420
+ <xs:annotation>
4421
+ <xs:documentation>Unique identifier for MsiShortcutProperty table. If omitted, a stable identifier will be generated from the parent shortcut identifier and Key value.</xs:documentation>
4422
+ </xs:annotation>
4423
+ </xs:attribute>
4424
+ <xs:attribute name="Key" type="xs:string" use="required">
4425
+ <xs:annotation>
4426
+ <xs:documentation>A formatted string identifying the property to be set.</xs:documentation>
4427
+ </xs:annotation>
4428
+ </xs:attribute>
4429
+ <xs:attribute name="Value" type="xs:string">
4430
+ <xs:annotation>
4431
+ <xs:documentation>A formatted string supplying the value of the property.</xs:documentation>
4432
+ </xs:annotation>
4433
+ </xs:attribute>
4434
+ </xs:complexType>
4435
+ </xs:element>
4436
+ <xs:element name="Permission">
4437
+ <xs:annotation>
4438
+ <xs:documentation>
4439
+ Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used
4440
+ if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute.
4441
+ The table and key are taken from the parent element.
4442
+ </xs:documentation>
4443
+ <xs:appinfo>
4444
+ <xse:msiRef table="LockPermissions" href="http://msdn.microsoft.com/library/aa369774.aspx" />
4445
+ </xs:appinfo>
4446
+ </xs:annotation>
4447
+ <xs:complexType>
4448
+ <xs:attribute name="Domain" type="xs:string"></xs:attribute>
4449
+ <xs:attribute name="User" use="required" type="xs:string"></xs:attribute>
4450
+ <!-- Common ACLs -->
4451
+ <xs:attribute name="Read" type="YesNoTypeUnion"></xs:attribute>
4452
+ <xs:attribute name="Delete" type="YesNoTypeUnion"></xs:attribute>
4453
+ <xs:attribute name="ReadPermission" type="YesNoTypeUnion"></xs:attribute>
4454
+ <xs:attribute name="ChangePermission" type="YesNoTypeUnion"></xs:attribute>
4455
+ <xs:attribute name="TakeOwnership" type="YesNoTypeUnion"></xs:attribute>
4456
+ <xs:attribute name="SpecificRightsAll" type="YesNoTypeUnion">
4457
+ <xs:annotation>
4458
+ <xs:documentation>Bit mask for SPECIFIC_RIGHTS_ALL from WinNT.h (0x0000FFFF).</xs:documentation>
4459
+ </xs:annotation>
4460
+ </xs:attribute>
4461
+ <!-- Folder and File ACLs -->
4462
+ <xs:attribute name="ReadAttributes" type="YesNoTypeUnion"></xs:attribute>
4463
+ <xs:attribute name="WriteAttributes" type="YesNoTypeUnion"></xs:attribute>
4464
+ <xs:attribute name="ReadExtendedAttributes" type="YesNoTypeUnion"></xs:attribute>
4465
+ <xs:attribute name="WriteExtendedAttributes" type="YesNoTypeUnion"></xs:attribute>
4466
+ <xs:attribute name="Synchronize" type="YesNoTypeUnion"></xs:attribute>
4467
+ <!-- Folder only ACLs -->
4468
+ <xs:attribute name="CreateFile" type="YesNoTypeUnion">
4469
+ <xs:annotation>
4470
+ <xs:documentation>For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.</xs:documentation>
4471
+ </xs:annotation>
4472
+ </xs:attribute>
4473
+ <xs:attribute name="CreateChild" type="YesNoTypeUnion">
4474
+ <xs:annotation>
4475
+ <xs:documentation>For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.</xs:documentation>
4476
+ </xs:annotation>
4477
+ </xs:attribute>
4478
+ <xs:attribute name="DeleteChild" type="YesNoTypeUnion">
4479
+ <xs:annotation>
4480
+ <xs:documentation>For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent.</xs:documentation>
4481
+ </xs:annotation>
4482
+ </xs:attribute>
4483
+ <xs:attribute name="Traverse" type="YesNoTypeUnion">
4484
+ <xs:annotation>
4485
+ <xs:documentation>For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent.</xs:documentation>
4486
+ </xs:annotation>
4487
+ </xs:attribute>
4488
+ <!-- File only ACLs -->
4489
+ <xs:attribute name="Append" type="YesNoTypeUnion"></xs:attribute>
4490
+ <xs:attribute name="Execute" type="YesNoTypeUnion"></xs:attribute>
4491
+ <xs:attribute name="FileAllRights" type="YesNoTypeUnion">
4492
+ <xs:annotation>
4493
+ <xs:documentation>Bit mask for FILE_ALL_ACCESS from WinNT.h (0x001F01FF).</xs:documentation>
4494
+ </xs:annotation>
4495
+ </xs:attribute>
4496
+ <!-- File and Registry ACLs -->
4497
+ <xs:attribute name="Write" type="YesNoTypeUnion"></xs:attribute>
4498
+ <!-- Registry only ACLs -->
4499
+ <xs:attribute name="CreateSubkeys" type="YesNoTypeUnion"></xs:attribute>
4500
+ <xs:attribute name="EnumerateSubkeys" type="YesNoTypeUnion"></xs:attribute>
4501
+ <xs:attribute name="Notify" type="YesNoTypeUnion"></xs:attribute>
4502
+ <xs:attribute name="CreateLink" type="YesNoTypeUnion"></xs:attribute>
4503
+ <!-- Generic ACLs, mapped by system to appropriate permissions -->
4504
+ <xs:attribute name="GenericAll" type="YesNoTypeUnion"></xs:attribute>
4505
+ <xs:attribute name="GenericExecute" type="YesNoTypeUnion"></xs:attribute>
4506
+ <xs:attribute name="GenericWrite" type="YesNoTypeUnion"></xs:attribute>
4507
+ <xs:attribute name="GenericRead" type="YesNoTypeUnion">
4508
+ <xs:annotation>
4509
+ <xs:documentation>specifying this will fail to grant read access</xs:documentation>
4510
+ </xs:annotation>
4511
+ </xs:attribute>
4512
+ </xs:complexType>
4513
+ </xs:element>
4514
+ <xs:element name="PermissionEx">
4515
+ <xs:annotation>
4516
+ <xs:documentation>
4517
+ Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used
4518
+ if the Action attribute's value is remove or removeKeyOnInstall. This element is only available
4519
+ when installing with MSI 5.0. For downlevel support, see the PermissionEx element from the
4520
+ WixUtilExtension.
4521
+ </xs:documentation>
4522
+ <xs:appinfo>
4523
+ <xse:msiRef table="MsiLockPermissionsEx" href="http://msdn.microsoft.com/library/aa369774.aspx" />
4524
+ </xs:appinfo>
4525
+ </xs:annotation>
4526
+ <xs:complexType>
4527
+ <xs:sequence>
4528
+ <xs:element ref="Condition" minOccurs="0">
4529
+ <xs:annotation>
4530
+ <xs:documentation>
4531
+ Optional condition that controls whether the permissions are applied.
4532
+ </xs:documentation>
4533
+ </xs:annotation>
4534
+ </xs:element>
4535
+ </xs:sequence>
4536
+ <xs:attribute name="Id" type="xs:string">
4537
+ <xs:annotation>
4538
+ <xs:documentation>
4539
+ Primary key used to identify this particular entry. If this is not specified the parent element's Id attribute
4540
+ will be used instead.
4541
+ </xs:documentation>
4542
+ </xs:annotation>
4543
+ </xs:attribute>
4544
+ <xs:attribute name="Sddl" type="xs:string" use="required">
4545
+ <xs:annotation>
4546
+ <xs:documentation>
4547
+ Security descriptor to apply to parent object.
4548
+ </xs:documentation>
4549
+ </xs:annotation>
4550
+ </xs:attribute>
4551
+ </xs:complexType>
4552
+ </xs:element>
4553
+ <xs:element name="CopyFile">
4554
+ <xs:annotation>
4555
+ <xs:appinfo>
4556
+ <xse:seeAlso ref="RemoveFile" />
4557
+ <xse:msiRef table="DuplicateFile" href="http://msdn.microsoft.com/library/aa368335.aspx" />
4558
+ <xse:msiRef table="MoveFile" href="http://msdn.microsoft.com/library/aa370055.aspx" />
4559
+ </xs:appinfo>
4560
+ <xs:documentation>
4561
+ Copy or move an existing file on the target machine, or copy a file that is being installed, to another destination. When
4562
+ this element is nested under a File element, the parent file will be installed, then copied to the specified destination
4563
+ if the parent component of the file is selected for installation or removal. When this element is nested under
4564
+ a Component element and no FileId attribute is specified, the file to copy or move must already be on the target machine.
4565
+ When this element is nested under a Component element and the FileId attribute is specified, the specified file is installed,
4566
+ then copied to the specified destination if the parent component is selected for installation or removal (use
4567
+ this option to control the copy of a file in a different component by the parent component's installation state). If the
4568
+ specified destination directory is the same as the directory containing the original file and the name for the proposed source
4569
+ file is the same as the original, then no action takes place.
4570
+ </xs:documentation>
4571
+ </xs:annotation>
4572
+ <xs:complexType>
4573
+ <xs:attribute name="Id" type="xs:string" use="required">
4574
+ <xs:annotation>
4575
+ <xs:documentation>Primary key used to identify this particular entry.</xs:documentation>
4576
+ </xs:annotation>
4577
+ </xs:attribute>
4578
+ <xs:attribute name="FileId" type="xs:string">
4579
+ <xs:annotation>
4580
+ <xs:documentation>
4581
+ This attribute cannot be specified if the element is nested under a File element. Set this attribute's value to the identifier
4582
+ of a file from a different component to copy it based on the install state of the parent component.
4583
+ </xs:documentation>
4584
+ </xs:annotation>
4585
+ </xs:attribute>
4586
+ <xs:attribute name="SourceDirectory" type="xs:string">
4587
+ <xs:annotation>
4588
+ <xs:documentation>
4589
+ This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
4590
+ this value to the source directory from which to copy or move an existing file on the target machine. This Directory must
4591
+ exist in the installer database at creation time. This attribute cannot be specified in conjunction with SourceProperty.
4592
+ </xs:documentation>
4593
+ </xs:annotation>
4594
+ </xs:attribute>
4595
+ <xs:attribute name="SourceProperty" type="xs:string">
4596
+ <xs:annotation>
4597
+ <xs:documentation>
4598
+ This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
4599
+ this value to a property that will have a value that resolves to the full path of the source directory (or full path
4600
+ including file name if SourceName is not specified). The property does not have to exist in the installer database at
4601
+ creation time; it could be created at installation time by a custom action, on the command line, etc. This attribute
4602
+ cannot be specified in conjunction with SourceDirectory.
4603
+ </xs:documentation>
4604
+ </xs:annotation>
4605
+ </xs:attribute>
4606
+ <xs:attribute name="SourceName" type="WildCardLongFileNameType">
4607
+ <xs:annotation>
4608
+ <xs:documentation>
4609
+ This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
4610
+ this value to the localizable name of the file(s) to be copied or moved. All of the files that
4611
+ match the wild card will be removed from the specified directory. The value is a filename that may also
4612
+ contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. If this
4613
+ attribute is not specified (and this element is not nested under a File element or specify a FileId attribute) then the
4614
+ SourceProperty attribute should be set to the name of a property that will resolve to the full path of the source filename.
4615
+ If the value of this attribute contains a "*" wildcard and the DestinationName attribute is specified, all moved or copied
4616
+ files retain the file names from their sources.
4617
+ </xs:documentation>
4618
+ </xs:annotation>
4619
+ </xs:attribute>
4620
+ <xs:attribute name="DestinationDirectory" type="xs:string">
4621
+ <xs:annotation>
4622
+ <xs:documentation>
4623
+ Set this value to the destination directory where an existing file on the target machine should be moved or copied to. This
4624
+ Directory must exist in the installer database at creation time. This attribute cannot be specified in conjunction with
4625
+ DestinationProperty.
4626
+ </xs:documentation>
4627
+ </xs:annotation>
4628
+ </xs:attribute>
4629
+ <xs:attribute name="DestinationProperty" type="xs:string">
4630
+ <xs:annotation>
4631
+ <xs:documentation>
4632
+ Set this value to a property that will have a value that resolves to the full path of the destination directory. The property
4633
+ does not have to exist in the installer database at creation time; it could be created at installation time by a custom
4634
+ action, on the command line, etc. This attribute cannot be specified in conjunction with DestinationDirectory.
4635
+ </xs:documentation>
4636
+ </xs:annotation>
4637
+ </xs:attribute>
4638
+ <xs:attribute name="DestinationName" type="LongFileNameType">
4639
+ <xs:annotation>
4640
+ <xs:documentation>
4641
+ In prior versions of the WiX toolset, this attribute specified the short file name.
4642
+ Now set this value to the localizable name to be given to the original file after it is moved or copied.
4643
+ If this attribute is not specified, then the destination file is given the same name as the source file.
4644
+ If a short file name is specified, the DestinationShortName attribute may not be specified.
4645
+ Also, if this value is a long file name, the DestinationShortName attribute may be omitted to
4646
+ allow WiX to attempt to generate a unique short file name.
4647
+ However, if this name collides with another file or you wish to manually specify
4648
+ the short file name, then the DestinationShortName attribute may be specified.
4649
+ </xs:documentation>
4650
+ </xs:annotation>
4651
+ </xs:attribute>
4652
+ <xs:attribute name="DestinationShortName" type="ShortFileNameType">
4653
+ <xs:annotation>
4654
+ <xs:documentation>
4655
+ The short file name of the file in 8.3 format.
4656
+ This attribute should only be set if there is a conflict between generated short file names
4657
+ or you wish to manually specify the short file name.
4658
+ </xs:documentation>
4659
+ </xs:annotation>
4660
+ </xs:attribute>
4661
+ <xs:attribute name="Delete" type="YesNoTypeUnion">
4662
+ <xs:annotation>
4663
+ <xs:documentation>
4664
+ This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. In other
4665
+ cases, if the attribute is not specified, the default value is "no" and the file is copied, not moved. Set the value to "yes"
4666
+ in order to move the file (thus deleting the source file) instead of copying it.
4667
+ </xs:documentation>
4668
+ </xs:annotation>
4669
+ </xs:attribute>
4670
+ </xs:complexType>
4671
+ </xs:element>
4672
+ <xs:element name="File">
4673
+ <xs:annotation>
4674
+ <xs:documentation>
4675
+ File specification for File table, must be child node of Component.
4676
+ </xs:documentation>
4677
+ <xs:appinfo>
4678
+ <xse:msiRef table="File" href="http://msdn.microsoft.com/library/aa368596.aspx" />
4679
+ <xse:howtoRef href="files_and_registry/add_a_file.html">How To: Add a file to your installer</xse:howtoRef>
4680
+ </xs:appinfo>
4681
+ </xs:annotation>
4682
+ <xs:complexType>
4683
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
4684
+ <xs:element ref="AssemblyName" />
4685
+ <xs:element ref="Permission">
4686
+ <xs:annotation>
4687
+ <xs:documentation>Used to configure the ACLs for this file.</xs:documentation>
4688
+ </xs:annotation>
4689
+ </xs:element>
4690
+ <xs:element ref="PermissionEx">
4691
+ <xs:annotation>
4692
+ <xs:documentation>Can also configure the ACLs for this file.</xs:documentation>
4693
+ </xs:annotation>
4694
+ </xs:element>
4695
+ <xs:element ref="CopyFile">
4696
+ <xs:annotation>
4697
+ <xs:documentation>Used to create a duplicate of this file elsewhere.</xs:documentation>
4698
+ </xs:annotation>
4699
+ </xs:element>
4700
+ <xs:element ref="Shortcut">
4701
+ <xs:annotation>
4702
+ <xs:documentation>Target of the shortcut will be set to this file.</xs:documentation>
4703
+ </xs:annotation>
4704
+ </xs:element>
4705
+ <xs:element ref="ODBCDriver" />
4706
+ <xs:element ref="ODBCTranslator" />
4707
+ <xs:element ref="SymbolPath" />
4708
+ <xs:element ref="Class" />
4709
+ <xs:element ref="AppId" />
4710
+ <xs:element ref="TypeLib" />
4711
+ <xs:any namespace="##other" processContents="lax">
4712
+ <xs:annotation>
4713
+ <xs:documentation>
4714
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4715
+ elements at this point in the schema.
4716
+ </xs:documentation>
4717
+ </xs:annotation>
4718
+ </xs:any>
4719
+ </xs:choice>
4720
+ <xs:attribute name="Id" type="xs:string">
4721
+ <xs:annotation>
4722
+ <xs:documentation>
4723
+ The unique identifier for this File element. If you omit Id, it defaults to the file name portion of the Source attribute, if specified. May be referenced as a Property by specifying [#value].
4724
+ </xs:documentation>
4725
+ </xs:annotation>
4726
+ </xs:attribute>
4727
+ <xs:attribute name="CompanionFile" type="xs:string">
4728
+ <xs:annotation>
4729
+ <xs:documentation>Set this attribute to make this file a companion child of another file. The installation
4730
+ state of a companion file depends not on its own file versioning information, but on the versioning of its
4731
+ companion parent. A file that is the key path for its component can not be a companion file (that means
4732
+ this attribute cannot be set if KeyPath="yes" for this file). The Version attribute cannot be set along
4733
+ with this attribute since companion files are not installed based on their own version.</xs:documentation>
4734
+ </xs:annotation>
4735
+ </xs:attribute>
4736
+ <xs:attribute name="Name" type="LongFileNameType">
4737
+ <xs:annotation>
4738
+ <xs:documentation>
4739
+ In prior versions of the WiX toolset, this attribute specified the short file name.
4740
+ This attribute's value may now be either a short or long file name.
4741
+ If a short file name is specified, the ShortName attribute may not be specified.
4742
+ Also, if this value is a long file name, the ShortName attribute may be omitted to
4743
+ allow WiX to attempt to generate a unique short file name.
4744
+ However, if this name collides with another file or you wish to manually specify
4745
+ the short file name, then the ShortName attribute may be specified.
4746
+ Finally, if this attribute is omitted then its default value is the file name portion
4747
+ of the Source attribute, if one is specified, or the value of the Id attribute, if
4748
+ the Source attribute is omitted or doesn't contain a file name.
4749
+ </xs:documentation>
4750
+ </xs:annotation>
4751
+ </xs:attribute>
4752
+ <xs:attribute name="KeyPath" type="YesNoTypeUnion">
4753
+ <xs:annotation>
4754
+ <xs:documentation>Set to yes in order to force this file to be the key path for the parent component.</xs:documentation>
4755
+ </xs:annotation>
4756
+ </xs:attribute>
4757
+ <xs:attribute name="ShortName" type="ShortFileNameType">
4758
+ <xs:annotation>
4759
+ <xs:documentation>
4760
+ The short file name of the file in 8.3 format.
4761
+ This attribute should only be set if there is a conflict between generated short file names
4762
+ or the user wants to manually specify the short file name.
4763
+ </xs:documentation>
4764
+ </xs:annotation>
4765
+ </xs:attribute>
4766
+ <!-- 'Attributes' column integer value generated from XML attributes below -->
4767
+ <xs:attribute name="ReadOnly" type="YesNoTypeUnion">
4768
+ <xs:annotation>
4769
+ <xs:documentation>Set to yes in order to have the file's read-only attribute set when it is installed on the target machine.</xs:documentation>
4770
+ </xs:annotation>
4771
+ </xs:attribute>
4772
+ <xs:attribute name="Hidden" type="YesNoTypeUnion">
4773
+ <xs:annotation>
4774
+ <xs:documentation>Set to yes in order to have the file's hidden attribute set when it is installed on the target machine.</xs:documentation>
4775
+ </xs:annotation>
4776
+ </xs:attribute>
4777
+ <xs:attribute name="System" type="YesNoTypeUnion">
4778
+ <xs:annotation>
4779
+ <xs:documentation>Set to yes in order to have the file's system attribute set when it is installed on the target machine.</xs:documentation>
4780
+ </xs:annotation>
4781
+ </xs:attribute>
4782
+ <xs:attribute name="Vital" type="YesNoTypeUnion">
4783
+ <xs:annotation>
4784
+ <xs:documentation>If a file is vital, then installation cannot proceed unless the file is successfully installed. The user will have no option to ignore an error installing this file. If an error occurs, they can merely retry to install the file or abort the installation. The default is "yes," unless the -sfdvital switch (candle.exe) or SuppressFileDefaultVital property (.wixproj) is used.</xs:documentation>
4785
+ </xs:annotation>
4786
+ </xs:attribute>
4787
+ <xs:attribute name="Checksum" type="YesNoTypeUnion">
4788
+ <xs:annotation>
4789
+ <xs:documentation>This attribute should be set to "yes" for every executable file in the installation that has a valid checksum stored in the Portable Executable (PE) file header. Only those files that have this attribute set will be verified for valid checksum during a reinstall.</xs:documentation>
4790
+ </xs:annotation>
4791
+ </xs:attribute>
4792
+ <xs:attribute name="Compressed" type="YesNoDefaultTypeUnion">
4793
+ <xs:annotation>
4794
+ <xs:documentation>Sets the file's source type compression. A setting of "yes" or "no" will override the setting in the Word Count Summary Property.</xs:documentation>
4795
+ </xs:annotation>
4796
+ </xs:attribute>
4797
+ <xs:attribute name="BindPath" type="xs:string">
4798
+ <xs:annotation>
4799
+ <xs:documentation>A list of paths, separated by semicolons, that represent the paths to be searched to find the imported DLLs. The list is usually a list of properties, with each property enclosed inside square brackets. The value may be set to an empty string. Including this attribute will cause an entry to be generated for the file in the BindImage table.</xs:documentation>
4800
+ </xs:annotation>
4801
+ </xs:attribute>
4802
+ <xs:attribute name="SelfRegCost" type="xs:integer">
4803
+ <xs:annotation>
4804
+ <xs:documentation>The cost of registering the file in bytes. This must be a non-negative number. Including this attribute will cause an entry to be generated for the file in the SelfReg table.</xs:documentation>
4805
+ </xs:annotation>
4806
+ </xs:attribute>
4807
+ <xs:attribute name="TrueType" type="YesNoTypeUnion">
4808
+ <xs:annotation>
4809
+ <xs:documentation>Causes an entry to be generated for the file in the Font table with no FontTitle specified. This attribute is intended to be used to register the file as a TrueType font.</xs:documentation>
4810
+ </xs:annotation>
4811
+ </xs:attribute>
4812
+ <xs:attribute name="FontTitle" type="xs:string">
4813
+ <xs:annotation>
4814
+ <xs:documentation>Causes an entry to be generated for the file in the Font table with the specified FontTitle. This attribute is intended to be used to register the file as a non-TrueType font.</xs:documentation>
4815
+ </xs:annotation>
4816
+ </xs:attribute>
4817
+ <xs:attribute name="DefaultLanguage" type="xs:string">
4818
+ <xs:annotation>
4819
+ <xs:documentation>This is the default language of this file. The linker will replace this value from the value in the file if the suppress files option is not used.</xs:documentation>
4820
+ </xs:annotation>
4821
+ </xs:attribute>
4822
+ <xs:attribute name="DefaultSize" type="xs:integer">
4823
+ <xs:annotation>
4824
+ <xs:documentation>This is the default size of this file. The linker will replace this value from the value in the file if the suppress files option is not used.</xs:documentation>
4825
+ </xs:annotation>
4826
+ </xs:attribute>
4827
+ <xs:attribute name="DefaultVersion" type="xs:string">
4828
+ <xs:annotation>
4829
+ <xs:documentation>This is the default version of this file. The linker will replace this value from the value in the file if the suppress files option is not used.</xs:documentation>
4830
+ </xs:annotation>
4831
+ </xs:attribute>
4832
+ <!-- assembly information -->
4833
+ <xs:attribute name="Assembly">
4834
+ <xs:annotation>
4835
+ <xs:documentation>
4836
+ Specifies if this File is a Win32 Assembly or .NET Assembly that needs to be installed into the
4837
+ Global Assembly Cache (GAC). If the value is '.net' or 'win32', this file must also be the key path of the Component.
4838
+ </xs:documentation>
4839
+ </xs:annotation>
4840
+ <xs:simpleType>
4841
+ <xs:restriction base="xs:NMTOKEN">
4842
+ <xs:enumeration value=".net">
4843
+ <xs:annotation>
4844
+ <xs:documentation>
4845
+ The file is a .NET Framework assembly.
4846
+ </xs:documentation>
4847
+ </xs:annotation>
4848
+ </xs:enumeration>
4849
+ <xs:enumeration value="no">
4850
+ <xs:annotation>
4851
+ <xs:documentation>
4852
+ The file is not a .NET Framework or Win32 assembly. This is the default value.
4853
+ </xs:documentation>
4854
+ </xs:annotation>
4855
+ </xs:enumeration>
4856
+ <xs:enumeration value="win32">
4857
+ <xs:annotation>
4858
+ <xs:documentation>
4859
+ The file is a Win32 assembly.
4860
+ </xs:documentation>
4861
+ </xs:annotation>
4862
+ </xs:enumeration>
4863
+ </xs:restriction>
4864
+ </xs:simpleType>
4865
+ </xs:attribute>
4866
+ <xs:attribute name="AssemblyManifest" type="xs:string">
4867
+ <xs:annotation>
4868
+ <xs:documentation>
4869
+ Specifies the file identifier of the manifest file that describes this assembly.
4870
+ The manifest file should be in the same component as the assembly it describes.
4871
+ This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.
4872
+ </xs:documentation>
4873
+ </xs:annotation>
4874
+ </xs:attribute>
4875
+ <xs:attribute name="AssemblyApplication" type="xs:string">
4876
+ <xs:annotation>
4877
+ <xs:documentation>
4878
+ Specifies the file identifier of the application file. This assembly will be isolated
4879
+ to the same directory as the application file.
4880
+ If this attribute is absent, the assembly will be installed to the Global Assembly Cache (GAC).
4881
+ This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.
4882
+ </xs:documentation>
4883
+ </xs:annotation>
4884
+ </xs:attribute>
4885
+ <xs:attribute name="ProcessorArchitecture">
4886
+ <xs:annotation>
4887
+ <xs:documentation>Specifies the architecture for this assembly. This attribute should only be used on .NET Framework 2.0 or higher assemblies.</xs:documentation>
4888
+ </xs:annotation>
4889
+ <xs:simpleType>
4890
+ <xs:restriction base="xs:NMTOKEN">
4891
+ <xs:enumeration value="msil">
4892
+ <xs:annotation>
4893
+ <xs:documentation>
4894
+ The file is a .NET Framework assembly that is processor-neutral.
4895
+ </xs:documentation>
4896
+ </xs:annotation>
4897
+ </xs:enumeration>
4898
+ <xs:enumeration value="x86">
4899
+ <xs:annotation>
4900
+ <xs:documentation>
4901
+ The file is a .NET Framework assembly for the x86 processor.
4902
+ </xs:documentation>
4903
+ </xs:annotation>
4904
+ </xs:enumeration>
4905
+ <xs:enumeration value="x64">
4906
+ <xs:annotation>
4907
+ <xs:documentation>
4908
+ The file is a .NET Framework assembly for the x64 processor.
4909
+ </xs:documentation>
4910
+ </xs:annotation>
4911
+ </xs:enumeration>
4912
+ <xs:enumeration value="ia64">
4913
+ <xs:annotation>
4914
+ <xs:documentation>
4915
+ The file is a .NET Framework assembly for the ia64 processor.
4916
+ </xs:documentation>
4917
+ </xs:annotation>
4918
+ </xs:enumeration>
4919
+ </xs:restriction>
4920
+ </xs:simpleType>
4921
+ </xs:attribute>
4922
+ <xs:attribute name="DiskId" type="DiskIdType">
4923
+ <xs:annotation>
4924
+ <xs:documentation>
4925
+ The value of this attribute should correspond to the Id attribute of a Media
4926
+ element authored elsewhere. By creating this connection between a file and
4927
+ its media, you set the packaging options to the values specified in the Media
4928
+ element (values such as compression level, cab embedding, etc...). Specifying
4929
+ the DiskId attribute on the File element overrides the default DiskId attribute
4930
+ from the parent Component element. If no DiskId attribute is specified,
4931
+ the default is "1". This DiskId attribute is ignored when creating a merge module
4932
+ because merge modules do not have media.
4933
+ </xs:documentation>
4934
+ </xs:annotation>
4935
+ </xs:attribute>
4936
+ <xs:attribute name="Source" type="xs:string">
4937
+ <xs:annotation>
4938
+ <xs:documentation>Specifies the path to the File in the build process. Overrides default source path set by parent directories and Name attribute. This attribute must be set if no source information can be gathered from parent directories. For more information, see <html:a href="~/howtos/general/specifying_source_files.html">Specifying source files</html:a>.</xs:documentation>
4939
+ </xs:annotation>
4940
+ </xs:attribute>
4941
+ <xs:attribute name="src" type="xs:string">
4942
+ <xs:annotation>
4943
+ <xs:appinfo>
4944
+ <xse:deprecated ref="Source" />
4945
+ </xs:appinfo>
4946
+ </xs:annotation>
4947
+ </xs:attribute>
4948
+ <xs:attribute name="PatchGroup" type="xs:integer">
4949
+ <xs:annotation>
4950
+ <xs:documentation>
4951
+ This attribute must be set for patch-added files. Each patch should be assigned a different patch group number. Patch groups
4952
+ numbers must be greater 0 and should be assigned consecutively. For example, the first patch should use PatchGroup='1', the
4953
+ second patch will have PatchGroup='2', etc...
4954
+ </xs:documentation>
4955
+ </xs:annotation>
4956
+ </xs:attribute>
4957
+ <xs:attribute name="PatchIgnore" type="YesNoTypeUnion">
4958
+ <xs:annotation>
4959
+ <xs:documentation>Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.</xs:documentation>
4960
+ </xs:annotation>
4961
+ </xs:attribute>
4962
+ <xs:attribute name="PatchAllowIgnoreOnError" type="YesNoTypeUnion">
4963
+ <xs:annotation>
4964
+ <xs:documentation>Set to indicate that the patch is non-vital.</xs:documentation>
4965
+ </xs:annotation>
4966
+ </xs:attribute>
4967
+ <xs:attribute name="PatchWholeFile" type="YesNoTypeUnion">
4968
+ <xs:annotation>
4969
+ <xs:documentation>Set if the entire file should be installed rather than creating a binary patch.</xs:documentation>
4970
+ </xs:annotation>
4971
+ </xs:attribute>
4972
+ <xs:anyAttribute namespace="##other" processContents="lax">
4973
+ <xs:annotation>
4974
+ <xs:documentation>
4975
+ Extensibility point in the WiX XML Schema. Schema extensions can register additional
4976
+ attributes at this point in the schema.
4977
+ </xs:documentation>
4978
+ </xs:annotation>
4979
+ </xs:anyAttribute>
4980
+ </xs:complexType>
4981
+ </xs:element>
4982
+ <xs:element name="MultiStringValue">
4983
+ <xs:annotation>
4984
+ <xs:documentation>
4985
+ Use several of these elements to specify each registry value in a multiString registry value. This element
4986
+ cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
4987
+ values should go in the text area of the MultiStringValue element.
4988
+ </xs:documentation>
4989
+ <xs:appinfo>
4990
+ <xse:msiRef table="Registry" href="http://msdn.microsoft.com/library/aa371168.aspx" />
4991
+ </xs:appinfo>
4992
+ </xs:annotation>
4993
+ </xs:element>
4994
+ <xs:element name="RegistryKey">
4995
+ <xs:annotation>
4996
+ <xs:documentation>
4997
+ Used for organization of child RegistryValue elements or to create a registry key
4998
+ (and optionally remove it during uninstallation).
4999
+ </xs:documentation>
This file is too large to show in full.
src/WixToolset.Data/Xsd/wixloc.xsd
new
+134
@@ -0,0 +1,134 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- 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. -->
3
+
4
+
5
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ xmlns:xse=" http://wixtoolset.org/schemas/XmlSchemaExtension"
7
+ xmlns:html="http://www.w3.org/1999/xhtml"
8
+ targetNamespace="http://wixtoolset.org/schemas/v4/wxl"
9
+ xmlns="http://wixtoolset.org/schemas/v4/wxl">
10
+ <xs:annotation>
11
+ <xs:documentation>
12
+ Schema for describing WiX Localization files (.wxl).
13
+ </xs:documentation>
14
+ </xs:annotation>
15
+
16
+ <xs:element name="WixLocalization">
17
+ <xs:annotation>
18
+ <xs:appinfo>
19
+ <xse:remarks>
20
+ <html:p>You can specify any valid Windows code page by integer like 1252, or by web name like Windows-1252 or iso-8859-1. See <a href="~/overview/codepage.html">Code Pages</a> for more information.</html:p>
21
+ </xse:remarks>
22
+ <xse:howtoRef href="ui_and_localization/build_a_localized_version.html">How To: Build a localized version of your installer</xse:howtoRef>
23
+ <xse:howtoRef href="ui_and_localization/make_installer_localizable.html">How To: Make your installer localizable</xse:howtoRef>
24
+ </xs:appinfo>
25
+ </xs:annotation>
26
+ <xs:complexType>
27
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
28
+ <xs:element ref="String" />
29
+ <xs:element ref="UI" />
30
+ </xs:choice>
31
+ <xs:attribute name="Codepage" type="xs:string">
32
+ <xs:annotation>
33
+ <xs:documentation>The code page integer value or web name for the resulting database. You can also specify -1 which will not reset the database code page. See remarks for more information.</xs:documentation>
34
+ </xs:annotation>
35
+ </xs:attribute>
36
+ <xs:attribute name="Culture" type="xs:string">
37
+ <xs:annotation>
38
+ <xs:documentation>Culture of the localization strings.</xs:documentation>
39
+ </xs:annotation>
40
+ </xs:attribute>
41
+ <xs:attribute name="Language" type="xs:integer">
42
+ <xs:annotation>
43
+ <xs:documentation>The decimal language ID (LCID) for the culture.</xs:documentation>
44
+ </xs:annotation>
45
+ </xs:attribute>
46
+ </xs:complexType>
47
+ </xs:element>
48
+
49
+ <xs:element name="String">
50
+ <xs:annotation>
51
+ <xs:appinfo>
52
+ <xse:howtoRef href="ui_and_localization/build_a_localized_version.html">How To: Build a localized version of your installer</xse:howtoRef>
53
+ <xse:howtoRef href="ui_and_localization/make_installer_localizable.html">How To: Make your installer localizable</xse:howtoRef>
54
+ </xs:appinfo>
55
+ </xs:annotation>
56
+ <xs:complexType mixed="true">
57
+ <xs:attribute name="Id" type="xs:string" use="required">
58
+ <xs:annotation>
59
+ <xs:documentation>Identity of the resource.</xs:documentation>
60
+ </xs:annotation>
61
+ </xs:attribute>
62
+ <xs:attribute name="Overridable" type="LocalizationYesNoType">
63
+ <xs:annotation>
64
+ <xs:documentation>Determines if the localized string may be overridden.</xs:documentation>
65
+ </xs:annotation>
66
+ </xs:attribute>
67
+ <xs:attribute name="Localizable" type="LocalizationYesNoType">
68
+ <xs:annotation>
69
+ <xs:documentation>Indicates whether the string is localizable text or a non-localizable string that must be unique per locale. No WiX tools are affected by the value of this attribute; it used as documentation for localizers to ignore things like GUIDs or identifiers that look like text.</xs:documentation>
70
+ </xs:annotation>
71
+ </xs:attribute>
72
+ </xs:complexType>
73
+ </xs:element>
74
+
75
+ <xs:element name="UI">
76
+ <xs:annotation>
77
+ <xs:documentation>Allows a localization to override the position, size, and text of dialogs and controls. Override the text by specifying the replacement text in the inner text of the UI element.</xs:documentation>
78
+ </xs:annotation>
79
+ <xs:complexType mixed="true">
80
+ <xs:attribute name="Dialog" type="xs:string">
81
+ <xs:annotation>
82
+ <xs:documentation>Identifies the dialog to localize or the dialog that a control to localize is in.</xs:documentation>
83
+ </xs:annotation>
84
+ </xs:attribute>
85
+ <xs:attribute name="Control" type="xs:string">
86
+ <xs:annotation>
87
+ <xs:documentation>Combined with the Dialog attribute, identifies the control to localize.</xs:documentation>
88
+ </xs:annotation>
89
+ </xs:attribute>
90
+ <xs:attribute name="X" type="xs:integer">
91
+ <xs:annotation>
92
+ <xs:documentation>For a dialog, overrides the authored horizontal centering. For a control, overrides the authored horizontal coordinate of the upper-left corner of the rectangular boundary. This must be a non-negative number.</xs:documentation>
93
+ </xs:annotation>
94
+ </xs:attribute>
95
+ <xs:attribute name="Y" type="xs:integer">
96
+ <xs:annotation>
97
+ <xs:documentation>For a dialog, overrides the authored vertical centering. For a control, overrides the authored vertical coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number.</xs:documentation>
98
+ </xs:annotation>
99
+ </xs:attribute>
100
+ <xs:attribute name="Width" type="xs:integer">
101
+ <xs:annotation>
102
+ <xs:documentation>For a dialog, overrides the authored width in dialog units. For a control, overrides the authored width of the rectangular boundary of the control. This must be a non-negative number.</xs:documentation>
103
+ </xs:annotation>
104
+ </xs:attribute>
105
+ <xs:attribute name="Height" type="xs:integer">
106
+ <xs:annotation>
107
+ <xs:documentation>For a dialog, overrides the authored height in dialog units. For a control, overrides the authored height of the rectangular boundary of the control. This must be a non-negative number.</xs:documentation>
108
+ </xs:annotation>
109
+ </xs:attribute>
110
+ <xs:attribute name="RightToLeft" type="LocalizationYesNoType">
111
+ <xs:annotation>
112
+ <xs:documentation>Set this attribute to "yes" to cause the Control to display from right to left. Not valid for a dialog.</xs:documentation>
113
+ </xs:annotation>
114
+ </xs:attribute>
115
+ <xs:attribute name="RightAligned" type="LocalizationYesNoType">
116
+ <xs:annotation>
117
+ <xs:documentation>Set this attribute to "yes" to cause the Control to be right aligned. Not valid for a dialog.</xs:documentation>
118
+ </xs:annotation>
119
+ </xs:attribute>
120
+ <xs:attribute name="LeftScroll" type="LocalizationYesNoType">
121
+ <xs:annotation>
122
+ <xs:documentation>Set this attribute to "yes" to cause the scroll bar to display on the left side of the Control. Not valid for a dialog.</xs:documentation>
123
+ </xs:annotation>
124
+ </xs:attribute>
125
+ </xs:complexType>
126
+ </xs:element>
127
+
128
+ <xs:simpleType name="LocalizationYesNoType">
129
+ <xs:restriction base="xs:NMTOKEN">
130
+ <xs:enumeration value="no" />
131
+ <xs:enumeration value="yes" />
132
+ </xs:restriction>
133
+ </xs:simpleType>
134
+</xs:schema>
src/WixToolset.Data/YesNoAlwaysType.cs
new
+25
@@ -0,0 +1,25 @@
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
+ /// <summary>
6
+ /// Yes, No, Always xml simple type.
7
+ /// </summary>
8
+ public enum YesNoAlwaysType
9
+ {
10
+ /// <summary>Not a valid yes, no or always value.</summary>
11
+ IllegalValue = -2,
12
+
13
+ /// <summary>Value not set; equivalent to null for reference types.</summary>
14
+ NotSet = -1,
15
+
16
+ /// <summary>The no value.</summary>
17
+ No,
18
+
19
+ /// <summary>The yes value.</summary>
20
+ Yes,
21
+
22
+ /// <summary>The always value.</summary>
23
+ Always,
24
+ }
25
+}
src/WixToolset.Data/YesNoDefaultType.cs
new
+25
@@ -0,0 +1,25 @@
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
+ /// <summary>
6
+ /// Yes, No, Default xml simple type.
7
+ /// </summary>
8
+ public enum YesNoDefaultType
9
+ {
10
+ /// <summary>Not a valid yes, no or default value.</summary>
11
+ IllegalValue = -2,
12
+
13
+ /// <summary>Value not set; equivalent to null for reference types.</summary>
14
+ NotSet = -1,
15
+
16
+ /// <summary>The no value.</summary>
17
+ No,
18
+
19
+ /// <summary>The yes value.</summary>
20
+ Yes,
21
+
22
+ /// <summary>The default value.</summary>
23
+ Default,
24
+ }
25
+}
src/WixToolset.Data/YesNoType.cs
new
+22
@@ -0,0 +1,22 @@
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
+ /// <summary>
6
+ /// Yes/no type (kinda like a boolean).
7
+ /// </summary>
8
+ public enum YesNoType
9
+ {
10
+ /// <summary>Not a valid yes or no value.</summary>
11
+ IllegalValue = -2,
12
+
13
+ /// <summary>Value not set; equivalent to null for reference types.</summary>
14
+ NotSet = -1,
15
+
16
+ /// <summary>The no value.</summary>
17
+ No,
18
+
19
+ /// <summary>The yes value.</summary>
20
+ Yes,
21
+ }
22
+}
src/nuget.config
new
+11
@@ -0,0 +1,11 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<configuration>
3
+ <config>
4
+ <add key="repositorypath" value="packages" />
5
+ </config>
6
+ <packageSources>
7
+ <clear />
8
+ <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
9
+ <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
10
+ </packageSources>
11
+</configuration>
\ No newline at end of file
src/version.json
new
+11
@@ -0,0 +1,11 @@
1
+{
2
+ "version": "4.0-preview",
3
+ "publicReleaseRefSpec": [
4
+ "^refs/heads/master$"
5
+ ],
6
+ "cloudBuild": {
7
+ "buildNumber": {
8
+ "enabled": true
9
+ }
10
+ }
11
+}