aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2026-01-29 21:03:31 -0800
committerRob Mensching <rob@firegiant.com>2026-01-30 11:14:58 -0800
commit405b90740e33d109c34cef3adda0c0664bacdd28 (patch)
tree26b97c82ff157a20a7005503c7076146d33a7d1c /src/internal
parenta389a98c4dbed77cb658167badad79836e566887 (diff)
downloadwix-405b90740e33d109c34cef3adda0c0664bacdd28.tar.gz
wix-405b90740e33d109c34cef3adda0c0664bacdd28.tar.bz2
wix-405b90740e33d109c34cef3adda0c0664bacdd28.zip
Require "accept EULA" in .nupkgs plus some "accept EULA" bug fixes
Resolves 9196
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs20
-rw-r--r--src/internal/targets/CheckLicenseAcceptance.targets30
2 files changed, 50 insertions, 0 deletions
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
@@ -76,6 +76,26 @@ namespace WixToolset.BaseBuildTasks
76 } 76 }
77 77
78 /// <summary> 78 /// <summary>
79 /// Append a switch to the command-line for each value in a split text.
80 /// </summary>
81 /// <param name="switchName">Switch to append.</param>
82 /// <param name="values">Text to split and append.</param>
83 /// <param name="split">Character to use to split the string</param>
84 public void AppendTextAsArray(string switchName, string values, char splitter = ';')
85 {
86 if (!String.IsNullOrEmpty(values))
87 {
88 foreach (string value in values.Split([ splitter ], StringSplitOptions.RemoveEmptyEntries))
89 {
90 if (!String.IsNullOrWhiteSpace(value))
91 {
92 this.AppendSwitchIfNotNull(switchName, value.Trim());
93 }
94 }
95 }
96 }
97
98 /// <summary>
79 /// Append arbitrary text to the command-line if specified. 99 /// Append arbitrary text to the command-line if specified.
80 /// </summary> 100 /// </summary>
81 /// <param name="textToAppend">Text to append.</param> 101 /// <param name="textToAppend">Text to append.</param>
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 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project>
5
6 <Target
7 Name="CheckWix7LicenseAcceptance"
8 BeforeTargets="CoreCompile">
9
10 <ItemGroup>
11 <_AcceptEula Include="$(AcceptEula)" />
12 </ItemGroup>
13
14 <PropertyGroup>
15 <_Wix7EulaFile>$(USERPROFILE)\.wix\wix7-osmf-eula.txt</_Wix7EulaFile>
16 </PropertyGroup>
17
18 <FindInList List="@(_AcceptEula)" ItemSpecToFind="wix7">
19 <Output TaskParameter="ItemFound" ItemName="_Wix7LicenseAccepted" />
20 </FindInList>
21
22 <Error
23 Text="You must accept the Open Source Maintenance Fee (OSMF) EULA to use WiX Toolset v7. For instructions, see https://wixtoolset.org/osmf/"
24 Code="WIX7015"
25 File="$(MSBuildProjectFile)"
26 HelpLink="https://wixtoolset.org/osmf"
27 Condition=" '@(_Wix7LicenseAccepted)' == '' and !Exists('$(_Wix7EulaFile)')" />
28 </Target>
29
30</Project>