File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed
internal/WixInternal.BaseBuildTasks.Sources Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -120,5 +120,18 @@ public void AppendTextIfNotWhitespace(string textToAppend)
120120 this . AppendTextUnquoted ( textToAppend ) ;
121121 }
122122 }
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+ }
123136 }
124137}
Original file line number Diff line number Diff line change @@ -14,16 +14,16 @@ namespace WixToolset.BuildTasks
1414 public sealed class WixAcceptEula : WixExeBaseTask
1515 {
1616 [ Required ]
17- public string EulaVersion { get ; set ; }
17+ public string EulaId { get ; set ; }
1818
1919 protected override void BuildCommandLine ( WixCommandLineBuilder commandLineBuilder )
2020 {
2121 commandLineBuilder . AppendTextUnquoted ( "eula" ) ;
22- commandLineBuilder . AppendTextUnquoted ( "accept" ) ;
22+ commandLineBuilder . AppendTextUnquoted ( " accept" ) ;
2323
24- foreach ( var version in SplitEulaVersions ( this . EulaVersion ) )
24+ foreach ( var eulaId in SplitEulaVersions ( this . EulaId ) )
2525 {
26- commandLineBuilder . AppendTextUnquoted ( version ) ;
26+ commandLineBuilder . AppendTextQuotedIfNotWhitespace ( eulaId ) ;
2727 }
2828
2929 base . BuildCommandLine ( commandLineBuilder ) ;
Original file line number Diff line number Diff line change 192192 <Target
193193 Name =" AcceptEula" >
194194
195- <PropertyGroup >
196- < _AcceptEulaVersion Condition = " '$(AcceptEulaVersion)' != '' " >$(AcceptEulaVersion)</ _AcceptEulaVersion >
197- < _AcceptEulaVersion Condition = " '$(_AcceptEulaVersion)' == '' and '$(AcceptEula)' != '' " >$(AcceptEula)</ _AcceptEulaVersion >
198- < _AcceptEulaVersion Condition = " '$(_AcceptEulaVersion)' == '' " >$(WixEulaVersion)</ _AcceptEulaVersion >
199- </ PropertyGroup >
195+ <Error
196+ Text = " The 'EulaId' property is required. Add '-p:EulaId={eulaId}' to your command-line. For instructions, see https://wixtoolset.org/osmf/ "
197+ File = " $(MSBuildProjectFile) "
198+ HelpLink = " https://wixtoolset.org/osmf "
199+ Condition = " '$(EulaId)' == '' " / >
200200
201201 <WixAcceptEula
202- EulaVersion =" $(_AcceptEulaVersion )"
202+ EulaId =" $(EulaId )"
203203 NoLogo =" true"
204204 ToolExe =" $(WixToolExe)"
205205 ToolPath =" $(WixToolDir)" />
You can’t perform that action at this time.
0 commit comments