【发布时间】:2015-10-06 15:46:06
【问题描述】:
Bundle.wxl:
<Bundle Name="$(var.SetupName)"
Version="$(var.ProductVersion)"
Manufacturer="$(var.CompanyName)"
UpgradeCode="$(var.UpgradeCode)">
<Variable bal:Overridable="yes" Name="AddLocal"/>
<Variable bal:Overridable="yes" Name="Remove"/>
<Chain>
<MsiPackage Id ="Hello.msi" Name="MyApp.msi" SourceFile="$(var.MyApp.TargetPath)" EnableFeatureSelection="yes" >
<MsiProperty Name="ADDLOCAL" Value="[AddLocal]"/>
<MsiProperty Name="REMOVE" Value="[Remove]"/>
</MsiPackage>
</Chain>
</Bundle>
字符串变量AddLocal 由 UI Bootstrapper 中的复选框定义,并将值发送到 Bundle.wxl,如下所示:
BootstrapperApplication.Engine.StringVariables["AddLocal"] = "FIRST,SECOND";
Remove 变量的情况相同:
BootstrapperApplication.Engine.StringVariables["Remove"] = "THIRD";
设置变量后,我运行BootstrapperApplication.Engine.Plan(LaunchAction.Modify);,但我的功能没有任何改变。
日志文件包含如下字符串:
计划功能:FIRST,状态:不存在,默认请求:未知,请求:未知,执行操作:无,回滚操作:无
计划功能:SECOND,状态:不存在,默认请求:未知,请求:未知,执行操作:无,回滚操作:无
计划功能:第三,状态:不存在,默认请求:未知,请求:未知,执行操作:无,回滚操作:无
但是,Product.wxs 包含 id="FIRST"、id="SECOND"、id="THIRD" 的功能。
【问题讨论】:
标签: wix bootstrapper burn windows-installer