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

Reply via email to