main
cs 58 lines 2.1 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 WixToolset.BuildTasks
4 {
5 using Microsoft.Build.Framework;
6 using WixToolset.BaseBuildTasks;
7
8 /// <summary>
9 /// An MSBuild task to run WiX to detach bundle engine to be signed.
10 /// </summary>
11 public sealed class WindowsInstallerValidation : WixExeBaseTask
12 {
13 /// <summary>
14 /// Gets or sets the path to the database to validate.
15 /// </summary>
16 [Required]
17 public ITaskItem DatabaseFile { get; set; }
18
19 /// <summary>
20 /// Gets or sets the intermedidate folder to use.
21 /// </summary>
22 public ITaskItem IntermediateDirectory { get; set; }
23
24 /// <summary>
25 /// Gets or sets the paths to ICE CUBes to execute.
26 /// </summary>
27 public string[] CubeFiles { get; set; }
28
29 /// <summary>
30 /// Gets or sets the ICEs to execute.
31 /// </summary>
32 public string[] Ices { get; set; }
33
34 /// <summary>
35 /// Gets or sets the ICEs to suppress.
36 /// </summary>
37 public string[] SuppressIces { get; set; }
38
39 /// <summary>
40 /// Gets or sets the .wixpdb for the database.
41 /// </summary>
42 public ITaskItem WixpdbFile { get; set; }
43
44 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
45 {
46 commandLineBuilder.AppendTextUnquoted("msi validate");
47
48 commandLineBuilder.AppendFileNameIfNotNull(this.DatabaseFile);
49 commandLineBuilder.AppendSwitchIfNotNull("-pdb ", this.WixpdbFile);
50 commandLineBuilder.AppendSwitchIfNotNull("-intermediatefolder ", this.IntermediateDirectory);
51 commandLineBuilder.AppendArrayIfNotNull("-cub ", this.CubeFiles);
52 commandLineBuilder.AppendArrayIfNotNull("-ice ", this.Ices);
53 commandLineBuilder.AppendArrayIfNotNull("-sice ", this.SuppressIces);
54
55 base.BuildCommandLine(commandLineBuilder);
56 }
57 }
58 }