Steph Ragazzi
Steph Ragazzi

Reputation: 381

How to decouple things in Wix?

I want to install a product with some dll with Wix 3.5. These dll are determined during the msi installation through a radio buttons group. I have :

Problem : I have another set of dll to add and I want to modify as less files as possible. I don't want to introduce bugs and I want to keep things decoupled.

I would like to modify only the UI fragment with the radio buttons and add a myDllv3 fragment (without doing any changes to my main wxs file, so no condition in that file..).

Is it possible?

Upvotes: 2

Views: 242

Answers (2)

The Senator
The Senator

Reputation: 5391

I may be misunderstanding the question, but it sounds like your different set of Dlls should be grouped by features within WIX. I'd suggest creating independent WIX fragments that represents a feature for each of your set of Dlls and then you can tie your UI to install a specific feature as appropriate.

You represent a feature at the product level like so:

<Feature Id="Feature.One" Title="Feature One">
            <ComponentGroupRef Id="FeatureOneDlls.Group" />
</Feature>

<Feature Id="Feature.Two" Title="Feature Two">
            <ComponentGroupRef Id="FeatureTwoDlls.Group" />
</Feature>

And within each of the features I'd recommend using a separate wxs file to supply the fragment information that contains the files for that feature.

Upvotes: 0

caveman_dick
caveman_dick

Reputation: 6637

Why don't you use pre-processors to select the correct fragments when building the msi?

<?if $(env.SomeBuildParameter) = SetA ?>
  <?include myDllSetAv1.wxs ?>
  <?include myDllSetAv2.wxs ?>
<?else ?>
  <?include myDllSetBv1.wxs ?>
  <?include myDllSetBv2.wxs ?>
<?endif ?>

Upvotes: 1

Related Questions