diff options
author | Rob Mensching <rob@firegiant.com> | 2018-10-03 14:30:58 -0700 |
---|---|---|
committer | Rob Mensching <rob@robmensching.com> | 2018-10-03 14:41:49 -0700 |
commit | be612cbcea4e74196445940c41b42acb6ffa5ebd (patch) | |
tree | 7d7232f5cabe537d5fcfee0782f646c6d2221b57 /src/WixToolset.Core/CommandLine/CompileCommand.cs | |
parent | a0d67c99eb5be2ce6e83f9a8a46d52b61d9871dc (diff) | |
download | wix-be612cbcea4e74196445940c41b42acb6ffa5ebd.tar.gz wix-be612cbcea4e74196445940c41b42acb6ffa5ebd.tar.bz2 wix-be612cbcea4e74196445940c41b42acb6ffa5ebd.zip |
Implement -arch switch
Fixes wixtoolset/issues#5863
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CompileCommand.cs')
-rw-r--r-- | src/WixToolset.Core/CommandLine/CompileCommand.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/WixToolset.Core/CommandLine/CompileCommand.cs b/src/WixToolset.Core/CommandLine/CompileCommand.cs index ec1ce602..621571b1 100644 --- a/src/WixToolset.Core/CommandLine/CompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/CompileCommand.cs | |||
@@ -11,12 +11,13 @@ namespace WixToolset.Core.CommandLine | |||
11 | 11 | ||
12 | internal class CompileCommand : ICommandLineCommand | 12 | internal class CompileCommand : ICommandLineCommand |
13 | { | 13 | { |
14 | public CompileCommand(IServiceProvider serviceProvider, IEnumerable<SourceFile> sources, IDictionary<string, string> preprocessorVariables) | 14 | public CompileCommand(IServiceProvider serviceProvider, IEnumerable<SourceFile> sources, IDictionary<string, string> preprocessorVariables, Platform platform) |
15 | { | 15 | { |
16 | this.ServiceProvider = serviceProvider; | 16 | this.ServiceProvider = serviceProvider; |
17 | this.Messaging = serviceProvider.GetService<IMessaging>(); | 17 | this.Messaging = serviceProvider.GetService<IMessaging>(); |
18 | this.SourceFiles = sources; | 18 | this.SourceFiles = sources; |
19 | this.PreprocessorVariables = preprocessorVariables; | 19 | this.PreprocessorVariables = preprocessorVariables; |
20 | this.Platform = platform; | ||
20 | } | 21 | } |
21 | 22 | ||
22 | private IServiceProvider ServiceProvider { get; } | 23 | private IServiceProvider ServiceProvider { get; } |
@@ -27,6 +28,8 @@ namespace WixToolset.Core.CommandLine | |||
27 | 28 | ||
28 | private IDictionary<string, string> PreprocessorVariables { get; } | 29 | private IDictionary<string, string> PreprocessorVariables { get; } |
29 | 30 | ||
31 | private Platform Platform { get; } | ||
32 | |||
30 | public IEnumerable<string> IncludeSearchPaths { get; } | 33 | public IEnumerable<string> IncludeSearchPaths { get; } |
31 | 34 | ||
32 | public int Execute() | 35 | public int Execute() |
@@ -56,7 +59,7 @@ namespace WixToolset.Core.CommandLine | |||
56 | 59 | ||
57 | var compiler = new Compiler(this.ServiceProvider); | 60 | var compiler = new Compiler(this.ServiceProvider); |
58 | compiler.OutputPath = sourceFile.OutputPath; | 61 | compiler.OutputPath = sourceFile.OutputPath; |
59 | compiler.Platform = Platform.X86; // TODO: set this correctly | 62 | compiler.Platform = this.Platform; |
60 | compiler.SourceDocument = document; | 63 | compiler.SourceDocument = document; |
61 | var intermediate = compiler.Execute(); | 64 | var intermediate = compiler.Execute(); |
62 | 65 | ||