diff options
author | Rob Mensching <rob@firegiant.com> | 2022-07-26 17:20:39 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-08-01 20:25:19 -0700 |
commit | a627ca9b720047e633a8fe72003ab9bee31006c5 (patch) | |
tree | 2bc8a924bb4141ab718e74d08f6459a0ffe8d573 /src/tools/WixToolset.HeatTasks/HeatFile.cs | |
parent | 521eb3c9cf38823a2c4019abb85dc0b3200b92cb (diff) | |
download | wix-a627ca9b720047e633a8fe72003ab9bee31006c5.tar.gz wix-a627ca9b720047e633a8fe72003ab9bee31006c5.tar.bz2 wix-a627ca9b720047e633a8fe72003ab9bee31006c5.zip |
Create WixToolset.Heat.nupkg to distribute heat.exe and Heat targets
Moves Heat functionality to the "tools" layer and packages it all
up in WixToolset.Heat.nupkg for distribution in WiX v4.
Completes 6838
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 | } | ||