Wix - 如何自动调用 DLL 文件上的 Heat 以接收高潮信息

发布于 2024-10-02 12:21:16 字数 241 浏览 0 评论 0原文

为了在安装过程中模拟“regasm file.dll /codebase”执行,我们在要添加到注册表的 file.dll 上运行 Heat.exe。然后我们将生成的内容添加到 installer.wxs 文件中,一切正常。

我们希望使该过程自动化,这样我们就不必在每次 .dll 文件更改时手动运行 Heat.exe。相反,每次构建 Wix 项目时都会执行该调用。

我们怎样才能做到呢?代码示例将不胜感激。

谢谢, 格言

In order to simulate the "regasm file.dll /codebase" execution during Install, we run Heat.exe on the file.dll we want to add to registry. Then we add the generated content to our installer.wxs file, and everything works.

We would like to automate the process, so that we don't have to manually run Heat.exe each time the .dll file is changes. Instead, the call will be executed each time we build the Wix project.

How can we do it? A code example will be much appreciated.

Thanks,
Maxim

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

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

发布评论

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

评论(2

十年九夏 2024-10-09 12:21:16

您确定您需要这样做吗?我们的安装程序中有一堆 ComVisible(true) 程序集,我们进行了一次 Heat 后就再也不用这样做了。以前,我们使用 InstallShield,它具有 .NET Com Interop 设置,在构建时执行类似的步骤,这是我们的迁移要求之一,以确保仅当我们切换到 WiX 时才可以执行此操作 1 次。

Are you sure you even need to do this? We have a bunch of ComVisible(true) assemblies in our installer and we did Heat once and never had to do it again. Previously we were using InstallShield which has a .NET Com Interop setting that does similar steps at build time and it was one of our migration requirements to make sure we'd be ok doing this 1 time only when we switched to WiX.

千柳 2024-10-09 12:21:16

使用 DLL 和 TLB 上的热量生成 DLL.WXI 和 TLB.WXI 文件。

然后在 WXS 文件中使用类似的内容来包含 heat 生成的 XML。

<?include DLL.wxi ?>
<?include TLB.wxi ?>

Use heat on the DLL and the TLB to generate DLL.WXI and TLB.WXI files.

Then use something like this in your WXS file to include the XML generated by heat.

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