Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] RCP Self Provisioning with P2: It Works!!!

Hi All,

I finally could create the mail demo RCP app using p2 to update itself!
My environment is Windows Vista, Java 6, Eclipse 3.4 RC4.

Here are the steps that describe how I p2-enabled the mail demo:

1. Created the mail demo (project p2-maildemo)

2. Created a product configuration p2-maildemo.product

3. Added 3 plug-ins to both launcher and product configuration (and added required plug-ins)
- org.eclipse.equinox.p2.exemplarysetup
- org.eclipse.equinox.p2.ui.sdk
- org.eclipse.equinox.simpleconfigurator.manipulator

To get the final update work in the installed product, it is also necessary to include the following 3 plug-ins with dependencies in the product configuration:
- org.eclipse.ecf.filetransfer
- org.eclipse.equinox.p2.touchpoint.eclipse
- org.eclipse.equinox.p2.touchpoint.natives

4. Exported the product and the metadata/artifact repositories to c:/java/RCP/p2-maildemo

5. Used the director app to install the mail demo from the repository, with the following Program arguments:
-application org.eclipse.equinox.p2.director.app.application
-metadataRepository file:c:/java/RCP/p2-maildemo/repository
-artifactRepository file:c:/java/RCP/p2-maildemo/repository
-installIU p2_maildemo.product
-version 1.0.0
-destination c:/java/RCP/p2-maildemo/install
-profile MaildemoProfile
-bundlepool c:/java/RCP/p2-maildemo/install
-profileProperties org.eclipse.update.install.features=true
-p2.os win32
-p2.ws win32
-p2.arch x86
-roaming
-consoleLog

VM arguments:
-Declipse.p2.data.area=c:/java/RCP/p2-maildemo/install/p2

6. Started the installed mail demo in c:/java/RCP/p2-maildemo/install

7. Selected Help/Software Updates...: Showed the P2 UI with installed Product in version 1.0.0

So far so good!

Now I wanted to create a new version 1.0.1 of the product and update the installed version 1.0.0:

8. Updated main mail demo plug-in to version 1.0.1

9. Updated product version to 1.0.1

10. Exported the new product version 1.0.1 in the SAME location, to update the metadata/artifact repositories.

The first thing I noticed was that my installed 1.0.0 did not find any update. I thought, when the installation repository contains a new version, this would be seen by my application without any extra configuration.

11. So I added the repository c:/java/RCP/p2-maildemo/repository manually as a new site, and voila, the new version 1.0.1 was displayed and ready for update.

12. When I wanted to install the update, the P2 dialog told me correctly: "RCP Product is already installed, so an update will be performed instead."

13. And now, when I clicked finish, the update was actually happening, the new version was installed properly!!!

I am so happy that I finally got this to run :)

What would be the best practice to create a list of artifacts/metadata repositories in the configuration/.settings/org.eclipse.equinox.p2.metadata.repository.prefs and org.eclipse.equinox.p2.artifacts.repository.prefs to include the real update sites for the product?

Many thanks to everybody who helped me.

Kai
---

Kai Tödter

Siemens AG
Corporate Technology
Architecture
CT SE 2
Otto-Hahn-Ring 6
81739 Munich, Germany
Phone: +49 89 636-41064
Fax: +49 89 636-45450
mailto: kai.toedter@xxxxxxxxxxx
Internet: www.siemens.com/corporate-technology

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; Heinrich Hiesinger, Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Juergen Radomski, Erich R. Reinhardt, Hermann Requardt, Uriel J. Sharef, Peter Y. Solmssen, Klaus Wucherer; Registered offices: Berlin and Munich; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322




Back to the top