From 405b90740e33d109c34cef3adda0c0664bacdd28 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 29 Jan 2026 21:03:31 -0800 Subject: Require "accept EULA" in .nupkgs plus some "accept EULA" bug fixes Resolves 9196 --- .../WixCommandLineBuilder.cs | 20 +++++++++++++++ .../targets/CheckLicenseAcceptance.targets | 30 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/internal/targets/CheckLicenseAcceptance.targets (limited to 'src/internal') diff --git a/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs b/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs index d950bca9..61d7095d 100644 --- a/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs +++ b/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs @@ -75,6 +75,26 @@ namespace WixToolset.BaseBuildTasks } } + /// + /// Append a switch to the command-line for each value in a split text. + /// + /// Switch to append. + /// Text to split and append. + /// Character to use to split the string + public void AppendTextAsArray(string switchName, string values, char splitter = ';') + { + if (!String.IsNullOrEmpty(values)) + { + foreach (string value in values.Split([ splitter ], StringSplitOptions.RemoveEmptyEntries)) + { + if (!String.IsNullOrWhiteSpace(value)) + { + this.AppendSwitchIfNotNull(switchName, value.Trim()); + } + } + } + } + /// /// Append arbitrary text to the command-line if specified. /// diff --git a/src/internal/targets/CheckLicenseAcceptance.targets b/src/internal/targets/CheckLicenseAcceptance.targets new file mode 100644 index 00000000..61155827 --- /dev/null +++ b/src/internal/targets/CheckLicenseAcceptance.targets @@ -0,0 +1,30 @@ + + + + + + + + + <_AcceptEula Include="$(AcceptEula)" /> + + + + <_Wix7EulaFile>$(USERPROFILE)\.wix\wix7-osmf-eula.txt + + + + + + + + + + -- cgit v1.2.3-55-g6feb