在 Visual Studio 2008 中向 CAB 项目添加目录
我们最近刚刚将帮助文件从 CHM 格式转换为 HTML。由于我们的安装程序是 Wix,所以我没有将每个新文件添加到安装程序中,而是设置了 7-Zip SFX 文件的构建,该文件获取 Webhelp 文件夹中的每个文档并将其打包到自解压存档中。然后我们在 Wix 中有一个 CA 将它们提取到适当的目录。
我使用此方法遇到的问题是,使用 McAfee 的客户现在收到有关在安装程序中检测到 Heuristic.BehavesLike.Exploit.CodeExec.FFJ 的 AV 警告,该警告从使用此 SFX 存档的第一个版本开始。所以现在我正在考虑将帮助文件打包在 CAB 中,但看起来每次更新帮助文件时,我们都必须进入项目并手动添加文件。
有没有办法告诉 Visual Studio 在构建时将文件夹中的所有内容添加到 CAB 文件中?
We just recently converted our help file from the CHM format to HTML. Since our installer is Wix, rather than add each new file to the installer, I set up a build of a 7-Zip SFX file that takes every document in our Webhelp folder and packages it into a self-extracting archive. Then we have a CA in Wix that extracts these to the appropriate directory.
The issue I have with this approach is that our clients who use McAfee are now getting an AV warning about Heuristic.BehavesLike.Exploit.CodeExec.FFJ being detected in the installer, which started with the first release that used this SFX archive. So now I am looking into packaging our help files inside of a CAB instead, but it looks like every time our help files are updated, we have to go into the project and add the files by hand.
Is there a way to tell Visual Studio to just add everything in a folder to a CAB file at build time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用MAKECAB命令行工具在项目属性预构建事件中创建您的cab。然后将 cab 复制到您需要的 wix 文件位置。
you could use the MAKECAB command line tool to create your cab in the project properties pre build events. Then copy the cab to the wix file location you need.
我最终遵循了 Alexey Ivanov 的建议(问题下的第一条评论),这也使得我不必在卸载的提交阶段手动清理提取的文件。
I ended up following Alexey Ivanov's suggestion (first comment under the question) which also makes it so I don't have to manually clean up the extracted files at the commit phase of the uninstall.