如何在wix文件中包括热量的输出? (没有Visual Studio项目) [英] How to include the output of heat in a wix file? (No Visual Studio project)

查看:92
本文介绍了如何在wix文件中包括热量的输出? (没有Visual Studio项目)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要构建一个安装程序,由于各种原因,我想避免使用WiX项目模板.我非常高兴自己编写脚本,并且已经有一个适合的自定义构建过程.

I need to build an installer and, for a variety of reasons, I would like to avoid using the WiX project template. I'm perfectly happy to script this stuff myself and already have a custom build process for this to fit into.

我相信我很好地了解了WiX蜡烛,加热和照明工具的作用,我熟悉wxs文件格式,并且可以进行加热以生成所需的文件片段输出.但是我不知道如何将其合并到我的wxs文件中.大概在某个时候我会在wxs中引用文件片段文件...但是我不太清楚这里的正确语法是什么.

I believe I understand the role of WiX candle, heat, and light tools fine, I'm getting familiar with the wxs file format, and I can run heat to produce the file fragment outputs that I want. I have no idea however how to incorporate that into my wxs file. Presumably at some point I would have a reference in the wxs to the file fragment file...but I can't quite figure out what the right syntax is here.

推荐答案

在描述目标目录结构的wxs文件中,在TARGETDIR下添加一个目录节点,如下所示:

In your wxs file where you describe the target directory structure, add a directory node under TARGETDIR, like this:

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="DYNAMIC" Name="Dynamic">

在wxs文件中,其中列出了功能的参考组件,添加组件组参考:

In your wxs file where you list referenced components for your features, add a component group reference:

<Feature Id="MyFeature">
    <ComponentGroupRef Id="MyComponentGroup"/>

像这样调用热量(向您的幻想添加更多参数):

Call heat like this (add more parameters to your fancy):

"C:\WIX\bin\heat.exe" dir "C:\SourceDir" -cg MyComponentGroup -ke -srd -dr DYNAMIC -sfrag -o "C:\MyProject\Dynamic.wxs"

将此Dynamic.wxs添加到您的Candle呼叫中.将其结果(wixobj)添加到您的Light调用中.

Add this Dynamic.wxs to your Candle call. Add its result (wixobj) to your Light call.

这篇关于如何在wix文件中包括热量的输出? (没有Visual Studio项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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