将自定义安装操作移植到 Wix [英] Porting Custom Install Actions to Wix

查看:35
本文介绍了将自定义安装操作移植到 Wix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个 Visual Studio 部署项目,用于为我的应用程序创建 MSI,我正在移植到 WiX 安装程序.VS 安装程序使用从 System.Configuration.Install.Installer 继承的带有自定义安装操作的库,例如:

I currently have a Visual Studio Deployment project for creating an MSI for my applicaiton, and I'm porting over to a WiX installer. The VS Installer used a library with Custom Install Actions that inherited from System.Configuration.Install.Installer, e.g.:

[RunInstaller(true)]
public partial class MyCustomInstaller: Installer
{
}

这些如何等同于 Wix 操作?我认为一般来说,WiX 允许您在安装后运行自定义操作.这些只是可执行文件吗?就我而言,我拥有的自定义安装操作是 DLL 中的类,而不是 EXE.如何从我的 WiX 配置中执行这些?

How do these equate to Wix actions? I figure that in general, WiX allows you to run custom actions after an install. Are these just executables? In my case, the custom Install Actions I have are classes in a DLL, not an EXE. How can I execute these from my WiX configuration?

推荐答案

基于 Installer 类的自定义操作不能与 Windows Installer 很好地集成.Visual Studio 安装项目创建了一种变通方法,将它们硬塞进 .MSI 文件中,但这从来都不是理想的情况.WiX 工具集为使用 DTF 框架的托管自定义操作提供真正的支持.

The Installer class based custom actions do not integrate well with the Windows Installer. The Visual Studio Setup Projects created a workaround to shoehorn them into an .MSI file but that was never the ideal situation. The WiX toolset provides true support for managed custom actions using the DTF framework.

我强烈建议您查看随 WiX 工具集提供的 DTF 文档 快捷方式.它有不错的演练,我希望您能够非常轻松地移植代码此外您将能够与 Windows 安装程序集成更多.

I highly encourage you to take a look at the DTF Documentation shortcut provided with the WiX toolset. It has decent walkthroughs and I expect you'll be able to port your code pretty easily plus you'll be able to integrate far more with the Windows Installer.

这篇关于将自定义安装操作移植到 Wix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆