2
votes

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 :

  • a (fragment) wxs for myDllv1
  • a (fragment) wxs for myDllv2
  • a (UI fragment) wxs with the RadioButtonGroup to choose between myDll v1 and myDll v2 with a property INSTALLTYPE
  • a main wxs file which installs the correct version of myDll.

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?

2

2 Answers

1
votes

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 ?>
0
votes

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.