After trying out an example, I see the significance of the -var variable.

Regarding you example in using -var

   How can I replace the value of "Source" to a physical path of the root
folder (like c:\temp\test) without having to use a wix variable
var.MySource?  I am automating the generation of msi given a set of
installable files. I will be invoking these commands from .net program.

many thanks for your help on this..


On Wed, Dec 8, 2010 at 5:01 PM, Edwin G. Castro [via Windows Installer XML
(WiX) toolset] 
<ml-node+5816953-1419466290-306...@n2.nabble.com<ml-node%2b5816953-1419466290-306...@n2.nabble.com>
> wrote:

> Heat does not generate a <Product/> element.
>
> Heat /? shows the following documentation for -var:
>
>    -var <VariableName>  substitute File/@Source="SourceDir" with a
> preprocessor or a wix variable
> (e.g. -var var.MySource will become
> File/@Source="$(var.MySource)\myfile.txt" and
> -var wix.MySource will become File/@Source="!(wix.MySource)\myfile.txt"
>
> This does text transformation on the generated output wxs file. I created
> an empty text file called test.txt and used the following command line to
> harvest it using heat.exe:
>
> heat file test.txt -out test.wxs
>
> Here are the contents of test.wxs:
>
> <?xml version="1.0" encoding="utf-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>     <Fragment>
>         <DirectoryRef Id="TARGETDIR">
>             <Directory Id="dir22FE4E6795D49A83D8CC3F97AEACA344" Name="code"
> />
>         </DirectoryRef>
>     </Fragment>
>     <Fragment>
>         <DirectoryRef Id="dir22FE4E6795D49A83D8CC3F97AEACA344">
>             <Component Id="cmp5BA64E6B74419477D4B75A1E802397FC"
> Guid="PUT-GUID-HERE">
>                 <File Id="fil67D465DE6C69EA3B3CD0B7487E6132B6"
> KeyPath="yes" Source="SourceDir\code\test.txt" />
>             </Component>
>         </DirectoryRef>
>     </Fragment>
> </Wix>
>
> Notice that File/@Source="SourceDir\code\test.txt"
>
> If use -var like this:
>
> heat file test.txt -out test.wxs -var var.CodeDir
>
> Then I get this:
>
> <?xml version="1.0" encoding="utf-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>     <Fragment>
>         <DirectoryRef Id="TARGETDIR">
>             <Directory Id="dir22FE4E6795D49A83D8CC3F97AEACA344" Name="code"
> />
>         </DirectoryRef>
>     </Fragment>
>     <Fragment>
>         <DirectoryRef Id="dir22FE4E6795D49A83D8CC3F97AEACA344">
>             <Component Id="cmp5BA64E6B74419477D4B75A1E802397FC"
> Guid="PUT-GUID-HERE">
>                 <File Id="fil67D465DE6C69EA3B3CD0B7487E6132B6"
> KeyPath="yes" Source="$(var.CodeDir)\code\test.txt" />
>             </Component>
>         </DirectoryRef>
>     </Fragment>
> </Wix>
>
> Notice that File/@Source="$(var.CodeDir)\code\test.txt" just like the
> documentation says.
>
> In a <Product/> element is *not* generated in either example.
>
> 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: sangeeta1 [mailto:[hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=5816953&i=0>]
>
> > Sent: Wednesday, December 08, 2010 12:25 PM
> > To: [hidden email]<http://user/SendEmail.jtp?type=node&node=5816953&i=1>
> > Subject: [WiX-users] Heat.exe - How to pass Product Manufacturer, Name,
> > Title, version
> >
> >
> > Hi all,
> >
> >    I am trying to generate a wxs source file using Heat.exe and wanted to
>
> > check if I can pass values for Manufacturer, Name, Title and version to
> > heat.exe? I tried using -var argument, but does nt seem to update it to
> the
> > source file
> >
> > heat.exe dir c:\temp\Configuration\Files -ag -cg MyComp -ag -gg -g1 -ke
> -var
> > Product/@Manufacturer=" <Product/@Manufacturer=%22>ABCD" -
> > template product -out c:\temp\Configuration\wixauto\mainsource.wxs
> >
> >
> > thanks!
> >
> > --
> > View this message in context: http://windows-installer-xml-wix-
> > toolset.687559.n2.nabble.com/Heat-exe-How-to-pass-Product-
> > Manufacturer-Name-Title-version-tp5816654p5816654.html
> > Sent from the wix-users mailing list archive at Nabble.com.
> >
> ------------------------------------------------------------------------------
>
> > This SF Dev2Dev email is sponsored by:
> >
> > WikiLeaks The End of the Free Internet
> > http://p.sf.net/sfu/therealnews-com
> > _______________________________________________
> > WiX-users mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5816953&i=2>
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> ------------------------------------------------------------------------------
>
> This SF Dev2Dev email is sponsored by:
>
> WikiLeaks The End of the Free Internet
> http://p.sf.net/sfu/therealnews-com
> _______________________________________________
> WiX-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5816953&i=3>
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------
> View message @
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Heat-exe-How-to-pass-Product-Manufacturer-Name-Title-version-tp5816654p5816953.html
> To start a new topic under wix-users, email
> ml-node+687560-220571316-306...@n2.nabble.com<ml-node%2b687560-220571316-306...@n2.nabble.com>
> To unsubscribe from wix-users, click 
> here<http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=687560&code=c25tc25tMTBAZ21haWwuY29tfDY4NzU2MHwtODkyOTExNTcy>.
>
>

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Heat-exe-How-to-pass-Product-Manufacturer-Name-Title-version-tp5816654p5817870.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to