如何构建 Eclipse RCP 应用程序,以便自动更新其功能? [英] How do I build an Eclipse RCP app so that its features can be updated automatically?

查看:18
本文介绍了如何构建 Eclipse RCP 应用程序,以便自动更新其功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个由多个功能组成的 RCP 应用程序.

I am building an RCP application that will be made up of several Features.

我的 RCP 应用程序配置为在每次启动时检查更新.我当前的问题是我需要在构建时安装"我的一项功能,以便在自动检查更新期间对其进行更新,而无需强制用户手动安装它.我需要此功能独立于系统中的其他功能进行更新.

My RCP application is configured to check for updates each time it starts. My current problem is that I need one of my Features to be 'Installed' at build time so that it will get updated during this automatic check for updates without forcing the user to manually install it. I need this feature to update independently from the other features in the system.

所以,回顾一下,我只是在寻找一种很好的自动化方式来在 RCP 应用程序中安装一个功能,这样它就可以独立于其他功能进行更新,并且不需要 RCP 应用程序的用户手动安装.

So, to recap, I'm just looking for a nice automated way to have a Feature installed in an RCP app in such a way that it updates independently from other features, and doesn't require the user of the RCP app to install it manually.

推荐答案

同时,Tycho 明确支持此用例.从 Tycho 0.20.0 开始,您可以让 Tycho 独立于 RCP 安装功能产品.通过这种方式,这些功能可以独立于产品进行更新(甚至卸载).

In the meanwhile, Tycho has explicit support for this use case. Starting with Tycho 0.20.0, you can make Tycho install features of an RCP separately from the product. In this way, these features can be updated (or even be uninstalled) independently of the product.

要独立安装功能,只需在产品文件中的相应功能标签中添加属性 installMode="root" 即可.示例:

To install features independently, just add an attribute installMode="root" to the respective feature tags in the product file. Example:

<features>
   <feature id="org.eclipse.platform"/>
   <feature id="updatable.feature" installMode="root"/>
</features>

有关详细信息,请参阅此文档页面.

For more information, see this documentation page.

这篇关于如何构建 Eclipse RCP 应用程序,以便自动更新其功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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