diff options
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CommandLine.cs')
-rw-r--r-- | src/WixToolset.Core/CommandLine/CommandLine.cs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/WixToolset.Core/CommandLine/CommandLine.cs b/src/WixToolset.Core/CommandLine/CommandLine.cs index a3a6831c..2f203ecb 100644 --- a/src/WixToolset.Core/CommandLine/CommandLine.cs +++ b/src/WixToolset.Core/CommandLine/CommandLine.cs | |||
@@ -6,6 +6,7 @@ namespace WixToolset.Core | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.IO; | 7 | using System.IO; |
8 | using System.Linq; | 8 | using System.Linq; |
9 | using System.Reflection; | ||
9 | using System.Text; | 10 | using System.Text; |
10 | using System.Text.RegularExpressions; | 11 | using System.Text.RegularExpressions; |
11 | using WixToolset.Data; | 12 | using WixToolset.Data; |
@@ -71,6 +72,7 @@ namespace WixToolset.Core | |||
71 | 72 | ||
72 | var intermediateFolder = String.Empty; | 73 | var intermediateFolder = String.Empty; |
73 | 74 | ||
75 | var cabCachePath = String.Empty; | ||
74 | var cultures = new List<string>(); | 76 | var cultures = new List<string>(); |
75 | var contentsFile = String.Empty; | 77 | var contentsFile = String.Empty; |
76 | var outputsFile = String.Empty; | 78 | var outputsFile = String.Empty; |
@@ -98,6 +100,10 @@ namespace WixToolset.Core | |||
98 | cmdline.GetNextArgumentOrError(bindPaths); | 100 | cmdline.GetNextArgumentOrError(bindPaths); |
99 | return true; | 101 | return true; |
100 | 102 | ||
103 | case "cc": | ||
104 | cmdline.GetNextArgumentOrError(ref cabCachePath); | ||
105 | return true; | ||
106 | |||
101 | case "cultures": | 107 | case "cultures": |
102 | cmdline.GetNextArgumentOrError(cultures); | 108 | cmdline.GetNextArgumentOrError(cultures); |
103 | return true; | 109 | return true; |
@@ -190,12 +196,14 @@ namespace WixToolset.Core | |||
190 | { | 196 | { |
191 | case Commands.Build: | 197 | case Commands.Build: |
192 | { | 198 | { |
199 | LoadStandardBackends(cli.ExtensionManager); | ||
200 | |||
193 | var sourceFiles = GatherSourceFiles(files, outputFolder); | 201 | var sourceFiles = GatherSourceFiles(files, outputFolder); |
194 | var variables = GatherPreprocessorVariables(defines); | 202 | var variables = GatherPreprocessorVariables(defines); |
195 | var bindPathList = GatherBindPaths(bindPaths); | 203 | var bindPathList = GatherBindPaths(bindPaths); |
196 | var extensions = cli.ExtensionManager; | 204 | var extensions = cli.ExtensionManager; |
197 | var type = CalculateOutputType(outputType, outputFile); | 205 | var type = CalculateOutputType(outputType, outputFile); |
198 | return new BuildCommand(extensions, sourceFiles, variables, locFiles, libraryFiles, outputFile, type, cultures, bindFiles, bindPathList, intermediateFolder, contentsFile, outputsFile, builtOutputsFile, wixProjectFile); | 206 | return new BuildCommand(extensions, sourceFiles, variables, locFiles, libraryFiles, outputFile, type, cabCachePath, cultures, bindFiles, bindPathList, intermediateFolder, contentsFile, outputsFile, builtOutputsFile, wixProjectFile); |
199 | } | 207 | } |
200 | 208 | ||
201 | case Commands.Compile: | 209 | case Commands.Compile: |
@@ -209,6 +217,18 @@ namespace WixToolset.Core | |||
209 | return null; | 217 | return null; |
210 | } | 218 | } |
211 | 219 | ||
220 | private static void LoadStandardBackends(ExtensionManager extensionManager) | ||
221 | { | ||
222 | var folder = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); | ||
223 | |||
224 | foreach (var backendAssemblyName in new[] { "WixToolset.Core.Burn.dll", "WixToolset.Core.WindowsInstaller.dll" }) | ||
225 | { | ||
226 | var path = Path.Combine(folder, backendAssemblyName); | ||
227 | |||
228 | extensionManager.Load(path); | ||
229 | } | ||
230 | } | ||
231 | |||
212 | private static OutputType CalculateOutputType(string outputType, string outputFile) | 232 | private static OutputType CalculateOutputType(string outputType, string outputFile) |
213 | { | 233 | { |
214 | if (String.IsNullOrEmpty(outputType)) | 234 | if (String.IsNullOrEmpty(outputType)) |