Baljeetsingh Sucharia
Baljeetsingh Sucharia

Reputation: 2079

Wix Installer - How do I dynamically choose which files to ship in installer?

Our product has option to Connect to SQL, MySql, & Oracle.

I thought of shipping all dlls required for connectivity , irrespective of what member wants, but this is increasing the msi size . ( using ms build )

Can I have some sort of group in Wix, and runtime based on parameter it picks which dlls to ship ? OR probably having multiple .wxs file (one for each db driver) and runtime decided which one to pick ?

Upvotes: 0

Views: 794

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55620

Organize the files for your different dataproviders into different features. Then use preprocessor statements based on variables to include or exclude features from your build. Finally pass the variables into the WiX build for evaluation. You should also give the different MSI's unique ProductName, ProductCode and PackageCode properties. Probably the same UpgradeCode. You may also need to consider checks in the installer to make sure only one variation is installed at a time unless you install to different directories and your components are fully isolated by design.

Also, if the three data providers are your only variation points then I imagine you'd only have 7 variations. You might want to prebuild those 7 and then publish the content to your distribution channel.

Preprocessor

Upvotes: 2

Related Questions