使用WiX打包包含许多文件的安装程序 [英] Using WiX to package an installer with many files

查看:212
本文介绍了使用WiX打包包含许多文件的安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含数百个文件的WiX 3项目,我似乎无法弄清楚如何使用通配符将它们全部包含在内.我已经尝试过了:

I have a WiX 3 project that has hundreds of files, and I can't seem to figure out how to include them all using a wildcard. I have tried this:

heat.exe" dir ".\!Build" -gg -ke -template:fragment -out "Files.wxs"

这会生成一个片段.wxs文件,但是我不确定该如何处理.任何帮助将不胜感激.

This produces a fragment .wxs file, but I'm not sure what to do with it. Any help would be much appreciated.

推荐答案

尝试此命令

heat dir "Your_Directory" -gg -ke -template:Product -out "Files.wxs"

它将在生成的wxs文件{Files.wxs}中创建此结构:

It will create this structure in the generated wxs file {Files.wxs}:

<Fragment>
    <DirectoryRef Id="Files">
        <Component Id="Test.ico" Guid="{YOUR_GUID}">
            <File Id="Test.ico" Name="Test.ico" KeyPath="yes" Source="..[path to file]\Test.ico" />
        </Component>
    </DirectoryRef>
</Fragment>

您应该为每个文件得到一个文件,该文件位于您热切反对的目录中.完成此操作后,只需要将wxs文件添加到项目中,并确保已创建directoryref指向的目录.

You should get one for each file, that was in the directory that you ran heat against. Once that is done, you just have to add the wxs file to your project, make sure you have the directory that the directoryref points to is created.

这篇关于使用WiX打包包含许多文件的安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆