aboutsummaryrefslogtreecommitdiff
path: root/src/dtf/WixToolsetTests.Dtf.WindowsInstaller/Schema.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dtf/WixToolsetTests.Dtf.WindowsInstaller/Schema.cs')
-rw-r--r--src/dtf/WixToolsetTests.Dtf.WindowsInstaller/Schema.cs238
1 files changed, 238 insertions, 0 deletions
diff --git a/src/dtf/WixToolsetTests.Dtf.WindowsInstaller/Schema.cs b/src/dtf/WixToolsetTests.Dtf.WindowsInstaller/Schema.cs
new file mode 100644
index 00000000..26c172c9
--- /dev/null
+++ b/src/dtf/WixToolsetTests.Dtf.WindowsInstaller/Schema.cs
@@ -0,0 +1,238 @@
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
3namespace WixToolset.Dtf.Test
4{
5 using System;
6 using System.IO;
7 using System.Collections.Generic;
8 using System.Text;
9 using WixToolset.Dtf.WindowsInstaller;
10
11 public static class Schema
12 {
13 public static IList<TableInfo> Tables
14 {
15 get
16 {
17 return new TableInfo[]
18 {
19 Binary,
20 Component,
21 CustomAction,
22 Directory,
23 EmbeddedUI,
24 Feature,
25 FeatureComponents,
26 File,
27 InstallExecuteSequence,
28 Media,
29 Property,
30 Registry
31 };
32 }
33 }
34
35 #region Table data
36
37 public static TableInfo Binary { get { return new TableInfo(
38 "Binary",
39 new ColumnInfo[]
40 {
41 new ColumnInfo("Name", typeof(String), 72, true),
42 new ColumnInfo("Data", typeof(Stream), 0, true),
43 },
44 new string[] { "Name" });
45 } }
46
47 public static TableInfo Component { get { return new TableInfo(
48 "Component",
49 new ColumnInfo[]
50 {
51 new ColumnInfo("Component", typeof(String), 72, true),
52 new ColumnInfo("ComponentId", typeof(String), 38, false),
53 new ColumnInfo("Directory_", typeof(String), 72, true),
54 new ColumnInfo("Attributes", typeof(Int16), 2, true),
55 new ColumnInfo("Condition", typeof(String), 255, false),
56 new ColumnInfo("KeyPath", typeof(String), 72, false),
57 },
58 new string[] { "Component" });
59 } }
60
61 public static TableInfo CustomAction { get { return new TableInfo(
62 "CustomAction",
63 new ColumnInfo[]
64 {
65 new ColumnInfo("Action", typeof(String), 72, true),
66 new ColumnInfo("Type", typeof(Int16), 2, true),
67 new ColumnInfo("Source", typeof(String), 64, false),
68 new ColumnInfo("Target", typeof(String), 255, false),
69 },
70 new string[] { "Action" });
71 } }
72
73 public static TableInfo Directory { get { return new TableInfo(
74 "Directory",
75 new ColumnInfo[]
76 {
77 new ColumnInfo("Directory", typeof(String), 72, true),
78 new ColumnInfo("Directory_Parent", typeof(String), 72, false),
79 new ColumnInfo("DefaultDir", typeof(String), 255, true, false, true),
80 },
81 new string[] { "Directory" });
82 } }
83
84 public static TableInfo EmbeddedUI { get { return new TableInfo(
85 "MsiEmbeddedUI",
86 new ColumnInfo[]
87 {
88 new ColumnInfo("MsiEmbeddedUI", typeof(String), 72, true),
89 new ColumnInfo("FileName", typeof(String), 72, true),
90 new ColumnInfo("Attributes", typeof(Int16), 2, true),
91 new ColumnInfo("MessageFilter", typeof(Int32), 4, false),
92 new ColumnInfo("Data", typeof(Stream), 0, true),
93 },
94 new string[] { "MsiEmbeddedUI" });
95 } }
96
97 public static TableInfo Feature { get { return new TableInfo(
98 "Feature",
99 new ColumnInfo[]
100 {
101 new ColumnInfo("Feature", typeof(String), 38, true),
102 new ColumnInfo("Feature_Parent", typeof(String), 38, false),
103 new ColumnInfo("Title", typeof(String), 64, false, false, true),
104 new ColumnInfo("Description", typeof(String), 64, false, false, true),
105 new ColumnInfo("Display", typeof(Int16), 2, false),
106 new ColumnInfo("Level", typeof(Int16), 2, true),
107 new ColumnInfo("Directory_", typeof(String), 72, false),
108 new ColumnInfo("Attributes", typeof(Int16), 2, true),
109 },
110 new string[] { "Feature" });
111 } }
112
113 public static TableInfo FeatureComponents { get { return new TableInfo(
114 "FeatureComponents",
115 new ColumnInfo[]
116 {
117 new ColumnInfo("Feature_", typeof(String), 38, true),
118 new ColumnInfo("Component_", typeof(String), 72, true),
119 },
120 new string[] { "Feature_", "Component_" });
121 } }
122
123 public static TableInfo File { get { return new TableInfo(
124 "File",
125 new ColumnInfo[]
126 {
127 new ColumnInfo("File", typeof(String), 72, true),
128 new ColumnInfo("Component_", typeof(String), 72, true),
129 new ColumnInfo("FileName", typeof(String), 255, true, false, true),
130 new ColumnInfo("FileSize", typeof(Int32), 4, true),
131 new ColumnInfo("Version", typeof(String), 72, false),
132 new ColumnInfo("Language", typeof(String), 20, false),
133 new ColumnInfo("Attributes", typeof(Int16), 2, false),
134 new ColumnInfo("Sequence", typeof(Int16), 2, true),
135 },
136 new string[] { "File" });
137 } }
138
139 public static TableInfo InstallExecuteSequence { get { return new TableInfo(
140 "InstallExecuteSequence",
141 new ColumnInfo[]
142 {
143 new ColumnInfo("Action", typeof(String), 72, true),
144 new ColumnInfo("Condition", typeof(String), 255, false),
145 new ColumnInfo("Sequence", typeof(Int16), 2, true),
146 },
147 new string[] { "Action" });
148 } }
149
150 public static TableInfo Media { get { return new TableInfo(
151 "Media",
152 new ColumnInfo[]
153 {
154 new ColumnInfo("DiskId", typeof(Int16), 2, true),
155 new ColumnInfo("LastSequence", typeof(Int16), 2, true),
156 new ColumnInfo("DiskPrompt", typeof(String), 64, false, false, true),
157 new ColumnInfo("Cabinet", typeof(String), 255, false),
158 new ColumnInfo("VolumeLabel", typeof(String), 32, false),
159 new ColumnInfo("Source", typeof(String), 32, false),
160 },
161 new string[] { "DiskId" });
162 } }
163
164 public static TableInfo Property { get { return new TableInfo(
165 "Property",
166 new ColumnInfo[]
167 {
168 new ColumnInfo("Property", typeof(String), 72, true),
169 new ColumnInfo("Value", typeof(String), 255, true),
170 },
171 new string[] { "Property" });
172 } }
173
174 public static TableInfo Registry { get { return new TableInfo(
175 "Registry",
176 new ColumnInfo[]
177 {
178 new ColumnInfo("Registry", typeof(String), 72, true),
179 new ColumnInfo("Root", typeof(Int16), 2, true),
180 new ColumnInfo("Key", typeof(String), 255, true, false, true),
181 new ColumnInfo("Name", typeof(String), 255, false, false, true),
182 new ColumnInfo("Value", typeof(String), 0, false, false, true),
183 new ColumnInfo("Component_", typeof(String), 72, true),
184 },
185 new string[] { "Registry" });
186 } }
187
188 #endregion
189
190 }
191
192 public class Action
193 {
194 public readonly string Name;
195 public readonly int Sequence;
196
197 public Action(string name, int sequence)
198 {
199 this.Name = name;
200 this.Sequence = sequence;
201 }
202
203 }
204
205 public class Sequence
206 {
207 public static IList<Action> InstallExecute
208 {
209 get
210 {
211 return new Action[]
212 {
213 new Action("CostInitialize", 800),
214 new Action("FileCost", 900),
215 new Action("CostFinalize", 1000),
216 new Action("InstallValidate", 1400),
217 new Action("InstallInitialize", 1500),
218 new Action("ProcessComponents", 1600),
219 new Action("UnpublishComponents", 1700),
220 new Action("UnpublishFeatures", 1800),
221 new Action("RemoveRegistryValues", 2600),
222 new Action("RemoveFiles", 3500),
223 new Action("RemoveFolders", 3600),
224 new Action("CreateFolders", 3700),
225 new Action("MoveFiles", 3800),
226 new Action("InstallFiles", 4000),
227 new Action("WriteRegistryValues", 5000),
228 new Action("RegisterProduct", 6100),
229 new Action("PublishComponents", 6200),
230 new Action("PublishFeatures", 6300),
231 new Action("PublishProduct", 6400),
232 new Action("InstallFinalize", 6600),
233 };
234 }
235 }
236
237 }
238}