I have a similar setup, but I use an old utility called 'mallow' to generate my 
files.wxs (in auto-generates unique GUIDs all by itself, and I've been too lazy 
to change everything around.) Anyhoo, it should be roughly the same. The gist 
of it is that I encompassed all my on-the-fly components into one more giant 
component group, then I just reference that.

In my 'tweaking' of the files.wxs file after it's generated I take all the 
components and put them into a component group. Then I have a DirectoryRef for 
my main install directory. So my fragment looks something like this:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Fragment>
    <ComponentGroup Id="AllFiles" >
      <ComponentRef Id="component" />
      <ComponentRef Id="assets" />
      <ComponentRef Id="assetsEn_us" />
        ...
    </ComponentGroup>
    ...
    <DirectoryRef Id="INSTALLDIR">
      <Component Id="component" Guid="F9971885-8150-476C-86AE-EC693A59C8DF" 
DiskId="1">
        ...
        </Component>
        ...
    </DirectoryRef>
  </Fragment>
</Wix>

In my main file, then, I have references to both of these (ComponentGroup and 
Directory). My Feature also contains website stuff and other components I have 
defined here in the 'parent':

<Feature Id="MainFeature" Level="1" ConfigurableDirectory="INSTALLDIR">
  <ComponentGroupRef Id="AllFiles" />
  <ComponentRef Id="DefaultWebSiteComponent" />
  <ComponentRef Id="EditWebConfig" />
</Feature>

Lastly, down below I have, basically, and empty directory that references the 
structure in the other file but contains the other components:

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="MyWebsiteRoet" Name="MyWebsiteRoot">
                <Directory Id="INSTALLDIR" Name="AwesomeWebsite">
                    <Component Id="DefaultWebSiteComponent" Guid="" 
KeyPath="yes">
                        <iis:WebSite ...>
                        </iis:WebSite>
                    </Component>
                    <Component Id="EditWebConfig" Guid="" KeyPath="yes">
                        <util:XmlFile .../>
                    </Component>
                </Directory>
            </Directory>
        </Directory>

It took me a while to get the hang of it, but you basically end up with pars of 
'ref' and 'non-ref' tags, if that makes sense, which have to be in different 
files. I have the ComponentGroup and DirectoryRef in the files.wxs file, so I 
have to have the complimentary ComponentGroupRef and Directory tags in the 
parent.

Hope that all made sense.


-Matt


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of S C
Sent: Wednesday, May 09, 2007 12:26 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Multiple Wxs Merge in Visual Studio?


Using WiX v3 and Votive.

I have a .wixproj in my .sln.

I have a pre-build event that uses robocopy to get all files that make up a 
web application project into a clean directory, then heat to create a 
"files.wxs", then globally replace the "YOUR-GUID-HERE" to a "*" (that means 
the final MSI will not support upgrades only un/installs right?) in the 
file. The generated/massaged file ends up within the .wixproj's directory 
structure.

I have "parent" .wxs file with core information about setting up IIS that is 
part of the project and it builds a clean MSI all by itself.

How can I combine the two .wxs without having to touch/edit the <Feature> 
tag within the "parent" .wxs, within Visual Studio? I can't hardcode a lot 
of <ComponentRef> parts in the parent because the web site filesystem can 
change a lot.

I've Googled all over the place for info on <Fragment> and <include> but I 
must be missing something....

Thanks.

_________________________________________________________________
Like the way Microsoft Office Outlook works? You'll love Windows Live 
Hotmail. 
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to