2012-04-24 44 views
4

我正在努力創建一個純粹使用WIX的補丁,我希望如果有人能指引我朝着正確的方向發展。使用純WIX修補

我有幾百個源文件,我運行對它們的熱量來創建一個收穫文件,然後用蠟燭和光線創建一個包。

我需要更改一些配置文件,並創建一個包含更改的第二個包。

使用Torch和pyro我創建.wixmst文件,然後當試圖創建msp文件時,pyro抱怨出現以下錯誤。

pyro.exe:error PYRO0252:沒有提供有效的轉換附加到修補程序。檢查以確保您在命令行上傳遞的轉換在補丁中創建了匹配的基線。另外,確保您的目標和升級之間存在差異。

我的問題確實是:patch.wxs包含什麼?

這裏是我的patch.wxs樣子:

<?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> 

我使用維克斯在這個環節中描述修補: http://wix.sourceforge.net/manual-wix3/wix_patching.htm

但是,它沒有考慮威克斯源文件中創建的使用熱。 有人能告訴我我在這裏做錯了什麼嗎?

回答

4

亞太區首席技術官Matt,

對於我熱創建一個組件組這樣的:

<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:

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

小心:PatchFamily標籤中沒有ProductCode屬性

+0

是啊,你說得對產品代碼和我刪除它。但是我的問題確實是我應該把PatchFamily元素放進去,我發現它不應該包含任何內容。不過謝謝你的迴應。我將接受你的回答,指出刪除ProductCode屬性。謝謝。 – soothsayer 2012-04-26 16:11:10

+1

對不起,我很匆忙,錯過了patch.wxs被隱藏的事實。如果你將它留空,補丁將升級所有不同的文件。否則,它只會升級你選擇的內容。 – MariusCC 2012-04-26 17:09:36

0

我面臨同樣的問題,此錯誤的修復程序是將GUID添加到組件,並且它應該對於這兩個版本的msi都保持相同。

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 
    <MediaTemplate /> 

    <Feature Id="ProductFeature" Title="WixPatch" Level="1"> 
     <ComponentGroupRef Id="ProductComponents" /> 
    </Feature> 
</Product> 

<Fragment> 
    <Directory Id="TARGETDIR" Name="SourceDir"> 
     <Directory Id="ProgramFilesFolder"> 
      <Directory Id="INSTALLFOLDER" Name="WixPatch" /> 
     </Directory> 
    </Directory> 
</Fragment> 

<Fragment> 
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER" > 
     <Component Id="File1" **Guid="3A64BE7A-BBEC-40AD-8319-45C602734146"**> 
    <File Source="D:\V2\File1.txt" Name="File1" KeyPath="yes" DiskId="1" Id="F1"/> 
     </Component> 

</ComponentGroup> 
</Fragment>