[wix-users] Resolve $(env.) expression when defining compile-time variable
Hoover, Jacob
Jacob.Hoover at greenheck.com
Mon Jan 23 12:56:07 PST 2017
If you are compiling the .Net code, the proper answer is to add [Guid()] attributes on your COM visible classes so the CLSID's are consistent.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Helge Kruse
Sent: Saturday, January 21, 2017 3:54 AM
To: WiX Users <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Resolve $(env.) expression when defining compile-time variable
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