diff options
author | Rob Mensching <rob@firegiant.com> | 2017-10-01 14:25:33 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-10-01 14:25:33 -0700 |
commit | 39c7e2bb0399802e65a3025c4a73db211e730479 (patch) | |
tree | cf53a931796c67b89cb48fb3a7a0cc4f30cb2c22 /src/WixToolset.BuildTasks/WixCommandLineBuilder.cs | |
parent | e576d34c3f88b5da033d2516d1c16b0df9491523 (diff) | |
download | wix-39c7e2bb0399802e65a3025c4a73db211e730479.tar.gz wix-39c7e2bb0399802e65a3025c4a73db211e730479.tar.bz2 wix-39c7e2bb0399802e65a3025c4a73db211e730479.zip |
Add support for BindPaths and building .wixlibs
Diffstat (limited to 'src/WixToolset.BuildTasks/WixCommandLineBuilder.cs')
-rw-r--r-- | src/WixToolset.BuildTasks/WixCommandLineBuilder.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs b/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs index 9a6a005d..3f3084a3 100644 --- a/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs +++ b/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs | |||
@@ -49,7 +49,7 @@ namespace WixToolset.BuildTasks | |||
49 | /// </summary> | 49 | /// </summary> |
50 | /// <param name="switchName">Switch to append.</param> | 50 | /// <param name="switchName">Switch to append.</param> |
51 | /// <param name="values">Values specified by the user.</param> | 51 | /// <param name="values">Values specified by the user.</param> |
52 | public void AppendArrayIfNotNull(string switchName, ITaskItem[] values) | 52 | public void AppendArrayIfNotNull(string switchName, IEnumerable<ITaskItem> values) |
53 | { | 53 | { |
54 | if (values != null) | 54 | if (values != null) |
55 | { | 55 | { |
@@ -65,7 +65,7 @@ namespace WixToolset.BuildTasks | |||
65 | /// </summary> | 65 | /// </summary> |
66 | /// <param name="switchName">Switch to append.</param> | 66 | /// <param name="switchName">Switch to append.</param> |
67 | /// <param name="values">Values specified by the user.</param> | 67 | /// <param name="values">Values specified by the user.</param> |
68 | public void AppendArrayIfNotNull(string switchName, string[] values) | 68 | public void AppendArrayIfNotNull(string switchName, IEnumerable<string> values) |
69 | { | 69 | { |
70 | if (values != null) | 70 | if (values != null) |
71 | { | 71 | { |
@@ -77,9 +77,9 @@ namespace WixToolset.BuildTasks | |||
77 | } | 77 | } |
78 | 78 | ||
79 | /// <summary> | 79 | /// <summary> |
80 | /// Build the extensions argument. Each extension is searched in the current folder, user defined search | 80 | /// Build the extensions argument. Each extension is searched in the current folder, user defined search |
81 | /// directories (ReferencePath), HintPath, and under Wix Extension Directory in that order. | 81 | /// directories (ReferencePath), HintPath, and under Wix Extension Directory in that order. |
82 | /// The order of precednce is based off of that described in Microsoft.Common.Targets's SearchPaths | 82 | /// The order of precedence is based off of that described in Microsoft.Common.Targets's SearchPaths |
83 | /// property for the ResolveAssemblyReferences task. | 83 | /// property for the ResolveAssemblyReferences task. |
84 | /// </summary> | 84 | /// </summary> |
85 | /// <param name="extensions">The list of extensions to include.</param> | 85 | /// <param name="extensions">The list of extensions to include.</param> |
@@ -92,21 +92,19 @@ namespace WixToolset.BuildTasks | |||
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | 94 | ||
95 | string resolvedPath; | ||
96 | |||
97 | foreach (ITaskItem extension in extensions) | 95 | foreach (ITaskItem extension in extensions) |
98 | { | 96 | { |
99 | string className = extension.GetMetadata("Class"); | 97 | string className = extension.GetMetadata("Class"); |
100 | 98 | ||
101 | string fileName = Path.GetFileName(extension.ItemSpec); | 99 | string fileName = Path.GetFileName(extension.ItemSpec); |
102 | 100 | ||
103 | if (Path.GetExtension(fileName).Length == 0) | 101 | if (String.IsNullOrEmpty(Path.GetExtension(fileName))) |
104 | { | 102 | { |
105 | fileName += ".dll"; | 103 | fileName += ".dll"; |
106 | } | 104 | } |
107 | 105 | ||
108 | // First try reference paths | 106 | // First try reference paths |
109 | resolvedPath = FileSearchHelperMethods.SearchFilePaths(referencePaths, fileName); | 107 | var resolvedPath = FileSearchHelperMethods.SearchFilePaths(referencePaths, fileName); |
110 | 108 | ||
111 | if (String.IsNullOrEmpty(resolvedPath)) | 109 | if (String.IsNullOrEmpty(resolvedPath)) |
112 | { | 110 | { |
@@ -118,7 +116,7 @@ namespace WixToolset.BuildTasks | |||
118 | // Now try the item itself | 116 | // Now try the item itself |
119 | resolvedPath = extension.ItemSpec; | 117 | resolvedPath = extension.ItemSpec; |
120 | 118 | ||
121 | if (Path.GetExtension(resolvedPath).Length == 0) | 119 | if (String.IsNullOrEmpty(Path.GetExtension(resolvedPath))) |
122 | { | 120 | { |
123 | resolvedPath += ".dll"; | 121 | resolvedPath += ".dll"; |
124 | } | 122 | } |