No. But you can specify the variable in the *.wixproj file. Set the 
DefineConstants element (or add to it). You'll need something like the 
following:

<DefineConstants>VariableName=Path\To\SourceDir</DefineConstants>

Please note that the debug configuration will likely have Debug defined in 
DefineConstants:

<DefineConstants>Debug;VariableName=Path\To\SourceDir</DefineConstants>

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: David Amey [mailto:da...@creative-engine.co.uk]
> Sent: Thursday, September 23, 2010 2:27 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Heat.exe
> 
> Thankyou Bob,
> 
> This now works fine!
> 
> Is it possible to set the variable within the main.wxs file so that candle 
> picks
> up the value though? Sorry if this is a stupid question!
> 
> 
> -----Original Message-----
> From: Bob Arnson [mailto:b...@joyofsetup.com]
> Sent: 23 September 2010 01:32
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Heat.exe
> 
>   On 22-Sep-10 18:11, David Amey wrote:
> > Basically I'm using heat to harvest a folder, simples. However I'm
> using the "-var" property in the command line (to replace the "sourceDir" in
> the output component's source attribute), using a variable declared in the
> main.wxs. This replaces the "sourceDir" as expected, but when it comes to
> candle to compile , it flags an error as if the variable isn't populated.
> 
> You have to define the values for any preprocessor variables you use in your
> source code. How you do that depends on how you run the compiler (e.g., -d
> on the command line or DefineConstants in MSBuild) but both are
> documented in WiX.chm.
> 
> --
> sig://boB
> http://joyofsetup.com/
> 
> 
> ------------------------------------------------------------------------
> ------
> Start uncovering the many advantages of virtual appliances and start using
> them to simplify application deployment and accelerate your shift to cloud
> computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances and start using
> them to simplify application deployment and accelerate your shift to cloud
> computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to