Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] questions about profiles

> 1) It seems from the code that a profile must always exist (i.e. there
> must be a non-null IProfile) for a p2 install/provision operation to
> happen.  Correct?

Correct
 
> 2) If 1 is true, then when/where does Eclipse create a profile for p2
> installation of features and plugins?  Is it done by the platform build
> process (what's the profile id that's used?) Or is it done on first
> startup or at some later period?

The profile is created as a result of a provisioning operation happening during the build.
If you download an SDK zip you will notice the p2 folder underneath in which you can find org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile/...

> 3) For environments that are *not* eclipse...and perhaps not installed
> via p2 (e.g. bridge servlet), how are they to setup an initial profile
> that includes the initial configuration?  

> installer, and what it seems to do is to create a new profile with a
> profile id=to the target install location, and it sets the following
> install properties (c:/temp/installer is the install location):


I'm not sure I fully grasped your question. But I'll try an answer to the question "how do I bootstrap"?
At some point you have to have an IU that refers to all the pieces that represent your application, and you invoke the director app (this is what we use in the eclipse build) on that IU also passing along the properties needed for your profile.
The question of the when do I bootstrap, mainly depends on how changing is the environment you are deploying on. For example at one point I remember Simon exploring with generating the profile on startup of the servlet bridge. However that was well before we had any kind of build integration and the like and I'm not sure we would take that approach now. I think the bridge should have its own profile that gets deployed along with the jar.


> But it seems to assume that *everything* is being installed...i.e. it
> doesn't respond well to trying to install an IU that was generated from
> a feature that has platform dependencies, because none of the platform
> dependencies are satisfied...

I think that you are experiencing this problem because the profile properties are not being set in the profile.
We currently have no mechanism which, as part of the creation of the profile will prime it with some data wrt the environment (e.g. setting os, ws, etc.). This needs to be done explicitly when invoking the director app or the installer.

> So I guess my major question is...how does one create the profile that
> includes the platform itself (for a platform other than Eclipse?).  Is
> there an example somewhere of how/when this is done?  2 above is simply
> asking this question WRT Eclipse.

The help system contains a description on how to use the director to do this kind of things.

HTH

PaScaL


Back to the top