From 0d4df529a7e34f033112a1c6f16f749880334e7d Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 16 Mar 2021 10:52:55 -0700 Subject: Use validation now implemented in Core.Native Fixes wixtoolset/issues#5946 --- src/WixToolset.Core/CommandLine/BuildCommand.cs | 28 +++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/WixToolset.Core/CommandLine') diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index baca91ba..eda93f31 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs @@ -344,14 +344,14 @@ namespace WixToolset.Core.CommandLine context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; context.Extensions = this.ExtensionManager.GetServices(); context.FileSystemExtensions = this.ExtensionManager.GetServices(); - context.Ices = Array.Empty(); // TODO: set this correctly + context.Ices = this.commandLine.Ices; context.IntermediateFolder = intermediateFolder; context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; context.OutputPath = this.OutputFile; context.PdbType = this.PdbType; context.PdbPath = this.PdbType == PdbType.None ? null : this.PdbFile ?? Path.ChangeExtension(this.OutputFile, ".wixpdb"); - context.SuppressIces = Array.Empty(); // TODO: set this correctly - context.SuppressValidation = true; // TODO: set this correctly + context.SuppressIces = this.commandLine.SuppressIces; + context.SuppressValidation = this.commandLine.SuppressValidation; context.CancellationToken = cancellationToken; var binder = this.ServiceProvider.GetService(); @@ -541,6 +541,12 @@ namespace WixToolset.Core.CommandLine public string BuiltOutputsFile { get; private set; } + public List Ices { get; } = new List(); + + public List SuppressIces { get; } = new List(); + + public bool SuppressValidation { get; set; } + public CommandLine(IServiceProvider serviceProvider, IMessaging messaging) { this.ServiceProvider = serviceProvider; @@ -634,6 +640,13 @@ namespace WixToolset.Core.CommandLine parser.GetNextArgumentOrError(arg, this.IncludeSearchPaths); return true; + case "ice": + { + var value = parser.GetNextArgumentOrError(arg); + this.Ices.Add(value); + return true; + } + case "intermediatefolder": this.IntermediateFolder = parser.GetNextArgumentAsDirectoryOrError(arg); return true; @@ -670,6 +683,13 @@ namespace WixToolset.Core.CommandLine return false; } + case "sice": + { + var value = parser.GetNextArgumentOrError(arg); + this.SuppressIces.Add(value); + return true; + } + case "nologo": this.ShowLogo = false; return true; @@ -680,7 +700,7 @@ namespace WixToolset.Core.CommandLine return true; case "sval": - // todo: implement + this.SuppressValidation = true; return true; } -- cgit v1.2.3-55-g6feb