How to find list of installed Eclipse features from external program?
Asked Answered
T

2

6

I am preparing windows installer for my Eclipse plugin. I want install it into target eclipse product using P2 director. I am targetting only Eclipse 3.5 for now.

Installer should check that prerequisite features/plugins are already installed. I am not sure how to do this check. (Other reason for this check is to choose what other features to install, as I will bundle some prerequisites in the installer).

Easy solution is to look into eclipse/features/ and eclipse/plugins/ directories, but plugins may be installed elsewhere too: dropins directory and linked via links directory.

I would like to get list of installed fetures and plugins from P2 (profile?), if possible. Is there any way to do this? Any better solutions?

Tumbler answered 1/8, 2009 at 14:53 Comment(1)
Good question.Helpful for automationCloche
H
5

Have a look at the P2 agent, it does what you are after. Browse the source code to see how it interacts with the repository. You can use the p2 director to streamline the actual installation.

The Equinox Incubator also has a number of useful links

Hastate answered 1/8, 2009 at 16:32 Comment(1)
Thank you. I spent some time reading about P2 at eclipse Wiki, and it is starting to make sense to me. I even found what I was looking for ... almost :-)Resolvable
T
2

At http://wiki.eclipse.org/Equinox_p2_Getting_Started, they talk about eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info file:

The file bundles.info contains a list of all the plug-ins installed in the current system. On startup, all the plug-ins listed in this file are given to OSGi as the exact set of plug-ins to run with. Any extra plug-ins in the plugins directory or elsewhere are ignored. ... However, it's useful to know about this file so you can see exactly what is installed in the system you are running.

Well, it's not list of features, but list of plugins is good too.

Tumbler answered 1/8, 2009 at 20:58 Comment(1)
Beware of orphan plugins though, they can cause problems for your install as P2 likes all plugins to be managed by features. See #1200702Hastate

© 2022 - 2024 — McMap. All rights reserved.