[wix-users] Merge modules

Christopher Painter chrpai at iswix.com
Mon Apr 29 04:43:03 PDT 2019


I maintain an open source project called ISWIX.  It has project templates and graphical designers to make authoring WiX easier.  It uses merge modules as it's foundation.

<https://github.com/iswix-llc/iswix-tutorials>
https://github.com/iswix-llc/iswix<https://github.com/iswix-llc/iswix-tutorials>
<https://github.com/iswix-llc/iswix-tutorials>

https://github.com/iswix-llc/iswix-tutorials

When you IsWiX to create a merge module project it follows a template like this.

Foo.wixproj
FooMM.wxs
FooMMcustom.wxs

You can see an example here: https://github.com/iswix-llc/iswix-tutorials/tree/master/desktop-application/Installer/DesktopApplicationMM


The intention is that the main FooMM.wxs is primarily authored by the designers.  You can add additional markup that IsWiX won't care about and generally won't harm unless you do something like remove a parent component / directory.

If you find yourself needing to author something in conflict with IsWiX you can author components by hand in the FooMMcustom.wxs file.    Here you'll find a Fragment containing a DirectoryRef pointing back to the main file and a ComponentGroup.   In the main file you'll find a ComponentGroupRef pointing to the custom file.

In this way the two files are made one at build time and you can safely author WiX logic in the custom file that exceeds the designers current capabilities.


Other then this scenario, I've never needed multiple component groups inside a merge module.   Merge modules are  consumed atomically and associated to the same one or more features.   Generally if you think you have a scenario that requires more then one component group  there is a likelihood that you really just need more merge modules.    I once worked at a company where we used product line development methodologies that composed dozens of products from a broad range of assets.    Each product had on the order of 10 services families  consisting of 100 features, 1,000 merge modules and 10,000 files.    It took us awhile to eventually get to that relationship after a couple failed attempts where the merge modules were two small and then two big before being just right.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of balachander s via wix-users <wix-users at lists.wixtoolset.org>
Sent: Monday, April 29, 2019 5:44 AM
To: WiX Toolset Users Mailing List
Cc: balachander s
Subject: [wix-users] Merge modules

Hi,

In my installer project, i need to have 2 modules.(named Mod1 and Mod2)
Inside Mod1, i need to have different componentgroups under fragment.
But, i am getting error like "Module element has unexpected child called
fragemnt".
So, i tried removing this, then, i got error :"Module element has
unexpected child called ComponentGroup".

If i remove componentgroup, i am not getting error, but it will not make
sense. As we need to have different componentgroups.

Pls suggest your inputs.

Regards,
Balachander

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list