Wix 为整个树生成单个组件 ID [英] Wix generate single component id for entire tree

查看:16
本文介绍了Wix 为整个树生成单个组件 ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个对 wix 几乎没有经验的人,我也在努力为我负责的组件支持 Windows.我正在尝试为我的产品生成的一组文件创建合并模块.这些文件存在于许多子目录中.我想知道如何为整个树中的所有文件创建单个组件 ID.我不担心小升级,因为那是我不会做的事情.我试图避免为每个文件生成大量 GUID.

I am someone with little to no experience with wix and I am trying to support Windows also for the component I am responsible for. I am trying to create merge module for a set of files that my product generates. These files exist in numerous sub directories. I was wondering how I can create a single component ID for all the files in the entire tree. I am not worried about minor upgrades as that is something I am not going to be doing. I am trying to avoid generating numerous GUIDs for each of the file.

还有什么方法可以更改要安装文件的根目录的名称.目前,在我们的构建系统中,我要安装的文件最终位于目录名称install"中.在 heat 生成的 wxs 文件中,它以 install 形式出现.我想知道是否可以将其更改为实际产品名称而不是安装".

Also is there any way I can change the name of the root directory I want the files to be installed. Currently, in our build system the files I want to install end up in a directory name "install". In the wxs file generated by heat it comes up as install. I was wondering if I could change it to the actual product name instead of "install".

推荐答案

每个组件使用一个文件 - 这样可以避免各种问题(跨多个文件的 .NET 程序集除外).请参阅以下线程:每个文件一个组件还是每个组件多个文件?

Wix 是用于创建安装程序的出色框架,但学习曲线陡峭.我强烈建议您阅读这篇精彩的在线教程的几个部分:https://www.firegiant.com/wix/tutorial/

Wix is a great framework for creating installers, but it has a steep learning curve. I strongly recommend you read a few sections of this great, online tutorial: https://www.firegiant.com/wix/tutorial/

如果您是基于示例的修补匠",您可以在本文中找到更快的基于示例的导览:http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with

If you are a "sample based tinkerer", you can find an even quicker, sample based tour in this article: http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with

Wix 是亲身实践的. 只需专注于示例,并专注于创建组件和设置重大升级:

Wix is hands-on. Just focus on the samples, and focus on getting the components created and a major upgrade set up:

  • How to implement WiX installer upgrade? (modern, convenience way)
  • How to get WiX major upgrade working? (legacy way - more flexible, less convenient)
  • http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html

一旦你开始运行,其余的细节就可以通过阅读文档来了解你需要的任何功能.将 Visual Studio/Votive 与 intellisense 结合使用可确保您可以随时学习快捷方式、ini 文件、xml 文件、对话框等功能......

Once you got that running the rest of the details fall into place by reading the documentation for whatever feature you need. Using Visual Studio / Votive with intellisense ensures that you can learn as you go with features such as shortcuts, ini files, xml files, dialogs, etc...

另一个重要提示是使用 dark.exe(Wix 工具包的一部分)反编译现有的 MSI 文件.这会生成带有代码的 Wix XML,您可以将其复制并粘贴到您自己的 Wix 文件中.我使用其他 MSI 工具来编译此类 MSI 文件,然后将我需要的部分复制到我的 Wix 文件中 - 只是为了加快创建 Wix XML 的过程.研究反编译的 XML 很有教育意义 - 可以节省大量时间.

Another top tip is to use dark.exe (part of the Wix toolkit) to decompile existing MSI files. This yields Wix XML with code you can copy and paste into your own Wix files. I use other MSI tools to compile such MSI files, and then copy the sections I need into my Wix file - just to speed up the process of creating the Wix XML. Studying the decompiled XML is very educational - a real time saver.

2021 年 5 月更新:更多链接:

UPDATE, May 2021: Some more links:

  1. WiX 快速入门 - 超长版本
  2. WiX 快速入门 - 短版

这篇关于Wix 为整个树生成单个组件 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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