是否可以在 Wix 项目中集成 C++ 代码 [英] Is it possible to integrate C++ code inside Wix Project

查看:35
本文介绍了是否可以在 Wix 项目中集成 C++ 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Wix 项目中包含 C++ 代码.例如,要么
1. 在扩展名为.wxs"的文件中包含 C++(Wix 源文件)
2. 或者在 Wix 项目中创建.cpp"文件并从 Wix 运行它.(我试过了,但 Visual Studio 不允许我在项目中创建 .cpp 文件......但只有 wxs 和 wsi 文件)

Is it possible to include C++ code inside a Wix Project. For example either
1. Have C++ inside a file with extension ".wxs" (Wix source file)
2. Or Create ".cpp" file inside the Wix project and run it from Wix. ( I tried this, but Visual Studio doesn't allow me to create .cpp file in the project ... but only wxs & wsi files )

推荐答案

不,您不能直接在 WIX 项目中包含 C++ 代码/文件.
您可以编写自己的 C++ 自定义操作,然后从您的 wix 项目中调用它.
注意
您不应使用自定义操作来执行安装程序本身可以执行的操作.

No, you cannot directly include C++ Code/File in WIX project.
You can write your own C++ Custom Action and then call it from your wix project.
NOTE
You should not use a custom action to do things that the installer itself can do.

供您阅读
http://bonemanblog.blogspot.in/2005/10/custom-action-tutorial-part-i-custom.html
http://blogs.technet.com/b/alexshev/archive/2009/05/15/from-msi-to-wix-part-22-dll-custom-actions-introduction.aspx

这篇关于是否可以在 Wix 项目中集成 C++ 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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