[wix-users] use WixVariables recursively?
Rob Mensching
rob at firegiant.com
Fri Jul 27 02:52:43 PDT 2018
I always prefer bind paths: http://wixtoolset.org/documentation/manual/v3/howtos/general/specifying_source_files.html
_____________________________________________________________
Short replies here. Complete answers over there: http://www.firegiant.com/
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Reuss, Matthias via wix-users
Sent: Friday, July 27, 2018 2:37 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Reuss, Matthias <matthias.mr.reuss at sivantos.com>
Subject: [wix-users] use WixVariables recursively?
Hello,
For setting some source paths, I have used preprocessor variables so far, which I set up recursively:
<?define ProjectRoot="$(var.SolutionDir)..\"?>
<?define OutputFolder="$(var.ProjectRoot)Output"?>
<?define CustomDllPath="$(var.OutputFolder)\Installation\bin\$(var.Configuration)\"?>
Now I would like to use WixVariables instead. I put these together with some other globally valid elements into a wixlib:
<Fragment>
<WixVariable Id="ProjectRoot" Value="$(var.SolutionDir)\.."/>
<WixVariable Id="OutputFolder" Value="!(wix.ProjectRoot)\output"/>
<WixVariable Id="CustomDllPath" Value="!(wix.OutputFolder)\Installation\bin\$(var.Configuration)"/>
<Binary Id="CustomAction.dll" SourceFile="!(wix.CustomDllPath)\MyCustomActions.CA.dll" /> </Fragment>
In my product.wxs file, I then refer this fragment:
<CustomAction Id="MyCA" BinaryKey="CustomAction.dll" DllEntry="MyCA" Execute="firstSequence" />
<InstallExecuteSequence>
<Custom Action="MyCA" After="AppSearch" />
</InstallExecuteSequence>
This gives me the light error
error LGHT0103: The system cannot find the file '!(wix.OutputFolder)\Installation\bin\Release\MyCustomActions.CA.dll'.
If I modify my wixlib to not use the WixVariables recursively:
<Fragment>
<WixVariable Id="ProjectRoot" Value="$(var.SolutionDir)\.."/>
<WixVariable Id="OutputFolder" Value="$(var.SolutionDir)\..\output"/>
<WixVariable Id="CustomDllPath" Value="$(var.SolutionDir)\..\output\Installation\bin\$(var.Configuration)"/>
<Binary Id="CustomAction.dll" SourceFile="!(wix.CustomDllPath)\MyCustomActions.CA.dll" /> </Fragment>
my product builds fine.
So it seems to me that the binder does not resolve these WixVariables recursively, which would be very helpful e.g. in order to define a source directory tree.
I have not found anything about this in the documentation.
Is there another possibility to define a source directory tree without having to rely on preprocessor variables?
Best regards
Matthias Reuss
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list