Wix generate single component id for entire tree

后端 未结 2 562
我在风中等你
我在风中等你 2020-11-28 14:53

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 s

相关标签:
2条回答
  • 2020-11-28 15:34
    1. If all the files are going to the same destination folder, then you can create one single COMPONENT with all the FILE within it. There is nothing stopping you to do that. You can then just create one GUID for that component. Also read these answers which talks about the advantages vs disadvantages of one component vs multiple components before you implement it: Answer1 Answer2. To Summarize:

    You will have trouble with minor upgrades/repairs. If a component is being updated, only the file designated as the KEYPATH is checked to see if it is out of date: if it is up to date, all the others are ignored.

    You'll also have difficulty if you want to add or remove files from each component. Once released, a component is immutable (in terms of what files are in it). The only way to update it without breaking component rules would be to effectively remove and install the a new version of the MSI. Understanding the component rules is key in Windows Installer and one file per component makes the component rules easier to work with, which is why it is the recommendation of many people here.

    LINK

    1. The root directory name can be changed by modifying the "Name" property for the DIRECTORY element.
    0 讨论(0)
  • 2020-11-28 15:36

    Use one file per component - this avoids all sorts of problems (except .NET assemblies spanning multiple files). See the following thread: Wix: one file per component or several files per component?

    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: http://wix.tramontana.co.hu/ .

    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 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

    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...

    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.

    0 讨论(0)
提交回复
热议问题