main
cs 544 lines 40.2 KB
Raw
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 WixToolsetTest.Util
4 {
5 using System.IO;
6 using System.Linq;
7 using System.Xml;
8 using WixInternal.TestSupport;
9 using WixInternal.Core.TestPackage;
10 using WixToolset.Util;
11 using Xunit;
12 using System.Xml.Linq;
13 using System;
14
15 public class UtilExtensionFixture
16 {
17 [Fact]
18 public void CanBuildUsingFileShare()
19 {
20 var folder = TestData.Get(@"TestData\UsingFileShare");
21 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
22
23 var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions");
24 WixAssert.CompareLineByLine(new[]
25 {
26 "Binary:Wix4UtilCA_X86\t[Binary data]",
27 "CustomAction:Wix4ConfigureSmbInstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbInstall\t",
28 "CustomAction:Wix4ConfigureSmbUninstall_X86\t1\tWix4UtilCA_X86\tConfigureSmbUninstall\t",
29 "CustomAction:Wix4CreateSmb_X86\t11265\tWix4UtilCA_X86\tCreateSmb\t",
30 "CustomAction:Wix4CreateSmbRollback_X86\t11585\tWix4UtilCA_X86\tDropSmb\t",
31 "CustomAction:Wix4DropSmb_X86\t11265\tWix4UtilCA_X86\tDropSmb\t",
32 "CustomAction:Wix4DropSmbRollback_X86\t11585\tWix4UtilCA_X86\tCreateSmb\t",
33 "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER",
34 "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1",
35 }, results.OrderBy(s => s).ToArray());
36 }
37
38 [Fact]
39 public void CanBuildUsingFileShareX64()
40 {
41 var folder = TestData.Get(@"TestData\UsingFileShare");
42 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
43
44 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4FileShare", "Wix4FileSharePermissions");
45 WixAssert.CompareLineByLine(new[]
46 {
47 "Binary:Wix4UtilCA_X64\t[Binary data]",
48 "CustomAction:Wix4ConfigureSmbInstall_X64\t1\tWix4UtilCA_X64\tConfigureSmbInstall\t",
49 "CustomAction:Wix4ConfigureSmbUninstall_X64\t1\tWix4UtilCA_X64\tConfigureSmbUninstall\t",
50 "CustomAction:Wix4CreateSmb_X64\t11265\tWix4UtilCA_X64\tCreateSmb\t",
51 "CustomAction:Wix4CreateSmbRollback_X64\t11585\tWix4UtilCA_X64\tDropSmb\t",
52 "CustomAction:Wix4DropSmb_X64\t11265\tWix4UtilCA_X64\tDropSmb\t",
53 "CustomAction:Wix4DropSmbRollback_X64\t11585\tWix4UtilCA_X64\tCreateSmb\t",
54 "Wix4FileShare:ExampleFileShare\texample\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example file share\tINSTALLFOLDER",
55 "Wix4FileSharePermissions:ExampleFileShare\tEveryone\t1",
56 }, results.OrderBy(s => s).ToArray());
57 }
58
59 [Fact]
60 public void CanRoundtripFileShare()
61 {
62 var folder = TestData.Get(@"TestData", "UsingFileShare");
63 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
64 var output = Path.Combine(folder, "decompile.xml");
65
66 build.BuildAndDecompileAndBuild(Build, Decompile, output);
67
68 var doc = XDocument.Load(output);
69 var utilElementNames = doc.Descendants()
70 .Where(e => e.Name.Namespace == "http://wixtoolset.org/schemas/v4/wxs/util")
71 .Select(e => e.Name.LocalName)
72 .OrderBy(s => s)
73 .ToArray();
74 WixAssert.CompareLineByLine(new[]
75 {
76 "FileShare",
77 "FileSharePermission",
78 "User",
79 }, utilElementNames);
80 }
81
82 [Fact]
83 public void CanBuildCloseApplication()
84 {
85 var folder = TestData.Get(@"TestData\CloseApplication");
86 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
87
88 var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4CloseApplication");
89 WixAssert.CompareLineByLine(new[]
90 {
91 "Binary:Wix4UtilCA_A64\t[Binary data]",
92 "CustomAction:Wix4CheckRebootRequired_A64\t65\tWix4UtilCA_A64\tWixCheckRebootRequired\t",
93 "CustomAction:Wix4CloseApplications_A64\t1\tWix4UtilCA_A64\tWixCloseApplications\t",
94 "CustomAction:Wix4CloseApplicationsDeferred_A64\t3073\tWix4UtilCA_A64\tWixCloseApplicationsDeferred\t",
95 "Wix4CloseApplication:CloseMyApp\texplorer.exe\t\t\t3\t\tMYAPPISRUNNING\t\t",
96 }, results.OrderBy(s => s).ToArray());
97 }
98
99 [Fact]
100 public void CanBuildInternetShortcutInProduct()
101 {
102 var folder = TestData.Get(@"TestData\InternetShortcut");
103 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
104
105 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4InternetShortcut");
106 WixAssert.CompareLineByLine(new[]
107 {
108 "Binary:Wix4UtilCA_X64\t[Binary data]",
109 "CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64\tWixCreateInternetShortcuts\t",
110 "CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64\tWixRollbackInternetShortcuts\t",
111 "CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64\tWixSchedInternetShortcuts\t",
112 "RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\thoiptxrr.url|WiX Toolset (url).url\tINSTALLFOLDER\t2",
113 "RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tjcxd1dwf.lnk|WiX Toolset (link).lnk\tINSTALLFOLDER\t2",
114 "Wix4InternetShortcut:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\tINSTALLFOLDER\tWiX Toolset (url).url\thttps://wixtoolset.org\t1\t[#Package.ico]\t0",
115 "Wix4InternetShortcut:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tINSTALLFOLDER\tWiX Toolset (link).lnk\thttps://wixtoolset.org\t0\t[#Package.ico]\t0",
116 }, results.OrderBy(s => s).ToArray());
117 }
118
119 [Fact]
120 public void CanBuildInternetShortcutInMergeModule()
121 {
122 var folder = TestData.Get(@"TestData\InternetShortcutModule");
123 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm");
124
125 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4InternetShortcut");
126 WixAssert.CompareLineByLine(new[]
127 {
128 "Binary:Wix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t[Binary data]",
129 "CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixCreateInternetShortcuts\t",
130 "CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRollbackInternetShortcuts\t",
131 "CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixSchedInternetShortcuts\t",
132 "RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\thoiptxrr.url|WiX Toolset (url).url\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2",
133 "RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tjcxd1dwf.lnk|WiX Toolset (link).lnk\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2",
134 "Wix4InternetShortcut:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (url).url\thttps://wixtoolset.org\t1\t[#Package.ico.047730A5_30FE_4A62_A520_DA9381B8226A]\t0",
135 "Wix4InternetShortcut:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (link).lnk\thttps://wixtoolset.org\t0\t[#Package.ico.047730A5_30FE_4A62_A520_DA9381B8226A]\t0",
136 }, results.OrderBy(s => s).ToArray());
137 }
138
139 [Fact]
140 public void CanBuildWithPermissionEx()
141 {
142 var folder = TestData.Get(@"TestData\PermissionEx");
143 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
144
145 var results = build.BuildAndQuery(BuildX64, "Wix4SecureObject");
146 WixAssert.CompareLineByLine(new[]
147 {
148 "Wix4SecureObject:ExampleRegistryKey\tRegistry\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo",
149 "Wix4SecureObject:filF5_pLhBuF5b4N9XEo52g_hUM5Lo\tFile\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo",
150 "Wix4SecureObject:INSTALLFOLDER\tCreateFolder\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo",
151 "Wix4SecureObject:regL6DnQ9yJpDJH5OdcVji4YXsdX2c\tRegistry\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo",
152 "Wix4SecureObject:testsvc\tServiceInstall\t\tEveryone\t1\t268435456\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo",
153 }, results.OrderBy(s => s).ToArray());
154 }
155
156 [Fact]
157 public void CanBuildRemoveRegistryKeyExInMergeModule()
158 {
159 var folder = TestData.Get(@"TestData", "RemoveRegistryKeyEx");
160 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm");
161
162 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveRegistry", "Wix4RemoveRegistryKeyEx");
163 WixAssert.CompareLineByLine(new[]
164 {
165 "Binary:Wix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t[Binary data]",
166 "CustomAction:Wix4RemoveRegistryKeysEx_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t65\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRemoveRegistryKeysEx\t",
167 "Wix4RemoveRegistryKeyEx:rrxfcDhR4HhE3v3rYiQcNtQjyahQNg.047730A5_30FE_4A62_A520_DA9381B8226A\tfilh4juyUVjoUcWWtcQmd5L07FoON4.047730A5_30FE_4A62_A520_DA9381B8226A\t2\tSOFTWARE\\Example\t1\t",
168 }, results.OrderBy(s => s).ToArray());
169 }
170
171 [Fact]
172 public void CanBuildRemoveFolderExInMergeModule()
173 {
174 var folder = TestData.Get(@"TestData\RemoveFolderEx");
175 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm");
176
177 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4RemoveFolderEx");
178 WixAssert.CompareLineByLine(new[]
179 {
180 "Binary:Wix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t[Binary data]",
181 "CustomAction:Wix4RemoveFoldersEx_X64.047730A5_30FE_4A62_A520_DA9381B8226A\t65\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRemoveFoldersEx\t",
182 "Wix4RemoveFolderEx:wrf5qCm1SE.zp8djrlk78l1IYFXsEw.047730A5_30FE_4A62_A520_DA9381B8226A\tfilh4juyUVjoUcWWtcQmd5L07FoON4.047730A5_30FE_4A62_A520_DA9381B8226A\tRemoveProp.047730A5_30FE_4A62_A520_DA9381B8226A\t3\t",
183 }, results.OrderBy(s => s).ToArray());
184 }
185
186 [Fact]
187 public void CanBuildRemoveFolderExInPackage()
188 {
189 var folder = TestData.Get(@"TestData\RemoveFolderExPackage");
190 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
191
192 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "RemoveFile", "Wix4RemoveFolderEx");
193 WixAssert.CompareLineByLine(new[]
194 {
195 "Binary:Wix4UtilCA_X64\t[Binary data]",
196 "CustomAction:Wix4RemoveFoldersEx_X64\t65\tWix4UtilCA_X64\tWixRemoveFoldersEx\t",
197 "Wix4RemoveFolderEx:wrfRwBJnGq1p9zdOKI6qUQ.p.wHFtE\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tREMOVEPROP\t3\t",
198 }, results.OrderBy(s => s).ToArray());
199 }
200
201 [Fact]
202 public void CanBuildServiceConfig()
203 {
204 var folder = TestData.Get(@"TestData", "ServiceConfig");
205 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msi");
206
207 var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "ServiceConfig", "Wix4ServiceConfig");
208 WixAssert.CompareLineByLine(new[]
209 {
210 "Binary:Wix4UtilCA_X64\t[Binary data]",
211 "CustomAction:Wix4ExecServiceConfig_X64\t3073\tWix4UtilCA_X64\tExecServiceConfig\t",
212 "CustomAction:Wix4RollbackServiceConfig_X64\t3329\tWix4UtilCA_X64\tRollbackServiceConfig\t",
213 "CustomAction:Wix4SchedServiceConfig_X64\t1\tWix4UtilCA_X64\tSchedServiceConfig\t",
214 "Wix4ServiceConfig:svc\tfilPeUUVRrj2.Q_YcmN55mro4H1aQY\t1\trestart\trestart\trestart\t\t\t\t",
215 }, results.OrderBy(s => s).ToArray());
216 }
217
218 [Fact]
219 public void CanBuildWithEventManifest()
220 {
221 var folder = TestData.Get(@"TestData\EventManifest");
222 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
223
224 var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4EventManifest", "Wix4XmlFile");
225 WixAssert.CompareLineByLine(new[]
226 {
227 "Binary:Wix4UtilCA_A64\t[Binary data]",
228 "CustomAction:Wix4ConfigureEventManifestRegister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestRegister\t",
229 "CustomAction:Wix4ConfigureEventManifestUnregister_A64\t1\tWix4UtilCA_A64\tConfigureEventManifestUnregister\t",
230 "CustomAction:Wix4ExecXmlFile_A64\t11265\tWix4UtilCA_A64\tExecXmlFile\t",
231 "CustomAction:Wix4ExecXmlFileRollback_A64\t11521\tWix4UtilCA_A64\tExecXmlFileRollback\t",
232 "CustomAction:Wix4RegisterEventManifest_A64\t3073\tWix4UtilCA_A64\tWixQuietExec\t",
233 "CustomAction:Wix4RollbackRegisterEventManifest_A64\t3393\tWix4UtilCA_A64\tWixQuietExec\t",
234 "CustomAction:Wix4RollbackUnregisterEventManifest_A64\t3329\tWix4UtilCA_A64\tWixQuietExec\t",
235 "CustomAction:Wix4SchedXmlFile_A64\t1\tWix4UtilCA_A64\tSchedXmlFile\t",
236 "CustomAction:Wix4UnregisterEventManifest_A64\t3137\tWix4UtilCA_A64\tWixQuietExec\t",
237 "Wix4EventManifest:Manifest.dll\t[#Manifest.dll]",
238 "Wix4XmlFile:Config_Manifest.dllMessageFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@messageFileName[\\]]\tmessageFileName\t[Manifest.dll]\t4100\tManifest.dll\t",
239 "Wix4XmlFile:Config_Manifest.dllResourceFile\t[#Manifest.dll]\t/*/*/*/*[\\[]@resourceFileName[\\]]\tresourceFileName\t[Manifest.dll]\t4100\tManifest.dll\t",
240 }, results.OrderBy(s => s).ToArray());
241 }
242
243 [Fact]
244 public void CanBuildWithQueries()
245 {
246 var folder = TestData.Get(@"TestData\Queries");
247 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
248
249 var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction");
250 WixAssert.CompareLineByLine(new[]
251 {
252 "Binary:Wix4UtilCA_A64\t[Binary data]",
253 "CustomAction:Wix4BroadcastEnvironmentChange_A64\t65\tWix4UtilCA_A64\tWixBroadcastEnvironmentChange\t",
254 "CustomAction:Wix4BroadcastSettingChange_A64\t65\tWix4UtilCA_A64\tWixBroadcastSettingChange\t",
255 "CustomAction:Wix4CheckRebootRequired_A64\t65\tWix4UtilCA_A64\tWixCheckRebootRequired\t",
256 "CustomAction:Wix4QueryNativeMachine_A64\t257\tWix4UtilCA_A64\tWixQueryNativeMachine\t",
257 "CustomAction:Wix4QueryOsDriverInfo_A64\t257\tWix4UtilCA_A64\tWixQueryOsDriverInfo\t",
258 "CustomAction:Wix4QueryOsInfo_A64\t257\tWix4UtilCA_A64\tWixQueryOsInfo\t",
259 }, results.OrderBy(s => s).ToArray());
260 }
261
262 [Fact]
263 public void CanBuildAndDecompiileQueries()
264 {
265 var folder = TestData.Get(@"TestData\Queries");
266 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
267 var output = Path.Combine(folder, "decompile.xml");
268
269 build.BuildAndDecompileAndBuild(Build, Decompile, output);
270
271 var doc = XDocument.Load(output);
272 var utilElementNames = doc.Descendants()
273 .Where(e => e.Name.Namespace == "http://wixtoolset.org/schemas/v4/wxs/util")
274 .Select(e => e.Name.LocalName)
275 .OrderBy(s => s)
276 .ToArray();
277 WixAssert.CompareLineByLine(new[]
278 {
279 "BroadcastEnvironmentChange",
280 "BroadcastSettingChange",
281 "CheckRebootRequired",
282 "QueryNativeMachine",
283 "QueryWindowsDriverInfo",
284 "QueryWindowsSuiteInfo",
285 }, utilElementNames);
286 }
287
288 [Fact]
289 public void CanBuildWithXmlConfig()
290 {
291 var folder = TestData.Get(@"TestData", "XmlConfig");
292 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
293
294 var results = build.BuildAndQuery(BuildX64, "Wix4XmlConfig");
295 WixAssert.CompareLineByLine(new[]
296 {
297 "Wix4XmlConfig:AddAttribute2\t[INSTALLFOLDER]my.xml\tAddElement\t\t\tTheAttribute2\tAttributeValue2\t0\tAdd\t4",
298 "Wix4XmlConfig:AddElement\t[#MyXmlFile]\t\t//root/child2\t\tgrandchild3\t\t273\tAdd\t2",
299 "Wix4XmlConfig:DelElement\t[#MyXmlFile]\t\t//root/child1\tgrandchild1\t\t\t289\tDel\t",
300 "Wix4XmlConfig:uxcPPF6g4HJEQpBLT9w9GT6SKyHWww\t[#MyXmlFile]\tAddElement\t\t\tTheAttribute1\tAttributeValue1\t0\tAdd\t3",
301 }, results.OrderBy(s => s).ToArray());
302 }
303
304 [Fact]
305 public void CanRoundtripXmlConfig()
306 {
307 var folder = TestData.Get(@"TestData", "XmlConfig");
308 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
309 var output = Path.Combine(folder, "XmlConfigdecompile.xml");
310
311 build.BuildAndDecompileAndBuild(Build, Decompile, output);
312
313 var doc = XDocument.Load(output);
314 var utilElementNames = doc.Descendants().Where(e => e.Name.Namespace == "http://wixtoolset.org/schemas/v4/wxs/util")
315 .Select(e => e.Name.LocalName)
316 .ToArray();
317
318 WixAssert.CompareLineByLine(new[]
319 {
320 "XmlConfig",
321 "XmlConfig",
322 "XmlConfig",
323 "XmlConfig"
324 }, utilElementNames);
325 }
326
327 [Fact]
328 public void CanBuildModuleWithXmlConfig()
329 {
330 var folder = TestData.Get(@"TestData", "XmlConfigModule");
331 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }, "test.msm");
332
333 var results = build.BuildAndQuery(BuildX64, "Wix4XmlConfig");
334 WixAssert.CompareLineByLine(new[]
335 {
336 "Wix4XmlConfig:AddElement.047730A5_30FE_4A62_A520_DA9381B8226A\t[my.xml.047730A5_30FE_4A62_A520_DA9381B8226A]\t\t//root/sub\txxx\t\t\t273\tParent.047730A5_30FE_4A62_A520_DA9381B8226A\t1",
337 "Wix4XmlConfig:ChildElement.047730A5_30FE_4A62_A520_DA9381B8226A\t[my.xml.047730A5_30FE_4A62_A520_DA9381B8226A]\tAddElement.047730A5_30FE_4A62_A520_DA9381B8226A\t\txxx\t\t\t0\tChild.047730A5_30FE_4A62_A520_DA9381B8226A\t1",
338 }, results.OrderBy(s => s).ToArray());
339 }
340
341 [Fact]
342 public void CanBuildBundleWithSearches()
343 {
344 var folder = TestData.Get(@"TestData\BundleWithSearches");
345 var rootFolder = TestData.Get();
346 var wixext = Path.Combine(rootFolder, "WixToolset.Util.wixext.dll");
347
348 using (var fs = new DisposableFileSystem())
349 {
350 var baseFolder = fs.GetFolder();
351 var intermediateFolder = Path.Combine(baseFolder, "obj");
352 var bundlePath = Path.Combine(baseFolder, @"bin\test.exe");
353 var baFolderPath = Path.Combine(baseFolder, "ba");
354 var extractFolderPath = Path.Combine(baseFolder, "extract");
355
356 var result = WixRunner.Execute(new[]
357 {
358 "build",
359 Path.Combine(folder, "Bundle.wxs"),
360 "-ext", wixext,
361 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
362 "-bindpath", Path.Combine(folder, "data"),
363 "-intermediateFolder", intermediateFolder,
364 "-o", bundlePath
365 });
366
367 result.AssertSuccess();
368
369 Assert.True(File.Exists(bundlePath));
370 Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.wixpdb")));
371
372 var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath);
373 extractResult.AssertSuccess();
374
375 var bootstrapperExtensionDatas = extractResult.SelectBootstrapperExtensionDataNodes("/be:BootstrapperExtensionData/be:BootstrapperExtension[@Id='Wix4UtilBootstrapperExtension_X86']");
376 Assert.Equal(1, bootstrapperExtensionDatas.Count);
377 Assert.Equal("<BootstrapperExtension Id='Wix4UtilBootstrapperExtension_X86'>" +
378 "<WixWindowsFeatureSearch Id='DetectSHA2SupportId' Type='sha2CodeSigning' />" +
379 "</BootstrapperExtension>", bootstrapperExtensionDatas[0].GetTestXml());
380
381 var utilSearches = extractResult.SelectManifestNodes("/burn:BurnManifest/*[self::burn:ExtensionSearch or self::burn:DirectorySearch or self::burn:FileSearch or self::burn:MsiProductSearch or self::burn:RegistrySearch]")
382 .Cast<XmlElement>()
383 .Select(e => e.GetTestXml())
384 .ToArray();
385 WixAssert.CompareLineByLine(new[]
386 {
387 @"<ExtensionSearch Id='DetectSHA2SupportId' Variable='IsSHA2Supported' ExtensionId='Wix4UtilBootstrapperExtension_X86' />",
388 @"<DirectorySearch Id='DirectorySearchId' Variable='DirectorySearchVariable' Path='%windir%\System32' Type='exists' DisableFileRedirection='yes' />",
389 @"<FileSearch Id='FileSearchId' Variable='FileSearchVariable' Path='%windir%\System32\mscoree.dll' Type='exists' />",
390 @"<MsiProductSearch Id='ProductSearchId' Variable='ProductSearchVariable' Condition='1 &amp; 2 &lt; 3' UpgradeCode='{738D02BF-E231-4370-8209-E9FD4E1BE2A1}' Type='version' />",
391 @"<RegistrySearch Id='RegistrySearchId' Variable='RegistrySearchVariable' Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Type='value' VariableType='string' />",
392 @"<RegistrySearch Id='RegistrySearchId64' Variable='RegistrySearchVariable64' Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Win64='yes' Type='value' VariableType='string' />"
393 }, utilSearches);
394 }
395 }
396
397 [Fact]
398 public void CanCreateUserAccountWithComment()
399 {
400 var folder = TestData.Get(@"TestData\CreateUser");
401 var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder });
402
403 var results = build.BuildAndQuery(Build, "Wix4User");
404 WixAssert.CompareLineByLine(new[]
405 {
406 "Wix4User:TEST_USER00\tComponent1\ttestName00\t\ttest123!@#\tTest Comment 1\t1792",
407 "Wix4User:TEST_USER01\tComponent1\ttestName01\t\ttest123!@#\tTest Comment 1\t1796",
408 "Wix4User:TEST_USER02\tComponent1\ttestName02\t\ttest123!@#\t\t3840",
409 "Wix4User:TEST_USER03\tComponent1\ttestName03\t\ttest123!@#\t\t3844",
410 "Wix4User:TEST_USER04\tComponent1\ttestName04\t\ttest123!@#\tTest Comment 1\t1280",
411 "Wix4User:TEST_USER05\tComponent1\ttestName05\t\ttest123!@#\tTest Comment 1\t1284",
412 "Wix4User:TEST_USER06\tComponent1\ttestName06\t\ttest123!@#\t\t3328",
413 "Wix4User:TEST_USER07\tComponent1\ttestName07\t\ttest123!@#\t\t3332",
414 "Wix4User:TEST_USER10\tComponent1\ttestName10\t\ttest123!@#\tTest Comment 1\t1808",
415 "Wix4User:TEST_USER11\tComponent1\ttestName11\t\ttest123!@#\tTest Comment 1\t1812",
416 "Wix4User:TEST_USER12\tComponent1\ttestName12\t\ttest123!@#\t\t3856",
417 "Wix4User:TEST_USER13\tComponent1\ttestName13\t\ttest123!@#\t\t3860",
418 "Wix4User:TEST_USER14\tComponent1\ttestName14\t\ttest123!@#\tTest Comment 1\t1296",
419 "Wix4User:TEST_USER15\tComponent1\ttestName15\t\ttest123!@#\tTest Comment 1\t1300",
420 "Wix4User:TEST_USER16\tComponent1\ttestName16\t\ttest123!@#\t\t3344",
421 "Wix4User:TEST_USER17\tComponent1\ttestName17\t\ttest123!@#\t\t3348",
422 "Wix4User:TEST_USER20\tComponent1\ttestName20\t\ttest123!@#\tTest Comment 1\t768",
423 "Wix4User:TEST_USER21\tComponent1\ttestName21\t\ttest123!@#\tTest Comment 1\t772",
424 "Wix4User:TEST_USER22\tComponent1\ttestName22\t\ttest123!@#\t\t2816",
425 "Wix4User:TEST_USER23\tComponent1\ttestName23\t\ttest123!@#\t\t2820",
426 "Wix4User:TEST_USER24\tComponent1\ttestName24\t\ttest123!@#\tTest Comment 1\t256",
427 "Wix4User:TEST_USER25\tComponent1\ttestName25\t\ttest123!@#\tTest Comment 1\t260",
428 "Wix4User:TEST_USER26\tComponent1\ttestName26\t\ttest123!@#\t\t2304",
429 "Wix4User:TEST_USER27\tComponent1\ttestName27\t\ttest123!@#\t\t2308",
430 "Wix4User:TEST_USER30\tComponent1\ttestName30\t\ttest123!@#\tTest Comment 1\t784",
431 "Wix4User:TEST_USER31\tComponent1\ttestName31\t\ttest123!@#\tTest Comment 1\t788",
432 "Wix4User:TEST_USER32\tComponent1\ttestName32\t\ttest123!@#\t\t2832",
433 "Wix4User:TEST_USER33\tComponent1\ttestName33\t\ttest123!@#\t\t2836",
434 "Wix4User:TEST_USER34\tComponent1\ttestName34\t\ttest123!@#\tTest Comment 1\t272",
435 "Wix4User:TEST_USER35\tComponent1\ttestName35\t\ttest123!@#\tTest Comment 1\t276",
436 "Wix4User:TEST_USER36\tComponent1\ttestName36\t\ttest123!@#\t\t2320",
437 "Wix4User:TEST_USER37\tComponent1\ttestName37\t\ttest123!@#\t\t2324",
438 "Wix4User:TEST_USER40\tComponent1\ttestName40\t\ttest123!@#\tTest Comment 1\t1536",
439 "Wix4User:TEST_USER41\tComponent1\ttestName41\t\ttest123!@#\tTest Comment 1\t1540",
440 "Wix4User:TEST_USER42\tComponent1\ttestName42\t\ttest123!@#\t\t3584",
441 "Wix4User:TEST_USER43\tComponent1\ttestName43\t\ttest123!@#\t\t3588",
442 "Wix4User:TEST_USER44\tComponent1\ttestName44\t\ttest123!@#\tTest Comment 1\t1024",
443 "Wix4User:TEST_USER45\tComponent1\ttestName45\t\ttest123!@#\tTest Comment 1\t1028",
444 "Wix4User:TEST_USER46\tComponent1\ttestName46\t\ttest123!@#\t\t3072",
445 "Wix4User:TEST_USER47\tComponent1\ttestName47\t\ttest123!@#\t\t3076",
446 "Wix4User:TEST_USER50\tComponent1\ttestName50\t\ttest123!@#\tTest Comment 1\t1552",
447 "Wix4User:TEST_USER51\tComponent1\ttestName51\t\ttest123!@#\tTest Comment 1\t1556",
448 "Wix4User:TEST_USER52\tComponent1\ttestName52\t\ttest123!@#\t\t3600",
449 "Wix4User:TEST_USER53\tComponent1\ttestName53\t\ttest123!@#\t\t3604",
450 "Wix4User:TEST_USER54\tComponent1\ttestName54\t\ttest123!@#\tTest Comment 1\t1040",
451 "Wix4User:TEST_USER55\tComponent1\ttestName55\t\ttest123!@#\tTest Comment 1\t1044",
452 "Wix4User:TEST_USER56\tComponent1\ttestName56\t\ttest123!@#\t\t3088",
453 "Wix4User:TEST_USER57\tComponent1\ttestName57\t\ttest123!@#\t\t3092",
454 "Wix4User:TEST_USER60\tComponent1\ttestName60\t\ttest123!@#\tTest Comment 1\t512",
455 "Wix4User:TEST_USER61\tComponent1\ttestName61\t\ttest123!@#\tTest Comment 1\t516",
456 "Wix4User:TEST_USER62\tComponent1\ttestName62\t\ttest123!@#\t\t2560",
457 "Wix4User:TEST_USER63\tComponent1\ttestName63\t\ttest123!@#\t\t2564",
458 "Wix4User:TEST_USER64\tComponent1\ttestName64\t\ttest123!@#\tTest Comment 1\t0",
459 "Wix4User:TEST_USER65\tComponent1\ttestName65\t\ttest123!@#\tTest Comment 1\t4",
460 "Wix4User:TEST_USER66\tComponent1\ttestName66\t\ttest123!@#\t\t2048",
461 "Wix4User:TEST_USER67\tComponent1\ttestName67\t\ttest123!@#\t\t2052",
462 "Wix4User:TEST_USER70\tComponent1\ttestName70\t\ttest123!@#\tTest Comment 1\t528",
463 "Wix4User:TEST_USER71\tComponent1\ttestName71\t\ttest123!@#\tTest Comment 1\t532",
464 "Wix4User:TEST_USER72\tComponent1\ttestName72\t\ttest123!@#\t\t2576",
465 "Wix4User:TEST_USER73\tComponent1\ttestName73\t\ttest123!@#\t\t2580",
466 "Wix4User:TEST_USER74\tComponent1\ttestName74\t\ttest123!@#\tTest Comment 1\t16",
467 "Wix4User:TEST_USER75\tComponent1\ttestName75\t\ttest123!@#\tTest Comment 1\t20",
468 "Wix4User:TEST_USER76\tComponent1\ttestName76\t\ttest123!@#\t\t2064",
469 "Wix4User:TEST_USER77\tComponent1\ttestName77\t\ttest123!@#\t\t2068",
470 }, results.OrderBy(s => s).ToArray());
471 }
472
473 [Fact]
474 public void CannotBuildBundleWithSearchesUsingBuiltinVariableNames()
475 {
476 var folder = TestData.Get("TestData", "BundleWithSearches");
477 var rootFolder = TestData.Get();
478 var wixext = Path.Combine(rootFolder, "WixToolset.Util.wixext.dll");
479
480 using (var fs = new DisposableFileSystem())
481 {
482 var baseFolder = fs.GetFolder();
483 var intermediateFolder = Path.Combine(baseFolder, "obj");
484
485 var result = WixRunner.Execute(new[]
486 {
487 "build",
488 Path.Combine(folder, "BundleUsingBuiltinVariableNames.wxs"),
489 "-ext", wixext,
490 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
491 "-bindpath", Path.Combine(folder, "data"),
492 "-intermediateFolder", intermediateFolder,
493 "-o", "bundle.wixlib",
494 });
495
496 var messages = result.Messages.Select(m => m.ToString()).ToList();
497 messages.Sort();
498
499 WixAssert.CompareLineByLine(new[]
500 {
501 "The DirectorySearch/@Variable attribute's value, 'InstallerName', is one of the illegal options: 'AdminToolsFolder', 'AppDataFolder', 'CommonAppDataFolder', 'CommonFiles64Folder', 'CommonFiles6432Folder', 'CommonFilesFolder', 'CompatibilityMode', 'ComputerName', 'Date', 'DesktopFolder', 'FavoritesFolder', 'FontsFolder', 'InstallerName', 'InstallerVersion', 'LocalAppDataFolder', 'LogonUser', 'MyPicturesFolder', 'NativeMachine', 'NTProductType', 'NTSuiteBackOffice', 'NTSuiteDataCenter', 'NTSuiteEnterprise', 'NTSuitePersonal', 'NTSuiteSmallBusiness', 'NTSuiteSmallBusinessRestricted', 'NTSuiteWebServer', 'PersonalFolder', 'Privileged', 'ProcessorArchitecture', 'ProgramFiles64Folder', 'ProgramFiles6432Folder', 'ProgramFilesFolder', 'ProgramMenuFolder', 'RebootPending', 'SendToFolder', 'ServicePackLevel', 'StartMenuFolder', 'StartupFolder', 'System64Folder', 'SystemFolder', 'SystemLanguageID', 'TempFolder', 'TemplateFolder', 'TerminalServer', 'UserLanguageID', 'UserUILanguageID', 'VersionMsi', 'VersionNT', 'VersionNT64', 'WindowsBuildNumber', 'WindowsFolder', 'WindowsVolume', 'WixBundleAction', 'WixBundleActiveParent', 'WixBundleCommandLineAction', 'WixBundleElevated', 'WixBundleExecutePackageAction', 'WixBundleExecutePackageCacheFolder', 'WixBundleForcedRestartPackage', 'WixBundleInstalled', 'WixBundleProviderKey', 'WixBundleSourceProcessFolder', 'WixBundleSourceProcessPath', 'WixBundleTag', 'WixBundleUILevel', or 'WixBundleVersion'.",
502 "The FileSearch/@Variable attribute's value, 'NativeMachine', is one of the illegal options: 'AdminToolsFolder', 'AppDataFolder', 'CommonAppDataFolder', 'CommonFiles64Folder', 'CommonFiles6432Folder', 'CommonFilesFolder', 'CompatibilityMode', 'ComputerName', 'Date', 'DesktopFolder', 'FavoritesFolder', 'FontsFolder', 'InstallerName', 'InstallerVersion', 'LocalAppDataFolder', 'LogonUser', 'MyPicturesFolder', 'NativeMachine', 'NTProductType', 'NTSuiteBackOffice', 'NTSuiteDataCenter', 'NTSuiteEnterprise', 'NTSuitePersonal', 'NTSuiteSmallBusiness', 'NTSuiteSmallBusinessRestricted', 'NTSuiteWebServer', 'PersonalFolder', 'Privileged', 'ProcessorArchitecture', 'ProgramFiles64Folder', 'ProgramFiles6432Folder', 'ProgramFilesFolder', 'ProgramMenuFolder', 'RebootPending', 'SendToFolder', 'ServicePackLevel', 'StartMenuFolder', 'StartupFolder', 'System64Folder', 'SystemFolder', 'SystemLanguageID', 'TempFolder', 'TemplateFolder', 'TerminalServer', 'UserLanguageID', 'UserUILanguageID', 'VersionMsi', 'VersionNT', 'VersionNT64', 'WindowsBuildNumber', 'WindowsFolder', 'WindowsVolume', 'WixBundleAction', 'WixBundleActiveParent', 'WixBundleCommandLineAction', 'WixBundleElevated', 'WixBundleExecutePackageAction', 'WixBundleExecutePackageCacheFolder', 'WixBundleForcedRestartPackage', 'WixBundleInstalled', 'WixBundleProviderKey', 'WixBundleSourceProcessFolder', 'WixBundleSourceProcessPath', 'WixBundleTag', 'WixBundleUILevel', or 'WixBundleVersion'.",
503 "The ProductSearch/@Variable attribute's value, 'Date', is one of the illegal options: 'AdminToolsFolder', 'AppDataFolder', 'CommonAppDataFolder', 'CommonFiles64Folder', 'CommonFiles6432Folder', 'CommonFilesFolder', 'CompatibilityMode', 'ComputerName', 'Date', 'DesktopFolder', 'FavoritesFolder', 'FontsFolder', 'InstallerName', 'InstallerVersion', 'LocalAppDataFolder', 'LogonUser', 'MyPicturesFolder', 'NativeMachine', 'NTProductType', 'NTSuiteBackOffice', 'NTSuiteDataCenter', 'NTSuiteEnterprise', 'NTSuitePersonal', 'NTSuiteSmallBusiness', 'NTSuiteSmallBusinessRestricted', 'NTSuiteWebServer', 'PersonalFolder', 'Privileged', 'ProcessorArchitecture', 'ProgramFiles64Folder', 'ProgramFiles6432Folder', 'ProgramFilesFolder', 'ProgramMenuFolder', 'RebootPending', 'SendToFolder', 'ServicePackLevel', 'StartMenuFolder', 'StartupFolder', 'System64Folder', 'SystemFolder', 'SystemLanguageID', 'TempFolder', 'TemplateFolder', 'TerminalServer', 'UserLanguageID', 'UserUILanguageID', 'VersionMsi', 'VersionNT', 'VersionNT64', 'WindowsBuildNumber', 'WindowsFolder', 'WindowsVolume', 'WixBundleAction', 'WixBundleActiveParent', 'WixBundleCommandLineAction', 'WixBundleElevated', 'WixBundleExecutePackageAction', 'WixBundleExecutePackageCacheFolder', 'WixBundleForcedRestartPackage', 'WixBundleInstalled', 'WixBundleProviderKey', 'WixBundleSourceProcessFolder', 'WixBundleSourceProcessPath', 'WixBundleTag', 'WixBundleUILevel', or 'WixBundleVersion'.",
504 "The RegistrySearch/@Variable attribute's value, 'VersionNT64', is one of the illegal options: 'AdminToolsFolder', 'AppDataFolder', 'CommonAppDataFolder', 'CommonFiles64Folder', 'CommonFiles6432Folder', 'CommonFilesFolder', 'CompatibilityMode', 'ComputerName', 'Date', 'DesktopFolder', 'FavoritesFolder', 'FontsFolder', 'InstallerName', 'InstallerVersion', 'LocalAppDataFolder', 'LogonUser', 'MyPicturesFolder', 'NativeMachine', 'NTProductType', 'NTSuiteBackOffice', 'NTSuiteDataCenter', 'NTSuiteEnterprise', 'NTSuitePersonal', 'NTSuiteSmallBusiness', 'NTSuiteSmallBusinessRestricted', 'NTSuiteWebServer', 'PersonalFolder', 'Privileged', 'ProcessorArchitecture', 'ProgramFiles64Folder', 'ProgramFiles6432Folder', 'ProgramFilesFolder', 'ProgramMenuFolder', 'RebootPending', 'SendToFolder', 'ServicePackLevel', 'StartMenuFolder', 'StartupFolder', 'System64Folder', 'SystemFolder', 'SystemLanguageID', 'TempFolder', 'TemplateFolder', 'TerminalServer', 'UserLanguageID', 'UserUILanguageID', 'VersionMsi', 'VersionNT', 'VersionNT64', 'WindowsBuildNumber', 'WindowsFolder', 'WindowsVolume', 'WixBundleAction', 'WixBundleActiveParent', 'WixBundleCommandLineAction', 'WixBundleElevated', 'WixBundleExecutePackageAction', 'WixBundleExecutePackageCacheFolder', 'WixBundleForcedRestartPackage', 'WixBundleInstalled', 'WixBundleProviderKey', 'WixBundleSourceProcessFolder', 'WixBundleSourceProcessPath', 'WixBundleTag', 'WixBundleUILevel', or 'WixBundleVersion'.",
505 "The RegistrySearch/@Variable attribute's value, 'WixBundleAction', is one of the illegal options: 'AdminToolsFolder', 'AppDataFolder', 'CommonAppDataFolder', 'CommonFiles64Folder', 'CommonFiles6432Folder', 'CommonFilesFolder', 'CompatibilityMode', 'ComputerName', 'Date', 'DesktopFolder', 'FavoritesFolder', 'FontsFolder', 'InstallerName', 'InstallerVersion', 'LocalAppDataFolder', 'LogonUser', 'MyPicturesFolder', 'NativeMachine', 'NTProductType', 'NTSuiteBackOffice', 'NTSuiteDataCenter', 'NTSuiteEnterprise', 'NTSuitePersonal', 'NTSuiteSmallBusiness', 'NTSuiteSmallBusinessRestricted', 'NTSuiteWebServer', 'PersonalFolder', 'Privileged', 'ProcessorArchitecture', 'ProgramFiles64Folder', 'ProgramFiles6432Folder', 'ProgramFilesFolder', 'ProgramMenuFolder', 'RebootPending', 'SendToFolder', 'ServicePackLevel', 'StartMenuFolder', 'StartupFolder', 'System64Folder', 'SystemFolder', 'SystemLanguageID', 'TempFolder', 'TemplateFolder', 'TerminalServer', 'UserLanguageID', 'UserUILanguageID', 'VersionMsi', 'VersionNT', 'VersionNT64', 'WindowsBuildNumber', 'WindowsFolder', 'WindowsVolume', 'WixBundleAction', 'WixBundleActiveParent', 'WixBundleCommandLineAction', 'WixBundleElevated', 'WixBundleExecutePackageAction', 'WixBundleExecutePackageCacheFolder', 'WixBundleForcedRestartPackage', 'WixBundleInstalled', 'WixBundleProviderKey', 'WixBundleSourceProcessFolder', 'WixBundleSourceProcessPath', 'WixBundleTag', 'WixBundleUILevel', or 'WixBundleVersion'.",
506 "The WindowsFeatureSearch/@Variable attribute's value, 'NTProductType', is one of the illegal options: 'AdminToolsFolder', 'AppDataFolder', 'CommonAppDataFolder', 'CommonFiles64Folder', 'CommonFiles6432Folder', 'CommonFilesFolder', 'CompatibilityMode', 'ComputerName', 'Date', 'DesktopFolder', 'FavoritesFolder', 'FontsFolder', 'InstallerName', 'InstallerVersion', 'LocalAppDataFolder', 'LogonUser', 'MyPicturesFolder', 'NativeMachine', 'NTProductType', 'NTSuiteBackOffice', 'NTSuiteDataCenter', 'NTSuiteEnterprise', 'NTSuitePersonal', 'NTSuiteSmallBusiness', 'NTSuiteSmallBusinessRestricted', 'NTSuiteWebServer', 'PersonalFolder', 'Privileged', 'ProcessorArchitecture', 'ProgramFiles64Folder', 'ProgramFiles6432Folder', 'ProgramFilesFolder', 'ProgramMenuFolder', 'RebootPending', 'SendToFolder', 'ServicePackLevel', 'StartMenuFolder', 'StartupFolder', 'System64Folder', 'SystemFolder', 'SystemLanguageID', 'TempFolder', 'TemplateFolder', 'TerminalServer', 'UserLanguageID', 'UserUILanguageID', 'VersionMsi', 'VersionNT', 'VersionNT64', 'WindowsBuildNumber', 'WindowsFolder', 'WindowsVolume', 'WixBundleAction', 'WixBundleActiveParent', 'WixBundleCommandLineAction', 'WixBundleElevated', 'WixBundleExecutePackageAction', 'WixBundleExecutePackageCacheFolder', 'WixBundleForcedRestartPackage', 'WixBundleInstalled', 'WixBundleProviderKey', 'WixBundleSourceProcessFolder', 'WixBundleSourceProcessPath', 'WixBundleTag', 'WixBundleUILevel', or 'WixBundleVersion'.",
507 }, messages.ToArray());
508 }
509 }
510
511 private static void Build(string[] args)
512 {
513 var result = WixRunner.Execute(args);
514 result.AssertSuccess();
515 }
516
517 private static void BuildX64(string[] args)
518 {
519 var newArgs = args.ToList();
520 newArgs.Add("-platform");
521 newArgs.Add("x64");
522 newArgs.Add("-sw1072");
523
524 var result = WixRunner.Execute(newArgs.ToArray());
525 result.AssertSuccess();
526 }
527
528 private static void BuildARM64(string[] args)
529 {
530 var newArgs = args.ToList();
531 newArgs.Add("-platform");
532 newArgs.Add("arm64");
533
534 var result = WixRunner.Execute(newArgs.ToArray());
535 result.AssertSuccess();
536 }
537
538 private static void Decompile(string[] args)
539 {
540 var result = WixRunner.Execute(args);
541 result.AssertSuccess();
542 }
543 }
544 }