[wix-users] Problem doing a CopyFile in a fragment...
Lewis Henderson
henderso at opentext.com
Wed Jul 27 12:02:18 PDT 2016
Thanks for the reply Jacob,
I'm using 3.10.2.2516.
The $(var.CopyName) did work when both files were includes, but not as fragments. The problem is that the CopyFile statement is in the large list of components, which is now a fragment. The definitions of CopyName and the COPY_NAME property are in another fragment. This last could be (and used to be) an include, but then you have problem of how to have the "components" fragment pick up the include from different places, depending on which product is being installed.
When both files were includes, the base products included the "definitions" include from different places, but could then include the common "components" include.
I'm trying to move the CopyFile into its own component within the "definitions" fragment (where the $(var.CopyName) will work), but I get a problem with the DirectoryRef of the copied file. The specific error is:
error LGHT0204 : ICE18: KeyPath for Component: 'CopyOf...' is Directory: '...'. The Directory/Component pair must be listed in the CreateFolders table.
The directory, of course, is defined in the "components" fragment. Any ideas on how to get around this issue, or am I heading down the wrong path?
Lewis
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Wednesday, July 27, 2016 2:27 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Problem doing a CopyFile in a fragment...
What version of WiX are you using?
$(var.CopyName) should work, though you may need to include the include.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: Wednesday, July 27, 2016 12:44 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Problem doing a CopyFile in a fragment...
Hi Everyone,
I've got a problem with a shared fragment. I've got a CopyFile statement that makes a copy of a file with a different name depending on which product is being compiled. Formerly, this was done with <?include ...?> files, but I'm trying to clean up my act. The CopyFile statement looked something like this:
<File Id="..." Name="...">
<CopyFile Id="CopyOf..." DestinationName="$(var.CopyName).exe" />
</File>
Now, the CopyName variable is defined in another fragment, and comes up unresolved at compile time, even though the other fragment is resolved at link time with a PropertyRef. This worked when things were .wxi files, but not with fragments, so I changed it to use a property instead:
<CopyFile ... DestinationName="[COPY_NAME].exe" />
Where the other fragment that defines CopyName sets <Property Id="COPY_NAME" value="$(var.CopyName)", but this results in the file being copied as literally [COPY_NAME].exe, which isn't right. Because CopyFile defines DestinationName as a LongFileNameType, the property isn't being translated. It's this other fragment that changes based on the product being built.
So, does anyone have an idea how to change the DestinationName in the fragment based on a value the fragment can inherit at link time?
Thanks for any ideas.
Lewis
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=O4lvMTLaU9-83ZazgVOG4zWuPJ5alxa2lmR4cggCBjA&s=lYC_7UFlr7CjzGObd50ewhzk0Y2qEojwZ0kFBLtQaH0&e=
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=O4lvMTLaU9-83ZazgVOG4zWuPJ5alxa2lmR4cggCBjA&s=lYC_7UFlr7CjzGObd50ewhzk0Y2qEojwZ0kFBLtQaH0&e=
More information about the wix-users
mailing list