Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

windows installer - WiX Heat.exe Win64 Components - Win64="yes"

I'm building an installer at the moment that targets just 64bit machines. Part of the process involves running Heat.exe to produce a Fragment elements containing part of the deployed application.

The problem is the components that are produced by heat produce ICE:80 errors which is WiX complaining that the components target 32bit systems and my installer is trying to load these into:

<Directory Id="ProgramFiles64Folder">

Looking at the documentation there is a -platform switch that can be used to tell Heat that we are targeting an x64 environment however there is no clue in the documentation on how to use this switch. I've tried:

-platform=x64

-platform=Win64

Nothing seems to effect the output in order to set the Win64 attribute on the generated components. Has anyone figured this out? Or am I barking up the wrong tree entirely?

If I manually edit the harvested components to add Win64="yes" the ICE error goes away.

In my <Product> element I have Platform="x64" as I understand it candle should take this and work out that the components should be set to x64 by default but this isn't working it seems.

Very confused.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I also had this problem. Below is what I've done and it helped.

1)

Open .wixproj file in notepad and manually change Condition-s in PropertyGroup-s to be "x64" instead of "x86":

<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
...
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
...
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
...

2)

Go to Configuration Manager for the solution and make sure that x64 is chosen as the platform for the Wix project.

Although Heat still generates Component nodes without Win64="yes", but it builds ok and installs to the C:Program Files!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...