Wix Heat 输出没有像我想要的那样引用目录
这是基本设置。我有一个现有的 WIX 项目,它将一堆单独的片段构建到更大的 MSI 中。我正在尝试更改该项目,以允许您选择要安装的各个部分。我运行的程序是,当我在较小的目录上运行 heat 以创建各个组件时,源路径不正确。我将举一个例子,希望这会更有意义。
所以我有这样的基本文件夹结构:
C:\ProjDir\Foo\Bar1
C:\ProjDir\Foo\Bar2
我曾经使用一个命令来简单地收获 C:\Foo (Heat.exe dir Foo -dr FOO_DIR_REF -out File.wxs),现在我将其更改为收获每个单独的 Bar 文件夹(Heat.exe dir Foo\Bar1 -dr BAR1_DIR_REF -out File1.wxs) 和 (Heat.exe dir Foo\Bar2 -dr BAR2_DIR_REF -out File2.wxs)。我遇到的问题是收获的输出如下所示:
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="SourceDir\Bar1\file.here" />
</Component>
当尝试构建 msi 时,它会抱怨因为找不到 SourceDir\Bar1。基本上我需要的是一种让它看起来像这样的方法:
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="SourceDir\Foo\Bar1\file.here" />
</Component>
这似乎是一个非常简单的问题,我确信很容易完成,但我所做的所有搜索都没有提出任何有用的东西。
So here's the basic setup. I have an existing WIX project that builds a bunch of individual fragments in to a larger MSI. I'm trying to change the project around to allow you to select individual pieces to install. The program I've run in to is that when I run heat on the smaller directories to create the individual components, the Source path isn't correct. I'll give an example as hopefully that will make more sense.
So I have basic folder structure like this:
C:\ProjDir\Foo\Bar1
C:\ProjDir\Foo\Bar2
I used to a command to simply harvest C:\Foo (Heat.exe dir Foo -dr FOO_DIR_REF -out File.wxs), and now I've changed it to to harvest each individual Bar folder (Heat.exe dir Foo\Bar1 -dr BAR1_DIR_REF -out File1.wxs) and (Heat.exe dir Foo\Bar2 -dr BAR2_DIR_REF -out File2.wxs). The problem I'm having is that the output of the harvest looks like this:
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="SourceDir\Bar1\file.here" />
</Component>
And when trying to build the msi it complains because it can't find SourceDir\Bar1. Basically what I need is a way to make it look something like this:
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="SourceDir\Foo\Bar1\file.here" />
</Component>
This seems like a very simple problem, that I'm sure is easily done, but all the searching I've done has not come up with anything useful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请注意,如果您使用
-b
将附加SourceDir
添加到搜索路径,light
将会搜索您的文件的其他SourceDir
,例如
Note that
light
will search additionalSourceDir
's for your file if you add them to the search path with-b
e.g.
它应该是
不同的可用属性是
It should be
Different properties available are
您的问题的答案都在 heat.exe 帮助文本中。 :-)
为了最终获得正确的目录收集,请将热力指向根目录 (Foo),并在命令行中指定
-srd
开关。正如帮助文本所述,这将省略根目录收获,您很可能最终会得到您需要的东西。为了获得更大的灵活性,您可以指定
-var
开关提供 WiX 变量,以替换SourceDir
显式语句。同样,只需运行heat.exe
并查看输出 - 您将找到足够的信息和示例。The answer to your question is all in heat.exe help text. :-)
In order to end up with correct directory harvesting, point the heat to your root directory (Foo), and specify the
-srd
switch in the command line. As the help text states, this will omit root dir harvesting and you'll most likely end up with what you need.For even more flexibility, you can specify
-var
switch providing the WiX variable which is to replace theSourceDir
explicit statement. Again, just runheat.exe
and look through the output - you'll find enough info and examples.