views:

341

answers:

3

I am trying to write an installer for a website I created. In the WiX tutorial it says "Again, a component should only contain items that belong together so strongly that they always need to be installed or removed together.". I believe an entire website fits this description. I have 2 issues regarding components. The first is that obviously my website has many directories and I cannot figure out how to get all the directories/files into 1 component (is this even possible?) and that if I generate my components from a program my GUID would almost certainly have to be different on each build forcing a Major version change with each release? Is there something I am missing?

A: 

I must admit, up front, that my experience with WIX is pretty limited. However, I was under the impression that a component mapped to a single installable thing, like a file or a dll. These are arranged into component groups, which are then added to features. The features are the things which are installed as units, for example: Core, Documentation and Examples. You'll always want the Core component, in this case, but the Documentation and Examples features could be omitted.

I don't think changing the GUID of a component will force you to change the major version number.

I've had a hard time with WIX myself as the learning curve can be pretty steep. I hope this helps.

jonnii
As far as I understand simply adding or removing files is considered a "Major Upgrade". Almost every release of a web application will have files added and removed but this is not a Major Upgrade for me.
Greg
Perhaps you should consider other ways of deploying your web application?
jonnii
+1  A: 

A Component's Files cannot span directories. Limitiation of the Windows Installer. Getting stable Component Ids is a tricky problem, but there are a few new tricks in WiX v3 that can handle this for you. The Component/@Guid="*" is the trick. The new (like last week) heat.exe will generate Fragments for you that seem to meet your needs.

Rob Mensching
A: 

Having been through this, here's my advice:

  1. Each file should have it's own component.
  2. If you follow step 1. as Rob says, each component can have attribute GUID="*"
  3. ComponentGroup is your friend :)
  4. If you set ProductCode as * and leave UpgradeCode as a fixed GUID, you don't have to write a new upgrade installer for each upgrade, because your MSI is both a new installation installer as well as an upgrade installer. To help control this you need to understand the Upgrade and UpgradeVersion elements.

Some more tricks here.

Si

related questions