What I meant is if you do something like this:

heat.exe dir path\todir -var var.SourceDir -out file.wxs

then you can specify SourceDir at compile time via a preprocessor variable:

candle -dSourceDir=path\todir ...

I set the preprocessor variables in the project's *.wixproj file.

The benefit I see is that I don't have to process heat's output prior to 
compiling it.

The files don't get resolved until link time anyway, so using the -b option to 
light.exe seems equally as good but assumes all your files are rooted in the 
same location. If you have multiple sources generated by heat then controlling 
their SourceDirs using preprocessor variables might be easier.

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: Sascha Beaumont [mailto:sascha.beaum...@gmail.com]
> Sent: Monday, June 08, 2009 10:08 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] heat / "SourceDir"
>
> That's kinda what I'm already doing (but with a .wxi instead)
>
> ... <?define XYZSrc="..\..\blah\src" ?> ...
> ... <File Id="xyz" KeyPath="yes" Source="$(var.XYZSrc)\myapp.exe" />
> ...
>
> compared to:
>
> light.exe -b ..\..\blah\src
>  ... <File Id="xyz" KeyPath="yes" Source="SourceDir\myapp.exe" /> ...
>
> Specifically I'm interested if there is any documentation on how Light
> deals with the replacement of "SourceDir", can that be anything and it
> will just look for "myapp.exe" in any folder passed with "-b", how does
> it handle subdirectories, etc. I'm not sure if I'm missing something in
> the docs, or if the behavior isn't fully documented :)
>
>
> Sascha
>
> On Tue, Jun 9, 2009 at 2:41 PM, Castro, Edwin G. Castro
> (Hillsboro)<edwin.cas...@fiserv.com> wrote:
> > Take a look at the -var option for heat.exe. If you give it '-var
> var.xyz' then it will do the "search/replace" for you.
> >
> > I don't think there are any problems with using the feature but I
> could be wrong.
> >
> > Edwin G. Castro
> > Software Developer - Staff
> > Electronic Banking Services
> > Fiserv
> > Office: 503-746-0643
> > Fax: 503-617-0291
> > www.fiserv.com
> > P Please consider the environment before printing this e-mail
> >
> >
> >> -----Original Message-----
> >> From: Sascha Beaumont [mailto:sascha.beaum...@gmail.com]
> >> Sent: Monday, June 08, 2009 9:36 PM
> >> To: General discussion for Windows Installer XML toolset.
> >> Subject: [WiX-users] heat / "SourceDir"
> >>
> >> Hi,
> >>
> >> I recall in a recent thread that heat generated .wxs files will
> >> search for files with the path "SourceDir\..." in folders specified
> >> with the "-b" switch to light, but can't find anything in the
> >> documentation about this feature/
> >>
> >> Currently I'm just doing a search/replace and replacing "SourceDir\"
> >> with a $(var.xyz) preprocessor variable on the heat output, is there
> >> any benefit/problems with either method?
> >>
> >> Sascha
> >>
> >> --------------------------------------------------------------------
> -
> >> --
> >> -------
> >> Crystal Reports - New Free Runtime and 30 Day Trial Check out the
> new
> >> simplified licensing option that enables unlimited royalty-free
> >> distribution of the report engine for externally facing server and
> >> web deployment.
> >> http://p.sf.net/sfu/businessobjects
> >> _______________________________________________
> >> WiX-users mailing list
> >> WiX-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wix-users
> > ---------------------------------------------------------------------
> -
> > -------- Crystal Reports - New Free Runtime and 30 Day Trial Check
> out
> > the new simplified licensing option that enables unlimited
> > royalty-free distribution of the report engine for externally facing
> > server and web deployment.
> > http://p.sf.net/sfu/businessobjects
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to