Using Heat multiple times => Duplicate symbols

InstallerGeek created the topic: Using Heat multiple times => Duplicate symbols
Hello all,

I am using heat to generate the source for two .wixlibs which are lighted together with some other pieces to form my final MSI. Heat is used on two different directories at build time. One of these directories holds all of my language specific files “/localized/” and the other holds all of my language neutral files “/neutral/”. Creating a setup this way allows me to generate the language neutral .wixlib just once for every locale I support.
The problem is that the directory structure within those directories has some (but not complete) overlap. e.g.

localized
foo
greeneggs
bar

neutral
foo
ham

becomes on the user’s computer
installdir
foo
greeneggs
ham
bar

This gives me a duplicate symbol error at foo when I try to link the two wixlibs together. I can’t just throw away the directory fragments from one heat run because neither structure is a subset of the other. I also don’t want to tell light to suppress the duplicate symbols error (and I don’t know that that will produce a working MSI). Really the only solution I’ve come up with is to use XSLT to eliminate all of the directory elements from the first two runs and then run heat again against the combined result and use XSLT on that third run to eliminate all of the non-directory elements.

That seems suboptimal at best. Anyone have any better ideas?

applicationPackaging replied the topic: Re: Using Heat multiple times => Duplicate symbols
Hi Kyle,

What about using the XSLT to change the duplicate elements to elements, and define the directory structure once, in another file?

I do something like this when I first create a setup project–I do not use HEAT dynamically at build time. I like to have the directory structure laid out in one place where it’s easier to visualize how it will look on the target system.

applicationPackaging replied the topic: Re: Using Heat multiple times => Duplicate symbols
How about using XSLT to change the into in the localized wixlib’s wxs file from heat?

InstallerGeek replied the topic: Re: Using Heat multiple times => Duplicate symbols
Yeah, this is more or less what I’m doing. The issue is that I still need to define the directory structure somewhere. Zach suggests defining it manually which is probably the best solution but unfortunately isn’t really an option for what I’m doing. What would be ideal is if light would handle a duplicate symbol definition if the symbols are identical (same ID and attributes, etc.) by outputting the symbol once instead of choking. Of course, there may be good reasons I haven’t thought of not to do that – I’m not sure. I’m hoping that someone has solved the same problem in a manner that avoids this problem.

applicationPackaging replied the topic: Re: Using Heat multiple times => Duplicate symbols
Looking at your situation, this is what looks to me to be your solution:

1- I’m assuming that your transformed heat outputs don’t have any Directory elements with an Id of either localized or neutral. Remove them if they exist in your transform.
2- Under your Product element (or some other manually authored location that is linked into your final MSI):




3- In your transformed localized sources from heat:









4- In your transformed neutral sources from heat:






So your transform will need to look at the directory tree that heat produces and transform that to get the above results (by altering at and above the level of the children of installdir and leaving the others unless you start creating some of them as well).

If you have files in installdir as well as the above subdirs you will need to also declare a DirectoryRef for that directory so that the fragment(s) from heat can be linked into your wixlibs. The only directories you have to transform/manually deal with are those that are in common. The above lets you simply harvest the unique directories as they are laid out without having to manually deal with them.

InstallerGeek replied the topic: Re: Using Heat multiple times => Duplicate symbols
Hey Everyone,

Why can’t you heat the sub directories “greeneggs” and “ham” directly and use the -srd and -dr FOO switches? I do understand if there are additional sub directories this might be a bit more difficult. However, you could re-arrange your source directories to handle these issues if necessary, no?

Tagged :

Heat.exe

InstallerGeek created the topic: heat.exe
Hi,
I have some problems to migrate from WIX 3.0.4707 to WIX 3.0.5419 because the arguments of HEAT.EXE changed.
usage: heat.exe harvestType harvestSource -o[ut] sourceFile.wxs What is meant with the new argument harvestSource?
The old command looks like this:
“C:\Program Files\Windows Installer XML v3\bin\heat.exe” dir “..\..\~tmp\j2build3v_win\apps” -gg -sfrag -scom -sreg “$(ProjectDir)..\..\..\~tmp\j2build3v_win\apps\eu” -out “$(ProjectDir)gen_fragment.wxs” -template:fragment How can I convert it to the new implemtation of HEAT?

InstallerExpert replied the topic: Re: heat.exe
Hi,
I have some problems to migrate from WIX 3.0.4707 to WIX 3.0.5419 because the arguments of HEAT.EXE changed.
usage: heat.exe harvestType harvestSource -o[ut] sourceFile.wxs What is meant with the new argument harvestSource?
The old command looks like this:
“C:\Program Files\Windows Installer XML v3\bin\heat.exe” dir “..\..\~tmp\j2build3v_win\apps” -gg -sfrag -scom -sreg “$(ProjectDir)..\..\..\~tmp\j2build3v_win\apps\eu” -out “$(ProjectDir)gen_fragment.wxs” -template:fragment How can I convert it to the new implemtation of HEAT?

InstallerExpert replied the topic: Re: heat.exe
I am in the midst of upgrading our product to be VS 2010 compatible. We’re using WIX to generate a .msi installer. I’ve upgraded to WIX 3.5.1309.0 and have run into a snag.

Specifically I’m having a problem with the HEAT tool in this version. It is having trouble working with our VS2010 converted .csproj files. Votive wants to automatically run this command line:

C:\Program Files\Windows Installer XML v3.5\bin\Heat.exe project “..\..\Common\ArtOfTest.Common.Design\ArtOfTest.Common.Design\ArtOfTest.Common.Design.csproj” -pog:Binaries -pog:Symbols -pog:Sources -pog:Content -pog:Satellites -pog:Documents -ag -sfrag -out obj\Release\_ArtOfTest.Common.Design.wxs

If I manually run this at the command line and point it to the working VS2008 .csproj file I get the expected output file just fine. But if I point it to the converted VS2010 .csproj file (which does compile and generates a .dll in VS2010 no problem), nothing gets output. There’s no error message of any kind either. I tried adding the -verbose switch and that didn’t add any output either. Absolutely nothing comes out (no generated output, no error message of any kind, etc.). Nothing is put in the Event Viewer/Application log either. I am stumped as to why I am not getting any output.

Is there any more information I can give to help? Here is the contents of one of my converted .csproj files (trimmed slightly to hide most of our source code file names):




Debug
AnyCPU
9.0.30729
2.0
{13C244B1-E0E7-41FD-9118-D2CD8A567102}
Library
Properties
ArtOfTest.Common.Design
ArtOfTest.Common.Design
v3.5
512








true
ArtOfTest.Common.Design.snk
3.0.1927.0


3.5

false
publish\
true
Disk
false
Foreground
7
Days
false
false
true
0
1.0.0.%2a
false
true


true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4


pdbonly
true
bin\Release\


prompt
4



False
..\..\..\..\..\..\..\..\..\..\Windows\assembly\GAC_MSIL\ArtOfTest.Common\2.0.8.0__14a0200bfcbb7b62\ArtOfTest.Common.dll


3.0


3.0


3.0



3.5



3.0


3.0



3.5


3.5




3.0


3.0




Component



True
True
Resources.resx




GetString.cs




ResXFileCodeGenerator
Resources.Designer.cs


GetString.cs


DataDrivenPropertyEditorControl.cs
Designer







MSBuild:Compile
Designer
MSBuild:Compile
Designer


MSBuild:Compile
Designer
MSBuild:Compile
Designer


Designer
MSBuild:Compile
MSBuild:Compile
Designer





























MSBuild:Compile
Designer
MSBuild:Compile
Designer


MSBuild:Compile
Designer
MSBuild:Compile
Designer


MSBuild:Compile
Designer
MSBuild:Compile
Designer




False
.NET Framework 3.5 SP1 Client Profile
false


False
.NET Framework 3.5 SP1
true


False
Microsoft Visual Basic PowerPacks 10.0
true


False
Windows Installer 3.1
true





if $(ConfigurationName)==Debug “C:\Program Files\Microsoft SDKs\Windows\v6.0a\bin\gacutil.exe” /i $(TargetPath)

InstallerGeek replied the topic: Re: heat.exe
I’ve found HEAT doesn’t generate any output even for a brand new empty VS2010 C# class library project. Here is what the output window contains when I try to build a simple installer containing only the brand new empty VS2010 C# class library project:

InstallerExpert replied the topic: Re: heat.exe
I see two directories listed below. You should only have one.

“C:\Program Files\Windows Installer XML v3\bin\heat.exe” dir “..\..\~tmp\j2build3v_win\apps” -gg -sfrag -scom -sreg “$(ProjectDir)..\..\..\~tmp\j2build3v_win\apps\eu” -out “$(ProjectDir)gen_fragment.wxs” -template:fragment

Should be:
“C:\Program Files\Windows Installer XML v3\bin\heat.exe” dir “..\..\~tmp\j2build3v_win\apps” -gg -sfrag -scom -sreg -out “$(ProjectDir)gen_fragment.wxs” -template:fragment

OR:

“C:\Program Files\Windows Installer XML v3\bin\heat.exe” dir “$(ProjectDir)..\..\..\~tmp\j2build3v_win\apps\eu” -gg -sfrag -scom -sreg -out “$(ProjectDir)gen_fragment.wxs” -template:fragment

InstallerGeek replied the topic: Re: heat.exe
Is there a particular reason why Heat.exe is targeted and compiled specifically against the x86 architecture? I have seen a couple of questions about this around on the Internet but no firm answer or resolution. I briefly looked over the Heat code (v3.0.5419.0) and there does not seem to be anything specific that jumps out as being 64-bit incompatible. Then again, it was more a cursory glance than a walkthrough.

I am currently migrating our build and development environments to 64-bit. In this process, I’d also like to migrate our current setup projects to MSBuild using the WiX targets and the HeatProject task. I may try my hand at compiling the Heat project for 64-bit process architectures if that’s what it comes down to. Any help before it gets ugly would be much appreciated!

By the way, using a 64-bit version of MSBuild yields the expected BadImageFormatException from heat.exe.

InstallerExpert replied the topic: Re: heat.exe
On 1/13/2010 8:07 PM, Navid Azimi-Garakani wrote:
> Is there a particular reason why Heat.exe is targeted and compiled specifically against the x86 architecture?

Because an MSIL .exe runs as a 64-bit process on an x64 system, so it couldn’t load x86 DLLs. I suspect there’s a need for Heat64.

> I may try my hand at compiling the Heat project for 64-bit process architectures if that’s what it comes down to. Any help before it gets ugly would be much appreciated!
>

Should be pretty straightforward, just get an enlistment.

InstallerGeek replied the topic: Re: heat.exe
Not sure if it is that straight forward. I think the reason we keep punting this feature is the dependencies heat.exe has on the Wix core project (
sourceforge.net/tracker/index.php?func=d…d=105970&atid=642717
).

Tagged :