How to enable Software Update in an Eclipse product?

血红的双手。 提交于 2019-12-22 08:30:09

问题


In my Eclipse project, I defined a simple plugin (bundle), a feature that includes the plugin and a product that includes the feature.

When I export the poduct (via the "Eclipse Product export wizard" of the product editor), it does build the product. I can launch the product, everything works fine (the plugin is there and doing what it is supposed to do).

The only problem is that the user of the product cannot install additional Eclipse features using the Software Update menu (Help -> Software Updates). The Software Updates sub-menus ("Find and Install..." and "Manage Configuration...") are grayed out.

What plugins and/or features are we supposed to add to the product so the product could accept additional features using the Software Updates menu ?

I tried to add a bunch of org.eclipse.equinox.p2.* plugins, but it is still not working.

  <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
  <plugin id="org.eclipse.equinox.p2.console"/>
  <plugin id="org.eclipse.equinox.p2.core"/>
  <plugin id="org.eclipse.equinox.p2.director"/>
  <plugin id="org.eclipse.equinox.p2.director.app"/>
  <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
  <plugin id="org.eclipse.equinox.p2.discovery"/>
  <plugin id="org.eclipse.equinox.p2.discovery.compatibility"/>
  <plugin id="org.eclipse.equinox.p2.engine"/>
  <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
  <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
  <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
  <plugin id="org.eclipse.equinox.p2.metadata"/>
  <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
  <plugin id="org.eclipse.equinox.p2.operations"/>
  <plugin id="org.eclipse.equinox.p2.publisher"/>
  <plugin id="org.eclipse.equinox.p2.publisher.eclipse"/>
  <plugin id="org.eclipse.equinox.p2.ql"/>
  <plugin id="org.eclipse.equinox.p2.reconciler.dropins"/>
  <plugin id="org.eclipse.equinox.p2.repository"/>
  <plugin id="org.eclipse.equinox.p2.repository.tools"/>
  <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
  <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
  <plugin id="org.eclipse.equinox.p2.transport.ecf"/>
  <plugin id="org.eclipse.equinox.p2.ui"/>
  <plugin id="org.eclipse.equinox.p2.ui.discovery"/>
  <plugin id="org.eclipse.equinox.p2.ui.importexport"/>
  <plugin id="org.eclipse.equinox.p2.updatechecker"/>
  <plugin id="org.eclipse.equinox.p2.updatesite"/>

Does someone know exactly what needs to be done (at the product definition level if possible) in order to get the Software Updates menu working ?


回答1:


The menu entry 'Install new software' is contribued by plug-in org.eclipse.equinox.p2.ui.sdk. You should include it to show that menu entry in your RCP.

If your RCP is feature based, I think you should only include p2 related features to simplify the process.




回答2:


I don't know the full list of required p2 bundles, but this is how you can easily generate it: Use the new wizard to create an e4 > e4 Application Project. This generates a product file that contains all bundles needed for an p2 updatable product.

If you have a feature-based product, the features org.eclipse.rcp and org.eclipse.e4.rcp should also give you an updatable product




回答3:


I was also face same issue and resolved by the following steps;

In the Product Configuration file,

.product file --> In Configuration Tab

Specify custom start levels for the following plug-ins,
    org.eclipse.equinox.ds start level 2, auto start true 
    org.eclipse.equinox.simpleconfigurator start level 1, auto start true
    org.eclipse.equinox.common start level 2, auto start true
    org.eclipse.core.runtime start level 4, auto start true


来源:https://stackoverflow.com/questions/12414096/how-to-enable-software-update-in-an-eclipse-product

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!