wix guid 使用规则 [英] wix guid using rules

查看:23
本文介绍了wix guid 使用规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如我有:

    <Component Id='MainExecutable' Guid='0436E0CA-8612-4330-A70D-642910D9F19A'>
      <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1' Source='FoobarAppl10.exe' KeyPath='yes'>
      </File>
    </Component>

如果我创建了一个更新包,我是否应该为包含 FoobarEXE 的组件使用相同的 GUID?我知道产品、升级代码等的规则,但其他 GUID 的规则是什么?它们的范围是什么?

If then I create an update package should I use the same GUID for component that include FoobarEXE? I know rule for Product, UpgradeCode etc but what is the rule for other GUIDs? What is their scope?

推荐答案

组件 ID 版本控制规则很棘手.我只在旧书中找到了真正的解释(仅限德语​​).根据您创建的更新,有几条规则适用.

The component id versioning rules are tricky. I have found a real explanation only in old books (german only). Depending on which update you are creating several rules do apply.

  • 更新

更新(仅修补或添加文件,不允许删除或重新定位)组件 ID 必须保持不变.

Update (only patch or add files, no remove or relocation allowed) Component id has to stay the same.

  • Minor Upgrade (Product code remains stable) It is basically an Update with some rules relaxed. To stay clear you should stick to Update or Major Upgrade which is much easier to reason about. The rules when the product code must be changed are described here.

重大升级基本上是卸载(调用了 MSI 操作 RemoveExistingProducts)并重新安装.在那里你有充分的自由.

Major Upgrade Is basically a uninstall (the MSI action RemoveExistingProducts is called) and reinstall. There you have full freedom.

将每个文件、注册表项、环境变量放入单独的组件通常是一个很好的建议,因为许多陷阱源于在小升级期间无法从组件中删除文件的事实.但是通过一些技巧,您可以删除整个组件.

It is generally a good advice to put every file, registry key, environment variable into a separate component since many of the pitfalls arise from the fact that you cannot remove files from a component during a minor upgrade. But with some tricks you can remove an entire component.

这篇关于wix guid 使用规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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