[wix-users] Resolve $(env.) expression when defining compile-time variable

Farrukh Waheed farrukh1 at gmail.com
Sun Jan 22 01:33:07 PST 2017


Just trying with quick guess:
Is this $(env.FOO) is user variable or System variable? If you are defining
it in your command prompt session, that is local to it, just make sure that
where HEAT is picking up %FOO%, Candle should be invoked in that same
 environment.
Or you can define %FOO% in your User's variable using: "Control
Panel-->System and Security-->System" and from System Properties dialog,
click on Environment Variables. (A restart may require to make it available
system wide).


On 21 January 2017 at 14:54, Helge Kruse <Helge.Kruse at gmx.net> wrote:

> Hello
>
> I author a setup that installs a setup of .NET binaries. Since theses
> implement COM classes and the CLSID changes with each compile, it's
> necessary to harvest the files with heat after compilation. It's also
> possible that files are renamed or added. So it's not possible to stick
> with a set of WXS output once created with heat.
>
> The components defined in the .wxs are used in different Setup Projects
> (creating MSI files). Therefore I used a XSLT script to change the root
> node of the files from <Wix xmlns="..."> to <Include>. In that form I
> use <?include?> to get the components in the WXS files of the Setup
> Projects.
>
> The setup shall be compiled on different workstations depending on the
> guy how made changes in these binaries, and probably add new file or
> rename a file. The path to the files that are used in heat is defined in
> workstation defined environment variables. Heat is invoked like this:
>
> heat dir %FOO%\Bin -srd -var var.Files -o FD_Files.wxi -gg -cg cmpFiles
> -dr INSTALLFOLDER -t Include.xslt
>
> This requires that candle is called with an option
>
>   -dFiles=%FOO%\bin
>
> in each Setup Project. I thinks this is a bot cumbersome when each Setup
> Project needs a (long) list of candle options that defines the actual
> path to the binaries. So I tried to write a common include file with
> compile-time variables defining these paths:
>
> <?xml version="1.0" encoding="utf-8"?>
> <Include>
>   <?define Files="$(env.FOO)\bin"?>
>   <!-- a lot more -->
> </Include>
>
> Unfortunately the expression $(env.FOO) get literally in the path so
> that results in a file-not-found error "$(env.FOO)\bin\hello.dll".
>
> Is there a way to resolve this expression that I write in the include
> file? Is there another way to define these path in a centralized
> location instead in each Setup Project configuration?
>
> Kind regards
> Helge
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list