diff options
Diffstat (limited to '')
| -rw-r--r-- | src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs | 13 | ||||
| -rw-r--r-- | src/wix/WixToolset.BuildTasks/WixAcceptEula.cs | 8 | ||||
| -rw-r--r-- | src/wix/WixToolset.Sdk/tools/wix.targets | 12 |
3 files changed, 23 insertions, 10 deletions
diff --git a/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs b/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs index 61d7095d..985ef855 100644 --- a/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs +++ b/src/internal/WixInternal.BaseBuildTasks.Sources/WixCommandLineBuilder.cs | |||
| @@ -120,5 +120,18 @@ namespace WixToolset.BaseBuildTasks | |||
| 120 | this.AppendTextUnquoted(textToAppend); | 120 | this.AppendTextUnquoted(textToAppend); |
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| 123 | |||
| 124 | /// <summary> | ||
| 125 | /// Append arbitrary text to the command-line if specified quoted if needed. | ||
| 126 | /// </summary> | ||
| 127 | /// <param name="textToAppend">Text to append.</param> | ||
| 128 | public void AppendTextQuotedIfNotWhitespace(string textToAppend) | ||
| 129 | { | ||
| 130 | if (!String.IsNullOrWhiteSpace(textToAppend)) | ||
| 131 | { | ||
| 132 | this.AppendSpaceIfNotEmpty(); | ||
| 133 | this.AppendTextWithQuoting(textToAppend); | ||
| 134 | } | ||
| 135 | } | ||
| 123 | } | 136 | } |
| 124 | } | 137 | } |
diff --git a/src/wix/WixToolset.BuildTasks/WixAcceptEula.cs b/src/wix/WixToolset.BuildTasks/WixAcceptEula.cs index 8e398996..e71e4711 100644 --- a/src/wix/WixToolset.BuildTasks/WixAcceptEula.cs +++ b/src/wix/WixToolset.BuildTasks/WixAcceptEula.cs | |||
| @@ -14,16 +14,16 @@ namespace WixToolset.BuildTasks | |||
| 14 | public sealed class WixAcceptEula : WixExeBaseTask | 14 | public sealed class WixAcceptEula : WixExeBaseTask |
| 15 | { | 15 | { |
| 16 | [Required] | 16 | [Required] |
| 17 | public string EulaVersion { get; set; } | 17 | public string EulaId { get; set; } |
| 18 | 18 | ||
| 19 | protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) | 19 | protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) |
| 20 | { | 20 | { |
| 21 | commandLineBuilder.AppendTextUnquoted("eula"); | 21 | commandLineBuilder.AppendTextUnquoted("eula"); |
| 22 | commandLineBuilder.AppendTextUnquoted("accept"); | 22 | commandLineBuilder.AppendTextUnquoted(" accept"); |
| 23 | 23 | ||
| 24 | foreach (var version in SplitEulaVersions(this.EulaVersion)) | 24 | foreach (var eulaId in SplitEulaVersions(this.EulaId)) |
| 25 | { | 25 | { |
| 26 | commandLineBuilder.AppendTextUnquoted(version); | 26 | commandLineBuilder.AppendTextQuotedIfNotWhitespace(eulaId); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | base.BuildCommandLine(commandLineBuilder); | 29 | base.BuildCommandLine(commandLineBuilder); |
diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets index 2dcfd0e9..88317edc 100644 --- a/src/wix/WixToolset.Sdk/tools/wix.targets +++ b/src/wix/WixToolset.Sdk/tools/wix.targets | |||
| @@ -192,14 +192,14 @@ | |||
| 192 | <Target | 192 | <Target |
| 193 | Name="AcceptEula"> | 193 | Name="AcceptEula"> |
| 194 | 194 | ||
| 195 | <PropertyGroup> | 195 | <Error |
| 196 | <_AcceptEulaVersion Condition="'$(AcceptEulaVersion)' != ''">$(AcceptEulaVersion)</_AcceptEulaVersion> | 196 | Text="The 'EulaId' property is required. Add '-p:EulaId={eulaId}' to your command-line. For instructions, see https://wixtoolset.org/osmf/" |
| 197 | <_AcceptEulaVersion Condition="'$(_AcceptEulaVersion)' == '' and '$(AcceptEula)' != ''">$(AcceptEula)</_AcceptEulaVersion> | 197 | File="$(MSBuildProjectFile)" |
| 198 | <_AcceptEulaVersion Condition="'$(_AcceptEulaVersion)' == ''">$(WixEulaVersion)</_AcceptEulaVersion> | 198 | HelpLink="https://wixtoolset.org/osmf" |
| 199 | </PropertyGroup> | 199 | Condition=" '$(EulaId)' == '' " /> |
| 200 | 200 | ||
| 201 | <WixAcceptEula | 201 | <WixAcceptEula |
| 202 | EulaVersion="$(_AcceptEulaVersion)" | 202 | EulaId="$(EulaId)" |
| 203 | NoLogo="true" | 203 | NoLogo="true" |
| 204 | ToolExe="$(WixToolExe)" | 204 | ToolExe="$(WixToolExe)" |
| 205 | ToolPath="$(WixToolDir)" /> | 205 | ToolPath="$(WixToolDir)" /> |
