[wix-users] Purpose of Fragments
Phill Hogland
phill.hogland at rimage.com
Mon Aug 29 08:30:54 PDT 2016
I have not used wixedit, which appears to have been last updated in 2011, and it purports to support using wix 3.5. Since there are important security improvements in wix v3.10.3, I would not recommend building new projects based on the earlier wix releases.
I find that using Fragments is a very helpful way to author projects. So if the tool is limiting the use of Fragments that would be another reason to find a different tool. Specifically as it relates to the Directory tree, I find it helpful to use a WixLib much like you will find in src\Setup\CommonLib\Folders.wxs in the wix source and then use that WixLib in many different MSI packages. Notice how the directory tree is fragmented in that file, which provides a lot of flexibility for future changes.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Tyler Gustafson <tgustafson at solacom.com>
Sent: Monday, August 29, 2016 9:00:21 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Purpose of Fragments
I'm pretty new to the whole WiX thing and I was wondering if someone could explain the purpose of fragments to me.
>From what I can gather they are good for grouping your installer design into multiple files and I've also read a few discussions that indicate you might need to use them to allow a patch to contain only files which have changed as opposed to everything.
I like the idea of being able to use a GUI editor for WiX when I want to do a quick overview of everything and found this one which seems alright http://wixedit.sourceforge.net/ but it doesn't seem to handle fragments well and currently our installer is structured similar to the following:
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WINDOWSVOLUME" >
<Directory Id="INSTALLDIR" Name="company">
<Directory Id="PRODUCTDIR" Name="product">
<Directory Id="PLUGINSDIR" Name="plugins">
</Directory>
</Directory>
</Directory>
</Directory>
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]"/>
</Fragment>
<Fragment>
<ComponentGroup Id="PluginsComponents" Directory="PLUGINSDIR">
<Component Id="foo.dll" Guid="SOME-GUID">
<File Id="foo.dll" Name="foo.dll" Source="path/foo.dll" KeyPath="yes"></File>
</Component>
<Component Id="bar.dll" Guid=" SOME-OTHER-GUID ">
<File Id="bar.dll" Name="bar.dll" Source="anotherpath/bar.dll" KeyPath="yes"></File>
</Component>
</ComponentGroup>
</Fragment>
If I restructure the installer to be more like the following, my tool works but I'm not sure what the consequences might be. I am particularly interested in being able to make small patches but other pros, cons and tips about fragments are very much appreciated.
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WINDOWSVOLUME" >
<Directory Id="INSTALLDIR" Name="company">
<Directory Id="PRODUCTDIR" Name="product">
<Directory Id="PLUGINSDIR" Name="plugins">
<Component Id="foo.dll" Guid="SOME-GUID">
<File Id="foo.dll" Name="foo.dll" Source="path/foo.dll" KeyPath="yes"></File>
</Component>
<Component Id="bar.dll" Guid=" SOME-OTHER-GUID ">
<File Id="bar.dll" Name="bar.dll" Source="anotherpath/bar.dll" KeyPath="yes"></File>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
Thanks,
Tyler
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list