At least as of WiX 3.0, candle doesn't like !(loc.*) either. *Sigh*

Looks like the only way to do what I want is to use a preprocessor variable. 
That means that it doesn't get included in the WixLib and I need to <?include?> 
the "template" file in my *.wixproj. Oh well...

Edwin G. Castro
Software Developer - Staff
Electronic Banking Services
Fiserv
Office: 503-746-0643
Fax: 503-617-0291
www.fiserv.com
Please consider the environment before printing this e-mail


> -----Original Message-----
> From: Blair [mailto:os...@live.com]
> Sent: Tuesday, June 22, 2010 1:48 AM
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: Re: [WiX-users] Using WixVariables to Pass Build-Time
> Information to a WixLib
> 
> In 3.0, all !(bind.*) variables are generated by the binder itself (I
> think
> all of them are file information values) while !(wix.*) values can be
> declared in .wxs/.wxi files using the <WixVariable> element or on
> light's
> commandline (which is populated by <WixVariables> elements in
> MSBuild/Votive).
> 
> See http://wix.sourceforge.net/manual-wix3/light.htm for the !(bind.*)
> variables that are defined (as of latest public 3.5 build) or the
> equivalent
> page in your wix.chm for the variables defined in your build.
> 
> BTW, all three namespaces (bind, wix, and loc) are treated by the same
> code
> at about the same time, but are populated by three different
> "repositories".
> 
> -----Original Message-----
> From: Castro, Edwin G. (Hillsboro) [mailto:edwin.cas...@fiserv.com]
> Sent: Monday, June 21, 2010 6:24 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] Using WixVariables to Pass Build-Time Information
> to a
> WixLib
> 
> I'm using WiX 3.0.5419.0.
> 
> I have a WixLib with a handful of shared infrastructure for our
> installers.
> Because this WixLib is shared among a number of projects I need to
> build the
> WixLib separately. One of the pieces of infrastructure is a nearly
> complete
> Product section. Mostly it is missing a handful of pieces of
> information
> that I provide on a per-setup basis using WixVariables:
> 
> <Product Id="*" Name="!(wix.ProductName)"
> Version="!(wix.AssemblyVersion)"
> ...>
> ...
> </Product>
> 
> I'm running into a problem. Candle doesn't like !(wix.AssemblyVersion).
> It
> doesn't complain when I use !(bind.AssemblyVersion) though.
> 
> As I understand it, binder variables are very similar to WixVariables
> but
> they are not defined until just before the binder generates a MSI. The
> documentation suggests that I can define custom binder variables but I
> can't
> seem to figure out how to do that.
> 
> I changed my WixLib to:
> 
> <Product Id="*" Name="!(wix.ProductName)"
> Version="!(bind.AssemblyVersion)"
> ...>
> ...
> </Product>
> 
> This now compiles but light gives me an error:
> 
> error LGHT0298: Unresolved bind-time variable !(bind.AssemblyVersion).
> 
> My product has the following:
> 
> <?include ..\..\..\AssemblyVersion.wxi?>
> <WixVariable Name="ProductName" Value="$(var.ProductName)"/>
> <WixVariable Name="AssemblyVersion" Value="$(var.AssemblyVersion)"/>
> 
> Where $(var.ProductName) is defined in DefineConstants in the *.wixproj
> and
> $(var.AssemblyVersion) is defined in the included AssemblyVersion.wxi.
> Unfortunately, I still get the same error from light.
> 
> I thought I had read somewhere that I need to specify custom binder
> variables at the command line but I can't find where I thought I read
> that
> nor anything that says how to specify custom binder variables. I tried
> to
> set the WixVariables MSBuild property in the *.wixproj which produces
> the
> appropriate command line option (-dAssemblyVariable=1.2.3) but that
> doesn't
> help. I think the WixVariables property accomplishes the same thing as
> the
> <WixVariable/> element and thus does not constitute a bind-time
> variable.
> 
> The WiX help file says the following about custom binder variables:
> 
> "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)"
> 
> That suggests that I should be able to use my original approach using
> <WixVariable/> and/or pass it on the command line to light using the -d
> switch (WixVariables MSBuild property).
> 
> What is the difference between !(wix.VariableName) and
> !(bind.VariableName)?
> 
> How do I specify a value for !(bind.AssemblyVersion)?
> 
> Edwin G. Castro
> Software Developer - Staff
> Electronic Banking Services
> Fiserv
> Office: 503-746-0643
> Fax: 503-617-0291
> www.fiserv.com<http://www.fiserv.com/>
> P Please consider the environment before printing this e-mail
> 
> -----------------------------------------------------------------------
> -----
> --
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 
> -----------------------------------------------------------------------
> -------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to