简体   繁体   English

将自定义安装操作移植到Wix

[英]Porting Custom Install Actions to Wix

I currently have a Visual Studio Deployment project for creating an MSI for my applicaiton, and I'm porting over to a WiX installer. 我目前有一个Visual Studio部署项目,用于为我的应用程序创建MSI,并且我正在移植到WiX安装程序。 The VS Installer used a library with Custom Install Actions that inherited from System.Configuration.Install.Installer, eg: VS安装程序使用了具有自定义安装操作的库,该库继承自System.Configuration.Install.Installer,例如:

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

How do these equate to Wix actions? 这些如何等同于Wix动作? I figure that in general, WiX allows you to run custom actions after an install. 我认为,通常,WiX允许您在安装后运行自定义操作。 Are these just executables? 这些只是可执行文件吗? In my case, the custom Install Actions I have are classes in a DLL, not an EXE. 就我而言,我具有的自定义安装操作是DLL中的类,而不是EXE中的类。 How can I execute these from my WiX configuration? 如何从WiX配置执行这些操作?

The Installer class based custom actions do not integrate well with the Windows Installer. 基于Installer类的自定义操作无法与Windows Installer很好地集成。 The Visual Studio Setup Projects created a workaround to shoehorn them into an .MSI file but that was never the ideal situation. Visual Studio安装项目创建了一种变通方法,可以将它们塞入.MSI文件中,但这绝不是理想的情况。 The WiX toolset provides true support for managed custom actions using the DTF framework. WiX工具集为使用DTF框架的托管自定义操作提供了真正的支持。

I highly encourage you to take a look at the DTF Documentation shortcut provided with the WiX toolset. 我强烈建议您查看WiX工具集随附的DTF Documentation快捷方式。 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. 它有体面的演练,我希望你能你的代码移植很容易地再加上你就可以使用Windows安装程序更加集成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM