Update to WiX Intermediate Representation
Rob Mensching committed
Nov 1, 2017 at 10:59 UTC
2bb37beda887d120a0ddabf874ad25357101faa1
148 files changed
+17532
-4811
src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+7
-5
@@ -69,7 +69,7 @@ namespace WixToolset.Core.Burn
69
{
70
public BindBundleCommand(IBindContext context)
71
{
72
- this.TableDefinitions = WindowsInstallerStandard.GetTableDefinitions();
72
+ //this.TableDefinitions = WindowsInstallerStandard.GetTableDefinitions();
73
74
this.DelayedFields = context.DelayedFields;
75
this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles;
@@ -87,13 +87,13 @@ namespace WixToolset.Core.Burn
87
88
public IEnumerable<IBinderExtension> Extensions { private get; set; }
89
90
- public Output Output { private get; set; }
90
+ public Intermediate Output { private get; set; }
91
92
public string OutputPath { private get; set; }
93
94
public string PdbFile { private get; set; }
95
96
- public TableDefinitionCollection TableDefinitions { private get; set; }
96
+ //public TableDefinitionCollection TableDefinitions { private get; set; }
97
98
public string IntermediateFolder { private get; set; }
99
@@ -105,6 +105,8 @@ namespace WixToolset.Core.Burn
105
106
public void Execute()
107
{
108
+ throw new NotImplementedException();
109
+#if TODO
110
this.FileTransfers = Enumerable.Empty<FileTransfer>();
111
this.ContentFilePaths = Enumerable.Empty<string>();
112
@@ -822,7 +824,7 @@ namespace WixToolset.Core.Burn
824
resources.Save(bundleTempPath);
825
}
826
825
- #region DependencyExtension
827
+//#region DependencyExtension
828
/// <summary>
829
/// Imports authored dependency providers for each package in the manifest,
830
/// and generates dependency providers for certain package types that do not
@@ -936,7 +938,7 @@ namespace WixToolset.Core.Burn
938
}
939
940
// Defaults to the bundle ID as the provider key.
941
+#endif
942
}
940
- #endregion
943
}
944
}
src/WixToolset.Core.Burn/Bind/ProvidesDependency.cs
+2
@@ -11,6 +11,7 @@ namespace WixToolset.Core.Burn
11
/// </summary>
12
internal sealed class ProvidesDependency
13
{
14
+#if TODO
15
/// <summary>
16
/// Creates a new instance of the <see cref="ProviderDependency"/> class from a <see cref="Row"/>.
17
/// </summary>
@@ -19,6 +20,7 @@ namespace WixToolset.Core.Burn
20
: this((string)row[2], (string)row[3], (string)row[4], (int?)row[5])
21
{
22
}
23
+#endif
24
25
/// <summary>
26
/// Creates a new instance of the <see cref="ProviderDependency"/> class.
src/WixToolset.Core.Burn/Bind/WixComponentSearchInfo.cs
+2
-1
@@ -11,10 +11,12 @@ namespace WixToolset.Core.Burn
11
/// </summary>
12
internal class WixComponentSearchInfo : WixSearchInfo
13
{
14
+#if TODO
15
public WixComponentSearchInfo(Row row)
16
: this((string)row[0], (string)row[1], (string)row[2], (int)row[3])
17
{
18
}
19
+#endif
20
21
public WixComponentSearchInfo(string id, string guid, string productCode, int attributes)
22
: base(id)
@@ -60,5 +62,4 @@ namespace WixToolset.Core.Burn
62
writer.WriteEndElement();
63
}
64
}
63
-
65
}
src/WixToolset.Core.Burn/Bind/WixFileSearchInfo.cs
+2
@@ -11,10 +11,12 @@ namespace WixToolset.Core.Burn
11
/// </summary>
12
internal class WixFileSearchInfo : WixSearchInfo
13
{
14
+#if TODO
15
public WixFileSearchInfo(Row row)
16
: this((string)row[0], (string)row[1], (int)row[9])
17
{
18
}
19
+#endif
20
21
public WixFileSearchInfo(string id, string path, int attributes)
22
: base(id)
src/WixToolset.Core.Burn/Bind/WixProductSearchInfo.cs
+2
@@ -11,10 +11,12 @@ namespace WixToolset.Core.Burn
11
/// </summary>
12
internal class WixProductSearchInfo : WixSearchInfo
13
{
14
+#if TODO
15
public WixProductSearchInfo(Row row)
16
: this((string)row[0], (string)row[1], (int)row[2])
17
{
18
}
19
+#endif
20
21
public WixProductSearchInfo(string id, string guid, int attributes)
22
: base(id)
src/WixToolset.Core.Burn/Bind/WixRegistrySearchInfo.cs
+2
-1
@@ -11,10 +11,12 @@ namespace WixToolset.Core.Burn
11
/// </summary>
12
internal class WixRegistrySearchInfo : WixSearchInfo
13
{
14
+#if TODO
15
public WixRegistrySearchInfo(Row row)
16
: this((string)row[0], (int)row[1], (string)row[2], (string)row[3], (int)row[4])
17
{
18
}
19
+#endif
20
21
public WixRegistrySearchInfo(string id, int root, string key, string value, int attributes)
22
: base(id)
@@ -88,5 +90,4 @@ namespace WixToolset.Core.Burn
90
writer.WriteEndElement();
91
}
92
}
91
-
93
}
src/WixToolset.Core.Burn/Bind/WixSearchInfo.cs
+2
@@ -17,12 +17,14 @@ namespace WixToolset.Core.Burn
17
this.Id = id;
18
}
19
20
+#if TODO
21
public void AddWixSearchRowInfo(Row row)
22
{
23
Debug.Assert((string)row[0] == Id);
24
Variable = (string)row[1];
25
Condition = (string)row[2];
26
}
27
+#endif
28
29
public string Id { get; private set; }
30
public string Variable { get; private set; }
src/WixToolset.Core.Burn/BundleBackend.cs
+1
-1
@@ -42,7 +42,7 @@ namespace WixToolset.Core.Burn
42
}
43
}
44
45
- public Output Unbind(IUnbindContext context)
45
+ public Intermediate Unbind(IUnbindContext context)
46
{
47
string uxExtractPath = Path.Combine(context.ExportBasePath, "UX");
48
string acExtractPath = Path.Combine(context.ExportBasePath, "AttachedContainer");
src/WixToolset.Core.Burn/Bundles/AutomaticallySlipstreamPatchesCommand.cs
+2
@@ -11,6 +11,7 @@ namespace WixToolset.Core.Burn.Bundles
11
12
internal class AutomaticallySlipstreamPatchesCommand
13
{
14
+#if TODO
15
public IEnumerable<PackageFacade> PackageFacades { private get; set; }
16
17
public Table WixBundlePatchTargetCodeTable { private get; set; }
@@ -108,5 +109,6 @@ namespace WixToolset.Core.Burn.Bundles
109
}
110
}
111
}
112
+#endif
113
}
114
}
src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs
+2
@@ -14,6 +14,7 @@ namespace WixToolset.Core.Burn.Bundles
14
15
internal class CreateBootstrapperApplicationManifestCommand
16
{
17
+#if TODO
18
public WixBundleRow BundleRow { private get; set; }
19
20
public IEnumerable<PackageFacade> ChainPackages { private get; set; }
@@ -237,5 +238,6 @@ namespace WixToolset.Core.Burn.Bundles
238
239
return row;
240
}
241
+#endif
242
}
243
}
src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
+2
@@ -15,6 +15,7 @@ namespace WixToolset.Core.Burn.Bundles
15
16
internal class CreateBurnManifestCommand
17
{
18
+#if TODO
19
public IEnumerable<IBurnBackendExtension> BackendExtensions { private get; set; }
20
21
public Output Output { private get; set; }
@@ -682,5 +683,6 @@ namespace WixToolset.Core.Burn.Bundles
683
684
return resolved;
685
}
686
+#endif
687
}
688
}
src/WixToolset.Core.Burn/Bundles/CreateContainerCommand.cs
+2
@@ -16,6 +16,7 @@ namespace WixToolset.Core.Burn.Bundles
16
/// </summary>
17
internal class CreateContainerCommand
18
{
19
+#if TODO
20
public CompressionLevel DefaultCompressionLevel { private get; set; }
21
22
public IEnumerable<WixBundlePayloadRow> Payloads { private get; set; }
@@ -64,5 +65,6 @@ namespace WixToolset.Core.Burn.Bundles
65
66
this.Size = fileInfo.Length;
67
}
68
+#endif
69
}
70
}
src/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs
+2
@@ -8,6 +8,7 @@ namespace WixToolset.Core.Burn.Bundles
8
9
internal class GetPackageFacadesCommand
10
{
11
+#if TODO
12
public Table PackageTable { private get; set; }
13
14
public Table ExePackageTable { private get; set; }
@@ -58,5 +59,6 @@ namespace WixToolset.Core.Burn.Bundles
59
60
this.PackageFacades = facades;
61
}
62
+#endif
63
}
64
}
src/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
+2
@@ -9,6 +9,7 @@ namespace WixToolset.Core.Burn.Bundles
9
10
internal class OrderPackagesAndRollbackBoundariesCommand
11
{
12
+#if TODO
13
public Table WixGroupTable { private get; set; }
14
15
public RowDictionary<WixBundleRollbackBoundaryRow> Boundaries { private get; set; }
@@ -141,5 +142,6 @@ namespace WixToolset.Core.Burn.Bundles
142
this.OrderedPackageFacades = orderedFacades;
143
this.UsedRollbackBoundaries = usedBoundaries;
144
}
145
+#endif
146
}
147
}
src/WixToolset.Core.Burn/Bundles/PackageFacade.cs
+2
@@ -6,6 +6,7 @@ namespace WixToolset.Core.Burn.Bundles
6
7
internal class PackageFacade
8
{
9
+#if TODO
10
private PackageFacade(WixBundlePackageRow package)
11
{
12
this.Package = package;
@@ -54,5 +55,6 @@ namespace WixToolset.Core.Burn.Bundles
55
/// the relationship with the extension makes it much trickier to pull off.
56
/// </remarks>
57
public ProvidesDependencyCollection Provides { get; private set; }
58
+#endif
59
}
60
}
src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs
+2
@@ -11,6 +11,7 @@ namespace WixToolset.Core.Burn.Bundles
11
/// </summary>
12
internal class ProcessExePackageCommand
13
{
14
+#if TODO
15
public RowDictionary<WixBundlePayloadRow> AuthoredPayloads { private get; set; }
16
17
public PackageFacade Facade { private get; set; }
@@ -29,5 +30,6 @@ namespace WixToolset.Core.Burn.Bundles
30
31
this.Facade.Package.Version = packagePayload.Version;
32
}
33
+#endif
34
}
35
}
src/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
+2
@@ -22,6 +22,7 @@ namespace WixToolset.Core.Burn.Bundles
22
/// </summary>
23
internal class ProcessMsiPackageCommand
24
{
25
+#if TODO
26
private const string PropertySqlFormat = "SELECT `Value` FROM `Property` WHERE `Property` = '{0}'";
27
28
public RowDictionary<WixBundlePayloadRow> AuthoredPayloads { private get; set; }
@@ -572,5 +573,6 @@ namespace WixToolset.Core.Burn.Bundles
573
574
return String.Format(CultureInfo.InvariantCulture, ProcessMsiPackageCommand.PropertySqlFormat, property);
575
}
576
+#endif
577
}
578
}
src/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs
+2
@@ -18,6 +18,7 @@ namespace WixToolset.Core.Burn.Bundles
18
/// </summary>
19
internal class ProcessMspPackageCommand
20
{
21
+#if TODO
22
private const string PatchMetadataFormat = "SELECT `Value` FROM `MsiPatchMetadata` WHERE `Property` = '{0}'";
23
private static readonly Encoding XmlOutputEncoding = new UTF8Encoding(false);
24
@@ -185,5 +186,6 @@ namespace WixToolset.Core.Burn.Bundles
186
187
return false;
188
}
189
+#endif
190
}
191
}
src/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs
+3
-1
@@ -11,7 +11,8 @@ namespace WixToolset.Core.Burn.Bundles
11
/// </summary>
12
internal class ProcessMsuPackageCommand
13
{
14
- public RowDictionary<WixBundlePayloadRow> AuthoredPayloads { private get; set; }
14
+#if TODO
15
+ public RowDictionary<WixBundlePayload> AuthoredPayloads { private get; set; }
16
17
public PackageFacade Facade { private get; set; }
18
@@ -26,5 +27,6 @@ namespace WixToolset.Core.Burn.Bundles
27
28
this.Facade.Package.PerMachine = YesNoDefaultType.Yes; // MSUs are always per-machine.
29
}
30
+#endif
31
}
32
}
src/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs
+2
@@ -16,6 +16,7 @@ namespace WixToolset.Core.Burn.Bundles
16
17
internal class ProcessPayloadsCommand
18
{
19
+#if TODO
20
private static readonly Version EmptyVersion = new Version(0, 0, 0, 0);
21
22
public IEnumerable<WixBundlePayloadRow> Payloads { private get; set; }
@@ -157,5 +158,6 @@ namespace WixToolset.Core.Burn.Bundles
158
payload.DisplayName = versionInfo.ProductName;
159
}
160
}
161
+#endif
162
}
163
}
src/WixToolset.Core.Burn/Bundles/VerifyPayloadsWithCatalogCommand.cs
+2
@@ -13,6 +13,7 @@ namespace WixToolset.Core.Burn.Bundles
13
14
internal class VerifyPayloadsWithCatalogCommand
15
{
16
+#if TODO
17
public IEnumerable<WixBundleCatalogRow> Catalogs { private get; set; }
18
19
public IEnumerable<WixBundlePayloadRow> Payloads { private get; set; }
@@ -144,5 +145,6 @@ namespace WixToolset.Core.Burn.Bundles
145
146
public string FullPath { get; set; }
147
}
148
+#endif
149
}
150
}
src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs
+5
-5
@@ -66,7 +66,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
66
// When building merge module, all the files go to "#MergeModule.CABinet".
67
if (OutputType.Module == this.Output.Type)
68
{
69
- Table mergeModuleMediaTable = new Table(null, this.TableDefinitions["Media"]);
69
+ Table mergeModuleMediaTable = new Table(this.TableDefinitions["Media"]);
70
mergeModuleMediaRow = (MediaRow)mergeModuleMediaTable.CreateRow(null);
71
mergeModuleMediaRow.Cabinet = "#MergeModule.CABinet";
72
@@ -150,8 +150,8 @@ namespace WixToolset.Core.WindowsInstaller.Databases
150
// When building a product, if the current file is not to be compressed or if
151
// the package set not to be compressed, don't cab it.
152
if (OutputType.Product == this.Output.Type &&
153
- (YesNoType.No == facade.File.Compressed ||
154
- (YesNoType.NotSet == facade.File.Compressed && !this.FilesCompressed)))
153
+ (!facade.File.Compressed.Value ||
154
+ (!facade.File.Compressed.HasValue && !this.FilesCompressed)))
155
{
156
uncompressedFiles.Add(facade);
157
continue;
@@ -270,8 +270,8 @@ namespace WixToolset.Core.WindowsInstaller.Databases
270
// When building a product, if the current file is not to be compressed or if
271
// the package set not to be compressed, don't cab it.
272
if (OutputType.Product == this.Output.Type &&
273
- (YesNoType.No == facade.File.Compressed ||
274
- (YesNoType.NotSet == facade.File.Compressed && !this.FilesCompressed)))
273
+ (!facade.File.Compressed.Value ||
274
+ (!facade.File.Compressed.HasValue && !this.FilesCompressed)))
275
{
276
uncompressedFiles.Add(facade);
277
}
src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+8
-3
@@ -39,7 +39,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
39
this.DelayedFields = context.DelayedFields;
40
this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles;
41
this.Extensions = context.Extensions;
42
- this.Output = context.IntermediateRepresentation;
42
+ this.Intermediate = context.IntermediateRepresentation;
43
this.OutputPath = context.OutputPath;
44
this.PdbFile = context.OutputPdbPath;
45
this.IntermediateFolder = context.IntermediateFolder;
@@ -69,10 +69,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
69
70
private IEnumerable<IBinderExtension> Extensions { get; }
71
72
- private IEnumerable<InspectorExtension> InspectorExtensions { get; }
73
-
72
private string PdbFile { get; }
73
74
+ private Intermediate Intermediate { get; }
75
+
76
private Output Output { get; }
77
78
private string OutputPath { get; }
@@ -95,6 +95,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
95
96
public void Execute()
97
{
98
+ this.Intermediate.Save(this.OutputPath);
99
+#if FINISH
100
List<FileTransfer> fileTransfers = new List<FileTransfer>();
101
102
HashSet<string> suppressedTableNames = new HashSet<string>();
@@ -108,6 +110,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
110
111
this.LocalizeUI(this.Output.Tables);
112
113
+ this.Output = CreateOutputFromIR(this.Intermediate);
114
+
115
// Process the summary information table before the other tables.
116
bool compressed;
117
bool longNames;
@@ -1278,6 +1282,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1282
command.TempFilesLocation = this.IntermediateFolder;
1283
command.Codepage = this.Codepage;
1284
command.Execute();
1285
+#endif
1286
}
1287
}
1288
}
src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs
+3
@@ -23,6 +23,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
23
24
public void Execute()
25
{
26
+#if REVISIT_FOR_PATCHING
27
bool optimizePatchSizeForLargeFiles = false;
28
PatchSymbolFlagsType apiPatchingSymbolFlags = 0;
29
@@ -82,6 +83,8 @@ namespace WixToolset.Core.WindowsInstaller.Databases
83
}
84
}
85
}
86
+#endif
87
+ throw new NotImplementedException();
88
}
89
}
90
}
src/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
+19
-12
@@ -16,6 +16,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
16
using WixToolset.Core.Native;
17
using WixToolset.Core.Bind;
18
using WixToolset.Core.Cab;
19
+ using WixToolset.Data.Tuples;
20
21
/// <summary>
22
/// Retrieve files information and extract them from merge modules.
@@ -34,7 +35,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
35
36
public bool SuppressLayout { private get; set; }
37
37
- public string TempFilesLocation { private get; set; }
38
+ public string IntermediateFolder { private get; set; }
39
40
public IEnumerable<FileFacade> MergeModulesFileFacades { get; private set; }
41
@@ -95,22 +96,28 @@ namespace WixToolset.Core.WindowsInstaller.Databases
96
// NOTE: this is very tricky - the merge module file rows are not added to the
97
// file table because they should not be created via idt import. Instead, these
98
// rows are created by merging in the actual modules.
98
- FileRow fileRow = (FileRow)this.FileTable.CreateRow(wixMergeRow.SourceLineNumbers, false);
99
+ var fileRow = new FileTuple(wixMergeRow.SourceLineNumbers, new Identifier(record[1], AccessModifier.Private));
100
fileRow.File = record[1];
100
- fileRow.Compressed = wixMergeRow.FileCompression;
101
+ fileRow.Compressed = (wixMergeRow.FileCompression == YesNoType.Yes) ? true : (wixMergeRow.FileCompression == YesNoType.No) ? (bool?)false : null;
102
+ //FileRow fileRow = (FileRow)this.FileTable.CreateRow(wixMergeRow.SourceLineNumbers, false);
103
+ //fileRow.File = record[1];
104
+ //fileRow.Compressed = wixMergeRow.FileCompression;
105
102
- WixFileRow wixFileRow = (WixFileRow)this.WixFileTable.CreateRow(wixMergeRow.SourceLineNumbers, false);
103
- wixFileRow.Directory = record[2];
106
+ var wixFileRow = new WixFileTuple(wixMergeRow.SourceLineNumbers);
107
+ wixFileRow.Directory_ = record[2];
108
wixFileRow.DiskId = wixMergeRow.DiskId;
109
wixFileRow.PatchGroup = -1;
106
- wixFileRow.Source = String.Concat(this.TempFilesLocation, Path.DirectorySeparatorChar, "MergeId.", wixMergeRow.Number.ToString(CultureInfo.InvariantCulture), Path.DirectorySeparatorChar, record[1]);
110
+ wixFileRow.Source = Path.Combine(this.IntermediateFolder, "MergeId.", wixMergeRow.Number.ToString(CultureInfo.InvariantCulture), record[1]);
111
+ //WixFileRow wixFileRow = (WixFileRow)this.WixFileTable.CreateRow(wixMergeRow.SourceLineNumbers, false);
112
+ //wixFileRow.Directory = record[2];
113
+ //wixFileRow.DiskId = wixMergeRow.DiskId;
114
+ //wixFileRow.PatchGroup = -1;
115
+ //wixFileRow.Source = Path.Combine(this.IntermediateFolder, "MergeId.", wixMergeRow.Number.ToString(CultureInfo.InvariantCulture), record[1]);
116
108
- FileFacade mergeModuleFileFacade = new FileFacade(true, fileRow, wixFileRow);
109
-
110
- FileFacade collidingFacade;
117
+ var mergeModuleFileFacade = new FileFacade(true, fileRow, wixFileRow);
118
119
// If case-sensitive collision with another merge module or a user-authored file identifier.
113
- if (indexedFileFacades.TryGetValue(mergeModuleFileFacade.File.File, out collidingFacade))
120
+ if (indexedFileFacades.TryGetValue(mergeModuleFileFacade.File.File, out var collidingFacade))
121
{
122
Messaging.Instance.OnMessage(WixErrors.DuplicateModuleFileIdentifier(wixMergeRow.SourceLineNumbers, wixMergeRow.Id, collidingFacade.File.File));
123
}
@@ -188,10 +195,10 @@ namespace WixToolset.Core.WindowsInstaller.Databases
195
string safeMergeId = wixMergeRow.Number.ToString(CultureInfo.InvariantCulture.NumberFormat);
196
197
// extract the module cabinet, then explode all of the files to a temp directory
191
- string moduleCabPath = String.Concat(this.TempFilesLocation, Path.DirectorySeparatorChar, safeMergeId, ".module.cab");
198
+ string moduleCabPath = String.Concat(this.IntermediateFolder, Path.DirectorySeparatorChar, safeMergeId, ".module.cab");
199
merge.ExtractCAB(moduleCabPath);
200
194
- string mergeIdPath = String.Concat(this.TempFilesLocation, Path.DirectorySeparatorChar, "MergeId.", safeMergeId);
201
+ string mergeIdPath = String.Concat(this.IntermediateFolder, Path.DirectorySeparatorChar, "MergeId.", safeMergeId);
202
Directory.CreateDirectory(mergeIdPath);
203
204
using (var extractCab = new WixExtractCab())
src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs
+1
-1
@@ -122,7 +122,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
122
{
123
if (ColumnType.Object == columnDefinition.Type)
124
{
125
- importTable = new Table(table.Section, table.Definition);
125
+ importTable = new Table(table.Definition);
126
hasBinaryColumn = true;
127
break;
128
}
src/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesCommand.cs
+5
-2
@@ -24,6 +24,8 @@ namespace WixToolset.Core.WindowsInstaller.Databases
24
25
public void Execute()
26
{
27
+ throw new NotImplementedException();
28
+#if TODO
29
List<FileFacade> facades = new List<FileFacade>(this.FileTable.Rows.Count);
30
31
RowDictionary<WixFileRow> wixFiles = new RowDictionary<WixFileRow>(this.WixFileTable);
@@ -44,6 +46,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
46
}
47
48
this.FileFacades = facades;
49
+#endif
50
}
51
52
/// <summary>
@@ -66,7 +69,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
69
case SymbolPathType.Component:
70
if (null == filesByComponent)
71
{
69
- filesByComponent = facades.ToLookup(f => f.File.Component);
72
+ filesByComponent = facades.ToLookup(f => f.File.Component_);
73
}
74
75
foreach (FileFacade facade in filesByComponent[row.Id])
@@ -78,7 +81,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
81
case SymbolPathType.Directory:
82
if (null == filesByDirectory)
83
{
81
- filesByDirectory = facades.ToLookup(f => f.WixFile.Directory);
84
+ filesByDirectory = facades.ToLookup(f => f.WixFile.Directory_);
85
}
86
87
foreach (FileFacade facade in filesByDirectory[row.Id])
src/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
+11
-11
@@ -304,7 +304,8 @@ namespace WixToolset.Core.WindowsInstaller.Databases
304
throw new InvalidOperationException("Failed to fetch a File row from the database that was merged in from a module.");
305
}
306
307
- recordUpdate.SetInteger(1, file.File.Sequence);
307
+ //recordUpdate.SetInteger(1, file.File.Sequence);
308
+ throw new NotImplementedException();
309
310
// update the file attributes to match the compression specified
311
// on the Merge element or on the Package element
@@ -316,26 +317,25 @@ namespace WixToolset.Core.WindowsInstaller.Databases
317
attributes = recordUpdate.GetInteger(2);
318
}
319
319
- if (YesNoType.Yes == file.File.Compressed)
320
+ // not specified
321
+ if (!file.File.Compressed.HasValue)
322
+ {
323
+ // clear any compression bits
324
+ attributes &= ~MsiInterop.MsidbFileAttributesCompressed;
325
+ attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed;
326
+ }
327
+ else if (file.File.Compressed.Value)
328
{
329
// these are mutually exclusive
330
attributes |= MsiInterop.MsidbFileAttributesCompressed;
331
attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed;
332
}
325
- else if (YesNoType.No == file.File.Compressed)
333
+ else if (!file.File.Compressed.Value)
334
{
335
// these are mutually exclusive
336
attributes |= MsiInterop.MsidbFileAttributesNoncompressed;
337
attributes &= ~MsiInterop.MsidbFileAttributesCompressed;
338
}
331
- else // not specified
332
- {
333
- Debug.Assert(YesNoType.NotSet == file.File.Compressed);
334
-
335
- // clear any compression bits
336
- attributes &= ~MsiInterop.MsidbFileAttributesCompressed;
337
- attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed;
338
- }
339
340
recordUpdate.SetInteger(2, attributes);
341
src/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
+23
-18
@@ -15,6 +15,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
15
using WixToolset.Core.Bind;
16
using WixToolset.Data;
17
using WixToolset.Data.Rows;
18
+ using WixToolset.Data.Tuples;
19
using WixToolset.Msi;
20
21
/// <summary>
@@ -69,7 +70,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
70
71
if (!fileInfo.Exists)
72
{
72
- Messaging.Instance.OnMessage(WixErrors.CannotFindFile(file.File.SourceLineNumbers, file.File.File, file.File.FileName, file.WixFile.Source));
73
+ Messaging.Instance.OnMessage(WixErrors.CannotFindFile(file.File.SourceLineNumbers, file.File.File, file.File.LongFileName, file.WixFile.Source));
74
return;
75
}
76
@@ -148,16 +149,17 @@ namespace WixToolset.Core.WindowsInstaller.Databases
149
150
if (null == file.Hash)
151
{
151
- Table msiFileHashTable = this.Output.EnsureTable(this.TableDefinitions["MsiFileHash"]);
152
- file.Hash = msiFileHashTable.CreateRow(file.File.SourceLineNumbers);
152
+ //Table msiFileHashTable = this.Output.EnsureTable(this.TableDefinitions["MsiFileHash"]);
153
+ //file.Hash = msiFileHashTable.CreateRow(file.File.SourceLineNumbers);
154
+ throw new NotImplementedException();
155
}
156
155
- file.Hash[0] = file.File.File;
156
- file.Hash[1] = 0;
157
- file.Hash[2] = hash[0];
158
- file.Hash[3] = hash[1];
159
- file.Hash[4] = hash[2];
160
- file.Hash[5] = hash[3];
157
+ file.Hash.File_ = file.File.File;
158
+ file.Hash.Options = 0;
159
+ file.Hash.HashPart1 = hash[0];
160
+ file.Hash.HashPart2 = hash[1];
161
+ file.Hash.HashPart3 = hash[2];
162
+ file.Hash.HashPart4 = hash[3];
163
}
164
}
165
else // update the file row with the version and language information.
@@ -250,9 +252,9 @@ namespace WixToolset.Core.WindowsInstaller.Databases
252
assemblyNameValues.Add("publicKeyToken", publicKeyIsNeutral ? "null" : publicKeyToken.ToUpperInvariant());
253
assemblyNameValues.Add("publicKeyTokenPreservedCase", publicKeyIsNeutral ? "null" : publicKeyToken);
254
}
253
- else if (file.WixFile.AssemblyApplication == null)
255
+ else if (file.WixFile.File_AssemblyApplication == null)
256
{
255
- throw new WixException(WixErrors.GacAssemblyNoStrongName(file.File.SourceLineNumbers, fileInfo.FullName, file.File.Component));
257
+ throw new WixException(WixErrors.GacAssemblyNoStrongName(file.File.SourceLineNumbers, fileInfo.FullName, file.File.Component_));
258
}
259
260
string assemblyVersion = referenceIdentity.GetAttribute(null, "Version");
@@ -350,10 +352,10 @@ namespace WixToolset.Core.WindowsInstaller.Databases
352
// TODO: Consider passing in the this.FileFacades as an indexed collection instead of searching through
353
// all files like this. Even though this is a rare case it looks like we might be able to index the
354
// file earlier.
353
- FileFacade fileManifest = this.FileFacades.SingleOrDefault(r => r.File.File.Equals(file.WixFile.AssemblyManifest, StringComparison.Ordinal));
355
+ FileFacade fileManifest = this.FileFacades.SingleOrDefault(r => r.File.File.Equals(file.WixFile.File_AssemblyManifest, StringComparison.Ordinal));
356
if (null == fileManifest)
357
{
356
- Messaging.Instance.OnMessage(WixErrors.MissingManifestForWin32Assembly(file.File.SourceLineNumbers, file.File.File, file.WixFile.AssemblyManifest));
358
+ Messaging.Instance.OnMessage(WixErrors.MissingManifestForWin32Assembly(file.File.SourceLineNumbers, file.File.File, file.WixFile.File_AssemblyManifest));
359
}
360
361
string win32Type = null;
@@ -476,7 +478,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
478
// check for null value (this can occur when grabbing the file version from an assembly without one)
479
if (String.IsNullOrEmpty(value))
480
{
479
- Messaging.Instance.OnMessage(WixWarnings.NullMsiAssemblyNameValue(file.File.SourceLineNumbers, file.File.Component, name));
481
+ Messaging.Instance.OnMessage(WixWarnings.NullMsiAssemblyNameValue(file.File.SourceLineNumbers, file.File.Component_, name));
482
}
483
else
484
{
@@ -485,7 +487,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
487
// override directly authored value
488
foreach (Row row in assemblyNameTable.Rows)
489
{
488
- if ((string)row[0] == file.File.Component && (string)row[1] == name)
490
+ if ((string)row[0] == file.File.Component_ && (string)row[1] == name)
491
{
492
assemblyNameRow = row;
493
break;
@@ -494,7 +496,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
496
497
// if the assembly will be GAC'd and the name in the file table doesn't match the name in the MsiAssemblyName table, error because the install will fail.
498
if ("name" == name && FileAssemblyType.DotNetAssembly == file.WixFile.AssemblyType &&
497
- String.IsNullOrEmpty(file.WixFile.AssemblyApplication) &&
499
+ String.IsNullOrEmpty(file.WixFile.File_AssemblyApplication) &&
500
!String.Equals(Path.GetFileNameWithoutExtension(file.File.LongFileName), value, StringComparison.OrdinalIgnoreCase))
501
{
502
Messaging.Instance.OnMessage(WixErrors.GACAssemblyIdentityWarning(file.File.SourceLineNumbers, Path.GetFileNameWithoutExtension(file.File.LongFileName), value));
@@ -502,8 +504,10 @@ namespace WixToolset.Core.WindowsInstaller.Databases
504
505
if (null == assemblyNameRow)
506
{
507
+ throw new NotImplementedException();
508
+#if TODO
509
assemblyNameRow = assemblyNameTable.CreateRow(file.File.SourceLineNumbers);
506
- assemblyNameRow[0] = file.File.Component;
510
+ assemblyNameRow[0] = file.File.Component_;
511
assemblyNameRow[1] = name;
512
assemblyNameRow[2] = value;
513
@@ -512,10 +516,11 @@ namespace WixToolset.Core.WindowsInstaller.Databases
516
517
if (null == file.AssemblyNames)
518
{
515
- file.AssemblyNames = new List<Row>();
519
+ file.AssemblyNames = new List<MsiAssemblyNameTuple>();
520
}
521
522
file.AssemblyNames.Add(assemblyNameRow);
523
+#endif
524
}
525
else
526
{
src/WixToolset.Core.WindowsInstaller/Decompiler.cs
renamed
+3
-2
@@ -24,7 +24,7 @@ namespace WixToolset
24
public class Decompiler
25
{
26
private static readonly Regex NullSplitter = new Regex(@"\[~]");
27
-
27
+#if TODO
28
private int codepage;
29
private bool compressed;
30
private bool shortNames;
@@ -334,7 +334,7 @@ namespace WixToolset
334
335
return deleted;
336
}
337
-#endif
337
+#endif
338
return true;
339
}
340
@@ -9352,5 +9352,6 @@ namespace WixToolset
9352
return Wix.MajorUpgrade.ScheduleType.afterInstallFinalize;
9353
}
9354
}
9355
+#endif
9356
}
9357
}
src/WixToolset.Core.WindowsInstaller/DecompilerCore.cs
renamed
+2
@@ -8,6 +8,7 @@ namespace WixToolset
8
using WixToolset.Extensibility;
9
using Wix = WixToolset.Data.Serialize;
10
11
+#if TODO
12
/// <summary>
13
/// The base of the decompiler. Holds some variables used by the decompiler and extensions,
14
/// as well as some utility methods.
@@ -149,4 +150,5 @@ namespace WixToolset
150
Messaging.Instance.OnMessage(e);
151
}
152
}
153
+#endif
154
}
src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
+2
-2
@@ -47,8 +47,8 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe
47
Dictionary<string, string> certificates = new Dictionary<string, string>();
48
49
// Reset the in-memory tables for this new database
50
- Table digitalSignatureTable = new Table(null, this.TableDefinitions["MsiDigitalSignature"]);
51
- Table digitalCertificateTable = new Table(null, this.TableDefinitions["MsiDigitalCertificate"]);
50
+ Table digitalSignatureTable = new Table(this.TableDefinitions["MsiDigitalSignature"]);
51
+ Table digitalCertificateTable = new Table(this.TableDefinitions["MsiDigitalCertificate"]);
52
53
// If any digital signature records exist that are not of the media type, preserve them
54
if (database.TableExists("MsiDigitalSignature"))
src/WixToolset.Core.WindowsInstaller/Melter.cs
renamed
+2
@@ -19,6 +19,7 @@ namespace WixToolset
19
/// </summary>
20
public sealed class Melter
21
{
22
+#if TODO
23
private MelterCore core;
24
private Decompiler decompiler;
25
@@ -394,5 +395,6 @@ namespace WixToolset
395
}
396
}
397
}
398
+#endif
399
}
400
}
src/WixToolset.Core.WindowsInstaller/MelterCore.cs
renamed
src/WixToolset.Core.WindowsInstaller/MsiBackend.cs
+1
-1
@@ -28,7 +28,7 @@ namespace WixToolset.Core.WindowsInstaller
28
return command.Execute();
29
}
30
31
- public Output Unbind(IUnbindContext context)
31
+ public Intermediate Unbind(IUnbindContext context)
32
{
33
var command = new UnbindMsiOrMsmCommand(context);
34
return command.Execute();
src/WixToolset.Core.WindowsInstaller/MsmBackend.cs
+1
-1
@@ -26,7 +26,7 @@ namespace WixToolset.Core.WindowsInstaller
26
return false;
27
}
28
29
- public Output Unbind(IUnbindContext context)
29
+ public Intermediate Unbind(IUnbindContext context)
30
{
31
var command = new UnbindMsiOrMsmCommand(context);
32
return command.Execute();
src/WixToolset.Core.WindowsInstaller/MspBackend.cs
+5
-2
@@ -26,8 +26,9 @@ namespace WixToolset.Core.WindowsInstaller
26
throw new NotImplementedException();
27
}
28
29
- public Output Unbind(IUnbindContext context)
29
+ public Intermediate Unbind(IUnbindContext context)
30
{
31
+#if REVISIT_FOR_PATCHING
32
Output patch;
33
34
// patch files are essentially database files (use a special flag to let the API know its a patch file)
@@ -65,7 +66,7 @@ namespace WixToolset.Core.WindowsInstaller
66
string transformFile = Path.Combine(context.IntermediateFolder, String.Concat("Transform", Path.DirectorySeparatorChar, subStorageName, ".mst"));
67
68
// ensure the parent directory exists
68
- System.IO.Directory.CreateDirectory(Path.GetDirectoryName(transformFile));
69
+ Directory.CreateDirectory(Path.GetDirectoryName(transformFile));
70
71
// copy the substorage to a new storage for the transform file
72
using (Storage subStorage = storage.OpenStorage(subStorageName))
@@ -107,6 +108,8 @@ namespace WixToolset.Core.WindowsInstaller
108
}
109
110
return patch;
111
+#endif
112
+ throw new NotImplementedException();
113
}
114
}
115
}
\ No newline at end of file
src/WixToolset.Core.WindowsInstaller/MstBackend.cs
+4
-1
@@ -14,6 +14,7 @@ namespace WixToolset.Core.WindowsInstaller
14
{
15
public BindResult Bind(IBindContext context)
16
{
17
+#if REVISIT_FOR_PATCHING
18
var command = new BindTransformCommand();
19
command.Extensions = context.Extensions;
20
command.TempFilesLocation = context.IntermediateFolder;
@@ -22,6 +23,8 @@ namespace WixToolset.Core.WindowsInstaller
23
command.Execute();
24
25
return new BindResult(Array.Empty<FileTransfer>(), Array.Empty<string>());
26
+#endif
27
+ throw new NotImplementedException();
28
}
29
30
public bool Inscribe(IInscribeContext context)
@@ -29,7 +32,7 @@ namespace WixToolset.Core.WindowsInstaller
32
throw new NotImplementedException();
33
}
34
32
- public Output Unbind(IUnbindContext context)
35
+ public Intermediate Unbind(IUnbindContext context)
36
{
37
var command = new UnbindMsiOrMsmCommand(context);
38
return command.Execute();
src/WixToolset.Core.WindowsInstaller/Patch.cs
+3
@@ -53,6 +53,7 @@ namespace WixToolset.Data
53
[SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
54
public void AttachTransforms(List<PatchTransform> transforms)
55
{
56
+#if REVISIT_FOR_PATCHING
57
// Track if at least one transform gets attached.
58
bool attachedTransform = false;
59
@@ -1231,6 +1232,8 @@ namespace WixToolset.Data
1232
}
1233
1234
return pairedTransform;
1235
+#endif
1236
+ throw new NotImplementedException();
1237
}
1238
1239
/// <summary>
src/WixToolset.Core.WindowsInstaller/PatchTransform.cs
renamed
+6
-3
@@ -13,7 +13,7 @@ namespace WixToolset
13
public class PatchTransform : IMessageHandler
14
{
15
private string baseline;
16
- private Output transform;
16
+ private Intermediate transform;
17
private string transformPath;
18
19
public string Baseline
@@ -21,13 +21,13 @@ namespace WixToolset
21
get { return this.baseline; }
22
}
23
24
- public Output Transform
24
+ public Intermediate Transform
25
{
26
get
27
{
28
if (null == this.transform)
29
{
30
- this.transform = Output.Load(this.transformPath, false);
30
+ this.transform = Intermediate.Load(this.transformPath, false);
31
}
32
33
return this.transform;
@@ -50,6 +50,7 @@ namespace WixToolset
50
/// </summary>
51
public void Validate()
52
{
53
+#if REVISIT_FOR_PATCHING
54
// Changing the ProdocutCode in a patch transform is not recommended.
55
Table propertyTable = this.Transform.Tables["Property"];
56
if (null != propertyTable)
@@ -260,6 +261,8 @@ namespace WixToolset
261
}
262
}
263
}
264
+#endif
265
+ throw new NotImplementedException();
266
}
267
268
/// <summary>
src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs
+2
-2
@@ -83,7 +83,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
83
{
84
using (SummaryInformation summaryInformation = new SummaryInformation(this.Database))
85
{
86
- Table table = new Table(null, this.TableDefinitions["_SummaryInformation"]);
86
+ Table table = new Table(this.TableDefinitions["_SummaryInformation"]);
87
88
for (int i = 1; 19 >= i; i++)
89
{
@@ -277,7 +277,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
277
tableDefinition = this.TableDefinitions[tableName];
278
}
279
280
- Table table = new Table(null, tableDefinition);
280
+ Table table = new Table(tableDefinition);
281
282
while (true)
283
{
src/WixToolset.Core.WindowsInstaller/Unbind/UnbindMsiOrMsmCommand.cs
+4
-1
@@ -18,8 +18,9 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
18
19
public IUnbindContext Context { get; }
20
21
- public Output Execute()
21
+ public Intermediate Execute()
22
{
23
+#if REVISIT_FOR_PATCHING
24
Output output;
25
26
try
@@ -48,6 +49,8 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
49
}
50
51
return output;
52
+#endif
53
+ throw new NotImplementedException();
54
}
55
}
56
}
src/WixToolset.Core.WindowsInstaller/UnbindContext.cs
renamed
src/WixToolset.Core.WindowsInstaller/Unbinder.cs
renamed
+1
-45
@@ -13,19 +13,6 @@ namespace WixToolset.Core
13
/// </summary>
14
public sealed class Unbinder
15
{
16
- private TableDefinitionCollection tableDefinitions;
17
- private ArrayList unbinderExtensions;
18
- // private TempFileCollection tempFiles;
19
-
20
- /// <summary>
21
- /// Creates a new unbinder object with a default set of table definitions.
22
- /// </summary>
23
- public Unbinder()
24
- {
25
- this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
26
- this.unbinderExtensions = new ArrayList();
27
- }
28
-
16
public IEnumerable<IBackendFactory> BackendFactories { get; }
17
18
/// <summary>
@@ -53,37 +40,6 @@ namespace WixToolset.Core
40
/// <value>Path to temp files.</value>
41
public string TempFilesLocation => Path.GetTempPath();
42
56
- /// <summary>
57
- /// Adds extension data.
58
- /// </summary>
59
- /// <param name="data">The extension data to add.</param>
60
- public void AddExtensionData(IExtensionData data)
61
- {
62
- if (null != data.TableDefinitions)
63
- {
64
- foreach (TableDefinition tableDefinition in data.TableDefinitions)
65
- {
66
- if (!this.tableDefinitions.Contains(tableDefinition.Name))
67
- {
68
- this.tableDefinitions.Add(tableDefinition);
69
- }
70
- else
71
- {
72
- Messaging.Instance.OnMessage(WixErrors.DuplicateExtensionTable(data.GetType().ToString(), tableDefinition.Name));
73
- }
74
- }
75
- }
76
- }
77
-
78
- /// <summary>
79
- /// Adds an extension.
80
- /// </summary>
81
- /// <param name="extension">The extension to add.</param>
82
- public void AddExtension(IUnbinderExtension extension)
83
- {
84
- this.unbinderExtensions.Add(extension);
85
- }
86
-
43
/// <summary>
44
/// Unbind a Windows Installer file.
45
/// </summary>
@@ -91,7 +47,7 @@ namespace WixToolset.Core
47
/// <param name="outputType">The type of output to create.</param>
48
/// <param name="exportBasePath">The path where files should be exported.</param>
49
/// <returns>The output representing the database.</returns>
94
- public Output Unbind(string file, OutputType outputType, string exportBasePath)
50
+ public Intermediate Unbind(string file, OutputType outputType, string exportBasePath)
51
{
52
if (!File.Exists(file))
53
{
src/WixToolset.Core.WindowsInstaller/WixToolset.Core.WindowsInstaller.csproj
+2
@@ -22,6 +22,8 @@
22
<ProjectReference Include="$(WixToolsetRootFolder)\Core.Native\src\WixToolset.Core.Native\WixToolset.Core.Native.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core.Native\src\WixToolset.Core.Native\WixToolset.Core.Native.csproj') " />
23
24
<ProjectReference Include="..\WixToolset.Core\WixToolset.Core.csproj" />
25
+
26
+ <ProjectReference Include="..\WixToolset.Data.WindowsInstaller\WixToolset.Data.WindowsInstaller.csproj" />
27
<PackageReference Include="WixToolset.Core.Native" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core.Native\src\WixToolset.Core.Native\WixToolset.Core.Native.csproj') " />
28
</ItemGroup>
29
src/WixToolset.Core/Bind/DelayedField.cs
+3
-3
@@ -16,7 +16,7 @@ namespace WixToolset.Core.Bind
16
/// </summary>
17
/// <param name="row">Row for the field.</param>
18
/// <param name="field">Field needing further resolution.</param>
19
- public DelayedField(Row row, Field field)
19
+ public DelayedField(IntermediateTuple row, IntermediateField field)
20
{
21
this.Row = row;
22
this.Field = field;
@@ -25,11 +25,11 @@ namespace WixToolset.Core.Bind
25
/// <summary>
26
/// The row containing the field.
27
/// </summary>
28
- public Row Row { get; }
28
+ public IntermediateTuple Row { get; }
29
30
/// <summary>
31
/// The field needing further resolving.
32
/// </summary>
33
- public Field Field { get; }
33
+ public IntermediateField Field { get; }
34
}
35
}
src/WixToolset.Core/Bind/FileFacade.cs
+8
-9
@@ -3,19 +3,18 @@
3
namespace WixToolset.Core.Bind
4
{
5
using System.Collections.Generic;
6
- using WixToolset.Data;
7
- using WixToolset.Data.Rows;
6
+ using WixToolset.Data.Tuples;
7
8
public class FileFacade
9
{
11
- public FileFacade(FileRow file, WixFileRow wixFile, WixDeltaPatchFileRow deltaPatchFile)
10
+ public FileFacade(FileTuple file, WixFileTuple wixFile, WixDeltaPatchFileTuple deltaPatchFile)
11
{
12
this.File = file;
13
this.WixFile = wixFile;
14
this.DeltaPatchFile = deltaPatchFile;
15
}
16
18
- public FileFacade(bool fromModule, FileRow file, WixFileRow wixFile)
17
+ public FileFacade(bool fromModule, FileTuple file, WixFileTuple wixFile)
18
{
19
this.FromModule = fromModule;
20
this.File = file;
@@ -24,21 +23,21 @@ namespace WixToolset.Core.Bind
23
24
public bool FromModule { get; private set; }
25
27
- public FileRow File { get; private set; }
26
+ public FileTuple File { get; private set; }
27
29
- public WixFileRow WixFile { get; private set; }
28
+ public WixFileTuple WixFile { get; private set; }
29
31
- public WixDeltaPatchFileRow DeltaPatchFile { get; private set; }
30
+ public WixDeltaPatchFileTuple DeltaPatchFile { get; private set; }
31
32
/// <summary>
33
/// Gets the set of MsiAssemblyName rows created for this file.
34
/// </summary>
35
/// <value>RowCollection of MsiAssemblyName table.</value>
37
- public List<Row> AssemblyNames { get; set; }
36
+ public List<MsiAssemblyNameTuple> AssemblyNames { get; set; }
37
38
/// <summary>
39
/// Gets or sets the MsiFileHash row for this file.
40
/// </summary>
42
- public Row Hash { get; set; }
41
+ public MsiFileHashTuple Hash { get; set; }
42
}
43
}
src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs
+8
-7
@@ -34,19 +34,19 @@ namespace WixToolset.Core.Bind
34
{
35
try
36
{
37
- Row propertyRow = delayedField.Row;
37
+ var propertyRow = delayedField.Row;
38
39
// process properties first in case they refer to other binder variables
40
- if ("Property" == propertyRow.Table.Name)
40
+ if (delayedField.Row.Definition.Type == TupleDefinitionType.Property)
41
{
42
- string value = WixVariableResolver.ResolveDelayedVariables(propertyRow.SourceLineNumbers, (string)delayedField.Field.Data, this.VariableCache);
42
+ var value = WixVariableResolver.ResolveDelayedVariables(propertyRow.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache);
43
44
// update the variable cache with the new value
45
- string key = String.Concat("property.", Common.Demodularize(this.OutputType, this.ModularizationGuid, (string)propertyRow[0]));
45
+ var key = String.Concat("property.", Common.Demodularize(this.OutputType, this.ModularizationGuid, (string)propertyRow[0]));
46
this.VariableCache[key] = value;
47
48
// update the field data
49
- delayedField.Field.Data = value;
49
+ delayedField.Field.Set(value);
50
}
51
else
52
{
@@ -103,11 +103,12 @@ namespace WixToolset.Core.Bind
103
}
104
105
// process the remaining fields in case they refer to property binder variables
106
- foreach (DelayedField delayedField in deferredFields)
106
+ foreach (var delayedField in deferredFields)
107
{
108
try
109
{
110
- delayedField.Field.Data = WixVariableResolver.ResolveDelayedVariables(delayedField.Row.SourceLineNumbers, (string)delayedField.Field.Data, this.VariableCache);
110
+ var value = WixVariableResolver.ResolveDelayedVariables(delayedField.Row.SourceLineNumbers, delayedField.Field.AsString(), this.VariableCache);
111
+ delayedField.Field.Set(value);
112
}
113
catch (WixException we)
114
{
src/WixToolset.Core/Bind/ResolveFieldsCommand.cs
+46
-21
@@ -2,6 +2,7 @@
2
3
namespace WixToolset.Core.Bind
4
{
5
+ using System;
6
using System.Collections.Generic;
7
using WixToolset.Data;
8
using WixToolset.Data.Bind;
@@ -24,7 +25,7 @@ namespace WixToolset.Core.Bind
25
26
public string IntermediateFolder { private get; set; }
27
27
- public TableIndexedCollection Tables { private get; set; }
28
+ public Intermediate Intermediate { private get; set; }
29
30
public bool SupportDelayedResolution { private get; set; }
31
@@ -36,25 +37,39 @@ namespace WixToolset.Core.Bind
37
38
var fileResolver = new FileResolver(this.BindPaths, this.Extensions);
39
39
- foreach (Table table in this.Tables)
40
+ foreach (var sections in this.Intermediate.Sections)
41
{
41
- foreach (Row row in table.Rows)
42
+ foreach (var row in sections.Tuples)
43
{
43
- foreach (Field field in row.Fields)
44
+ foreach (var field in row.Fields)
45
{
45
- bool isDefault = true;
46
- bool delayedResolve = false;
46
+ if (field == null)
47
+ {
48
+ continue;
49
+ }
50
+
51
+ var isDefault = true;
52
+ var delayedResolve = false;
53
54
// Check to make sure we're in a scenario where we can handle variable resolution.
55
if (null != delayedFields)
56
{
57
// resolve localization and wix variables
52
- if (field.Data is string)
58
+ if (field.Type == IntermediateFieldType.String)
59
{
54
- field.Data = this.BindVariableResolver.ResolveVariables(row.SourceLineNumbers, field.AsString(), false, out isDefault, out delayedResolve);
55
- if (delayedResolve)
60
+ var original = field.AsString();
61
+ if (!String.IsNullOrEmpty(original))
62
{
57
- delayedFields.Add(new DelayedField(row, field));
63
+ var value = this.BindVariableResolver.ResolveVariables(row.SourceLineNumbers, original, false, out isDefault, out delayedResolve);
64
+ if (original != value)
65
+ {
66
+ field.Set(value);
67
+ }
68
+
69
+ if (delayedResolve)
70
+ {
71
+ delayedFields.Add(new DelayedField(row, field));
72
+ }
73
}
74
}
75
}
@@ -66,44 +81,51 @@ namespace WixToolset.Core.Bind
81
}
82
83
// Resolve file paths
69
- if (ColumnType.Object == field.Column.Type)
84
+ if (field.Type == IntermediateFieldType.Path)
85
{
71
- ObjectField objectField = (ObjectField)field;
86
+ var objectField = field.AsPath();
87
88
+#if REVISIT_FOR_PATCHING
89
// Skip file resolution if the file is to be deleted.
90
if (RowOperation.Delete == row.Operation)
91
{
92
continue;
93
}
94
+#endif
95
96
// File is embedded and path to it was not modified above.
97
if (objectField.EmbeddedFileIndex.HasValue && isDefault)
98
{
82
- string extractPath = this.FilesWithEmbeddedFiles.AddEmbeddedFileIndex(objectField.BaseUri, objectField.EmbeddedFileIndex.Value, this.IntermediateFolder);
99
+ var extractPath = this.FilesWithEmbeddedFiles.AddEmbeddedFileIndex(objectField.BaseUri, objectField.EmbeddedFileIndex.Value, this.IntermediateFolder);
100
101
// Set the path to the embedded file once where it will be extracted.
85
- objectField.Data = extractPath;
102
+ field.Set(extractPath);
103
}
87
- else if (null != objectField.Data) // non-compressed file (or localized value)
104
+ else if (null != objectField.Path) // non-compressed file (or localized value)
105
{
106
try
107
{
108
if (!this.BuildingPatch) // Normal binding for non-Patch scenario such as link (light.exe)
109
{
110
+#if REVISIT_FOR_PATCHING
111
// keep a copy of the un-resolved data for future replay. This will be saved into wixpdb file
112
if (null == objectField.UnresolvedData)
113
{
114
objectField.UnresolvedData = (string)objectField.Data;
115
}
116
+#endif
117
118
// resolve the path to the file
100
- objectField.Data = fileResolver.ResolveFile((string)objectField.Data, table.Name, row.SourceLineNumbers, BindStage.Normal);
119
+ var value = fileResolver.ResolveFile(objectField.Path, row.Definition.Name, row.SourceLineNumbers, BindStage.Normal);
120
+ field.Set(value);
121
}
122
else if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated) // Normal binding for Patch Scenario (normal patch, no re-basing logic)
123
{
124
// resolve the path to the file
105
- objectField.Data = fileResolver.ResolveFile((string)objectField.Data, table.Name, row.SourceLineNumbers, BindStage.Normal);
125
+ var value = fileResolver.ResolveFile(objectField.Path, row.Definition.Name, row.SourceLineNumbers, BindStage.Normal);
126
+ field.Set(value);
127
}
128
+#if REVISIT_FOR_PATCHING
129
else // Re-base binding path scenario caused by pyro.exe -bt -bu
130
{
131
// by default, use the resolved Data for file lookup
@@ -122,16 +144,18 @@ namespace WixToolset.Core.Bind
144
}
145
}
146
125
- objectField.Data = fileResolver.ResolveFile(filePathToResolve, table.Name, row.SourceLineNumbers, BindStage.Updated);
147
+ objectField.Data = fileResolver.ResolveFile(filePathToResolve, row.Definition.Name, row.SourceLineNumbers, BindStage.Updated);
148
}
149
+#endif
150
}
151
catch (WixFileNotFoundException)
152
{
153
// display the error with source line information
131
- Messaging.Instance.OnMessage(WixErrors.FileNotFound(row.SourceLineNumbers, (string)objectField.Data));
154
+ Messaging.Instance.OnMessage(WixErrors.FileNotFound(row.SourceLineNumbers, objectField.Path));
155
}
156
}
157
158
+#if REVISIT_FOR_PATCHING
159
if (null != objectField.PreviousData)
160
{
161
objectField.PreviousData = this.BindVariableResolver.ResolveVariables(row.SourceLineNumbers, objectField.PreviousData, false, out isDefault);
@@ -159,7 +183,7 @@ namespace WixToolset.Core.Bind
183
if (!fileResolver.RebaseTarget && !fileResolver.RebaseUpdated)
184
{
185
// resolve the path to the file
162
- objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, table.Name, row.SourceLineNumbers, BindStage.Normal);
186
+ objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, row.Definition.Name, row.SourceLineNumbers, BindStage.Normal);
187
}
188
else
189
{
@@ -177,7 +201,7 @@ namespace WixToolset.Core.Bind
201
}
202
203
// resolve the path to the file
180
- objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, table.Name, row.SourceLineNumbers, BindStage.Target);
204
+ objectField.PreviousData = fileResolver.ResolveFile((string)objectField.PreviousData, row.Definition.Name, row.SourceLineNumbers, BindStage.Target);
205
206
}
207
}
@@ -189,6 +213,7 @@ namespace WixToolset.Core.Bind
213
}
214
}
215
}
216
+#endif
217
}
218
}
219
}
src/WixToolset.Core/BindContext.cs
+1
-1
@@ -41,7 +41,7 @@ namespace WixToolset.Core
41
42
public string IntermediateFolder { get; set; }
43
44
- public Output IntermediateRepresentation { get; set; }
44
+ public Intermediate IntermediateRepresentation { get; set; }
45
46
public string OutputPath { get; set; }
47
src/WixToolset.Core/Binder.cs
+29
-25
@@ -14,7 +14,7 @@ namespace WixToolset.Core
14
using WixToolset.Core.Bind;
15
using WixToolset.Data;
16
using WixToolset.Data.Bind;
17
- using WixToolset.Data.Rows;
17
+ using WixToolset.Data.Tuples;
18
using WixToolset.Extensibility;
19
using WixToolset.Extensibility.Services;
20
@@ -43,16 +43,9 @@ namespace WixToolset.Core
43
//this.SuppressIces = new List<string>();
44
}
45
46
- public Binder(IBindContext context)
47
- {
48
- this.Context = context;
49
-
50
- this.TableDefinitions = WindowsInstallerStandard.GetTableDefinitions();
51
- }
52
-
53
- private IBindContext Context { get; }
46
+ private IBindContext Context { get; set; }
47
55
- private TableDefinitionCollection TableDefinitions { get; }
48
+ //private TableDefinitionCollection TableDefinitions { get; }
49
50
//public IEnumerable<IBackendFactory> BackendFactories { get; set; }
51
@@ -173,8 +166,10 @@ namespace WixToolset.Core
166
// this.fileManagers.Add(extension);
167
//}
168
176
- public bool Bind()
169
+ public bool Bind(IBindContext context)
170
{
171
+ this.Context = context;
172
+
173
//if (!String.IsNullOrEmpty(this.Context.FileManagerCore.CabCachePath))
174
//{
175
// Directory.CreateDirectory(this.Context.FileManagerCore.CabCachePath);
@@ -225,7 +220,7 @@ namespace WixToolset.Core
220
221
private ResolveResult Resolve()
222
{
228
- var buildingPatch = (this.Context.IntermediateRepresentation.Type == OutputType.Patch);
223
+ var buildingPatch = this.Context.IntermediateRepresentation.Sections.Any(s => s.Type == SectionType.Patch);
224
225
var filesWithEmbeddedFiles = new ExtractEmbeddedFiles();
226
@@ -238,13 +233,14 @@ namespace WixToolset.Core
233
command.Extensions = this.Context.Extensions;
234
command.FilesWithEmbeddedFiles = filesWithEmbeddedFiles;
235
command.IntermediateFolder = this.Context.IntermediateFolder;
241
- command.Tables = this.Context.IntermediateRepresentation.Tables;
236
+ command.Intermediate = this.Context.IntermediateRepresentation;
237
command.SupportDelayedResolution = true;
238
command.Execute();
239
240
delayedFields = command.DelayedFields;
241
}
242
243
+#if REVISIT_FOR_PATCHING
244
if (this.Context.IntermediateRepresentation.SubStorages != null)
245
{
246
foreach (SubStorage transform in this.Context.IntermediateRepresentation.SubStorages)
@@ -256,11 +252,12 @@ namespace WixToolset.Core
252
command.Extensions = this.Context.Extensions;
253
command.FilesWithEmbeddedFiles = filesWithEmbeddedFiles;
254
command.IntermediateFolder = this.Context.IntermediateFolder;
259
- command.Tables = transform.Data.Tables;
255
+ command.Intermediate = this.Context.IntermediateRepresentation;
256
command.SupportDelayedResolution = false;
257
command.Execute();
258
}
259
}
260
+#endif
261
262
var expectedEmbeddedFiles = filesWithEmbeddedFiles.GetExpectedEmbeddedFiles();
263
@@ -275,9 +272,11 @@ namespace WixToolset.Core
272
{
273
var backendFactories = this.Context.ExtensionManager.Create<IBackendFactory>();
274
275
+ var entrySection = this.Context.IntermediateRepresentation.Sections[0];
276
+
277
foreach (var factory in backendFactories)
278
{
280
- if (factory.TryCreateBackend(this.Context.IntermediateRepresentation.Type.ToString(), this.Context.OutputPath, null, out var backend))
279
+ if (factory.TryCreateBackend(entrySection.Type.ToString(), this.Context.OutputPath, null, out var backend))
280
{
281
var result = backend.Bind(this.Context);
282
return result;
@@ -288,6 +287,7 @@ namespace WixToolset.Core
287
288
return null;
289
}
290
+
291
private void Layout(BindResult result)
292
{
293
try
@@ -461,25 +461,28 @@ namespace WixToolset.Core
461
/// </summary>
462
/// <param name="output">The output.</param>
463
/// <param name="databaseFile">The output file if OutputFile not set.</param>
464
- private void WriteBuildInfoTable(Output output, string outputFile)
464
+ private void WriteBuildInfoTable(Intermediate output, string outputFile)
465
{
466
- Table buildInfoTable = output.EnsureTable(this.TableDefinitions["WixBuildInfo"]);
467
- Row buildInfoRow = buildInfoTable.CreateRow(null);
466
+ var entrySection = output.Sections.First(s => s.Type != SectionType.Fragment);
467
468
Assembly executingAssembly = Assembly.GetExecutingAssembly();
469
FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(executingAssembly.Location);
471
- buildInfoRow[0] = fileVersion.FileVersion;
472
- buildInfoRow[1] = outputFile;
470
+
471
+ var buildInfoRow = new WixBuildInfoTuple();
472
+ buildInfoRow.WixVersion = fileVersion.FileVersion;
473
+ buildInfoRow.WixOutputFile = outputFile;
474
475
if (!String.IsNullOrEmpty(this.Context.WixprojectFile))
476
{
476
- buildInfoRow[2] = this.Context.WixprojectFile;
477
+ buildInfoRow.WixProjectFile = this.Context.WixprojectFile;
478
}
479
480
if (!String.IsNullOrEmpty(this.Context.OutputPdbPath))
481
{
481
- buildInfoRow[3] = this.Context.OutputPdbPath;
482
+ buildInfoRow.WixPdbFile = this.Context.OutputPdbPath;
483
}
484
+
485
+ entrySection.Tuples.Add(buildInfoRow);
486
}
487
488
#if DELETE_THIS_CODE
@@ -720,7 +723,7 @@ namespace WixToolset.Core
723
/// </summary>
724
/// <param name="path">Path to write file.</param>
725
/// <param name="payloads">Collection of payloads whose source will be written to file.</param>
723
- private void CreateContentsFile(string path, IEnumerable<WixBundlePayloadRow> payloads)
726
+ private void CreateContentsFile(string path, IEnumerable<WixBundlePayloadTuple> payloads)
727
{
728
string directory = Path.GetDirectoryName(path);
729
if (!Directory.Exists(directory))
@@ -730,11 +733,12 @@ namespace WixToolset.Core
733
734
using (StreamWriter contents = new StreamWriter(path, false))
735
{
733
- foreach (WixBundlePayloadRow payload in payloads)
736
+ foreach (var payload in payloads)
737
{
738
if (payload.ContentFile)
739
{
737
- contents.WriteLine(payload.FullFileName);
740
+ var fullPath = Path.GetFullPath(payload.SourceFile);
741
+ contents.WriteLine(fullPath);
742
}
743
}
744
}
src/WixToolset.Core/BinderCore.cs
-14
@@ -10,14 +10,6 @@ namespace WixToolset
10
/// </summary>
11
internal class BinderCore : IBinderCore
12
{
13
- /// <summary>
14
- /// Constructor for binder core.
15
- /// </summary>
16
- internal BinderCore()
17
- {
18
- this.TableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
19
- }
20
-
13
public IBinderFileManagerCore FileManagerCore { get; set; }
14
15
/// <summary>
@@ -29,12 +21,6 @@ namespace WixToolset
21
get { return Messaging.Instance.EncounteredError; }
22
}
23
32
- /// <summary>
33
- /// Gets the table definitions used by the Binder.
34
- /// </summary>
35
- /// <value>Table definitions used by the binder.</value>
36
- public TableDefinitionCollection TableDefinitions { get; private set; }
37
-
24
/// <summary>
25
/// Generate an identifier by hashing data from the row.
26
/// </summary>
src/WixToolset.Core/BinderFileManagerCore.cs
+2
-2
@@ -34,13 +34,13 @@ namespace WixToolset
34
/// Gets or sets the active subStorage used for binding.
35
/// </summary>
36
/// <value>The subStorage object.</value>
37
- public SubStorage ActiveSubStorage { get; set; }
37
+ //public SubStorage ActiveSubStorage { get; set; }
38
39
/// <summary>
40
/// Gets or sets the output object used for binding.
41
/// </summary>
42
/// <value>The output object.</value>
43
- public Output Output { get; set; }
43
+ public Intermediate Intermediate { get; set; }
44
45
/// <summary>
46
/// Gets or sets the path to the temp files location.
src/WixToolset.Core/CommandLine/BuildCommand.cs
+50
-42
@@ -7,7 +7,7 @@ namespace WixToolset.Core
7
using System.IO;
8
using System.Linq;
9
using WixToolset.Data;
10
- using WixToolset.Data.Rows;
10
+ using WixToolset.Data.Tuples;
11
using WixToolset.Extensibility;
12
using WixToolset.Extensibility.Services;
13
@@ -79,21 +79,19 @@ namespace WixToolset.Core
79
return 1;
80
}
81
82
- var tableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
83
-
82
if (this.OutputType == OutputType.Library)
83
{
86
- var library = this.LibraryPhase(intermediates, tableDefinitions);
84
+ var library = this.LibraryPhase(intermediates);
85
86
library?.Save(this.OutputPath);
87
}
88
else
89
{
92
- var output = this.LinkPhase(intermediates, tableDefinitions);
90
+ var output = this.LinkPhase(intermediates);
91
92
if (!Messaging.Instance.EncounteredError)
93
{
96
- this.BindPhase(output, tableDefinitions);
94
+ this.BindPhase(output);
95
}
96
}
97
@@ -104,15 +102,26 @@ namespace WixToolset.Core
102
{
103
var intermediates = new List<Intermediate>();
104
107
- var preprocessor = new Preprocessor();
108
-
109
- var compiler = new Compiler();
105
106
foreach (var sourceFile in this.SourceFiles)
107
{
108
+ //var preprocessContext = this.ServiceProvider.GetService<IPreprocessContext>();
109
+ //preprocessContext.SourcePath = sourceFile.SourcePath;
110
+ //preprocessContext.Variables = this.PreprocessorVariables;
111
+
112
+ var preprocessor = new Preprocessor();
113
var document = preprocessor.Process(sourceFile.SourcePath, this.PreprocessorVariables);
114
115
- var intermediate = compiler.Compile(document);
115
+ var compileContext = this.ServiceProvider.GetService<ICompileContext>();
116
+ compileContext.Messaging = Messaging.Instance;
117
+ compileContext.CompilationId = Guid.NewGuid().ToString("N");
118
+ compileContext.Extensions = this.ExtensionManager.Create<ICompilerExtension>();
119
+ compileContext.OutputPath = sourceFile.OutputPath;
120
+ compileContext.Platform = Platform.X86; // TODO: set this correctly
121
+ compileContext.Source = document;
122
+
123
+ var compiler = new Compiler();
124
+ var intermediate = compiler.Compile(compileContext);
125
126
intermediates.Add(intermediate);
127
}
@@ -120,9 +129,9 @@ namespace WixToolset.Core
129
return intermediates;
130
}
131
123
- private Library LibraryPhase(IEnumerable<Intermediate> intermediates, TableDefinitionCollection tableDefinitions)
132
+ private Intermediate LibraryPhase(IEnumerable<Intermediate> intermediates)
133
{
125
- var localizations = this.LoadLocalizationFiles(tableDefinitions).ToList();
134
+ var localizations = this.LoadLocalizationFiles().ToList();
135
136
// If there was an error adding localization files, then bail.
137
if (Messaging.Instance.EncounteredError)
@@ -137,35 +146,34 @@ namespace WixToolset.Core
146
context.BindPaths = this.BindPaths;
147
context.Extensions = this.ExtensionManager.Create<ILibrarianExtension>();
148
context.Localizations = localizations;
140
- context.Sections = intermediates.SelectMany(i => i.Sections).ToList();
149
+ context.LibraryId = Guid.NewGuid().ToString("N");
150
+ context.Intermediates = intermediates;
151
context.WixVariableResolver = resolver;
152
143
- var librarian = new Librarian(context);
144
-
145
- return librarian.Combine();
153
+ var librarian = new Librarian();
154
+ return librarian.Combine(context);
155
}
156
148
- private Output LinkPhase(IEnumerable<Intermediate> intermediates, TableDefinitionCollection tableDefinitions)
157
+ private Intermediate LinkPhase(IEnumerable<Intermediate> intermediates)
158
{
150
- var sections = intermediates.SelectMany(i => i.Sections).ToList();
151
-
152
- sections.AddRange(this.SectionsFromLibraries(tableDefinitions));
159
+ var creator = this.ServiceProvider.GetService<ITupleDefinitionCreator>();
160
154
- var linker = new Linker();
155
-
156
- foreach (var data in this.ExtensionManager.Create<IExtensionData>())
157
- {
158
- linker.AddExtensionData(data);
159
- }
161
+ var libraries = this.LoadLibraries(creator);
162
161
- var output = linker.Link(sections, this.OutputType);
163
+ var context = this.ServiceProvider.GetService<ILinkContext>();
164
+ context.Messaging = Messaging.Instance;
165
+ context.Extensions = this.ExtensionManager.Create<ILinkerExtension>();
166
+ context.Intermediates = intermediates.Union(libraries).ToList();
167
+ context.ExpectedOutputType = this.OutputType;
168
169
+ var linker = new Linker();
170
+ var output = linker.Link(context);
171
return output;
172
}
173
166
- private void BindPhase(Output output, TableDefinitionCollection tableDefinitions)
174
+ private void BindPhase(Intermediate output)
175
{
168
- var localizations = this.LoadLocalizationFiles(tableDefinitions).ToList();
176
+ var localizations = this.LoadLocalizationFiles().ToList();
177
178
var localizer = new Localizer(localizations);
179
@@ -199,13 +207,13 @@ namespace WixToolset.Core
207
context.BuiltOutputsFile = this.BuiltOutputsFile;
208
context.WixprojectFile = this.WixProjectFile;
209
202
- var binder = new Binder(context);
203
- binder.Bind();
210
+ var binder = new Binder();
211
+ binder.Bind(context);
212
}
213
206
- private IEnumerable<Section> SectionsFromLibraries(TableDefinitionCollection tableDefinitions)
214
+ private IEnumerable<Intermediate> LoadLibraries(ITupleDefinitionCreator creator)
215
{
208
- var sections = new List<Section>();
216
+ var libraries = new List<Intermediate>();
217
218
if (this.LibraryFiles != null)
219
{
@@ -213,9 +221,9 @@ namespace WixToolset.Core
221
{
222
try
223
{
216
- var library = Library.Load(libraryFile, tableDefinitions, false);
224
+ var library = Intermediate.Load(libraryFile, creator);
225
218
- sections.AddRange(library.Sections);
226
+ libraries.Add(library);
227
}
228
catch (WixCorruptFileException e)
229
{
@@ -228,28 +236,28 @@ namespace WixToolset.Core
236
}
237
}
238
231
- return sections;
239
+ return libraries;
240
}
241
234
- private IEnumerable<Localization> LoadLocalizationFiles(TableDefinitionCollection tableDefinitions)
242
+ private IEnumerable<Localization> LoadLocalizationFiles()
243
{
244
foreach (var loc in this.LocFiles)
245
{
238
- var localization = Localizer.ParseLocalizationFile(loc, tableDefinitions);
246
+ var localization = Localizer.ParseLocalizationFile(loc);
247
248
yield return localization;
249
}
250
}
251
244
- private static WixVariableResolver CreateWixResolverWithVariables(Localizer localizer, Output output)
252
+ private static WixVariableResolver CreateWixResolverWithVariables(Localizer localizer, Intermediate output)
253
{
254
var resolver = new WixVariableResolver(localizer);
255
256
// Gather all the wix variables.
249
- Table wixVariableTable = output?.Tables["WixVariable"];
250
- if (null != wixVariableTable)
257
+ var wixVariables = output?.Sections.SelectMany(s => s.Tuples).OfType<WixVariableTuple>();
258
+ if (wixVariables != null)
259
{
252
- foreach (WixVariableRow wixVariableRow in wixVariableTable.Rows)
260
+ foreach (var wixVariableRow in wixVariables)
261
{
262
resolver.AddVariable(wixVariableRow);
263
}
src/WixToolset.Core/CommandLine/CommandLine.cs
+1
-1
@@ -218,7 +218,7 @@ namespace WixToolset.Core
218
{
219
var sourceFiles = GatherSourceFiles(files, outputFolder);
220
var variables = GatherPreprocessorVariables(defines);
221
- return new CompileCommand(sourceFiles, variables);
221
+ return new CompileCommand(this.ServiceProvider, this.ExtensionManager, sourceFiles, variables);
222
}
223
}
224
src/WixToolset.Core/CommandLine/CompileCommand.cs
+21
-6
@@ -2,32 +2,47 @@
2
3
namespace WixToolset.Core
4
{
5
+ using System;
6
using System.Collections.Generic;
7
+ using WixToolset.Data;
8
+ using WixToolset.Extensibility;
9
using WixToolset.Extensibility.Services;
10
11
internal class CompileCommand : ICommandLineCommand
12
{
10
- public CompileCommand(IEnumerable<SourceFile> sources, IDictionary<string, string> preprocessorVariables)
13
+ public CompileCommand(IServiceProvider serviceProvider, IExtensionManager extensions, IEnumerable<SourceFile> sources, IDictionary<string, string> preprocessorVariables)
14
{
15
this.PreprocessorVariables = preprocessorVariables;
16
+ this.ServiceProvider = serviceProvider;
17
+ this.ExtensionManager = extensions;
18
this.SourceFiles = sources;
19
}
20
21
+ private IServiceProvider ServiceProvider { get; }
22
+
23
+ private IExtensionManager ExtensionManager { get; }
24
+
25
private IEnumerable<SourceFile> SourceFiles { get; }
26
27
private IDictionary<string, string> PreprocessorVariables { get; }
28
29
public int Execute()
30
{
22
- var preprocessor = new Preprocessor();
23
-
24
- var compiler = new Compiler();
25
-
31
foreach (var sourceFile in this.SourceFiles)
32
{
33
+ var preprocessor = new Preprocessor();
34
var document = preprocessor.Process(sourceFile.SourcePath, this.PreprocessorVariables);
35
30
- var intermediate = compiler.Compile(document);
36
+ var compileContext = this.ServiceProvider.GetService<ICompileContext>();
37
+ compileContext.Messaging = Messaging.Instance;
38
+ compileContext.CompilationId = Guid.NewGuid().ToString("N");
39
+ compileContext.Extensions = this.ExtensionManager.Create<ICompilerExtension>();
40
+ compileContext.OutputPath = sourceFile.OutputPath;
41
+ compileContext.Platform = Platform.X86; // TODO: set this correctly
42
+ compileContext.Source = document;
43
+
44
+ var compiler = new Compiler();
45
+ var intermediate = compiler.Compile(compileContext);
46
47
intermediate.Save(sourceFile.OutputPath);
48
}
src/WixToolset.Core/CompileContext.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.Core
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using System.Xml.Linq;
8
+ using WixToolset.Data;
9
+ using WixToolset.Extensibility;
10
+
11
+ public class CompileContext : ICompileContext
12
+ {
13
+ internal CompileContext(IServiceProvider serviceProvider)
14
+ {
15
+ this.ServiceProvider = serviceProvider;
16
+ }
17
+
18
+ public IServiceProvider ServiceProvider { get; }
19
+
20
+ public Messaging Messaging { get; set; }
21
+
22
+ public string CompilationId { get; set; }
23
+
24
+ public IEnumerable<ICompilerExtension> Extensions { get; set; }
25
+
26
+ public string OutputPath { get; set; }
27
+
28
+ public Platform Platform { get; set; }
29
+
30
+ public XDocument Source { get; set; }
31
+ }
32
+}
src/WixToolset.Core/Compiler.cs
+3552
-3605
@@ -14,8 +14,9 @@ namespace WixToolset
14
using WixToolset.Core;
15
using WixToolset.Core.Native;
16
using WixToolset.Data;
17
- using WixToolset.Data.Rows;
17
+ using WixToolset.Data.Tuples;
18
using WixToolset.Extensibility;
19
+ using WixToolset.Extensibility.Services;
20
using Wix = WixToolset.Data.Serialize;
21
22
/// <summary>
@@ -39,12 +40,6 @@ namespace WixToolset
40
private const string BURN_BUNDLE_ORIGINAL_SOURCE_FOLDER = "WixBundleOriginalSourceFolder";
41
private const string BURN_BUNDLE_LAST_USED_SOURCE = "WixBundleLastUsedSource";
42
42
- private TableDefinitionCollection tableDefinitions;
43
- private Dictionary<XNamespace, ICompilerExtension> extensions;
44
- private List<InspectorExtension> inspectorExtensions;
45
- private CompilerCore core;
46
- private bool showPedanticMessages;
47
-
43
// if these are true you know you are building a module or product
44
// but if they are false you cannot not be sure they will not end
45
// up a product or module. Use these flags carefully.
@@ -57,18 +52,6 @@ namespace WixToolset
52
53
private WixVariableResolver componentIdPlaceholdersResolver;
54
60
- /// <summary>
61
- /// Creates a new compiler object with a default set of table definitions.
62
- /// </summary>
63
- public Compiler()
64
- {
65
- this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
66
- this.extensions = new Dictionary<XNamespace, ICompilerExtension>();
67
- this.inspectorExtensions = new List<InspectorExtension>();
68
-
69
- this.CurrentPlatform = Platform.X86;
70
- }
71
-
55
/// <summary>
56
/// Type of RadioButton element in a group.
57
/// </summary>
@@ -87,99 +70,68 @@ namespace WixToolset
70
Icon,
71
}
72
73
+ private ICompileContext Context { get; set; }
74
+
75
+ private CompilerCore Core { get; set; }
76
+
77
/// <summary>
78
/// Gets or sets the platform which the compiler will use when defaulting 64-bit attributes and elements.
79
/// </summary>
80
/// <value>The platform which the compiler will use when defaulting 64-bit attributes and elements.</value>
94
- public Platform CurrentPlatform { get; set; }
81
+ public Platform CurrentPlatform => this.Context.Platform;
82
83
/// <summary>
84
/// Gets or sets the option to show pedantic messages.
85
/// </summary>
86
/// <value>The option to show pedantic messages.</value>
100
- public bool ShowPedanticMessages
101
- {
102
- get { return this.showPedanticMessages; }
103
- set { this.showPedanticMessages = value; }
104
- }
87
+ public bool ShowPedanticMessages { get; set; }
88
89
/// <summary>
107
- /// Adds a compiler extension.
90
+ /// Compiles the provided Xml document into an intermediate object
91
/// </summary>
109
- /// <param name="extension">The extension to add.</param>
110
- public void AddExtension(ICompilerExtension extension)
92
+ /// <param name="context">Context for the compile. The BaseURI property
93
+ /// should be properly set to get messages containing source line information.</param>
94
+ /// <returns>Intermediate object representing compiled source document.</returns>
95
+ /// <remarks>This method is not thread-safe.</remarks>
96
+ public Intermediate Compile(ICompileContext context)
97
{
112
- // Check if this extension is adding a schema namespace that already exists.
113
- ICompilerExtension collidingExtension;
114
- if (!this.extensions.TryGetValue(extension.Namespace, out collidingExtension))
115
- {
116
- this.extensions.Add(extension.Namespace, extension);
117
- }
118
- else
98
+ this.Context = context ?? throw new ArgumentNullException(nameof(context));
99
+
100
+ var target = new Intermediate();
101
+
102
+ if (String.IsNullOrEmpty(context.CompilationId))
103
{
120
- Messaging.Instance.OnMessage(WixErrors.DuplicateExtensionXmlSchemaNamespace(extension.GetType().ToString(), extension.Namespace.NamespaceName, collidingExtension.GetType().ToString()));
104
+ this.Context.CompilationId = target.Id;
105
}
106
123
- //if (null != extension.InspectorExtension)
124
- //{
125
- // this.inspectorExtensions.Add(extension.InspectorExtension);
126
- //}
127
- }
107
+ var extensionsByNamespace = new Dictionary<XNamespace, ICompilerExtension>();
108
129
- /// <summary>
130
- /// Adds table definitions from an extension
131
- /// </summary>
132
- /// <param name="extension">Extension with table definitions.</param>
133
- public void AddExtensionData(IExtensionData extension)
134
- {
135
- if (null != extension.TableDefinitions)
109
+ foreach (var extension in this.Context.Extensions)
110
{
137
- foreach (TableDefinition tableDefinition in extension.TableDefinitions)
111
+ if (!extensionsByNamespace.TryGetValue(extension.Namespace, out var collidingExtension))
112
{
139
- if (!this.tableDefinitions.Contains(tableDefinition.Name))
140
- {
141
- this.tableDefinitions.Add(tableDefinition);
142
- }
143
- else
144
- {
145
- Messaging.Instance.OnMessage(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
146
- }
113
+ extensionsByNamespace.Add(extension.Namespace, extension);
114
+ }
115
+ else
116
+ {
117
+ Messaging.Instance.OnMessage(WixErrors.DuplicateExtensionXmlSchemaNamespace(extension.GetType().ToString(), extension.Namespace.NamespaceName, collidingExtension.GetType().ToString()));
118
}
148
- }
149
- }
150
-
151
- /// <summary>
152
- /// Compiles the provided Xml document into an intermediate object
153
- /// </summary>
154
- /// <param name="source">Source xml document to compile. The BaseURI property
155
- /// should be properly set to get messages containing source line information.</param>
156
- /// <returns>Intermediate object representing compiled source document.</returns>
157
- /// <remarks>This method is not thread-safe.</remarks>
158
- [SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes")]
159
- public Intermediate Compile(XDocument source)
160
- {
161
- if (null == source) throw new ArgumentNullException(nameof(source));
162
-
163
- bool encounteredError = false;
119
165
- // create the intermediate
166
- Intermediate target = new Intermediate();
120
+ extension.PreCompile(context);
121
+ }
122
168
- // try to compile it
123
+ // Try to compile it.
124
try
125
{
171
- this.core = new CompilerCore(target, this.tableDefinitions, this.extensions);
172
- this.core.ShowPedanticMessages = this.showPedanticMessages;
173
- this.core.CurrentPlatform = this.CurrentPlatform;
174
- this.componentIdPlaceholdersResolver = new WixVariableResolver();
126
+ var creator = context.ServiceProvider.GetService<ITupleDefinitionCreator>();
127
176
- foreach (CompilerExtension extension in this.extensions.Values)
177
- {
178
- extension.Core = this.core;
179
- extension.Initialize();
180
- }
128
+ this.Core = new CompilerCore(target, creator, extensionsByNamespace);
129
+ this.Core.CurrentPlatform = this.Context.Platform;
130
+ this.Core.ShowPedanticMessages = this.ShowPedanticMessages;
131
+ this.componentIdPlaceholdersResolver = new WixVariableResolver();
132
133
// parse the document
134
+ var source = context.Source;
135
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(source.Root);
136
if ("Wix" == source.Root.Name.LocalName)
137
{
@@ -191,17 +143,17 @@ namespace WixToolset
143
{
144
if (String.IsNullOrEmpty(source.Root.Name.NamespaceName))
145
{
194
- this.core.OnMessage(WixErrors.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", CompilerCore.WixNamespace.ToString()));
146
+ this.Core.OnMessage(WixErrors.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", CompilerCore.WixNamespace.ToString()));
147
}
148
else
149
{
198
- this.core.OnMessage(WixErrors.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", source.Root.Name.NamespaceName, CompilerCore.WixNamespace.ToString()));
150
+ this.Core.OnMessage(WixErrors.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", source.Root.Name.NamespaceName, CompilerCore.WixNamespace.ToString()));
151
}
152
}
153
}
154
else
155
{
204
- this.core.OnMessage(WixErrors.InvalidDocumentElement(sourceLineNumbers, source.Root.Name.LocalName, "source", "Wix"));
156
+ this.Core.OnMessage(WixErrors.InvalidDocumentElement(sourceLineNumbers, source.Root.Name.LocalName, "source", "Wix"));
157
}
158
159
// Resolve any Component Id placeholders compiled into the intermediate.
@@ -209,55 +161,38 @@ namespace WixToolset
161
{
162
foreach (var section in target.Sections)
163
{
212
- foreach (Table table in section.Tables)
164
+ foreach (var tuple in section.Tuples)
165
{
214
- foreach (Row row in table.Rows)
166
+ foreach (var field in tuple.Fields)
167
{
216
- foreach (Field field in row.Fields)
168
+ if (field != null && field.Type == IntermediateFieldType.String)
169
{
218
- if (field.Data is string)
170
+ var data = field.AsString();
171
+ if (!String.IsNullOrEmpty(data))
172
{
220
- field.Data = this.componentIdPlaceholdersResolver.ResolveVariables(row.SourceLineNumbers, (string)field.Data, false, false, out var defaultIgnored, out var delayedIgnored);
173
+ var resolved = this.componentIdPlaceholdersResolver.ResolveVariables(tuple.SourceLineNumbers, data, false, false, out var defaultIgnored, out var delayedIgnored);
174
+ if (data != resolved)
175
+ {
176
+ field.Set(resolved);
177
+ }
178
}
179
}
180
}
181
}
182
}
183
}
227
-
228
- // inspect the document
229
- InspectorCore inspectorCore = new InspectorCore();
230
- foreach (InspectorExtension inspectorExtension in this.inspectorExtensions)
231
- {
232
- inspectorExtension.Core = inspectorCore;
233
- inspectorExtension.InspectIntermediate(target);
234
-
235
- // reset
236
- inspectorExtension.Core = null;
237
- }
238
-
239
- if (inspectorCore.EncounteredError)
240
- {
241
- encounteredError = true;
242
- }
184
}
185
finally
186
{
246
- if (this.core.EncounteredError)
187
+ foreach (var extension in context.Extensions)
188
{
248
- encounteredError = true;
189
+ extension.PostCompile(target);
190
}
191
251
- foreach (CompilerExtension extension in this.extensions.Values)
252
- {
253
- extension.Finish();
254
- extension.Core = null;
255
- }
256
- this.core = null;
192
+ this.Core = null;
193
}
194
259
- // return the compiled intermediate only if it completed successfully
260
- return (encounteredError ? null : target);
195
+ return Messaging.Instance.EncounteredError ? null : target;
196
}
197
198
/// <summary>
@@ -299,7 +234,7 @@ namespace WixToolset
234
}
235
else
236
{
302
- if (this.core.IsValidShortFilename(longName, false))
237
+ if (this.Core.IsValidShortFilename(longName, false))
238
{
239
return longName;
240
}
@@ -318,15 +253,15 @@ namespace WixToolset
253
/// <param name="signature">Signature for search.</param>
254
private void AddAppSearch(SourceLineNumber sourceLineNumbers, Identifier property, string signature)
255
{
321
- if (!this.core.EncounteredError)
256
+ if (!this.Core.EncounteredError)
257
{
258
if (property.Id != property.Id.ToUpperInvariant())
259
{
325
- this.core.OnMessage(WixErrors.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
260
+ this.Core.OnMessage(WixErrors.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
261
}
262
328
- Row row = this.core.CreateRow(sourceLineNumbers, "AppSearch", property);
329
- row[1] = signature;
263
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppSearch, property);
264
+ row.Set(1, signature);
265
}
266
}
267
@@ -358,33 +293,33 @@ namespace WixToolset
293
Group group = match.Groups["identifier"];
294
if (group.Success)
295
{
361
- this.core.OnMessage(WixWarnings.PropertyValueContainsPropertyReference(sourceLineNumbers, property.Id, group.Value));
296
+ this.Core.OnMessage(WixWarnings.PropertyValueContainsPropertyReference(sourceLineNumbers, property.Id, group.Value));
297
}
298
}
299
}
300
366
- if (!this.core.EncounteredError)
301
+ if (!this.Core.EncounteredError)
302
{
368
- Section section = this.core.ActiveSection;
303
+ var section = this.Core.ActiveSection;
304
305
// Add the row to a separate section if requested.
306
if (fragment)
307
{
373
- string id = String.Concat(this.core.ActiveSection.Id, ".", property.Id);
308
+ string id = String.Concat(this.Core.ActiveSection.Id, ".", property.Id);
309
375
- section = this.core.CreateSection(id, SectionType.Fragment, this.core.ActiveSection.Codepage);
310
+ section = this.Core.CreateSection(id, SectionType.Fragment, this.Core.ActiveSection.Codepage, this.Context.CompilationId);
311
312
// Reference the property in the active section.
378
- this.core.CreateSimpleReference(sourceLineNumbers, "Property", property.Id);
313
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Property", property.Id);
314
}
315
381
- Row row = this.core.CreateRow(sourceLineNumbers, "Property", section, property);
316
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Property, section, property);
317
318
// Allow row to exist with no value so that PropertyRefs can be made for *Search elements
319
// the linker will remove these rows before the final output is created.
320
if (null != value)
321
{
387
- row[1] = value;
322
+ row.Set(1, value);
323
}
324
325
if (admin || hidden || secure)
@@ -394,26 +329,24 @@ namespace WixToolset
329
}
330
}
331
397
- private WixPropertyRow AddWixPropertyRow(SourceLineNumber sourceLineNumbers, Identifier property, bool admin, bool secure, bool hidden, Section section = null)
332
+ private void AddWixPropertyRow(SourceLineNumber sourceLineNumbers, Identifier property, bool admin, bool secure, bool hidden, IntermediateSection section = null)
333
{
334
if (secure && property.Id != property.Id.ToUpperInvariant())
335
{
401
- this.core.OnMessage(WixErrors.SecurePropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
336
+ this.Core.OnMessage(WixErrors.SecurePropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
337
}
338
339
if (null == section)
340
{
406
- section = this.core.ActiveSection;
341
+ section = this.Core.ActiveSection;
342
408
- this.core.EnsureTable(sourceLineNumbers, "Property"); // Property table is always required when using WixProperty table.
343
+ this.Core.EnsureTable(sourceLineNumbers, "Property"); // Property table is always required when using WixProperty table.
344
}
345
411
- WixPropertyRow row = (WixPropertyRow)this.core.CreateRow(sourceLineNumbers, "WixProperty", section, property);
346
+ var row = (WixPropertyTuple)this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixProperty, section, property);
347
row.Admin = admin;
348
row.Hidden = hidden;
349
row.Secure = secure;
415
-
416
- return row;
350
}
351
352
/// <summary>
@@ -425,7 +358,7 @@ namespace WixToolset
358
/// <param name="componentId">Identifier of parent component.</param>
359
private void RegisterImplementedCategories(SourceLineNumber sourceLineNumbers, string categoryId, string classId, string componentId)
360
{
428
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Implemented Categories\\", categoryId), "*", null, componentId);
361
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Implemented Categories\\", categoryId), "*", null, componentId);
362
}
363
364
/// <summary>
@@ -457,51 +390,51 @@ namespace WixToolset
390
switch (attrib.Name.LocalName)
391
{
392
case "Id":
460
- appId = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
393
+ appId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
394
break;
395
case "ActivateAtStorage":
463
- activateAtStorage = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
396
+ activateAtStorage = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
397
break;
398
case "Advertise":
466
- appIdAdvertise = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
399
+ appIdAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
400
break;
401
case "Description":
469
- description = this.core.GetAttributeValue(sourceLineNumbers, attrib);
402
+ description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
403
break;
404
case "DllSurrogate":
472
- dllSurrogate = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
405
+ dllSurrogate = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
406
break;
407
case "LocalService":
475
- localService = this.core.GetAttributeValue(sourceLineNumbers, attrib);
408
+ localService = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
409
break;
410
case "RemoteServerName":
478
- remoteServerName = this.core.GetAttributeValue(sourceLineNumbers, attrib);
411
+ remoteServerName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
412
break;
413
case "RunAsInteractiveUser":
481
- runAsInteractiveUser = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
414
+ runAsInteractiveUser = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
415
break;
416
case "ServiceParameters":
484
- serviceParameters = this.core.GetAttributeValue(sourceLineNumbers, attrib);
417
+ serviceParameters = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
418
break;
419
default:
487
- this.core.UnexpectedAttribute(node, attrib);
420
+ this.Core.UnexpectedAttribute(node, attrib);
421
break;
422
}
423
}
424
else
425
{
493
- this.core.ParseExtensionAttribute(node, attrib);
426
+ this.Core.ParseExtensionAttribute(node, attrib);
427
}
428
}
429
430
if (null == appId)
431
{
499
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
432
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
433
}
434
435
if ((YesNoType.No == advertise && YesNoType.Yes == appIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == appIdAdvertise))
436
{
504
- this.core.OnMessage(WixErrors.AppIdIncompatibleAdvertiseState(sourceLineNumbers, node.Name.LocalName, "Advertise", appIdAdvertise.ToString(), advertise.ToString()));
437
+ this.Core.OnMessage(WixErrors.AppIdIncompatibleAdvertiseState(sourceLineNumbers, node.Name.LocalName, "Advertise", appIdAdvertise.ToString(), advertise.ToString()));
438
}
439
else
440
{
@@ -524,13 +457,13 @@ namespace WixToolset
457
this.ParseClassElement(child, componentId, advertise, fileServer, typeLibId, typeLibVersion, appId);
458
break;
459
default:
527
- this.core.UnexpectedElement(node, child);
460
+ this.Core.UnexpectedElement(node, child);
461
break;
462
}
463
}
464
else
465
{
533
- this.core.ParseExtensionElement(node, child);
466
+ this.Core.ParseExtensionElement(node, child);
467
}
468
}
469
@@ -538,25 +471,25 @@ namespace WixToolset
471
{
472
if (null != description)
473
{
541
- this.core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Description"));
474
+ this.Core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Description"));
475
}
476
544
- if (!this.core.EncounteredError)
477
+ if (!this.Core.EncounteredError)
478
{
546
- Row row = this.core.CreateRow(sourceLineNumbers, "AppId");
547
- row[0] = appId;
548
- row[1] = remoteServerName;
549
- row[2] = localService;
550
- row[3] = serviceParameters;
551
- row[4] = dllSurrogate;
479
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppId);
480
+ row.Set(0, appId);
481
+ row.Set(1, remoteServerName);
482
+ row.Set(2, localService);
483
+ row.Set(3, serviceParameters);
484
+ row.Set(4, dllSurrogate);
485
if (YesNoType.Yes == activateAtStorage)
486
{
554
- row[5] = 1;
487
+ row.Set(5, 1);
488
}
489
490
if (YesNoType.Yes == runAsInteractiveUser)
491
{
559
- row[6] = 1;
492
+ row.Set(6, 1);
493
}
494
}
495
}
@@ -564,41 +497,41 @@ namespace WixToolset
497
{
498
if (null != description)
499
{
567
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), null, description, componentId);
500
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), null, description, componentId);
501
}
502
else
503
{
571
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "+", null, componentId);
504
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "+", null, componentId);
505
}
506
507
if (null != remoteServerName)
508
{
576
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "RemoteServerName", remoteServerName, componentId);
509
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "RemoteServerName", remoteServerName, componentId);
510
}
511
512
if (null != localService)
513
{
581
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "LocalService", localService, componentId);
514
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "LocalService", localService, componentId);
515
}
516
517
if (null != serviceParameters)
518
{
586
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "ServiceParameters", serviceParameters, componentId);
519
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "ServiceParameters", serviceParameters, componentId);
520
}
521
522
if (null != dllSurrogate)
523
{
591
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "DllSurrogate", dllSurrogate, componentId);
524
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "DllSurrogate", dllSurrogate, componentId);
525
}
526
527
if (YesNoType.Yes == activateAtStorage)
528
{
596
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "ActivateAtStorage", "Y", componentId);
529
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "ActivateAtStorage", "Y", componentId);
530
}
531
532
if (YesNoType.Yes == runAsInteractiveUser)
533
{
601
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "RunAs", "Interactive User", componentId);
534
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("AppID\\", appId), "RunAs", "Interactive User", componentId);
535
}
536
}
537
}
@@ -621,35 +554,35 @@ namespace WixToolset
554
switch (attrib.Name.LocalName)
555
{
556
case "Id":
624
- id = this.core.GetAttributeValue(sourceLineNumbers, attrib);
557
+ id = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
558
break;
559
case "Value":
627
- value = this.core.GetAttributeValue(sourceLineNumbers, attrib);
560
+ value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
561
break;
562
default:
630
- this.core.UnexpectedAttribute(node, attrib);
563
+ this.Core.UnexpectedAttribute(node, attrib);
564
break;
565
}
566
}
567
else
568
{
636
- this.core.ParseExtensionAttribute(node, attrib);
569
+ this.Core.ParseExtensionAttribute(node, attrib);
570
}
571
}
572
573
if (null == id)
574
{
642
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
575
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
576
}
577
645
- this.core.ParseForExtensionElements(node);
578
+ this.Core.ParseForExtensionElements(node);
579
647
- if (!this.core.EncounteredError)
580
+ if (!this.Core.EncounteredError)
581
{
649
- Row row = this.core.CreateRow(sourceLineNumbers, "MsiAssemblyName");
650
- row[0] = componentId;
651
- row[1] = id;
652
- row[2] = value;
582
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.MsiAssemblyName);
583
+ row.Set(0, componentId);
584
+ row.Set(1, id);
585
+ row.Set(2, value);
586
}
587
}
588
@@ -673,71 +606,71 @@ namespace WixToolset
606
switch (attrib.Name.LocalName)
607
{
608
case "Id":
676
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
609
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
610
break;
611
case "SourceFile":
612
case "src":
613
if (null != sourceFile)
614
{
682
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile", "src"));
615
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile", "src"));
616
}
617
618
if ("src" == attrib.Name.LocalName)
619
{
687
- this.core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
620
+ this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
621
}
689
- sourceFile = this.core.GetAttributeValue(sourceLineNumbers, attrib);
622
+ sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
623
break;
624
case "SuppressModularization":
692
- suppressModularization = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
625
+ suppressModularization = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
626
break;
627
default:
695
- this.core.UnexpectedAttribute(node, attrib);
628
+ this.Core.UnexpectedAttribute(node, attrib);
629
break;
630
}
631
}
632
else
633
{
701
- this.core.ParseExtensionAttribute(node, attrib);
634
+ this.Core.ParseExtensionAttribute(node, attrib);
635
}
636
}
637
638
if (null == id)
639
{
707
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
640
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
641
id = Identifier.Invalid;
642
}
643
else if (!String.IsNullOrEmpty(id.Id)) // only check legal values
644
{
645
if (55 < id.Id.Length)
646
{
714
- this.core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 55));
647
+ this.Core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 55));
648
}
649
else if (!this.compilingProduct) // if we're not doing a product then we can't be sure that a binary identifier will fit when modularized
650
{
651
if (18 < id.Id.Length)
652
{
720
- this.core.OnMessage(WixWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 18));
653
+ this.Core.OnMessage(WixWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 18));
654
}
655
}
656
}
657
658
if (null == sourceFile)
659
{
727
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
660
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
661
}
662
730
- this.core.ParseForExtensionElements(node);
663
+ this.Core.ParseForExtensionElements(node);
664
732
- if (!this.core.EncounteredError)
665
+ if (!this.Core.EncounteredError)
666
{
734
- Row row = this.core.CreateRow(sourceLineNumbers, "Binary", id);
735
- row[1] = sourceFile;
667
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Binary, id);
668
+ row.Set(1, sourceFile);
669
670
if (YesNoType.Yes == suppressModularization)
671
{
739
- Row wixSuppressModularizationRow = this.core.CreateRow(sourceLineNumbers, "WixSuppressModularization");
740
- wixSuppressModularizationRow[0] = id;
672
+ var wixSuppressModularizationRow = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixSuppressModularization);
673
+ wixSuppressModularizationRow.Set(0, id);
674
}
675
}
676
@@ -762,53 +695,53 @@ namespace WixToolset
695
switch (attrib.Name.LocalName)
696
{
697
case "Id":
765
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
698
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
699
break;
700
case "SourceFile":
768
- sourceFile = this.core.GetAttributeValue(sourceLineNumbers, attrib);
701
+ sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
702
break;
703
default:
771
- this.core.UnexpectedAttribute(node, attrib);
704
+ this.Core.UnexpectedAttribute(node, attrib);
705
break;
706
}
707
}
708
else
709
{
777
- this.core.ParseExtensionAttribute(node, attrib);
710
+ this.Core.ParseExtensionAttribute(node, attrib);
711
}
712
}
713
714
if (null == id)
715
{
783
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
716
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
717
id = Identifier.Invalid;
718
}
719
else if (!String.IsNullOrEmpty(id.Id)) // only check legal values
720
{
721
if (57 < id.Id.Length)
722
{
790
- this.core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 57));
723
+ this.Core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 57));
724
}
725
else if (!this.compilingProduct) // if we're not doing a product then we can't be sure that a binary identifier will fit when modularized
726
{
727
if (20 < id.Id.Length)
728
{
796
- this.core.OnMessage(WixWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 20));
729
+ this.Core.OnMessage(WixWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 20));
730
}
731
}
732
}
733
734
if (null == sourceFile)
735
{
803
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
736
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
737
}
738
806
- this.core.ParseForExtensionElements(node);
739
+ this.Core.ParseForExtensionElements(node);
740
808
- if (!this.core.EncounteredError)
741
+ if (!this.Core.EncounteredError)
742
{
810
- Row row = this.core.CreateRow(sourceLineNumbers, "Icon", id);
811
- row[1] = sourceFile;
743
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Icon, id);
744
+ row.Set(1, sourceFile);
745
}
746
747
return id.Id;
@@ -830,23 +763,23 @@ namespace WixToolset
763
switch (attrib.Name.LocalName)
764
{
765
case "Property":
833
- property = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
834
- this.core.CreateSimpleReference(sourceLineNumbers, "Property", property);
766
+ property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
767
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Property", property);
768
break;
769
default:
837
- this.core.UnexpectedAttribute(node, attrib);
770
+ this.Core.UnexpectedAttribute(node, attrib);
771
break;
772
}
773
}
774
else
775
{
843
- this.core.ParseExtensionAttribute(node, attrib);
776
+ this.Core.ParseExtensionAttribute(node, attrib);
777
}
778
}
779
780
if (null == property)
781
{
849
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
782
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
783
}
784
785
// find unexpected child elements
@@ -860,13 +793,13 @@ namespace WixToolset
793
ParseInstanceElement(child, property);
794
break;
795
default:
863
- this.core.UnexpectedElement(node, child);
796
+ this.Core.UnexpectedElement(node, child);
797
break;
798
}
799
}
800
else
801
{
869
- this.core.ParseExtensionElement(node, child);
802
+ this.Core.ParseExtensionElement(node, child);
803
}
804
}
805
}
@@ -891,53 +824,53 @@ namespace WixToolset
824
switch (attrib.Name.LocalName)
825
{
826
case "Id":
894
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
827
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
828
break;
829
case "ProductCode":
897
- productCode = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, true);
830
+ productCode = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, true);
831
break;
832
case "ProductName":
900
- productName = this.core.GetAttributeValue(sourceLineNumbers, attrib);
833
+ productName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
834
break;
835
case "UpgradeCode":
903
- upgradeCode = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
836
+ upgradeCode = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
837
break;
838
default:
906
- this.core.UnexpectedAttribute(node, attrib);
839
+ this.Core.UnexpectedAttribute(node, attrib);
840
break;
841
}
842
}
843
else
844
{
912
- this.core.ParseExtensionAttribute(node, attrib);
845
+ this.Core.ParseExtensionAttribute(node, attrib);
846
}
847
}
848
849
if (null == id)
850
{
918
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
851
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
852
}
853
854
if (null == productCode)
855
{
923
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProductCode"));
856
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProductCode"));
857
}
858
926
- this.core.ParseForExtensionElements(node);
859
+ this.Core.ParseForExtensionElements(node);
860
928
- if (!this.core.EncounteredError)
861
+ if (!this.Core.EncounteredError)
862
{
930
- Row row = this.core.CreateRow(sourceLineNumbers, "WixInstanceTransforms");
931
- row[0] = id;
932
- row[1] = propertyId;
933
- row[2] = productCode;
863
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixInstanceTransforms);
864
+ row.Set(0, id);
865
+ row.Set(1, propertyId);
866
+ row.Set(2, productCode);
867
if (null != productName)
868
{
936
- row[3] = productName;
869
+ row.Set(3, productName);
870
}
871
if (null != upgradeCode)
872
{
940
- row[4] = upgradeCode;
873
+ row.Set(4, upgradeCode);
874
}
875
}
876
}
@@ -962,55 +895,55 @@ namespace WixToolset
895
switch (attrib.Name.LocalName)
896
{
897
case "Id":
965
- id = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
898
+ id = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
899
break;
900
case "AppData":
968
- appData = this.core.GetAttributeValue(sourceLineNumbers, attrib);
901
+ appData = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
902
break;
903
case "Feature":
971
- feature = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
972
- this.core.CreateSimpleReference(sourceLineNumbers, "Feature", feature);
904
+ feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
905
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Feature", feature);
906
break;
907
case "Qualifier":
975
- qualifier = this.core.GetAttributeValue(sourceLineNumbers, attrib);
908
+ qualifier = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
909
break;
910
default:
978
- this.core.UnexpectedAttribute(node, attrib);
911
+ this.Core.UnexpectedAttribute(node, attrib);
912
break;
913
}
914
}
915
else
916
{
984
- this.core.ParseExtensionAttribute(node, attrib);
917
+ this.Core.ParseExtensionAttribute(node, attrib);
918
}
919
}
920
921
if (null == id)
922
{
990
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
923
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
924
}
925
926
if (null == qualifier)
927
{
995
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Qualifier"));
928
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Qualifier"));
929
}
930
998
- this.core.ParseForExtensionElements(node);
931
+ this.Core.ParseForExtensionElements(node);
932
1000
- if (!this.core.EncounteredError)
933
+ if (!this.Core.EncounteredError)
934
{
1002
- Row row = this.core.CreateRow(sourceLineNumbers, "PublishComponent");
1003
- row[0] = id;
1004
- row[1] = qualifier;
1005
- row[2] = componentId;
1006
- row[3] = appData;
935
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.PublishComponent);
936
+ row.Set(0, id);
937
+ row.Set(1, qualifier);
938
+ row.Set(2, componentId);
939
+ row.Set(3, appData);
940
if (null == feature)
941
{
1009
- row[4] = Guid.Empty.ToString("B");
942
+ row.Set(4, Guid.Empty.ToString("B"));
943
}
944
else
945
{
1013
- row[4] = feature;
946
+ row.Set(4, feature);
947
}
948
}
949
}
@@ -1062,81 +995,81 @@ namespace WixToolset
995
switch (attrib.Name.LocalName)
996
{
997
case "Id":
1065
- classId = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
998
+ classId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
999
break;
1000
case "Advertise":
1068
- classAdvertise = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1001
+ classAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1002
break;
1003
case "AppId":
1071
- appId = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1004
+ appId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1005
break;
1006
case "Argument":
1074
- argument = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1007
+ argument = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1008
break;
1009
case "Context":
1077
- contexts = this.core.GetAttributeValue(sourceLineNumbers, attrib).Split("\r\n\t ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
1010
+ contexts = this.Core.GetAttributeValue(sourceLineNumbers, attrib).Split("\r\n\t ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
1011
break;
1012
case "Control":
1080
- control = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1013
+ control = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1014
break;
1015
case "Description":
1083
- description = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1016
+ description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1017
break;
1018
case "Handler":
1086
- defaultInprocHandler = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1019
+ defaultInprocHandler = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1020
break;
1021
case "Icon":
1089
- icon = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1022
+ icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1023
break;
1024
case "IconIndex":
1092
- iconIndex = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, short.MinValue + 1, short.MaxValue);
1025
+ iconIndex = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, short.MinValue + 1, short.MaxValue);
1026
break;
1027
case "RelativePath":
1095
- relativePath = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1028
+ relativePath = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1029
break;
1030
1031
// The following attributes result in rows always added to the Registry table rather than the Class table
1032
case "Insertable":
1100
- insertable = (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? "Insertable" : "NotInsertable";
1033
+ insertable = (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) ? "Insertable" : "NotInsertable";
1034
break;
1035
case "Programmable":
1103
- programmable = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1036
+ programmable = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1037
break;
1038
case "SafeForInitializing":
1106
- safeForInit = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1039
+ safeForInit = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1040
break;
1041
case "SafeForScripting":
1109
- safeForScripting = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1042
+ safeForScripting = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1043
break;
1044
case "ForeignServer":
1112
- foreignServer = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1045
+ foreignServer = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1046
break;
1047
case "Server":
1115
- localFileServer = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1048
+ localFileServer = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1049
break;
1050
case "ShortPath":
1118
- shortServerPath = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1051
+ shortServerPath = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1052
break;
1053
case "ThreadingModel":
1121
- threadingModel = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1054
+ threadingModel = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1055
break;
1056
case "Version":
1124
- version = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1057
+ version = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1058
break;
1059
default:
1127
- this.core.UnexpectedAttribute(node, attrib);
1060
+ this.Core.UnexpectedAttribute(node, attrib);
1061
break;
1062
}
1063
}
1064
else
1065
{
1133
- this.core.ParseExtensionAttribute(node, attrib);
1066
+ this.Core.ParseExtensionAttribute(node, attrib);
1067
}
1068
}
1069
1070
if (null == classId)
1071
{
1139
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1072
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1073
}
1074
1075
HashSet<string> uniqueContexts = new HashSet<string>();
@@ -1144,7 +1077,7 @@ namespace WixToolset
1077
{
1078
if (uniqueContexts.Contains(context))
1079
{
1147
- this.core.OnMessage(WixErrors.DuplicateContextValue(sourceLineNumbers, context));
1080
+ this.Core.OnMessage(WixErrors.DuplicateContextValue(sourceLineNumbers, context));
1081
}
1082
else
1083
{
@@ -1163,7 +1096,7 @@ namespace WixToolset
1096
1097
if ((YesNoType.No == advertise && YesNoType.Yes == classAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == classAdvertise))
1098
{
1166
- this.core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, classAdvertise.ToString(), advertise.ToString()));
1099
+ this.Core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, classAdvertise.ToString(), advertise.ToString()));
1100
}
1101
else
1102
{
@@ -1178,17 +1111,17 @@ namespace WixToolset
1111
1112
if (YesNoType.Yes == advertise && 0 == contexts.Length)
1113
{
1181
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Context", "Advertise", "yes"));
1114
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Context", "Advertise", "yes"));
1115
}
1116
1117
if (!String.IsNullOrEmpty(parentAppId) && !String.IsNullOrEmpty(appId))
1118
{
1186
- this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AppId", node.Parent.Name.LocalName));
1119
+ this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AppId", node.Parent.Name.LocalName));
1120
}
1121
1122
if (!String.IsNullOrEmpty(localFileServer))
1123
{
1191
- this.core.CreateSimpleReference(sourceLineNumbers, "File", localFileServer);
1124
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", localFileServer);
1125
}
1126
1127
// Local variables used strictly for child node processing.
@@ -1209,7 +1142,7 @@ namespace WixToolset
1142
else if (YesNoType.No == advertise)
1143
{
1144
SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
1212
- this.core.CreateRegistryRow(childSourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("FileType\\", classId, "\\", fileTypeMaskIndex.ToString()), String.Empty, this.ParseFileTypeMaskElement(child), componentId);
1145
+ this.Core.CreateRegistryRow(childSourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("FileType\\", classId, "\\", fileTypeMaskIndex.ToString()), String.Empty, this.ParseFileTypeMaskElement(child), componentId);
1146
fileTypeMaskIndex++;
1147
}
1148
break;
@@ -1228,13 +1161,13 @@ namespace WixToolset
1161
}
1162
break;
1163
default:
1231
- this.core.UnexpectedElement(node, child);
1164
+ this.Core.UnexpectedElement(node, child);
1165
break;
1166
}
1167
}
1168
else
1169
{
1237
- this.core.ParseExtensionElement(node, child);
1170
+ this.Core.ParseExtensionElement(node, child);
1171
}
1172
}
1173
@@ -1243,12 +1176,12 @@ namespace WixToolset
1176
{
1177
if (null != fileServer || null != localFileServer)
1178
{
1246
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Server", "Advertise", "yes"));
1179
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Server", "Advertise", "yes"));
1180
}
1181
1182
if (null != foreignServer)
1183
{
1251
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Advertise", "yes"));
1184
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Advertise", "yes"));
1185
}
1186
1187
if (null == appId && null != parentAppId)
@@ -1257,37 +1190,37 @@ namespace WixToolset
1190
}
1191
1192
// add a Class row for each context
1260
- if (!this.core.EncounteredError)
1193
+ if (!this.Core.EncounteredError)
1194
{
1195
foreach (string context in contexts)
1196
{
1264
- Row row = this.core.CreateRow(sourceLineNumbers, "Class");
1265
- row[0] = classId;
1266
- row[1] = context;
1267
- row[2] = componentId;
1268
- row[3] = defaultProgId;
1269
- row[4] = description;
1197
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Class);
1198
+ row.Set(0, classId);
1199
+ row.Set(1, context);
1200
+ row.Set(2, componentId);
1201
+ row.Set(3, defaultProgId);
1202
+ row.Set(4, description);
1203
if (null != appId)
1204
{
1272
- row[5] = appId;
1273
- this.core.CreateSimpleReference(sourceLineNumbers, "AppId", appId);
1205
+ row.Set(5, appId);
1206
+ this.Core.CreateSimpleReference(sourceLineNumbers, "AppId", appId);
1207
}
1275
- row[6] = fileTypeMask;
1208
+ row.Set(6, fileTypeMask);
1209
if (null != icon)
1210
{
1278
- row[7] = icon;
1279
- this.core.CreateSimpleReference(sourceLineNumbers, "Icon", icon);
1211
+ row.Set(7, icon);
1212
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Icon", icon);
1213
}
1214
if (CompilerConstants.IntegerNotSet != iconIndex)
1215
{
1283
- row[8] = iconIndex;
1216
+ row.Set(8, iconIndex);
1217
}
1285
- row[9] = defaultInprocHandler;
1286
- row[10] = argument;
1287
- row[11] = Guid.Empty.ToString("B");
1218
+ row.Set(9, defaultInprocHandler);
1219
+ row.Set(10, argument);
1220
+ row.Set(11, Guid.Empty.ToString("B"));
1221
if (YesNoType.Yes == relativePath)
1222
{
1290
- row[12] = MsiInterop.MsidbClassAttributesRelativePath;
1223
+ row.Set(12, MsiInterop.MsidbClassAttributesRelativePath);
1224
}
1225
}
1226
}
@@ -1296,16 +1229,16 @@ namespace WixToolset
1229
{
1230
if (null == fileServer && null == localFileServer && null == foreignServer)
1231
{
1299
- this.core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server"));
1232
+ this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server"));
1233
}
1234
1235
if (null != fileServer && null != foreignServer)
1236
{
1304
- this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "File"));
1237
+ this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "File"));
1238
}
1239
else if (null != localFileServer && null != foreignServer)
1240
{
1308
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server"));
1241
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server"));
1242
}
1243
else if (null == fileServer)
1244
{
@@ -1314,7 +1247,7 @@ namespace WixToolset
1247
1248
if (null != appId) // need to use nesting (not a reference) for the unadvertised Class elements
1249
{
1317
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "AppId", "Advertise", "no"));
1250
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "AppId", "Advertise", "no"));
1251
}
1252
1253
// add the core registry keys for each context in the class
@@ -1324,7 +1257,7 @@ namespace WixToolset
1257
{
1258
if (null != argument)
1259
{
1327
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Arguments", "Context", context));
1260
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Arguments", "Context", context));
1261
}
1262
1263
if (null != fileServer)
@@ -1361,14 +1294,14 @@ namespace WixToolset
1294
}
1295
else
1296
{
1364
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Context", context, "InprocServer", "InprocServer32", "LocalServer", "LocalServer32"));
1297
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Context", context, "InprocServer", "InprocServer32", "LocalServer", "LocalServer32"));
1298
}
1299
1367
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context), String.Empty, formattedContextString, componentId); // ClassId context
1300
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context), String.Empty, formattedContextString, componentId); // ClassId context
1301
1302
if (null != icon) // ClassId default icon
1303
{
1371
- this.core.CreateSimpleReference(sourceLineNumbers, "File", icon);
1304
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", icon);
1305
1306
icon = String.Format(CultureInfo.InvariantCulture, "\"[#{0}]\"", icon);
1307
@@ -1376,18 +1309,18 @@ namespace WixToolset
1309
{
1310
icon = String.Concat(icon, ",", iconIndex);
1311
}
1379
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context, "\\DefaultIcon"), String.Empty, icon, componentId);
1312
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context, "\\DefaultIcon"), String.Empty, icon, componentId);
1313
}
1314
}
1315
1316
if (null != parentAppId) // ClassId AppId (must be specified via nesting, not with the AppId attribute)
1317
{
1385
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId), "AppID", parentAppId, componentId);
1318
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId), "AppID", parentAppId, componentId);
1319
}
1320
1321
if (null != description) // ClassId description
1322
{
1390
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId), String.Empty, description, componentId);
1323
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId), String.Empty, description, componentId);
1324
}
1325
1326
if (null != defaultInprocHandler)
@@ -1395,24 +1328,24 @@ namespace WixToolset
1328
switch (defaultInprocHandler) // ClassId Default Inproc Handler
1329
{
1330
case "1":
1398
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler"), String.Empty, "ole.dll", componentId);
1331
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler"), String.Empty, "ole.dll", componentId);
1332
break;
1333
case "2":
1401
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler32"), String.Empty, "ole32.dll", componentId);
1334
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler32"), String.Empty, "ole32.dll", componentId);
1335
break;
1336
case "3":
1404
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler"), String.Empty, "ole.dll", componentId);
1405
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler32"), String.Empty, "ole32.dll", componentId);
1337
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler"), String.Empty, "ole.dll", componentId);
1338
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler32"), String.Empty, "ole32.dll", componentId);
1339
break;
1340
default:
1408
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler32"), String.Empty, defaultInprocHandler, componentId);
1341
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\InprocHandler32"), String.Empty, defaultInprocHandler, componentId);
1342
break;
1343
}
1344
}
1345
1346
if (YesNoType.NotSet != relativePath) // ClassId's RelativePath
1347
{
1415
- this.core.OnMessage(WixErrors.RelativePathForRegistryElement(sourceLineNumbers));
1348
+ this.Core.OnMessage(WixErrors.RelativePathForRegistryElement(sourceLineNumbers));
1349
}
1350
}
1351
@@ -1423,36 +1356,36 @@ namespace WixToolset
1356
// add a threading model for each context in the class
1357
foreach (string context in contexts)
1358
{
1426
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context), "ThreadingModel", threadingModel, componentId);
1359
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context), "ThreadingModel", threadingModel, componentId);
1360
}
1361
}
1362
1363
if (null != typeLibId)
1364
{
1432
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\TypeLib"), null, typeLibId, componentId);
1365
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\TypeLib"), null, typeLibId, componentId);
1366
}
1367
1368
if (null != version)
1369
{
1437
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Version"), null, version, componentId);
1370
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Version"), null, version, componentId);
1371
}
1372
1373
if (null != insertable)
1374
{
1375
// Add "*" for name so that any subkeys (shouldn't be any) are removed on uninstall.
1443
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", insertable), "*", null, componentId);
1376
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", insertable), "*", null, componentId);
1377
}
1378
1379
if (control)
1380
{
1381
// Add "*" for name so that any subkeys (shouldn't be any) are removed on uninstall.
1449
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Control"), "*", null, componentId);
1382
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Control"), "*", null, componentId);
1383
}
1384
1385
if (programmable)
1386
{
1387
// Add "*" for name so that any subkeys (shouldn't be any) are removed on uninstall.
1455
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Programmable"), "*", null, componentId);
1388
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\Programmable"), "*", null, componentId);
1389
}
1390
1391
if (safeForInit)
@@ -1491,77 +1424,77 @@ namespace WixToolset
1424
switch (attrib.Name.LocalName)
1425
{
1426
case "Id":
1494
- interfaceId = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1427
+ interfaceId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1428
break;
1429
case "BaseInterface":
1497
- baseInterface = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1430
+ baseInterface = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1431
break;
1432
case "Name":
1500
- name = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1433
+ name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1434
break;
1435
case "NumMethods":
1503
- numMethods = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1436
+ numMethods = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1437
break;
1438
case "ProxyStubClassId":
1506
- proxyId = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1439
+ proxyId = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1440
break;
1441
case "ProxyStubClassId32":
1509
- proxyId32 = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1442
+ proxyId32 = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1443
break;
1444
case "Versioned":
1512
- versioned = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1445
+ versioned = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1446
break;
1447
default:
1515
- this.core.UnexpectedAttribute(node, attrib);
1448
+ this.Core.UnexpectedAttribute(node, attrib);
1449
break;
1450
}
1451
}
1452
else
1453
{
1521
- this.core.ParseExtensionAttribute(node, attrib);
1454
+ this.Core.ParseExtensionAttribute(node, attrib);
1455
}
1456
}
1457
1458
if (null == interfaceId)
1459
{
1527
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1460
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1461
}
1462
1463
if (null == name)
1464
{
1532
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1465
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1466
}
1467
1535
- this.core.ParseForExtensionElements(node);
1468
+ this.Core.ParseForExtensionElements(node);
1469
1537
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId), null, name, componentId);
1470
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId), null, name, componentId);
1471
if (null != typeLibId)
1472
{
1540
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\TypeLib"), null, typeLibId, componentId);
1473
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\TypeLib"), null, typeLibId, componentId);
1474
if (versioned)
1475
{
1543
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\TypeLib"), "Version", typelibVersion, componentId);
1476
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\TypeLib"), "Version", typelibVersion, componentId);
1477
}
1478
}
1479
1480
if (null != baseInterface)
1481
{
1549
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\BaseInterface"), null, baseInterface, componentId);
1482
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\BaseInterface"), null, baseInterface, componentId);
1483
}
1484
1485
if (CompilerConstants.IntegerNotSet != numMethods)
1486
{
1554
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\NumMethods"), null, numMethods.ToString(), componentId);
1487
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\NumMethods"), null, numMethods.ToString(), componentId);
1488
}
1489
1490
if (null != proxyId)
1491
{
1559
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\ProxyStubClsid"), null, proxyId, componentId);
1492
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\ProxyStubClsid"), null, proxyId, componentId);
1493
}
1494
1495
if (null != proxyId32)
1496
{
1564
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\ProxyStubClsid32"), null, proxyId32, componentId);
1497
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("Interface\\", interfaceId, "\\ProxyStubClsid32"), null, proxyId32, componentId);
1498
}
1499
}
1500
@@ -1585,48 +1518,48 @@ namespace WixToolset
1518
switch (attrib.Name.LocalName)
1519
{
1520
case "Mask":
1588
- mask = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1521
+ mask = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1522
break;
1523
case "Offset":
1591
- offset = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1524
+ offset = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1525
break;
1526
case "Value":
1594
- value = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1527
+ value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1528
break;
1529
default:
1597
- this.core.UnexpectedAttribute(node, attrib);
1530
+ this.Core.UnexpectedAttribute(node, attrib);
1531
break;
1532
}
1533
}
1534
else
1535
{
1603
- this.core.ParseExtensionAttribute(node, attrib);
1536
+ this.Core.ParseExtensionAttribute(node, attrib);
1537
}
1538
}
1539
1540
1541
if (null == mask)
1542
{
1610
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Mask"));
1543
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Mask"));
1544
}
1545
1546
if (CompilerConstants.IntegerNotSet == offset)
1547
{
1615
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset"));
1548
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset"));
1549
}
1550
1551
if (null == value)
1552
{
1620
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
1553
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
1554
}
1555
1623
- this.core.ParseForExtensionElements(node);
1556
+ this.Core.ParseForExtensionElements(node);
1557
1625
- if (!this.core.EncounteredError)
1558
+ if (!this.Core.EncounteredError)
1559
{
1560
if (mask.Length != value.Length)
1561
{
1629
- this.core.OnMessage(WixErrors.ValueAndMaskMustBeSameLength(sourceLineNumbers));
1562
+ this.Core.OnMessage(WixErrors.ValueAndMaskMustBeSameLength(sourceLineNumbers));
1563
}
1564
cb = mask.Length / 2;
1565
}
@@ -1656,62 +1589,62 @@ namespace WixToolset
1589
switch (attrib.Name.LocalName)
1590
{
1591
case "ExcludeLanguages":
1659
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1592
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1593
{
1594
options |= MsiInterop.MsidbUpgradeAttributesLanguagesExclusive;
1595
}
1596
break;
1597
case "IncludeMaximum":
1665
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1598
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1599
{
1600
options |= MsiInterop.MsidbUpgradeAttributesVersionMaxInclusive;
1601
}
1602
break;
1603
case "IncludeMinimum": // this is "yes" by default
1671
- if (YesNoType.No == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1604
+ if (YesNoType.No == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1605
{
1606
options &= ~MsiInterop.MsidbUpgradeAttributesVersionMinInclusive;
1607
}
1608
break;
1609
case "Language":
1677
- language = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1610
+ language = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1611
break;
1612
case "Minimum":
1680
- minimum = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1613
+ minimum = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1614
break;
1615
case "Maximum":
1683
- maximum = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1616
+ maximum = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1617
break;
1618
case "UpgradeCode":
1686
- upgradeCode = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1619
+ upgradeCode = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
1620
break;
1621
default:
1689
- this.core.UnexpectedAttribute(node, attrib);
1622
+ this.Core.UnexpectedAttribute(node, attrib);
1623
break;
1624
}
1625
}
1626
else
1627
{
1695
- this.core.ParseExtensionAttribute(node, attrib);
1628
+ this.Core.ParseExtensionAttribute(node, attrib);
1629
}
1630
}
1631
1632
if (null == minimum && null == maximum)
1633
{
1701
- this.core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Minimum", "Maximum"));
1634
+ this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Minimum", "Maximum"));
1635
}
1636
1704
- this.core.ParseForExtensionElements(node);
1637
+ this.Core.ParseForExtensionElements(node);
1638
1706
- if (!this.core.EncounteredError)
1639
+ if (!this.Core.EncounteredError)
1640
{
1708
- Row row = this.core.CreateRow(sourceLineNumbers, "Upgrade");
1709
- row[0] = upgradeCode;
1710
- row[1] = minimum;
1711
- row[2] = maximum;
1712
- row[3] = language;
1713
- row[4] = options;
1714
- row[6] = propertyId;
1641
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Upgrade);
1642
+ row.Set(0, upgradeCode);
1643
+ row.Set(1, minimum);
1644
+ row.Set(2, maximum);
1645
+ row.Set(3, language);
1646
+ row.Set(4, options);
1647
+ row.Set(6, propertyId);
1648
}
1649
}
1650
@@ -1739,19 +1672,19 @@ namespace WixToolset
1672
switch (attrib.Name.LocalName)
1673
{
1674
case "Id":
1742
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
1675
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
1676
break;
1677
case "Key":
1745
- key = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1678
+ key = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1679
break;
1680
case "Name":
1748
- name = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1681
+ name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1682
break;
1683
case "Root":
1751
- root = this.core.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, false);
1684
+ root = this.Core.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, false);
1685
break;
1686
case "Type":
1754
- string typeValue = this.core.GetAttributeValue(sourceLineNumbers, attrib);
1687
+ string typeValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1688
if (0 < typeValue.Length)
1689
{
1690
Wix.RegistrySearch.TypeType typeType = Wix.RegistrySearch.ParseTypeType(typeValue);
@@ -1767,23 +1700,23 @@ namespace WixToolset
1700
type = 2;
1701
break;
1702
default:
1770
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "directory", "file", "raw"));
1703
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "directory", "file", "raw"));
1704
break;
1705
}
1706
}
1707
break;
1708
case "Win64":
1709
explicitWin64 = true;
1777
- search64bit = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1710
+ search64bit = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1711
break;
1712
default:
1780
- this.core.UnexpectedAttribute(node, attrib);
1713
+ this.Core.UnexpectedAttribute(node, attrib);
1714
break;
1715
}
1716
}
1717
else
1718
{
1786
- this.core.ParseExtensionAttribute(node, attrib);
1719
+ this.Core.ParseExtensionAttribute(node, attrib);
1720
}
1721
}
1722
@@ -1794,22 +1727,22 @@ namespace WixToolset
1727
1728
if (null == id)
1729
{
1797
- id = this.core.CreateIdentifier("reg", root.ToString(), key, name, type.ToString(), search64bit.ToString());
1730
+ id = this.Core.CreateIdentifier("reg", root.ToString(), key, name, type.ToString(), search64bit.ToString());
1731
}
1732
1733
if (null == key)
1734
{
1802
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
1735
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
1736
}
1737
1738
if (CompilerConstants.IntegerNotSet == root)
1739
{
1807
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
1740
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
1741
}
1742
1743
if (CompilerConstants.IntegerNotSet == type)
1744
{
1812
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
1745
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
1746
}
1747
1748
signature = id.Id;
@@ -1823,7 +1756,7 @@ namespace WixToolset
1756
case "DirectorySearch":
1757
if (oneChild)
1758
{
1826
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1759
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1760
}
1761
oneChild = true;
1762
@@ -1833,7 +1766,7 @@ namespace WixToolset
1766
case "DirectorySearchRef":
1767
if (oneChild)
1768
{
1836
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1769
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1770
}
1771
oneChild = true;
1772
signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -1841,7 +1774,7 @@ namespace WixToolset
1774
case "FileSearch":
1775
if (oneChild)
1776
{
1844
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1777
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1778
}
1779
oneChild = true;
1780
signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -1850,7 +1783,7 @@ namespace WixToolset
1783
case "FileSearchRef":
1784
if (oneChild)
1785
{
1853
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1786
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1787
}
1788
oneChild = true;
1789
string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures
@@ -1858,24 +1791,24 @@ namespace WixToolset
1791
signature = null;
1792
break;
1793
default:
1861
- this.core.UnexpectedElement(node, child);
1794
+ this.Core.UnexpectedElement(node, child);
1795
break;
1796
}
1797
}
1798
else
1799
{
1867
- this.core.ParseExtensionElement(node, child);
1800
+ this.Core.ParseExtensionElement(node, child);
1801
}
1802
}
1803
1804
1872
- if (!this.core.EncounteredError)
1805
+ if (!this.Core.EncounteredError)
1806
{
1874
- Row row = this.core.CreateRow(sourceLineNumbers, "RegLocator", id);
1875
- row[1] = root;
1876
- row[2] = key;
1877
- row[3] = name;
1878
- row[4] = search64bit ? (type | 16) : type;
1807
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.RegLocator, id);
1808
+ row.Set(1, root);
1809
+ row.Set(2, key);
1810
+ row.Set(3, name);
1811
+ row.Set(4, search64bit ? (type | 16) : type);
1812
}
1813
1814
return signature;
@@ -1898,26 +1831,26 @@ namespace WixToolset
1831
switch (attrib.Name.LocalName)
1832
{
1833
case "Id":
1901
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1902
- this.core.CreateSimpleReference(sourceLineNumbers, "RegLocator", id);
1834
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1835
+ this.Core.CreateSimpleReference(sourceLineNumbers, "RegLocator", id);
1836
break;
1837
default:
1905
- this.core.UnexpectedAttribute(node, attrib);
1838
+ this.Core.UnexpectedAttribute(node, attrib);
1839
break;
1840
}
1841
}
1842
else
1843
{
1911
- this.core.ParseExtensionAttribute(node, attrib);
1844
+ this.Core.ParseExtensionAttribute(node, attrib);
1845
}
1846
}
1847
1848
if (null == id)
1849
{
1917
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1850
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1851
}
1852
1920
- this.core.ParseForExtensionElements(node);
1853
+ this.Core.ParseForExtensionElements(node);
1854
1855
return id; // the id of the RegistrySearchRef element is its signature
1856
}
@@ -1963,13 +1896,13 @@ namespace WixToolset
1896
signature = this.ParseRegistrySearchRefElement(child);
1897
break;
1898
default:
1966
- this.core.UnexpectedElement(node, child);
1899
+ this.Core.UnexpectedElement(node, child);
1900
break;
1901
}
1902
}
1903
else
1904
{
1972
- this.core.ParseExtensionElement(node, child);
1905
+ this.Core.ParseExtensionElement(node, child);
1906
}
1907
1908
@@ -2003,7 +1936,7 @@ namespace WixToolset
1936
case "DirectorySearch":
1937
if (oneChild)
1938
{
2006
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
1939
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
1940
}
1941
oneChild = true;
1942
signature = this.ParseDirectorySearchElement(child, "CCP_DRIVE");
@@ -2011,25 +1944,25 @@ namespace WixToolset
1944
case "DirectorySearchRef":
1945
if (oneChild)
1946
{
2014
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
1947
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
1948
}
1949
oneChild = true;
1950
signature = this.ParseDirectorySearchRefElement(child, "CCP_DRIVE");
1951
break;
1952
default:
2020
- this.core.UnexpectedElement(node, child);
1953
+ this.Core.UnexpectedElement(node, child);
1954
break;
1955
}
1956
}
1957
else
1958
{
2026
- this.core.ParseExtensionElement(node, child);
1959
+ this.Core.ParseExtensionElement(node, child);
1960
}
1961
}
1962
1963
if (null == signature)
1964
{
2032
- this.core.OnMessage(WixErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
1965
+ this.Core.OnMessage(WixErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
1966
}
1967
1968
return signature;
@@ -2050,13 +1983,13 @@ namespace WixToolset
1983
switch (attrib.Name.LocalName)
1984
{
1985
default:
2053
- this.core.UnexpectedAttribute(node, attrib);
1986
+ this.Core.UnexpectedAttribute(node, attrib);
1987
break;
1988
}
1989
}
1990
else
1991
{
2059
- this.core.ParseExtensionAttribute(node, attrib);
1992
+ this.Core.ParseExtensionAttribute(node, attrib);
1993
}
1994
}
1995
@@ -2075,19 +2008,19 @@ namespace WixToolset
2008
else if (signature != sig)
2009
{
2010
// all signatures under a ComplianceCheck must be the same
2078
- this.core.OnMessage(WixErrors.MultipleIdentifiersFound(sourceLineNumbers, node.Name.LocalName, sig, signature));
2011
+ this.Core.OnMessage(WixErrors.MultipleIdentifiersFound(sourceLineNumbers, node.Name.LocalName, sig, signature));
2012
}
2013
}
2014
2015
if (null == signature)
2016
{
2084
- this.core.OnMessage(WixErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
2017
+ this.Core.OnMessage(WixErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
2018
}
2019
2087
- if (!this.core.EncounteredError)
2020
+ if (!this.Core.EncounteredError)
2021
{
2089
- Row row = this.core.CreateRow(sourceLineNumbers, "CCPSearch");
2090
- row[0] = signature;
2022
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CCPSearch);
2023
+ row.Set(0, signature);
2024
}
2025
}
2026
@@ -2132,31 +2065,31 @@ namespace WixToolset
2065
switch (attrib.Name.LocalName)
2066
{
2067
case "Id":
2135
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2068
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2069
break;
2070
case "ComPlusFlags":
2138
- comPlusBits = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
2071
+ comPlusBits = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
2072
break;
2073
case "DisableRegistryReflection":
2141
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2074
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2075
{
2076
bits |= MsiInterop.MsidbComponentAttributesDisableRegistryReflection;
2077
}
2078
break;
2079
case "Directory":
2147
- directoryId = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, directoryId);
2080
+ directoryId = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, directoryId);
2081
break;
2082
case "DiskId":
2150
- diskId = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
2083
+ diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
2084
break;
2085
case "Feature":
2153
- feature = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2086
+ feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2087
break;
2088
case "Guid":
2156
- guid = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, true, true);
2089
+ guid = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, true, true);
2090
break;
2091
case "KeyPath":
2159
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2092
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2093
{
2094
keyFound = true;
2095
keyPath = null;
@@ -2165,7 +2098,7 @@ namespace WixToolset
2098
}
2099
break;
2100
case "Location":
2168
- string location = this.core.GetAttributeValue(sourceLineNumbers, attrib);
2101
+ string location = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2102
if (0 < location.Length)
2103
{
2104
Wix.Component.LocationType locationType = Wix.Component.ParseLocationType(location);
@@ -2180,66 +2113,66 @@ namespace WixToolset
2113
bits |= MsiInterop.MsidbComponentAttributesSourceOnly;
2114
break;
2115
default:
2183
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "either", "local", "source"));
2116
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "either", "local", "source"));
2117
break;
2118
}
2119
}
2120
break;
2121
case "MultiInstance":
2189
- multiInstance = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2122
+ multiInstance = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2123
break;
2124
case "NeverOverwrite":
2192
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2125
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2126
{
2127
bits |= MsiInterop.MsidbComponentAttributesNeverOverwrite;
2128
}
2129
break;
2130
case "Permanent":
2198
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2131
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2132
{
2133
bits |= MsiInterop.MsidbComponentAttributesPermanent;
2134
}
2135
break;
2136
case "Shared":
2204
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2137
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2138
{
2139
bits |= MsiInterop.MsidbComponentAttributesShared;
2140
}
2141
break;
2142
case "SharedDllRefCount":
2210
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2143
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2144
{
2145
bits |= MsiInterop.MsidbComponentAttributesSharedDllRefCount;
2146
}
2147
break;
2148
case "Transitive":
2216
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2149
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2150
{
2151
bits |= MsiInterop.MsidbComponentAttributesTransitive;
2152
}
2153
break;
2154
case "UninstallWhenSuperseded":
2222
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2155
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2156
{
2157
bits |= MsiInterop.MsidbComponentAttributesUninstallOnSupersedence;
2158
}
2159
break;
2160
case "Win64":
2161
explicitWin64 = true;
2229
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2162
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2163
{
2164
bits |= MsiInterop.MsidbComponentAttributes64bit;
2165
win64 = true;
2166
}
2167
break;
2168
default:
2236
- this.core.UnexpectedAttribute(node, attrib);
2169
+ this.Core.UnexpectedAttribute(node, attrib);
2170
break;
2171
}
2172
}
2173
else
2174
{
2242
- this.core.ParseExtensionAttribute(node, attrib);
2175
+ this.Core.ParseExtensionAttribute(node, attrib);
2176
}
2177
}
2178
@@ -2251,34 +2184,34 @@ namespace WixToolset
2184
2185
if (null == directoryId)
2186
{
2254
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory"));
2187
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory"));
2188
}
2189
2190
if (String.IsNullOrEmpty(guid) && MsiInterop.MsidbComponentAttributesShared == (bits & MsiInterop.MsidbComponentAttributesShared))
2191
{
2259
- this.core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Shared", "yes", "Guid", ""));
2192
+ this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Shared", "yes", "Guid", ""));
2193
}
2194
2195
if (String.IsNullOrEmpty(guid) && MsiInterop.MsidbComponentAttributesPermanent == (bits & MsiInterop.MsidbComponentAttributesPermanent))
2196
{
2264
- this.core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Permanent", "yes", "Guid", ""));
2197
+ this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Permanent", "yes", "Guid", ""));
2198
}
2199
2200
if (null != feature)
2201
{
2202
if (this.compilingModule)
2203
{
2271
- this.core.OnMessage(WixErrors.IllegalAttributeInMergeModule(sourceLineNumbers, node.Name.LocalName, "Feature"));
2204
+ this.Core.OnMessage(WixErrors.IllegalAttributeInMergeModule(sourceLineNumbers, node.Name.LocalName, "Feature"));
2205
}
2206
else
2207
{
2208
if (ComplexReferenceParentType.Feature == parentType || ComplexReferenceParentType.FeatureGroup == parentType)
2209
{
2277
- this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Feature", node.Parent.Name.LocalName));
2210
+ this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Feature", node.Parent.Name.LocalName));
2211
}
2212
else
2213
{
2281
- this.core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, null, ComplexReferenceChildType.Component, id.Id, true);
2214
+ this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, null, ComplexReferenceChildType.Component, id.Id, true);
2215
}
2216
}
2217
}
@@ -2306,7 +2239,7 @@ namespace WixToolset
2239
if (null != condition)
2240
{
2241
SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2309
- this.core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
2242
+ this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
2243
}
2244
condition = this.ParseConditionElement(child, node.Name.LocalName, null, null);
2245
break;
@@ -2349,10 +2282,10 @@ namespace WixToolset
2282
encounteredODBCDataSource = true;
2283
break;
2284
case "ODBCDriver":
2352
- this.ParseODBCDriverOrTranslator(child, id.Id, null, this.tableDefinitions["ODBCDriver"]);
2285
+ this.ParseODBCDriverOrTranslator(child, id.Id, null, TupleDefinitionType.ODBCDriver);
2286
break;
2287
case "ODBCTranslator":
2355
- this.ParseODBCDriverOrTranslator(child, id.Id, null, this.tableDefinitions["ODBCTranslator"]);
2288
+ this.ParseODBCDriverOrTranslator(child, id.Id, null, TupleDefinitionType.ODBCTranslator);
2289
break;
2290
case "ProgId":
2291
bool foundExtension = false;
@@ -2403,14 +2336,14 @@ namespace WixToolset
2336
this.ParseTypeLibElement(child, id.Id, null, win64);
2337
break;
2338
default:
2406
- this.core.UnexpectedElement(node, child);
2339
+ this.Core.UnexpectedElement(node, child);
2340
break;
2341
}
2342
}
2343
else
2344
{
2345
Dictionary<string, string> context = new Dictionary<string, string>() { { "ComponentId", id.Id }, { "DirectoryId", directoryId }, { "Win64", win64.ToString() }, };
2413
- ComponentKeyPath possibleKeyPath = this.core.ParsePossibleKeyPathExtensionElement(node, child, context);
2346
+ ComponentKeyPath possibleKeyPath = this.Core.ParsePossibleKeyPathExtensionElement(node, child, context);
2347
if (null != possibleKeyPath)
2348
{
2349
if (ComponentKeyPathType.None == possibleKeyPath.Type)
@@ -2439,7 +2372,7 @@ namespace WixToolset
2372
2373
if (keyFound && YesNoType.Yes == keyPathSet)
2374
{
2442
- this.core.OnMessage(WixErrors.ComponentMultipleKeyPaths(sourceLineNumbers, node.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
2375
+ this.Core.OnMessage(WixErrors.ComponentMultipleKeyPaths(sourceLineNumbers, node.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
2376
}
2377
2378
// if a possible KeyPath has been found and that value was explicitly set as
@@ -2457,9 +2390,9 @@ namespace WixToolset
2390
2391
if (shouldAddCreateFolder)
2392
{
2460
- Row row = this.core.CreateRow(sourceLineNumbers, "CreateFolder");
2461
- row[0] = directoryId;
2462
- row[1] = id.Id;
2393
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CreateFolder);
2394
+ row.Set(0, directoryId);
2395
+ row.Set(1, id.Id);
2396
}
2397
2398
// check for conditions that exclude this component from using generated guids
@@ -2468,21 +2401,21 @@ namespace WixToolset
2401
{
2402
if (encounteredODBCDataSource)
2403
{
2471
- this.core.OnMessage(WixErrors.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers));
2404
+ this.Core.OnMessage(WixErrors.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers));
2405
isGeneratableGuidOk = false;
2406
}
2407
2408
if (0 != files && MsiInterop.MsidbComponentAttributesRegistryKeyPath == keyBits)
2409
{
2477
- this.core.OnMessage(WixErrors.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers, true));
2410
+ this.Core.OnMessage(WixErrors.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers, true));
2411
isGeneratableGuidOk = false;
2412
}
2413
}
2414
2415
// check for implicit KeyPath which can easily be accidentally changed
2483
- if (this.showPedanticMessages && !keyFound && !isGeneratableGuidOk)
2416
+ if (this.ShowPedanticMessages && !keyFound && !isGeneratableGuidOk)
2417
{
2485
- this.core.OnMessage(WixErrors.ImplicitComponentKeyPath(sourceLineNumbers, id.Id));
2418
+ this.Core.OnMessage(WixErrors.ImplicitComponentKeyPath(sourceLineNumbers, id.Id));
2419
}
2420
2421
// if there isn't an @Id attribute value, replace the placeholder with the id of the keypath.
@@ -2498,35 +2431,35 @@ namespace WixToolset
2431
}
2432
else
2433
{
2501
- this.core.OnMessage(WixErrors.CannotDefaultComponentId(sourceLineNumbers));
2434
+ this.Core.OnMessage(WixErrors.CannotDefaultComponentId(sourceLineNumbers));
2435
}
2436
}
2437
2438
// If an id was not determined by now, we have to error.
2439
if (null == id)
2440
{
2508
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2441
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2442
}
2443
2444
// finally add the Component table row
2512
- if (!this.core.EncounteredError)
2445
+ if (!this.Core.EncounteredError)
2446
{
2514
- Row row = this.core.CreateRow(sourceLineNumbers, "Component", id);
2515
- row[1] = guid;
2516
- row[2] = directoryId;
2517
- row[3] = bits | keyBits;
2518
- row[4] = condition;
2519
- row[5] = keyPath;
2447
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Component, id);
2448
+ row.Set(1, guid);
2449
+ row.Set(2, directoryId);
2450
+ row.Set(3, bits | keyBits);
2451
+ row.Set(4, condition);
2452
+ row.Set(5, keyPath);
2453
2454
if (multiInstance)
2455
{
2523
- Row instanceComponentRow = this.core.CreateRow(sourceLineNumbers, "WixInstanceComponent");
2524
- instanceComponentRow[0] = id;
2456
+ var instanceComponentRow = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixInstanceComponent);
2457
+ instanceComponentRow.Set(0, id);
2458
}
2459
2460
if (0 < symbols.Count)
2461
{
2529
- WixDeltaPatchSymbolPathsRow symbolRow = (WixDeltaPatchSymbolPathsRow)this.core.CreateRow(sourceLineNumbers, "WixDeltaPatchSymbolPaths", id);
2462
+ var symbolRow = (WixDeltaPatchSymbolPathsTuple)this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixDeltaPatchSymbolPaths, id);
2463
symbolRow.Type = SymbolPathType.Component;
2464
symbolRow.SymbolPaths = String.Join(";", symbols);
2465
}
@@ -2534,20 +2467,20 @@ namespace WixToolset
2467
// Complus
2468
if (CompilerConstants.IntegerNotSet != comPlusBits)
2469
{
2537
- row = this.core.CreateRow(sourceLineNumbers, "Complus");
2538
- row[0] = id;
2539
- row[1] = comPlusBits;
2470
+ row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Complus);
2471
+ row.Set(0, id);
2472
+ row.Set(1, comPlusBits);
2473
}
2474
2475
// if this is a module, automatically add this component to the references to ensure it gets in the ModuleComponents table
2476
if (this.compilingModule)
2477
{
2545
- this.core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Module, this.activeName, this.activeLanguage, ComplexReferenceChildType.Component, id.Id, false);
2478
+ this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Module, this.activeName, this.activeLanguage, ComplexReferenceChildType.Component, id.Id, false);
2479
}
2480
else if (ComplexReferenceParentType.Unknown != parentType && null != parentId) // if parent was provided, add a complex reference to that.
2481
{
2482
// If the Component is defined directly under a feature, then mark the complex reference primary.
2550
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.Component, id.Id, ComplexReferenceParentType.Feature == parentType);
2483
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.Component, id.Id, ComplexReferenceParentType.Feature == parentType);
2484
}
2485
}
2486
}
@@ -2571,30 +2504,30 @@ namespace WixToolset
2504
switch (attrib.Name.LocalName)
2505
{
2506
case "Id":
2574
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2507
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2508
break;
2509
case "Directory":
2510
// If the inline syntax is invalid it returns null. Use a static error identifier so the null
2511
// directory identifier here doesn't trickle down false errors into child elements.
2579
- directoryId = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null) ?? "ErrorParsingInlineSyntax";
2512
+ directoryId = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null) ?? "ErrorParsingInlineSyntax";
2513
break;
2514
case "Source":
2582
- source = this.core.GetAttributeValue(sourceLineNumbers, attrib);
2515
+ source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2516
break;
2517
default:
2585
- this.core.UnexpectedAttribute(node, attrib);
2518
+ this.Core.UnexpectedAttribute(node, attrib);
2519
break;
2520
}
2521
}
2522
else
2523
{
2591
- this.core.ParseExtensionAttribute(node, attrib);
2524
+ this.Core.ParseExtensionAttribute(node, attrib);
2525
}
2526
}
2527
2528
if (null == id)
2529
{
2597
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2530
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2531
id = Identifier.Invalid;
2532
}
2533
@@ -2619,22 +2552,22 @@ namespace WixToolset
2552
this.ParseComponentElement(child, ComplexReferenceParentType.ComponentGroup, id.Id, null, CompilerConstants.IntegerNotSet, directoryId, source);
2553
break;
2554
default:
2622
- this.core.UnexpectedElement(node, child);
2555
+ this.Core.UnexpectedElement(node, child);
2556
break;
2557
}
2558
}
2559
else
2560
{
2628
- this.core.ParseExtensionElement(node, child);
2561
+ this.Core.ParseExtensionElement(node, child);
2562
}
2563
}
2564
2632
- if (!this.core.EncounteredError)
2565
+ if (!this.Core.EncounteredError)
2566
{
2634
- Row row = this.core.CreateRow(sourceLineNumbers, "WixComponentGroup", id);
2567
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixComponentGroup, id);
2568
2569
// Add this componentGroup and its parent in WixGroup.
2637
- this.core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.ComponentGroup, id.Id);
2570
+ this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.ComponentGroup, id.Id);
2571
}
2572
}
2573
@@ -2660,31 +2593,31 @@ namespace WixToolset
2593
switch (attrib.Name.LocalName)
2594
{
2595
case "Id":
2663
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2664
- this.core.CreateSimpleReference(sourceLineNumbers, "WixComponentGroup", id);
2596
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2597
+ this.Core.CreateSimpleReference(sourceLineNumbers, "WixComponentGroup", id);
2598
break;
2599
case "Primary":
2667
- primary = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2600
+ primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2601
break;
2602
default:
2670
- this.core.UnexpectedAttribute(node, attrib);
2603
+ this.Core.UnexpectedAttribute(node, attrib);
2604
break;
2605
}
2606
}
2607
else
2608
{
2676
- this.core.ParseExtensionAttribute(node, attrib);
2609
+ this.Core.ParseExtensionAttribute(node, attrib);
2610
}
2611
}
2612
2613
if (null == id)
2614
{
2682
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2615
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2616
}
2617
2685
- this.core.ParseForExtensionElements(node);
2618
+ this.Core.ParseForExtensionElements(node);
2619
2687
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.ComponentGroup, id, (YesNoType.Yes == primary));
2620
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.ComponentGroup, id, (YesNoType.Yes == primary));
2621
}
2622
2623
/// <summary>
@@ -2709,31 +2642,31 @@ namespace WixToolset
2642
switch (attrib.Name.LocalName)
2643
{
2644
case "Id":
2712
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2713
- this.core.CreateSimpleReference(sourceLineNumbers, "Component", id);
2645
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2646
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Component", id);
2647
break;
2648
case "Primary":
2716
- primary = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2649
+ primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2650
break;
2651
default:
2719
- this.core.UnexpectedAttribute(node, attrib);
2652
+ this.Core.UnexpectedAttribute(node, attrib);
2653
break;
2654
}
2655
}
2656
else
2657
{
2725
- this.core.ParseExtensionAttribute(node, attrib);
2658
+ this.Core.ParseExtensionAttribute(node, attrib);
2659
}
2660
}
2661
2662
if (null == id)
2663
{
2731
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2664
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2665
}
2666
2734
- this.core.ParseForExtensionElements(node);
2667
+ this.Core.ParseForExtensionElements(node);
2668
2736
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.Component, id, (YesNoType.Yes == primary));
2669
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, parentLanguage, ComplexReferenceChildType.Component, id, (YesNoType.Yes == primary));
2670
}
2671
2672
/// <summary>
@@ -2756,13 +2689,13 @@ namespace WixToolset
2689
switch (attrib.Name.LocalName)
2690
{
2691
case "Id":
2759
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2692
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2693
break;
2694
case "Guid":
2762
- componentId = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
2695
+ componentId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
2696
break;
2697
case "Type":
2765
- string typeValue = this.core.GetAttributeValue(sourceLineNumbers, attrib);
2698
+ string typeValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2699
if (0 < typeValue.Length)
2700
{
2701
Wix.ComponentSearch.TypeType typeType = Wix.ComponentSearch.ParseTypeType(typeValue);
@@ -2775,25 +2708,25 @@ namespace WixToolset
2708
type = MsiInterop.MsidbLocatorTypeFileName;
2709
break;
2710
default:
2778
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue, "directory", "file"));
2711
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue, "directory", "file"));
2712
break;
2713
}
2714
}
2715
break;
2716
default:
2784
- this.core.UnexpectedAttribute(node, attrib);
2717
+ this.Core.UnexpectedAttribute(node, attrib);
2718
break;
2719
}
2720
}
2721
else
2722
{
2790
- this.core.ParseExtensionAttribute(node, attrib);
2723
+ this.Core.ParseExtensionAttribute(node, attrib);
2724
}
2725
}
2726
2727
if (null == id)
2728
{
2796
- id = this.core.CreateIdentifier("cmp", componentId, type.ToString());
2729
+ id = this.Core.CreateIdentifier("cmp", componentId, type.ToString());
2730
}
2731
2732
signature = id.Id;
@@ -2807,7 +2740,7 @@ namespace WixToolset
2740
case "DirectorySearch":
2741
if (oneChild)
2742
{
2810
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2743
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2744
}
2745
oneChild = true;
2746
@@ -2817,7 +2750,7 @@ namespace WixToolset
2750
case "DirectorySearchRef":
2751
if (oneChild)
2752
{
2820
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2753
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2754
}
2755
oneChild = true;
2756
signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -2825,7 +2758,7 @@ namespace WixToolset
2758
case "FileSearch":
2759
if (oneChild)
2760
{
2828
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2761
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2762
}
2763
oneChild = true;
2764
signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -2834,7 +2767,7 @@ namespace WixToolset
2767
case "FileSearchRef":
2768
if (oneChild)
2769
{
2837
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2770
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2771
}
2772
oneChild = true;
2773
string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures
@@ -2842,21 +2775,21 @@ namespace WixToolset
2775
signature = null;
2776
break;
2777
default:
2845
- this.core.UnexpectedElement(node, child);
2778
+ this.Core.UnexpectedElement(node, child);
2779
break;
2780
}
2781
}
2782
else
2783
{
2851
- this.core.ParseExtensionElement(node, child);
2784
+ this.Core.ParseExtensionElement(node, child);
2785
}
2786
}
2787
2855
- if (!this.core.EncounteredError)
2788
+ if (!this.Core.EncounteredError)
2789
{
2857
- Row row = this.core.CreateRow(sourceLineNumbers, "CompLocator", id);
2858
- row[1] = componentId;
2859
- row[2] = type;
2790
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CompLocator, id);
2791
+ row.Set(1, componentId);
2792
+ row.Set(2, type);
2793
}
2794
2795
return signature;
@@ -2880,16 +2813,16 @@ namespace WixToolset
2813
switch (attrib.Name.LocalName)
2814
{
2815
case "Directory":
2883
- directoryId = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, directoryId);
2816
+ directoryId = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, directoryId);
2817
break;
2818
default:
2886
- this.core.UnexpectedAttribute(node, attrib);
2819
+ this.Core.UnexpectedAttribute(node, attrib);
2820
break;
2821
}
2822
}
2823
else
2824
{
2892
- this.core.ParseExtensionAttribute(node, attrib);
2825
+ this.Core.ParseExtensionAttribute(node, attrib);
2826
}
2827
}
2828
@@ -2909,22 +2842,22 @@ namespace WixToolset
2842
this.ParsePermissionExElement(child, directoryId, "CreateFolder");
2843
break;
2844
default:
2912
- this.core.UnexpectedElement(node, child);
2845
+ this.Core.UnexpectedElement(node, child);
2846
break;
2847
}
2848
}
2849
else
2850
{
2851
Dictionary<string, string> context = new Dictionary<string, string>() { { "DirectoryId", directoryId }, { "ComponentId", componentId }, { "Win64", win64Component.ToString() } };
2919
- this.core.ParseExtensionElement(node, child, context);
2852
+ this.Core.ParseExtensionElement(node, child, context);
2853
}
2854
}
2855
2923
- if (!this.core.EncounteredError)
2856
+ if (!this.Core.EncounteredError)
2857
{
2925
- Row row = this.core.CreateRow(sourceLineNumbers, "CreateFolder");
2926
- row[0] = directoryId;
2927
- row[1] = componentId;
2858
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CreateFolder);
2859
+ row.Set(0, directoryId);
2860
+ row.Set(1, componentId);
2861
}
2862
2863
return directoryId;
@@ -2957,167 +2890,167 @@ namespace WixToolset
2890
switch (attrib.Name.LocalName)
2891
{
2892
case "Id":
2960
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2893
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2894
break;
2895
case "Delete":
2963
- delete = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2896
+ delete = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2897
break;
2898
case "DestinationDirectory":
2966
- destinationDirectory = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
2899
+ destinationDirectory = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
2900
break;
2901
case "DestinationName":
2969
- destinationName = this.core.GetAttributeLongFilename(sourceLineNumbers, attrib, false);
2902
+ destinationName = this.Core.GetAttributeLongFilename(sourceLineNumbers, attrib, false);
2903
break;
2904
case "DestinationProperty":
2972
- destinationProperty = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2905
+ destinationProperty = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2906
break;
2907
case "DestinationShortName":
2975
- destinationShortName = this.core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
2908
+ destinationShortName = this.Core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
2909
break;
2910
case "FileId":
2911
if (null != fileId)
2912
{
2980
- this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
2913
+ this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
2914
}
2982
- fileId = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2983
- this.core.CreateSimpleReference(sourceLineNumbers, "File", fileId);
2915
+ fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2916
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId);
2917
break;
2918
case "SourceDirectory":
2986
- sourceDirectory = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
2919
+ sourceDirectory = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
2920
break;
2921
case "SourceName":
2989
- sourceName = this.core.GetAttributeValue(sourceLineNumbers, attrib);
2922
+ sourceName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2923
break;
2924
case "SourceProperty":
2992
- sourceProperty = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2925
+ sourceProperty = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2926
break;
2927
default:
2995
- this.core.UnexpectedAttribute(node, attrib);
2928
+ this.Core.UnexpectedAttribute(node, attrib);
2929
break;
2930
}
2931
}
2932
else
2933
{
3001
- this.core.ParseExtensionAttribute(node, attrib);
2934
+ this.Core.ParseExtensionAttribute(node, attrib);
2935
}
2936
}
2937
2938
if (null != sourceFolder && null != sourceDirectory) // SourceFolder and SourceDirectory cannot coexist
2939
{
3007
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceDirectory"));
2940
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceDirectory"));
2941
}
2942
2943
if (null != sourceFolder && null != sourceProperty) // SourceFolder and SourceProperty cannot coexist
2944
{
3012
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceProperty"));
2945
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceProperty"));
2946
}
2947
2948
if (null != sourceDirectory && null != sourceProperty) // SourceDirectory and SourceProperty cannot coexist
2949
{
3017
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "SourceDirectory"));
2950
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "SourceDirectory"));
2951
}
2952
2953
if (null != destinationDirectory && null != destinationProperty) // DestinationDirectory and DestinationProperty cannot coexist
2954
{
3022
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationProperty", "DestinationDirectory"));
2955
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationProperty", "DestinationDirectory"));
2956
}
2957
2958
// generate a short file name
3026
- if (null == destinationShortName && (null != destinationName && !this.core.IsValidShortFilename(destinationName, false)))
2959
+ if (null == destinationShortName && (null != destinationName && !this.Core.IsValidShortFilename(destinationName, false)))
2960
{
3028
- destinationShortName = this.core.CreateShortName(destinationName, true, false, node.Name.LocalName, componentId);
2961
+ destinationShortName = this.Core.CreateShortName(destinationName, true, false, node.Name.LocalName, componentId);
2962
}
2963
2964
if (null == id)
2965
{
3033
- id = this.core.CreateIdentifier("cf", sourceFolder, sourceDirectory, sourceProperty, destinationDirectory, destinationProperty, destinationName);
2966
+ id = this.Core.CreateIdentifier("cf", sourceFolder, sourceDirectory, sourceProperty, destinationDirectory, destinationProperty, destinationName);
2967
}
2968
3036
- this.core.ParseForExtensionElements(node);
2969
+ this.Core.ParseForExtensionElements(node);
2970
2971
if (null == fileId)
2972
{
2973
// DestinationDirectory or DestinationProperty must be specified
2974
if (null == destinationDirectory && null == destinationProperty)
2975
{
3043
- this.core.OnMessage(WixErrors.ExpectedAttributesWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationDirectory", "DestinationProperty", "FileId"));
2976
+ this.Core.OnMessage(WixErrors.ExpectedAttributesWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationDirectory", "DestinationProperty", "FileId"));
2977
}
2978
3046
- if (!this.core.EncounteredError)
2979
+ if (!this.Core.EncounteredError)
2980
{
3048
- Row row = this.core.CreateRow(sourceLineNumbers, "MoveFile", id);
3049
- row[1] = componentId;
3050
- row[2] = sourceName;
3051
- row[3] = String.IsNullOrEmpty(destinationShortName) && String.IsNullOrEmpty(destinationName) ? null : GetMsiFilenameValue(destinationShortName, destinationName);
2981
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.MoveFile, id);
2982
+ row.Set(1, componentId);
2983
+ row.Set(2, sourceName);
2984
+ row.Set(3, String.IsNullOrEmpty(destinationShortName) && String.IsNullOrEmpty(destinationName) ? null : GetMsiFilenameValue(destinationShortName, destinationName));
2985
if (null != sourceDirectory)
2986
{
3054
- row[4] = sourceDirectory;
2987
+ row.Set(4, sourceDirectory);
2988
}
2989
else if (null != sourceProperty)
2990
{
3058
- row[4] = sourceProperty;
2991
+ row.Set(4, sourceProperty);
2992
}
2993
else
2994
{
3062
- row[4] = sourceFolder;
2995
+ row.Set(4, sourceFolder);
2996
}
2997
2998
if (null != destinationDirectory)
2999
{
3067
- row[5] = destinationDirectory;
3000
+ row.Set(5, destinationDirectory);
3001
}
3002
else
3003
{
3071
- row[5] = destinationProperty;
3004
+ row.Set(5, destinationProperty);
3005
}
3073
- row[6] = delete ? 1 : 0;
3006
+ row.Set(6, delete ? 1 : 0);
3007
}
3008
}
3009
else // copy the file
3010
{
3011
if (null != sourceDirectory)
3012
{
3080
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceDirectory", "FileId"));
3013
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceDirectory", "FileId"));
3014
}
3015
3016
if (null != sourceFolder)
3017
{
3085
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "FileId"));
3018
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "FileId"));
3019
}
3020
3021
if (null != sourceName)
3022
{
3090
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceName", "FileId"));
3023
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceName", "FileId"));
3024
}
3025
3026
if (null != sourceProperty)
3027
{
3095
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "FileId"));
3028
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "FileId"));
3029
}
3030
3031
if (delete)
3032
{
3100
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Delete", "FileId"));
3033
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Delete", "FileId"));
3034
}
3035
3036
if (null == destinationName && null == destinationDirectory && null == destinationProperty)
3037
{
3105
- this.core.OnMessage(WixWarnings.CopyFileFileIdUseless(sourceLineNumbers));
3038
+ this.Core.OnMessage(WixWarnings.CopyFileFileIdUseless(sourceLineNumbers));
3039
}
3040
3108
- if (!this.core.EncounteredError)
3041
+ if (!this.Core.EncounteredError)
3042
{
3110
- Row row = this.core.CreateRow(sourceLineNumbers, "DuplicateFile", id);
3111
- row[1] = componentId;
3112
- row[2] = fileId;
3113
- row[3] = String.IsNullOrEmpty(destinationShortName) && String.IsNullOrEmpty(destinationName) ? null : GetMsiFilenameValue(destinationShortName, destinationName);
3043
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DuplicateFile, id);
3044
+ row.Set(1, componentId);
3045
+ row.Set(2, fileId);
3046
+ row.Set(3, String.IsNullOrEmpty(destinationShortName) && String.IsNullOrEmpty(destinationName) ? null : GetMsiFilenameValue(destinationShortName, destinationName));
3047
if (null != destinationDirectory)
3048
{
3116
- row[4] = destinationDirectory;
3049
+ row.Set(4, destinationDirectory);
3050
}
3051
else
3052
{
3120
- row[4] = destinationProperty;
3053
+ row.Set(4, destinationProperty);
3054
}
3055
}
3056
}
@@ -3149,39 +3082,39 @@ namespace WixToolset
3082
switch (attrib.Name.LocalName)
3083
{
3084
case "Id":
3152
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
3085
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
3086
break;
3087
case "BinaryKey":
3088
if (null != source)
3089
{
3157
- this.core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3090
+ this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3091
}
3159
- source = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3092
+ source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3093
sourceBits = MsiInterop.MsidbCustomActionTypeBinaryData;
3161
- this.core.CreateSimpleReference(sourceLineNumbers, "Binary", source); // add a reference to the appropriate Binary
3094
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", source); // add a reference to the appropriate Binary
3095
break;
3096
case "Directory":
3097
if (null != source)
3098
{
3166
- this.core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3099
+ this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3100
}
3168
- source = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
3101
+ source = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
3102
sourceBits = MsiInterop.MsidbCustomActionTypeDirectory;
3103
break;
3104
case "DllEntry":
3105
if (null != target)
3106
{
3174
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3107
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3108
}
3176
- target = this.core.GetAttributeValue(sourceLineNumbers, attrib);
3109
+ target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3110
targetBits = MsiInterop.MsidbCustomActionTypeDll;
3111
break;
3112
case "Error":
3113
if (null != target)
3114
{
3182
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3115
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3116
}
3184
- target = this.core.GetAttributeValue(sourceLineNumbers, attrib);
3117
+ target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3118
targetBits = MsiInterop.MsidbCustomActionTypeTextData | MsiInterop.MsidbCustomActionTypeSourceFile;
3119
3120
bool errorReference = true;
@@ -3204,19 +3137,19 @@ namespace WixToolset
3137
3138
if (errorReference)
3139
{
3207
- this.core.CreateSimpleReference(sourceLineNumbers, "Error", target);
3140
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Error", target);
3141
}
3142
break;
3143
case "ExeCommand":
3144
if (null != target)
3145
{
3213
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3146
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3147
}
3215
- target = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3148
+ target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3149
targetBits = MsiInterop.MsidbCustomActionTypeExe;
3150
break;
3151
case "Execute":
3219
- string execute = this.core.GetAttributeValue(sourceLineNumbers, attrib);
3152
+ string execute = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3153
if (0 < execute.Length)
3154
{
3155
Wix.CustomAction.ExecuteType executeType = Wix.CustomAction.ParseExecuteType(execute);
@@ -3243,7 +3176,7 @@ namespace WixToolset
3176
bits |= MsiInterop.MsidbCustomActionTypeClientRepeat;
3177
break;
3178
default:
3246
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, execute, "commit", "deferred", "firstSequence", "immediate", "oncePerProcess", "rollback", "secondSequence"));
3179
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, execute, "commit", "deferred", "firstSequence", "immediate", "oncePerProcess", "rollback", "secondSequence"));
3180
break;
3181
}
3182
}
@@ -3251,20 +3184,20 @@ namespace WixToolset
3184
case "FileKey":
3185
if (null != source)
3186
{
3254
- this.core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3187
+ this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3188
}
3256
- source = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3189
+ source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3190
sourceBits = MsiInterop.MsidbCustomActionTypeSourceFile;
3258
- this.core.CreateSimpleReference(sourceLineNumbers, "File", source); // add a reference to the appropriate File
3191
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", source); // add a reference to the appropriate File
3192
break;
3193
case "HideTarget":
3261
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3194
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3195
{
3196
bits |= MsiInterop.MsidbCustomActionTypeHideTarget;
3197
}
3198
break;
3199
case "Impersonate":
3267
- if (YesNoType.No == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3200
+ if (YesNoType.No == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3201
{
3202
bits |= MsiInterop.MsidbCustomActionTypeNoImpersonate;
3203
}
@@ -3272,13 +3205,13 @@ namespace WixToolset
3205
case "JScriptCall":
3206
if (null != target)
3207
{
3275
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3208
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3209
}
3277
- target = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3210
+ target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3211
targetBits = MsiInterop.MsidbCustomActionTypeJScript;
3212
break;
3213
case "PatchUninstall":
3281
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3214
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3215
{
3216
extendedBits |= MsiInterop.MsidbCustomActionTypePatchUninstall;
3217
}
@@ -3286,13 +3219,13 @@ namespace WixToolset
3219
case "Property":
3220
if (null != source)
3221
{
3289
- this.core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3222
+ this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3223
}
3291
- source = this.core.GetAttributeValue(sourceLineNumbers, attrib);
3224
+ source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3225
sourceBits = MsiInterop.MsidbCustomActionTypeProperty;
3226
break;
3227
case "Return":
3295
- string returnValue = this.core.GetAttributeValue(sourceLineNumbers, attrib);
3228
+ string returnValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3229
if (0 < returnValue.Length)
3230
{
3231
Wix.CustomAction.ReturnType returnType = Wix.CustomAction.ParseReturnType(returnValue);
@@ -3310,7 +3243,7 @@ namespace WixToolset
3243
bits |= MsiInterop.MsidbCustomActionTypeContinue;
3244
break;
3245
default:
3313
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, returnValue, "asyncNoWait", "asyncWait", "check", "ignore"));
3246
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, returnValue, "asyncNoWait", "asyncWait", "check", "ignore"));
3247
break;
3248
}
3249
}
@@ -3318,12 +3251,12 @@ namespace WixToolset
3251
case "Script":
3252
if (null != source)
3253
{
3321
- this.core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3254
+ this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3255
}
3256
3257
if (null != target)
3258
{
3326
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3259
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3260
}
3261
3262
// set the source and target to empty string for error messages when the user sets multiple sources or targets
@@ -3332,7 +3265,7 @@ namespace WixToolset
3265
3266
inlineScript = true;
3267
3335
- string script = this.core.GetAttributeValue(sourceLineNumbers, attrib);
3268
+ string script = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3269
if (0 < script.Length)
3270
{
3271
Wix.CustomAction.ScriptType scriptType = Wix.CustomAction.ParseScriptType(script);
@@ -3347,16 +3280,16 @@ namespace WixToolset
3280
targetBits = MsiInterop.MsidbCustomActionTypeVBScript;
3281
break;
3282
default:
3350
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, script, "jscript", "vbscript"));
3283
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, script, "jscript", "vbscript"));
3284
break;
3285
}
3286
}
3287
break;
3288
case "SuppressModularization":
3356
- suppressModularization = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
3289
+ suppressModularization = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
3290
break;
3291
case "TerminalServerAware":
3359
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3292
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3293
{
3294
bits |= MsiInterop.MsidbCustomActionTypeTSAware;
3295
}
@@ -3364,40 +3297,40 @@ namespace WixToolset
3297
case "Value":
3298
if (null != target)
3299
{
3367
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3300
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3301
}
3369
- target = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3302
+ target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3303
targetBits = MsiInterop.MsidbCustomActionTypeTextData;
3304
break;
3305
case "VBScriptCall":
3306
if (null != target)
3307
{
3375
- this.core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3308
+ this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3309
}
3377
- target = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3310
+ target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3311
targetBits = MsiInterop.MsidbCustomActionTypeVBScript;
3312
break;
3313
case "Win64":
3314
explicitWin64 = true;
3382
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3315
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
3316
{
3317
bits |= MsiInterop.MsidbCustomActionType64BitScript;
3318
}
3319
break;
3320
default:
3388
- this.core.UnexpectedAttribute(node, attrib);
3321
+ this.Core.UnexpectedAttribute(node, attrib);
3322
break;
3323
}
3324
}
3325
else
3326
{
3394
- this.core.ParseExtensionAttribute(node, attrib);
3327
+ this.Core.ParseExtensionAttribute(node, attrib);
3328
}
3329
}
3330
3331
if (null == id)
3332
{
3400
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3333
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3334
id = Identifier.Invalid;
3335
}
3336
@@ -3407,7 +3340,7 @@ namespace WixToolset
3340
}
3341
3342
// get the inner text if any exists
3410
- innerText = this.core.GetTrimmedInnerText(node);
3343
+ innerText = this.Core.GetTrimmedInnerText(node);
3344
3345
// if we have an in-lined Script CustomAction ensure no source or target attributes were provided
3346
if (inlineScript)
@@ -3418,48 +3351,48 @@ namespace WixToolset
3351
{
3352
if (null == source)
3353
{
3421
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "BinaryKey", "FileKey", "Property"));
3354
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "BinaryKey", "FileKey", "Property"));
3355
}
3356
else if (MsiInterop.MsidbCustomActionTypeDirectory == sourceBits)
3357
{
3425
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "Directory"));
3358
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "Directory"));
3359
}
3360
}
3361
else if (MsiInterop.MsidbCustomActionTypeJScript == targetBits) // non-inline jscript
3362
{
3363
if (null == source)
3364
{
3432
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "BinaryKey", "FileKey", "Property"));
3365
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "BinaryKey", "FileKey", "Property"));
3366
}
3367
else if (MsiInterop.MsidbCustomActionTypeDirectory == sourceBits)
3368
{
3436
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "Directory"));
3369
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "Directory"));
3370
}
3371
}
3372
else if (MsiInterop.MsidbCustomActionTypeExe == targetBits) // exe-command
3373
{
3374
if (null == source)
3375
{
3443
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property"));
3376
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property"));
3377
}
3378
}
3379
else if (MsiInterop.MsidbCustomActionTypeTextData == (bits | sourceBits | targetBits))
3380
{
3448
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Value", "Directory", "Property"));
3381
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Value", "Directory", "Property"));
3382
}
3383
else if (!String.IsNullOrEmpty(innerText)) // inner text cannot be specified with non-script CAs
3384
{
3452
- this.core.OnMessage(WixErrors.CustomActionIllegalInnerText(sourceLineNumbers, node.Name.LocalName, innerText, "Script"));
3385
+ this.Core.OnMessage(WixErrors.CustomActionIllegalInnerText(sourceLineNumbers, node.Name.LocalName, innerText, "Script"));
3386
}
3387
3388
if (MsiInterop.MsidbCustomActionType64BitScript == (bits & MsiInterop.MsidbCustomActionType64BitScript) && MsiInterop.MsidbCustomActionTypeVBScript != targetBits && MsiInterop.MsidbCustomActionTypeJScript != targetBits)
3389
{
3457
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Win64", "Script", "VBScriptCall", "JScriptCall"));
3390
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Win64", "Script", "VBScriptCall", "JScriptCall"));
3391
}
3392
3393
if ((MsiInterop.MsidbCustomActionTypeAsync | MsiInterop.MsidbCustomActionTypeContinue) == (bits & (MsiInterop.MsidbCustomActionTypeAsync | MsiInterop.MsidbCustomActionTypeContinue)) && MsiInterop.MsidbCustomActionTypeExe != targetBits)
3394
{
3462
- this.core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Return", "asyncNoWait", "ExeCommand"));
3395
+ this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Return", "asyncNoWait", "ExeCommand"));
3396
}
3397
3398
if (MsiInterop.MsidbCustomActionTypeTSAware == (bits & MsiInterop.MsidbCustomActionTypeTSAware))
@@ -3467,7 +3400,7 @@ namespace WixToolset
3400
// TS-aware CAs are valid only when deferred so require the in-script Type bit...
3401
if (0 == (bits & MsiInterop.MsidbCustomActionTypeInScript))
3402
{
3470
- this.core.OnMessage(WixErrors.IllegalTerminalServerCustomActionAttributes(sourceLineNumbers));
3403
+ this.Core.OnMessage(WixErrors.IllegalTerminalServerCustomActionAttributes(sourceLineNumbers));
3404
}
3405
}
3406
@@ -3476,30 +3409,30 @@ namespace WixToolset
3409
MsiInterop.MsidbCustomActionTypeTextData == targetBits &&
3410
0 != (bits & MsiInterop.MsidbCustomActionTypeInScript))
3411
{
3479
- this.core.OnMessage(WixErrors.IllegalPropertyCustomActionAttributes(sourceLineNumbers));
3412
+ this.Core.OnMessage(WixErrors.IllegalPropertyCustomActionAttributes(sourceLineNumbers));
3413
}
3414
3415
if (0 == targetBits)
3416
{
3484
- this.core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3417
+ this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3418
}
3419
3487
- this.core.ParseForExtensionElements(node);
3420
+ this.Core.ParseForExtensionElements(node);
3421
3489
- if (!this.core.EncounteredError)
3422
+ if (!this.Core.EncounteredError)
3423
{
3491
- Row row = this.core.CreateRow(sourceLineNumbers, "CustomAction", id);
3492
- row[1] = bits | sourceBits | targetBits;
3493
- row[2] = source;
3494
- row[3] = target;
3424
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction, id);
3425
+ row.Set(1, bits | sourceBits | targetBits);
3426
+ row.Set(2, source);
3427
+ row.Set(3, target);
3428
if (0 != extendedBits)
3429
{
3497
- row[4] = extendedBits;
3430
+ row.Set(4, extendedBits);
3431
}
3432
3433
if (YesNoType.Yes == suppressModularization)
3434
{
3502
- this.core.CreateRow(sourceLineNumbers, "WixSuppressModularization", id);
3435
+ this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixSuppressModularization, id);
3436
}
3437
3438
// For deferred CAs that specify HideTarget we should also hide the CA data property for the action.
@@ -3529,26 +3462,26 @@ namespace WixToolset
3462
switch (attrib.Name.LocalName)
3463
{
3464
case "Id":
3532
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3533
- this.core.CreateSimpleReference(sourceLineNumbers, table, id);
3465
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3466
+ this.Core.CreateSimpleReference(sourceLineNumbers, table, id);
3467
break;
3468
default:
3536
- this.core.UnexpectedAttribute(node, attrib);
3469
+ this.Core.UnexpectedAttribute(node, attrib);
3470
break;
3471
}
3472
}
3473
else
3474
{
3542
- this.core.ParseExtensionAttribute(node, attrib);
3475
+ this.Core.ParseExtensionAttribute(node, attrib);
3476
}
3477
}
3478
3479
if (null == id)
3480
{
3548
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3481
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3482
}
3483
3551
- this.core.ParseForExtensionElements(node);
3484
+ this.Core.ParseForExtensionElements(node);
3485
3486
return id;
3487
}
@@ -3572,34 +3505,34 @@ namespace WixToolset
3505
switch (attrib.Name.LocalName)
3506
{
3507
case "Id":
3575
- primaryKeys[0] = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3508
+ primaryKeys[0] = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3509
break;
3510
case "ProductCode":
3578
- primaryKeys[1] = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3511
+ primaryKeys[1] = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3512
break;
3513
default:
3581
- this.core.UnexpectedAttribute(node, attrib);
3514
+ this.Core.UnexpectedAttribute(node, attrib);
3515
break;
3516
}
3517
}
3518
else
3519
{
3587
- this.core.ParseExtensionAttribute(node, attrib);
3520
+ this.Core.ParseExtensionAttribute(node, attrib);
3521
}
3522
}
3523
3524
if (null == primaryKeys[0])
3525
{
3593
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3526
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3527
}
3528
3596
- this.core.CreateSimpleReference(sourceLineNumbers, "MsiPatchSequence", primaryKeys);
3529
+ this.Core.CreateSimpleReference(sourceLineNumbers, "MsiPatchSequence", primaryKeys);
3530
3598
- this.core.ParseForExtensionElements(node);
3531
+ this.Core.ParseForExtensionElements(node);
3532
3600
- if (!this.core.EncounteredError)
3533
+ if (!this.Core.EncounteredError)
3534
{
3602
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.PatchFamily, primaryKeys[0], true);
3535
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.PatchFamily, primaryKeys[0], true);
3536
}
3537
}
3538
@@ -3620,22 +3553,22 @@ namespace WixToolset
3553
switch (attrib.Name.LocalName)
3554
{
3555
case "Id":
3623
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
3556
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
3557
break;
3558
default:
3626
- this.core.UnexpectedAttribute(node, attrib);
3559
+ this.Core.UnexpectedAttribute(node, attrib);
3560
break;
3561
}
3562
}
3563
else
3564
{
3632
- this.core.ParseExtensionAttribute(node, attrib);
3565
+ this.Core.ParseExtensionAttribute(node, attrib);
3566
}
3567
}
3568
3569
if (null == id)
3570
{
3638
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3571
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3572
id = Identifier.Invalid;
3573
}
3574
@@ -3655,22 +3588,22 @@ namespace WixToolset
3588
this.ParsePatchFamilyGroupRefElement(child, ComplexReferenceParentType.PatchFamilyGroup, id.Id);
3589
break;
3590
default:
3658
- this.core.UnexpectedElement(node, child);
3591
+ this.Core.UnexpectedElement(node, child);
3592
break;
3593
}
3594
}
3595
else
3596
{
3664
- this.core.ParseExtensionElement(node, child);
3597
+ this.Core.ParseExtensionElement(node, child);
3598
}
3599
}
3600
3668
- if (!this.core.EncounteredError)
3601
+ if (!this.Core.EncounteredError)
3602
{
3670
- Row row = this.core.CreateRow(sourceLineNumbers, "WixPatchFamilyGroup", id);
3603
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixPatchFamilyGroup, id);
3604
3605
//Add this PatchFamilyGroup and its parent in WixGroup.
3673
- this.core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.PatchFamilyGroup, id.Id);
3606
+ this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.PatchFamilyGroup, id.Id);
3607
}
3608
}
3609
@@ -3694,30 +3627,30 @@ namespace WixToolset
3627
switch (attrib.Name.LocalName)
3628
{
3629
case "Id":
3697
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3698
- this.core.CreateSimpleReference(sourceLineNumbers, "WixPatchFamilyGroup", id);
3630
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3631
+ this.Core.CreateSimpleReference(sourceLineNumbers, "WixPatchFamilyGroup", id);
3632
break;
3633
default:
3701
- this.core.UnexpectedAttribute(node, attrib);
3634
+ this.Core.UnexpectedAttribute(node, attrib);
3635
break;
3636
}
3637
}
3638
else
3639
{
3707
- this.core.ParseExtensionAttribute(node, attrib);
3640
+ this.Core.ParseExtensionAttribute(node, attrib);
3641
}
3642
}
3643
3644
if (null == id)
3645
{
3713
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3646
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3647
}
3648
3716
- this.core.ParseForExtensionElements(node);
3649
+ this.Core.ParseForExtensionElements(node);
3650
3718
- if (!this.core.EncounteredError)
3651
+ if (!this.Core.EncounteredError)
3652
{
3720
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.PatchFamilyGroup, id, true);
3653
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.PatchFamilyGroup, id, true);
3654
}
3655
}
3656
@@ -3737,31 +3670,31 @@ namespace WixToolset
3670
switch (attrib.Name.LocalName)
3671
{
3672
case "Id":
3740
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3673
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3674
break;
3675
default:
3743
- this.core.UnexpectedAttribute(node, attrib);
3676
+ this.Core.UnexpectedAttribute(node, attrib);
3677
break;
3678
}
3679
}
3680
else
3681
{
3749
- this.core.ParseExtensionAttribute(node, attrib);
3682
+ this.Core.ParseExtensionAttribute(node, attrib);
3683
}
3684
}
3685
3686
if (null == id)
3687
{
3755
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3688
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3689
}
3690
else if (31 < id.Length)
3691
{
3759
- this.core.OnMessage(WixErrors.TableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id));
3692
+ this.Core.OnMessage(WixErrors.TableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id));
3693
}
3694
3762
- this.core.ParseForExtensionElements(node);
3695
+ this.Core.ParseForExtensionElements(node);
3696
3764
- this.core.EnsureTable(sourceLineNumbers, id);
3697
+ this.Core.EnsureTable(sourceLineNumbers, id);
3698
}
3699
3700
/// <summary>
@@ -3769,9 +3702,6 @@ namespace WixToolset
3702
/// </summary>
3703
/// <param name="node">Element to parse.</param>
3704
/// <remarks>not cleaned</remarks>
3772
- [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " +
3773
- "in a change to the way the WixCustomTable table is generated. Furthermore, there is no security hole here, as the strings won't need to " +
3774
- "make a round trip")]
3705
private void ParseCustomTableElement(XElement node)
3706
{
3707
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -3798,29 +3728,29 @@ namespace WixToolset
3728
switch (attrib.Name.LocalName)
3729
{
3730
case "Id":
3801
- tableId = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3731
+ tableId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3732
break;
3733
case "BootstrapperApplicationData":
3804
- bootstrapperApplicationData = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
3734
+ bootstrapperApplicationData = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
3735
break;
3736
default:
3807
- this.core.UnexpectedAttribute(node, attrib);
3737
+ this.Core.UnexpectedAttribute(node, attrib);
3738
break;
3739
}
3740
}
3741
else
3742
{
3813
- this.core.ParseExtensionAttribute(node, attrib);
3743
+ this.Core.ParseExtensionAttribute(node, attrib);
3744
}
3745
}
3746
3747
if (null == tableId)
3748
{
3819
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3749
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3750
}
3751
else if (31 < tableId.Length)
3752
{
3823
- this.core.OnMessage(WixErrors.CustomTableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", tableId));
3753
+ this.Core.OnMessage(WixErrors.CustomTableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", tableId));
3754
}
3755
3756
foreach (XElement child in node.Elements())
@@ -3854,43 +3784,43 @@ namespace WixToolset
3784
switch (childAttrib.Name.LocalName)
3785
{
3786
case "Id":
3857
- columnName = this.core.GetAttributeIdentifierValue(childSourceLineNumbers, childAttrib);
3787
+ columnName = this.Core.GetAttributeIdentifierValue(childSourceLineNumbers, childAttrib);
3788
break;
3789
case "Category":
3860
- category = this.core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3790
+ category = this.Core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3791
break;
3792
case "Description":
3863
- description = this.core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3793
+ description = this.Core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3794
break;
3795
case "KeyColumn":
3866
- keyColumn = this.core.GetAttributeIntegerValue(childSourceLineNumbers, childAttrib, 1, 32);
3796
+ keyColumn = this.Core.GetAttributeIntegerValue(childSourceLineNumbers, childAttrib, 1, 32);
3797
break;
3798
case "KeyTable":
3869
- keyTable = this.core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3799
+ keyTable = this.Core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3800
break;
3801
case "Localizable":
3872
- localizable = YesNoType.Yes == this.core.GetAttributeYesNoValue(childSourceLineNumbers, childAttrib);
3802
+ localizable = YesNoType.Yes == this.Core.GetAttributeYesNoValue(childSourceLineNumbers, childAttrib);
3803
break;
3804
case "MaxValue":
3875
- maxValue = this.core.GetAttributeLongValue(childSourceLineNumbers, childAttrib, int.MinValue + 1, int.MaxValue);
3805
+ maxValue = this.Core.GetAttributeLongValue(childSourceLineNumbers, childAttrib, int.MinValue + 1, int.MaxValue);
3806
break;
3807
case "MinValue":
3878
- minValue = this.core.GetAttributeLongValue(childSourceLineNumbers, childAttrib, int.MinValue + 1, int.MaxValue);
3808
+ minValue = this.Core.GetAttributeLongValue(childSourceLineNumbers, childAttrib, int.MinValue + 1, int.MaxValue);
3809
break;
3810
case "Modularize":
3881
- modularization = this.core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3811
+ modularization = this.Core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3812
break;
3813
case "Nullable":
3884
- nullable = YesNoType.Yes == this.core.GetAttributeYesNoValue(childSourceLineNumbers, childAttrib);
3814
+ nullable = YesNoType.Yes == this.Core.GetAttributeYesNoValue(childSourceLineNumbers, childAttrib);
3815
break;
3816
case "PrimaryKey":
3887
- primaryKey = YesNoType.Yes == this.core.GetAttributeYesNoValue(childSourceLineNumbers, childAttrib);
3817
+ primaryKey = YesNoType.Yes == this.Core.GetAttributeYesNoValue(childSourceLineNumbers, childAttrib);
3818
break;
3819
case "Set":
3890
- setValues = this.core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3820
+ setValues = this.Core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3821
break;
3822
case "Type":
3893
- string typeValue = this.core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3823
+ string typeValue = this.Core.GetAttributeValue(childSourceLineNumbers, childAttrib);
3824
if (0 < typeValue.Length)
3825
{
3826
Wix.Column.TypeType typeType = Wix.Column.ParseTypeType(typeValue);
@@ -3906,34 +3836,34 @@ namespace WixToolset
3836
typeName = "CHAR";
3837
break;
3838
default:
3909
- this.core.OnMessage(WixErrors.IllegalAttributeValue(childSourceLineNumbers, child.Name.LocalName, "Type", typeValue, "binary", "int", "string"));
3839
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(childSourceLineNumbers, child.Name.LocalName, "Type", typeValue, "binary", "int", "string"));
3840
break;
3841
}
3842
}
3843
break;
3844
case "Width":
3915
- width = this.core.GetAttributeIntegerValue(childSourceLineNumbers, childAttrib, 0, int.MaxValue);
3845
+ width = this.Core.GetAttributeIntegerValue(childSourceLineNumbers, childAttrib, 0, int.MaxValue);
3846
break;
3847
default:
3918
- this.core.UnexpectedAttribute(child, childAttrib);
3848
+ this.Core.UnexpectedAttribute(child, childAttrib);
3849
break;
3850
}
3851
}
3852
3853
if (null == columnName)
3854
{
3925
- this.core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Id"));
3855
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Id"));
3856
}
3857
3858
if (null == typeName)
3859
{
3930
- this.core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Type"));
3860
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Type"));
3861
}
3862
else if ("SHORT" == typeName)
3863
{
3864
if (2 != width && 4 != width)
3865
{
3936
- this.core.OnMessage(WixErrors.CustomTableIllegalColumnWidth(childSourceLineNumbers, child.Name.LocalName, "Width", width));
3866
+ this.Core.OnMessage(WixErrors.CustomTableIllegalColumnWidth(childSourceLineNumbers, child.Name.LocalName, "Width", width));
3867
}
3868
columnType = String.Concat(nullable ? "I" : "i", width);
3869
}
@@ -3946,12 +3876,12 @@ namespace WixToolset
3876
{
3877
if ("Binary" != category)
3878
{
3949
- this.core.OnMessage(WixErrors.ExpectedBinaryCategory(childSourceLineNumbers));
3879
+ this.Core.OnMessage(WixErrors.ExpectedBinaryCategory(childSourceLineNumbers));
3880
}
3881
columnType = String.Concat(nullable ? "V" : "v", width);
3882
}
3883
3954
- this.core.ParseForExtensionElements(child);
3884
+ this.Core.ParseForExtensionElements(child);
3885
3886
columnNames = String.Concat(columnNames, null == columnNames ? String.Empty : "\t", columnName);
3887
columnTypes = String.Concat(columnTypes, null == columnTypes ? String.Empty : "\t", columnType);
@@ -3975,7 +3905,7 @@ namespace WixToolset
3905
3906
foreach (XAttribute childAttrib in child.Attributes())
3907
{
3978
- this.core.ParseExtensionAttribute(child, childAttrib);
3908
+ this.Core.ParseExtensionAttribute(child, childAttrib);
3909
}
3910
3911
foreach (XElement data in child.Elements())
@@ -3990,17 +3920,17 @@ namespace WixToolset
3920
switch (dataAttrib.Name.LocalName)
3921
{
3922
case "Column":
3993
- columnName = this.core.GetAttributeValue(dataSourceLineNumbers, dataAttrib);
3923
+ columnName = this.Core.GetAttributeValue(dataSourceLineNumbers, dataAttrib);
3924
break;
3925
default:
3996
- this.core.UnexpectedAttribute(data, dataAttrib);
3926
+ this.Core.UnexpectedAttribute(data, dataAttrib);
3927
break;
3928
}
3929
}
3930
3931
if (null == columnName)
3932
{
4003
- this.core.OnMessage(WixErrors.ExpectedAttribute(dataSourceLineNumbers, data.Name.LocalName, "Column"));
3933
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(dataSourceLineNumbers, data.Name.LocalName, "Column"));
3934
}
3935
3936
dataValue = String.Concat(dataValue, null == dataValue ? String.Empty : Common.CustomRowFieldSeparator.ToString(), columnName, ":", Common.GetInnerText(data));
@@ -4008,23 +3938,23 @@ namespace WixToolset
3938
}
3939
}
3940
4011
- this.core.CreateSimpleReference(sourceLineNumbers, "WixCustomTable", tableId);
3941
+ this.Core.CreateSimpleReference(sourceLineNumbers, "WixCustomTable", tableId);
3942
4013
- if (!this.core.EncounteredError)
3943
+ if (!this.Core.EncounteredError)
3944
{
4015
- Row rowRow = this.core.CreateRow(childSourceLineNumbers, "WixCustomRow");
4016
- rowRow[0] = tableId;
4017
- rowRow[1] = dataValue;
3945
+ var rowRow = this.Core.CreateRow(childSourceLineNumbers, TupleDefinitionType.WixCustomRow);
3946
+ rowRow.Set(0, tableId);
3947
+ rowRow.Set(1, dataValue);
3948
}
3949
break;
3950
default:
4021
- this.core.UnexpectedElement(node, child);
3951
+ this.Core.UnexpectedElement(node, child);
3952
break;
3953
}
3954
}
3955
else
3956
{
4027
- this.core.ParseExtensionElement(node, child);
3957
+ this.Core.ParseExtensionElement(node, child);
3958
}
3959
}
3960
@@ -4032,26 +3962,26 @@ namespace WixToolset
3962
{
3963
if (null == primaryKeys || 0 == primaryKeys.Length)
3964
{
4035
- this.core.OnMessage(WixErrors.CustomTableMissingPrimaryKey(sourceLineNumbers));
3965
+ this.Core.OnMessage(WixErrors.CustomTableMissingPrimaryKey(sourceLineNumbers));
3966
}
3967
4038
- if (!this.core.EncounteredError)
3968
+ if (!this.Core.EncounteredError)
3969
{
4040
- Row row = this.core.CreateRow(sourceLineNumbers, "WixCustomTable");
4041
- row[0] = tableId;
4042
- row[1] = columnCount;
4043
- row[2] = columnNames;
4044
- row[3] = columnTypes;
4045
- row[4] = primaryKeys;
4046
- row[5] = minValues;
4047
- row[6] = maxValues;
4048
- row[7] = keyTables;
4049
- row[8] = keyColumns;
4050
- row[9] = categories;
4051
- row[10] = sets;
4052
- row[11] = descriptions;
4053
- row[12] = modularizations;
4054
- row[13] = bootstrapperApplicationData ? 1 : 0;
3970
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixCustomTable);
3971
+ row.Set(0, tableId);
3972
+ row.Set(1, columnCount);
3973
+ row.Set(2, columnNames);
3974
+ row.Set(3, columnTypes);
3975
+ row.Set(4, primaryKeys);
3976
+ row.Set(5, minValues);
3977
+ row.Set(6, maxValues);
3978
+ row.Set(7, keyTables);
3979
+ row.Set(8, keyColumns);
3980
+ row.Set(9, categories);
3981
+ row.Set(10, sets);
3982
+ row.Set(11, descriptions);
3983
+ row.Set(12, modularizations);
3984
+ row.Set(13, bootstrapperApplicationData ? 1 : 0);
3985
}
3986
}
3987
}
@@ -4086,16 +4016,16 @@ namespace WixToolset
4016
switch (attrib.Name.LocalName)
4017
{
4018
case "Id":
4089
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4019
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4020
break;
4021
case "ComponentGuidGenerationSeed":
4092
- componentGuidGenerationSeed = this.core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
4022
+ componentGuidGenerationSeed = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
4023
break;
4024
case "DiskId":
4095
- diskId = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
4025
+ diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
4026
break;
4027
case "FileSource":
4098
- fileSource = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4028
+ fileSource = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4029
fileSourceAttribSet = true;
4030
break;
4031
case "Name":
@@ -4106,14 +4036,14 @@ namespace WixToolset
4036
}
4037
else
4038
{
4109
- inlineSyntax = this.core.GetAttributeInlineDirectorySyntax(sourceLineNumbers, attrib);
4039
+ inlineSyntax = this.Core.GetAttributeInlineDirectorySyntax(sourceLineNumbers, attrib);
4040
}
4041
break;
4042
case "ShortName":
4113
- shortName = this.core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
4043
+ shortName = this.Core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
4044
break;
4045
case "ShortSourceName":
4116
- shortSourceName = this.core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
4046
+ shortSourceName = this.Core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
4047
break;
4048
case "SourceName":
4049
if ("." == attrib.Value)
@@ -4122,17 +4052,17 @@ namespace WixToolset
4052
}
4053
else
4054
{
4125
- sourceName = this.core.GetAttributeLongFilename(sourceLineNumbers, attrib, false);
4055
+ sourceName = this.Core.GetAttributeLongFilename(sourceLineNumbers, attrib, false);
4056
}
4057
break;
4058
default:
4129
- this.core.UnexpectedAttribute(node, attrib);
4059
+ this.Core.UnexpectedAttribute(node, attrib);
4060
break;
4061
}
4062
}
4063
else
4064
{
4135
- this.core.ParseExtensionAttribute(node, attrib);
4065
+ this.Core.ParseExtensionAttribute(node, attrib);
4066
}
4067
}
4068
@@ -4151,14 +4081,14 @@ namespace WixToolset
4081
if (inlineSyntax[0].EndsWith(":"))
4082
{
4083
parentId = inlineSyntax[0].TrimEnd(':');
4154
- this.core.CreateSimpleReference(sourceLineNumbers, "Directory", parentId);
4084
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", parentId);
4085
4086
pathStartsAt = 1;
4087
}
4088
4089
for (int i = pathStartsAt; i < inlineSyntax.Length - 1; ++i)
4090
{
4161
- Identifier inlineId = this.core.CreateDirectoryRow(sourceLineNumbers, null, parentId, inlineSyntax[i]);
4091
+ Identifier inlineId = this.Core.CreateDirectoryRow(sourceLineNumbers, null, parentId, inlineSyntax[i]);
4092
parentId = inlineId.Id;
4093
}
4094
@@ -4170,30 +4100,30 @@ namespace WixToolset
4100
{
4101
if (!String.IsNullOrEmpty(shortName))
4102
{
4173
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name"));
4103
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name"));
4104
}
4105
4106
if (null == parentId)
4107
{
4178
- this.core.OnMessage(WixErrors.DirectoryRootWithoutName(sourceLineNumbers, node.Name.LocalName, "Name"));
4108
+ this.Core.OnMessage(WixErrors.DirectoryRootWithoutName(sourceLineNumbers, node.Name.LocalName, "Name"));
4109
}
4110
}
4111
else if (!String.IsNullOrEmpty(name))
4112
{
4113
if (String.IsNullOrEmpty(shortName))
4114
{
4185
- if (!name.Equals(".") && !name.Equals("SourceDir") && !this.core.IsValidShortFilename(name, false))
4115
+ if (!name.Equals(".") && !name.Equals("SourceDir") && !this.Core.IsValidShortFilename(name, false))
4116
{
4187
- shortName = this.core.CreateShortName(name, false, false, "Directory", parentId);
4117
+ shortName = this.Core.CreateShortName(name, false, false, "Directory", parentId);
4118
}
4119
}
4120
else if (name.Equals("."))
4121
{
4192
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name", name));
4122
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name", name));
4123
}
4124
else if (name.Equals(shortName))
4125
{
4196
- this.core.OnMessage(WixWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name));
4126
+ this.Core.OnMessage(WixWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name));
4127
}
4128
}
4129
@@ -4201,25 +4131,25 @@ namespace WixToolset
4131
{
4132
if (!String.IsNullOrEmpty(shortSourceName))
4133
{
4204
- this.core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName"));
4134
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName"));
4135
}
4136
}
4137
else
4138
{
4139
if (String.IsNullOrEmpty(shortSourceName))
4140
{
4211
- if (!sourceName.Equals(".") && !this.core.IsValidShortFilename(sourceName, false))
4141
+ if (!sourceName.Equals(".") && !this.Core.IsValidShortFilename(sourceName, false))
4142
{
4213
- shortSourceName = this.core.CreateShortName(sourceName, false, false, "Directory", parentId);
4143
+ shortSourceName = this.Core.CreateShortName(sourceName, false, false, "Directory", parentId);
4144
}
4145
}
4146
else if (sourceName.Equals("."))
4147
{
4218
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName", sourceName));
4148
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName", sourceName));
4149
}
4150
else if (sourceName.Equals(shortSourceName))
4151
{
4222
- this.core.OnMessage(WixWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName));
4152
+ this.Core.OnMessage(WixWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName));
4153
}
4154
}
4155
@@ -4252,7 +4182,7 @@ namespace WixToolset
4182
4183
if (null == id)
4184
{
4255
- id = this.core.CreateIdentifier("dir", parentId, name, shortName, sourceName, shortSourceName);
4185
+ id = this.Core.CreateIdentifier("dir", parentId, name, shortName, sourceName, shortSourceName);
4186
}
4187
4188
// Calculate the DefaultDir for the directory row.
@@ -4264,7 +4194,7 @@ namespace WixToolset
4194
4195
if ("TARGETDIR".Equals(id.Id) && !"SourceDir".Equals(defaultDir))
4196
{
4267
- this.core.OnMessage(WixErrors.IllegalTargetDirDefaultDir(sourceLineNumbers, defaultDir));
4197
+ this.Core.OnMessage(WixErrors.IllegalTargetDirDefaultDir(sourceLineNumbers, defaultDir));
4198
}
4199
4200
foreach (XElement child in node.Elements())
@@ -4293,32 +4223,32 @@ namespace WixToolset
4223
}
4224
break;
4225
default:
4296
- this.core.UnexpectedElement(node, child);
4226
+ this.Core.UnexpectedElement(node, child);
4227
break;
4228
}
4229
}
4230
else
4231
{
4302
- this.core.ParseExtensionElement(node, child);
4232
+ this.Core.ParseExtensionElement(node, child);
4233
}
4234
}
4235
4306
- if (!this.core.EncounteredError)
4236
+ if (!this.Core.EncounteredError)
4237
{
4308
- Row row = this.core.CreateRow(sourceLineNumbers, "Directory", id);
4309
- row[1] = parentId;
4310
- row[2] = defaultDir;
4238
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Directory, id);
4239
+ row.Set(1, parentId);
4240
+ row.Set(2, defaultDir);
4241
4242
if (null != componentGuidGenerationSeed)
4243
{
4314
- Row wixRow = this.core.CreateRow(sourceLineNumbers, "WixDirectory");
4315
- wixRow[0] = id.Id;
4316
- wixRow[1] = componentGuidGenerationSeed;
4244
+ var wixRow = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixDirectory);
4245
+ wixRow.Set(0, id.Id);
4246
+ wixRow.Set(1, componentGuidGenerationSeed);
4247
}
4248
4249
if (null != symbols)
4250
{
4321
- WixDeltaPatchSymbolPathsRow symbolRow = (WixDeltaPatchSymbolPathsRow)this.core.CreateRow(sourceLineNumbers, "WixDeltaPatchSymbolPaths", id);
4251
+ var symbolRow = (WixDeltaPatchSymbolPathsTuple)this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixDeltaPatchSymbolPaths, id);
4252
symbolRow.Type = SymbolPathType.Directory;
4253
symbolRow.SymbolPaths = symbols;
4254
}
@@ -4344,29 +4274,29 @@ namespace WixToolset
4274
switch (attrib.Name.LocalName)
4275
{
4276
case "Id":
4347
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4348
- this.core.CreateSimpleReference(sourceLineNumbers, "Directory", id);
4277
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4278
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", id);
4279
break;
4280
case "DiskId":
4351
- diskId = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
4281
+ diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
4282
break;
4283
case "FileSource":
4354
- fileSource = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4284
+ fileSource = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4285
break;
4286
default:
4357
- this.core.UnexpectedAttribute(node, attrib);
4287
+ this.Core.UnexpectedAttribute(node, attrib);
4288
break;
4289
}
4290
}
4291
else
4292
{
4363
- this.core.ParseExtensionAttribute(node, attrib);
4293
+ this.Core.ParseExtensionAttribute(node, attrib);
4294
}
4295
}
4296
4297
if (null == id)
4298
{
4369
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4299
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4300
}
4301
4302
if (!String.IsNullOrEmpty(fileSource) && !fileSource.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal))
@@ -4390,13 +4320,13 @@ namespace WixToolset
4320
this.ParseMergeElement(child, id, diskId);
4321
break;
4322
default:
4393
- this.core.UnexpectedElement(node, child);
4323
+ this.Core.UnexpectedElement(node, child);
4324
break;
4325
}
4326
}
4327
else
4328
{
4399
- this.core.ParseExtensionElement(node, child);
4329
+ this.Core.ParseExtensionElement(node, child);
4330
}
4331
}
4332
}
@@ -4423,31 +4353,31 @@ namespace WixToolset
4353
switch (attrib.Name.LocalName)
4354
{
4355
case "Id":
4426
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4356
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4357
break;
4358
case "Depth":
4429
- depth = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
4359
+ depth = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
4360
break;
4361
case "Path":
4432
- path = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4362
+ path = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4363
break;
4364
case "AssignToProperty":
4435
- assignToProperty = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
4365
+ assignToProperty = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
4366
break;
4367
default:
4438
- this.core.UnexpectedAttribute(node, attrib);
4368
+ this.Core.UnexpectedAttribute(node, attrib);
4369
break;
4370
}
4371
}
4372
else
4373
{
4444
- this.core.ParseExtensionAttribute(node, attrib);
4374
+ this.Core.ParseExtensionAttribute(node, attrib);
4375
}
4376
}
4377
4378
if (null == id)
4379
{
4450
- id = this.core.CreateIdentifier("dir", path, depth.ToString());
4380
+ id = this.Core.CreateIdentifier("dir", path, depth.ToString());
4381
}
4382
4383
signature = id.Id;
@@ -4464,7 +4394,7 @@ namespace WixToolset
4394
case "DirectorySearch":
4395
if (oneChild)
4396
{
4467
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4397
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4398
}
4399
oneChild = true;
4400
signature = this.ParseDirectorySearchElement(child, id.Id);
@@ -4472,7 +4402,7 @@ namespace WixToolset
4402
case "DirectorySearchRef":
4403
if (oneChild)
4404
{
4475
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4405
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4406
}
4407
oneChild = true;
4408
signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -4480,7 +4410,7 @@ namespace WixToolset
4410
case "FileSearch":
4411
if (oneChild)
4412
{
4483
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4413
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4414
}
4415
oneChild = true;
4416
hasFileSearch = true;
@@ -4489,13 +4419,13 @@ namespace WixToolset
4419
case "FileSearchRef":
4420
if (oneChild)
4421
{
4492
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4422
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4423
}
4424
oneChild = true;
4425
signature = this.ParseSimpleRefElement(child, "Signature");
4426
break;
4427
default:
4498
- this.core.UnexpectedElement(node, child);
4428
+ this.Core.UnexpectedElement(node, child);
4429
break;
4430
}
4431
@@ -4505,7 +4435,7 @@ namespace WixToolset
4435
{
4436
if (!hasFileSearch)
4437
{
4508
- this.core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AssignToProperty", child.Name.LocalName));
4438
+ this.Core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AssignToProperty", child.Name.LocalName));
4439
}
4440
else if (!oneChild)
4441
{
@@ -4516,11 +4446,11 @@ namespace WixToolset
4446
}
4447
else
4448
{
4519
- this.core.ParseExtensionElement(node, child);
4449
+ this.Core.ParseExtensionElement(node, child);
4450
}
4451
}
4452
4523
- if (!this.core.EncounteredError)
4453
+ if (!this.Core.EncounteredError)
4454
{
4455
Identifier rowId = id;
4456
@@ -4535,12 +4465,12 @@ namespace WixToolset
4465
signature = id.Id;
4466
}
4467
4538
- Row row = this.core.CreateRow(sourceLineNumbers, "DrLocator", rowId);
4539
- row[1] = parentSignature;
4540
- row[2] = path;
4468
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator, rowId);
4469
+ row.Set(1, parentSignature);
4470
+ row.Set(2, path);
4471
if (CompilerConstants.IntegerNotSet != depth)
4472
{
4543
- row[3] = depth;
4473
+ row.Set(3, depth);
4474
}
4475
}
4476
@@ -4568,22 +4498,22 @@ namespace WixToolset
4498
switch (attrib.Name.LocalName)
4499
{
4500
case "Id":
4571
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4501
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4502
break;
4503
case "Parent":
4574
- parent = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4504
+ parent = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4505
break;
4506
case "Path":
4577
- path = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4507
+ path = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4508
break;
4509
default:
4580
- this.core.UnexpectedAttribute(node, attrib);
4510
+ this.Core.UnexpectedAttribute(node, attrib);
4511
break;
4512
}
4513
}
4514
else
4515
{
4586
- this.core.ParseExtensionAttribute(node, attrib);
4516
+ this.Core.ParseExtensionAttribute(node, attrib);
4517
}
4518
}
4519
@@ -4591,7 +4521,7 @@ namespace WixToolset
4521
{
4522
if (!String.IsNullOrEmpty(parentSignature))
4523
{
4594
- this.core.OnMessage(WixErrors.CanNotHaveTwoParents(sourceLineNumbers, id.Id, parent.Id, parentSignature));
4524
+ this.Core.OnMessage(WixErrors.CanNotHaveTwoParents(sourceLineNumbers, id.Id, parent.Id, parentSignature));
4525
}
4526
else
4527
{
@@ -4601,7 +4531,7 @@ namespace WixToolset
4531
4532
if (null == id)
4533
{
4604
- id = this.core.CreateIdentifier("dsr", parentSignature, path);
4534
+ id = this.Core.CreateIdentifier("dsr", parentSignature, path);
4535
}
4536
4537
signature = id.Id;
@@ -4617,7 +4547,7 @@ namespace WixToolset
4547
case "DirectorySearch":
4548
if (oneChild)
4549
{
4620
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4550
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4551
}
4552
oneChild = true;
4553
signature = this.ParseDirectorySearchElement(child, id.Id);
@@ -4625,7 +4555,7 @@ namespace WixToolset
4555
case "DirectorySearchRef":
4556
if (oneChild)
4557
{
4628
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4558
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4559
}
4560
oneChild = true;
4561
signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -4633,7 +4563,7 @@ namespace WixToolset
4563
case "FileSearch":
4564
if (oneChild)
4565
{
4636
- this.core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4566
+ this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4567
}
4568
oneChild = true;
4569
signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -4641,24 +4571,24 @@ namespace WixToolset
4571
case "FileSearchRef":
4572
if (oneChild)
4573
{
4644
- this.core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4574
+ this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4575
}
4576
oneChild = true;
4577
signature = this.ParseSimpleRefElement(child, "Signature");
4578
break;
4579
default:
4650
- this.core.UnexpectedElement(node, child);
4580
+ this.Core.UnexpectedElement(node, child);
4581
break;
4582
}
4583
}
4584
else
4585
{
4656
- this.core.ParseExtensionElement(node, child);
4586
+ this.Core.ParseExtensionElement(node, child);
4587
}
4588
}
4589
4590
4661
- this.core.CreateSimpleReference(sourceLineNumbers, "DrLocator", id.Id, parentSignature, path);
4591
+ this.Core.CreateSimpleReference(sourceLineNumbers, "DrLocator", id.Id, parentSignature, path);
4592
4593
return signature;
4594
}
@@ -4694,10 +4624,10 @@ namespace WixToolset
4624
switch (attrib.Name.LocalName)
4625
{
4626
case "Id":
4697
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4627
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4628
break;
4629
case "Absent":
4700
- string absent = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4630
+ string absent = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4631
if (0 < absent.Length)
4632
{
4633
Wix.Feature.AbsentType absentType = Wix.Feature.ParseAbsentType(absent);
@@ -4709,13 +4639,13 @@ namespace WixToolset
4639
bits = bits | MsiInterop.MsidbFeatureAttributesUIDisallowAbsent;
4640
break;
4641
default:
4712
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, absent, "allow", "disallow"));
4642
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, absent, "allow", "disallow"));
4643
break;
4644
}
4645
}
4646
break;
4647
case "AllowAdvertise":
4718
- allowAdvertise = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4648
+ allowAdvertise = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4649
if (0 < allowAdvertise.Length)
4650
{
4651
Wix.Feature.AllowAdvertiseType allowAdvertiseType = Wix.Feature.ParseAllowAdvertiseType(allowAdvertise);
@@ -4730,22 +4660,22 @@ namespace WixToolset
4660
case Wix.Feature.AllowAdvertiseType.yes: // this is the default
4661
break;
4662
default:
4733
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, allowAdvertise, "no", "system", "yes"));
4663
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, allowAdvertise, "no", "system", "yes"));
4664
break;
4665
}
4666
}
4667
break;
4668
case "ConfigurableDirectory":
4739
- configurableDirectory = this.core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
4669
+ configurableDirectory = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
4670
break;
4671
case "Description":
4742
- description = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4672
+ description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4673
break;
4674
case "Display":
4745
- display = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4675
+ display = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4676
break;
4677
case "InstallDefault":
4748
- installDefault = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4678
+ installDefault = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4679
if (0 < installDefault.Length)
4680
{
4681
Wix.Feature.InstallDefaultType installDefaultType = Wix.Feature.ParseInstallDefaultType(installDefault);
@@ -4754,7 +4684,7 @@ namespace WixToolset
4684
case Wix.Feature.InstallDefaultType.followParent:
4685
if (ComplexReferenceParentType.Product == parentType)
4686
{
4757
- this.core.OnMessage(WixErrors.RootFeatureCannotFollowParent(sourceLineNumbers));
4687
+ this.Core.OnMessage(WixErrors.RootFeatureCannotFollowParent(sourceLineNumbers));
4688
}
4689
bits = bits | MsiInterop.MsidbFeatureAttributesFollowParent;
4690
break;
@@ -4764,23 +4694,23 @@ namespace WixToolset
4694
bits = bits | MsiInterop.MsidbFeatureAttributesFavorSource;
4695
break;
4696
default:
4767
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installDefault, "followParent", "local", "source"));
4697
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installDefault, "followParent", "local", "source"));
4698
break;
4699
}
4700
}
4701
break;
4702
case "Level":
4773
- level = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
4703
+ level = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
4704
break;
4705
case "Title":
4776
- title = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4706
+ title = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4707
if ("PUT-FEATURE-TITLE-HERE" == title)
4708
{
4779
- this.core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, title));
4709
+ this.Core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, title));
4710
}
4711
break;
4712
case "TypicalDefault":
4783
- typicalDefault = this.core.GetAttributeValue(sourceLineNumbers, attrib);
4713
+ typicalDefault = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4714
if (0 < typicalDefault.Length)
4715
{
4716
Wix.Feature.TypicalDefaultType typicalDefaultType = Wix.Feature.ParseTypicalDefaultType(typicalDefault);
@@ -4792,45 +4722,45 @@ namespace WixToolset
4722
case Wix.Feature.TypicalDefaultType.install: // this is the default
4723
break;
4724
default:
4795
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typicalDefault, "advertise", "install"));
4725
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typicalDefault, "advertise", "install"));
4726
break;
4727
}
4728
}
4729
break;
4730
default:
4801
- this.core.UnexpectedAttribute(node, attrib);
4731
+ this.Core.UnexpectedAttribute(node, attrib);
4732
break;
4733
}
4734
}
4735
else
4736
{
4807
- this.core.ParseExtensionAttribute(node, attrib);
4737
+ this.Core.ParseExtensionAttribute(node, attrib);
4738
}
4739
}
4740
4741
if (null == id)
4742
{
4813
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4743
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4744
id = Identifier.Invalid;
4745
}
4746
else if (38 < id.Id.Length)
4747
{
4818
- this.core.OnMessage(WixErrors.FeatureNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
4748
+ this.Core.OnMessage(WixErrors.FeatureNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
4749
}
4750
4751
if (null != configurableDirectory && configurableDirectory.ToUpper(CultureInfo.InvariantCulture) != configurableDirectory)
4752
{
4823
- this.core.OnMessage(WixErrors.FeatureConfigurableDirectoryNotUppercase(sourceLineNumbers, node.Name.LocalName, "ConfigurableDirectory", configurableDirectory));
4753
+ this.Core.OnMessage(WixErrors.FeatureConfigurableDirectoryNotUppercase(sourceLineNumbers, node.Name.LocalName, "ConfigurableDirectory", configurableDirectory));
4754
}
4755
4756
if ("advertise" == typicalDefault && "no" == allowAdvertise)
4757
{
4828
- this.core.OnMessage(WixErrors.FeatureCannotFavorAndDisallowAdvertise(sourceLineNumbers, node.Name.LocalName, "TypicalDefault", typicalDefault, "AllowAdvertise", allowAdvertise));
4758
+ this.Core.OnMessage(WixErrors.FeatureCannotFavorAndDisallowAdvertise(sourceLineNumbers, node.Name.LocalName, "TypicalDefault", typicalDefault, "AllowAdvertise", allowAdvertise));
4759
}
4760
4761
if (YesNoType.Yes == followParent && ("local" == installDefault || "source" == installDefault))
4762
{
4833
- this.core.OnMessage(WixErrors.FeatureCannotFollowParentAndFavorLocalOrSource(sourceLineNumbers, node.Name.LocalName, "InstallDefault", "FollowParent", "yes"));
4763
+ this.Core.OnMessage(WixErrors.FeatureCannotFollowParentAndFavorLocalOrSource(sourceLineNumbers, node.Name.LocalName, "InstallDefault", "FollowParent", "yes"));
4764
}
4765
4766
int childDisplay = 0;
@@ -4865,46 +4795,46 @@ namespace WixToolset
4795
this.ParseMergeRefElement(child, ComplexReferenceParentType.Feature, id.Id);
4796
break;
4797
default:
4868
- this.core.UnexpectedElement(node, child);
4798
+ this.Core.UnexpectedElement(node, child);
4799
break;
4800
}
4801
}
4802
else
4803
{
4874
- this.core.ParseExtensionElement(node, child);
4804
+ this.Core.ParseExtensionElement(node, child);
4805
}
4806
}
4807
4878
- if (!this.core.EncounteredError)
4808
+ if (!this.Core.EncounteredError)
4809
{
4880
- Row row = this.core.CreateRow(sourceLineNumbers, "Feature", id);
4881
- row[1] = null; // this column is set in the linker
4882
- row[2] = title;
4883
- row[3] = description;
4810
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Feature, id);
4811
+ row.Set(1, null); // this column is set in the linker
4812
+ row.Set(2, title);
4813
+ row.Set(3, description);
4814
if (0 < display.Length)
4815
{
4816
switch (display)
4817
{
4818
case "collapse":
4819
lastDisplay = (lastDisplay | 1) + 1;
4890
- row[4] = lastDisplay;
4820
+ row.Set(4, lastDisplay);
4821
break;
4822
case "expand":
4823
lastDisplay = (lastDisplay + 1) | 1;
4894
- row[4] = lastDisplay;
4824
+ row.Set(4, lastDisplay);
4825
break;
4826
case "hidden":
4897
- row[4] = 0;
4827
+ row.Set(4, 0);
4828
break;
4829
default:
4830
int value;
4831
if (!Int32.TryParse(display, NumberStyles.Integer, CultureInfo.InvariantCulture, out value))
4832
{
4903
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Display", display, "collapse", "expand", "hidden"));
4833
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Display", display, "collapse", "expand", "hidden"));
4834
}
4835
else
4836
{
4907
- row[4] = value;
4837
+ row.Set(4, value);
4838
// save the display value of this row (if its not hidden) for subsequent rows
4839
if (0 != (int)row[4])
4840
{
@@ -4914,13 +4844,13 @@ namespace WixToolset
4844
break;
4845
}
4846
}
4917
- row[5] = level;
4918
- row[6] = configurableDirectory;
4919
- row[7] = bits;
4847
+ row.Set(5, level);
4848
+ row.Set(6, configurableDirectory);
4849
+ row.Set(7, bits);
4850
4851
if (ComplexReferenceParentType.Unknown != parentType)
4852
{
4923
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.Feature, id.Id, false);
4853
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.Feature, id.Id, false);
4854
}
4855
}
4856
}
@@ -4945,27 +4875,27 @@ namespace WixToolset
4875
switch (attrib.Name.LocalName)
4876
{
4877
case "Id":
4948
- id = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4949
- this.core.CreateSimpleReference(sourceLineNumbers, "Feature", id);
4878
+ id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
4879
+ this.Core.CreateSimpleReference(sourceLineNumbers, "Feature", id);
4880
break;
4881
case "IgnoreParent":
4952
- ignoreParent = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
4882
+ ignoreParent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
4883
break;
4884
default:
4955
- this.core.UnexpectedAttribute(node, attrib);
4885
+ this.Core.UnexpectedAttribute(node, attrib);
4886
break;
4887
}
4888
}
4889
else
4890
{
4961
- this.core.ParseExtensionAttribute(node, attrib);
4891
+ this.Core.ParseExtensionAttribute(node, attrib);
4892
}
4893
}
4894
4895
4896
if (null == id)
4897
{
4968
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4898
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4899
}
4900
4901
int lastDisplay = 0;
@@ -5000,21 +4930,21 @@ namespace WixToolset
4930
this.ParseMergeRefElement(child, ComplexReferenceParentType.Feature, id);
4931
break;
4932
default:
5003
- this.core.UnexpectedElement(node, child);
4933
+ this.Core.UnexpectedElement(node, child);
4934
break;
4935
}
4936
}
4937
else
4938
{
5009
- this.core.ParseExtensionElement(node, child);
4939
+ this.Core.ParseExtensionElement(node, child);
4940
}
4941
}
4942
5013
- if (!this.core.EncounteredError)
4943
+ if (!this.Core.EncounteredError)
4944
{
4945
if (ComplexReferenceParentType.Unknown != parentType && YesNoType.Yes != ignoreParent)
4946
{
5017
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.Feature, id, false);
4947
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.Feature, id, false);
4948
}
4949
}
4950
}
@@ -5036,22 +4966,22 @@ namespace WixToolset
4966
switch (attrib.Name.LocalName)
4967
{
4968
case "Id":
5039
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4969
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
4970
break;
4971
default:
5042
- this.core.UnexpectedAttribute(node, attrib);
4972
+ this.Core.UnexpectedAttribute(node, attrib);
4973
break;
4974
}
4975
}
4976
else
4977
{
5048
- this.core.ParseExtensionAttribute(node, attrib);
4978
+ this.Core.ParseExtensionAttribute(node, attrib);
4979
}
4980
}
4981
4982
if (null == id)
4983
{
5054
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4984
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4985
id = Identifier.Invalid;
4986
}
4987
@@ -5084,22 +5014,22 @@ namespace WixToolset
5014
this.ParseMergeRefElement(child, ComplexReferenceParentType.FeatureGroup, id.Id);
5015
break;
5016
default:
5087
- this.core.UnexpectedElement(node, child);
5017
+ this.Core.UnexpectedElement(node, child);
5018
break;
5019
}
5020
}
5021
else
5022
{
5093
- this.core.ParseExtensionElement(node, child);
5023
+ this.Core.ParseExtensionElement(node, child);
5024
}
5025
}
5026
5097
- if (!this.core.EncounteredError)
5027
+ if (!this.Core.EncounteredError)
5028
{
5099
- Row row = this.core.CreateRow(sourceLineNumbers, "WixFeatureGroup", id);
5029
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixFeatureGroup, id);
5030
5031
//Add this FeatureGroup and its parent in WixGroup.
5102
- this.core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.FeatureGroup, id.Id);
5032
+ this.Core.CreateWixGroupRow(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.FeatureGroup, id.Id);
5033
}
5034
}
5035
@@ -5125,38 +5055,38 @@ namespace WixToolset
5055
switch (attrib.Name.LocalName)
5056
{
5057
case "Id":
5128
- id = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5129
- this.core.CreateSimpleReference(sourceLineNumbers, "WixFeatureGroup", id);
5058
+ id = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5059
+ this.Core.CreateSimpleReference(sourceLineNumbers, "WixFeatureGroup", id);
5060
break;
5061
case "IgnoreParent":
5132
- ignoreParent = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5062
+ ignoreParent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5063
break;
5064
case "Primary":
5135
- primary = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5065
+ primary = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5066
break;
5067
default:
5138
- this.core.UnexpectedAttribute(node, attrib);
5068
+ this.Core.UnexpectedAttribute(node, attrib);
5069
break;
5070
}
5071
}
5072
else
5073
{
5144
- this.core.ParseExtensionAttribute(node, attrib);
5074
+ this.Core.ParseExtensionAttribute(node, attrib);
5075
}
5076
}
5077
5078
if (null == id)
5079
{
5150
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
5080
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
5081
}
5082
5153
- this.core.ParseForExtensionElements(node);
5083
+ this.Core.ParseForExtensionElements(node);
5084
5155
- if (!this.core.EncounteredError)
5085
+ if (!this.Core.EncounteredError)
5086
{
5087
if (YesNoType.Yes != ignoreParent)
5088
{
5159
- this.core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.FeatureGroup, id, (YesNoType.Yes == primary));
5089
+ this.Core.CreateComplexReference(sourceLineNumbers, parentType, parentId, null, ComplexReferenceChildType.FeatureGroup, id, (YesNoType.Yes == primary));
5090
}
5091
}
5092
}
@@ -5187,10 +5117,10 @@ namespace WixToolset
5117
switch (attrib.Name.LocalName)
5118
{
5119
case "Id":
5190
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
5120
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
5121
break;
5122
case "Action":
5193
- string value = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5123
+ string value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5124
if (0 < value.Length)
5125
{
5126
Wix.Environment.ActionType actionType = Wix.Environment.ParseActionType(value);
@@ -5206,59 +5136,59 @@ namespace WixToolset
5136
action = "!";
5137
break;
5138
default:
5209
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, value, "create", "set", "remove"));
5139
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, value, "create", "set", "remove"));
5140
break;
5141
}
5142
}
5143
break;
5144
case "Name":
5215
- name = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5145
+ name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5146
break;
5147
case "Part":
5218
- part = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5148
+ part = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5149
if (!Wix.Environment.TryParsePartType(part, out partType))
5150
{
5221
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Part", part, "all", "first", "last"));
5151
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Part", part, "all", "first", "last"));
5152
}
5153
break;
5154
case "Permanent":
5225
- permanent = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5155
+ permanent = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5156
break;
5157
case "Separator":
5228
- separator = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5158
+ separator = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5159
break;
5160
case "System":
5231
- system = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5161
+ system = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5162
break;
5163
case "Value":
5234
- text = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5164
+ text = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5165
break;
5166
default:
5237
- this.core.UnexpectedAttribute(node, attrib);
5167
+ this.Core.UnexpectedAttribute(node, attrib);
5168
break;
5169
}
5170
}
5171
else
5172
{
5243
- this.core.ParseExtensionAttribute(node, attrib);
5173
+ this.Core.ParseExtensionAttribute(node, attrib);
5174
}
5175
}
5176
5177
if (null == id)
5178
{
5249
- id = this.core.CreateIdentifier("env", action, name, part, system.ToString());
5179
+ id = this.Core.CreateIdentifier("env", action, name, part, system.ToString());
5180
}
5181
5182
if (null == name)
5183
{
5254
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
5184
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
5185
}
5186
5187
if (Wix.Environment.PartType.NotSet != partType)
5188
{
5189
if ("+" == action)
5190
{
5261
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Part", "Action", "create"));
5191
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Part", "Action", "create"));
5192
}
5193
5194
switch (partType)
@@ -5279,14 +5209,14 @@ namespace WixToolset
5209
uninstall = null;
5210
}
5211
5282
- this.core.ParseForExtensionElements(node);
5212
+ this.Core.ParseForExtensionElements(node);
5213
5284
- if (!this.core.EncounteredError)
5214
+ if (!this.Core.EncounteredError)
5215
{
5286
- Row row = this.core.CreateRow(sourceLineNumbers, "Environment", id);
5287
- row[1] = String.Concat(action, uninstall, system ? "*" : String.Empty, name);
5288
- row[2] = text;
5289
- row[3] = componentId;
5216
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Environment, id);
5217
+ row.Set(1, String.Concat(action, uninstall, system ? "*" : String.Empty, name));
5218
+ row.Set(2, text);
5219
+ row.Set(3, componentId);
5220
}
5221
}
5222
@@ -5306,32 +5236,32 @@ namespace WixToolset
5236
switch (attrib.Name.LocalName)
5237
{
5238
case "Id":
5309
- id = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
5239
+ id = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
5240
break;
5241
default:
5312
- this.core.UnexpectedAttribute(node, attrib);
5242
+ this.Core.UnexpectedAttribute(node, attrib);
5243
break;
5244
}
5245
}
5246
else
5247
{
5318
- this.core.ParseExtensionAttribute(node, attrib);
5248
+ this.Core.ParseExtensionAttribute(node, attrib);
5249
}
5250
}
5251
5252
if (CompilerConstants.IntegerNotSet == id)
5253
{
5324
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
5254
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
5255
id = CompilerConstants.IllegalInteger;
5256
}
5257
5328
- this.core.ParseForExtensionElements(node);
5258
+ this.Core.ParseForExtensionElements(node);
5259
5330
- if (!this.core.EncounteredError)
5260
+ if (!this.Core.EncounteredError)
5261
{
5332
- Row row = this.core.CreateRow(sourceLineNumbers, "Error");
5333
- row[0] = id;
5334
- row[1] = Common.GetInnerText(node); // TODO: *
5262
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Error);
5263
+ row.Set(0, id);
5264
+ row.Set(1, Common.GetInnerText(node)); // TODO: *
5265
}
5266
}
5267
@@ -5355,28 +5285,28 @@ namespace WixToolset
5285
switch (attrib.Name.LocalName)
5286
{
5287
case "Id":
5358
- extension = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5288
+ extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5289
break;
5290
case "Advertise":
5361
- YesNoType extensionAdvertise = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5291
+ YesNoType extensionAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5292
if ((YesNoType.No == advertise && YesNoType.Yes == extensionAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == extensionAdvertise))
5293
{
5364
- this.core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, extensionAdvertise.ToString(), advertise.ToString()));
5294
+ this.Core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, extensionAdvertise.ToString(), advertise.ToString()));
5295
}
5296
advertise = extensionAdvertise;
5297
break;
5298
case "ContentType":
5369
- mime = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5299
+ mime = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5300
break;
5301
default:
5372
- this.core.UnexpectedAttribute(node, attrib);
5302
+ this.Core.UnexpectedAttribute(node, attrib);
5303
break;
5304
}
5305
}
5306
else
5307
{
5308
Dictionary<string, string> context = new Dictionary<string, string>() { { "ProgId", progId }, { "ComponentId", componentId } };
5379
- this.core.ParseExtensionAttribute(node, attrib, context);
5309
+ this.Core.ParseExtensionAttribute(node, attrib, context);
5310
}
5311
}
5312
@@ -5402,37 +5332,37 @@ namespace WixToolset
5332
}
5333
break;
5334
default:
5405
- this.core.UnexpectedElement(node, child);
5335
+ this.Core.UnexpectedElement(node, child);
5336
break;
5337
}
5338
}
5339
else
5340
{
5411
- this.core.ParseExtensionElement(node, child);
5341
+ this.Core.ParseExtensionElement(node, child);
5342
}
5343
}
5344
5345
5346
if (YesNoType.Yes == advertise)
5347
{
5418
- if (!this.core.EncounteredError)
5348
+ if (!this.Core.EncounteredError)
5349
{
5420
- Row row = this.core.CreateRow(sourceLineNumbers, "Extension");
5421
- row[0] = extension;
5422
- row[1] = componentId;
5423
- row[2] = progId;
5424
- row[3] = mime;
5425
- row[4] = Guid.Empty.ToString("B");
5350
+ var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.Extension);
5351
+ row.Set(0, extension);
5352
+ row.Set(1, componentId);
5353
+ row.Set(2, progId);
5354
+ row.Set(3, mime);
5355
+ row.Set(4, Guid.Empty.ToString("B"));
5356
5427
- this.core.EnsureTable(sourceLineNumbers, "Verb");
5357
+ this.Core.EnsureTable(sourceLineNumbers, "Verb");
5358
}
5359
}
5360
else if (YesNoType.No == advertise)
5361
{
5432
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat(".", extension), String.Empty, progId, componentId); // Extension
5362
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat(".", extension), String.Empty, progId, componentId); // Extension
5363
if (null != mime)
5364
{
5435
- this.core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat(".", extension), "Content Type", mime, componentId); // Extension's MIME ContentType
5365
+ this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat(".", extension), "Content Type", mime, componentId); // Extension's MIME ContentType
5366
}
5367
}
5368
}
@@ -5458,7 +5388,15 @@ namespace WixToolset
5388
string assemblyApplication = null;
5389
string assemblyManifest = null;
5390
string bindPath = null;
5461
- int bits = MsiInterop.MsidbFileAttributesVital; // assume all files are vital.
5391
+
5392
+ //int bits = MsiInterop.MsidbFileAttributesVital;
5393
+ bool readOnly = false;
5394
+ bool checksum = false;
5395
+ bool? compressed = null;
5396
+ bool hidden = false;
5397
+ bool system = false;
5398
+ bool vital = true; // assume all files are vital.
5399
+
5400
string companionFile = null;
5401
string defaultLanguage = null;
5402
int defaultSize = 0;
@@ -5491,10 +5429,10 @@ namespace WixToolset
5429
switch (attrib.Name.LocalName)
5430
{
5431
case "Id":
5494
- id = this.core.GetAttributeIdentifier(sourceLineNumbers, attrib);
5432
+ id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
5433
break;
5434
case "Assembly":
5497
- string assemblyValue = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5435
+ string assemblyValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5436
if (0 < assemblyValue.Length)
5437
{
5438
Wix.File.AssemblyType parsedAssemblyType = Wix.File.ParseAssemblyType(assemblyValue);
@@ -5510,84 +5448,88 @@ namespace WixToolset
5448
assemblyType = FileAssemblyType.Win32Assembly;
5449
break;
5450
default:
5513
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "File", "Assembly", assemblyValue, "no", "win32", ".net"));
5451
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "File", "Assembly", assemblyValue, "no", "win32", ".net"));
5452
break;
5453
}
5454
}
5455
break;
5456
case "AssemblyApplication":
5519
- assemblyApplication = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5520
- this.core.CreateSimpleReference(sourceLineNumbers, "File", assemblyApplication);
5457
+ assemblyApplication = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5458
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", assemblyApplication);
5459
break;
5460
case "AssemblyManifest":
5523
- assemblyManifest = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5524
- this.core.CreateSimpleReference(sourceLineNumbers, "File", assemblyManifest);
5461
+ assemblyManifest = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5462
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", assemblyManifest);
5463
break;
5464
case "BindPath":
5527
- bindPath = this.core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
5465
+ bindPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
5466
break;
5467
case "Checksum":
5530
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5468
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5469
{
5532
- bits |= MsiInterop.MsidbFileAttributesChecksum;
5470
+ checksum = true;
5471
+ //bits |= MsiInterop.MsidbFileAttributesChecksum;
5472
}
5473
break;
5474
case "CompanionFile":
5536
- companionFile = this.core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5537
- this.core.CreateSimpleReference(sourceLineNumbers, "File", companionFile);
5475
+ companionFile = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
5476
+ this.Core.CreateSimpleReference(sourceLineNumbers, "File", companionFile);
5477
break;
5478
case "Compressed":
5540
- YesNoDefaultType compressed = this.core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
5541
- if (YesNoDefaultType.Yes == compressed)
5479
+ YesNoDefaultType compressedValue = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
5480
+ if (YesNoDefaultType.Yes == compressedValue)
5481
{
5543
- bits |= MsiInterop.MsidbFileAttributesCompressed;
5482
+ compressed = true;
5483
+ //bits |= MsiInterop.MsidbFileAttributesCompressed;
5484
}
5545
- else if (YesNoDefaultType.No == compressed)
5485
+ else if (YesNoDefaultType.No == compressedValue)
5486
{
5547
- bits |= MsiInterop.MsidbFileAttributesNoncompressed;
5487
+ compressed = false;
5488
+ //bits |= MsiInterop.MsidbFileAttributesNoncompressed;
5489
}
5490
break;
5491
case "DefaultLanguage":
5551
- defaultLanguage = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5492
+ defaultLanguage = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5493
break;
5494
case "DefaultSize":
5554
- defaultSize = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
5495
+ defaultSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
5496
break;
5497
case "DefaultVersion":
5557
- defaultVersion = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5498
+ defaultVersion = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5499
break;
5500
case "DiskId":
5560
- diskId = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
5501
+ diskId = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
5502
break;
5503
case "FontTitle":
5563
- fontTitle = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5504
+ fontTitle = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5505
break;
5506
case "Hidden":
5566
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5507
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5508
{
5568
- bits |= MsiInterop.MsidbFileAttributesHidden;
5509
+ hidden = true;
5510
+ //bits |= MsiInterop.MsidbFileAttributesHidden;
5511
}
5512
break;
5513
case "KeyPath":
5572
- keyPath = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5514
+ keyPath = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5515
break;
5516
case "Name":
5575
- name = this.core.GetAttributeLongFilename(sourceLineNumbers, attrib, false);
5517
+ name = this.Core.GetAttributeLongFilename(sourceLineNumbers, attrib, false);
5518
break;
5519
case "PatchGroup":
5578
- patchGroup = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, int.MaxValue);
5520
+ patchGroup = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, int.MaxValue);
5521
break;
5522
case "PatchIgnore":
5581
- patchIgnore = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5523
+ patchIgnore = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5524
break;
5525
case "PatchWholeFile":
5584
- patchIncludeWholeFile = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5526
+ patchIncludeWholeFile = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5527
break;
5528
case "PatchAllowIgnoreOnError":
5587
- patchAllowIgnoreOnError = YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5529
+ patchAllowIgnoreOnError = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5530
break;
5531
case "ProcessorArchitecture":
5590
- string procArchValue = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5532
+ string procArchValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5533
if (0 < procArchValue.Length)
5534
{
5535
Wix.File.ProcessorArchitectureType procArchType = Wix.File.ParseProcessorArchitectureType(procArchValue);
@@ -5606,58 +5548,62 @@ namespace WixToolset
5548
procArch = "ia64";
5549
break;
5550
default:
5609
- this.core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "File", "ProcessorArchitecture", procArchValue, "msil", "x86", "x64", "ia64"));
5551
+ this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "File", "ProcessorArchitecture", procArchValue, "msil", "x86", "x64", "ia64"));
5552
break;
5553
}
5554
}
5555
break;
5556
case "ReadOnly":
5615
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5557
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5558
{
5617
- bits |= MsiInterop.MsidbFileAttributesReadOnly;
5559
+ readOnly = true;
5560
+ //bits |= MsiInterop.MsidbFileAttributesReadOnly;
5561
}
5562
break;
5563
case "SelfRegCost":
5621
- selfRegCost = this.core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
5564
+ selfRegCost = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
5565
break;
5566
case "ShortName":
5624
- shortName = this.core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
5567
+ shortName = this.Core.GetAttributeShortFilename(sourceLineNumbers, attrib, false);
5568
break;
5569
case "Source":
5627
- source = this.core.GetAttributeValue(sourceLineNumbers, attrib);
5570
+ source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5571
sourceSet = true;
5572
break;
5573
case "System":
5631
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5574
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5575
{
5633
- bits |= MsiInterop.MsidbFileAttributesSystem;
5576
+ system = true;
5577
+ //bits |= MsiInterop.MsidbFileAttributesSystem;
5578
}
5579
break;
5580
case "TrueType":
5637
- if (YesNoType.Yes == this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5581
+ if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
5582
{
5583
fontTitle = String.Empty;
5584
}
5585
break;
5586
case "Vital":
5643
- YesNoType isVital = this.core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5587
+ YesNoType isVital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5588
if (YesNoType.Yes == isVital)
5589
{
5646
- bits |= MsiInterop.MsidbFileAttributesVital;
5590
+ vital = true;
5591
+ //bits |= MsiInterop.MsidbFileAttributesVital;
5592
}
5593
else if (YesNoType.No == isVital)
5594
{
5650
- bits &= ~MsiInterop.MsidbFileAttributesVital;
5595
+ vital = false;
5596
+ //bits &= ~MsiInterop.MsidbFileAttributesVital;
5597
}
5598
break;
5599
default:
5654
- this.core.UnexpectedAttribute(node, attrib);
5600
+ this.Core.UnexpectedAttribute(node, attrib);
5601
break;
5602
}
5603
}
5604
else
5605
{
5660
- this.core.ParseExtensionAttribute(node, attrib);
5606
+ this.Core.ParseExtensionAttribute(node, attrib);
5607
}
5608
}
5609
@@ -5666,29 +5612,29 @@ namespace WixToolset
5612
// the companion file cannot be the key path of a component
5613
if (YesNoType.Yes == keyPath)
5614
{
5669
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "CompanionFile", "KeyPath", "yes"));
5615
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "CompanionFile", "KeyPath", "yes"));
5616
}
5617
}
5618
5619
if (sourceSet && !source.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal) && null == name)
5620
{
5621
name = Path.GetFileName(source);
5676
- if (!this.core.IsValidLongFilename(name, false))
5622
+ if (!this.Core.IsValidLongFilename(name, false))
5623
{
5678
- this.core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name));
5624
+ this.Core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name));
5625
}
5626
}
5627
5628
// generate a short file name
5683
- if (null == shortName && (null != name && !this.core.IsValidShortFilename(name, false)))
5629
+ if (null == shortName && (null != name && !this.Core.IsValidShortFilename(name, false)))
5630
{
5685
- shortName = this.core.CreateShortName(name, true, false, node.Name.LocalName, directoryId);
5631
+ shortName = this.Core.CreateShortName(name, true, false, node.Name.LocalName, directoryId);
5632
generatedShortFileName = true;
5633
}
5634
5635
if (null == id)
5636
{
5691
- id = this.core.CreateIdentifier("fil", directoryId, name ?? shortName);
5637
+ id = this.Core.CreateIdentifier("fil", directoryId, name ?? shortName);
5638
}
5639
5640
if (!this.compilingModule && CompilerConstants.IntegerNotSet == diskId)
@@ -5698,32 +5644,32 @@ namespace WixToolset
5644
5645
if (null != defaultVersion && null != companionFile)
5646
{
5701
- this.core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile));
5647
+ this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile));
5648
}
5649
5650
if (FileAssemblyType.NotAnAssembly == assemblyType)
5651
{
5652
if (null != assemblyManifest)
5653
{
5708
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyManifest"));
5654
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyManifest"));
5655
}
5656
5657
if (null != assemblyApplication)
5658
{
5713
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyApplication"));
5659
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyApplication"));
5660
}
5661
}
5662
else
5663
{
5664
if (FileAssemblyType.Win32Assembly == assemblyType && null == assemblyManifest)
5665
{
5720
- this.core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AssemblyManifest", "Assembly", "win32"));
5666
+ this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AssemblyManifest", "Assembly", "win32"));
5667
}
5668
5669
// allow "*" guid components to omit explicit KeyPath as they can have only one file and therefore this file is the keypath
5670
if (YesNoType.Yes != keyPath && "*" != componentGuid)
5671
{
5726
- this.core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", (FileAssemblyType.DotNetAssembly == assemblyType ? ".net" : "win32"), "KeyPath", "yes"));
5672
+ this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", (FileAssemblyType.DotNetAssembly == assemblyType ? ".net" : "win32"), "KeyPath", "yes"));
5673
}
5674
}
5675
@@ -5749,10 +5695,10 @@ namespace WixToolset
5695
this.ParseRangeElement(child, ref ignoreOffsets, ref ignoreLengths);
5696
break;
5697
case "ODBCDriver":
5752
- this.ParseODBCDriverOrTranslator(child, componentId, id.Id, this.tableDefinitions["ODBCDriver"]);
5698
+ this.ParseODBCDriverOrTranslator(child, componentId, id.Id, TupleDefinitionType.ODBCDriver);
5699
break;
5700
case "ODBCTranslator":
5755
- this.ParseODBCDriverOrTranslator(child, componentId, id.Id, this.tableDefinitions["ODBCTranslator"]);
5701
+ this.ParseODBCDriverOrTranslator(child, componentId, id.Id, TupleDefinitionType.ODBCTranslator);
5702
break;
5703
case "Permission":
5704
this.ParsePermissionElement(child, id.Id, "File");
@@ -5780,19 +5726,19 @@ namespace WixToolset
5726
this.ParseTypeLibElement(child, componentId, id.Id, win64Component);
5727
break;
5728
default:
5783
- this.core.UnexpectedElement(node, child);
5729
+ this.Core.UnexpectedElement(node, child);
5730
break;
5731
}
5732
}
5733
else
5734
{
5735
Dictionary<string, string> context = new Dictionary<string, string>() { { "FileId", id.Id }, { "ComponentId", componentId }, { "Win64", win64Component.ToString() } };
5790
- this.core.ParseExtensionElement(node, child, context);
5736
+ this.Core.ParseExtensionElement(node, child, context);
5737
}
5738
}
5739
5740
5795
- if (!this.core.EncounteredError)
5741
+ if (!this.Core.EncounteredError)
5742
{
5743
PatchAttributeType patchAttributes = PatchAttributeType.None;
5744
if (patchIgnore)
@@ -5831,28 +5777,34 @@ namespace WixToolset
5777
}
5778
}
5779
5834
- FileRow fileRow = (FileRow)this.core.CreateRow(sourceLineNumbers, "File", id);
5835
- fileRow[1] = componentId;
5836
- fileRow[2] = GetMsiFilenameValue(shortName, name);
5837
- fileRow[3] = defaultSize;
5780
+ var fileRow = (FileTuple)this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.File, id);
5781
+ fileRow.Component_ = componentId;
5782
+ //fileRow.FileName = GetMsiFilenameValue(shortName, name);
5783
+ fileRow.ShortFileName = shortName;
5784
+ fileRow.LongFileName = name;
5785
+ fileRow.FileSize = defaultSize;
5786
if (null != companionFile)
5787
{
5840
- fileRow[4] = companionFile;
5788
+ fileRow.Version = companionFile;
5789
}
5790
else if (null != defaultVersion)
5791
{
5844
- fileRow[4] = defaultVersion;
5792
+ fileRow.Version = defaultVersion;
5793
}
5846
- fileRow[5] = defaultLanguage;
5847
- fileRow[6] = bits;
This file is too large to show in full.
src/WixToolset.Core/CompilerCore.cs
+62
-72
@@ -15,7 +15,7 @@ namespace WixToolset
15
using System.Text.RegularExpressions;
16
using System.Xml.Linq;
17
using WixToolset.Data;
18
- using WixToolset.Data.Rows;
18
+ using WixToolset.Data.Tuples;
19
using WixToolset.Extensibility;
20
using Wix = WixToolset.Data.Serialize;
21
@@ -40,7 +40,7 @@ namespace WixToolset
40
/// <summary>
41
/// Core class for the compiler.
42
/// </summary>
43
- internal sealed class CompilerCore : ICompilerCore
43
+ internal sealed class CompilerCore //: ICompilerCore
44
{
45
internal static readonly XNamespace W3SchemaPrefix = "http://www.w3.org/";
46
internal static readonly XNamespace WixNamespace = "http://wixtoolset.org/schemas/v4/wxs";
@@ -140,10 +140,9 @@ namespace WixToolset
140
"REMOVE"
141
});
142
143
- private TableDefinitionCollection tableDefinitions;
143
private Dictionary<XNamespace, ICompilerExtension> extensions;
144
+ private ITupleDefinitionCreator creator;
145
private Intermediate intermediate;
146
- private bool showPedanticMessages;
146
147
private HashSet<string> activeSectionInlinedDirectoryIds;
148
private HashSet<string> activeSectionSimpleReferences;
@@ -152,12 +151,11 @@ namespace WixToolset
151
/// Constructor for all compiler core.
152
/// </summary>
153
/// <param name="intermediate">The Intermediate object representing compiled source document.</param>
155
- /// <param name="tableDefinitions">The loaded table definition collection.</param>
154
/// <param name="extensions">The WiX extensions collection.</param>
157
- internal CompilerCore(Intermediate intermediate, TableDefinitionCollection tableDefinitions, Dictionary<XNamespace, ICompilerExtension> extensions)
155
+ internal CompilerCore(Intermediate intermediate, ITupleDefinitionCreator creator, Dictionary<XNamespace, ICompilerExtension> extensions)
156
{
159
- this.tableDefinitions = tableDefinitions;
157
this.extensions = extensions;
158
+ this.creator = creator;
159
this.intermediate = intermediate;
160
}
161
@@ -165,7 +163,7 @@ namespace WixToolset
163
/// Gets the section the compiler is currently emitting symbols into.
164
/// </summary>
165
/// <value>The section the compiler is currently emitting symbols into.</value>
168
- public Section ActiveSection { get; private set; }
166
+ public IntermediateSection ActiveSection { get; private set; }
167
168
/// <summary>
169
/// Gets or sets the platform which the compiler will use when defaulting 64-bit attributes and elements.
@@ -177,29 +175,13 @@ namespace WixToolset
175
/// Gets whether the compiler core encountered an error while processing.
176
/// </summary>
177
/// <value>Flag if core encountered an error during processing.</value>
180
- public bool EncounteredError
181
- {
182
- get { return Messaging.Instance.EncounteredError; }
183
- }
178
+ public bool EncounteredError => Messaging.Instance.EncounteredError;
179
180
/// <summary>
181
/// Gets or sets the option to show pedantic messages.
182
/// </summary>
183
/// <value>The option to show pedantic messages.</value>
189
- public bool ShowPedanticMessages
190
- {
191
- get { return this.showPedanticMessages; }
192
- set { this.showPedanticMessages = value; }
193
- }
194
-
195
- /// <summary>
196
- /// Gets the table definitions used by the compiler core.
197
- /// </summary>
198
- /// <value>Table definition collection.</value>
199
- public TableDefinitionCollection TableDefinitions
200
- {
201
- get { return this.tableDefinitions; }
202
- }
184
+ public bool ShowPedanticMessages { get; set; }
185
186
/// <summary>
187
/// Convert a bit array into an int value.
@@ -483,32 +465,39 @@ namespace WixToolset
465
/// Creates a row in the active section.
466
/// </summary>
467
/// <param name="sourceLineNumbers">Source and line number of current row.</param>
486
- /// <param name="tableName">Name of table to create row in.</param>
468
+ /// <param name="tupleType">Name of table to create row in.</param>
469
/// <returns>New row.</returns>
488
- public Row CreateRow(SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null)
470
+ public IntermediateTuple CreateRow(SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, Identifier identifier = null)
471
{
490
- return this.CreateRow(sourceLineNumbers, tableName, this.ActiveSection, identifier);
472
+ return this.CreateRow(sourceLineNumbers, tupleType, this.ActiveSection, identifier);
473
}
474
475
/// <summary>
476
/// Creates a row in the active given <paramref name="section"/>.
477
/// </summary>
478
/// <param name="sourceLineNumbers">Source and line number of current row.</param>
497
- /// <param name="tableName">Name of table to create row in.</param>
479
+ /// <param name="tupleType">Name of table to create row in.</param>
480
/// <param name="section">The section to which the row is added. If null, the row is added to the active section.</param>
481
/// <returns>New row.</returns>
500
- internal Row CreateRow(SourceLineNumber sourceLineNumbers, string tableName, Section section, Identifier identifier = null)
482
+ internal IntermediateTuple CreateRow(SourceLineNumber sourceLineNumbers, TupleDefinitionType tupleType, IntermediateSection section, Identifier identifier = null)
483
{
502
- TableDefinition tableDefinition = this.tableDefinitions[tableName];
503
- Table table = section.EnsureTable(tableDefinition);
504
- Row row = table.CreateRow(sourceLineNumbers);
484
+ var tupleDefinition = TupleDefinitions.ByType(tupleType);
485
+ var row = tupleDefinition.CreateTuple(sourceLineNumbers, identifier);
486
487
if (null != identifier)
488
{
508
- row.Access = identifier.Access;
509
- row[0] = identifier.Id;
489
+ if (row.Definition.FieldDefinitions[0].Type == IntermediateFieldType.Number)
490
+ {
491
+ row.Set(0, Convert.ToInt32(identifier.Id));
492
+ }
493
+ else
494
+ {
495
+ row.Set(0, identifier.Id);
496
+ }
497
}
498
499
+ section.Tuples.Add(row);
500
+
501
return row;
502
}
503
@@ -572,9 +561,9 @@ namespace WixToolset
561
/// <returns>New row.</returns>
562
public void CreatePatchFamilyChildReference(SourceLineNumber sourceLineNumbers, string tableName, params string[] primaryKeys)
563
{
575
- Row patchReferenceRow = this.CreateRow(sourceLineNumbers, "WixPatchRef");
576
- patchReferenceRow[0] = tableName;
577
- patchReferenceRow[1] = String.Join("/", primaryKeys);
564
+ var patchReferenceRow = this.CreateRow(sourceLineNumbers, TupleDefinitionType.WixPatchRef);
565
+ patchReferenceRow.Set(0, tableName);
566
+ patchReferenceRow.Set(1, String.Join("/", primaryKeys));
567
}
568
569
/// <summary>
@@ -615,12 +604,13 @@ namespace WixToolset
604
}
605
606
id = this.CreateIdentifier("reg", componentId, root.ToString(CultureInfo.InvariantCulture.NumberFormat), key.ToLowerInvariant(), (null != name ? name.ToLowerInvariant() : name));
618
- Row row = this.CreateRow(sourceLineNumbers, "Registry", id);
619
- row[1] = root;
620
- row[2] = key;
621
- row[3] = name;
622
- row[4] = value;
623
- row[5] = componentId;
607
+
608
+ var row = this.CreateRow(sourceLineNumbers, TupleDefinitionType.Registry, id);
609
+ row.Set(1, root);
610
+ row.Set(2, key);
611
+ row.Set(3, name);
612
+ row.Set(4, value);
613
+ row.Set(5, componentId);
614
}
615
616
return id;
@@ -656,8 +646,8 @@ namespace WixToolset
646
// If this simple reference hasn't been added to the active section already, add it.
647
if (this.activeSectionSimpleReferences.Add(id))
648
{
659
- WixSimpleReferenceRow wixSimpleReferenceRow = (WixSimpleReferenceRow)this.CreateRow(sourceLineNumbers, "WixSimpleReference");
660
- wixSimpleReferenceRow.TableName = tableName;
649
+ var wixSimpleReferenceRow = (WixSimpleReferenceTuple)this.CreateRow(sourceLineNumbers, TupleDefinitionType.WixSimpleReference);
650
+ wixSimpleReferenceRow.Table = tableName;
651
wixSimpleReferenceRow.PrimaryKeys = joinedKeys;
652
}
653
}
@@ -685,11 +675,11 @@ namespace WixToolset
675
throw new ArgumentNullException("childId");
676
}
677
688
- WixGroupRow WixGroupRow = (WixGroupRow)this.CreateRow(sourceLineNumbers, "WixGroup");
689
- WixGroupRow.ParentId = parentId;
690
- WixGroupRow.ParentType = parentType;
691
- WixGroupRow.ChildId = childId;
692
- WixGroupRow.ChildType = childType;
678
+ var row = (WixGroupTuple)this.CreateRow(sourceLineNumbers, TupleDefinitionType.WixGroup);
679
+ row.ParentId = parentId;
680
+ row.ParentType = parentType;
681
+ row.ChildId = childId;
682
+ row.ChildType = childType;
683
}
684
}
685
@@ -703,13 +693,13 @@ namespace WixToolset
693
{
694
if (!this.EncounteredError)
695
{
706
- Row row = this.CreateRow(sourceLineNumbers, "WixEnsureTable");
707
- row[0] = tableName;
696
+ var row = this.CreateRow(sourceLineNumbers, TupleDefinitionType.WixEnsureTable);
697
+ row.Set(0, tableName);
698
699
// We don't add custom table definitions to the tableDefinitions collection,
700
// so if it's not in there, it better be a custom table. If the Id is just wrong,
701
// instead of a custom table, we get an unresolved reference at link time.
712
- if (!this.tableDefinitions.Contains(tableName))
702
+ if (!this.creator.TryGetTupleDefinitionByName(tableName, out var ignored))
703
{
704
this.CreateSimpleReference(sourceLineNumbers, "WixCustomTable", tableName);
705
}
@@ -1016,7 +1006,7 @@ namespace WixToolset
1006
1007
string uppercaseGuid = guid.ToString().ToUpper(CultureInfo.InvariantCulture);
1008
1019
- if (this.showPedanticMessages)
1009
+ if (this.ShowPedanticMessages)
1010
{
1011
if (uppercaseGuid != value)
1012
{
@@ -1505,8 +1495,7 @@ namespace WixToolset
1495
return;
1496
}
1497
1508
- ICompilerExtension extension;
1509
- if (this.TryFindExtension(attribute.Name.NamespaceName, out extension))
1498
+ if (this.TryFindExtension(attribute.Name.NamespaceName, out var extension))
1499
{
1500
extension.ParseAttribute(element, attribute, context);
1501
}
@@ -1525,8 +1514,7 @@ namespace WixToolset
1514
/// <param name="context">Extra information about the context in which this element is being parsed.</param>
1515
public void ParseExtensionElement(XElement parentElement, XElement element, IDictionary<string, string> context = null)
1516
{
1528
- ICompilerExtension extension;
1529
- if (this.TryFindExtension(element.Name.Namespace, out extension))
1517
+ if (this.TryFindExtension(element.Name.Namespace, out var extension))
1518
{
1519
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
1520
extension.ParseElement(parentElement, element, context);
@@ -1651,9 +1639,9 @@ namespace WixToolset
1639
/// <param name="type">Type of section to create.</param>
1640
/// <param name="codepage">Codepage for the resulting database for this ection.</param>
1641
/// <returns>New section.</returns>
1654
- internal Section CreateActiveSection(string id, SectionType type, int codepage)
1642
+ internal IntermediateSection CreateActiveSection(string id, SectionType type, int codepage, string compilationId)
1643
{
1656
- this.ActiveSection = this.CreateSection(id, type, codepage);
1644
+ this.ActiveSection = this.CreateSection(id, type, codepage, compilationId);
1645
1646
this.activeSectionInlinedDirectoryIds = new HashSet<string>();
1647
this.activeSectionSimpleReferences = new HashSet<string>();
@@ -1668,12 +1656,14 @@ namespace WixToolset
1656
/// <param name="type">Type of section to create.</param>
1657
/// <param name="codepage">Codepage for the resulting database for this ection.</param>
1658
/// <returns>New section.</returns>
1671
- internal Section CreateSection(string id, SectionType type, int codepage)
1659
+ internal IntermediateSection CreateSection(string id, SectionType type, int codepage, string compilationId)
1660
{
1673
- Section newSection = new Section(id, type, codepage);
1674
- this.intermediate.AddSection(newSection);
1661
+ var section = new IntermediateSection(id, type, codepage);
1662
+ section.CompilationId = compilationId;
1663
+
1664
+ this.intermediate.Sections.Add(section);
1665
1676
- return newSection;
1666
+ return section;
1667
}
1668
1669
/// <summary>
@@ -1690,11 +1680,11 @@ namespace WixToolset
1680
{
1681
if (!this.EncounteredError)
1682
{
1693
- WixComplexReferenceRow wixComplexReferenceRow = (WixComplexReferenceRow)this.CreateRow(sourceLineNumbers, "WixComplexReference");
1694
- wixComplexReferenceRow.ParentId = parentId;
1683
+ var wixComplexReferenceRow = (WixComplexReferenceTuple)this.CreateRow(sourceLineNumbers, TupleDefinitionType.WixComplexReference);
1684
+ wixComplexReferenceRow.Parent = parentId;
1685
wixComplexReferenceRow.ParentType = parentType;
1686
wixComplexReferenceRow.ParentLanguage = parentLanguage;
1697
- wixComplexReferenceRow.ChildId = childId;
1687
+ wixComplexReferenceRow.Child = childId;
1688
wixComplexReferenceRow.ChildType = childType;
1689
wixComplexReferenceRow.IsPrimary = isPrimary;
1690
}
@@ -1775,9 +1765,9 @@ namespace WixToolset
1765
}
1766
}
1767
1778
- Row row = this.CreateRow(sourceLineNumbers, "Directory", id);
1779
- row[1] = parentId;
1780
- row[2] = defaultDir;
1768
+ var row = this.CreateRow(sourceLineNumbers, TupleDefinitionType.Directory, id);
1769
+ row.Set(1, parentId);
1770
+ row.Set(2, defaultDir);
1771
return id;
1772
}
1773
src/WixToolset.Core/Inscriber.cs
-8
@@ -10,14 +10,6 @@ namespace WixToolset
10
/// </summary>
11
public sealed class Inscriber : IMessageHandler
12
{
13
- // private TempFileCollection tempFiles;
14
- private TableDefinitionCollection tableDefinitions;
15
-
16
- public Inscriber()
17
- {
18
- this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
19
- }
20
-
13
/// <summary>
14
/// Gets or sets the temp files collection.
15
/// </summary>
src/WixToolset.Core/Librarian.cs
+38
-32
@@ -6,40 +6,50 @@ namespace WixToolset.Core
6
using System.Collections.Generic;
7
using System.Linq;
8
using WixToolset.Core.Bind;
9
+ using WixToolset.Core.Link;
10
using WixToolset.Data;
10
- using WixToolset.Link;
11
+ using WixToolset.Extensibility;
12
13
/// <summary>
14
/// Core librarian tool.
15
/// </summary>
16
public sealed class Librarian
17
{
17
- public Librarian(LibraryContext context)
18
- {
19
- this.Context = context;
20
- }
21
-
22
- private LibraryContext Context { get; }
18
+ private ILibraryContext Context { get; set; }
19
20
/// <summary>
21
/// Create a library by combining several intermediates (objects).
22
/// </summary>
23
/// <param name="sections">The sections to combine into a library.</param>
24
/// <returns>Returns the new library.</returns>
29
- public Library Combine()
25
+ public Intermediate Combine(ILibraryContext context)
26
{
27
+ this.Context = context ?? throw new ArgumentNullException(nameof(context));
28
+
29
+ if (String.IsNullOrEmpty(this.Context.LibraryId))
30
+ {
31
+ this.Context.LibraryId = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).TrimEnd('=').Replace('+', '.').Replace('/', '_');
32
+ }
33
+
34
foreach (var extension in this.Context.Extensions)
35
{
36
extension.PreCombine(this.Context);
37
}
38
39
+ var sections = this.Context.Intermediates.SelectMany(i => i.Sections).ToList();
40
+
41
var fileResolver = new FileResolver(this.Context.BindPaths, this.Context.Extensions);
42
43
+ var embedFilePaths = ResolveFilePathsToEmbed(sections, fileResolver);
44
+
45
var localizationsByCulture = CollateLocalizations(this.Context.Localizations);
46
40
- var embedFilePaths = ResolveFilePathsToEmbed(this.Context.Sections, fileResolver);
47
+ foreach (var section in sections)
48
+ {
49
+ section.LibraryId = this.Context.LibraryId;
50
+ }
51
42
- var library = new Library(this.Context.Sections, localizationsByCulture, embedFilePaths);
52
+ var library = new Intermediate(this.Context.LibraryId, sections, localizationsByCulture, embedFilePaths);
53
54
this.Validate(library);
55
@@ -55,7 +65,7 @@ namespace WixToolset.Core
65
/// Validate that a library contains one entry section and no duplicate symbols.
66
/// </summary>
67
/// <param name="library">Library to validate.</param>
58
- private Library Validate(Library library)
68
+ private Intermediate Validate(Intermediate library)
69
{
70
FindEntrySectionAndLoadSymbolsCommand find = new FindEntrySectionAndLoadSymbolsCommand(library.Sections);
71
find.Execute();
@@ -92,39 +102,35 @@ namespace WixToolset.Core
102
return localizationsByCulture;
103
}
104
95
- private List<string> ResolveFilePathsToEmbed(IEnumerable<Section> sections, FileResolver fileResolver)
105
+ private List<string> ResolveFilePathsToEmbed(IEnumerable<IntermediateSection> sections, FileResolver fileResolver)
106
{
107
var embedFilePaths = new List<string>();
108
109
// Resolve paths to files that are to be embedded in the library.
110
if (this.Context.BindFiles)
111
{
102
- foreach (Table table in sections.SelectMany(s => s.Tables))
112
+ foreach (var tuple in sections.SelectMany(s => s.Tuples))
113
{
104
- foreach (Row row in table.Rows)
114
+ foreach (var field in tuple.Fields.Where(f => f.Type == IntermediateFieldType.Path))
115
{
106
- foreach (ObjectField objectField in row.Fields.OfType<ObjectField>())
116
+ var pathField = field.AsPath();
117
+
118
+ if (pathField != null)
119
{
108
- if (null != objectField.Data)
120
+ var resolvedPath = this.Context.WixVariableResolver.ResolveVariables(tuple.SourceLineNumbers, pathField.Path, false);
121
+
122
+ var file = fileResolver.Resolve(tuple.SourceLineNumbers, tuple.Definition.Name, resolvedPath);
123
+
124
+ if (!String.IsNullOrEmpty(file))
125
{
110
- string resolvedPath = this.Context.WixVariableResolver.ResolveVariables(row.SourceLineNumbers, (string)objectField.Data, false);
111
-
112
- string file = fileResolver.Resolve(row.SourceLineNumbers, table.Name, resolvedPath);
113
-
114
- if (!String.IsNullOrEmpty(file))
115
- {
116
- // File was successfully resolved so track the embedded index as the embedded file index.
117
- objectField.EmbeddedFileIndex = embedFilePaths.Count;
118
- embedFilePaths.Add(file);
119
- }
120
- else
121
- {
122
- Messaging.Instance.OnMessage(WixDataErrors.FileNotFound(row.SourceLineNumbers, (string)objectField.Data, table.Name));
123
- }
126
+ // File was successfully resolved so track the embedded index as the embedded file index.
127
+ field.Set(new IntermediateFieldPathValue { EmbeddedFileIndex = embedFilePaths.Count });
128
+
129
+ embedFilePaths.Add(file);
130
}
125
- else // clear out embedded file id in case there was one there before.
131
+ else
132
{
127
- objectField.EmbeddedFileIndex = null;
133
+ this.Context.Messaging.OnMessage(WixDataErrors.FileNotFound(tuple.SourceLineNumbers, pathField.Path, tuple.Definition.Name));
134
}
135
}
136
}
src/WixToolset.Core/LibraryContext.cs
+8
-1
@@ -2,21 +2,28 @@
2
3
namespace WixToolset.Core
4
{
5
+ using System;
6
using System.Collections.Generic;
7
using WixToolset.Data;
8
using WixToolset.Extensibility;
9
10
public class LibraryContext : ILibraryContext
11
{
12
+ public IServiceProvider ServiceProvider { get; }
13
+
14
+ public Messaging Messaging { get; set; }
15
+
16
public bool BindFiles { get; set; }
17
18
public IEnumerable<BindPath> BindPaths { get; set; }
19
20
public IEnumerable<ILibrarianExtension> Extensions { get; set; }
21
22
+ public string LibraryId { get; set; }
23
+
24
public IEnumerable<Localization> Localizations { get; set; }
25
19
- public IEnumerable<Section> Sections { get; set; }
26
+ public IEnumerable<Intermediate> Intermediates { get; set; }
27
28
public IBindVariableResolver WixVariableResolver { get; set; }
29
}
src/WixToolset.Core/Link/ConnectToFeature.cs
+12
-38
@@ -2,7 +2,7 @@
2
3
namespace WixToolset.Link
4
{
5
- using System.Collections.Specialized;
5
+ using System.Collections.Generic;
6
using WixToolset.Data;
7
8
/// <summary>
@@ -10,19 +10,12 @@ namespace WixToolset.Link
10
/// </summary>
11
public sealed class ConnectToFeature
12
{
13
- private Section section;
14
- private string childId;
15
-
16
- private string primaryFeature;
17
- private bool explicitPrimaryFeature;
18
- private StringCollection connectFeatures;
19
-
13
/// <summary>
14
/// Creates a new connect to feature.
15
/// </summary>
16
/// <param name="section">Section this connect belongs to.</param>
17
/// <param name="childId">Id of the child.</param>
25
- public ConnectToFeature(Section section, string childId) :
18
+ public ConnectToFeature(IntermediateSection section, string childId) :
19
this(section, childId, null, false)
20
{
21
}
@@ -34,62 +27,43 @@ namespace WixToolset.Link
27
/// <param name="childId">Id of the child.</param>
28
/// <param name="primaryFeature">Sets the primary feature for the connection.</param>
29
/// <param name="explicitPrimaryFeature">Sets if this is explicit primary.</param>
37
- public ConnectToFeature(Section section, string childId, string primaryFeature, bool explicitPrimaryFeature)
30
+ public ConnectToFeature(IntermediateSection section, string childId, string primaryFeature, bool explicitPrimaryFeature)
31
{
39
- this.section = section;
40
- this.childId = childId;
32
+ this.Section = section;
33
+ this.ChildId = childId;
34
42
- this.primaryFeature = primaryFeature;
43
- this.explicitPrimaryFeature = explicitPrimaryFeature;
44
-
45
- this.connectFeatures = new StringCollection();
35
+ this.PrimaryFeature = primaryFeature;
36
+ this.IsExplicitPrimaryFeature = explicitPrimaryFeature;
37
}
38
39
/// <summary>
40
/// Gets the section.
41
/// </summary>
42
/// <value>Section.</value>
52
- public Section Section
53
- {
54
- get { return this.section; }
55
- }
43
+ public IntermediateSection Section { get; }
44
45
/// <summary>
46
/// Gets the child identifier.
47
/// </summary>
48
/// <value>The child identifier.</value>
61
- public string ChildId
62
- {
63
- get { return this.childId; }
64
- }
49
+ public string ChildId { get; }
50
51
/// <summary>
52
/// Gets or sets if the flag for if the primary feature was set explicitly.
53
/// </summary>
54
/// <value>The flag for if the primary feature was set explicitly.</value>
70
- public bool IsExplicitPrimaryFeature
71
- {
72
- get { return this.explicitPrimaryFeature; }
73
- set { this.explicitPrimaryFeature = value; }
74
- }
55
+ public bool IsExplicitPrimaryFeature { get; set; }
56
57
/// <summary>
58
/// Gets or sets the primary feature.
59
/// </summary>
60
/// <value>The primary feature.</value>
80
- public string PrimaryFeature
81
- {
82
- get { return this.primaryFeature; }
83
- set { this.primaryFeature = value; }
84
- }
61
+ public string PrimaryFeature { get; set; }
62
63
/// <summary>
64
/// Gets the features connected to.
65
/// </summary>
66
/// <value>Features connected to.</value>
90
- public StringCollection ConnectFeatures
91
- {
92
- get { return this.connectFeatures; }
93
- }
67
+ public List<string> ConnectFeatures { get; } = new List<string>();
68
}
69
}
src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
+40
-41
@@ -1,6 +1,6 @@
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.Link
3
+namespace WixToolset.Core.Link
4
{
5
using System;
6
using System.Collections.Generic;
@@ -9,13 +9,13 @@ namespace WixToolset.Link
9
10
internal class FindEntrySectionAndLoadSymbolsCommand : ICommand
11
{
12
- private IEnumerable<Section> sections;
13
-
14
- public FindEntrySectionAndLoadSymbolsCommand(IEnumerable<Section> sections)
12
+ public FindEntrySectionAndLoadSymbolsCommand(IEnumerable<IntermediateSection> sections)
13
{
16
- this.sections = sections;
14
+ this.Sections = sections;
15
}
16
17
+ private IEnumerable<IntermediateSection> Sections { get; }
18
+
19
/// <summary>
20
/// Sets the expected entry output type, based on output file extension provided to the linker.
21
/// </summary>
@@ -24,13 +24,16 @@ namespace WixToolset.Link
24
/// <summary>
25
/// Gets the located entry section after the command is executed.
26
/// </summary>
27
- public Section EntrySection { get; private set; }
27
+ public IntermediateSection EntrySection { get; private set; }
28
29
/// <summary>
30
/// Gets the collection of loaded symbols.
31
/// </summary>
32
public IDictionary<string, Symbol> Symbols { get; private set; }
33
34
+ /// <summary>
35
+ /// Gets the collection of possibly conflicting symbols.
36
+ /// </summary>
37
public IEnumerable<Symbol> PossiblyConflictingSymbols { get; private set; }
38
39
public void Execute()
@@ -38,22 +41,22 @@ namespace WixToolset.Link
41
Dictionary<string, Symbol> symbols = new Dictionary<string, Symbol>();
42
HashSet<Symbol> possibleConflicts = new HashSet<Symbol>();
43
41
- SectionType expectedEntrySectionType;
42
- if (!Enum.TryParse<SectionType>(this.ExpectedOutputType.ToString(), out expectedEntrySectionType))
44
+ if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType))
45
{
46
expectedEntrySectionType = SectionType.Unknown;
47
}
48
47
- foreach (Section section in this.sections)
49
+ foreach (var section in this.Sections)
50
{
51
// Try to find the one and only entry section.
52
if (SectionType.Product == section.Type || SectionType.Module == section.Type || SectionType.PatchCreation == section.Type || SectionType.Patch == section.Type || SectionType.Bundle == section.Type)
53
{
52
- if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType)
53
- {
54
- string outputExtension = Output.GetExtension(this.ExpectedOutputType);
55
- Messaging.Instance.OnMessage(WixWarnings.UnexpectedEntrySection(section.SourceLineNumbers, section.Type.ToString(), expectedEntrySectionType.ToString(), outputExtension));
56
- }
54
+ // TODO: remove this?
55
+ //if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType)
56
+ //{
57
+ // string outputExtension = Output.GetExtension(this.ExpectedOutputType);
58
+ // Messaging.Instance.OnMessage(WixWarnings.UnexpectedEntrySection(section.SourceLineNumbers, section.Type.ToString(), expectedEntrySectionType.ToString(), outputExtension));
59
+ //}
60
61
if (null == this.EntrySection)
62
{
@@ -61,42 +64,38 @@ namespace WixToolset.Link
64
}
65
else
66
{
64
- Messaging.Instance.OnMessage(WixErrors.MultipleEntrySections(this.EntrySection.SourceLineNumbers, this.EntrySection.Id, section.Id));
65
- Messaging.Instance.OnMessage(WixErrors.MultipleEntrySections2(section.SourceLineNumbers));
67
+ Messaging.Instance.OnMessage(WixErrors.MultipleEntrySections(this.EntrySection.Tuples.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id));
68
+ Messaging.Instance.OnMessage(WixErrors.MultipleEntrySections2(section.Tuples.FirstOrDefault()?.SourceLineNumbers));
69
}
70
}
71
72
// Load all the symbols from the section's tables that create symbols.
70
- foreach (Table table in section.Tables.Where(t => t.Definition.CreateSymbols))
73
+ foreach (var row in section.Tuples.Where(t => t.Id != null))
74
{
72
- foreach (Row row in table.Rows)
73
- {
74
- Symbol symbol = new Symbol(row);
75
+ var symbol = new Symbol(section, row);
76
76
- Symbol existingSymbol;
77
- if (!symbols.TryGetValue(symbol.Name, out existingSymbol))
77
+ if (!symbols.TryGetValue(symbol.Name, out var existingSymbol))
78
+ {
79
+ symbols.Add(symbol.Name, symbol);
80
+ }
81
+ else // uh-oh, duplicate symbols.
82
+ {
83
+ // If the duplicate symbols are both private directories, there is a chance that they
84
+ // point to identical tuples. Identical directory tuples are redundant and will not cause
85
+ // conflicts.
86
+ if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access &&
87
+ TupleDefinitionType.Directory == existingSymbol.Row.Definition.Type && existingSymbol.Row.IsIdentical(symbol.Row))
88
{
79
- symbols.Add(symbol.Name, symbol);
89
+ // Ensure identical symbol's tuple is marked redundant to ensure (should the tuple be
90
+ // referenced into the final output) it will not add duplicate primary keys during
91
+ // the .IDT importing.
92
+ //symbol.Row.Redundant = true; - TODO: remove this
93
+ existingSymbol.AddRedundant(symbol);
94
}
81
- else // uh-oh, duplicate symbols.
95
+ else
96
{
83
- // If the duplicate symbols are both private directories, there is a chance that they
84
- // point to identical rows. Identical directory rows are redundant and will not cause
85
- // conflicts.
86
- if (AccessModifier.Private == existingSymbol.Access && AccessModifier.Private == symbol.Access &&
87
- "Directory" == existingSymbol.Row.Table.Name && existingSymbol.Row.IsIdentical(symbol.Row))
88
- {
89
- // Ensure identical symbol's row is marked redundant to ensure (should the row be
90
- // referenced into the final output) it will not add duplicate primary keys during
91
- // the .IDT importing.
92
- symbol.Row.Redundant = true;
93
- existingSymbol.AddRedundant(symbol);
94
- }
95
- else
96
- {
97
- existingSymbol.AddPossibleConflict(symbol);
98
- possibleConflicts.Add(existingSymbol);
99
- }
97
+ existingSymbol.AddPossibleConflict(symbol);
98
+ possibleConflicts.Add(existingSymbol);
99
}
100
}
101
}
src/WixToolset.Core/Link/IntermediateTupleExtensions.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.Core.Link
4
+{
5
+ using WixToolset.Data;
6
+
7
+ internal static class IntermediateTupleExtensions
8
+ {
9
+ public static bool IsIdentical(this IntermediateTuple first, IntermediateTuple second)
10
+ {
11
+ var identical = (first.Definition.Type == second.Definition.Type &&
12
+ first.Definition.Name == second.Definition.Name &&
13
+ first.Definition.FieldDefinitions.Length == second.Definition.FieldDefinitions.Length);
14
+
15
+ for (int i = 0; identical && i < first.Definition.FieldDefinitions.Length; ++i)
16
+ {
17
+ var firstField = first[i];
18
+ var secondField = second[i];
19
+
20
+ identical = (firstField.AsString() == secondField.AsString());
21
+ }
22
+
23
+ return identical;
24
+ }
25
+ }
26
+}
src/WixToolset.Core/Link/ReportConflictingSymbolsCommand.cs
+11
-9
@@ -6,17 +6,18 @@ namespace WixToolset.Link
6
using System.Linq;
7
using WixToolset.Data;
8
9
- public class ReportConflictingSymbolsCommand : ICommand
9
+ public class ReportConflictingSymbolsCommand
10
{
11
- private IEnumerable<Symbol> possibleConflicts;
12
- private IEnumerable<Section> resolvedSections;
13
-
14
- public ReportConflictingSymbolsCommand(IEnumerable<Symbol> possibleConflicts, IEnumerable<Section> resolvedSections)
11
+ public ReportConflictingSymbolsCommand(IEnumerable<Symbol> possibleConflicts, IEnumerable<IntermediateSection> resolvedSections)
12
{
16
- this.possibleConflicts = possibleConflicts;
17
- this.resolvedSections = resolvedSections;
13
+ this.PossibleConflicts = possibleConflicts;
14
+ this.ResolvedSections = resolvedSections;
15
}
16
17
+ private IEnumerable<Symbol> PossibleConflicts { get; }
18
+
19
+ private IEnumerable<IntermediateSection> ResolvedSections { get; }
20
+
21
public void Execute()
22
{
23
// Do a quick check if there are any possibly conflicting symbols that don't come from tables that allow
@@ -25,10 +26,11 @@ namespace WixToolset.Link
26
// symbols are in sections we actually referenced. From the resulting set, show an error for each duplicate
27
// (aka: conflicting) symbol. This should catch any rows with colliding primary keys (since symbols are based
28
// on the primary keys of rows).
28
- List<Symbol> illegalDuplicates = possibleConflicts.Where(s => "WixAction" != s.Row.Table.Name && "WixVariable" != s.Row.Table.Name).ToList();
29
+ var illegalDuplicates = this.PossibleConflicts.Where(s => s.Row.Definition.Type != TupleDefinitionType.WixAction && s.Row.Definition.Type != TupleDefinitionType.WixVariable).ToList();
30
if (0 < illegalDuplicates.Count)
31
{
31
- HashSet<Section> referencedSections = new HashSet<Section>(resolvedSections);
32
+ var referencedSections = new HashSet<IntermediateSection>(this.ResolvedSections);
33
+
34
foreach (Symbol referencedDuplicateSymbol in illegalDuplicates.Where(s => referencedSections.Contains(s.Section)))
35
{
36
List<Symbol> actuallyReferencedDuplicateSymbols = referencedDuplicateSymbol.PossiblyConflictingSymbols.Where(s => referencedSections.Contains(s.Section)).ToList();
src/WixToolset.Core/Link/ResolveReferencesCommand.cs
+46
-53
@@ -4,22 +4,21 @@ namespace WixToolset.Link
4
{
5
using System;
6
using System.Collections.Generic;
7
- using System.Diagnostics;
7
using System.Linq;
8
using WixToolset.Data;
10
- using WixToolset.Data.Rows;
9
+ using WixToolset.Data.Tuples;
10
11
/// <summary>
12
/// Resolves all the simple references in a section.
13
/// </summary>
14
internal class ResolveReferencesCommand : ICommand
15
{
17
- private Section entrySection;
16
+ private IntermediateSection entrySection;
17
private IDictionary<string, Symbol> symbols;
18
private HashSet<Symbol> referencedSymbols;
20
- private HashSet<Section> resolvedSections;
19
+ private HashSet<IntermediateSection> resolvedSections;
20
22
- public ResolveReferencesCommand(Section entrySection, IDictionary<string, Symbol> symbols)
21
+ public ResolveReferencesCommand(IntermediateSection entrySection, IDictionary<string, Symbol> symbols)
22
{
23
this.entrySection = entrySection;
24
this.symbols = symbols;
@@ -29,14 +28,14 @@ namespace WixToolset.Link
28
29
public IEnumerable<Symbol> ReferencedSymbols { get { return this.referencedSymbols; } }
30
32
- public IEnumerable<Section> ResolvedSections { get { return this.resolvedSections; } }
31
+ public IEnumerable<IntermediateSection> ResolvedSections { get { return this.resolvedSections; } }
32
33
/// <summary>
34
/// Resolves all the simple references in a section.
35
/// </summary>
36
public void Execute()
37
{
39
- this.resolvedSections = new HashSet<Section>();
38
+ this.resolvedSections = new HashSet<IntermediateSection>();
39
this.referencedSymbols = new HashSet<Symbol>();
40
41
this.RecursivelyResolveReferences(this.entrySection);
@@ -47,7 +46,7 @@ namespace WixToolset.Link
46
/// </summary>
47
/// <param name="section">Section with references to resolve.</param>
48
/// <remarks>Note: recursive function.</remarks>
50
- private void RecursivelyResolveReferences(Section section)
49
+ private void RecursivelyResolveReferences(IntermediateSection section)
50
{
51
// If we already resolved this section, move on to the next.
52
if (!this.resolvedSections.Add(section))
@@ -59,59 +58,53 @@ namespace WixToolset.Link
58
// symbols provided. Then recursively call this method to process the
59
// located symbol's section. All in all this is a very simple depth-first
60
// search of the references per-section.
62
- Table wixSimpleReferenceTable;
63
- if (section.Tables.TryGetTable("WixSimpleReference", out wixSimpleReferenceTable))
61
+ foreach (var wixSimpleReferenceRow in section.Tuples.OfType<WixSimpleReferenceTuple>())
62
{
65
- foreach (WixSimpleReferenceRow wixSimpleReferenceRow in wixSimpleReferenceTable.Rows)
63
+ // If we're building a Merge Module, ignore all references to the Media table
64
+ // because Merge Modules don't have Media tables.
65
+ if (this.BuildingMergeModule && wixSimpleReferenceRow.Definition.Type == TupleDefinitionType.Media)
66
{
67
- Debug.Assert(wixSimpleReferenceRow.Section == section);
67
+ continue;
68
+ }
69
69
- // If we're building a Merge Module, ignore all references to the Media table
70
- // because Merge Modules don't have Media tables.
71
- if (this.BuildingMergeModule && "Media" == wixSimpleReferenceRow.TableName)
70
+ if (!this.symbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbol))
71
+ {
72
+ Messaging.Instance.OnMessage(WixErrors.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName));
73
+ }
74
+ else // see if the symbol (and any of its duplicates) are appropriately accessible.
75
+ {
76
+ IList<Symbol> accessible = DetermineAccessibleSymbols(section, symbol);
77
+ if (!accessible.Any())
78
{
73
- continue;
79
+ Messaging.Instance.OnMessage(WixErrors.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName, symbol.Access));
80
}
75
-
76
- Symbol symbol;
77
- if (!this.symbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out symbol))
81
+ else if (1 == accessible.Count)
82
{
79
- Messaging.Instance.OnMessage(WixErrors.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName));
83
+ var accessibleSymbol = accessible[0];
84
+ this.referencedSymbols.Add(accessibleSymbol);
85
+
86
+ if (null != accessibleSymbol.Section)
87
+ {
88
+ RecursivelyResolveReferences(accessibleSymbol.Section);
89
+ }
90
}
81
- else // see if the symbol (and any of its duplicates) are appropriately accessible.
91
+ else // display errors for the duplicate symbols.
92
{
83
- IList<Symbol> accessible = DetermineAccessibleSymbols(section, symbol);
84
- if (!accessible.Any())
93
+ var accessibleSymbol = accessible[0];
94
+ var referencingSourceLineNumber = wixSimpleReferenceRow.SourceLineNumbers.ToString();
95
+
96
+ if (String.IsNullOrEmpty(referencingSourceLineNumber))
97
{
86
- Messaging.Instance.OnMessage(WixErrors.UnresolvedReference(wixSimpleReferenceRow.SourceLineNumbers, wixSimpleReferenceRow.SymbolicName, symbol.Access));
98
+ Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol(accessibleSymbol.Row.SourceLineNumbers, accessibleSymbol.Name));
99
}
88
- else if (1 == accessible.Count)
100
+ else
101
{
90
- Symbol accessibleSymbol = accessible[0];
91
- this.referencedSymbols.Add(accessibleSymbol);
92
-
93
- if (null != accessibleSymbol.Section)
94
- {
95
- RecursivelyResolveReferences(accessibleSymbol.Section);
96
- }
102
+ Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol(accessibleSymbol.Row.SourceLineNumbers, accessibleSymbol.Name, referencingSourceLineNumber));
103
}
98
- else // display errors for the duplicate symbols.
104
+
105
+ foreach (Symbol accessibleDuplicate in accessible.Skip(1))
106
{
100
- Symbol accessibleSymbol = accessible[0];
101
- string referencingSourceLineNumber = wixSimpleReferenceRow.SourceLineNumbers.ToString();
102
- if (String.IsNullOrEmpty(referencingSourceLineNumber))
103
- {
104
- Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol(accessibleSymbol.Row.SourceLineNumbers, accessibleSymbol.Name));
105
- }
106
- else
107
- {
108
- Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol(accessibleSymbol.Row.SourceLineNumbers, accessibleSymbol.Name, referencingSourceLineNumber));
109
- }
110
-
111
- foreach (Symbol accessibleDuplicate in accessible.Skip(1))
112
- {
113
- Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol2(accessibleDuplicate.Row.SourceLineNumbers));
114
- }
107
+ Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol2(accessibleDuplicate.Row.SourceLineNumbers));
108
}
109
}
110
}
@@ -124,7 +117,7 @@ namespace WixToolset.Link
117
/// <param name="referencingSection">Section referencing the symbol.</param>
118
/// <param name="symbol">Symbol being referenced.</param>
119
/// <returns>List of symbols accessible by referencing section.</returns>
127
- private IList<Symbol> DetermineAccessibleSymbols(Section referencingSection, Symbol symbol)
120
+ private IList<Symbol> DetermineAccessibleSymbols(IntermediateSection referencingSection, Symbol symbol)
121
{
122
List<Symbol> symbols = new List<Symbol>();
123
@@ -158,20 +151,20 @@ namespace WixToolset.Link
151
/// <param name="referencingSection">Section referencing the symbol.</param>
152
/// <param name="symbol">Symbol being referenced.</param>
153
/// <returns>True if symbol is accessible.</returns>
161
- private bool AccessibleSymbol(Section referencingSection, Symbol symbol)
154
+ private bool AccessibleSymbol(IntermediateSection referencingSection, Symbol symbol)
155
{
156
switch (symbol.Access)
157
{
158
case AccessModifier.Public:
159
return true;
160
case AccessModifier.Internal:
168
- return symbol.Row.Section.IntermediateId.Equals(referencingSection.IntermediateId) || (null != symbol.Row.Section.LibraryId && symbol.Row.Section.LibraryId.Equals(referencingSection.LibraryId));
161
+ return symbol.Section.CompilationId.Equals(referencingSection.CompilationId) || (null != symbol.Section.LibraryId && symbol.Section.LibraryId.Equals(referencingSection.LibraryId));
162
case AccessModifier.Protected:
170
- return symbol.Row.Section.IntermediateId.Equals(referencingSection.IntermediateId);
163
+ return symbol.Section.CompilationId.Equals(referencingSection.CompilationId);
164
case AccessModifier.Private:
165
return referencingSection == symbol.Section;
166
default:
174
- throw new InvalidOperationException();
167
+ throw new ArgumentOutOfRangeException(nameof(symbol.Access));
168
}
169
}
170
}
src/WixToolset.Core/Link/WixComplexReferenceTupleExtensions.cs
new
+73
@@ -0,0 +1,73 @@
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.Core.Link
4
+{
5
+ using System;
6
+ using WixToolset.Data.Tuples;
7
+
8
+ internal static class WixComplexReferenceTupleExtensions
9
+ {
10
+ /// <summary>
11
+ /// Creates a shallow copy of the ComplexReference.
12
+ /// </summary>
13
+ /// <returns>A shallow copy of the ComplexReference.</returns>
14
+ public static WixComplexReferenceTuple Clone(this WixComplexReferenceTuple source)
15
+ {
16
+ var clone = new WixComplexReferenceTuple(source.SourceLineNumbers, source.Id);
17
+ clone.ParentType = source.ParentType;
18
+ clone.Parent = source.Parent;
19
+ clone.ParentLanguage = source.ParentLanguage;
20
+ clone.ChildType = source.ChildType;
21
+ clone.Child = source.Child;
22
+ clone.IsPrimary = source.IsPrimary;
23
+
24
+ return clone;
25
+ }
26
+
27
+ /// <summary>
28
+ /// Compares two complex references without considering the primary bit.
29
+ /// </summary>
30
+ /// <param name="obj">Complex reference to compare to.</param>
31
+ /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns>
32
+ public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple other)
33
+ {
34
+ var comparison = tuple.ChildType - other.ChildType;
35
+ if (0 == comparison)
36
+ {
37
+ comparison = String.Compare(tuple.Child, other.Child, StringComparison.Ordinal);
38
+ if (0 == comparison)
39
+ {
40
+ comparison = tuple.ParentType - other.ParentType;
41
+ if (0 == comparison)
42
+ {
43
+ string thisParentLanguage = null == tuple.ParentLanguage ? String.Empty : tuple.ParentLanguage;
44
+ string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage;
45
+ comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal);
46
+ if (0 == comparison)
47
+ {
48
+ comparison = String.Compare(tuple.Parent, other.Parent, StringComparison.Ordinal);
49
+ }
50
+ }
51
+ }
52
+ }
53
+
54
+ return comparison;
55
+ }
56
+
57
+ /// <summary>
58
+ /// Changes all of the parent references to point to the passed in parent reference.
59
+ /// </summary>
60
+ /// <param name="parent">New parent complex reference.</param>
61
+ public static void Reparent(this WixComplexReferenceTuple tuple, WixComplexReferenceTuple parent)
62
+ {
63
+ tuple.Parent = parent.Parent;
64
+ tuple.ParentLanguage = parent.ParentLanguage;
65
+ tuple.ParentType = parent.ParentType;
66
+
67
+ if (!tuple.IsPrimary)
68
+ {
69
+ tuple.IsPrimary = parent.IsPrimary;
70
+ }
71
+ }
72
+ }
73
+}
src/WixToolset.Core/Link/WixGroupingOrdering.cs
+69
-71
@@ -12,13 +12,13 @@ namespace WixToolset.Link
12
using System.Text;
13
using WixToolset.Extensibility;
14
using WixToolset.Data;
15
+ using WixToolset.Data.Tuples;
16
17
/// <summary>
18
/// Grouping and Ordering class of the WiX toolset.
19
/// </summary>
20
internal sealed class WixGroupingOrdering : IMessageHandler
21
{
21
- private Output output;
22
private IMessageHandler messageHandler;
23
private List<string> groupTypes;
24
private List<string> itemTypes;
@@ -34,9 +34,9 @@ namespace WixToolset.Link
34
/// <param name="messageHandler">Handler for any error messages.</param>
35
/// <param name="groupTypes">Group types to include.</param>
36
/// <param name="itemTypes">Item types to include.</param>
37
- public WixGroupingOrdering(Output output, IMessageHandler messageHandler)
37
+ public WixGroupingOrdering(IntermediateSection entrySections, IMessageHandler messageHandler)
38
{
39
- this.output = output;
39
+ this.EntrySection = entrySections;
40
this.messageHandler = messageHandler;
41
42
this.rowsUsed = new List<int>();
@@ -44,6 +44,8 @@ namespace WixToolset.Link
44
this.encounteredError = false;
45
}
46
47
+ private IntermediateSection EntrySection { get; }
48
+
49
/// <summary>
50
/// Switches a WixGroupingOrdering object to operate on a new set of groups/items.
51
/// </summary>
@@ -91,8 +93,7 @@ namespace WixToolset.Link
93
{
94
Debug.Assert(this.groupTypes.Contains(parentType));
95
94
- List<Item> orderedItems;
95
- this.CreateOrderedList(parentType, parentId, out orderedItems);
96
+ this.CreateOrderedList(parentType, parentId, out var orderedItems);
97
if (this.encounteredError)
98
{
99
return;
@@ -170,15 +171,16 @@ namespace WixToolset.Link
171
/// </summary>
172
public void RemoveUsedGroupRows()
173
{
173
- List<int> sortedIndexes = this.rowsUsed.Distinct().OrderByDescending(i => i).ToList();
174
+ var sortedIndexes = this.rowsUsed.Distinct().OrderByDescending(i => i).ToList();
175
175
- Table wixGroupTable = this.output.Tables["WixGroup"];
176
- Debug.Assert(null != wixGroupTable);
177
- Debug.Assert(sortedIndexes[0] < wixGroupTable.Rows.Count);
176
+ //Table wixGroupTable = this.output.Tables["WixGroup"];
177
+ //Debug.Assert(null != wixGroupTable);
178
+ //Debug.Assert(sortedIndexes[0] < wixGroupTable.Rows.Count);
179
180
foreach (int rowIndex in sortedIndexes)
181
{
181
- wixGroupTable.Rows.RemoveAt(rowIndex);
182
+ //wixGroupTable.Rows.RemoveAt(rowIndex);
183
+ this.EntrySection.Tuples.RemoveAt(rowIndex);
184
}
185
}
186
@@ -194,16 +196,15 @@ namespace WixToolset.Link
196
// does WiX (although they do, currently). We probably want to "upgrade" this to a new
197
// table that includes a sequence number, and then change the code that uses ordered
198
// groups to read from that table instead.
197
- Table wixGroupTable = this.output.Tables["WixGroup"];
198
- Debug.Assert(null != wixGroupTable);
199
-
199
foreach (Item item in orderedItems)
200
{
202
- Row row = wixGroupTable.CreateRow(item.Row.SourceLineNumbers);
203
- row[0] = parentId;
204
- row[1] = parentType;
205
- row[2] = item.Id;
206
- row[3] = item.Type;
201
+ var row = new WixGroupTuple(item.Row.SourceLineNumbers);
202
+ row.ParentId = parentId;
203
+ row.ParentType = (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), parentType);
204
+ row.ChildId = item.Id;
205
+ row.ChildType = (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), item.Type);
206
+
207
+ this.EntrySection.Tuples.Add(row);
208
}
209
}
210
@@ -254,47 +255,47 @@ namespace WixToolset.Link
255
/// </summary>
256
private void LoadGroups()
257
{
257
- Table wixGroupTable = this.output.Tables["WixGroup"];
258
- if (null == wixGroupTable || 0 == wixGroupTable.Rows.Count)
259
- {
260
- // TODO: Change message name to make it *not* Bundle specific?
261
- this.OnMessage(WixErrors.MissingBundleInformation("WixGroup"));
262
- }
258
+ //Table wixGroupTable = this.output.Tables["WixGroup"];
259
+ //if (null == wixGroupTable || 0 == wixGroupTable.Rows.Count)
260
+ //{
261
+ // // TODO: Change message name to make it *not* Bundle specific?
262
+ // this.OnMessage(WixErrors.MissingBundleInformation("WixGroup"));
263
+ //}
264
265
// Collect all of the groups
265
- for (int rowIndex = 0; rowIndex < wixGroupTable.Rows.Count; ++rowIndex)
266
- {
267
- Row row = wixGroupTable.Rows[rowIndex];
268
- string rowParentName = (string)row[0];
269
- string rowParentType = (string)row[1];
270
- string rowChildName = (string)row[2];
271
- string rowChildType = (string)row[3];
272
-
273
- // If this row specifies a parent or child type that's not in our
274
- // lists, we assume it's not a row that we're concerned about.
275
- if (!this.groupTypes.Contains(rowParentType) ||
276
- !this.itemTypes.Contains(rowChildType))
266
+ for (int rowIndex = 0; rowIndex < this.EntrySection.Tuples.Count; ++rowIndex)
267
+ {
268
+ if (this.EntrySection.Tuples[rowIndex] is WixGroupTuple row)
269
{
278
- continue;
279
- }
270
+ var rowParentName = row.ParentId;
271
+ var rowParentType = row.ParentType.ToString();
272
+ var rowChildName = row.ChildId;
273
+ var rowChildType = row.ChildType.ToString();
274
+
275
+ // If this row specifies a parent or child type that's not in our
276
+ // lists, we assume it's not a row that we're concerned about.
277
+ if (!this.groupTypes.Contains(rowParentType) ||
278
+ !this.itemTypes.Contains(rowChildType))
279
+ {
280
+ continue;
281
+ }
282
281
- this.rowsUsed.Add(rowIndex);
283
+ this.rowsUsed.Add(rowIndex);
284
283
- Item parentItem;
284
- if (!this.items.TryGetValue(rowParentType, rowParentName, out parentItem))
285
- {
286
- parentItem = new Item(row, rowParentType, rowParentName);
287
- this.items.Add(parentItem);
288
- }
285
+ if (!this.items.TryGetValue(rowParentType, rowParentName, out var parentItem))
286
+ {
287
+ parentItem = new Item(row, rowParentType, rowParentName);
288
+ this.items.Add(parentItem);
289
+ }
290
290
- Item childItem;
291
- if (!this.items.TryGetValue(rowChildType, rowChildName, out childItem))
292
- {
293
- childItem = new Item(row, rowChildType, rowChildName);
294
- this.items.Add(childItem);
295
- }
291
+ if (!this.items.TryGetValue(rowChildType, rowChildName, out var childItem))
292
+ {
293
+ childItem = new Item(row, rowChildType, rowChildName);
294
+ this.items.Add(childItem);
295
+ }
296
297
- parentItem.ChildItems.Add(childItem);
297
+ parentItem.ChildItems.Add(childItem);
298
+ }
299
}
300
}
301
@@ -374,19 +375,19 @@ namespace WixToolset.Link
375
/// </summary>
376
private void LoadOrdering()
377
{
377
- Table wixOrderingTable = output.Tables["WixOrdering"];
378
- if (null == wixOrderingTable || 0 == wixOrderingTable.Rows.Count)
379
- {
380
- // TODO: Do we need a message here?
381
- return;
382
- }
378
+ //Table wixOrderingTable = output.Tables["WixOrdering"];
379
+ //if (null == wixOrderingTable || 0 == wixOrderingTable.Rows.Count)
380
+ //{
381
+ // // TODO: Do we need a message here?
382
+ // return;
383
+ //}
384
384
- foreach (Row row in wixOrderingTable.Rows)
385
+ foreach (var row in this.EntrySection.Tuples.OfType<WixOrderingTuple>())
386
{
386
- string rowItemType = (string)row[0];
387
- string rowItemName = (string)row[1];
388
- string rowDependsOnType = (string)row[2];
389
- string rowDependsOnName = (string)row[3];
387
+ var rowItemType = row.ItemType;
388
+ var rowItemName = row.ItemId_;
389
+ var rowDependsOnType = row.DependsOnType;
390
+ var rowDependsOnName = row.DependsOnId_;
391
392
// If this row specifies some other (unknown) type in either
393
// position, we assume it's not a row that we're concerned about.
@@ -397,15 +398,12 @@ namespace WixToolset.Link
398
continue;
399
}
400
400
- Item item = null;
401
- Item dependsOn = null;
402
-
403
- if (!this.items.TryGetValue(rowItemType, rowItemName, out item))
401
+ if (!this.items.TryGetValue(rowItemType, rowItemName, out var item))
402
{
403
this.OnMessage(WixErrors.IdentifierNotFound(rowItemType, rowItemName));
404
}
405
408
- if (!this.items.TryGetValue(rowDependsOnType, rowDependsOnName, out dependsOn))
406
+ if (!this.items.TryGetValue(rowDependsOnType, rowDependsOnName, out var dependsOn))
407
{
408
this.OnMessage(WixErrors.IdentifierNotFound(rowDependsOnType, rowDependsOnName));
409
}
@@ -540,7 +538,7 @@ namespace WixToolset.Link
538
private ItemCollection beforeItems; // for checking for circular references
539
private bool flattenedAfterItems;
540
543
- public Item(Row row, string type, string id)
541
+ public Item(IntermediateTuple row, string type, string id)
542
{
543
this.Row = row;
544
this.Type = type;
@@ -553,7 +551,7 @@ namespace WixToolset.Link
551
flattenedAfterItems = false;
552
}
553
556
- public Row Row { get; private set; }
554
+ public IntermediateTuple Row { get; private set; }
555
public string Type { get; private set; }
556
public string Id { get; private set; }
557
public string Key { get; private set; }
@@ -718,7 +716,7 @@ namespace WixToolset.Link
716
return -1;
717
}
718
721
- return string.CompareOrdinal(x.Id, y.Id);
719
+ return String.CompareOrdinal(x.Id, y.Id);
720
}
721
}
722
}
src/WixToolset.Core/LinkContext.cs
new
+28
@@ -0,0 +1,28 @@
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.Core
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using WixToolset.Data;
8
+ using WixToolset.Extensibility;
9
+ using WixToolset.Extensibility.Services;
10
+
11
+ public class LinkContext : ILinkContext
12
+ {
13
+ internal LinkContext(IServiceProvider serviceProvider)
14
+ {
15
+ this.ServiceProvider = serviceProvider;
16
+ }
17
+
18
+ public IServiceProvider ServiceProvider { get; }
19
+
20
+ public Messaging Messaging { get; set; }
21
+
22
+ public IEnumerable<ILinkerExtension> Extensions { get; set; }
23
+
24
+ public OutputType ExpectedOutputType { get; set; }
25
+
26
+ public IEnumerable<Intermediate> Intermediates { get; set; }
27
+ }
28
+}
src/WixToolset.Core/Linker.cs
+578
-586
@@ -1,21 +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
3
+namespace WixToolset.Core
4
{
5
using System;
6
using System.Collections;
7
using System.Collections.Generic;
8
- using System.Collections.Specialized;
8
using System.Diagnostics;
10
- using System.Diagnostics.CodeAnalysis;
9
using System.Globalization;
10
using System.Linq;
13
- using System.Text;
11
using WixToolset.Data;
15
- using WixToolset.Data.Rows;
16
- using WixToolset.Extensibility;
12
using WixToolset.Link;
18
- using WixToolset.Core.Native;
13
+ using WixToolset.Core.Link;
14
+ using WixToolset.Data.Tuples;
15
+ using WixToolset.Extensibility.Services;
16
17
/// <summary>
18
/// Linker core of the WiX toolset.
@@ -25,13 +22,10 @@ namespace WixToolset
22
private static readonly char[] colonCharacter = ":".ToCharArray();
23
private static readonly string emptyGuid = Guid.Empty.ToString("B");
24
28
- private List<IExtensionData> extensionData;
29
-
30
- private List<InspectorExtension> inspectorExtensions;
25
private bool sectionIdOnRows;
32
- private WixActionRowCollection standardActions;
33
- private Output activeOutput;
34
- private TableDefinitionCollection tableDefinitions;
26
+ //private WixActionRowCollection standardActions;
27
+ //private Output activeOutput;
28
+ //private TableDefinitionCollection tableDefinitions;
29
30
/// <summary>
31
/// Creates a linker.
@@ -40,18 +34,14 @@ namespace WixToolset
34
{
35
this.sectionIdOnRows = true; // TODO: what is the correct value for this?
36
43
- this.standardActions = WindowsInstallerStandard.GetStandardActions();
44
- this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
37
+ //this.standardActions = WindowsInstallerStandard.GetStandardActions();
38
+ //this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerStandard.GetTableDefinitions());
39
46
- this.extensionData = new List<IExtensionData>();
47
- this.inspectorExtensions = new List<InspectorExtension>();
40
+ //this.extensionData = new List<IExtensionData>();
41
+ //this.inspectorExtensions = new List<InspectorExtension>();
42
}
43
50
- /// <summary>
51
- /// Gets or sets the localizer.
52
- /// </summary>
53
- /// <value>The localizer.</value>
54
- public Localizer Localizer { get; set; }
44
+ private ILinkContext Context { get; set; }
45
46
/// <summary>
47
/// Gets or sets the path to output unreferenced symbols to. If null or empty, there is no output.
@@ -65,46 +55,37 @@ namespace WixToolset
55
/// <value>The option to show pedantic messages.</value>
56
public bool ShowPedanticMessages { get; set; }
57
68
- /// <summary>
69
- /// Gets the table definitions used by the linker.
70
- /// </summary>
71
- /// <value>Table definitions used by the linker.</value>
72
- public TableDefinitionCollection TableDefinitions
73
- {
74
- get { return this.tableDefinitions; }
75
- }
76
-
58
/// <summary>
59
/// Gets or sets the Wix variable resolver.
60
/// </summary>
61
/// <value>The Wix variable resolver.</value>
81
- internal IBindVariableResolver WixVariableResolver { get; set; }
62
+ //internal IBindVariableResolver WixVariableResolver { get; set; }
63
64
/// <summary>
65
/// Adds an extension.
66
/// </summary>
67
/// <param name="extension">The extension to add.</param>
87
- public void AddExtensionData(IExtensionData extension)
88
- {
89
- if (null != extension.TableDefinitions)
90
- {
91
- foreach (TableDefinition tableDefinition in extension.TableDefinitions)
92
- {
93
- if (!this.tableDefinitions.Contains(tableDefinition.Name))
94
- {
95
- this.tableDefinitions.Add(tableDefinition);
96
- }
97
- else
98
- {
99
- throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
100
- }
101
- }
102
- }
103
-
104
- // keep track of extension data so the libraries can be loaded from these later once all the table definitions
105
- // are loaded; this will allow extensions to have cross table definition dependencies
106
- this.extensionData.Add(extension);
107
- }
68
+ //public void AddExtensionData(IExtensionData extension)
69
+ //{
70
+ // if (null != extension.TableDefinitions)
71
+ // {
72
+ // foreach (TableDefinition tableDefinition in extension.TableDefinitions)
73
+ // {
74
+ // if (!this.tableDefinitions.Contains(tableDefinition.Name))
75
+ // {
76
+ // this.tableDefinitions.Add(tableDefinition);
77
+ // }
78
+ // else
79
+ // {
80
+ // throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
81
+ // }
82
+ // }
83
+ // }
84
+
85
+ // // keep track of extension data so the libraries can be loaded from these later once all the table definitions
86
+ // // are loaded; this will allow extensions to have cross table definition dependencies
87
+ // this.extensionData.Add(extension);
88
+ //}
89
90
/// <summary>
91
/// Links a collection of sections into an output.
@@ -112,31 +93,39 @@ namespace WixToolset
93
/// <param name="inputs">The collection of sections to link together.</param>
94
/// <param name="expectedOutputType">Expected output type, based on output file extension provided to the linker.</param>
95
/// <returns>Output object from the linking.</returns>
115
- public Output Link(IEnumerable<Section> inputs, OutputType expectedOutputType)
96
+ public Intermediate Link(ILinkContext context)
97
{
117
- Output output = null;
118
- List<Section> sections = new List<Section>(inputs);
98
+ this.Context = context ?? throw new ArgumentNullException(nameof(context));
99
120
- try
121
- {
100
+ //IEnumerable<Section> inputs, OutputType expectedOutputType
101
+
102
+ var sections = this.Context.Intermediates.SelectMany(i => i.Sections).ToList();
103
+
104
+#if MOVE_TO_BACKEND
105
bool containsModuleSubstitution = false;
106
bool containsModuleConfiguration = false;
107
+#endif
108
125
- this.activeOutput = null;
109
+ //this.activeOutput = null;
110
127
- List<Row> actionRows = new List<Row>();
128
- List<Row> suppressActionRows = new List<Row>();
111
+#if MOVE_TO_BACKEND
112
+ var actionRows = new List<IntermediateTuple>();
113
+ var suppressActionRows = new List<IntermediateTuple>();
114
+#endif
115
130
- TableDefinitionCollection customTableDefinitions = new TableDefinitionCollection();
131
- List<Row> customRows = new List<Row>();
116
+ //TableDefinitionCollection customTableDefinitions = new TableDefinitionCollection();
117
+ //IntermediateTuple customRows = new List<IntermediateTuple>();
118
119
+#if MOVE_TO_BACKEND
120
StringCollection generatedShortFileNameIdentifiers = new StringCollection();
121
Hashtable generatedShortFileNames = new Hashtable();
122
+#endif
123
136
- Hashtable multipleFeatureComponents = new Hashtable();
124
+ Hashtable multipleFeatureComponents = new Hashtable();
125
138
- Hashtable wixVariables = new Hashtable();
126
+ var wixVariables = new Dictionary<string, WixVariableTuple>();
127
128
+#if MOVE_TO_BACKEND
129
// verify that modularization types match for foreign key relationships
130
foreach (TableDefinition tableDefinition in this.tableDefinitions)
131
{
@@ -164,7 +153,9 @@ namespace WixToolset
153
}
154
}
155
}
156
+#endif
157
158
+#if TODO
159
// Add sections from the extensions with data.
160
foreach (IExtensionData data in this.extensionData)
161
{
@@ -175,123 +166,118 @@ namespace WixToolset
166
sections.AddRange(library.Sections);
167
}
168
}
169
+#endif
170
179
- // First find the entry section and while processing all sections load all the symbols from all of the sections.
180
- // sections.FindEntrySectionAndLoadSymbols(false, this, expectedOutputType, out entrySection, out allSymbols);
181
- FindEntrySectionAndLoadSymbolsCommand find = new FindEntrySectionAndLoadSymbolsCommand(sections);
182
- find.ExpectedOutputType = expectedOutputType;
171
+ // First find the entry section and while processing all sections load all the symbols from all of the sections.
172
+ // sections.FindEntrySectionAndLoadSymbols(false, this, expectedOutputType, out entrySection, out allSymbols);
173
+ var find = new FindEntrySectionAndLoadSymbolsCommand(sections);
174
+ find.ExpectedOutputType = this.Context.ExpectedOutputType;
175
+ find.Execute();
176
184
- find.Execute();
177
+ // Must have found the entry section by now.
178
+ if (null == find.EntrySection)
179
+ {
180
+ throw new WixException(WixErrors.MissingEntrySection(this.Context.ExpectedOutputType.ToString()));
181
+ }
182
186
- // Must have found the entry section by now.
187
- if (null == find.EntrySection)
188
- {
189
- throw new WixException(WixErrors.MissingEntrySection(expectedOutputType.ToString()));
190
- }
183
+ // Now that we know where we're starting from, create the section to hold the linked content.
184
+ var resolvedSection = new IntermediateSection(find.EntrySection.Id, find.EntrySection.Type, find.EntrySection.Codepage);
185
+ var allSymbols = find.Symbols;
186
192
- IDictionary<string, Symbol> allSymbols = find.Symbols;
187
+ // Add the missing standard action symbols.
188
+ this.LoadStandardActionSymbols(resolvedSection, allSymbols);
189
194
- // Add the missing standard action symbols.
195
- this.LoadStandardActionSymbols(allSymbols);
190
+ // Resolve the symbol references to find the set of sections we care about for linking.
191
+ // Of course, we start with the entry section (that's how it got its name after all).
192
+ var resolve = new ResolveReferencesCommand(find.EntrySection, allSymbols);
193
+ resolve.BuildingMergeModule = (SectionType.Module == find.EntrySection.Type);
194
197
- // now that we know where we're starting from, create the output object
198
- output = new Output(null);
199
- output.EntrySection = find.EntrySection; // Note: this entry section will get added to the Output.Sections collection later
200
- if (null != this.Localizer && -1 != this.Localizer.Codepage)
201
- {
202
- output.Codepage = this.Localizer.Codepage;
203
- }
204
- this.activeOutput = output;
195
+ resolve.Execute();
196
206
- // Resolve the symbol references to find the set of sections we care about for linking.
207
- // Of course, we start with the entry section (that's how it got its name after all).
208
- ResolveReferencesCommand resolve = new ResolveReferencesCommand(output.EntrySection, allSymbols);
209
- resolve.BuildingMergeModule = (OutputType.Module == output.Type);
197
+ if (Messaging.Instance.EncounteredError)
198
+ {
199
+ return null;
200
+ }
201
211
- resolve.Execute();
202
+ // Reset the sections to only those that were resolved then flatten the complex
203
+ // references that particpate in groups.
204
+ sections = resolve.ResolvedSections.ToList();
205
213
- if (Messaging.Instance.EncounteredError)
214
- {
215
- return null;
216
- }
206
+ this.FlattenSectionsComplexReferences(sections);
207
218
- // Add the resolved sections to the output then flatten the complex
219
- // references that particpate in groups.
220
- foreach (Section section in resolve.ResolvedSections)
221
- {
222
- output.Sections.Add(section);
223
- }
208
+ if (Messaging.Instance.EncounteredError)
209
+ {
210
+ return null;
211
+ }
212
225
- this.FlattenSectionsComplexReferences(output.Sections);
213
+ // The hard part in linking is processing the complex references.
214
+ var referencedComponents = new HashSet<string>();
215
+ var componentsToFeatures = new ConnectToFeatureCollection();
216
+ var featuresToFeatures = new ConnectToFeatureCollection();
217
+ var modulesToFeatures = new ConnectToFeatureCollection();
218
+ this.ProcessComplexReferences(resolvedSection, sections, referencedComponents, componentsToFeatures, featuresToFeatures, modulesToFeatures);
219
227
- if (Messaging.Instance.EncounteredError)
220
+ if (Messaging.Instance.EncounteredError)
221
+ {
222
+ return null;
223
+ }
224
+
225
+ // Display an error message for Components that were not referenced by a Feature.
226
+ foreach (var symbol in resolve.ReferencedSymbols.Where(s => s.Row.Definition.Type == TupleDefinitionType.Component))
227
+ {
228
+ if (!referencedComponents.Contains(symbol.Name))
229
{
229
- return null;
230
+ this.OnMessage(WixErrors.OrphanedComponent(symbol.Row.SourceLineNumbers, symbol.Row.Id.Id));
231
}
232
+ }
233
232
- // The hard part in linking is processing the complex references.
233
- HashSet<string> referencedComponents = new HashSet<string>();
234
- ConnectToFeatureCollection componentsToFeatures = new ConnectToFeatureCollection();
235
- ConnectToFeatureCollection featuresToFeatures = new ConnectToFeatureCollection();
236
- ConnectToFeatureCollection modulesToFeatures = new ConnectToFeatureCollection();
237
- this.ProcessComplexReferences(output, output.Sections, referencedComponents, componentsToFeatures, featuresToFeatures, modulesToFeatures);
234
+ // Report duplicates that would ultimately end up being primary key collisions.
235
+ ReportConflictingSymbolsCommand reportDupes = new ReportConflictingSymbolsCommand(find.PossiblyConflictingSymbols, resolve.ResolvedSections);
236
+ reportDupes.Execute();
237
239
- if (Messaging.Instance.EncounteredError)
240
- {
241
- return null;
242
- }
238
+ if (Messaging.Instance.EncounteredError)
239
+ {
240
+ return null;
241
+ }
242
244
- // Display an error message for Components that were not referenced by a Feature.
245
- foreach (Symbol symbol in resolve.ReferencedSymbols.Where(s => "Component".Equals(s.Row.TableDefinition.Name, StringComparison.Ordinal)))
246
- {
247
- if (!referencedComponents.Contains(symbol.Name))
248
- {
249
- this.OnMessage(WixErrors.OrphanedComponent(symbol.Row.SourceLineNumbers, (string)symbol.Row[0]));
250
- }
251
- }
243
+ // resolve the feature to feature connects
244
+ this.ResolveFeatureToFeatureConnects(featuresToFeatures, allSymbols);
245
253
- // Report duplicates that would ultimately end up being primary key collisions.
254
- ReportConflictingSymbolsCommand reportDupes = new ReportConflictingSymbolsCommand(find.PossiblyConflictingSymbols, resolve.ResolvedSections);
255
- reportDupes.Execute();
246
+ // start generating OutputTables and OutputRows for all the sections in the output
247
+ var ensureTableRows = new List<IntermediateTuple>();
248
257
- if (Messaging.Instance.EncounteredError)
249
+ int sectionCount = 0;
250
+ foreach (var section in sections)
251
+ {
252
+ sectionCount++;
253
+
254
+ string sectionId = section.Id;
255
+ if (null == sectionId && this.sectionIdOnRows)
256
{
259
- return null;
257
+ sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture);
258
}
259
262
- // resolve the feature to feature connects
263
- this.ResolveFeatureToFeatureConnects(featuresToFeatures, allSymbols);
264
-
265
- // start generating OutputTables and OutputRows for all the sections in the output
266
- List<Row> ensureTableRows = new List<Row>();
267
- int sectionCount = 0;
268
- foreach (Section section in output.Sections)
260
+ foreach (var tuple in section.Tuples)
261
{
270
- sectionCount++;
271
- string sectionId = section.Id;
272
- if (null == sectionId && this.sectionIdOnRows)
273
- {
274
- sectionId = "wix.section." + sectionCount.ToString(CultureInfo.InvariantCulture);
275
- }
262
+ var copyTuple = true; // by default, copy tuples.
263
277
- foreach (Table table in section.Tables)
264
+ // handle special tables
265
+ switch (tuple.Definition.Type)
266
{
279
- bool copyRows = true; // by default, copy rows.
280
-
281
- // handle special tables
282
- switch (table.Name)
283
- {
267
+#if MOVE_TO_BACKEND
268
case "AppSearch":
269
this.activeOutput.EnsureTable(this.tableDefinitions["Signature"]);
270
break;
271
+#endif
272
288
- case "Class":
289
- if (OutputType.Product == output.Type)
290
- {
291
- this.ResolveFeatures(table.Rows, 2, 11, componentsToFeatures, multipleFeatureComponents);
292
- }
293
- break;
273
+ case TupleDefinitionType.Class:
274
+ if (SectionType.Product == resolvedSection.Type)
275
+ {
276
+ this.ResolveFeatures(tuple, 2, 11, componentsToFeatures, multipleFeatureComponents);
277
+ }
278
+ break;
279
280
+#if MOVE_TO_BACKEND
281
case "CustomAction":
282
if (OutputType.Module == this.activeOutput.Type)
283
{
@@ -342,29 +328,32 @@ namespace WixToolset
328
}
329
}
330
break;
331
+#endif
332
+ case TupleDefinitionType.Extension:
333
+ if (SectionType.Product == resolvedSection.Type)
334
+ {
335
+ this.ResolveFeatures(tuple, 1, 4, componentsToFeatures, multipleFeatureComponents);
336
+ }
337
+ break;
338
346
- case "Extension":
347
- if (OutputType.Product == output.Type)
348
- {
349
- this.ResolveFeatures(table.Rows, 1, 4, componentsToFeatures, multipleFeatureComponents);
350
- }
351
- break;
352
-
353
- case "ModuleSubstitution":
339
+#if MOVE_TO_BACKEND
340
+ case TupleDefinitionType.ModuleSubstitution:
341
containsModuleSubstitution = true;
342
break;
343
357
- case "ModuleConfiguration":
344
+ case TupleDefinitionType.ModuleConfiguration:
345
containsModuleConfiguration = true;
346
break;
347
+#endif
348
361
- case "MsiAssembly":
362
- if (OutputType.Product == output.Type)
363
- {
364
- this.ResolveFeatures(table.Rows, 0, 1, componentsToFeatures, multipleFeatureComponents);
365
- }
366
- break;
349
+ case TupleDefinitionType.MsiAssembly:
350
+ if (SectionType.Product == resolvedSection.Type)
351
+ {
352
+ this.ResolveFeatures(tuple, 0, 1, componentsToFeatures, multipleFeatureComponents);
353
+ }
354
+ break;
355
356
+#if MOVE_TO_BACKEND
357
case "ProgId":
358
// the Extension table is required with a ProgId table
359
this.activeOutput.EnsureTable(this.tableDefinitions["Extension"]);
@@ -382,42 +371,46 @@ namespace WixToolset
371
}
372
}
373
break;
374
+#endif
375
386
- case "PublishComponent":
387
- if (OutputType.Product == output.Type)
388
- {
389
- this.ResolveFeatures(table.Rows, 2, 4, componentsToFeatures, multipleFeatureComponents);
390
- }
391
- break;
392
-
393
- case "Shortcut":
394
- if (OutputType.Product == output.Type)
395
- {
396
- this.ResolveFeatures(table.Rows, 3, 4, componentsToFeatures, multipleFeatureComponents);
397
- }
398
- break;
376
+ case TupleDefinitionType.PublishComponent:
377
+ if (SectionType.Product == resolvedSection.Type)
378
+ {
379
+ this.ResolveFeatures(tuple, 2, 4, componentsToFeatures, multipleFeatureComponents);
380
+ }
381
+ break;
382
400
- case "TypeLib":
401
- if (OutputType.Product == output.Type)
402
- {
403
- this.ResolveFeatures(table.Rows, 2, 6, componentsToFeatures, multipleFeatureComponents);
404
- }
405
- break;
383
+ case TupleDefinitionType.Shortcut:
384
+ if (SectionType.Product == resolvedSection.Type)
385
+ {
386
+ this.ResolveFeatures(tuple, 3, 4, componentsToFeatures, multipleFeatureComponents);
387
+ }
388
+ break;
389
407
- case "WixAction":
408
- if (this.sectionIdOnRows)
409
- {
410
- foreach (Row row in table.Rows)
411
- {
412
- row.SectionId = sectionId;
413
- }
414
- }
415
- actionRows.AddRange(table.Rows);
390
+ case TupleDefinitionType.TypeLib:
391
+ if (SectionType.Product == resolvedSection.Type)
392
+ {
393
+ this.ResolveFeatures(tuple, 2, 6, componentsToFeatures, multipleFeatureComponents);
394
+ }
395
+ break;
396
+
397
+#if MOVE_TO_BACKEND
398
+ case TupleDefinitionType.WixAction:
399
+ //if (this.sectionIdOnRows)
400
+ //{
401
+ // foreach (Row row in table.Rows)
402
+ // {
403
+ // row.SectionId = sectionId;
404
+ // }
405
+ //}
406
+ actionRows.Add(tuple);
407
break;
408
+#endif
409
410
+#if SOLVE_CUSTOM_TABLE
411
case "WixCustomTable":
412
this.LinkCustomTable(table, customTableDefinitions);
420
- copyRows = false; // we've created table definitions from these rows, no need to process them any longer
413
+ copyTuple = false; // we've created table definitions from these rows, no need to process them any longer
414
break;
415
416
case "WixCustomRow":
@@ -426,19 +419,22 @@ namespace WixToolset
419
row.SectionId = (this.sectionIdOnRows ? sectionId : null);
420
customRows.Add(row);
421
}
429
- copyRows = false;
422
+ copyTuple = false;
423
break;
424
+#endif
425
+
426
+ case TupleDefinitionType.WixEnsureTable:
427
+ ensureTableRows.Add(tuple);
428
+ break;
429
432
- case "WixEnsureTable":
433
- ensureTableRows.AddRange(table.Rows);
434
- break;
430
431
+#if MOVE_TO_BACKEND
432
case "WixFile":
433
foreach (Row row in table.Rows)
434
{
435
// DiskId is not valid when creating a module, so set it to
436
// 0 for all files to ensure proper sorting in the binder
441
- if (OutputType.Module == this.activeOutput.Type)
437
+ if (SectionType.Module == entrySection.Type)
438
{
439
row[5] = 0;
440
}
@@ -450,61 +446,76 @@ namespace WixToolset
446
}
447
}
448
break;
449
+#endif
450
454
- case "WixMerge":
455
- if (OutputType.Product == output.Type)
456
- {
457
- this.ResolveFeatures(table.Rows, 0, 7, modulesToFeatures, null);
458
- }
459
- break;
451
+ case TupleDefinitionType.WixMerge:
452
+ if (SectionType.Product == resolvedSection.Type)
453
+ {
454
+ this.ResolveFeatures(tuple, 0, 7, modulesToFeatures, null);
455
+ }
456
+ break;
457
461
- case "WixSuppressAction":
462
- suppressActionRows.AddRange(table.Rows);
458
+#if MOVE_TO_BACKEND
459
+ case TupleDefinitionType.WixSuppressAction:
460
+ suppressActionRows.Add(tuple);
461
break;
462
+#endif
463
465
- case "WixVariable":
466
- // check for colliding values and collect the wix variable rows
467
- foreach (WixVariableRow row in table.Rows)
468
- {
469
- WixVariableRow collidingRow = (WixVariableRow)wixVariables[row.Id];
464
+ case TupleDefinitionType.WixComplexReference:
465
+ copyTuple = false;
466
+ break;
467
+
468
+ case TupleDefinitionType.WixSimpleReference:
469
+ copyTuple = false;
470
+ break;
471
471
- if (null == collidingRow || (collidingRow.Overridable && !row.Overridable))
472
+ case TupleDefinitionType.WixVariable:
473
+ // check for colliding values and collect the wix variable rows
474
+ {
475
+ var row = (WixVariableTuple)tuple;
476
+
477
+ if (wixVariables.TryGetValue(row.WixVariable, out var collidingRow))
478
+ {
479
+ if (collidingRow.Overridable && !row.Overridable)
480
{
473
- wixVariables[row.Id] = row;
481
+ wixVariables[row.WixVariable] = row;
482
}
483
else if (!row.Overridable || (collidingRow.Overridable && row.Overridable))
484
{
477
- this.OnMessage(WixErrors.WixVariableCollision(row.SourceLineNumbers, row.Id));
485
+ this.OnMessage(WixErrors.WixVariableCollision(row.SourceLineNumbers, row.WixVariable));
486
}
487
}
480
- copyRows = false;
481
- break;
482
- }
488
+ else
489
+ {
490
+ wixVariables.Add(row.WixVariable, row);
491
+ }
492
+ }
493
484
- if (copyRows)
485
- {
486
- Table outputTable = this.activeOutput.EnsureTable(this.tableDefinitions[table.Name]);
487
- this.CopyTableRowsToOutputTable(table, outputTable, sectionId);
488
- }
494
+ copyTuple = false;
495
+ break;
496
+ }
497
+
498
+ if (copyTuple)
499
+ {
500
+ resolvedSection.Tuples.Add(tuple);
501
}
502
}
503
+ }
504
492
- // copy the module to feature connections into the output
493
- if (0 < modulesToFeatures.Count)
505
+ // copy the module to feature connections into the output
506
+ foreach (ConnectToFeature connectToFeature in modulesToFeatures)
507
+ {
508
+ foreach (var feature in connectToFeature.ConnectFeatures)
509
{
495
- Table wixFeatureModulesTable = this.activeOutput.EnsureTable(this.tableDefinitions["WixFeatureModules"]);
510
+ var row = new WixFeatureModulesTuple();
511
+ row.Feature_ = feature;
512
+ row.WixMerge_ = connectToFeature.ChildId;
513
497
- foreach (ConnectToFeature connectToFeature in modulesToFeatures)
498
- {
499
- foreach (string feature in connectToFeature.ConnectFeatures)
500
- {
501
- Row row = wixFeatureModulesTable.CreateRow(null);
502
- row[0] = feature;
503
- row[1] = connectToFeature.ChildId;
504
- }
505
- }
514
+ resolvedSection.Tuples.Add(row);
515
}
516
+ }
517
518
+#if MOVE_TO_BACKEND
519
// ensure the creation of tables that need to exist
520
if (0 < ensureTableRows.Count)
521
{
@@ -525,17 +536,14 @@ namespace WixToolset
536
this.activeOutput.EnsureTable(tableDef);
537
}
538
}
539
+#endif
540
529
- // copy all the suppress action rows to the output to suppress actions from merge modules
530
- if (0 < suppressActionRows.Count)
531
- {
532
- Table suppressActionTable = this.activeOutput.EnsureTable(this.tableDefinitions["WixSuppressAction"]);
533
- suppressActionRows.ForEach(r => suppressActionTable.Rows.Add(r));
534
- }
535
-
541
+#if MOVE_TO_BACKEND
542
// sequence all the actions
543
this.SequenceActions(actionRows, suppressActionRows);
544
+#endif
545
546
+#if MOVE_TO_BACKEND
547
// check for missing table and add them or display an error as appropriate
548
switch (this.activeOutput.Type)
549
{
@@ -576,7 +584,9 @@ namespace WixToolset
584
}
585
586
this.CheckForIllegalTables(this.activeOutput);
587
+#endif
588
589
+#if SOLVE_CUSTOM_TABLE
590
// add the custom row data
591
foreach (Row row in customRows)
592
{
@@ -649,35 +659,28 @@ namespace WixToolset
659
}
660
}
661
}
662
+#endif
663
653
- //correct the section Id in FeatureComponents table
654
- if (this.sectionIdOnRows)
655
- {
656
- Hashtable componentSectionIds = new Hashtable();
657
- Table componentTable = output.Tables["Component"];
658
-
659
- if (null != componentTable)
660
- {
661
- foreach (Row componentRow in componentTable.Rows)
662
- {
663
- componentSectionIds.Add(componentRow.Fields[0].Data.ToString(), componentRow.SectionId);
664
- }
665
- }
666
-
667
- Table featureComponentsTable = output.Tables["FeatureComponents"];
668
-
669
- if (null != featureComponentsTable)
670
- {
671
- foreach (Row featureComponentsRow in featureComponentsTable.Rows)
672
- {
673
- if (componentSectionIds.Contains(featureComponentsRow.Fields[1].Data.ToString()))
674
- {
675
- featureComponentsRow.SectionId = (string)componentSectionIds[featureComponentsRow.Fields[1].Data.ToString()];
676
- }
677
- }
678
- }
679
- }
664
+ //correct the section Id in FeatureComponents table
665
+ if (this.sectionIdOnRows)
666
+ {
667
+ //var componentSectionIds = new Dictionary<string, string>();
668
+
669
+ //foreach (var componentTuple in entrySection.Tuples.OfType<ComponentTuple>())
670
+ //{
671
+ // componentSectionIds.Add(componentTuple.Id.Id, componentTuple.SectionId);
672
+ //}
673
+
674
+ //foreach (var featureComponentTuple in entrySection.Tuples.OfType<FeatureComponentsTuple>())
675
+ //{
676
+ // if (componentSectionIds.TryGetValue(featureComponentTuple.Component_, out var componentSectionId))
677
+ // {
678
+ // featureComponentTuple.SectionId = componentSectionId;
679
+ // }
680
+ //}
681
+ }
682
683
+#if MOVE_TO_BACKEND
684
// add the ModuleSubstitution table to the ModuleIgnoreTable
685
if (containsModuleSubstitution)
686
{
@@ -695,7 +698,9 @@ namespace WixToolset
698
Row moduleIgnoreTableRow = moduleIgnoreTableTable.CreateRow(null);
699
moduleIgnoreTableRow[0] = "ModuleConfiguration";
700
}
701
+#endif
702
703
+#if MOVE_TO_BACKEND
704
// index all the file rows
705
Table fileTable = this.activeOutput.Tables["File"];
706
RowDictionary<FileRow> indexedFileRows = (null == fileTable) ? new RowDictionary<FileRow>() : new RowDictionary<FileRow>(fileTable);
@@ -740,47 +745,32 @@ namespace WixToolset
745
}
746
}
747
}
748
+#endif
749
744
- // copy the wix variable rows to the output after all overriding has been accounted for.
745
- if (0 < wixVariables.Count)
746
- {
747
- Table wixVariableTable = output.EnsureTable(this.tableDefinitions["WixVariable"]);
750
+ // copy the wix variable rows to the output after all overriding has been accounted for.
751
+ foreach (var row in wixVariables.Values)
752
+ {
753
+ resolvedSection.Tuples.Add(row);
754
+ }
755
749
- foreach (WixVariableRow row in wixVariables.Values)
750
- {
751
- wixVariableTable.Rows.Add(row);
752
- }
753
- }
756
+ // Bundles have groups of data that must be flattened in a way different from other types.
757
+ this.FlattenBundleTables(resolvedSection);
758
755
- // Bundles have groups of data that must be flattened in a way different from other types.
756
- this.FlattenBundleTables(output);
759
+ if (Messaging.Instance.EncounteredError)
760
+ {
761
+ return null;
762
+ }
763
758
- if (Messaging.Instance.EncounteredError)
759
- {
760
- return null;
761
- }
764
+ var output = new Intermediate(resolvedSection.Id, new[] { resolvedSection }, null, null);
765
766
+#if MOVE_TO_BACKEND
767
this.CheckOutputConsistency(output);
764
-
765
- // inspect the output
766
- InspectorCore inspectorCore = new InspectorCore();
767
- foreach (InspectorExtension inspectorExtension in this.inspectorExtensions)
768
- {
769
- inspectorExtension.Core = inspectorCore;
770
- inspectorExtension.InspectOutput(output);
771
-
772
- // reset
773
- inspectorExtension.Core = null;
774
- }
775
- }
776
- finally
777
- {
778
- this.activeOutput = null;
779
- }
768
+#endif
769
770
return Messaging.Instance.EncounteredError ? null : output;
771
}
772
773
+#if SOLVE_CUSTOM_TABLE
774
/// <summary>
775
/// Links the definition of a custom table.
776
/// </summary>
@@ -995,7 +985,9 @@ namespace WixToolset
985
customTableDefinitions.Add(customTable);
986
}
987
}
988
+#endif
989
990
+#if MOVE_TO_BACKEND
991
/// <summary>
992
/// Checks for any tables in the output which are not allowed in the output type.
993
/// </summary>
@@ -1088,7 +1080,9 @@ namespace WixToolset
1080
}
1081
}
1082
}
1083
+#endif
1084
1085
+#if MOVE_TO_BACKEND
1086
/// <summary>
1087
/// Performs various consistency checks on the output.
1088
/// </summary>
@@ -1145,30 +1139,30 @@ namespace WixToolset
1139
}
1140
}
1141
}
1148
-
1142
+#endif
1143
/// <summary>
1144
/// Sends a message to the message delegate if there is one.
1145
/// </summary>
1146
/// <param name="mea">Message event arguments.</param>
1147
public void OnMessage(MessageEventArgs e)
1148
{
1155
- Messaging.Instance.OnMessage(e);
1149
+ this.Context.Messaging.OnMessage(e);
1150
}
1151
1152
/// <summary>
1153
/// Load the standard action symbols.
1154
/// </summary>
1161
- /// <param name="allSymbols">Collection of symbols.</param>
1162
- private void LoadStandardActionSymbols(IDictionary<string, Symbol> allSymbols)
1155
+ /// <param name="symbols">Collection of symbols.</param>
1156
+ private void LoadStandardActionSymbols(IntermediateSection section, IDictionary<string, Symbol> symbols)
1157
{
1164
- foreach (WixActionRow actionRow in this.standardActions)
1158
+ foreach (var actionRow in WindowsInstallerStandard.StandardActions())
1159
{
1166
- Symbol actionSymbol = new Symbol(actionRow);
1160
+ var symbol = new Symbol(section, actionRow);
1161
1162
// If the action's symbol has not already been defined (i.e. overriden by the user), add it now.
1169
- if (!allSymbols.ContainsKey(actionSymbol.Name))
1163
+ if (!symbols.ContainsKey(symbol.Name))
1164
{
1171
- allSymbols.Add(actionSymbol.Name, actionSymbol);
1165
+ symbols.Add(symbol.Name, symbol);
1166
}
1167
}
1168
}
@@ -1176,186 +1170,180 @@ namespace WixToolset
1170
/// <summary>
1171
/// Process the complex references.
1172
/// </summary>
1179
- /// <param name="output">Active output to add sections to.</param>
1173
+ /// <param name="resolvedSection">Active section to add tuples to.</param>
1174
/// <param name="sections">Sections that are referenced during the link process.</param>
1175
/// <param name="referencedComponents">Collection of all components referenced by complex reference.</param>
1176
/// <param name="componentsToFeatures">Component to feature complex references.</param>
1177
/// <param name="featuresToFeatures">Feature to feature complex references.</param>
1178
/// <param name="modulesToFeatures">Module to feature complex references.</param>
1185
- private void ProcessComplexReferences(Output output, IEnumerable<Section> sections, ISet<string> referencedComponents, ConnectToFeatureCollection componentsToFeatures, ConnectToFeatureCollection featuresToFeatures, ConnectToFeatureCollection modulesToFeatures)
1179
+ private void ProcessComplexReferences(IntermediateSection resolvedSection, IEnumerable<IntermediateSection> sections, ISet<string> referencedComponents, ConnectToFeatureCollection componentsToFeatures, ConnectToFeatureCollection featuresToFeatures, ConnectToFeatureCollection modulesToFeatures)
1180
{
1181
Hashtable componentsToModules = new Hashtable();
1182
1189
- foreach (Section section in sections)
1183
+ foreach (var section in sections)
1184
{
1191
- Table wixComplexReferenceTable = section.Tables["WixComplexReference"];
1185
+ var featureComponents = new List<FeatureComponentsTuple>();
1186
1193
- if (null != wixComplexReferenceTable)
1187
+ foreach (var wixComplexReferenceRow in section.Tuples.OfType<WixComplexReferenceTuple>())
1188
{
1195
- foreach (WixComplexReferenceRow wixComplexReferenceRow in wixComplexReferenceTable.Rows)
1189
+ ConnectToFeature connection;
1190
+ switch (wixComplexReferenceRow.ParentType)
1191
{
1197
- ConnectToFeature connection;
1198
- switch (wixComplexReferenceRow.ParentType)
1199
- {
1200
- case ComplexReferenceParentType.Feature:
1201
- switch (wixComplexReferenceRow.ChildType)
1202
- {
1203
- case ComplexReferenceChildType.Component:
1204
- connection = componentsToFeatures[wixComplexReferenceRow.ChildId];
1205
- if (null == connection)
1206
- {
1207
- componentsToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentId, wixComplexReferenceRow.IsPrimary));
1208
- }
1209
- else if (wixComplexReferenceRow.IsPrimary)
1192
+ case ComplexReferenceParentType.Feature:
1193
+ switch (wixComplexReferenceRow.ChildType)
1194
+ {
1195
+ case ComplexReferenceChildType.Component:
1196
+ connection = componentsToFeatures[wixComplexReferenceRow.Child];
1197
+ if (null == connection)
1198
+ {
1199
+ componentsToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.Child, wixComplexReferenceRow.Parent, wixComplexReferenceRow.IsPrimary));
1200
+ }
1201
+ else if (wixComplexReferenceRow.IsPrimary)
1202
+ {
1203
+ if (connection.IsExplicitPrimaryFeature)
1204
{
1211
- if (connection.IsExplicitPrimaryFeature)
1212
- {
1213
- this.OnMessage(WixErrors.MultiplePrimaryReferences(section.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.ParentId, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : this.activeOutput.EntrySection.Id)));
1214
- continue;
1215
- }
1216
- else
1217
- {
1218
- connection.ConnectFeatures.Add(connection.PrimaryFeature); // move the guessed primary feature to the list of connects
1219
- connection.PrimaryFeature = wixComplexReferenceRow.ParentId; // set the new primary feature
1220
- connection.IsExplicitPrimaryFeature = true; // and make sure we remember that we set it so we can fail if we try to set it again
1221
- }
1205
+ this.OnMessage(WixErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Product"), connection.PrimaryFeature ?? resolvedSection.Id));
1206
+ continue;
1207
}
1208
else
1209
{
1225
- connection.ConnectFeatures.Add(wixComplexReferenceRow.ParentId);
1210
+ connection.ConnectFeatures.Add(connection.PrimaryFeature); // move the guessed primary feature to the list of connects
1211
+ connection.PrimaryFeature = wixComplexReferenceRow.Parent; // set the new primary feature
1212
+ connection.IsExplicitPrimaryFeature = true; // and make sure we remember that we set it so we can fail if we try to set it again
1213
}
1214
+ }
1215
+ else
1216
+ {
1217
+ connection.ConnectFeatures.Add(wixComplexReferenceRow.Parent);
1218
+ }
1219
1228
- // add a row to the FeatureComponents table
1229
- Table featureComponentsTable = output.EnsureTable(this.tableDefinitions["FeatureComponents"]);
1230
- Row row = featureComponentsTable.CreateRow(null);
1231
- if (this.sectionIdOnRows)
1232
- {
1233
- row.SectionId = section.Id;
1234
- }
1235
- row[0] = wixComplexReferenceRow.ParentId;
1236
- row[1] = wixComplexReferenceRow.ChildId;
1220
+ // add a row to the FeatureComponents table
1221
+ var featureComponent = new FeatureComponentsTuple();
1222
+ featureComponent.Feature_ = wixComplexReferenceRow.Parent;
1223
+ featureComponent.Component_ = wixComplexReferenceRow.Child;
1224
1238
- // index the component for finding orphaned records
1239
- string symbolName = String.Concat("Component:", wixComplexReferenceRow.ChildId);
1240
- referencedComponents.Add(symbolName);
1225
+ featureComponents.Add(featureComponent);
1226
1242
- break;
1227
+ // index the component for finding orphaned records
1228
+ var symbolName = String.Concat("Component:", wixComplexReferenceRow.Child);
1229
+ referencedComponents.Add(symbolName);
1230
1244
- case ComplexReferenceChildType.Feature:
1245
- connection = featuresToFeatures[wixComplexReferenceRow.ChildId];
1246
- if (null != connection)
1247
- {
1248
- this.OnMessage(WixErrors.MultiplePrimaryReferences(section.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.ParentId, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : this.activeOutput.EntrySection.Id)));
1249
- continue;
1250
- }
1231
+ break;
1232
1252
- featuresToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentId, wixComplexReferenceRow.IsPrimary));
1253
- break;
1233
+ case ComplexReferenceChildType.Feature:
1234
+ connection = featuresToFeatures[wixComplexReferenceRow.Child];
1235
+ if (null != connection)
1236
+ {
1237
+ this.OnMessage(WixErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : resolvedSection.Id)));
1238
+ continue;
1239
+ }
1240
1255
- case ComplexReferenceChildType.Module:
1256
- connection = modulesToFeatures[wixComplexReferenceRow.ChildId];
1257
- if (null == connection)
1258
- {
1259
- modulesToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentId, wixComplexReferenceRow.IsPrimary));
1260
- }
1261
- else if (wixComplexReferenceRow.IsPrimary)
1241
+ featuresToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.Child, wixComplexReferenceRow.Parent, wixComplexReferenceRow.IsPrimary));
1242
+ break;
1243
+
1244
+ case ComplexReferenceChildType.Module:
1245
+ connection = modulesToFeatures[wixComplexReferenceRow.Child];
1246
+ if (null == connection)
1247
+ {
1248
+ modulesToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.Child, wixComplexReferenceRow.Parent, wixComplexReferenceRow.IsPrimary));
1249
+ }
1250
+ else if (wixComplexReferenceRow.IsPrimary)
1251
+ {
1252
+ if (connection.IsExplicitPrimaryFeature)
1253
{
1263
- if (connection.IsExplicitPrimaryFeature)
1264
- {
1265
- this.OnMessage(WixErrors.MultiplePrimaryReferences(section.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.ParentId, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : this.activeOutput.EntrySection.Id)));
1266
- continue;
1267
- }
1268
- else
1269
- {
1270
- connection.ConnectFeatures.Add(connection.PrimaryFeature); // move the guessed primary feature to the list of connects
1271
- connection.PrimaryFeature = wixComplexReferenceRow.ParentId; // set the new primary feature
1272
- connection.IsExplicitPrimaryFeature = true; // and make sure we remember that we set it so we can fail if we try to set it again
1273
- }
1254
+ this.OnMessage(WixErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : resolvedSection.Id)));
1255
+ continue;
1256
}
1257
else
1258
{
1277
- connection.ConnectFeatures.Add(wixComplexReferenceRow.ParentId);
1259
+ connection.ConnectFeatures.Add(connection.PrimaryFeature); // move the guessed primary feature to the list of connects
1260
+ connection.PrimaryFeature = wixComplexReferenceRow.Parent; // set the new primary feature
1261
+ connection.IsExplicitPrimaryFeature = true; // and make sure we remember that we set it so we can fail if we try to set it again
1262
}
1279
- break;
1263
+ }
1264
+ else
1265
+ {
1266
+ connection.ConnectFeatures.Add(wixComplexReferenceRow.Parent);
1267
+ }
1268
+ break;
1269
1281
- default:
1282
- throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1283
- }
1284
- break;
1270
+ default:
1271
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1272
+ }
1273
+ break;
1274
1286
- case ComplexReferenceParentType.Module:
1287
- switch (wixComplexReferenceRow.ChildType)
1288
- {
1289
- case ComplexReferenceChildType.Component:
1290
- if (componentsToModules.ContainsKey(wixComplexReferenceRow.ChildId))
1291
- {
1292
- this.OnMessage(WixErrors.ComponentReferencedTwice(section.SourceLineNumbers, wixComplexReferenceRow.ChildId));
1293
- continue;
1294
- }
1295
- else
1296
- {
1297
- componentsToModules.Add(wixComplexReferenceRow.ChildId, wixComplexReferenceRow); // should always be new
1275
+ case ComplexReferenceParentType.Module:
1276
+ switch (wixComplexReferenceRow.ChildType)
1277
+ {
1278
+ case ComplexReferenceChildType.Component:
1279
+ if (componentsToModules.ContainsKey(wixComplexReferenceRow.Child))
1280
+ {
1281
+ this.OnMessage(WixErrors.ComponentReferencedTwice(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.Child));
1282
+ continue;
1283
+ }
1284
+ else
1285
+ {
1286
+ componentsToModules.Add(wixComplexReferenceRow.Child, wixComplexReferenceRow); // should always be new
1287
1299
- // add a row to the ModuleComponents table
1300
- Table moduleComponentsTable = output.EnsureTable(this.tableDefinitions["ModuleComponents"]);
1301
- Row row = moduleComponentsTable.CreateRow(null);
1302
- if (this.sectionIdOnRows)
1303
- {
1304
- row.SectionId = section.Id;
1305
- }
1306
- row[0] = wixComplexReferenceRow.ChildId;
1307
- row[1] = wixComplexReferenceRow.ParentId;
1308
- row[2] = wixComplexReferenceRow.ParentLanguage;
1309
- }
1288
+ // add a row to the ModuleComponents table
1289
+ var moduleComponent = new ModuleComponentsTuple();
1290
+ moduleComponent.Component = wixComplexReferenceRow.Child;
1291
+ moduleComponent.ModuleID = wixComplexReferenceRow.Parent;
1292
+ moduleComponent.Language = Convert.ToInt32(wixComplexReferenceRow.ParentLanguage);
1293
+ }
1294
1311
- // index the component for finding orphaned records
1312
- string componentSymbolName = String.Concat("Component:", wixComplexReferenceRow.ChildId);
1313
- referencedComponents.Add(componentSymbolName);
1295
+ // index the component for finding orphaned records
1296
+ string componentSymbolName = String.Concat("Component:", wixComplexReferenceRow.Child);
1297
+ referencedComponents.Add(componentSymbolName);
1298
1315
- break;
1299
+ break;
1300
1317
- default:
1318
- throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1319
- }
1320
- break;
1301
+ default:
1302
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1303
+ }
1304
+ break;
1305
1322
- case ComplexReferenceParentType.Patch:
1323
- switch (wixComplexReferenceRow.ChildType)
1324
- {
1325
- case ComplexReferenceChildType.PatchFamily:
1326
- case ComplexReferenceChildType.PatchFamilyGroup:
1327
- break;
1306
+ case ComplexReferenceParentType.Patch:
1307
+ switch (wixComplexReferenceRow.ChildType)
1308
+ {
1309
+ case ComplexReferenceChildType.PatchFamily:
1310
+ case ComplexReferenceChildType.PatchFamilyGroup:
1311
+ break;
1312
1329
- default:
1330
- throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1331
- }
1332
- break;
1313
+ default:
1314
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1315
+ }
1316
+ break;
1317
1334
- case ComplexReferenceParentType.Product:
1335
- switch (wixComplexReferenceRow.ChildType)
1336
- {
1337
- case ComplexReferenceChildType.Feature:
1338
- connection = featuresToFeatures[wixComplexReferenceRow.ChildId];
1339
- if (null != connection)
1340
- {
1341
- this.OnMessage(WixErrors.MultiplePrimaryReferences(section.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.ChildId, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.ParentId, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : this.activeOutput.EntrySection.Id)));
1342
- continue;
1343
- }
1318
+ case ComplexReferenceParentType.Product:
1319
+ switch (wixComplexReferenceRow.ChildType)
1320
+ {
1321
+ case ComplexReferenceChildType.Feature:
1322
+ connection = featuresToFeatures[wixComplexReferenceRow.Child];
1323
+ if (null != connection)
1324
+ {
1325
+ this.OnMessage(WixErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Product"), (null != connection.PrimaryFeature ? connection.PrimaryFeature : resolvedSection.Id)));
1326
+ continue;
1327
+ }
1328
1345
- featuresToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.ChildId, null, wixComplexReferenceRow.IsPrimary));
1346
- break;
1329
+ featuresToFeatures.Add(new ConnectToFeature(section, wixComplexReferenceRow.Child, null, wixComplexReferenceRow.IsPrimary));
1330
+ break;
1331
1348
- default:
1349
- throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1350
- }
1351
- break;
1332
+ default:
1333
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceChildType), wixComplexReferenceRow.ChildType)));
1334
+ }
1335
+ break;
1336
1353
- default:
1354
- // Note: Groups have been processed before getting here so they are not handled by any case above.
1355
- throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceParentType), wixComplexReferenceRow.ParentType)));
1356
- }
1337
+ default:
1338
+ // Note: Groups have been processed before getting here so they are not handled by any case above.
1339
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixStrings.EXP_UnexpectedComplexReferenceChildType, Enum.GetName(typeof(ComplexReferenceParentType), wixComplexReferenceRow.ParentType)));
1340
}
1341
}
1342
+
1343
+ foreach (var featureComponent in featureComponents)
1344
+ {
1345
+ section.Tuples.Add(featureComponent);
1346
+ }
1347
}
1348
}
1349
@@ -1363,11 +1351,11 @@ namespace WixToolset
1351
/// Flattens all complex references in all sections in the collection.
1352
/// </summary>
1353
/// <param name="sections">Sections that are referenced during the link process.</param>
1366
- private void FlattenSectionsComplexReferences(IEnumerable<Section> sections)
1354
+ private void FlattenSectionsComplexReferences(IEnumerable<IntermediateSection> sections)
1355
{
1368
- Hashtable parentGroups = new Hashtable();
1369
- Hashtable parentGroupsSections = new Hashtable();
1370
- Hashtable parentGroupsNeedingProcessing = new Hashtable();
1356
+ var parentGroups = new Dictionary<string, List<WixComplexReferenceTuple>>();
1357
+ var parentGroupsSections = new Dictionary<string, IntermediateSection>();
1358
+ var parentGroupsNeedingProcessing = new Dictionary<string, IntermediateSection>();
1359
1360
// DisplaySectionComplexReferences("--- section's complex references before flattening ---", sections);
1361
@@ -1376,69 +1364,60 @@ namespace WixToolset
1364
// parents" of Features, Modules, and, of course, Groups. These references
1365
// that participate in a "grouping parent" will be removed from their section
1366
// now and after processing added back in Step 3 below.
1379
- foreach (Section section in sections)
1367
+ foreach (var section in sections)
1368
{
1381
- Table wixComplexReferenceTable = section.Tables["WixComplexReference"];
1382
-
1383
- if (null != wixComplexReferenceTable)
1369
+ // Count down because we'll sometimes remove items from the list.
1370
+ for (int i = section.Tuples.Count - 1; i >= 0; --i)
1371
{
1385
- // Count down because we'll sometimes remove items from the list.
1386
- for (int i = wixComplexReferenceTable.Rows.Count - 1; i >= 0; --i)
1372
+ // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature,
1373
+ // and Module. Non-grouping complex references are simple and
1374
+ // resolved during normal complex reference resolutions.
1375
+ if (section.Tuples[i] is WixComplexReferenceTuple wixComplexReferenceRow &&
1376
+ (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType ||
1377
+ ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType ||
1378
+ ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType ||
1379
+ ComplexReferenceParentType.Module == wixComplexReferenceRow.ParentType ||
1380
+ ComplexReferenceParentType.PatchFamilyGroup == wixComplexReferenceRow.ParentType ||
1381
+ ComplexReferenceParentType.Product == wixComplexReferenceRow.ParentType))
1382
{
1388
- WixComplexReferenceRow wixComplexReferenceRow = (WixComplexReferenceRow)wixComplexReferenceTable.Rows[i];
1389
-
1390
- // Only process the "grouping parents" such as FeatureGroup, ComponentGroup, Feature,
1391
- // and Module. Non-grouping complex references are simple and
1392
- // resolved during normal complex reference resolutions.
1393
- if (ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType ||
1394
- ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType ||
1395
- ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType ||
1396
- ComplexReferenceParentType.Module == wixComplexReferenceRow.ParentType ||
1397
- ComplexReferenceParentType.PatchFamilyGroup == wixComplexReferenceRow.ParentType ||
1398
- ComplexReferenceParentType.Product == wixComplexReferenceRow.ParentType)
1383
+ var parentTypeAndId = CombineTypeAndId(wixComplexReferenceRow.ParentType, wixComplexReferenceRow.Parent);
1384
+
1385
+ // Group all complex references with a common parent
1386
+ // together so we can find them quickly while processing in
1387
+ // Step 2.
1388
+ if (!parentGroups.TryGetValue(parentTypeAndId, out var childrenComplexRefs))
1389
{
1400
- string parentTypeAndId = CombineTypeAndId(wixComplexReferenceRow.ParentType, wixComplexReferenceRow.ParentId);
1390
+ childrenComplexRefs = new List<WixComplexReferenceTuple>();
1391
+ parentGroups.Add(parentTypeAndId, childrenComplexRefs);
1392
+ }
1393
1402
- // Group all complex references with a common parent
1403
- // together so we can find them quickly while processing in
1404
- // Step 2.
1405
- ArrayList childrenComplexRefs = parentGroups[parentTypeAndId] as ArrayList;
1406
- if (null == childrenComplexRefs)
1407
- {
1408
- childrenComplexRefs = new ArrayList();
1409
- parentGroups.Add(parentTypeAndId, childrenComplexRefs);
1410
- }
1394
+ childrenComplexRefs.Add(wixComplexReferenceRow);
1395
+ section.Tuples.RemoveAt(i);
1396
1412
- childrenComplexRefs.Add(wixComplexReferenceRow);
1413
- wixComplexReferenceTable.Rows.RemoveAt(i);
1397
+ // Remember the mapping from set of complex references with a common
1398
+ // parent to their section. We'll need this to add them back to the
1399
+ // correct section in Step 3.
1400
+ if (!parentGroupsSections.TryGetValue(parentTypeAndId, out var parentSection))
1401
+ {
1402
+ parentGroupsSections.Add(parentTypeAndId, section);
1403
+ }
1404
1415
- // Remember the mapping from set of complex references with a common
1416
- // parent to their section. We'll need this to add them back to the
1417
- // correct section in Step 3.
1418
- Section parentSection = parentGroupsSections[parentTypeAndId] as Section;
1419
- if (null == parentSection)
1420
- {
1421
- parentGroupsSections.Add(parentTypeAndId, section);
1422
- }
1423
- // Debug.Assert(section == (Section)parentGroupsSections[parentTypeAndId]);
1424
-
1425
- // If the child of the complex reference is another group, then in Step 2
1426
- // we're going to have to process this complex reference again to copy
1427
- // the child group's references into the parent group.
1428
- if ((ComplexReferenceChildType.ComponentGroup == wixComplexReferenceRow.ChildType) ||
1429
- (ComplexReferenceChildType.FeatureGroup == wixComplexReferenceRow.ChildType) ||
1430
- (ComplexReferenceChildType.PatchFamilyGroup == wixComplexReferenceRow.ChildType))
1405
+ // If the child of the complex reference is another group, then in Step 2
1406
+ // we're going to have to process this complex reference again to copy
1407
+ // the child group's references into the parent group.
1408
+ if ((ComplexReferenceChildType.ComponentGroup == wixComplexReferenceRow.ChildType) ||
1409
+ (ComplexReferenceChildType.FeatureGroup == wixComplexReferenceRow.ChildType) ||
1410
+ (ComplexReferenceChildType.PatchFamilyGroup == wixComplexReferenceRow.ChildType))
1411
+ {
1412
+ if (!parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId))
1413
{
1432
- if (!parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId))
1433
- {
1434
- parentGroupsNeedingProcessing.Add(parentTypeAndId, section);
1435
- }
1436
- // Debug.Assert(section == (Section)parentGroupsNeedingProcessing[parentTypeAndId]);
1414
+ parentGroupsNeedingProcessing.Add(parentTypeAndId, section);
1415
}
1416
}
1417
}
1418
}
1419
}
1420
+
1421
Debug.Assert(parentGroups.Count == parentGroupsSections.Count);
1422
Debug.Assert(parentGroupsNeedingProcessing.Count <= parentGroups.Count);
1423
@@ -1447,14 +1426,13 @@ namespace WixToolset
1426
// Step 2: Loop through the parent groups that have nested groups removing
1427
// them from the hash table as they are processed. At the end of this the
1428
// complex references should all be flattened.
1450
- string[] keys = new string[parentGroupsNeedingProcessing.Keys.Count];
1451
- parentGroupsNeedingProcessing.Keys.CopyTo(keys, 0);
1429
+ var keys = parentGroupsNeedingProcessing.Keys.ToList();
1430
1431
foreach (string key in keys)
1432
{
1455
- if (parentGroupsNeedingProcessing.Contains(key))
1433
+ if (parentGroupsNeedingProcessing.ContainsKey(key))
1434
{
1457
- Stack loopDetector = new Stack();
1435
+ var loopDetector = new Stack<string>();
1436
this.FlattenGroup(key, loopDetector, parentGroups, parentGroupsNeedingProcessing);
1437
}
1438
else
@@ -1468,18 +1446,17 @@ namespace WixToolset
1446
// in Step 1 and flattened in Step 2 are added to their appropriate
1447
// section. This is where we will toss out the final no-longer-needed
1448
// groups.
1471
- foreach (string parentGroup in parentGroups.Keys)
1449
+ foreach (var parentGroup in parentGroups.Keys)
1450
{
1473
- Section section = (Section)parentGroupsSections[parentGroup];
1474
- Table wixComplexReferenceTable = section.Tables["WixComplexReference"];
1451
+ var section = parentGroupsSections[parentGroup];
1452
1476
- foreach (WixComplexReferenceRow wixComplexReferenceRow in (ArrayList)parentGroups[parentGroup])
1453
+ foreach (var wixComplexReferenceRow in parentGroups[parentGroup])
1454
{
1455
if ((ComplexReferenceParentType.FeatureGroup != wixComplexReferenceRow.ParentType) &&
1456
(ComplexReferenceParentType.ComponentGroup != wixComplexReferenceRow.ParentType) &&
1457
(ComplexReferenceParentType.PatchFamilyGroup != wixComplexReferenceRow.ParentType))
1458
{
1482
- wixComplexReferenceTable.Rows.Add(wixComplexReferenceRow);
1459
+ section.Tuples.Add(wixComplexReferenceRow);
1460
}
1461
}
1462
}
@@ -1504,46 +1481,39 @@ namespace WixToolset
1481
/// <param name="loopDetector">Stack of groups processed thus far. Used to detect loops.</param>
1482
/// <param name="parentGroups">Hash table of complex references grouped by parent id.</param>
1483
/// <param name="parentGroupsNeedingProcessing">Hash table of parent groups that still have nested groups that need to be flattened.</param>
1507
- private void FlattenGroup(string parentTypeAndId, Stack loopDetector, Hashtable parentGroups, Hashtable parentGroupsNeedingProcessing)
1484
+ private void FlattenGroup(string parentTypeAndId, Stack<string> loopDetector, Dictionary<string, List<WixComplexReferenceTuple>> parentGroups, Dictionary<string, IntermediateSection> parentGroupsNeedingProcessing)
1485
{
1509
- Debug.Assert(parentGroupsNeedingProcessing.Contains(parentTypeAndId));
1486
+ Debug.Assert(parentGroupsNeedingProcessing.ContainsKey(parentTypeAndId));
1487
loopDetector.Push(parentTypeAndId); // push this complex reference parent identfier into the stack for loop verifying
1488
1512
- ArrayList allNewChildComplexReferences = new ArrayList();
1513
- ArrayList referencesToParent = (ArrayList)parentGroups[parentTypeAndId];
1514
- foreach (WixComplexReferenceRow wixComplexReferenceRow in referencesToParent)
1489
+ var allNewChildComplexReferences = new List<WixComplexReferenceTuple>();
1490
+
1491
+ var referencesToParent = parentGroups[parentTypeAndId];
1492
+ foreach (var wixComplexReferenceRow in referencesToParent)
1493
{
1494
Debug.Assert(ComplexReferenceParentType.ComponentGroup == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.FeatureGroup == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.Feature == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.Module == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.Product == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.PatchFamilyGroup == wixComplexReferenceRow.ParentType || ComplexReferenceParentType.Patch == wixComplexReferenceRow.ParentType);
1517
- Debug.Assert(parentTypeAndId == CombineTypeAndId(wixComplexReferenceRow.ParentType, wixComplexReferenceRow.ParentId));
1495
+ Debug.Assert(parentTypeAndId == CombineTypeAndId(wixComplexReferenceRow.ParentType, wixComplexReferenceRow.Parent));
1496
1497
// We are only interested processing when the child is a group.
1498
if ((ComplexReferenceChildType.ComponentGroup == wixComplexReferenceRow.ChildType) ||
1499
(ComplexReferenceChildType.FeatureGroup == wixComplexReferenceRow.ChildType) ||
1500
(ComplexReferenceChildType.PatchFamilyGroup == wixComplexReferenceRow.ChildType))
1501
{
1524
- string childTypeAndId = CombineTypeAndId(wixComplexReferenceRow.ChildType, wixComplexReferenceRow.ChildId);
1502
+ string childTypeAndId = CombineTypeAndId(wixComplexReferenceRow.ChildType, wixComplexReferenceRow.Child);
1503
if (loopDetector.Contains(childTypeAndId))
1504
{
1505
// Create a comma delimited list of the references that participate in the
1506
// loop for the error message. Start at the bottom of the stack and work the
1507
// way up to present the loop as a directed graph.
1530
- object[] stack = loopDetector.ToArray();
1531
- StringBuilder loop = new StringBuilder();
1532
- for (int i = stack.Length - 1; i >= 0; --i)
1533
- {
1534
- loop.Append((string)stack[i]);
1535
- if (0 < i)
1536
- {
1537
- loop.Append(" -> ");
1538
- }
1539
- }
1508
+ var loop = String.Join(" -> ", loopDetector);
1509
1541
- this.OnMessage(WixErrors.ReferenceLoopDetected(wixComplexReferenceRow.Table.Section == null ? null : wixComplexReferenceRow.Table.Section.SourceLineNumbers, loop.ToString()));
1510
+ this.OnMessage(WixErrors.ReferenceLoopDetected(wixComplexReferenceRow?.SourceLineNumbers, loop));
1511
1512
// Cleanup the parentGroupsNeedingProcessing and the loopDetector just like the
1513
// exit of this method does at the end because we are exiting early.
1514
loopDetector.Pop();
1515
parentGroupsNeedingProcessing.Remove(parentTypeAndId);
1516
+
1517
return; // bail
1518
}
1519
@@ -1560,10 +1530,9 @@ namespace WixToolset
1530
// complex reference (because we're moving references up the tree), and finally
1531
// add the cloned child's complex reference to the list of complex references
1532
// that we'll eventually add to the parent group.
1563
- ArrayList referencesToChild = (ArrayList)parentGroups[childTypeAndId];
1564
- if (null != referencesToChild)
1533
+ if (parentGroups.TryGetValue(childTypeAndId, out var referencesToChild))
1534
{
1566
- foreach (WixComplexReferenceRow crefChild in referencesToChild)
1535
+ foreach (var crefChild in referencesToChild)
1536
{
1537
// Only merge up the non-group items since groups are purged
1538
// after this part of the processing anyway (cloning them would
@@ -1572,8 +1541,8 @@ namespace WixToolset
1541
(ComplexReferenceChildType.ComponentGroup != crefChild.ChildType) ||
1542
(ComplexReferenceChildType.PatchFamilyGroup != crefChild.ChildType))
1543
{
1575
- WixComplexReferenceRow crefChildClone = crefChild.Clone();
1576
- Debug.Assert(crefChildClone.ParentId == wixComplexReferenceRow.ChildId);
1544
+ var crefChildClone = crefChild.Clone();
1545
+ Debug.Assert(crefChildClone.Parent == wixComplexReferenceRow.Child);
1546
1547
crefChildClone.Reparent(wixComplexReferenceRow);
1548
allNewChildComplexReferences.Add(crefChildClone);
@@ -1587,10 +1556,11 @@ namespace WixToolset
1556
// group. Clean out any left over groups and quietly remove any
1557
// duplicate complex references that occurred during the merge.
1558
referencesToParent.AddRange(allNewChildComplexReferences);
1590
- referencesToParent.Sort();
1559
+ referencesToParent.Sort(ComplexReferenceComparision);
1560
for (int i = referencesToParent.Count - 1; i >= 0; --i)
1561
{
1593
- WixComplexReferenceRow wixComplexReferenceRow = (WixComplexReferenceRow)referencesToParent[i];
1562
+ var wixComplexReferenceRow = referencesToParent[i];
1563
+
1564
if ((ComplexReferenceChildType.FeatureGroup == wixComplexReferenceRow.ChildType) ||
1565
(ComplexReferenceChildType.ComponentGroup == wixComplexReferenceRow.ChildType) ||
1566
(ComplexReferenceChildType.PatchFamilyGroup == wixComplexReferenceRow.ChildType))
@@ -1602,7 +1572,7 @@ namespace WixToolset
1572
// Since the list is already sorted, we can find duplicates by simply
1573
// looking at the next sibling in the list and tossing out one if they
1574
// match.
1605
- WixComplexReferenceRow crefCompare = (WixComplexReferenceRow)referencesToParent[i - 1];
1575
+ var crefCompare = referencesToParent[i - 1];
1576
if (0 == wixComplexReferenceRow.CompareToWithoutConsideringPrimary(crefCompare))
1577
{
1578
referencesToParent.RemoveAt(i);
@@ -1610,6 +1580,29 @@ namespace WixToolset
1580
}
1581
}
1582
1583
+ int ComplexReferenceComparision(WixComplexReferenceTuple x, WixComplexReferenceTuple y)
1584
+ {
1585
+ var comparison = x.ChildType - y.ChildType;
1586
+ if (0 == comparison)
1587
+ {
1588
+ comparison = String.Compare(x.Child, y.Child, StringComparison.Ordinal);
1589
+ if (0 == comparison)
1590
+ {
1591
+ comparison = x.ParentType - y.ParentType;
1592
+ if (0 == comparison)
1593
+ {
1594
+ comparison = String.Compare(x.ParentLanguage ?? String.Empty, y.ParentLanguage ?? String.Empty, StringComparison.Ordinal);
1595
+ if (0 == comparison)
1596
+ {
1597
+ comparison = String.Compare(x.Parent, y.Parent, StringComparison.Ordinal);
1598
+ }
1599
+ }
1600
+ }
1601
+ }
1602
+
1603
+ return comparison;
1604
+ }
1605
+
1606
loopDetector.Pop(); // pop this complex reference off the stack since we're done verify the loop here
1607
parentGroupsNeedingProcessing.Remove(parentTypeAndId); // remove the newly processed complex reference
1608
}
@@ -1639,9 +1632,9 @@ namespace WixToolset
1632
/// Flattens the tables used in a Bundle.
1633
/// </summary>
1634
/// <param name="output">Output containing the tables to process.</param>
1642
- private void FlattenBundleTables(Output output)
1635
+ private void FlattenBundleTables(IntermediateSection entrySection)
1636
{
1644
- if (OutputType.Bundle != output.Type)
1637
+ if (SectionType.Bundle != entrySection.Type)
1638
{
1639
return;
1640
}
@@ -1651,7 +1644,7 @@ namespace WixToolset
1644
// will hold Payloads under UX, ChainPackages (references?) under Chain,
1645
// and ChainPackages/Payloads under the attached and any detatched
1646
// Containers.
1654
- WixGroupingOrdering groups = new WixGroupingOrdering(output, this);
1647
+ var groups = new WixGroupingOrdering(entrySection, this);
1648
1649
// Create UX payloads and Package payloads
1650
groups.UseTypes(new string[] { "Container", "Layout", "PackageGroup", "PayloadGroup", "Package" }, new string[] { "PackageGroup", "Package", "PayloadGroup", "Payload" });
@@ -1675,21 +1668,21 @@ namespace WixToolset
1668
{
1669
foreach (ConnectToFeature connection in featuresToFeatures)
1670
{
1678
- WixSimpleReferenceRow wixSimpleReferenceRow = new WixSimpleReferenceRow(null, this.tableDefinitions["WixSimpleReference"]);
1679
- wixSimpleReferenceRow.TableName = "Feature";
1671
+ var wixSimpleReferenceRow = new WixSimpleReferenceTuple();
1672
+ wixSimpleReferenceRow.Table = "Feature";
1673
wixSimpleReferenceRow.PrimaryKeys = connection.ChildId;
1674
1682
- Symbol symbol;
1683
- if (!allSymbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out symbol))
1675
+ if (!allSymbols.TryGetValue(wixSimpleReferenceRow.SymbolicName, out var symbol))
1676
{
1677
continue;
1678
}
1679
1688
- Row row = symbol.Row;
1689
- row[1] = connection.PrimaryFeature;
1680
+ var row = symbol.Row;
1681
+ row.Set(1, connection.PrimaryFeature);
1682
}
1683
}
1684
1685
+#if DEAD_CODE
1686
/// <summary>
1687
/// Copies a table's rows to an output table.
1688
/// </summary>
@@ -1731,16 +1724,18 @@ namespace WixToolset
1724
outputTable.Rows.Add(row);
1725
}
1726
}
1727
+#endif
1728
1729
+#if MOVE_TO_BACKEND
1730
/// <summary>
1731
/// Set sequence numbers for all the actions and create rows in the output object.
1732
/// </summary>
1733
/// <param name="actionRows">Collection of actions to schedule.</param>
1734
/// <param name="suppressActionRows">Collection of actions to suppress.</param>
1740
- private void SequenceActions(List<Row> actionRows, List<Row> suppressActionRows)
1735
+ private void SequenceActions(List<IntermediateTuple> actionRows, List<IntermediateTuple> suppressActionRows)
1736
{
1742
- WixActionRowCollection overridableActionRows = new WixActionRowCollection();
1743
- WixActionRowCollection requiredActionRows = new WixActionRowCollection();
1737
+ var overridableActionRows = new WixActionRowCollection();
1738
+ var requiredActionRows = new WixActionRowCollection();
1739
ArrayList scheduledActionRows = new ArrayList();
1740
1741
// gather the required actions for the output type
@@ -2362,6 +2357,7 @@ namespace WixToolset
2357
WixActionRowCollection relatedRows = (after ? parentActionRow.NextActionRows : parentActionRow.PreviousActionRows);
2358
relatedRows.Add(actionRow);
2359
}
2360
+#endif
2361
2362
/// <summary>
2363
/// Resolve features for columns that have null guid placeholders.
@@ -2371,59 +2367,55 @@ namespace WixToolset
2367
/// <param name="featureColumn">Number of the column containing the feature.</param>
2368
/// <param name="connectToFeatures">Connect to feature complex references.</param>
2369
/// <param name="multipleFeatureComponents">Hashtable of known components under multiple features.</param>
2374
- private void ResolveFeatures(IEnumerable<Row> rows, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents)
2370
+ private void ResolveFeatures(IntermediateTuple row, int connectionColumn, int featureColumn, ConnectToFeatureCollection connectToFeatures, Hashtable multipleFeatureComponents)
2371
{
2376
- foreach (Row row in rows)
2372
+ var connectionId = row.AsString(connectionColumn);
2373
+ var featureId = row.AsString(featureColumn);
2374
+
2375
+ if (emptyGuid == featureId)
2376
{
2378
- string connectionId = (string)row[connectionColumn];
2379
- string featureId = (string)row[featureColumn];
2377
+ ConnectToFeature connection = connectToFeatures[connectionId];
2378
2381
- if (emptyGuid == featureId)
2379
+ if (null == connection)
2380
{
2383
- ConnectToFeature connection = connectToFeatures[connectionId];
2384
-
2385
- if (null == connection)
2381
+ // display an error for the component or merge module as approrpriate
2382
+ if (null != multipleFeatureComponents)
2383
{
2387
- // display an error for the component or merge module as approrpriate
2388
- if (null != multipleFeatureComponents)
2389
- {
2390
- this.OnMessage(WixErrors.ComponentExpectedFeature(row.SourceLineNumbers, connectionId, row.Table.Name, row.GetPrimaryKey('/')));
2391
- }
2392
- else
2393
- {
2394
- this.OnMessage(WixErrors.MergeModuleExpectedFeature(row.SourceLineNumbers, connectionId));
2395
- }
2384
+ this.OnMessage(WixErrors.ComponentExpectedFeature(row.SourceLineNumbers, connectionId, row.Definition.Name, row.Id.Id));
2385
}
2386
else
2387
{
2399
- // check for unique, implicit, primary feature parents with multiple possible parent features
2400
- if (this.ShowPedanticMessages &&
2401
- !connection.IsExplicitPrimaryFeature &&
2402
- 0 < connection.ConnectFeatures.Count)
2388
+ this.OnMessage(WixErrors.MergeModuleExpectedFeature(row.SourceLineNumbers, connectionId));
2389
+ }
2390
+ }
2391
+ else
2392
+ {
2393
+ // check for unique, implicit, primary feature parents with multiple possible parent features
2394
+ if (this.ShowPedanticMessages &&
2395
+ !connection.IsExplicitPrimaryFeature &&
2396
+ 0 < connection.ConnectFeatures.Count)
2397
+ {
2398
+ // display a warning for the component or merge module as approrpriate
2399
+ if (null != multipleFeatureComponents)
2400
{
2404
- // display a warning for the component or merge module as approrpriate
2405
- if (null != multipleFeatureComponents)
2401
+ if (!multipleFeatureComponents.Contains(connectionId))
2402
{
2407
- if (!multipleFeatureComponents.Contains(connectionId))
2408
- {
2409
- this.OnMessage(WixWarnings.ImplicitComponentPrimaryFeature(connectionId));
2403
+ this.OnMessage(WixWarnings.ImplicitComponentPrimaryFeature(connectionId));
2404
2411
- // remember this component so only one warning is generated for it
2412
- multipleFeatureComponents[connectionId] = null;
2413
- }
2414
- }
2415
- else
2416
- {
2417
- this.OnMessage(WixWarnings.ImplicitMergeModulePrimaryFeature(connectionId));
2405
+ // remember this component so only one warning is generated for it
2406
+ multipleFeatureComponents[connectionId] = null;
2407
}
2408
}
2420
-
2421
- // set the feature
2422
- row[featureColumn] = connection.PrimaryFeature;
2409
+ else
2410
+ {
2411
+ this.OnMessage(WixWarnings.ImplicitMergeModulePrimaryFeature(connectionId));
2412
+ }
2413
}
2414
+
2415
+ // set the feature
2416
+ row.Set(featureColumn, connection.PrimaryFeature);
2417
}
2418
}
2419
}
2427
-
2420
}
2421
}
src/WixToolset.Core/Localizer.cs
+19
-16
@@ -18,7 +18,7 @@ namespace WixToolset
18
public static readonly XNamespace WxlNamespace = "http://wixtoolset.org/schemas/v4/wxl";
19
private static string XmlElementName = "WixLocalization";
20
21
- private Dictionary<string, WixVariableRow> variables;
21
+ private Dictionary<string, BindVariable> variables;
22
private Dictionary<string, LocalizedControl> localizedControls;
23
24
/// <summary>
@@ -27,7 +27,7 @@ namespace WixToolset
27
public Localizer(IEnumerable<Localization> localizations)
28
{
29
this.Codepage = -1;
30
- this.variables = new Dictionary<string, WixVariableRow>();
30
+ this.variables = new Dictionary<string, BindVariable>();
31
this.localizedControls = new Dictionary<string, LocalizedControl>();
32
33
foreach (var localization in localizations)
@@ -37,9 +37,9 @@ namespace WixToolset
37
this.Codepage = localization.Codepage;
38
}
39
40
- foreach (WixVariableRow wixVariableRow in localization.Variables)
40
+ foreach (var variable in localization.Variables)
41
{
42
- Localizer.AddWixVariable(this.variables, wixVariableRow);
42
+ Localizer.AddWixVariable(this.variables, variable);
43
}
44
45
foreach (KeyValuePair<string, LocalizedControl> localizedControl in localization.LocalizedControls)
@@ -86,7 +86,7 @@ namespace WixToolset
86
/// <param name="tableDefinitions">Collection containing TableDefinitions to use when loading the localization file.</param>
87
/// <param name="suppressSchema">Suppress xml schema validation while loading.</param>
88
/// <returns>Returns the loaded localization file.</returns>
89
- public static Localization ParseLocalizationFile(string path, TableDefinitionCollection tableDefinitions)
89
+ public static Localization ParseLocalizationFile(string path)
90
{
91
XElement root = XDocument.Load(path).Root;
92
Localization localization = null;
@@ -96,7 +96,7 @@ namespace WixToolset
96
{
97
if (Localizer.WxlNamespace == root.Name.Namespace)
98
{
99
- localization = ParseWixLocalizationElement(root, tableDefinitions);
99
+ localization = ParseWixLocalizationElement(root);
100
}
101
else // invalid or missing namespace
102
{
@@ -123,7 +123,7 @@ namespace WixToolset
123
/// </summary>
124
/// <param name="variables">Dictionary of variable rows.</param>
125
/// <param name="wixVariableRow">Row to add to the variables dictionary.</param>
126
- private static void AddWixVariable(IDictionary<string, WixVariableRow> variables, WixVariableRow wixVariableRow)
126
+ private static void AddWixVariable(IDictionary<string, BindVariable> variables, BindVariable wixVariableRow)
127
{
128
if (!variables.TryGetValue(wixVariableRow.Id, out var existingWixVariableRow) || (existingWixVariableRow.Overridable && !wixVariableRow.Overridable))
129
{
@@ -139,7 +139,7 @@ namespace WixToolset
139
/// Parses the WixLocalization element.
140
/// </summary>
141
/// <param name="node">Element to parse.</param>
142
- private static Localization ParseWixLocalizationElement(XElement node, TableDefinitionCollection tableDefinitions)
142
+ private static Localization ParseWixLocalizationElement(XElement node)
143
{
144
int codepage = -1;
145
string culture = null;
@@ -171,7 +171,7 @@ namespace WixToolset
171
}
172
}
173
174
- Dictionary<string, WixVariableRow> variables = new Dictionary<string,WixVariableRow>();
174
+ Dictionary<string, BindVariable> variables = new Dictionary<string, BindVariable>();
175
Dictionary<string, LocalizedControl> localizedControls = new Dictionary<string, LocalizedControl>();
176
177
foreach (XElement child in node.Elements())
@@ -181,7 +181,7 @@ namespace WixToolset
181
switch (child.Name.LocalName)
182
{
183
case "String":
184
- Localizer.ParseString(child, variables, tableDefinitions);
184
+ Localizer.ParseString(child, variables);
185
break;
186
187
case "UI":
@@ -206,7 +206,7 @@ namespace WixToolset
206
/// Parse a localization string into a WixVariableRow.
207
/// </summary>
208
/// <param name="node">Element to parse.</param>
209
- private static void ParseString(XElement node, IDictionary<string, WixVariableRow> variables, TableDefinitionCollection tableDefinitions)
209
+ private static void ParseString(XElement node, IDictionary<string, BindVariable> variables)
210
{
211
string id = null;
212
bool overridable = false;
@@ -251,12 +251,15 @@ namespace WixToolset
251
252
if (!Messaging.Instance.EncounteredError)
253
{
254
- WixVariableRow wixVariableRow = new WixVariableRow(sourceLineNumbers, tableDefinitions["WixVariable"]);
255
- wixVariableRow.Id = id;
256
- wixVariableRow.Overridable = overridable;
257
- wixVariableRow.Value = value;
254
+ var variable = new BindVariable
255
+ {
256
+ SourceLineNumbers = sourceLineNumbers,
257
+ Id = id,
258
+ Overridable = overridable,
259
+ Value = value,
260
+ };
261
259
- Localizer.AddWixVariable(variables, wixVariableRow);
262
+ Localizer.AddWixVariable(variables, variable);
263
}
264
}
265
src/WixToolset.Core/Preprocessor.cs
+2
-22
@@ -38,7 +38,6 @@ namespace WixToolset
38
39
private List<IPreprocessorExtension> extensions;
40
private Dictionary<string, IPreprocessorExtension> extensionsByPrefix;
41
- private List<InspectorExtension> inspectorExtensions;
41
42
private SourceLineNumber currentLineNumber;
43
private Stack<SourceLineNumber> sourceStack;
@@ -60,7 +59,6 @@ namespace WixToolset
59
60
this.extensions = new List<IPreprocessorExtension>();
61
this.extensionsByPrefix = new Dictionary<string, IPreprocessorExtension>();
63
- this.inspectorExtensions = new List<InspectorExtension>();
62
63
this.sourceStack = new Stack<SourceLineNumber>();
64
@@ -201,27 +199,9 @@ namespace WixToolset
199
public XDocument Process(string sourceFile, IDictionary<string, string> variables)
200
{
201
using (Stream sourceStream = new FileStream(sourceFile, FileMode.Open, FileAccess.Read, FileShare.Read))
202
+ using (XmlReader reader = XmlReader.Create(sourceFile, DocumentXmlReaderSettings))
203
{
205
- InspectorCore inspectorCore = new InspectorCore();
206
- foreach (InspectorExtension inspectorExtension in this.inspectorExtensions)
207
- {
208
- inspectorExtension.Core = inspectorCore;
209
- inspectorExtension.InspectSource(sourceStream);
210
-
211
- // reset
212
- inspectorExtension.Core = null;
213
- sourceStream.Position = 0;
214
- }
215
-
216
- if (inspectorCore.EncounteredError)
217
- {
218
- return null;
219
- }
220
-
221
- using (XmlReader reader = XmlReader.Create(sourceFile, DocumentXmlReaderSettings))
222
- {
223
- return Process(reader, variables, sourceFile);
224
- }
204
+ return Process(reader, variables, sourceFile);
205
}
206
}
207
src/WixToolset.Core/TupleDefinitionCreator.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.Core
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using WixToolset.Data;
8
+ using WixToolset.Extensibility;
9
+ using WixToolset.Extensibility.Services;
10
+
11
+ internal class TupleDefinitionCreator : ITupleDefinitionCreator
12
+ {
13
+ public TupleDefinitionCreator(IServiceProvider serviceProvider)
14
+ {
15
+ this.ServiceProvider = serviceProvider;
16
+ }
17
+
18
+ private IServiceProvider ServiceProvider { get; }
19
+
20
+ private IEnumerable<IExtensionData> ExtensionData { get; set; }
21
+
22
+ public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
23
+ {
24
+ tupleDefinition = TupleDefinitions.ByName(name);
25
+
26
+ if (tupleDefinition == null)
27
+ {
28
+ if (this.ExtensionData == null)
29
+ {
30
+ this.LoadExtensionData();
31
+ }
32
+
33
+ foreach (var data in this.ExtensionData)
34
+ {
35
+ if (data.TryGetTupleDefinitionByName(name, out tupleDefinition))
36
+ {
37
+ break;
38
+ }
39
+ }
40
+ }
41
+
42
+ return tupleDefinition != null;
43
+ }
44
+
45
+ private void LoadExtensionData()
46
+ {
47
+ var extensionManager = (IExtensionManager)this.ServiceProvider.GetService(typeof(IExtensionManager));
48
+
49
+ this.ExtensionData = extensionManager.Create<IExtensionData>();
50
+ }
51
+ }
52
+}
src/WixToolset.Core/WindowsInstallerStandard.cs
new
+260
@@ -0,0 +1,260 @@
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.Core
4
+{
5
+ using System.Collections.Generic;
6
+ using WixToolset.Data;
7
+ using WixToolset.Data.Tuples;
8
+
9
+ internal class WindowsInstallerStandard
10
+ {
11
+ private static readonly HashSet<string> standardActionNames = new HashSet<string>
12
+ {
13
+ "AllocateRegistrySpace",
14
+ "AppSearch",
15
+ "BindImage",
16
+ "CCPSearch",
17
+ "CostFinalize",
18
+ "CostInitialize",
19
+ "CreateFolders",
20
+ "CreateShortcuts",
21
+ "DeleteServices",
22
+ "DisableRollback",
23
+ "DuplicateFiles",
24
+ "ExecuteAction",
25
+ "FileCost",
26
+ "FindRelatedProducts",
27
+ "ForceReboot",
28
+ "InstallAdminPackage",
29
+ "InstallExecute",
30
+ "InstallExecuteAgain",
31
+ "InstallFiles",
32
+ "InstallFinalize",
33
+ "InstallInitialize",
34
+ "InstallODBC",
35
+ "InstallServices",
36
+ "InstallSFPCatalogFile",
37
+ "InstallValidate",
38
+ "IsolateComponents",
39
+ "LaunchConditions",
40
+ "MigrateFeatureStates",
41
+ "MoveFiles",
42
+ "MsiConfigureServices",
43
+ "MsiPublishAssemblies",
44
+ "MsiUnpublishAssemblies",
45
+ "PatchFiles",
46
+ "ProcessComponents",
47
+ "PublishComponents",
48
+ "PublishFeatures",
49
+ "PublishProduct",
50
+ "RegisterClassInfo",
51
+ "RegisterComPlus",
52
+ "RegisterExtensionInfo",
53
+ "RegisterFonts",
54
+ "RegisterMIMEInfo",
55
+ "RegisterProduct",
56
+ "RegisterProgIdInfo",
57
+ "RegisterTypeLibraries",
58
+ "RegisterUser",
59
+ "RemoveDuplicateFiles",
60
+ "RemoveEnvironmentStrings",
61
+ "RemoveExistingProducts",
62
+ "RemoveFiles",
63
+ "RemoveFolders",
64
+ "RemoveIniValues",
65
+ "RemoveODBC",
66
+ "RemoveRegistryValues",
67
+ "RemoveShortcuts",
68
+ "ResolveSource",
69
+ "RMCCPSearch",
70
+ "ScheduleReboot",
71
+ "SelfRegModules",
72
+ "SelfUnregModules",
73
+ "SetODBCFolders",
74
+ "StartServices",
75
+ "StopServices",
76
+ "UnpublishComponents",
77
+ "UnpublishFeatures",
78
+ "UnregisterClassInfo",
79
+ "UnregisterComPlus",
80
+ "UnregisterExtensionInfo",
81
+ "UnregisterFonts",
82
+ "UnregisterMIMEInfo",
83
+ "UnregisterProgIdInfo",
84
+ "UnregisterTypeLibraries",
85
+ "ValidateProductID",
86
+ "WriteEnvironmentStrings",
87
+ "WriteIniValues",
88
+ "WriteRegistryValues",
89
+ };
90
+
91
+ private static readonly WixActionTuple[] standardActions = new[]
92
+ {
93
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdminExecuteSequence },
94
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdvtExecuteSequence },
95
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.InstallExecuteSequence },
96
+
97
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallExecute", AccessModifier.Public)) { Action="InstallExecute", Sequence=6500, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" },
98
+
99
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallExecuteAgain", AccessModifier.Public)) { Action="InstallExecuteAgain", Sequence=6550, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" },
100
+
101
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdminExecuteSequence },
102
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdvtExecuteSequence },
103
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.InstallExecuteSequence },
104
+
105
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallFiles", AccessModifier.Public)) { Action="InstallFiles", Sequence=4000, SequenceTable=SequenceTable.AdminExecuteSequence },
106
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallFiles", AccessModifier.Public)) { Action="InstallFiles", Sequence=4000, SequenceTable=SequenceTable.InstallExecuteSequence },
107
+
108
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallAdminPackage", AccessModifier.Public)) { Action="InstallAdminPackage", Sequence=3900, SequenceTable=SequenceTable.AdminExecuteSequence },
109
+
110
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.AdminExecuteSequence },
111
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.InstallExecuteSequence },
112
+ new WixActionTuple(null, new Identifier("InstallUISequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.InstallUISequence },
113
+
114
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdminExecuteSequence },
115
+ new WixActionTuple(null, new Identifier("AdminUISequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdminUISequence },
116
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdvtExecuteSequence },
117
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.InstallExecuteSequence },
118
+ new WixActionTuple(null, new Identifier("InstallUISequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.InstallUISequence },
119
+
120
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdminExecuteSequence },
121
+ new WixActionTuple(null, new Identifier("AdminUISequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdminUISequence },
122
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdvtExecuteSequence },
123
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.InstallExecuteSequence },
124
+ new WixActionTuple(null, new Identifier("InstallUISequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.InstallUISequence },
125
+
126
+ new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdminExecuteSequence },
127
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdvtExecuteSequence },
128
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.InstallExecuteSequence },
129
+
130
+ new WixActionTuple(null, new Identifier("AdminUISequence/ExecuteAction", AccessModifier.Public)) { Action="ExecuteAction", Sequence=1300, SequenceTable=SequenceTable.AdminUISequence },
131
+ new WixActionTuple(null, new Identifier("InstallUISequence/ExecuteAction", AccessModifier.Public)) { Action="ExecuteAction", Sequence=1300, SequenceTable=SequenceTable.InstallUISequence },
132
+
133
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.AdvtExecuteSequence },
134
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.InstallExecuteSequence },
135
+
136
+ new WixActionTuple(null, new Identifier("AdvtExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.AdvtExecuteSequence },
137
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.InstallExecuteSequence },
138
+
139
+ //<action name="PublishComponents" sequence="6200" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
140
+ //<action name="PublishFeatures" sequence="6300" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
141
+ //<action name="PublishProduct" sequence="6400" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
142
+ //<action name="RegisterClassInfo" sequence="4600" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
143
+ //<action name="RegisterExtensionInfo" sequence="4700" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
144
+ //<action name="RegisterMIMEInfo" sequence="4900" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
145
+ //<action name="RegisterProgIdInfo" sequence="4800" AdvtExecuteSequence="yes" InstallExecuteSequence="yes" />
146
+ //<action name="AllocateRegistrySpace" condition="NOT Installed" sequence="1550" InstallExecuteSequence="yes" />
147
+ //<action name="AppSearch" sequence="50" InstallExecuteSequence="yes" InstallUISequence="yes" />
148
+ //<action name="BindImage" sequence="4300" InstallExecuteSequence="yes" />
149
+ //<action name="CreateFolders" sequence="3700" InstallExecuteSequence="yes" />
150
+ //<action name="DuplicateFiles" sequence="4210" InstallExecuteSequence="yes" />
151
+ //<action name="FindRelatedProducts" sequence="25" InstallExecuteSequence="yes" InstallUISequence="yes" />
152
+ //<action name="InstallODBC" sequence="5400" InstallExecuteSequence="yes" />
153
+ //<action name="InstallServices" condition="VersionNT" sequence="5800" InstallExecuteSequence="yes" />
154
+ //<action name="MsiConfigureServices" condition="VersionNT>=600" sequence="5850" InstallExecuteSequence="yes" />
155
+ //<action name="IsolateComponents" sequence="950" InstallExecuteSequence="yes" InstallUISequence="yes" />
156
+ //<action name="LaunchConditions" sequence="100" AdminExecuteSequence="yes" AdminUISequence="yes" InstallExecuteSequence="yes" InstallUISequence="yes" />
157
+ //<action name="MigrateFeatureStates" sequence="1200" InstallExecuteSequence="yes" InstallUISequence="yes" />
158
+ //<action name="MoveFiles" sequence="3800" InstallExecuteSequence="yes" />
159
+ //<action name="PatchFiles" sequence="4090" AdminExecuteSequence="yes" InstallExecuteSequence="yes" />
160
+ //<action name="ProcessComponents" sequence="1600" InstallExecuteSequence="yes" />
161
+ //<action name="RegisterComPlus" sequence="5700" InstallExecuteSequence="yes" />
162
+ //<action name="RegisterFonts" sequence="5300" InstallExecuteSequence="yes" />
163
+ //<action name="RegisterProduct" sequence="6100" InstallExecuteSequence="yes" />
164
+ //<action name="RegisterTypeLibraries" sequence="5500" InstallExecuteSequence="yes" />
165
+ //<action name="RegisterUser" sequence="6000" InstallExecuteSequence="yes" />
166
+ //<action name="RemoveDuplicateFiles" sequence="3400" InstallExecuteSequence="yes" />
167
+ //<action name="RemoveEnvironmentStrings" sequence="3300" InstallExecuteSequence="yes" />
168
+ //<action name="RemoveFiles" sequence="3500" InstallExecuteSequence="yes" />
169
+ //<action name="RemoveFolders" sequence="3600" InstallExecuteSequence="yes" />
170
+ //<action name="RemoveIniValues" sequence="3100" InstallExecuteSequence="yes" />
171
+ //<action name="RemoveODBC" sequence="2400" InstallExecuteSequence="yes" />
172
+ //<action name="RemoveRegistryValues" sequence="2600" InstallExecuteSequence="yes" />
173
+ //<action name="RemoveShortcuts" sequence="3200" InstallExecuteSequence="yes" />
174
+ //<action name="SelfRegModules" sequence="5600" InstallExecuteSequence="yes" />
175
+ //<action name="SelfUnregModules" sequence="2200" InstallExecuteSequence="yes" />
176
+ //<action name="SetODBCFolders" sequence="1100" InstallExecuteSequence="yes" />
177
+
178
+
179
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/CCPSearch", AccessModifier.Public)) { Action="CCPSearch", Sequence=500, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" },
180
+ new WixActionTuple(null, new Identifier("InstallUISequence/CCPSearch", AccessModifier.Public)) { Action="CCPSearch", Sequence=500, SequenceTable=SequenceTable.InstallUISequence, Condition="NOT Installed" },
181
+
182
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/DeleteServices", AccessModifier.Public)) { Action="DeleteServices", Sequence=2000, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" },
183
+
184
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/RMCCPSearch", AccessModifier.Public)) { Action="RMCCPSearch", Sequence=600, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" },
185
+ new WixActionTuple(null, new Identifier("InstallUISequence/RMCCPSearch", AccessModifier.Public)) { Action="RMCCPSearch", Sequence=600, SequenceTable=SequenceTable.InstallUISequence, Condition="NOT Installed" },
186
+
187
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/StartServices", AccessModifier.Public)) { Action="StartServices", Sequence=5900, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" },
188
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/StopServices", AccessModifier.Public)) { Action="StopServices", Sequence=1900, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" },
189
+
190
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/MsiUnpublishAssemblies", AccessModifier.Public)) { Action="MsiUnpublishAssemblies", Sequence=1750, SequenceTable=SequenceTable.InstallExecuteSequence },
191
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnpublishComponents", AccessModifier.Public)) { Action="UnpublishComponents", Sequence=1700, SequenceTable=SequenceTable.InstallExecuteSequence },
192
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnpublishFeatures", AccessModifier.Public)) { Action="UnpublishFeatures", Sequence=1800, SequenceTable=SequenceTable.InstallExecuteSequence },
193
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterClassInfo", AccessModifier.Public)) { Action="UnregisterClassInfo", Sequence=2700, SequenceTable=SequenceTable.InstallExecuteSequence },
194
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterComPlus", AccessModifier.Public)) { Action="UnregisterComPlus", Sequence=2100, SequenceTable=SequenceTable.InstallExecuteSequence },
195
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterExtensionInfo", AccessModifier.Public)) { Action="UnregisterExtensionInfo", Sequence=2800, SequenceTable=SequenceTable.InstallExecuteSequence },
196
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterFonts", AccessModifier.Public)) { Action="UnregisterFonts", Sequence=2500, SequenceTable=SequenceTable.InstallExecuteSequence },
197
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterMIMEInfo", AccessModifier.Public)) { Action="UnregisterMIMEInfo", Sequence=3000, SequenceTable=SequenceTable.InstallExecuteSequence },
198
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterProgIdInfo", AccessModifier.Public)) { Action="UnregisterProgIdInfo", Sequence=2900, SequenceTable=SequenceTable.InstallExecuteSequence },
199
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterTypeLibraries", AccessModifier.Public)) { Action="UnregisterTypeLibraries", Sequence=2300, SequenceTable=SequenceTable.InstallExecuteSequence },
200
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/ValidateProductID", AccessModifier.Public)) { Action="ValidateProductID", Sequence=700, SequenceTable=SequenceTable.InstallExecuteSequence },
201
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/WriteEnvironmentStrings", AccessModifier.Public)) { Action="WriteEnvironmentStrings", Sequence=5200, SequenceTable=SequenceTable.InstallExecuteSequence },
202
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/WriteIniValues", AccessModifier.Public)) { Action="WriteIniValues", Sequence=5100, SequenceTable=SequenceTable.InstallExecuteSequence },
203
+ new WixActionTuple(null, new Identifier("InstallExecuteSequence/WriteRegistryValues", AccessModifier.Public)) { Action="WriteRegistryValues", Sequence=5000, SequenceTable=SequenceTable.InstallExecuteSequence },
204
+ };
205
+
206
+ private static readonly HashSet<string> standardDirectories = new HashSet<string>
207
+ {
208
+ "TARGETDIR",
209
+ "AdminToolsFolder",
210
+ "AppDataFolder",
211
+ "CommonAppDataFolder",
212
+ "CommonFilesFolder",
213
+ "DesktopFolder",
214
+ "FavoritesFolder",
215
+ "FontsFolder",
216
+ "LocalAppDataFolder",
217
+ "MyPicturesFolder",
218
+ "PersonalFolder",
219
+ "ProgramFilesFolder",
220
+ "ProgramMenuFolder",
221
+ "SendToFolder",
222
+ "StartMenuFolder",
223
+ "StartupFolder",
224
+ "System16Folder",
225
+ "SystemFolder",
226
+ "TempFolder",
227
+ "TemplateFolder",
228
+ "WindowsFolder",
229
+ "CommonFiles64Folder",
230
+ "ProgramFiles64Folder",
231
+ "System64Folder",
232
+ "NetHoodFolder",
233
+ "PrintHoodFolder",
234
+ "RecentFolder",
235
+ "WindowsVolume",
236
+ };
237
+
238
+ /// <summary>
239
+ /// Find out if an action is a standard action.
240
+ /// </summary>
241
+ /// <param name="actionName">Name of the action.</param>
242
+ /// <returns>true if the action is standard, false otherwise.</returns>
243
+ public static bool IsStandardAction(string actionName)
244
+ {
245
+ return standardActionNames.Contains(actionName);
246
+ }
247
+
248
+ public static WixActionTuple[] StandardActions() => standardActions;
249
+
250
+ /// <summary>
251
+ /// Find out if a directory is a standard directory.
252
+ /// </summary>
253
+ /// <param name="directoryName">Name of the directory.</param>
254
+ /// <returns>true if the directory is standard, false otherwise.</returns>
255
+ public static bool IsStandardDirectory(string directoryName)
256
+ {
257
+ return standardDirectories.Contains(directoryName);
258
+ }
259
+ }
260
+}
src/WixToolset.Core/WixToolsetServiceProvider.cs
+18
-1
@@ -3,18 +3,30 @@
3
namespace WixToolset.Core
4
{
5
using System;
6
+ using WixToolset.Data;
7
using WixToolset.Extensibility;
8
using WixToolset.Extensibility.Services;
9
10
public class WixToolsetServiceProvider : IServiceProvider
11
{
12
private ExtensionManager extensionManager;
13
+ private TupleDefinitionCreator tupleDefinitionCreator;
14
15
public object GetService(Type serviceType)
16
{
17
if (serviceType == null) throw new ArgumentNullException(nameof(serviceType));
18
19
// Transients.
20
+ if (serviceType == typeof(ICompileContext))
21
+ {
22
+ return new CompileContext(this);
23
+ }
24
+
25
+ if (serviceType == typeof(ILinkContext))
26
+ {
27
+ return new LinkContext(this);
28
+ }
29
+
30
if (serviceType == typeof(IBindContext))
31
{
32
return new BindContext(this);
@@ -38,7 +50,12 @@ namespace WixToolset.Core
50
// Singletons.
51
if (serviceType == typeof(IExtensionManager))
52
{
41
- return extensionManager = extensionManager ?? new ExtensionManager();
53
+ return this.extensionManager = this.extensionManager ?? new ExtensionManager();
54
+ }
55
+
56
+ if (serviceType == typeof(ITupleDefinitionCreator))
57
+ {
58
+ return this.tupleDefinitionCreator = this.tupleDefinitionCreator ?? new TupleDefinitionCreator(this);
59
}
60
61
throw new ArgumentException($"Unknown service type: {serviceType.Name}", nameof(serviceType));
src/WixToolset.Core/WixVariableResolver.cs
+4
-4
@@ -9,7 +9,7 @@ namespace WixToolset.Core
9
using System.Text;
10
using System.Text.RegularExpressions;
11
using WixToolset.Data;
12
- using WixToolset.Data.Rows;
12
+ using WixToolset.Data.Tuples;
13
using WixToolset.Extensibility;
14
15
/// <summary>
@@ -60,17 +60,17 @@ namespace WixToolset.Core
60
/// Add a variable.
61
/// </summary>
62
/// <param name="wixVariableRow">The WixVariableRow to add.</param>
63
- public void AddVariable(WixVariableRow wixVariableRow)
63
+ public void AddVariable(WixVariableTuple wixVariableRow)
64
{
65
try
66
{
67
- this.wixVariables.Add(wixVariableRow.Id, wixVariableRow.Value);
67
+ this.wixVariables.Add(wixVariableRow.WixVariable, wixVariableRow.Value);
68
}
69
catch (ArgumentException)
70
{
71
if (!wixVariableRow.Overridable) // collision
72
{
73
- Messaging.Instance.OnMessage(WixErrors.WixVariableCollision(wixVariableRow.SourceLineNumbers, wixVariableRow.Id));
73
+ Messaging.Instance.OnMessage(WixErrors.WixVariableCollision(wixVariableRow.SourceLineNumbers, wixVariableRow.WixVariable));
74
}
75
}
76
}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/Common.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
+ using System;
6
+ using System.Text.RegularExpressions;
7
+
8
+ internal static class Common
9
+ {
10
+ private static readonly Regex LegalIdentifierCharacters = new Regex(@"^[_A-Za-z][0-9A-Za-z_\.]*$", RegexOptions.Compiled);
11
+
12
+ public static bool IsIdentifier(string value)
13
+ {
14
+ if (!String.IsNullOrEmpty(value))
15
+ {
16
+ if (LegalIdentifierCharacters.IsMatch(value))
17
+ {
18
+ return true;
19
+ }
20
+ }
21
+
22
+ return false;
23
+ }
24
+ }
25
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/Output.cs
new
+342
@@ -0,0 +1,342 @@
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
+ /// <summary>
21
+ /// Creates a new empty output object.
22
+ /// </summary>
23
+ /// <param name="sourceLineNumbers">The source line information for the output.</param>
24
+ public Output(SourceLineNumber sourceLineNumbers)
25
+ {
26
+ this.SourceLineNumbers = sourceLineNumbers;
27
+ this.SubStorages = new List<SubStorage>();
28
+ this.Tables = new TableIndexedCollection();
29
+ }
30
+
31
+ /// <summary>
32
+ /// Gets the type of the output.
33
+ /// </summary>
34
+ /// <value>Type of the output.</value>
35
+ public OutputType Type { get; set; }
36
+
37
+ /// <summary>
38
+ /// Gets or sets the codepage for this output.
39
+ /// </summary>
40
+ /// <value>Codepage of the output.</value>
41
+ public int Codepage { get; set; }
42
+
43
+ /// <summary>
44
+ /// Gets the source line information for this output.
45
+ /// </summary>
46
+ /// <value>The source line information for this output.</value>
47
+ public SourceLineNumber SourceLineNumbers { get; private set; }
48
+
49
+ /// <summary>
50
+ /// Gets the substorages in this output.
51
+ /// </summary>
52
+ /// <value>The substorages in this output.</value>
53
+ public ICollection<SubStorage> SubStorages { get; private set; }
54
+
55
+ /// <summary>
56
+ /// Gets the tables contained in this output.
57
+ /// </summary>
58
+ /// <value>Collection of tables.</value>
59
+ public TableIndexedCollection Tables { get; private set; }
60
+
61
+ /// <summary>
62
+ /// Gets the output type corresponding to a given output filename extension.
63
+ /// </summary>
64
+ /// <param name="extension">Case-insensitive output filename extension.</param>
65
+ /// <returns>Output type for the extension.</returns>
66
+ public static OutputType GetOutputType(string extension)
67
+ {
68
+ if (extension.Equals(".exe", StringComparison.OrdinalIgnoreCase))
69
+ {
70
+ return OutputType.Bundle;
71
+ }
72
+ if (extension.Equals(".msi", StringComparison.OrdinalIgnoreCase))
73
+ {
74
+ return OutputType.Product;
75
+ }
76
+ else if (extension.Equals(".msm", StringComparison.OrdinalIgnoreCase))
77
+ {
78
+ return OutputType.Module;
79
+ }
80
+ else if (extension.Equals(".msp", StringComparison.OrdinalIgnoreCase))
81
+ {
82
+ return OutputType.Patch;
83
+ }
84
+ else if (extension.Equals(".mst", StringComparison.OrdinalIgnoreCase))
85
+ {
86
+ return OutputType.Transform;
87
+ }
88
+ else if (extension.Equals(".pcp", StringComparison.OrdinalIgnoreCase))
89
+ {
90
+ return OutputType.PatchCreation;
91
+ }
92
+ else
93
+ {
94
+ return OutputType.Unknown;
95
+ }
96
+ }
97
+
98
+ /// <summary>
99
+ /// Gets the filename extension corresponding to a given output type.
100
+ /// </summary>
101
+ /// <param name="type">One of the WiX output types.</param>
102
+ /// <returns>Filename extension for the output type, for example ".msi".</returns>
103
+ public static string GetExtension(OutputType type)
104
+ {
105
+ switch (type)
106
+ {
107
+ case OutputType.Bundle:
108
+ return ".exe";
109
+ case OutputType.Product:
110
+ return ".msi";
111
+ case OutputType.Module:
112
+ return ".msm";
113
+ case OutputType.Patch:
114
+ return ".msp";
115
+ case OutputType.Transform:
116
+ return ".mst";
117
+ case OutputType.PatchCreation:
118
+ return ".pcp";
119
+ default:
120
+ return ".wix";
121
+ }
122
+ }
123
+
124
+ /// <summary>
125
+ /// Loads an output from a path on disk.
126
+ /// </summary>
127
+ /// <param name="path">Path to output file saved on disk.</param>
128
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
129
+ /// <returns>Output object.</returns>
130
+ public static Output Load(string path, bool suppressVersionCheck)
131
+ {
132
+ using (FileStream stream = File.OpenRead(path))
133
+ using (FileStructure fs = FileStructure.Read(stream))
134
+ {
135
+ if (FileFormat.Wixout != fs.FileFormat)
136
+ {
137
+ throw new WixUnexpectedFileFormatException(path, FileFormat.Wixout, fs.FileFormat);
138
+ }
139
+
140
+ Uri uri = new Uri(Path.GetFullPath(path));
141
+ using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri))
142
+ {
143
+ try
144
+ {
145
+ reader.MoveToContent();
146
+ return Output.Read(reader, suppressVersionCheck);
147
+ }
148
+ catch (XmlException xe)
149
+ {
150
+ throw new WixCorruptFileException(path, fs.FileFormat, xe);
151
+ }
152
+ }
153
+ }
154
+ }
155
+
156
+ /// <summary>
157
+ /// Saves an output to a path on disk.
158
+ /// </summary>
159
+ /// <param name="path">Path to save output file to on disk.</param>
160
+ public void Save(string path)
161
+ {
162
+ Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path)));
163
+
164
+ using (FileStream stream = File.Create(path))
165
+ using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixout, null))
166
+ using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream()))
167
+ {
168
+ writer.WriteStartDocument();
169
+ this.Write(writer);
170
+ writer.WriteEndDocument();
171
+ }
172
+ }
173
+
174
+ /// <summary>
175
+ /// Processes an XmlReader and builds up the output object.
176
+ /// </summary>
177
+ /// <param name="reader">Reader to get data from.</param>
178
+ /// <param name="suppressVersionCheck">Suppresses wix.dll version mismatch check.</param>
179
+ /// <returns>The Output represented by the Xml.</returns>
180
+ internal static Output Read(XmlReader reader, bool suppressVersionCheck)
181
+ {
182
+ if (!reader.LocalName.Equals("wixOutput"))
183
+ {
184
+ throw new XmlException();
185
+ }
186
+
187
+ bool empty = reader.IsEmptyElement;
188
+ Output output = new Output(SourceLineNumber.CreateFromUri(reader.BaseURI));
189
+ SectionType sectionType = SectionType.Unknown;
190
+ Version version = null;
191
+
192
+ while (reader.MoveToNextAttribute())
193
+ {
194
+ switch (reader.LocalName)
195
+ {
196
+ case "codepage":
197
+ output.Codepage = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture.NumberFormat);
198
+ break;
199
+ case "type":
200
+ switch (reader.Value)
201
+ {
202
+ case "Bundle":
203
+ output.Type = OutputType.Bundle;
204
+ sectionType = SectionType.Bundle;
205
+ break;
206
+ case "Module":
207
+ output.Type = OutputType.Module;
208
+ sectionType = SectionType.Module;
209
+ break;
210
+ case "Patch":
211
+ output.Type = OutputType.Patch;
212
+ break;
213
+ case "PatchCreation":
214
+ output.Type = OutputType.PatchCreation;
215
+ sectionType = SectionType.PatchCreation;
216
+ break;
217
+ case "Product":
218
+ output.Type = OutputType.Product;
219
+ sectionType = SectionType.Product;
220
+ break;
221
+ case "Transform":
222
+ output.Type = OutputType.Transform;
223
+ break;
224
+ default:
225
+ throw new XmlException();
226
+ }
227
+ break;
228
+ case "version":
229
+ version = new Version(reader.Value);
230
+ break;
231
+ }
232
+ }
233
+
234
+ if (!suppressVersionCheck && null != version && !Output.CurrentVersion.Equals(version))
235
+ {
236
+ throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixOutput", version.ToString(), Output.CurrentVersion.ToString()));
237
+ }
238
+
239
+ // loop through the rest of the xml building up the Output object
240
+ TableDefinitionCollection tableDefinitions = null;
241
+ List<Table> tables = new List<Table>();
242
+ if (!empty)
243
+ {
244
+ bool done = false;
245
+
246
+ // loop through all the fields in a row
247
+ while (!done && reader.Read())
248
+ {
249
+ switch (reader.NodeType)
250
+ {
251
+ case XmlNodeType.Element:
252
+ switch (reader.LocalName)
253
+ {
254
+ case "subStorage":
255
+ output.SubStorages.Add(SubStorage.Read(reader));
256
+ break;
257
+ case "table":
258
+ if (null == tableDefinitions)
259
+ {
260
+ throw new XmlException();
261
+ }
262
+ tables.Add(Table.Read(reader, tableDefinitions));
263
+ break;
264
+ case "tableDefinitions":
265
+ tableDefinitions = TableDefinitionCollection.Read(reader);
266
+ break;
267
+ default:
268
+ throw new XmlException();
269
+ }
270
+ break;
271
+ case XmlNodeType.EndElement:
272
+ done = true;
273
+ break;
274
+ }
275
+ }
276
+
277
+ if (!done)
278
+ {
279
+ throw new XmlException();
280
+ }
281
+ }
282
+
283
+ output.Tables = new TableIndexedCollection(tables);
284
+ return output;
285
+ }
286
+
287
+ /// <summary>
288
+ /// Ensure this output contains a particular table.
289
+ /// </summary>
290
+ /// <param name="tableDefinition">Definition of the table that should exist.</param>
291
+ /// <param name="section">Optional section to use for the table. If one is not provided, the entry section will be used.</param>
292
+ /// <returns>The table in this output.</returns>
293
+ public Table EnsureTable(TableDefinition tableDefinition)
294
+ {
295
+ if (!this.Tables.TryGetTable(tableDefinition.Name, out Table table))
296
+ {
297
+ table = new Table(tableDefinition);
298
+ this.Tables.Add(table);
299
+ }
300
+
301
+ return table;
302
+ }
303
+
304
+ /// <summary>
305
+ /// Persists an output in an XML format.
306
+ /// </summary>
307
+ /// <param name="writer">XmlWriter where the Output should persist itself as XML.</param>
308
+ internal void Write(XmlWriter writer)
309
+ {
310
+ writer.WriteStartElement("wixOutput", XmlNamespaceUri);
311
+
312
+ writer.WriteAttributeString("type", this.Type.ToString());
313
+
314
+ if (0 != this.Codepage)
315
+ {
316
+ writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture));
317
+ }
318
+
319
+ writer.WriteAttributeString("version", Output.CurrentVersion.ToString());
320
+
321
+ // Collect all the table definitions and write them.
322
+ TableDefinitionCollection tableDefinitions = new TableDefinitionCollection();
323
+ foreach (Table table in this.Tables)
324
+ {
325
+ tableDefinitions.Add(table.Definition);
326
+ }
327
+ tableDefinitions.Write(writer);
328
+
329
+ foreach (Table table in this.Tables.OrderBy(t => t.Name))
330
+ {
331
+ table.Write(writer);
332
+ }
333
+
334
+ foreach (SubStorage subStorage in this.SubStorages)
335
+ {
336
+ subStorage.Write(writer);
337
+ }
338
+
339
+ writer.WriteEndElement();
340
+ }
341
+ }
342
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/Row.cs
new
+620
@@ -0,0 +1,620 @@
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 or sets the SectionId property on the row.
90
+ /// </summary>
91
+ /// <value>The SectionId property on the row.</value>
92
+ public string SectionId { get; set; }
93
+
94
+ /// <summary>
95
+ /// Gets the source file and line number for the row.
96
+ /// </summary>
97
+ /// <value>Source file and line number.</value>
98
+ public SourceLineNumber SourceLineNumbers { get; private set; }
99
+
100
+ /// <summary>
101
+ /// Gets the table this row belongs to.
102
+ /// </summary>
103
+ /// <value>null if Row does not belong to a Table, or owner Table otherwise.</value>
104
+ public Table Table { get; private set; }
105
+
106
+ /// <summary>
107
+ /// Gets the table definition for this row.
108
+ /// </summary>
109
+ /// <remarks>A Row always has a TableDefinition, even if the Row does not belong to a Table.</remarks>
110
+ /// <value>TableDefinition for Row.</value>
111
+ public TableDefinition TableDefinition { get; private set; }
112
+
113
+ /// <summary>
114
+ /// Gets the fields contained by this row.
115
+ /// </summary>
116
+ /// <value>Array of field objects</value>
117
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
118
+ public Field[] Fields
119
+ {
120
+ get { return this.fields; }
121
+ }
122
+
123
+ /// <summary>
124
+ /// Gets the unique number for the row.
125
+ /// </summary>
126
+ /// <value>Number for row.</value>
127
+ public long Number { get; private set; }
128
+
129
+ /// <summary>
130
+ /// Gets or sets the value of a particular field in the row.
131
+ /// </summary>
132
+ /// <param name="field">field index.</param>
133
+ /// <value>Value of a field in the row.</value>
134
+ public object this[int field]
135
+ {
136
+ get { return this.fields[field].Data; }
137
+ set { this.fields[field].Data = value; }
138
+ }
139
+
140
+ /// <summary>
141
+ /// Gets the field as an integer.
142
+ /// </summary>
143
+ /// <returns>Field's data as an integer.</returns>
144
+ public int FieldAsInteger(int field)
145
+ {
146
+ return this.fields[field].AsInteger();
147
+ }
148
+
149
+ /// <summary>
150
+ /// Gets the field as an integer that could be null.
151
+ /// </summary>
152
+ /// <returns>Field's data as an integer that could be null.</returns>
153
+ public int? FieldAsNullableInteger(int field)
154
+ {
155
+ return this.fields[field].AsNullableInteger();
156
+ }
157
+
158
+ /// <summary>
159
+ /// Gets the field as a string.
160
+ /// </summary>
161
+ /// <returns>Field's data as a string.</returns>
162
+ public string FieldAsString(int field)
163
+ {
164
+ return this.fields[field].AsString();
165
+ }
166
+
167
+ /// <summary>
168
+ /// Sets the value of a particular field in the row without validating.
169
+ /// </summary>
170
+ /// <param name="field">field index.</param>
171
+ /// <param name="value">Value of a field in the row.</param>
172
+ /// <returns>True if successful, false if validation failed.</returns>
173
+ public bool BestEffortSetField(int field, object value)
174
+ {
175
+ return this.fields[field].BestEffortSet(value);
176
+ }
177
+
178
+ /// <summary>
179
+ /// Get the value used to represent the row in a keyed row collection.
180
+ /// </summary>
181
+ /// <returns>Primary key or row number if no primary key is available.</returns>
182
+ public string GetKey()
183
+ {
184
+ return this.GetPrimaryKey() ?? Convert.ToString(this.Number, CultureInfo.InvariantCulture);
185
+ }
186
+
187
+ /// <summary>
188
+ /// Get the primary key of this row.
189
+ /// </summary>
190
+ /// <param name="delimiter">Delimiter character for multiple column primary keys.</param>
191
+ /// <returns>The primary key or null if the row's table has no primary key columns.</returns>
192
+ public string GetPrimaryKey(char delimiter = '/')
193
+ {
194
+ return this.GetPrimaryKey(delimiter, String.Empty);
195
+ }
196
+
197
+ /// <summary>
198
+ /// Get the primary key of this row.
199
+ /// </summary>
200
+ /// <param name="delimiter">Delimiter character for multiple column primary keys.</param>
201
+ /// <param name="nullReplacement">String to represent null values in the primary key.</param>
202
+ /// <returns>The primary key or null if the row's table has no primary key columns.</returns>
203
+ public string GetPrimaryKey(char delimiter, string nullReplacement)
204
+ {
205
+ bool foundPrimaryKey = false;
206
+ StringBuilder primaryKey = new StringBuilder();
207
+
208
+ foreach (Field field in this.fields)
209
+ {
210
+ if (field.Column.PrimaryKey)
211
+ {
212
+ if (foundPrimaryKey)
213
+ {
214
+ primaryKey.Append(delimiter);
215
+ }
216
+
217
+ primaryKey.Append((null == field.Data) ? nullReplacement : Convert.ToString(field.Data, CultureInfo.InvariantCulture));
218
+
219
+ foundPrimaryKey = true;
220
+ }
221
+ else // primary keys must be the first columns of a row so the first non-primary key means we can stop looking.
222
+ {
223
+ break;
224
+ }
225
+ }
226
+
227
+ return foundPrimaryKey ? primaryKey.ToString() : null;
228
+ }
229
+
230
+ /// <summary>
231
+ /// Returns true if the specified field is null or an empty string.
232
+ /// </summary>
233
+ /// <param name="field">Index of the field to check.</param>
234
+ /// <returns>true if the specified field is null or an empty string, false otherwise.</returns>
235
+ public bool IsColumnEmpty(int field)
236
+ {
237
+ if (null == this.fields[field].Data)
238
+ {
239
+ return true;
240
+ }
241
+
242
+ string dataString = this.fields[field].Data as string;
243
+ if (null != dataString && 0 == dataString.Length)
244
+ {
245
+ return true;
246
+ }
247
+
248
+ return false;
249
+ }
250
+
251
+ /// <summary>
252
+ /// Tests if the passed in row is identical.
253
+ /// </summary>
254
+ /// <param name="row">Row to compare against.</param>
255
+ /// <returns>True if two rows are identical.</returns>
256
+ public bool IsIdentical(Row row)
257
+ {
258
+ bool identical = (this.TableDefinition.Name == row.TableDefinition.Name && this.fields.Length == row.fields.Length);
259
+
260
+ for (int i = 0; identical && i < this.fields.Length; ++i)
261
+ {
262
+ if (!(this.fields[i].IsIdentical(row.fields[i])))
263
+ {
264
+ identical = false;
265
+ }
266
+ }
267
+
268
+ return identical;
269
+ }
270
+
271
+ /// <summary>
272
+ /// Returns a string representation of the Row.
273
+ /// </summary>
274
+ /// <returns>A string representation of the Row.</returns>
275
+ public override string ToString()
276
+ {
277
+ return String.Join("/", (object[])this.fields);
278
+ }
279
+
280
+ /// <summary>
281
+ /// Creates a Row from the XmlReader.
282
+ /// </summary>
283
+ /// <param name="reader">Reader to get data from.</param>
284
+ /// <param name="table">Table for this row.</param>
285
+ /// <returns>New row object.</returns>
286
+ internal static Row Read(XmlReader reader, Table table)
287
+ {
288
+ Debug.Assert("row" == reader.LocalName);
289
+
290
+ bool empty = reader.IsEmptyElement;
291
+ AccessModifier access = AccessModifier.Public;
292
+ RowOperation operation = RowOperation.None;
293
+ bool redundant = false;
294
+ string sectionId = null;
295
+ SourceLineNumber sourceLineNumbers = null;
296
+
297
+ while (reader.MoveToNextAttribute())
298
+ {
299
+ switch (reader.LocalName)
300
+ {
301
+ case "access":
302
+ access = (AccessModifier)Enum.Parse(typeof(AccessModifier), reader.Value, true);
303
+ break;
304
+ case "op":
305
+ operation = (RowOperation)Enum.Parse(typeof(RowOperation), reader.Value, true);
306
+ break;
307
+ case "redundant":
308
+ redundant = reader.Value.Equals("yes");
309
+ break;
310
+ case "sectionId":
311
+ sectionId = reader.Value;
312
+ break;
313
+ case "sourceLineNumber":
314
+ sourceLineNumbers = SourceLineNumber.CreateFromEncoded(reader.Value);
315
+ break;
316
+ }
317
+ }
318
+
319
+ Row row = table.CreateRow(sourceLineNumbers);
320
+ row.Access = access;
321
+ row.Operation = operation;
322
+ row.Redundant = redundant;
323
+ row.SectionId = sectionId;
324
+
325
+ // loop through all the fields in a row
326
+ if (!empty)
327
+ {
328
+ bool done = false;
329
+ int field = 0;
330
+
331
+ // loop through all the fields in a row
332
+ while (!done && reader.Read())
333
+ {
334
+ switch (reader.NodeType)
335
+ {
336
+ case XmlNodeType.Element:
337
+ switch (reader.LocalName)
338
+ {
339
+ case "field":
340
+ if (row.Fields.Length <= field)
341
+ {
342
+ if (!reader.IsEmptyElement)
343
+ {
344
+ throw new XmlException();
345
+ }
346
+ }
347
+ else
348
+ {
349
+ row.fields[field].Read(reader);
350
+ }
351
+ ++field;
352
+ break;
353
+ default:
354
+ throw new XmlException();
355
+ }
356
+ break;
357
+ case XmlNodeType.EndElement:
358
+ done = true;
359
+ break;
360
+ }
361
+ }
362
+
363
+ if (!done)
364
+ {
365
+ throw new XmlException();
366
+ }
367
+ }
368
+
369
+ return row;
370
+ }
371
+
372
+ /// <summary>
373
+ /// Returns the row in a format usable in IDT files.
374
+ /// </summary>
375
+ /// <param name="keepAddedColumns">Whether to keep columns added in a transform.</param>
376
+ /// <returns>String with tab delimited field values.</returns>
377
+ internal string ToIdtDefinition(bool keepAddedColumns)
378
+ {
379
+ bool first = true;
380
+ StringBuilder sb = new StringBuilder();
381
+
382
+ foreach (Field field in this.fields)
383
+ {
384
+ // Conditionally keep columns added in a transform; otherwise,
385
+ // break because columns can only be added at the end.
386
+ if (field.Column.Added && !keepAddedColumns)
387
+ {
388
+ break;
389
+ }
390
+
391
+ if (first)
392
+ {
393
+ first = false;
394
+ }
395
+ else
396
+ {
397
+ sb.Append('\t');
398
+ }
399
+
400
+ sb.Append(field.ToIdtValue());
401
+ }
402
+ sb.Append("\r\n");
403
+
404
+ return sb.ToString();
405
+ }
406
+
407
+ /// <summary>
408
+ /// Gets the modularized version of the field data.
409
+ /// </summary>
410
+ /// <param name="field">The field to modularize.</param>
411
+ /// <param name="modularizationGuid">String containing the GUID of the Merge Module to append the the field value, if appropriate.</param>
412
+ /// <param name="suppressModularizationIdentifiers">Optional collection of identifiers that should not be modularized.</param>
413
+ /// <remarks>moduleGuid is expected to be null when not being used to compile a Merge Module.</remarks>
414
+ /// <returns>The modularized version of the field data.</returns>
415
+ internal string GetModularizedValue(Field field, string modularizationGuid, ISet<string> suppressModularizationIdentifiers)
416
+ {
417
+ Debug.Assert(null != field.Data && 0 < ((string)field.Data).Length);
418
+ string fieldData = Convert.ToString(field.Data, CultureInfo.InvariantCulture);
419
+
420
+ if (null != modularizationGuid && ColumnModularizeType.None != field.Column.ModularizeType && !(WindowsInstallerStandard.IsStandardAction(fieldData) || WindowsInstallerStandard.IsStandardProperty(fieldData)))
421
+ {
422
+ StringBuilder sb;
423
+ int start;
424
+ ColumnModularizeType modularizeType = field.Column.ModularizeType;
425
+
426
+ // special logic for the ControlEvent table's Argument column
427
+ // this column requires different modularization methods depending upon the value of the Event column
428
+ if (ColumnModularizeType.ControlEventArgument == field.Column.ModularizeType)
429
+ {
430
+ switch (this[2].ToString())
431
+ {
432
+ case "CheckExistingTargetPath": // redirectable property name
433
+ case "CheckTargetPath":
434
+ case "DoAction": // custom action name
435
+ case "NewDialog": // dialog name
436
+ case "SelectionBrowse":
437
+ case "SetTargetPath":
438
+ case "SpawnDialog":
439
+ case "SpawnWaitDialog":
440
+ if (Common.IsIdentifier(fieldData))
441
+ {
442
+ modularizeType = ColumnModularizeType.Column;
443
+ }
444
+ else
445
+ {
446
+ modularizeType = ColumnModularizeType.Property;
447
+ }
448
+ break;
449
+ default: // formatted
450
+ modularizeType = ColumnModularizeType.Property;
451
+ break;
452
+ }
453
+ }
454
+ else if (ColumnModularizeType.ControlText == field.Column.ModularizeType)
455
+ {
456
+ // icons are stored in the Binary table, so they get column-type modularization
457
+ if (("Bitmap" == this[2].ToString() || "Icon" == this[2].ToString()) && Common.IsIdentifier(fieldData))
458
+ {
459
+ modularizeType = ColumnModularizeType.Column;
460
+ }
461
+ else
462
+ {
463
+ modularizeType = ColumnModularizeType.Property;
464
+ }
465
+ }
466
+
467
+ switch (modularizeType)
468
+ {
469
+ case ColumnModularizeType.Column:
470
+ // ensure the value is an identifier (otherwise it shouldn't be modularized this way)
471
+ if (!Common.IsIdentifier(fieldData))
472
+ {
473
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotModularizeIllegalID, fieldData));
474
+ }
475
+
476
+ // if we're not supposed to suppress modularization of this identifier
477
+ if (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData))
478
+ {
479
+ fieldData = String.Concat(fieldData, ".", modularizationGuid);
480
+ }
481
+ break;
482
+
483
+ case ColumnModularizeType.Property:
484
+ case ColumnModularizeType.Condition:
485
+ Regex regex;
486
+ if (ColumnModularizeType.Property == modularizeType)
487
+ {
488
+ regex = new Regex(@"\[(?<identifier>[#$!]?[a-zA-Z_][a-zA-Z0-9_\.]*)]", RegexOptions.Singleline | RegexOptions.ExplicitCapture);
489
+ }
490
+ else
491
+ {
492
+ Debug.Assert(ColumnModularizeType.Condition == modularizeType);
493
+
494
+ // This heinous looking regular expression is actually quite an elegant way
495
+ // to shred the entire condition into the identifiers that need to be
496
+ // modularized. Let's break it down piece by piece:
497
+ //
498
+ // 1. Look for the operators: NOT, EQV, XOR, OR, AND, IMP (plus a space). Note that the
499
+ // regular expression is case insensitive so we don't have to worry about
500
+ // all the permutations of these strings.
501
+ // 2. Look for quoted strings. Quoted strings are just text and are ignored
502
+ // outright.
503
+ // 3. Look for environment variables. These look like identifiers we might
504
+ // otherwise be interested in but start with a percent sign. Like quoted
505
+ // strings these enviroment variable references are ignored outright.
506
+ // 4. Match all identifiers that are things that need to be modularized. Note
507
+ // the special characters (!, $, ?, &) that denote Component and Feature states.
508
+ 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);
509
+
510
+ // less performant version of the above with captures showing where everything lives
511
+ // 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);
512
+ }
513
+
514
+ MatchCollection matches = regex.Matches(fieldData);
515
+
516
+ sb = new StringBuilder(fieldData);
517
+
518
+ // notice how this code walks backward through the list
519
+ // because it modifies the string as we through it
520
+ for (int i = matches.Count - 1; 0 <= i; i--)
521
+ {
522
+ Group group = matches[i].Groups["identifier"];
523
+ if (group.Success)
524
+ {
525
+ string identifier = group.Value;
526
+ if (!WindowsInstallerStandard.IsStandardProperty(identifier) && (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(identifier)))
527
+ {
528
+ sb.Insert(group.Index + group.Length, '.');
529
+ sb.Insert(group.Index + group.Length + 1, modularizationGuid);
530
+ }
531
+ }
532
+ }
533
+
534
+ fieldData = sb.ToString();
535
+ break;
536
+
537
+ case ColumnModularizeType.CompanionFile:
538
+ // if we're not supposed to ignore this identifier and the value does not start with
539
+ // a digit, we must have a companion file so modularize it
540
+ if ((null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData)) &&
541
+ 0 < fieldData.Length && !Char.IsDigit(fieldData, 0))
542
+ {
543
+ fieldData = String.Concat(fieldData, ".", modularizationGuid);
544
+ }
545
+ break;
546
+
547
+ case ColumnModularizeType.Icon:
548
+ if (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData))
549
+ {
550
+ start = fieldData.LastIndexOf(".", StringComparison.Ordinal);
551
+ if (-1 == start)
552
+ {
553
+ fieldData = String.Concat(fieldData, ".", modularizationGuid);
554
+ }
555
+ else
556
+ {
557
+ fieldData = String.Concat(fieldData.Substring(0, start), ".", modularizationGuid, fieldData.Substring(start));
558
+ }
559
+ }
560
+ break;
561
+
562
+ case ColumnModularizeType.SemicolonDelimited:
563
+ string[] keys = fieldData.Split(';');
564
+ for (int i = 0; i < keys.Length; ++i)
565
+ {
566
+ keys[i] = String.Concat(keys[i], ".", modularizationGuid);
567
+ }
568
+ fieldData = String.Join(";", keys);
569
+ break;
570
+ }
571
+ }
572
+
573
+ return fieldData;
574
+ }
575
+
576
+ /// <summary>
577
+ /// Persists a row in an XML format.
578
+ /// </summary>
579
+ /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param>
580
+ [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " +
581
+ "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. " +
582
+ "Furthermore, there is no security hole here, as the strings won't need to make a round trip")]
583
+ internal void Write(XmlWriter writer)
584
+ {
585
+ writer.WriteStartElement("row", Intermediate.XmlNamespaceUri);
586
+
587
+ if (AccessModifier.Public != this.Access)
588
+ {
589
+ writer.WriteAttributeString("access", this.Access.ToString().ToLowerInvariant());
590
+ }
591
+
592
+ if (RowOperation.None != this.Operation)
593
+ {
594
+ writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant());
595
+ }
596
+
597
+ if (this.Redundant)
598
+ {
599
+ writer.WriteAttributeString("redundant", "yes");
600
+ }
601
+
602
+ if (null != this.SectionId)
603
+ {
604
+ writer.WriteAttributeString("sectionId", this.SectionId);
605
+ }
606
+
607
+ if (null != this.SourceLineNumbers)
608
+ {
609
+ writer.WriteAttributeString("sourceLineNumber", this.SourceLineNumbers.GetEncoded());
610
+ }
611
+
612
+ for (int i = 0; i < this.fields.Length; ++i)
613
+ {
614
+ this.fields[i].Write(writer);
615
+ }
616
+
617
+ writer.WriteEndElement();
618
+ }
619
+ }
620
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/Rows/WixBundleExePackageRow.cs
new
+103
@@ -0,0 +1,103 @@
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 WixToolset.Data.Tuples;
4
+
5
+namespace WixToolset.Data.Rows
6
+{
7
+ /// <summary>
8
+ /// Specialization of a row for the WixBundleExePackage table.
9
+ /// </summary>
10
+ public sealed class WixBundleExePackageRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixBundleExePackage row that does not belong to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17
+ public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixBundleExePackageRow row that belongs to a table.
24
+ /// </summary>
25
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27
+ public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
34
+ /// </summary>
35
+ public string ChainPackageId
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 raw Exe attributes of a patch.
43
+ /// </summary>
44
+ public WixBundleExePackageAttributes Attributes
45
+ {
46
+ get { return (WixBundleExePackageAttributes)this.Fields[1].Data; }
47
+ set { this.Fields[1].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the protcol for the executable package.
52
+ /// </summary>
53
+ public string DetectCondition
54
+ {
55
+ get { return (string)this.Fields[2].Data; }
56
+ set { this.Fields[2].Data = value; }
57
+ }
58
+
59
+ /// <summary>
60
+ /// Gets or sets the install command for the executable package.
61
+ /// </summary>
62
+ public string InstallCommand
63
+ {
64
+ get { return (string)this.Fields[3].Data; }
65
+ set { this.Fields[3].Data = value; }
66
+ }
67
+
68
+ /// <summary>
69
+ /// Gets or sets the repair command for the executable package.
70
+ /// </summary>
71
+ public string RepairCommand
72
+ {
73
+ get { return (string)this.Fields[4].Data; }
74
+ set { this.Fields[4].Data = value; }
75
+ }
76
+
77
+ /// <summary>
78
+ /// Gets or sets the uninstall command for the executable package.
79
+ /// </summary>
80
+ public string UninstallCommand
81
+ {
82
+ get { return (string)this.Fields[5].Data; }
83
+ set { this.Fields[5].Data = value; }
84
+ }
85
+
86
+ /// <summary>
87
+ /// Gets or sets the protcol for the executable package.
88
+ /// </summary>
89
+ public string ExeProtocol
90
+ {
91
+ get { return (string)this.Fields[6].Data; }
92
+ set { this.Fields[6].Data = value; }
93
+ }
94
+
95
+ /// <summary>
96
+ /// Gets whether the executable package is repairable.
97
+ /// </summary>
98
+ public bool Repairable
99
+ {
100
+ get { return 0 != (this.Attributes & WixBundleExePackageAttributes.Repairable); }
101
+ }
102
+ }
103
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/Rows/WixBundleMsiPackageRow.cs
new
+138
@@ -0,0 +1,138 @@
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 WixToolset.Data.Tuples;
8
+
9
+ /// <summary>
10
+ /// Specialization of a row for the WixBundleMsiPackage table.
11
+ /// </summary>
12
+ public sealed class WixBundleMsiPackageRow : Row
13
+ {
14
+ /// <summary>
15
+ /// Creates a WixBundleMsiPackage row that does not belong to a table.
16
+ /// </summary>
17
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
18
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
19
+ public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
20
+ base(sourceLineNumbers, tableDef)
21
+ {
22
+ }
23
+
24
+ /// <summary>
25
+ /// Creates a WixBundleMsiPackageRow row that belongs to a table.
26
+ /// </summary>
27
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
28
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
29
+ public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, Table table) :
30
+ base(sourceLineNumbers, table)
31
+ {
32
+ }
33
+
34
+ /// <summary>
35
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
36
+ /// </summary>
37
+ public string ChainPackageId
38
+ {
39
+ get { return (string)this.Fields[0].Data; }
40
+ set { this.Fields[0].Data = value; }
41
+ }
42
+
43
+ /// <summary>
44
+ /// Gets or sets the raw MSI attributes of a package.
45
+ /// </summary>
46
+ public WixBundleMsiPackageAttributes Attributes
47
+ {
48
+ get { return (WixBundleMsiPackageAttributes)this.Fields[1].Data; }
49
+ set { this.Fields[1].Data = value; }
50
+ }
51
+
52
+ /// <summary>
53
+ /// Gets or sets the MSI package's product code.
54
+ /// </summary>
55
+ public string ProductCode
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 MSI package's upgrade code.
63
+ /// </summary>
64
+ public string UpgradeCode
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 product version of the MSI package.
72
+ /// </summary>
73
+ public string ProductVersion
74
+ {
75
+ get { return (string)this.Fields[4].Data; }
76
+ set { this.Fields[4].Data = value; }
77
+ }
78
+
79
+ /// <summary>
80
+ /// Gets or sets the language of the MSI package.
81
+ /// </summary>
82
+ public int ProductLanguage
83
+ {
84
+ get { return Convert.ToInt32(this.Fields[5].Data, CultureInfo.InvariantCulture); }
85
+ set { this.Fields[5].Data = value; }
86
+ }
87
+
88
+ /// <summary>
89
+ /// Gets or sets the product name of the MSI package.
90
+ /// </summary>
91
+ public string ProductName
92
+ {
93
+ get { return (string)this.Fields[6].Data; }
94
+ set { this.Fields[6].Data = value; }
95
+ }
96
+
97
+ /// <summary>
98
+ /// Gets or sets the MSI package's manufacturer.
99
+ /// </summary>
100
+ public string Manufacturer
101
+ {
102
+ get { return (string)this.Fields[7].Data; }
103
+ set { this.Fields[7].Data = value; }
104
+ }
105
+
106
+ /// <summary>
107
+ /// Gets the display internal UI of a package.
108
+ /// </summary>
109
+ public bool DisplayInternalUI
110
+ {
111
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.DisplayInternalUI); }
112
+ }
113
+
114
+ /// <summary>
115
+ /// Gets the display internal UI of a package.
116
+ /// </summary>
117
+ public bool EnableFeatureSelection
118
+ {
119
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.EnableFeatureSelection); }
120
+ }
121
+
122
+ /// <summary>
123
+ /// Gets the display internal UI of a package.
124
+ /// </summary>
125
+ public bool ForcePerMachine
126
+ {
127
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.ForcePerMachine); }
128
+ }
129
+
130
+ /// <summary>
131
+ /// Gets the suppress loose file payload generation of a package.
132
+ /// </summary>
133
+ public bool SuppressLooseFilePayloadGeneration
134
+ {
135
+ get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.SuppressLooseFilePayloadGeneration); }
136
+ }
137
+ }
138
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/Rows/WixBundleMspPackageRow.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
+using WixToolset.Data.Tuples;
4
+
5
+namespace WixToolset.Data.Rows
6
+{
7
+ /// <summary>
8
+ /// Specialization of a row for the ChainMspPackage table.
9
+ /// </summary>
10
+ public sealed class WixBundleMspPackageRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a ChainMspPackage row that does not belong to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17
+ public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixBundleMspPackage row that belongs to a table.
24
+ /// </summary>
25
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27
+ public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
34
+ /// </summary>
35
+ public string ChainPackageId
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 raw MSP attributes of a patch.
43
+ /// </summary>
44
+ public WixBundleMspPackageAttributes Attributes
45
+ {
46
+ get { return (WixBundleMspPackageAttributes)this.Fields[1].Data; }
47
+ set { this.Fields[1].Data = value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the patch code.
52
+ /// </summary>
53
+ public string PatchCode
54
+ {
55
+ get { return (string)this.Fields[2].Data; }
56
+ set { this.Fields[2].Data = value; }
57
+ }
58
+
59
+ /// <summary>
60
+ /// Gets or sets the patch's manufacturer.
61
+ /// </summary>
62
+ public string Manufacturer
63
+ {
64
+ get { return (string)this.Fields[3].Data; }
65
+ set { this.Fields[3].Data = value; }
66
+ }
67
+
68
+ /// <summary>
69
+ /// Gets or sets the patch's xml.
70
+ /// </summary>
71
+ public string PatchXml
72
+ {
73
+ get { return (string)this.Fields[4].Data; }
74
+ set { this.Fields[4].Data = value; }
75
+ }
76
+
77
+ /// <summary>
78
+ /// Gets the display internal UI of a patch.
79
+ /// </summary>
80
+ public bool DisplayInternalUI
81
+ {
82
+ get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.DisplayInternalUI); }
83
+ }
84
+
85
+ /// <summary>
86
+ /// Gets whether to slipstream the patch.
87
+ /// </summary>
88
+ public bool Slipstream
89
+ {
90
+ get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.Slipstream); }
91
+ }
92
+
93
+ /// <summary>
94
+ /// Gets whether the patch targets an unspecified number of packages.
95
+ /// </summary>
96
+ public bool TargetUnspecified
97
+ {
98
+ get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.TargetUnspecified); }
99
+ }
100
+ }
101
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/Rows/WixBundlePackageExitCodeRow.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
+using WixToolset.Data.Tuples;
4
+
5
+namespace WixToolset.Data.Rows
6
+{
7
+ /// <summary>
8
+ /// Specialization of a row for the ExitCode table.
9
+ /// </summary>
10
+ public class WixBundlePackageExitCodeRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a ExitCodeRow 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 Media row belongs to and should get its column definitions from.</param>
17
+ public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a ExitCodeRow 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 Media row belongs to and should get its column definitions from.</param>
27
+ public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the foreign key identifier to the ChainPackage row.
34
+ /// </summary>
35
+ public string ChainPackageId
36
+ {
37
+ get { return (string)this.Fields[0].Data; }
38
+ set { this.Fields[0].Data = value; }
39
+ }
40
+
41
+ public int? Code
42
+ {
43
+ get { return (null == this.Fields[1].Data) ? (int?)null : (int?)this.Fields[1].Data; }
44
+ set { this.Fields[1].Data = value; }
45
+ }
46
+
47
+ public ExitCodeBehaviorType Behavior
48
+ {
49
+ get { return (ExitCodeBehaviorType)this.Fields[2].Data; }
50
+ set { this.Fields[2].Data = (int)value; }
51
+ }
52
+ }
53
+}
src/WixToolset.Data.WindowsInstaller/Rows/WixBundlePackageRow.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
+using WixToolset.Data.Tuples;
4
+
5
+namespace WixToolset.Data.Rows
6
+{
7
+ /// <summary>
8
+ /// Specialization of a row for the WixBundlePackage table.
9
+ /// </summary>
10
+ public sealed class WixBundlePackageRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixBundlePackage row that does not belong to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17
+ public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixBundlePackage row that belongs to a table.
24
+ /// </summary>
25
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27
+ public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the foreign key to the WixChainItem.
34
+ /// </summary>
35
+ public string WixChainItemId
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 item type.
43
+ /// </summary>
44
+ public WixBundlePackageType Type
45
+ {
46
+ get { return (WixBundlePackageType)this.Fields[1].Data; }
47
+ set { this.Fields[1].Data = (int)value; }
48
+ }
49
+
50
+ /// <summary>
51
+ /// Gets or sets the indentifier of the package's payload.
52
+ /// </summary>
53
+ public string PackagePayload
54
+ {
55
+ get { return (string)this.Fields[2].Data; }
56
+ set { this.Fields[2].Data = value; }
57
+ }
58
+
59
+ /// <summary>
60
+ /// Gets or sets the raw attributes of a package.
61
+ /// </summary>
62
+ public WixBundlePackageAttributes Attributes
63
+ {
64
+ get { return (WixBundlePackageAttributes)this.Fields[3].Data; }
65
+ set { this.Fields[3].Data = value; }
66
+ }
67
+
68
+ /// <summary>
69
+ /// Gets or sets the install condition of the package.
70
+ /// </summary>
71
+ public string InstallCondition
72
+ {
73
+ get { return (string)this.Fields[4].Data; }
74
+ set { this.Fields[4].Data = value; }
75
+ }
76
+
77
+ /// <summary>
78
+ /// Gets or sets the language of the package.
79
+ /// </summary>
80
+ public YesNoAlwaysType Cache
81
+ {
82
+ get { return (null == this.Fields[5].Data) ? YesNoAlwaysType.NotSet : (YesNoAlwaysType)this.Fields[5].Data; }
83
+ set { this.Fields[5].Data = (int)value; }
84
+ }
85
+
86
+ /// <summary>
87
+ /// Gets or sets the indentifier of the package's cache.
88
+ /// </summary>
89
+ public string CacheId
90
+ {
91
+ get { return (string)this.Fields[6].Data; }
92
+ set { this.Fields[6].Data = value; }
93
+ }
94
+
95
+ /// <summary>
96
+ /// Gets or sets whether the package is vital.
97
+ /// </summary>
98
+ public YesNoType Vital
99
+ {
100
+ get { return (null == this.Fields[7].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[7].Data; }
101
+ set { this.Fields[7].Data = (int)value; }
102
+ }
103
+
104
+ /// <summary>
105
+ /// Gets or sets whether the package is per-machine.
106
+ /// </summary>
107
+ public YesNoDefaultType PerMachine
108
+ {
109
+ get { return (null == this.Fields[8].Data) ? YesNoDefaultType.NotSet : (YesNoDefaultType)this.Fields[8].Data; }
110
+ set { this.Fields[8].Data = (int)value; }
111
+ }
112
+
113
+ /// <summary>
114
+ /// Gets or sets the variable that points to the log for the package.
115
+ /// </summary>
116
+ public string LogPathVariable
117
+ {
118
+ get { return (string)this.Fields[9].Data; }
119
+ set { this.Fields[9].Data = value; }
120
+ }
121
+
122
+ /// <summary>
123
+ /// Gets or sets the variable that points to the rollback log for the package.
124
+ /// </summary>
125
+ public string RollbackLogPathVariable
126
+ {
127
+ get { return (string)this.Fields[10].Data; }
128
+ set { this.Fields[10].Data = value; }
129
+ }
130
+
131
+ /// <summary>
132
+ /// Gets or sets the size of the package.
133
+ /// </summary>
134
+ public long Size
135
+ {
136
+ get { return (long)this.Fields[11].Data; }
137
+ set { this.Fields[11].Data = value; }
138
+ }
139
+
140
+ /// <summary>
141
+ /// Gets or sets the install size of the package.
142
+ /// </summary>
143
+ public long? InstallSize
144
+ {
145
+ get { return (long?)this.Fields[12].Data; }
146
+ set { this.Fields[12].Data = value; }
147
+ }
148
+
149
+ /// <summary>
150
+ /// Gets or sets the version of the package.
151
+ /// </summary>
152
+ public string Version
153
+ {
154
+ get { return (string)this.Fields[13].Data; }
155
+ set { this.Fields[13].Data = value; }
156
+ }
157
+
158
+ /// <summary>
159
+ /// Gets or sets the language of the package.
160
+ /// </summary>
161
+ public int Language
162
+ {
163
+ get { return (int)this.Fields[14].Data; }
164
+ set { this.Fields[14].Data = value; }
165
+ }
166
+
167
+ /// <summary>
168
+ /// Gets or sets the display name of the package.
169
+ /// </summary>
170
+ public string DisplayName
171
+ {
172
+ get { return (string)this.Fields[15].Data; }
173
+ set { this.Fields[15].Data = value; }
174
+ }
175
+
176
+ /// <summary>
177
+ /// Gets or sets the description of the package.
178
+ /// </summary>
179
+ public string Description
180
+ {
181
+ get { return (string)this.Fields[16].Data; }
182
+ set { this.Fields[16].Data = value; }
183
+ }
184
+
185
+ /// <summary>
186
+ /// Gets or sets the rollback boundary identifier for the package.
187
+ /// </summary>
188
+ public string RollbackBoundary
189
+ {
190
+ get { return (string)this.Fields[17].Data; }
191
+ set { this.Fields[17].Data = value; }
192
+ }
193
+
194
+ /// <summary>
195
+ /// Gets or sets the backward rollback boundary identifier for the package.
196
+ /// </summary>
197
+ public string RollbackBoundaryBackward
198
+ {
199
+ get { return (string)this.Fields[18].Data; }
200
+ set { this.Fields[18].Data = value; }
201
+ }
202
+
203
+ /// <summary>
204
+ /// Gets or sets whether the package is x64.
205
+ /// </summary>
206
+ public YesNoType x64
207
+ {
208
+ get { return (null == this.Fields[19].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[19].Data; }
209
+ set { this.Fields[19].Data = (int)value; }
210
+ }
211
+
212
+ /// <summary>
213
+ /// Gets whether the package is permanent.
214
+ /// </summary>
215
+ public bool Permanent
216
+ {
217
+ get { return 0 != (this.Attributes & WixBundlePackageAttributes.Permanent); }
218
+ }
219
+
220
+ /// <summary>
221
+ /// Gets whether the package is visible.
222
+ /// </summary>
223
+ public bool Visible
224
+ {
225
+ get { return 0 != (this.Attributes & WixBundlePackageAttributes.Visible); }
226
+ }
227
+ }
228
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/Rows/WixChainRow.cs
new
+65
@@ -0,0 +1,65 @@
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 WixToolset.Data.Tuples;
4
+
5
+namespace WixToolset.Data.Rows
6
+{
7
+ /// <summary>
8
+ /// Specialization of a row for the WixChain table.
9
+ /// </summary>
10
+ public sealed class WixChainRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixChain row that does not belong to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17
+ public WixChainRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixChainRow row that belongs to a table.
24
+ /// </summary>
25
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27
+ public WixChainRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the raw chain attributes.
34
+ /// </summary>
35
+ public WixChainAttributes Attributes
36
+ {
37
+ get { return (WixChainAttributes)this.Fields[0].Data; }
38
+ set { this.Fields[0].Data = value; }
39
+ }
40
+
41
+ /// <summary>
42
+ /// Gets the disable rollback state of a chain.
43
+ /// </summary>
44
+ public bool DisableRollback
45
+ {
46
+ get { return 0 != (this.Attributes & WixChainAttributes.DisableRollback); }
47
+ }
48
+
49
+ /// <summary>
50
+ /// Gets disable system restore state of a chain.
51
+ /// </summary>
52
+ public bool DisableSystemRestore
53
+ {
54
+ get { return 0 != (this.Attributes & WixChainAttributes.DisableSystemRestore); }
55
+ }
56
+
57
+ /// <summary>
58
+ /// Gets parallel cache of a chain.
59
+ /// </summary>
60
+ public bool ParallelCache
61
+ {
62
+ get { return 0 != (this.Attributes & WixChainAttributes.ParallelCache); }
63
+ }
64
+ }
65
+}
src/WixToolset.Data.WindowsInstaller/Rows/WixComplexReferenceRow.cs
new
+204
@@ -0,0 +1,204 @@
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
+ var other = obj as WixComplexReferenceRow ?? throw new ArgumentNullException(nameof(obj));
147
+
148
+ int comparison = this.ChildType - other.ChildType;
149
+ if (0 == comparison)
150
+ {
151
+ comparison = String.Compare(this.ChildId, other.ChildId, StringComparison.Ordinal);
152
+ if (0 == comparison)
153
+ {
154
+ comparison = this.ParentType - other.ParentType;
155
+ if (0 == comparison)
156
+ {
157
+ string thisParentLanguage = null == this.ParentLanguage ? String.Empty : this.ParentLanguage;
158
+ string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage;
159
+ comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal);
160
+ if (0 == comparison)
161
+ {
162
+ comparison = String.Compare(this.ParentId, other.ParentId, StringComparison.Ordinal);
163
+ }
164
+ }
165
+ }
166
+ }
167
+
168
+ return comparison;
169
+ }
170
+
171
+ /// <summary>
172
+ /// Creates a shallow copy of the ComplexReference.
173
+ /// </summary>
174
+ /// <returns>A shallow copy of the ComplexReference.</returns>
175
+ public WixComplexReferenceRow Clone()
176
+ {
177
+ WixComplexReferenceRow wixComplexReferenceRow = new WixComplexReferenceRow(this.SourceLineNumbers, this.Table);
178
+ wixComplexReferenceRow.ParentType = this.ParentType;
179
+ wixComplexReferenceRow.ParentId = this.ParentId;
180
+ wixComplexReferenceRow.ParentLanguage = this.ParentLanguage;
181
+ wixComplexReferenceRow.ChildType = this.ChildType;
182
+ wixComplexReferenceRow.ChildId = this.ChildId;
183
+ wixComplexReferenceRow.IsPrimary = this.IsPrimary;
184
+
185
+ return wixComplexReferenceRow;
186
+ }
187
+
188
+ /// <summary>
189
+ /// Changes all of the parent references to point to the passed in parent reference.
190
+ /// </summary>
191
+ /// <param name="parent">New parent complex reference.</param>
192
+ public void Reparent(WixComplexReferenceRow parent)
193
+ {
194
+ this.ParentId = parent.ParentId;
195
+ this.ParentLanguage = parent.ParentLanguage;
196
+ this.ParentType = parent.ParentType;
197
+
198
+ if (!this.IsPrimary)
199
+ {
200
+ this.IsPrimary = parent.IsPrimary;
201
+ }
202
+ }
203
+ }
204
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/Rows/WixFileRow.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
+using WixToolset.Data.Tuples;
4
+
5
+namespace WixToolset.Data.Rows
6
+{
7
+ /// <summary>
8
+ /// Specialization of a row for the WixFile table.
9
+ /// </summary>
10
+ public sealed class WixFileRow : Row
11
+ {
12
+ /// <summary>
13
+ /// Creates a WixFile row that does not belong to a table.
14
+ /// </summary>
15
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16
+ /// <param name="tableDef">TableDefinition this row belongs to and should get its column definitions from.</param>
17
+ public WixFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) :
18
+ base(sourceLineNumbers, tableDef)
19
+ {
20
+ }
21
+
22
+ /// <summary>
23
+ /// Creates a WixFile row that belongs to a table.
24
+ /// </summary>
25
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
26
+ /// <param name="table">Table this row belongs to and should get its column definitions from.</param>
27
+ public WixFileRow(SourceLineNumber sourceLineNumbers, Table table) :
28
+ base(sourceLineNumbers, table)
29
+ {
30
+ }
31
+
32
+ /// <summary>
33
+ /// Gets or sets the primary key of the file row.
34
+ /// </summary>
35
+ /// <value>Primary key of the file row.</value>
36
+ public string File
37
+ {
38
+ get { return (string)this.Fields[0].Data; }
39
+ set { this.Fields[0].Data = value; }
40
+ }
41
+
42
+ /// <summary>
43
+ /// Gets or sets the assembly type of the file row.
44
+ /// </summary>
45
+ /// <value>Assembly type of the file row.</value>
46
+ public FileAssemblyType AssemblyType
47
+ {
48
+ get { return (null == this.Fields[1]) ? FileAssemblyType.NotAnAssembly : (FileAssemblyType)this.Fields[1].AsInteger(); }
49
+ set { this.Fields[1].Data = (int)value; }
50
+ }
51
+
52
+ /// <summary>
53
+ /// Gets or sets the identifier for the assembly manifest.
54
+ /// </summary>
55
+ /// <value>Identifier for the assembly manifest.</value>
56
+ public string AssemblyManifest
57
+ {
58
+ get { return (string)this.Fields[2].Data; }
59
+ set { this.Fields[2].Data = value; }
60
+ }
61
+
62
+ /// <summary>
63
+ /// Gets or sets the application for the assembly.
64
+ /// </summary>
65
+ /// <value>Application for the assembly.</value>
66
+ public string AssemblyApplication
67
+ {
68
+ get { return (string)this.Fields[3].Data; }
69
+ set { this.Fields[3].Data = value; }
70
+ }
71
+
72
+ /// <summary>
73
+ /// Gets or sets the directory of the file.
74
+ /// </summary>
75
+ /// <value>Directory of the file.</value>
76
+ public string Directory
77
+ {
78
+ get { return (string)this.Fields[4].Data; }
79
+ set { this.Fields[4].Data = value; }
80
+ }
81
+
82
+ /// <summary>
83
+ /// Gets or sets the disk id for this file.
84
+ /// </summary>
85
+ /// <value>Disk id for the file.</value>
86
+ public int DiskId
87
+ {
88
+ get { return (int)this.Fields[5].Data; }
89
+ set { this.Fields[5].Data = value; }
90
+ }
91
+
92
+ /// <summary>
93
+ /// Gets or sets the source location to the file.
94
+ /// </summary>
95
+ /// <value>Source location to the file.</value>
96
+ public string Source
97
+ {
98
+ get { return (string)this.Fields[6].Data; }
99
+ set { this.Fields[6].Data = value; }
100
+ }
101
+
102
+ /// <summary>
103
+ /// Gets or sets the source location to the file.
104
+ /// </summary>
105
+ /// <value>Source location to the file.</value>
106
+ public string PreviousSource
107
+ {
108
+ get { return (string)this.Fields[6].PreviousData; }
109
+ set { this.Fields[6].PreviousData = value; }
110
+ }
111
+
112
+ /// <summary>
113
+ /// Gets or sets the architecture the file executes on.
114
+ /// </summary>
115
+ /// <value>Architecture the file executes on.</value>
116
+ public string ProcessorArchitecture
117
+ {
118
+ get { return (string)this.Fields[7].Data; }
119
+ set { this.Fields[7].Data = value; }
120
+ }
121
+
122
+ /// <summary>
123
+ /// Gets or sets the patch group of a patch-added file.
124
+ /// </summary>
125
+ /// <value>The patch group of a patch-added file.</value>
126
+ public int PatchGroup
127
+ {
128
+ get { return (null == this.Fields[8].Data) ? 0 : (int)this.Fields[8].Data; }
129
+ set { this.Fields[8].Data = value; }
130
+ }
131
+
132
+ /// <summary>
133
+ /// Gets or sets the attributes on a file.
134
+ /// </summary>
135
+ /// <value>Attributes on a file.</value>
136
+ public int Attributes
137
+ {
138
+ get { return (int)this.Fields[9].Data; }
139
+ set { this.Fields[9].Data = value; }
140
+ }
141
+
142
+ /// <summary>
143
+ /// Gets or sets the patching attributes to the file.
144
+ /// </summary>
145
+ /// <value>Patching attributes of the file.</value>
146
+ public PatchAttributeType PatchAttributes
147
+ {
148
+ get { return (PatchAttributeType)this.Fields[10].AsInteger(); }
149
+ set { this.Fields[10].Data = (int)value; }
150
+ }
151
+
152
+ /// <summary>
153
+ /// Gets or sets the path to the delta patch header.
154
+ /// </summary>
155
+ /// <value>Patch header path.</value>
156
+ /// <remarks>Set by the binder only when doing delta patching.</remarks>
157
+ public string DeltaPatchHeaderSource
158
+ {
159
+ get { return (string)this.Fields[11].Data; }
160
+ set { this.Fields[11].Data = value; }
161
+ }
162
+ }
163
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/Table.cs
new
+435
@@ -0,0 +1,435 @@
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(TableDefinition tableDefinition)
26
+ {
27
+ this.Definition = tableDefinition;
28
+ this.Rows = new List<Row>();
29
+ }
30
+
31
+ /// <summary>
32
+ /// Gets the table definition.
33
+ /// </summary>
34
+ /// <value>Definition of the table.</value>
35
+ public TableDefinition Definition { get; private set; }
36
+
37
+ /// <summary>
38
+ /// Gets the name of the table.
39
+ /// </summary>
40
+ /// <value>Name of the table.</value>
41
+ public string Name
42
+ {
43
+ get { return this.Definition.Name; }
44
+ }
45
+
46
+ /// <summary>
47
+ /// Gets or sets the table transform operation.
48
+ /// </summary>
49
+ /// <value>The table transform operation.</value>
50
+ public TableOperation Operation { get; set; }
51
+
52
+ /// <summary>
53
+ /// Gets the rows contained in the table.
54
+ /// </summary>
55
+ /// <value>Rows contained in the table.</value>
56
+ public IList<Row> Rows { get; private set; }
57
+
58
+ /// <summary>
59
+ /// Creates a new row in the table.
60
+ /// </summary>
61
+ /// <param name="sourceLineNumbers">Original source lines for this row.</param>
62
+ /// <param name="add">Specifies whether to only create the row or add it to the table automatically.</param>
63
+ /// <returns>Row created in table.</returns>
64
+ public Row CreateRow(SourceLineNumber sourceLineNumbers, bool add = true)
65
+ {
66
+ Row row;
67
+
68
+ switch (this.Name)
69
+ {
70
+ case "BBControl":
71
+ row = new BBControlRow(sourceLineNumbers, this);
72
+ break;
73
+ case "WixBundlePackage":
74
+ row = new WixBundlePackageRow(sourceLineNumbers, this);
75
+ break;
76
+ case "WixBundleExePackage":
77
+ row = new WixBundleExePackageRow(sourceLineNumbers, this);
78
+ break;
79
+ case "WixBundleMsiPackage":
80
+ row = new WixBundleMsiPackageRow(sourceLineNumbers, this);
81
+ break;
82
+ case "WixBundleMspPackage":
83
+ row = new WixBundleMspPackageRow(sourceLineNumbers, this);
84
+ break;
85
+ case "WixBundleMsuPackage":
86
+ row = new WixBundleMsuPackageRow(sourceLineNumbers, this);
87
+ break;
88
+ case "Component":
89
+ row = new ComponentRow(sourceLineNumbers, this);
90
+ break;
91
+ case "WixBundleContainer":
92
+ row = new WixBundleContainerRow(sourceLineNumbers, this);
93
+ break;
94
+ case "Control":
95
+ row = new ControlRow(sourceLineNumbers, this);
96
+ break;
97
+ case "File":
98
+ row = new FileRow(sourceLineNumbers, this);
99
+ break;
100
+ case "WixBundleMsiFeature":
101
+ row = new WixBundleMsiFeatureRow(sourceLineNumbers, this);
102
+ break;
103
+ case "WixBundleMsiProperty":
104
+ row = new WixBundleMsiPropertyRow(sourceLineNumbers, this);
105
+ break;
106
+ case "Media":
107
+ row = new MediaRow(sourceLineNumbers, this);
108
+ break;
109
+ case "WixBundlePayload":
110
+ row = new WixBundlePayloadRow(sourceLineNumbers, this);
111
+ break;
112
+ case "Property":
113
+ row = new PropertyRow(sourceLineNumbers, this);
114
+ break;
115
+ case "WixRelatedBundle":
116
+ row = new WixRelatedBundleRow(sourceLineNumbers, this);
117
+ break;
118
+ case "WixBundleRelatedPackage":
119
+ row = new WixBundleRelatedPackageRow(sourceLineNumbers, this);
120
+ break;
121
+ case "WixBundleRollbackBoundary":
122
+ row = new WixBundleRollbackBoundaryRow(sourceLineNumbers, this);
123
+ break;
124
+ case "Upgrade":
125
+ row = new UpgradeRow(sourceLineNumbers, this);
126
+ break;
127
+ case "WixBundleVariable":
128
+ row = new WixBundleVariableRow(sourceLineNumbers, this);
129
+ break;
130
+ case "WixAction":
131
+ row = new WixActionRow(sourceLineNumbers, this);
132
+ break;
133
+ case "WixApprovedExeForElevation":
134
+ row = new WixApprovedExeForElevationRow(sourceLineNumbers, this);
135
+ break;
136
+ case "WixBundle":
137
+ row = new WixBundleRow(sourceLineNumbers, this);
138
+ break;
139
+ case "WixBundlePackageExitCode":
140
+ row = new WixBundlePackageExitCodeRow(sourceLineNumbers, this);
141
+ break;
142
+ case "WixBundlePatchTargetCode":
143
+ row = new WixBundlePatchTargetCodeRow(sourceLineNumbers, this);
144
+ break;
145
+ case "WixBundleSlipstreamMsp":
146
+ row = new WixBundleSlipstreamMspRow(sourceLineNumbers, this);
147
+ break;
148
+ case "WixBundleUpdate":
149
+ row = new WixBundleUpdateRow(sourceLineNumbers, this);
150
+ break;
151
+ case "WixBundleCatalog":
152
+ row = new WixBundleCatalogRow(sourceLineNumbers, this);
153
+ break;
154
+ case "WixChain":
155
+ row = new WixChainRow(sourceLineNumbers, this);
156
+ break;
157
+ case "WixChainItem":
158
+ row = new WixChainItemRow(sourceLineNumbers, this);
159
+ break;
160
+ case "WixBundlePackageCommandLine":
161
+ row = new WixBundlePackageCommandLineRow(sourceLineNumbers, this);
162
+ break;
163
+ case "WixComplexReference":
164
+ row = new WixComplexReferenceRow(sourceLineNumbers, this);
165
+ break;
166
+ case "WixDeltaPatchFile":
167
+ row = new WixDeltaPatchFileRow(sourceLineNumbers, this);
168
+ break;
169
+ case "WixDeltaPatchSymbolPaths":
170
+ row = new WixDeltaPatchSymbolPathsRow(sourceLineNumbers, this);
171
+ break;
172
+ case "WixFile":
173
+ row = new WixFileRow(sourceLineNumbers, this);
174
+ break;
175
+ case "WixGroup":
176
+ row = new WixGroupRow(sourceLineNumbers, this);
177
+ break;
178
+ case "WixMedia":
179
+ row = new WixMediaRow(sourceLineNumbers, this);
180
+ break;
181
+ case "WixMediaTemplate":
182
+ row = new WixMediaTemplateRow(sourceLineNumbers, this);
183
+ break;
184
+ case "WixMerge":
185
+ row = new WixMergeRow(sourceLineNumbers, this);
186
+ break;
187
+ case "WixPayloadProperties":
188
+ row = new WixPayloadPropertiesRow(sourceLineNumbers, this);
189
+ break;
190
+ case "WixProperty":
191
+ row = new WixPropertyRow(sourceLineNumbers, this);
192
+ break;
193
+ case "WixSimpleReference":
194
+ row = new WixSimpleReferenceRow(sourceLineNumbers, this);
195
+ break;
196
+ case "WixUpdateRegistration":
197
+ row = new WixUpdateRegistrationRow(sourceLineNumbers, this);
198
+ break;
199
+
200
+ default:
201
+ row = new Row(sourceLineNumbers, this);
202
+ break;
203
+ }
204
+
205
+ if (add)
206
+ {
207
+ this.Rows.Add(row);
208
+ }
209
+
210
+ return row;
211
+ }
212
+
213
+ /// <summary>
214
+ /// Parse a table from the xml.
215
+ /// </summary>
216
+ /// <param name="reader">XmlReader where the intermediate is persisted.</param>
217
+ /// <param name="section">Section to populate with persisted data.</param>
218
+ /// <param name="tableDefinitions">TableDefinitions to use in the intermediate.</param>
219
+ /// <returns>The parsed table.</returns>
220
+ internal static Table Read(XmlReader reader, TableDefinitionCollection tableDefinitions)
221
+ {
222
+ Debug.Assert("table" == reader.LocalName);
223
+
224
+ bool empty = reader.IsEmptyElement;
225
+ TableOperation operation = TableOperation.None;
226
+ string name = null;
227
+
228
+ while (reader.MoveToNextAttribute())
229
+ {
230
+ switch (reader.LocalName)
231
+ {
232
+ case "name":
233
+ name = reader.Value;
234
+ break;
235
+ case "op":
236
+ switch (reader.Value)
237
+ {
238
+ case "add":
239
+ operation = TableOperation.Add;
240
+ break;
241
+ case "drop":
242
+ operation = TableOperation.Drop;
243
+ break;
244
+ default:
245
+ throw new XmlException();
246
+ }
247
+ break;
248
+ }
249
+ }
250
+
251
+ if (null == name)
252
+ {
253
+ throw new XmlException();
254
+ }
255
+
256
+ TableDefinition tableDefinition = tableDefinitions[name];
257
+ Table table = new Table(tableDefinition);
258
+ table.Operation = operation;
259
+
260
+ if (!empty)
261
+ {
262
+ bool done = false;
263
+
264
+ // loop through all the rows in a table
265
+ while (!done && reader.Read())
266
+ {
267
+ switch (reader.NodeType)
268
+ {
269
+ case XmlNodeType.Element:
270
+ switch (reader.LocalName)
271
+ {
272
+ case "row":
273
+ Row.Read(reader, table);
274
+ break;
275
+ default:
276
+ throw new XmlException();
277
+ }
278
+ break;
279
+ case XmlNodeType.EndElement:
280
+ done = true;
281
+ break;
282
+ }
283
+ }
284
+
285
+ if (!done)
286
+ {
287
+ throw new XmlException();
288
+ }
289
+ }
290
+
291
+ return table;
292
+ }
293
+
294
+ /// <summary>
295
+ /// Modularize the table.
296
+ /// </summary>
297
+ /// <param name="modularizationGuid">String containing the GUID of the Merge Module, if appropriate.</param>
298
+ /// <param name="suppressModularizationIdentifiers">Optional collection of identifiers that should not be modularized.</param>
299
+ public void Modularize(string modularizationGuid, ISet<string> suppressModularizationIdentifiers)
300
+ {
301
+ List<int> modularizedColumns = new List<int>();
302
+
303
+ // find the modularized columns
304
+ for (int i = 0; i < this.Definition.Columns.Count; i++)
305
+ {
306
+ if (ColumnModularizeType.None != this.Definition.Columns[i].ModularizeType)
307
+ {
308
+ modularizedColumns.Add(i);
309
+ }
310
+ }
311
+
312
+ if (0 < modularizedColumns.Count)
313
+ {
314
+ foreach (Row row in this.Rows)
315
+ {
316
+ foreach (int modularizedColumn in modularizedColumns)
317
+ {
318
+ Field field = row.Fields[modularizedColumn];
319
+
320
+ if (null != field.Data)
321
+ {
322
+ field.Data = row.GetModularizedValue(field, modularizationGuid, suppressModularizationIdentifiers);
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }
328
+
329
+ /// <summary>
330
+ /// Persists a row in an XML format.
331
+ /// </summary>
332
+ /// <param name="writer">XmlWriter where the Row should persist itself as XML.</param>
333
+ [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " +
334
+ "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. " +
335
+ "Furthermore, there is no security hole here, as the strings won't need to make a round trip")]
336
+ internal void Write(XmlWriter writer)
337
+ {
338
+ if (null == writer)
339
+ {
340
+ throw new ArgumentNullException("writer");
341
+ }
342
+
343
+ writer.WriteStartElement("table", Intermediate.XmlNamespaceUri);
344
+ writer.WriteAttributeString("name", this.Name);
345
+
346
+ if (TableOperation.None != this.Operation)
347
+ {
348
+ writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant());
349
+ }
350
+
351
+ foreach (Row row in this.Rows)
352
+ {
353
+ row.Write(writer);
354
+ }
355
+
356
+ writer.WriteEndElement();
357
+ }
358
+
359
+ /// <summary>
360
+ /// Writes the table in IDT format to the provided stream.
361
+ /// </summary>
362
+ /// <param name="writer">Stream to write the table to.</param>
363
+ /// <param name="keepAddedColumns">Whether to keep columns added in a transform.</param>
364
+ public void ToIdtDefinition(StreamWriter writer, bool keepAddedColumns)
365
+ {
366
+ if (this.Definition.Unreal)
367
+ {
368
+ return;
369
+ }
370
+
371
+ if (TableDefinition.MaxColumnsInRealTable < this.Definition.Columns.Count)
372
+ {
373
+ throw new WixException(WixDataErrors.TooManyColumnsInRealTable(this.Definition.Name, this.Definition.Columns.Count, TableDefinition.MaxColumnsInRealTable));
374
+ }
375
+
376
+ // Tack on the table header, and flush before we start writing bytes directly to the stream.
377
+ writer.Write(this.Definition.ToIdtDefinition(keepAddedColumns));
378
+ writer.Flush();
379
+
380
+ using (var binary = new BinaryWriter(writer.BaseStream, writer.Encoding, true))
381
+ {
382
+ // Create an encoding that replaces characters with question marks, and doesn't throw. We'll
383
+ // use this in case of errors
384
+ Encoding convertEncoding = Encoding.GetEncoding(writer.Encoding.CodePage);
385
+
386
+ foreach (Row row in this.Rows)
387
+ {
388
+ if (row.Redundant)
389
+ {
390
+ continue;
391
+ }
392
+
393
+ string rowString = row.ToIdtDefinition(keepAddedColumns);
394
+ byte[] rowBytes;
395
+
396
+ try
397
+ {
398
+ // GetBytes will throw an exception if any character doesn't match our current encoding
399
+ rowBytes = writer.Encoding.GetBytes(rowString);
400
+ }
401
+ catch (EncoderFallbackException)
402
+ {
403
+ Messaging.Instance.OnMessage(WixDataErrors.InvalidStringForCodepage(row.SourceLineNumbers, Convert.ToString(writer.Encoding.WindowsCodePage, CultureInfo.InvariantCulture)));
404
+
405
+ rowBytes = convertEncoding.GetBytes(rowString);
406
+ }
407
+
408
+ binary.Write(rowBytes, 0, rowBytes.Length);
409
+ }
410
+ }
411
+ }
412
+
413
+ /// <summary>
414
+ /// Validates the rows of this OutputTable and throws if it collides on
415
+ /// primary keys.
416
+ /// </summary>
417
+ public void ValidateRows()
418
+ {
419
+ Dictionary<string, SourceLineNumber> primaryKeys = new Dictionary<string, SourceLineNumber>();
420
+
421
+ foreach (Row row in this.Rows)
422
+ {
423
+ string primaryKey = row.GetPrimaryKey();
424
+
425
+ SourceLineNumber collisionSourceLineNumber;
426
+ if (primaryKeys.TryGetValue(primaryKey, out collisionSourceLineNumber))
427
+ {
428
+ throw new WixException(WixDataErrors.DuplicatePrimaryKey(collisionSourceLineNumber, primaryKey, this.Definition.Name));
429
+ }
430
+
431
+ primaryKeys.Add(primaryKey, row.SourceLineNumbers);
432
+ }
433
+ }
434
+ }
435
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/WindowsInstallerStandard.cs
new
+442
@@ -0,0 +1,442 @@
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
+ /// <summary>
25
+ /// Gets the table definitions stored in this assembly.
26
+ /// </summary>
27
+ /// <returns>Table definition collection for tables stored in this assembly.</returns>
28
+ public static TableDefinitionCollection GetTableDefinitions()
29
+ {
30
+ lock (lockObject)
31
+ {
32
+ if (null == WindowsInstallerStandard.tableDefinitions)
33
+ {
34
+ using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.WindowsInstaller.Data.tables.xml")))
35
+ {
36
+ tableDefinitions = TableDefinitionCollection.Load(reader);
37
+ }
38
+ }
39
+ }
40
+
41
+ return WindowsInstallerStandard.tableDefinitions;
42
+ }
43
+
44
+ /// <summary>
45
+ /// Gets the standard actions stored in this assembly.
46
+ /// </summary>
47
+ /// <returns>Collection of standard actions in this assembly.</returns>
48
+ public static WixActionRowCollection GetStandardActions()
49
+ {
50
+ lock (lockObject)
51
+ {
52
+ if (null == standardActions)
53
+ {
54
+ using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.WindowsInstaller.Data.actions.xml")))
55
+ {
56
+ standardActions = WixActionRowCollection.Load(reader);
57
+ }
58
+ }
59
+ }
60
+
61
+ return standardActions;
62
+ }
63
+
64
+ /// <summary>
65
+ /// Gets (and loads if not yet loaded) the list of standard MSI directories.
66
+ /// </summary>
67
+ /// <value>The list of standard MSI directories.</value>
68
+ public static HashSet<string> GetStandardDirectories()
69
+ {
70
+ lock (lockObject)
71
+ {
72
+ if (null == standardDirectories)
73
+ {
74
+ LoadStandardDirectories();
75
+ }
76
+ }
77
+
78
+ return standardDirectories;
79
+ }
80
+
81
+ /// <summary>
82
+ /// Find out if an action is a standard action.
83
+ /// </summary>
84
+ /// <param name="actionName">Name of the action.</param>
85
+ /// <returns>true if the action is standard, false otherwise.</returns>
86
+ public static bool IsStandardAction(string actionName)
87
+ {
88
+ lock (lockObject)
89
+ {
90
+ if (null == standardActionNames)
91
+ {
92
+ standardActionNames = new HashSet<string>();
93
+ standardActionNames.Add("AllocateRegistrySpace");
94
+ standardActionNames.Add("AppSearch");
95
+ standardActionNames.Add("BindImage");
96
+ standardActionNames.Add("CCPSearch");
97
+ standardActionNames.Add("CostFinalize");
98
+ standardActionNames.Add("CostInitialize");
99
+ standardActionNames.Add("CreateFolders");
100
+ standardActionNames.Add("CreateShortcuts");
101
+ standardActionNames.Add("DeleteServices");
102
+ standardActionNames.Add("DisableRollback");
103
+ standardActionNames.Add("DuplicateFiles");
104
+ standardActionNames.Add("ExecuteAction");
105
+ standardActionNames.Add("FileCost");
106
+ standardActionNames.Add("FindRelatedProducts");
107
+ standardActionNames.Add("ForceReboot");
108
+ standardActionNames.Add("InstallAdminPackage");
109
+ standardActionNames.Add("InstallExecute");
110
+ standardActionNames.Add("InstallExecuteAgain");
111
+ standardActionNames.Add("InstallFiles");
112
+ standardActionNames.Add("InstallFinalize");
113
+ standardActionNames.Add("InstallInitialize");
114
+ standardActionNames.Add("InstallODBC");
115
+ standardActionNames.Add("InstallServices");
116
+ standardActionNames.Add("InstallSFPCatalogFile");
117
+ standardActionNames.Add("InstallValidate");
118
+ standardActionNames.Add("IsolateComponents");
119
+ standardActionNames.Add("LaunchConditions");
120
+ standardActionNames.Add("MigrateFeatureStates");
121
+ standardActionNames.Add("MoveFiles");
122
+ standardActionNames.Add("MsiConfigureServices");
123
+ standardActionNames.Add("MsiPublishAssemblies");
124
+ standardActionNames.Add("MsiUnpublishAssemblies");
125
+ standardActionNames.Add("PatchFiles");
126
+ standardActionNames.Add("ProcessComponents");
127
+ standardActionNames.Add("PublishComponents");
128
+ standardActionNames.Add("PublishFeatures");
129
+ standardActionNames.Add("PublishProduct");
130
+ standardActionNames.Add("RegisterClassInfo");
131
+ standardActionNames.Add("RegisterComPlus");
132
+ standardActionNames.Add("RegisterExtensionInfo");
133
+ standardActionNames.Add("RegisterFonts");
134
+ standardActionNames.Add("RegisterMIMEInfo");
135
+ standardActionNames.Add("RegisterProduct");
136
+ standardActionNames.Add("RegisterProgIdInfo");
137
+ standardActionNames.Add("RegisterTypeLibraries");
138
+ standardActionNames.Add("RegisterUser");
139
+ standardActionNames.Add("RemoveDuplicateFiles");
140
+ standardActionNames.Add("RemoveEnvironmentStrings");
141
+ standardActionNames.Add("RemoveExistingProducts");
142
+ standardActionNames.Add("RemoveFiles");
143
+ standardActionNames.Add("RemoveFolders");
144
+ standardActionNames.Add("RemoveIniValues");
145
+ standardActionNames.Add("RemoveODBC");
146
+ standardActionNames.Add("RemoveRegistryValues");
147
+ standardActionNames.Add("RemoveShortcuts");
148
+ standardActionNames.Add("ResolveSource");
149
+ standardActionNames.Add("RMCCPSearch");
150
+ standardActionNames.Add("ScheduleReboot");
151
+ standardActionNames.Add("SelfRegModules");
152
+ standardActionNames.Add("SelfUnregModules");
153
+ standardActionNames.Add("SetODBCFolders");
154
+ standardActionNames.Add("StartServices");
155
+ standardActionNames.Add("StopServices");
156
+ standardActionNames.Add("UnpublishComponents");
157
+ standardActionNames.Add("UnpublishFeatures");
158
+ standardActionNames.Add("UnregisterClassInfo");
159
+ standardActionNames.Add("UnregisterComPlus");
160
+ standardActionNames.Add("UnregisterExtensionInfo");
161
+ standardActionNames.Add("UnregisterFonts");
162
+ standardActionNames.Add("UnregisterMIMEInfo");
163
+ standardActionNames.Add("UnregisterProgIdInfo");
164
+ standardActionNames.Add("UnregisterTypeLibraries");
165
+ standardActionNames.Add("ValidateProductID");
166
+ standardActionNames.Add("WriteEnvironmentStrings");
167
+ standardActionNames.Add("WriteIniValues");
168
+ standardActionNames.Add("WriteRegistryValues");
169
+ }
170
+ }
171
+
172
+ return standardActionNames.Contains(actionName);
173
+ }
174
+
175
+ /// <summary>
176
+ /// Find out if a directory is a standard directory.
177
+ /// </summary>
178
+ /// <param name="directoryName">Name of the directory.</param>
179
+ /// <returns>true if the directory is standard, false otherwise.</returns>
180
+ public static bool IsStandardDirectory(string directoryName)
181
+ {
182
+ lock (lockObject)
183
+ {
184
+ if (null == standardDirectories)
185
+ {
186
+ LoadStandardDirectories();
187
+ }
188
+ }
189
+
190
+ return standardDirectories.Contains(directoryName);
191
+ }
192
+
193
+ /// <summary>
194
+ /// Find out if a property is a standard property.
195
+ /// References:
196
+ /// Title: Property Reference [Windows Installer]:
197
+ /// URL: http://msdn.microsoft.com/library/en-us/msi/setup/property_reference.asp
198
+ /// </summary>
199
+ /// <param name="propertyName">Name of the property.</param>
200
+ /// <returns>true if a property is standard, false otherwise.</returns>
201
+ public static bool IsStandardProperty(string propertyName)
202
+ {
203
+ lock (lockObject)
204
+ {
205
+ if (null == standardProperties)
206
+ {
207
+ standardProperties = new HashSet<string>();
208
+ standardProperties.Add("~"); // REG_MULTI_SZ/NULL marker
209
+ standardProperties.Add("ACTION");
210
+ standardProperties.Add("ADDDEFAULT");
211
+ standardProperties.Add("ADDLOCAL");
212
+ standardProperties.Add("ADDDSOURCE");
213
+ standardProperties.Add("AdminProperties");
214
+ standardProperties.Add("AdminUser");
215
+ standardProperties.Add("ADVERTISE");
216
+ standardProperties.Add("AFTERREBOOT");
217
+ standardProperties.Add("AllowProductCodeMismatches");
218
+ standardProperties.Add("AllowProductVersionMajorMismatches");
219
+ standardProperties.Add("ALLUSERS");
220
+ standardProperties.Add("Alpha");
221
+ standardProperties.Add("ApiPatchingSymbolFlags");
222
+ standardProperties.Add("ARPAUTHORIZEDCDFPREFIX");
223
+ standardProperties.Add("ARPCOMMENTS");
224
+ standardProperties.Add("ARPCONTACT");
225
+ standardProperties.Add("ARPHELPLINK");
226
+ standardProperties.Add("ARPHELPTELEPHONE");
227
+ standardProperties.Add("ARPINSTALLLOCATION");
228
+ standardProperties.Add("ARPNOMODIFY");
229
+ standardProperties.Add("ARPNOREMOVE");
230
+ standardProperties.Add("ARPNOREPAIR");
231
+ standardProperties.Add("ARPPRODUCTIONICON");
232
+ standardProperties.Add("ARPREADME");
233
+ standardProperties.Add("ARPSIZE");
234
+ standardProperties.Add("ARPSYSTEMCOMPONENT");
235
+ standardProperties.Add("ARPULRINFOABOUT");
236
+ standardProperties.Add("ARPURLUPDATEINFO");
237
+ standardProperties.Add("AVAILABLEFREEREG");
238
+ standardProperties.Add("BorderSize");
239
+ standardProperties.Add("BorderTop");
240
+ standardProperties.Add("CaptionHeight");
241
+ standardProperties.Add("CCP_DRIVE");
242
+ standardProperties.Add("ColorBits");
243
+ standardProperties.Add("COMPADDLOCAL");
244
+ standardProperties.Add("COMPADDSOURCE");
245
+ standardProperties.Add("COMPANYNAME");
246
+ standardProperties.Add("ComputerName");
247
+ standardProperties.Add("CostingComplete");
248
+ standardProperties.Add("Date");
249
+ standardProperties.Add("DefaultUIFont");
250
+ standardProperties.Add("DISABLEADVTSHORTCUTS");
251
+ standardProperties.Add("DISABLEMEDIA");
252
+ standardProperties.Add("DISABLEROLLBACK");
253
+ standardProperties.Add("DiskPrompt");
254
+ standardProperties.Add("DontRemoveTempFolderWhenFinished");
255
+ standardProperties.Add("EnableUserControl");
256
+ standardProperties.Add("EXECUTEACTION");
257
+ standardProperties.Add("EXECUTEMODE");
258
+ standardProperties.Add("FASTOEM");
259
+ standardProperties.Add("FILEADDDEFAULT");
260
+ standardProperties.Add("FILEADDLOCAL");
261
+ standardProperties.Add("FILEADDSOURCE");
262
+ standardProperties.Add("IncludeWholeFilesOnly");
263
+ standardProperties.Add("Installed");
264
+ standardProperties.Add("INSTALLLEVEL");
265
+ standardProperties.Add("Intel");
266
+ standardProperties.Add("Intel64");
267
+ standardProperties.Add("IsAdminPackage");
268
+ standardProperties.Add("LeftUnit");
269
+ standardProperties.Add("LIMITUI");
270
+ standardProperties.Add("ListOfPatchGUIDsToReplace");
271
+ standardProperties.Add("ListOfTargetProductCode");
272
+ standardProperties.Add("LOGACTION");
273
+ standardProperties.Add("LogonUser");
274
+ standardProperties.Add("Manufacturer");
275
+ standardProperties.Add("MEDIAPACKAGEPATH");
276
+ standardProperties.Add("MediaSourceDir");
277
+ standardProperties.Add("MinimumRequiredMsiVersion");
278
+ standardProperties.Add("MsiAMD64");
279
+ standardProperties.Add("MSIAPRSETTINGSIDENTIFIER");
280
+ standardProperties.Add("MSICHECKCRCS");
281
+ standardProperties.Add("MSIDISABLERMRESTART");
282
+ standardProperties.Add("MSIENFORCEUPGRADECOMPONENTRULES");
283
+ standardProperties.Add("MSIFASTINSTALL");
284
+ standardProperties.Add("MsiFileToUseToCreatePatchTables");
285
+ standardProperties.Add("MsiHiddenProperties");
286
+ standardProperties.Add("MSIINSTALLPERUSER");
287
+ standardProperties.Add("MSIINSTANCEGUID");
288
+ standardProperties.Add("MsiLogFileLocation");
289
+ standardProperties.Add("MsiLogging");
290
+ standardProperties.Add("MsiNetAssemblySupport");
291
+ standardProperties.Add("MSINEWINSTANCE");
292
+ standardProperties.Add("MSINODISABLEMEDIA");
293
+ standardProperties.Add("MsiNTProductType");
294
+ standardProperties.Add("MsiNTSuiteBackOffice");
295
+ standardProperties.Add("MsiNTSuiteDataCenter");
296
+ standardProperties.Add("MsiNTSuiteEnterprise");
297
+ standardProperties.Add("MsiNTSuiteSmallBusiness");
298
+ standardProperties.Add("MsiNTSuiteSmallBusinessRestricted");
299
+ standardProperties.Add("MsiNTSuiteWebServer");
300
+ standardProperties.Add("MsiNTSuitePersonal");
301
+ standardProperties.Add("MsiPatchRemovalList");
302
+ standardProperties.Add("MSIPATCHREMOVE");
303
+ standardProperties.Add("MSIRESTARTMANAGERCONTROL");
304
+ standardProperties.Add("MsiRestartManagerSessionKey");
305
+ standardProperties.Add("MSIRMSHUTDOWN");
306
+ standardProperties.Add("MsiRunningElevated");
307
+ standardProperties.Add("MsiUIHideCancel");
308
+ standardProperties.Add("MsiUIProgressOnly");
309
+ standardProperties.Add("MsiUISourceResOnly");
310
+ standardProperties.Add("MsiSystemRebootPending");
311
+ standardProperties.Add("MsiWin32AssemblySupport");
312
+ standardProperties.Add("NOCOMPANYNAME");
313
+ standardProperties.Add("NOUSERNAME");
314
+ standardProperties.Add("OLEAdvtSupport");
315
+ standardProperties.Add("OptimizePatchSizeForLargeFiles");
316
+ standardProperties.Add("OriginalDatabase");
317
+ standardProperties.Add("OutOfDiskSpace");
318
+ standardProperties.Add("OutOfNoRbDiskSpace");
319
+ standardProperties.Add("ParentOriginalDatabase");
320
+ standardProperties.Add("ParentProductCode");
321
+ standardProperties.Add("PATCH");
322
+ standardProperties.Add("PATCH_CACHE_DIR");
323
+ standardProperties.Add("PATCH_CACHE_ENABLED");
324
+ standardProperties.Add("PatchGUID");
325
+ standardProperties.Add("PATCHNEWPACKAGECODE");
326
+ standardProperties.Add("PATCHNEWSUMMARYCOMMENTS");
327
+ standardProperties.Add("PATCHNEWSUMMARYSUBJECT");
328
+ standardProperties.Add("PatchOutputPath");
329
+ standardProperties.Add("PatchSourceList");
330
+ standardProperties.Add("PhysicalMemory");
331
+ standardProperties.Add("PIDKEY");
332
+ standardProperties.Add("PIDTemplate");
333
+ standardProperties.Add("Preselected");
334
+ standardProperties.Add("PRIMARYFOLDER");
335
+ standardProperties.Add("PrimaryVolumePath");
336
+ standardProperties.Add("PrimaryVolumeSpaceAvailable");
337
+ standardProperties.Add("PrimaryVolumeSpaceRemaining");
338
+ standardProperties.Add("PrimaryVolumeSpaceRequired");
339
+ standardProperties.Add("Privileged");
340
+ standardProperties.Add("ProductCode");
341
+ standardProperties.Add("ProductID");
342
+ standardProperties.Add("ProductLanguage");
343
+ standardProperties.Add("ProductName");
344
+ standardProperties.Add("ProductState");
345
+ standardProperties.Add("ProductVersion");
346
+ standardProperties.Add("PROMPTROLLBACKCOST");
347
+ standardProperties.Add("REBOOT");
348
+ standardProperties.Add("REBOOTPROMPT");
349
+ standardProperties.Add("RedirectedDllSupport");
350
+ standardProperties.Add("REINSTALL");
351
+ standardProperties.Add("REINSTALLMODE");
352
+ standardProperties.Add("RemoveAdminTS");
353
+ standardProperties.Add("REMOVE");
354
+ standardProperties.Add("ReplacedInUseFiles");
355
+ standardProperties.Add("RestrictedUserControl");
356
+ standardProperties.Add("RESUME");
357
+ standardProperties.Add("RollbackDisabled");
358
+ standardProperties.Add("ROOTDRIVE");
359
+ standardProperties.Add("ScreenX");
360
+ standardProperties.Add("ScreenY");
361
+ standardProperties.Add("SecureCustomProperties");
362
+ standardProperties.Add("ServicePackLevel");
363
+ standardProperties.Add("ServicePackLevelMinor");
364
+ standardProperties.Add("SEQUENCE");
365
+ standardProperties.Add("SharedWindows");
366
+ standardProperties.Add("ShellAdvtSupport");
367
+ standardProperties.Add("SHORTFILENAMES");
368
+ standardProperties.Add("SourceDir");
369
+ standardProperties.Add("SOURCELIST");
370
+ standardProperties.Add("SystemLanguageID");
371
+ standardProperties.Add("TARGETDIR");
372
+ standardProperties.Add("TerminalServer");
373
+ standardProperties.Add("TextHeight");
374
+ standardProperties.Add("Time");
375
+ standardProperties.Add("TRANSFORMS");
376
+ standardProperties.Add("TRANSFORMSATSOURCE");
377
+ standardProperties.Add("TRANSFORMSSECURE");
378
+ standardProperties.Add("TTCSupport");
379
+ standardProperties.Add("UILevel");
380
+ standardProperties.Add("UpdateStarted");
381
+ standardProperties.Add("UpgradeCode");
382
+ standardProperties.Add("UPGRADINGPRODUCTCODE");
383
+ standardProperties.Add("UserLanguageID");
384
+ standardProperties.Add("USERNAME");
385
+ standardProperties.Add("UserSID");
386
+ standardProperties.Add("Version9X");
387
+ standardProperties.Add("VersionDatabase");
388
+ standardProperties.Add("VersionMsi");
389
+ standardProperties.Add("VersionNT");
390
+ standardProperties.Add("VersionNT64");
391
+ standardProperties.Add("VirtualMemory");
392
+ standardProperties.Add("WindowsBuild");
393
+ standardProperties.Add("WindowsVolume");
394
+ }
395
+ }
396
+
397
+ return standardProperties.Contains(propertyName);
398
+ }
399
+
400
+ /// <summary>
401
+ /// Sets up a hashtable with the set of standard MSI directories
402
+ /// </summary>
403
+ private static void LoadStandardDirectories()
404
+ {
405
+ lock (lockObject)
406
+ {
407
+ if (null == standardDirectories)
408
+ {
409
+ standardDirectories = new HashSet<string>();
410
+ standardDirectories.Add("TARGETDIR");
411
+ standardDirectories.Add("AdminToolsFolder");
412
+ standardDirectories.Add("AppDataFolder");
413
+ standardDirectories.Add("CommonAppDataFolder");
414
+ standardDirectories.Add("CommonFilesFolder");
415
+ standardDirectories.Add("DesktopFolder");
416
+ standardDirectories.Add("FavoritesFolder");
417
+ standardDirectories.Add("FontsFolder");
418
+ standardDirectories.Add("LocalAppDataFolder");
419
+ standardDirectories.Add("MyPicturesFolder");
420
+ standardDirectories.Add("PersonalFolder");
421
+ standardDirectories.Add("ProgramFilesFolder");
422
+ standardDirectories.Add("ProgramMenuFolder");
423
+ standardDirectories.Add("SendToFolder");
424
+ standardDirectories.Add("StartMenuFolder");
425
+ standardDirectories.Add("StartupFolder");
426
+ standardDirectories.Add("System16Folder");
427
+ standardDirectories.Add("SystemFolder");
428
+ standardDirectories.Add("TempFolder");
429
+ standardDirectories.Add("TemplateFolder");
430
+ standardDirectories.Add("WindowsFolder");
431
+ standardDirectories.Add("CommonFiles64Folder");
432
+ standardDirectories.Add("ProgramFiles64Folder");
433
+ standardDirectories.Add("System64Folder");
434
+ standardDirectories.Add("NetHoodFolder");
435
+ standardDirectories.Add("PrintHoodFolder");
436
+ standardDirectories.Add("RecentFolder");
437
+ standardDirectories.Add("WindowsVolume");
438
+ }
439
+ }
440
+ }
441
+ }
442
+}
src/WixToolset.Data.WindowsInstaller/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.WindowsInstaller/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.WindowsInstaller/WixToolset.Data.WindowsInstaller.csproj
new
+27
@@ -0,0 +1,27 @@
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
+<Project Sdk="Microsoft.NET.Sdk">
5
+ <PropertyGroup>
6
+ <TargetFramework>netstandard2.0</TargetFramework>
7
+ <Description>Data for Windows Installer</Description>
8
+ <Title>WiX Toolset Data Windows Installer</Title>
9
+ </PropertyGroup>
10
+
11
+ <ItemGroup>
12
+ <EmbeddedResource Include="Data\actions.xml" />
13
+ <EmbeddedResource Include="Data\tables.xml" />
14
+ </ItemGroup>
15
+
16
+ <ItemGroup>
17
+ <ProjectReference Include="$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " />
18
+ <PackageReference Include="WixToolset.Data" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " />
19
+
20
+ <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " />
21
+ <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " />
22
+ </ItemGroup>
23
+
24
+ <ItemGroup>
25
+ <PackageReference Include="Nerdbank.GitVersioning" Version="2.0.41" PrivateAssets="all" />
26
+ </ItemGroup>
27
+</Project>
src/test/WixToolsetTest.CoreIntegrationFixture/ProgramFixture.cs
+12
@@ -3,7 +3,10 @@
3
namespace WixToolsetTest.CoreIntegrationFixture
4
{
5
using System.IO;
6
+ using System.Linq;
7
using WixToolset.Core;
8
+ using WixToolset.Data;
9
+ using WixToolset.Data.Tuples;
10
using WixToolsetTest.CoreIntegrationFixture.Utility;
11
using Xunit;
12
@@ -23,9 +26,18 @@ namespace WixToolsetTest.CoreIntegrationFixture
26
var result = program.Run(new WixToolsetServiceProvider(), new[] { "build", "Package.wxs", "PackageComponents.wxs", "-loc", "Package.en-us.wxl", "-bindpath", "data", "-intermediateFolder", intermediateFolder, "-o", $@"{intermediateFolder}\bin\test.msi" });
27
28
Assert.Equal(0, result);
29
+#if FIXED_MSI_BACKEND
30
Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msi")));
31
Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb")));
32
Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\MsiPackage\test.txt")));
33
+#else
34
+ var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.msi"));
35
+ Assert.Single(intermediate.Sections);
36
+
37
+ var wixFile = intermediate.Sections.SelectMany(s => s.Tuples).OfType<WixFileTuple>().Single();
38
+ Assert.Equal(@"data\test.txt", wixFile[WixFileTupleFields.Source].AsPath().Path);
39
+ Assert.Equal(@"test.txt", wixFile[WixFileTupleFields.Source].PreviousValue.AsPath().Path);
40
+#endif
41
}
42
}
43
}