Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] RE: Need help building a product with p2

Hi Andrew,

Changing the paths to URL's helped.  It now finds the product id
installIU, and takes a couple of minutes.  But it eventually comes back
with "Installation failed".  I wasn't sure what to put for profile.  I
assume PlatformProfile?  I tried that, SDKProfile, and remove the
profile option altogether.  I get the same error each time.  Is there a
way to get more details on what failed?  A verbose option perhaps?

Here's exactly how I'm invoking the director:

eclipsec.exe -nosplash -application
org.eclipse.equinox.p2.director.app.application -metadataRepository
file:C:\testproduct2\repository -artifactRepository
file:C:\testproduct2\repository -installIU com.nokia.carbide.cpp.product
-destination C:\testproduct2\eclipse -profile PlatformProfile
-profileProperties org.eclipse.update.install.features=true -bundlepool
C:\testproduct2\eclipse -p2.os win32 -p2.ws win32 -p2.arch x86 -roaming
-vmargs -Declipse.p2.data.area=C:\testproduct2\eclipse\p2


where C:\testproduct2\eclipse is where I exported the product to, and
C:\testproduct2\repository is what PDE generated for the product.

Thanks,
Warren


------------
Date: Fri, 30 May 2008 16:20:35 -0400
From: Andrew Niefer <aniefer@xxxxxxxxxx>
Subject: Re: [equinox-dev] Need help building a product with p2
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Message-ID:
	
<OFA0E574FE.7D42A298-ON85257459.00539CEC-85257459.006FBEE4@xxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Warren,

1) This is what I notice when I tried running your director command on a
product I exported:
-  the "-metadataRepository" and "-artifactRepository" values need to be
URLs: use "file:C:\testproduct\repository"
- I found I needed to specify -installIU to get anything out.  In this
case the IU is the product ID
- althrough not strictly necessary since the generated config.ini will
specify its location, you might want to put the p2.data.area in the same
folder as -destination.

My test product does not contain p2 bundles so I have not tried the
Software updates.





<Warren.Paul@xxxxxxxxx> 
Sent by: equinox-dev-bounces@xxxxxxxxxxx
05/29/2008 08:25 PM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
<equinox-dev@xxxxxxxxxxx>
cc

Subject
[equinox-dev] Need help building a product with p2






I've received some help from Andrew in this Bugzilla (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226614) but I'm still
having 
problems so I thought I'd take it to the list rather than in that 
Bugzilla.
We've been shipping an IDE product based on Eclipse for a few years now.

The way we've built our product in the past is essentially this:
1) Download the platform runtime, EMF, GEF, etc.. from eclipse.org and 
extract them into a product layout directory. 
2) Checkout and tag our features and plugins 
3) Use headless feature build on all of our features, and extract the 
generated archives into the product layout directory.
4) Copy our modified version of config.ini, .eclipseproduct, etc. into
the 
product layout directory. 
5) Generate an update site based on the generated features/plugins. 
This gives us a full product layout for new installs, and allows users 
with older installs of our product to update to the new version using
the 
update site.
This process broke when we moved to Eclipse 3.4M6 when p2 was
introduced. 
I've come to discover that we weren't really building it in the ideal 
fashion to begin with, so I'm trying to do it the proper way so we can
get 
a properly p2-ized product layout and update site.
Andrew provided several useful links in that Bugzilla.  I've read about 
doing product builds, using the p2 meta generator and p2 director.  I've

also played with the examples from EclipseCon presentation.
Here are some of the problems I'm having: 
1) I created a .product file based on features.  I included our features

as well as those org.eclipse features that we bundle with.  When I
export 
it using the PDE product export from the UI, it generates a directory 
containing everything we need - all features and plugins (ours and 
org.eclipse.*), our branded launcher and ini file, .eclipseproduct file,

config.ini file, jre, etc..  It of course does not contain the p2 data 
though.  I told the exporter to generate a metadata repository which it 
did.  I think I'm then supposed to run it through the p2 director to get

the proper p2 directory.  I tried this, and it generated something, but
I 
get the error "Cannot launch the Update UI.  This installation has not 
been configured properly for Software Updates" when I try to go to 
Help->Software Updates.  I assume I didn't get the command line correct 
for the p2 director.  This is what I did:
eclipsec.exe -nosplash -application 
org.eclipse.equinox.p2.director.app.application -metadataRepository 
C:\testproduct\repository\ -artifactRepository
C:\testproduct\repository\ 
-destination C:\testproduct\eclipse\ -profile PlatformProfile 
-profileProperties org.eclipse.update.install.features=true -bundlepool 
C:\testproduct\eclipse -p2.os win32 -p2.ws win32 -p2.arch x86 -roaming 
-vmargs -Declipse.p2.data.area=C:\testproduct2\eclipse\p2
Any idea what I'm doing wrong?  I thought I should be passing -installIU

but wasn't sure what to pass with it.  I tried the product id but it 
errored out saying it couldn't find the IU.

2) What I did in 1) was really just a test because we'll need to build 
everything from the command line and not from the export wizard.  I
tried 
to build the product from the command line and kept getting an error
that 
org.eclipse.rcp could not be found.  I removed all org.eclipse.*
features 
from our product file and tried again.  Now it builds, and it generates 
the repo directory because I added the stuff to our build.properties
file 
as instructed:
generate.p2.metadata=true 
p2.metadata.repo = file:${buildDirectory}/repo 
p2.artifact.repo = file:${buildDirectory}/repo 
p2.metadata.repo.name = Carbide.c++ Metadata Repository 
p2.artifact.repo.name = Carbide.c++ Artifact Repository 
p2.flavor = tooling 
p2.publish.artifacts=true 
This repo directory only contains the two xml files though
(artifacts.xml 
and content.xml), unlike the product export which generated those as
well 
as binary, features and plugins directories.
The other issue is that none of the org.eclipse.* features/plugins are 
included.  This is presumably because they're no longer in the .product 
file, but I had to do that to get the build to work.  I tried creating a

master feature which just required all of our features and the
org.eclipse 
features, but still got the missing rcp error.  Note: in the example2
from 
the EclispeCon zip, it builds a product and does include the org.eclipse

stuff in the output.  This example is based on plugins rather than 
features.  This is the only meaningful difference I could see in the 
.product files.
I'm also confused about the topLevelElementType and topLevelElementId 
attributes in the build.properties files.  I couldn't find any 
documentation on these.  Ideally I'd put type=product and id=our product

id, and then I assume the installIU would be the product id?
Anyway, sorry for the long email, but I'm stuck and could really use
some 
help. 
Thanks, 
Warren 

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top