MSM(合并模块)的补丁(小升级)创建问题 [英] Patch (minor upgrade) creation issues with MSM (merge modules)

查看:65
本文介绍了MSM(合并模块)的补丁(小升级)创建问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 MSM(合并模块)进行补丁(小升级)安装(更新)时遇到问题.我正在用 texst.wxs 创建 MSI (test.msi).而里面的text.wxs指的就是app.msm文件(有个文件夹app,里面有很多文件夹和文件.然后收割这个文件夹,制作app.msm文件)

I am facing issues with patches (minor upgrade) installation (updates) with MSM (merge modules). I am creating MSI (test.msi) with texst.wxs. And inside text.wxs referring to app.msm file (there is a folder app, which contains so many folders and files. And harvesting this folder and making app.msm file)

以下是制作 app.msm 文件的步骤.

Below are steps for making app.msm file.

heat dir "app" -gg -sfrag -template:module -srd -ke -var var.source -out app.wxs
candle -dsource=app app.wxs
light app.wixobj

下面是 test.wxs 文件的片段

Below is snippet of test.wxs file

<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
....
....

    <Directory Id='Config' Name='Config'>
       <Component Id='APP_CLIENT' Guid='*'>
           <Component Id='Manual' Guid='*'>
                <File Id='Manual' Name='Manual.pdf' DiskId='1' Source='Resources/Manual.pdf'
                  KeyPath='yes'>
                    <Shortcut Id="startmenuManual" Directory="ProgramMenuDir" 
                          Name="Instruction Manual" Advertise="yes" />

                </File>
            </Component>                                           
        </Directory>    

    <Directory Id='exmp_REPO' Name='!(loc.Merge_FolderTitle)'>
        <Merge Id="LocalRepository" Language="1033" SourceFile="app.msm" DiskId="1"/>                       
            <Component Id='exmp_REPOSITORY' Guid='*'>       
                 <CreateFolder/>    
                 <RemoveFolder Id='exmp_REPO' On='uninstall' />
            </Component>
        </Directory>            

....

<Feature Id='Complete' Display='expand' Level='1' ConfigurableDirectory='MYAPPPATH'>
    <ComponentRef Id='Manual'/>
    <ComponentRef Id='App_CLIENT'/>
    <ComponentRef Id='exmp_REPOSITORY'/>

......

我可以使用 app.msm(合并模块)对我的 test.wxs 进行重大升级.但无法成功安装补丁.补丁安装(更新)反映在程序和功能"中的版本更改中,并显示在查看已安装的更新"中.手动更改也反映在补丁更新中.但是无论app"(创建 app.msm 并在 test.wxs 中引用)文件夹中的任何更改都没有反映.

I am able to make major upgrade with my test.wxs by using app.msm (merge module). But not able to make patch with successful installation. Patch install (update) is reflecting in version change in the "Programs and Features" and showing in "View Installed updates". The manual changes also are reflecting with patch update. But whatever the changes in "app" (which are created app.msm and referred in test.wxs) folder are not reflecting.

我使用了两种制作补丁的方法,它们在下面的网址中提到

I have used 2 approaches for making patch, which are mentioend in below urls

1) http://wixtoolset.org/documentation/manual/v3/patching/patch_building.html

2) http://wixtoolset.org/documentation/manual/v3/修补/wix_patching.html

请在这方面提供帮助.

推荐答案

我在这里看到了几个潜在的问题,甚至可能除了其他答案之外:

I see several potential problems here, maybe even in addition to the other answers:

  1. 当您为合并模块加热文件时,-gg 会自动生成新的组件 guid.这不适用于补丁,因为它基本上会添加一堆新组件(每次都有新的 guid !!).此外,您将通过这种方式删除组件,这是您不应该做的,也不能轻松完成的,除非您仍然包含原始合并模块.然后你会遇到路径问题.
  2. wix 修补教程使用 wixpdb 文件来区分原始安装程序和更新后的安装程序.对于 wixpdb 文件,合并模块将不会被修补,无论其中的文件是否更改.您将需要进行管理安装,然后对 msi 本身进行比较.您仍然会遇到问题 #1.
  3. 你的 wxs 片段很糟糕.至少 xml 元素永远不会正确关闭.您的功能在某处也有 MergeRef?

一些提示:

  • 您可以使用名为 逆戟鲸.打开原始的 msi,然后只需将您的 msp 补丁文件拖到它上面即可.
  • 不要使用合并模块,它们会使事情复杂化.您还可以使用加热来生成一个片段,然后您只需将其包含到您的 wix 项目中即可.
  • 使用 wix 修补方法(Patch 元素,而不是 PatchCreation 元素).它更容易,但您拥有相同的控制权
  • 如果您计划使用补丁更新那些自动生成的组件,请不要自动生成 guid.重大升级不会有问题:)
  • you can view what your patches do with a program called Orca. Open the original msi, then just drag your msp patch file on top of it.
  • rather don't use merge modules, they complicate things. You can also use heat to generate a fragment which you then simply include into your wix project.
  • use the wix patching approach (Patch element, not the PatchCreation element). It's easier, but you have the same control
  • don't autogenerate guids if you plan to update those autogenerated components with a patch. It won't be a problem with major upgrades :)

这篇关于MSM(合并模块)的补丁(小升级)创建问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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