是否可以在基于插件的 RCP 应用程序中使用自我更新?
这就是问题所在。 我有一个基于插件启动的应用程序(从 pde 版本 3.1 开始) 现在我正在升级该应用程序。
主要问题是我没有完全理解整个过程、整个画面。 我在 Eclipse 中遵循了 Vogella 教程、wiki,但没有什么比我拥有的更好。
此外,如果我将“产品”配置从插件更改为功能,导出过程将不起作用,并向我显示错误。
据我所知,当你想要这种情况时,你必须创建一个“RCP插件项目”和一个“功能项目”,其中每个项目都依赖于另一个项目。 “RCP 插件项目”应该是基于功能的。
然后在“功能项目”中创建“更新站点项目”。 但是,当“RCP插件项目”基于“插件”时,所有cicle都会中断,并且我无法添加对“功能项目”的依赖项。
有没有办法将这个“自我更新场景”与基于插件的产品一起使用? 或者我可以转换为 P2 吗?
此致
That's the question.
I have an application that start as based on plugins ( starts in pde version 3.1 )
now I'm upgrading that application.
The main issue is that I don't fully understand the whole procedure, the whole picture.
I followed Vogella Tutorials, wiki in eclipse, but nothing is equal of what I have.
Also if I change my "product" configuration from plug-ins to features, the export process didn't work, and show me an error.
As far I can see, when you want this scenario, you have to create a "RCP Plugin Project" and a "Feature Project", where each one depends on the other.
"RCP Plugin project" should be feature based.
And then the "Feature Project" create a "Update Site Project".
But when "RCP Plugin project" is based on "plug-ins" all the cicle breaks, and I can't add a dependency to "feature Project" .
Is there any way to use this "Self Update scenario" with plugin based product?
Or I can convert to P2 ?
Best Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,可以在 RCP 应用程序中提供更新功能。今天最简单的方法是使用 p2 来实现此目的。
因此,您将需要一个更新站点和一个支持 p2 的 RCP 产品。
关于功能、插件和依赖项:功能基本上是插件的容器;插件基本上提供要执行的代码。某个功能包含插件,会自动依赖该包含的插件所依赖的所有插件,因此无需将包含的项目作为依赖项添加到该功能中。另一方面,插件项目应该而且不应该知道包含它们的功能——这会引入无法管理的依赖循环。
关于更新站点项目:不要使用它们 - 它们是旧更新管理器使用的遗留项目类型 - 对于 p2 最好简单地导出功能。有关详细信息,我无耻地提供我的自己的博客文章去年。
然后您可以将所需的 p2 元素添加到您的应用程序中 - 基本上您必须确保 p2 插件存在并在运行时执行。您可以重复使用 IDE 中的 p2 更新 GUI,也可以自行推出。有关此功能的详细信息可以在 Eclipse wiki 和 安德鲁·尼弗斯博客文章(也从 wiki 页面链接)。
更新:和vogella.de 上的全新相应帖子
In general, it is possible to provide update functionality in RCP applications. Today the simplest way is to use p2 for this.
For this reason you will be needing an update site, and a p2-enabled RCP product.
About features, plug-ins and dependencies: a feature is basically a container for plug-ins; plug-ins basically contribute the code to execute. A feature contains plug-ins, and automatically depends on all the plug-ins that the contained plug-ins depend on, so there is no need to add the contained projects as dependencies to the feature. On the other hand, the plug-in project should and must not know about the features that contain them - that would introduce dependency cycles that are impossible to manage.
About update site projects: don't use them - they are a legacy project type used by the old Update manager - for p2 it is better to simply export features. For details I shamelessly offer my own blog post from last year.
Then you can add the required p2 elements to your application - basically you have to make sure that the p2 plug-ins are present and executed during runtime. You can either reuse the p2 update GUI from the IDE, or you can roll your own. Details about this functionality is found in the Eclipse wiki and in Andrew Niefers blog post (also linked from the wiki page).
Update: and a brand new corresponding post on vogella.de