Yes, the Component Directory attribute is a reference to the Directory with matching Id. This pattern is used heavily in the WiX toolset. The Directory attribute isn't required when the Component element is nested under a Directory. The doc could be updated to note that a Component's Directory reference can be inherited from it's parent ComponentGroup Directory attribute (if present).
On Mon, Aug 12, 2013 at 1:25 AM, Lars Lars <laasu...@hotmail.com> wrote: > Hello, > > First of all, I am new to WIX so be gentle :-) Testing WIX to see if we > can use it in a project. Using Wix 3.7 on Windows 7 at the moment. > > The script below generate a working msi file but I am not fully sure how > it works and if it is a sensible setup. > > It appears Wix/Product/Feature/ComponentGroupRef refers to > Wix/Fragment/ComponentGroup which makes sense. > Then it appears Wix/Fragment/ComponentGroup/Component@Directory contains > same value as Wix/Product/Directory/Directory/Directory/Directory@Id. Do > the two attributes form an link between each other? > If I try to alter the content of either attribute I get 'error LGHT0094: > Unresolved reference to symbol 'Directory::Dir01' in section 'Fragment:'. > If I try to remove the Component/@Directory attribute I get "error > CNDL0010: the Component/@Directory attribute was not found; it is requried". > If they do form a link, it is not easy to understand based on naming or > documentation. The documentation for the Component element ( > http://wix.sourceforge.net/manual-wix3/wix_xsd_component.htm) says "Sets > the Directory of the Component. If this element is nested under a > Directory element, this value defaults to the value > of the parent Directory/@Id. ". The docs should be updated to say this > attribute is required. > > <?xml version="1.0" encoding="utf-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> > <Product Id="490F391C-336C-4a47-A7F6-587B2C92AC92" > Language="1033" > Manufacturer="MyManufacturer" > Name="MyName" > UpgradeCode="E5B47089-C70D-46bd-AA9C-D222CFE9A699" > Version="1.0.0.0"> > > <Package Compressed="yes" InstallerVersion="200" /> > <Media Id="1" Cabinet="product.cab" EmbedCab="yes" /> > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="ProgramFilesFolder"> > <Directory Id="INSTALLLOCATION" Name="MyCompany"> > <Directory Id="Dir01" Name="myInstallSubDir" /> > </Directory> > </Directory> > </Directory> > > <Feature Id="ProductFeature" Level="1" Title="MyTitle"> > <ComponentGroupRef Id="SourceComponent" /> > </Feature> > </Product> > > <Fragment> > <ComponentGroup Id="SourceComponent"> > <Component Id="cmp829B7EDF9835ECFBEB6B7A5E00D6B29F" > Directory="Dir01" Guid="*"> > > <File Id="filD32196FBAB143D1B642565E64AFE743C" > KeyPath="yes" > Source="$(var.SourceDir)\MyFile.ext" /> > </Component> > </ComponentGroup> > </Fragment> > </Wix> > > > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users