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