Looks right. I'd check to see that your WixVariable is in the referenced code.

-----Original Message-----
From: Phill Hogland [mailto:phogl...@rimage.com] 
Sent: Wednesday, July 30, 2014 13:27
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] WixVariable and 'custom' bind variables

I would appreciate some assistance in understanding the use of 'custom bind 
variables'. From this link:
http://wixtoolset.org/documentation/manual/v3/overview/light.html

"You can create your own binder variables using the WixVariable element or by 
simply typing your own variable name in the following format:

!(bind.VariableName)
Custom binder variables allow you to use the same .wixobj files but specify 
different values when linking, similar to how localization variables are used. 
You might use binder variables for different builds, like varying the target 
processor architecture."

Based on the following post:
http://robmensching.com/blog/posts/2011/4/18/a-case-study-for-.wixlibs/

I am trying to solve the problem of many similar wxs files in many different 
projects.  So I created an 'un-bound' wixlib which has common src fragments, 
and no files.  I used to use preprocessor variables in some of these fragments, 
and I am trying to replace them with bind variables which are set in each host 
project.

So this line ( form a project which builds either as x86 or x64) used to use 
preprocessor variables, which I replaced with bind variables.
<SetProperty Id='INSTALLFOLDER' Value='[PRE.!(bind.PlatformINSTALLFOLDER)]'
After='AppSearch'>NOT (!(bind.PlatformINSTALLFOLDER))</SetProperty>

I also added this to the project:
<WixVariable Id="PlatformINSTALLFOLDER" Value="INSTALLFOLDER"
Overridable="yes"/>

(I had planed to use a preprocessor var in the above value, but even this does 
not compile.) "Unresolved bind-time variable"

So how does one define a 'custom' bind variable (to replace the use of a 
preprocessor variable so that the fragment can be included in a wixlib, to 
support code reuse)?  Thanks for any assistance.








--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/WixVariable-and-custom-bind-variables-tp7596114.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to