[wix-users] Features that share installation paths
Joseph L. Casale
jcasale at activenetwerx.com
Sat Jan 7 09:14:18 PST 2017
Hi Blair,
No identical files, just similar destination base paths.
For now I pass a transform to drop the outermost containing DirectoryRef with ID='TARGETDIR'
then convert all of its Directory elements to DirectoryRef elements, the IDs are known as they
are the directory name capitalized so it's pretty basic.
The downside is when a new feature is added, I possibly have to extend the Directory
fragment in the main product.wxs.
This seemed to be the simplest however I imagine there is a better way still.
Thanks,
jlc
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Blair Murri
Sent: Friday, January 6, 2017 2:18 PM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Features that share installation paths
The reason I asked is because if you have multiple rows in the File table in your MSI referencing files of the same name in the same directory you will have validation issues (warnings and/or errors) as that is not the model the original architects of MSI appear to have envisioned.
For identical files I'd recommend structuring the WXS files to maintain the file components each in their own fragments, associate those components with their features from one or more fragments separate from the any of the fragments containing the harvested components (both of which the harvester can be configured to do for you), and post processing the WXS to remove the duplicate components (fixing up the ComponentRefs as needed).
For any files that are actually different yet share the same name and directory one of the cleanest ways is to change the file names in the File/@Name attribute to make them unique, then create a "semi-custom action" that populates the MoveFile table based on the selected feature sets to either copy or rename the files to restore the needed names. Whether to copy or rename will depend on the level of disruption that an "unprompted" repair of your product might cause, due to renamed files appearing to be missing after installation completes.
Sent from my Windows 10 phone
From: Joseph L. Casale<mailto:jcasale at activenetwerx.com>
Sent: Friday, January 6, 2017 10:14 AM
To: 'WiX Toolset Users Mailing List'<mailto:wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Features that share installation paths
> Are those shared paths identical files, or different files of the same name that vary by feature selection?
Hi Blair,
They are shared paths. I only declare the installation root in the primary wxs file.
As this is merely an admin helper package with the contents maintained in desperate
git repos, I do not maintain the nested hierarchy in the installer. I recognize this is
not a typical scenario so if a facility to make this work does not exist, I can maintain a
reference in the WXS but I had hoped to avoid this just for this package.
Thanks,
jlc
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list