diff options
author | Rob Mensching <rob@firegiant.com> | 2022-10-12 22:01:55 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-10-14 20:13:50 -0700 |
commit | 07b3d459ea0a45cbef29b98d283edafbab26462a (patch) | |
tree | 1e834882038ba3862f8acb7b60e7a4bfaef793fd /src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs | |
parent | 5567239a9411aac769a34f2c65b80a523a577ad7 (diff) | |
download | wix-07b3d459ea0a45cbef29b98d283edafbab26462a.tar.gz wix-07b3d459ea0a45cbef29b98d283edafbab26462a.tar.bz2 wix-07b3d459ea0a45cbef29b98d283edafbab26462a.zip |
Normalize ToolsetTask implementation to call wix.exe and heat.exe
Share the ToolsetTask implementation that can find .NET Core and
.NET Framework with multiple architectures.
Fixes 6951
Diffstat (limited to 'src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs')
-rw-r--r-- | src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs b/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs deleted file mode 100644 index c3989902..00000000 --- a/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
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 System; | ||
6 | using System.Collections.Generic; | ||
7 | using Microsoft.Build.Utilities; | ||
8 | |||
9 | /// <summary> | ||
10 | /// Helper class for appending the command line arguments. | ||
11 | /// </summary> | ||
12 | public class WixCommandLineBuilder : CommandLineBuilder | ||
13 | { | ||
14 | /// <summary> | ||
15 | /// Append a switch to the command line if the condition is true. | ||
16 | /// </summary> | ||
17 | /// <param name="switchName">Switch to append.</param> | ||
18 | /// <param name="condition">Condition specified by the user.</param> | ||
19 | public void AppendIfTrue(string switchName, bool condition) | ||
20 | { | ||
21 | if (condition) | ||
22 | { | ||
23 | this.AppendSwitch(switchName); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | /// <summary> | ||
28 | /// Append a switch to the command line if any values in the array have been specified. | ||
29 | /// </summary> | ||
30 | /// <param name="switchName">Switch to append.</param> | ||
31 | /// <param name="values">Values specified by the user.</param> | ||
32 | public void AppendArrayIfNotNull(string switchName, IEnumerable<string> values) | ||
33 | { | ||
34 | if (values != null) | ||
35 | { | ||
36 | foreach (var value in values) | ||
37 | { | ||
38 | this.AppendSwitchIfNotNull(switchName, value); | ||
39 | } | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /// <summary> | ||
44 | /// Append arbitrary text to the command-line if specified. | ||
45 | /// </summary> | ||
46 | /// <param name="textToAppend">Text to append.</param> | ||
47 | public void AppendTextIfNotNull(string textToAppend) | ||
48 | { | ||
49 | if (!String.IsNullOrWhiteSpace(textToAppend)) | ||
50 | { | ||
51 | this.AppendSpaceIfNotEmpty(); | ||
52 | this.AppendTextUnquoted(textToAppend); | ||
53 | } | ||
54 | } | ||
55 | } | ||
56 | } | ||