Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "P2 Install Example"

(Set up P2 Eclipse Environment)
Line 1: Line 1:
 
== Set up P2 Eclipse Environment ==
 
== Set up P2 Eclipse Environment ==
  
*Get p2 from CVS
+
=== Get p2 from CVS ===
 +
To get started, you will need the source code for p2. This is best done by following the steps outlined at
 +
 
 +
[http://wiki.eclipse.org/Equinox_p2_Getting_Started_for_Developers Equinox p2 Getting Started for Developers]
 +
 
 
*Create RCP Application
 
*Create RCP Application
  

Revision as of 14:11, 29 July 2008

Set up P2 Eclipse Environment

Get p2 from CVS

To get started, you will need the source code for p2. This is best done by following the steps outlined at

Equinox p2 Getting Started for Developers

  • Create RCP Application

From Eclipse, File->New->Other Select Plug-in Project Specify a project name () Click Next Select Yes for Create a Rich Client Application Click Next Choose RCP Application with a View

This will create a MAINFEST.MF file

  • test application from MANIFEST.MF file.

Edit the file. Overview tab, click LAunch an Eclipe application. Verify that the application runs.

Set up Product Configuration

  • create product configuration

From Eclipe, select the plugin project and then File-New->Product Configuration Specify a filename (we used blah)

This will display the blah.product edit page.

  • specify product definition

Enter a name. For the id, select New button. From dialog, click Ok. Enter a version (1.0.0 works)

  • specify configuration

From Configuration tab, click add. In Add dialog, right click and select all. Click Ok. This will add the bundles necessary to run the app. Save the blah.product file (ctrl-s)

From Overview tab, select

  • synchronize
  • launch eclipse application

Exporting

  • Eclipse Product export wizard.

From the blah.product, select export wizard from Export column tab area. Specify a destination directory Check Generate Metadata repository checkbox. Click finish.

This will generate a local metatadata and artifact repository in the specified destination directory.

Running ProvAdminUI

To run the admin ui, select the Run icon in the toolbar and select the pulldown. This will display the configurations avalable. Select the Run Configurations... option at the bottom.

From the Run Configurations page, select the OSGI Framework ProvAdminUI. You may need to click the Add Required Bundles button. Click the Run button.

This will run the Admin UI.

First we will need to specify the metadata repository. Highlight the Metadata Repositories tab. In the window, right click and select Add..

specify metadata repository

From the dialog, click the Local button and browse to the location specified for the destination in the previous Product export step. Be sure and select down and include the repository directory. To verify, expand the repository you added and you should see your application.

specify artifact repository

To specify an artifact repository, select the Artifact Repositories tab and right click in the window. In the window, select Add.

From the dialog, click the Local button and browse to the location specified for the destination in the previous Product export step. Be sure and select down and include the repository directory.

specify profile In the Admin UI, the lower window is where you specify Profiles. Right click in the window and select Add Profile. In the dialog, Specify a unique profile id. Specify an install folder. This is where the application will get installed. Specify a Bundle pool location . Simply use the same area. Specify a name.

Click Ok.

Install our applicaiton. drag and drop application to profile.

Hightlight in the metadata tab your application and then drag and drop it to the profile entry.

You will see a Resolving dependencies dialog pop-up and then disappear. Then you will see an Install window with your application shown and a checkbox beside it. Click Finish.

To verify, browse to the profile directory and run the eclipse.exe there. You should see your application run.

Run the application we created

  • Browse to the profile directory
  • run eclipse application.

Use the Installer

  • create a run configuration
  • point to the destination directory of the product export
  • point to the profile
  • run application
  • select an install directory location
  • click Install

Back to the top