diff options
Diffstat (limited to 'src/tools/WixToolset.HeatTasks/HeatDirectory.cs')
-rw-r--r-- | src/tools/WixToolset.HeatTasks/HeatDirectory.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/tools/WixToolset.HeatTasks/HeatDirectory.cs b/src/tools/WixToolset.HeatTasks/HeatDirectory.cs new file mode 100644 index 00000000..8a169055 --- /dev/null +++ b/src/tools/WixToolset.HeatTasks/HeatDirectory.cs | |||
@@ -0,0 +1,47 @@ | |||
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.HeatTasks | ||
4 | { | ||
5 | using Microsoft.Build.Framework; | ||
6 | |||
7 | public sealed class HeatDirectory : HeatTask | ||
8 | { | ||
9 | public string ComponentGroupName { get; set; } | ||
10 | |||
11 | [Required] | ||
12 | public string Directory { get; set; } | ||
13 | |||
14 | public string DirectoryRefId { get; set; } | ||
15 | |||
16 | public bool KeepEmptyDirectories { get; set; } | ||
17 | |||
18 | public string PreprocessorVariable { get; set; } | ||
19 | |||
20 | public bool SuppressCom { get; set; } | ||
21 | |||
22 | public bool SuppressRootDirectory { get; set; } | ||
23 | |||
24 | public bool SuppressRegistry { get; set; } | ||
25 | |||
26 | public string Template { get; set; } | ||
27 | |||
28 | protected override string OperationName => "dir"; | ||
29 | |||
30 | protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) | ||
31 | { | ||
32 | commandLineBuilder.AppendSwitch(this.OperationName); | ||
33 | commandLineBuilder.AppendFileNameIfNotNull(this.Directory); | ||
34 | |||
35 | commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName); | ||
36 | commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId); | ||
37 | commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories); | ||
38 | commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom); | ||
39 | commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry); | ||
40 | commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory); | ||
41 | commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template); | ||
42 | commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable); | ||
43 | |||
44 | base.BuildCommandLine(commandLineBuilder); | ||
45 | } | ||
46 | } | ||
47 | } | ||