[WiX-users] Directories and Components

2007-07-23 Thread Ian Stevenson
Hi There,

I'm just wondering if there is an easier way to do this. You see, the
product I'm installing has many directories containing files. My current
understanding is that seeing 'Component' elements can not have
'Directory' elements as children, I must create a new component for
every directory that is going to contain files. Then following this, I
must obviously make sure I add every single component via 'ComponentRef'
elements in my 'Feature'.

So I end up with something like

!-- Directory of say c:\Program Files\My App --
Directory ...
  Component Id='Component1' ...
File ... /
File ... /
  /Component
  !-- Directory of say c:\Program Files\My App\Dir1 --
  Directory ...
Component Id='Component2'...
  File ... /
  File ... /
/Component
  /Directory
  !-- Directory of say c:\Program Files\My App\Dir2 --
  Directory ...
Component Id='Component3'...
  File ... /
  File ... /
/Component
  /Directory
/Directory

Feature ...
  ComponentRef Id='Component1' /
  ComponentRef Id='Component2' /
  ComponentRef Id='Component3' /
/Feature

But I think it would be tidier and easier to maintain if I could do
something like this:

Component Id='MainComponent'
  Directory ...
File ... /
File ... /
!-- Directory of say c:\Program Files\My App\Dir1 --
Directory ...
  File ... /
  File ... /
/Directory
!-- Directory of say c:\Program Files\My App\Dir2 --
Directory ...
  File ... /
  File ... /
/Directory
  /Directory
/Component

Feature ...
  ComponentRef Id='MainComponent' /
/Feature

Is this possible? Ie. is there a way to reduce the number of components
I must have? Or is the way I'm currently doing it the most efficient way
to do multiple directories?

Thank you,
Ian.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Directories and Components

2007-07-23 Thread John Hall
 Is this possible? Ie. is there a way to reduce the number of 
 components I must have? Or is the way I'm currently doing it 
 the most efficient way to do multiple directories?

Sadly a component can only contain files in one directory.

You could use heat to automate the gathering of the files to install -
it generates all the components and then a single ComponentGroup
containing all those components.

Cheers,
John

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Directories and Components

2007-07-23 Thread Bob Arnson
Ian Stevenson wrote:
 I'm just wondering if there is an easier way to do this. You see, the
 product I'm installing has many directories containing files. My current
 understanding is that seeing 'Component' elements can not have
 'Directory' elements as children, I must create a new component for
 every directory that is going to contain files. 

In MSI, a component cannot span directories. Because components are 
atomic, you want them as small as possible.

-- 
sig://boB
http://joyofsetup.com/



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users