本文介绍了使用纯粹的 WIX 修补的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力纯粹使用 WIX 创建补丁,我希望有人能指导我朝着正确的方向前进.

I am struggling with creating a patch purely using WIX and I was hoping if someone could guide me in the right direction.

我有几百个源文件,我对它们进行加热以创建一个收获文件,然后使用蜡烛和灯光创建一个包.

I have a few hundred source files and I run heat against them to create a harvest file followed by creating a package using candle and light.

我需要更改一些配置文件,并使用更改创建第二个包.

I need to change a few configuration files and I create a 2nd package with the changes.

使用 Torch 和pyro 我创建了 .wixmst 文件,然后在尝试创建 msp 文件时,pyro 抱怨以下错误.

Using Torch and pyro I create the .wixmst file and then when trying to create the msp file, pyro complains with the following error.

pyro.exe : error PYRO0252 : 没有提供有效的转换来附加到补丁.检查以确保您在命令行上传递的转换具有在补丁中编写的匹配基线.此外,请确保您的目标和升级之间存在差异.

pyro.exe : error PYRO0252 : No valid transforms were provided to attach to the patch. Check to make sure the transforms you passed on the command line have a matching baseline authored in the patch. Also, make sure there are differences between your target and upgrade.

我的问题是:patch.wxs 应该包含什么?

my question really is: what should patch.wxs contain?

这是我的 patch.wxs 的样子:

Here is what my patch.wxs looks like:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

    <Patch
        AllowRemoval="yes"
        Manufacturer="sample llc"
        MoreInfoURL="sample.com"
        DisplayName="Env Patch"
        Description="Env Specfic Patch"
        Classification="Update"
        >

        <Media Id="5000" Cabinet="RTM.cab">
            <PatchBaseline Id="RTM" />
        </Media>

        <PatchFamilyRef Id="EnvPatchFamily" />
    </Patch>

    <Fragment>
        <PatchFamily Id='EnvPatchFamily' Version='1.0.0.0' ProductCode="PUT-GUID-HERE" Supersede='yes' >

            **********************************************
                What component Ref should I put in here
                heat creates a component group and I can't
                put ComponentGroupRef in here
            **********************************************

    </PatchFamily>
    </Fragment>
</Wix>

我正在使用此链接中所述的 Wix 补丁:http://wix.sourceforge.net/manual-wix3/wix_patching.htm

I am using Wix patching as described in this link:http://wix.sourceforge.net/manual-wix3/wix_patching.htm

但是,它不考虑使用 heat 创建的源 wix 文件.有人能告诉我我在这里做错了什么吗?

However, it doesn't consider source wix file created using heat.Can someone tell me what am I doing wrong here?

推荐答案

Hitesh,

对我来说,热量会创建一个像这样的组件组:

For me heat creates a component group like this:

<Fragment>
    <ComponentGroup Id="MyFiles">
        <ComponentRef Id="cmp2AA1A30564C621322ECB3CDD70B1C03C" />
        <ComponentRef Id="cmp788C978F16E473D4FD85720B5B75C207" />
    </ComponentGroup>
</Fragment>

加热命令:

"%WIX%\bin\heat.exe" dir slndir\bin\Release -cg MyFiles -gg -scom -sreg -sfrag -srd -dr INSTALLDIR -out ..\Wix\MyFiles.wxs -var var.BinOutputPath -nologo -v -ke  -t wixtransform.xsl

在 patch.wxs 中:

And in patch.wxs:

<Fragment>
    <PatchFamily Id='ProductPatchFamily' Version='1.3.0.0' Supersede='yes'>
        <ComponentRef Id="cmp2AA1A30564C621322ECB3CDD70B1C03C" />
        <ComponentRef Id="cmp788C978F16E473D4FD85720B5B75C207" />
    </PatchFamily>
</Fragment>

注意:PatchFamily 标签中没有 ProductCode 属性

这篇关于使用纯粹的 WIX 修补的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 15:33