从 WiX 安装程序传递标志以合并模块?

发布于 2024-10-05 22:33:40 字数 95 浏览 0 评论 0原文

我们有合并模块,当某个条件变量为真时,它们将安装 PDB 文件,但我们需要设置此条件。

我可以在 WiX 安装程序中设置此条件并以某种方式将其传递到合并模块吗?

We have merge modules that will install PDB files when a certain conditional variable is true however we need this condition to be set.

Can I set this condition in the WiX installer and pass it to the merge module somehow?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

左耳近心 2024-10-12 22:33:40

您可以使用以下格式在合并模块中设置安装程序属性:

<property_name>.<module_GUID>

例如:

CONDITION_PROPERTY.32D73316_E513_43C3_99F5_381A4B5F0A78

在安装程序中,您可以尝试使用自定义操作来设置合并模块条件中使用的属性。

自定义操作元素可以如下所示:

<CustomAction Id="SetMsmProperty" Return="check" Property="CONDITION_PROPERTY.32D73316_E513_43C3_99F5_381A4B5F0A78" Value="myValue" />

您可以在 InstallExecuteSequence -> > 之后安排操作。 AppSearch,因此您可以添加此InstallExecuteSequence元素:

<InstallExecuteSequence>
  <Custom Action="SetMsmProperty" After="AppSearch">NOT Installed</Custom>
</InstallExecuteSequence>

您可以在此处阅读有关wix自定义操作的更多信息:

You can set installer properties in merge modules by using this format:

<property_name>.<module_GUID>

For example:

CONDITION_PROPERTY.32D73316_E513_43C3_99F5_381A4B5F0A78

In your installer you can try using a custom action to set the property used in the merge module condition.

The custom action element can look like this:

<CustomAction Id="SetMsmProperty" Return="check" Property="CONDITION_PROPERTY.32D73316_E513_43C3_99F5_381A4B5F0A78" Value="myValue" />

You can schedule the action after InstallExecuteSequence -> AppSearch, so you can add this InstallExecuteSequence element:

<InstallExecuteSequence>
  <Custom Action="SetMsmProperty" After="AppSearch">NOT Installed</Custom>
</InstallExecuteSequence>

You can read more about wix custom actions here:

属性 2024-10-12 22:33:40

我通常只是创建一个子功能来在安装程序中创建一个变化点。然后,您可以在其上添加功能条件来控制是否安装合并模块引入的组件。这比在每个组件上设置条件要简单得多,并且可以更灵活地决定是否要向最终用户显示“调试符号”功能。

I just typically create a subfeature to create a variation point in the installer. You can then put a feature condition on it to control whether the components brought in by the merge modules get installed or not. This is a lot simpler then putting a condition on each component and gives you more flexibility of whether you want to show the "debug symbols" feature to the end user or not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文