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 "Equinox/p2/Installer"

< Equinox‎ | p2
m
Line 1: Line 1:
Equinox p2 now produces a small SWT-based installer that can be used to install the Eclipse SDK. This article gives details on how to use the installer.
+
Equinox p2 now produces a small SWT-based installer that can be used to install the Eclipse SDK. This article gives details on how to use the installer.  
  
== Why should I use the installer? ==
+
== Why should I use the installer? ==
  
Traditionally Eclipse software is obtained in the form of a zip or tar.gz file that is simply extracted onto disk and run. While this simplicity has its advantages, there are also some disadvantages for users:
+
Traditionally Eclipse software is obtained in the form of a zip or tar.gz file that is simply extracted onto disk and run. While this simplicity has its advantages, there are also some disadvantages for users:  
  
* Downloading a 100+ MB zip file over HTTP can be painful on a slow connection
+
*Downloading a 100+ MB zip file over HTTP can be painful on a slow connection  
* If you already have some or all of the plug-ins on your local disk, you are downloading content unnecessarily
+
*If you already have some or all of the plug-ins on your local disk, you are downloading content unnecessarily  
* More advanced compression techniques can't be used, because there is no opportunity to add the decompression code at the other end
+
*More advanced compression techniques can't be used, because there is no opportunity to add the decompression code at the other end  
* You must pick a single mirror at the start, and can't switch mirrors in case of failure
+
*You must pick a single mirror at the start, and can't switch mirrors in case of failure  
* There is no opportunity to check code certificates to ensure the software you are downloading was created by a trusted source
+
*There is no opportunity to check code certificates to ensure the software you are downloading was created by a trusted source
  
The installer leverages p2's inherent support for multi-threading, pack200 compression, dynamic mirror balancing, and certificate validation to address these problems.
+
The installer leverages p2's inherent support for multi-threading, pack200 compression, dynamic mirror balancing, and certificate validation to address these problems.  
  
== How do I use the installer? ==
+
== How do I use the installer? ==
[[Image:P2-installer-wizard.png|thumb|right|300px|P2 installer wizard]]
+
* Get the installer for your platform from the [http://download.eclipse.org/equinox/ equinox download page]. The installer zips are listed under the Provisioning section, once you select your version.
+
* Unzip the installer anywhere on your local disk, eg., <code>/opt/eclipse</code>
+
* Run the p2 installer executable, eg., <code>/opt/eclipse/p2installer</code>
+
* In the install wizard, select where you want to install the software, eg., <code>~/eclipse</code>
+
* Select whether to do a Stand-alone or Shared install:
+
:* If doing a Stand-alone install, you can delete the installer directory (<code>/opt/eclipse</code>) when done, as your target directory (<code>~/eclipse</code>) will contain a full Eclipse install.
+
:* If doing a Shared install, you must keep the installer directory (<code>/opt/eclipse</code>) as it will contain all the shared Eclipse SDK plugins; your target directory (<code>~/eclipse</code>) will only contain the minimum required to start Eclipse.
+
  
== How does the installer work? ==
+
[[Image:P2-installer-wizard.png|thumb|right|300px|P2 installer wizard]]
  
While the installer by default will install the Eclipse SDK, the installer itself is entirely generic. The installer knows what to install by reading an install description specified in p2installer.ini:
+
*Get the installer for your platform from the [http://download.eclipse.org/equinox/ equinox download page]. The installer zips are listed under the Provisioning section, once you select your version.
 +
*Unzip the installer anywhere on your local disk, eg., <code>/opt/eclipse</code>
 +
*Run the p2 installer executable, eg., <code>/opt/eclipse/p2installer</code>
 +
*In the install wizard, select where you want to install the software, eg., <code>~/eclipse</code>
 +
*Select whether to do a Stand-alone or Shared install:
  
  -vmargs -Dorg.eclipse.equinox.p2.installDescription=http://download.eclipse.org/eclipse/testUpdates/sdk-installer.properties
+
:*If doing a Stand-alone install, you can delete the installer directory (<code>/opt/eclipse</code>) when done, as your target directory (<code>~/eclipse</code>) will contain a full Eclipse install.  
 +
:*If doing a Shared install, all the shared Eclipse SDK plugins will be stored in a default directory, e.g. (<code>C:\Documents and Settings\Administrator\.p2</code>) on Windows XP.
  
If you look at sdk-installer.properties in a Web browser, you will see:
+
== How do I configure the installer?  ==
  
  eclipse.p2.rootId=org.eclipse.sdk.ide
+
The installer uses the Java system property <code>org.eclipse.equinox.p2.installDescription</code> to fetch the URL of the installer properties file. By default this is set to an [http://download.eclipse.org/eclipse/testUpdates/sdk-installer.properties installer website].<br>
  eclipse.p2.metadata=http://download.eclipse.org/eclipse/updates/3.5/R-3.5-200906111540/
+
  eclipse.p2.artifacts=http://download.eclipse.org/eclipse/updates/3.5/R-3.5-200906111540/
+
  ... and other properties ...
+
  
The 'rootId' attribute describes what to install, and the next two attributes describe where to get the metadata and artifacts to be installed. By changing those attributes, you can make the installer install a different piece of software, or install from a different repository.
+
*Edit the <code>p2installer.ini</code> file to point to a local properties file, for example&nbsp;./installer.properties, like so:<br>
  
While installing (eg., from <code>/opt/eclipse/p2installer</code>), plugins and metadata will be downloaded and stored in <code>/opt/eclipse/p2/org.eclipse.equinox.p2.touchpoint.eclipse</code>.
+
  -vmargs -Dorg.eclipse.equinox.p2.installDescription=./installer.properties
  
===Non-working Example ===
+
*
  
You can use an installer.properties file to fetch plugins into the p2.touchpoint.eclipse folder, but you cannot then install those plugins unless they contain a Product (that is, they include a eclipse executable).
+
=== Non-working Example  ===
 +
 
 +
You can use an installer.properties file to fetch plugins into the p2.touchpoint.eclipse folder, but you cannot then install those plugins unless they contain a Product (that is, they include a eclipse executable).
 +
 
 +
The following will work to download the EMF SDK plugins, but will NOT work to install an EMF-enabled Eclipse install, as the sdk.feature.group does not include the Eclipse SDK itself.  
  
The following will work to download the EMF SDK plugins, but will NOT work to install an EMF-enabled Eclipse install, as the sdk.feature.group does not include the Eclipse SDK itself.
 
 
 
  eclipse.p2.metadata=http://download.eclipse.org/modeling/emf/updates/releases/
 
  eclipse.p2.metadata=http://download.eclipse.org/modeling/emf/updates/releases/
 
  eclipse.p2.artifacts=http://download.eclipse.org/modeling/emf/updates/releases/
 
  eclipse.p2.artifacts=http://download.eclipse.org/modeling/emf/updates/releases/
Line 55: Line 51:
  
 
=== Supported installer properties  ===
 
=== Supported installer properties  ===
The following properties are currently supported in the install description file:
 
  
;eclipse.p2.rootId: The root [[Installable Units|Installable Unit]] to be installed
+
The following properties are currently supported in the install description file:
;eclipse.p2.rootVersion: The version of the root installable unit to install. If this property is omitted, the installer will select the newest available IU that matches the ''rootId'' property.
+
 
;eclipse.p2.metadata: The URL of the metadata repository to install from
+
;eclipse.p2.rootId  
;eclipse.p2.artifacts: The URL of the artifact repository to install from
+
:The root [[Installable Units|Installable Unit]] to be installed  
;eclipse.p2.launcherName: The name of the application launcher (e.g., ''eclipse.exe''). This is used in conjunction with the ''autoStart'' property to launch the installed application
+
;eclipse.p2.rootVersion  
;eclipse.p2.autoStart: A boolean property specifying if the installed application should be launched immediately after install.
+
:The version of the root installable unit to install. If this property is omitted, the installer will select the newest available IU that matches the ''rootId'' property.  
;eclipse.p2.profileName: A human readable name of the product being installed. This value is used when referring to the product in the installer dialog.
+
;eclipse.p2.metadata  
;eclipse.p2.installLocation: The application instal location. If ommitted, the user is prompted for a location
+
:The URL of the metadata repository to install from  
;eclipse.p2.agentLocation: The p2 agent data location directory
+
;eclipse.p2.artifacts  
;eclipse.p2.bundleLocation: The application bundle pool directory
+
:The URL of the artifact repository to install from  
 +
;eclipse.p2.launcherName  
 +
:The name of the application launcher (e.g., ''eclipse.exe''). This is used in conjunction with the ''autoStart'' property to launch the installed application  
 +
;eclipse.p2.autoStart  
 +
:A boolean property specifying if the installed application should be launched immediately after install.  
 +
;eclipse.p2.profileName  
 +
:A human readable name of the product being installed. This value is used when referring to the product in the installer dialog.  
 +
;eclipse.p2.installLocation  
 +
:The application instal location. If ommitted, the user is prompted for a location  
 +
;eclipse.p2.agentLocation  
 +
:The p2 agent data location directory  
 +
;eclipse.p2.bundleLocation  
 +
:The application bundle pool directory
 +
 
 +
<br>
  
 
[[Category:Equinox_p2|Installer]]
 
[[Category:Equinox_p2|Installer]]
 +
 +
<br>

Revision as of 07:14, 16 October 2010

Equinox p2 now produces a small SWT-based installer that can be used to install the Eclipse SDK. This article gives details on how to use the installer.

Why should I use the installer?

Traditionally Eclipse software is obtained in the form of a zip or tar.gz file that is simply extracted onto disk and run. While this simplicity has its advantages, there are also some disadvantages for users:

  • Downloading a 100+ MB zip file over HTTP can be painful on a slow connection
  • If you already have some or all of the plug-ins on your local disk, you are downloading content unnecessarily
  • More advanced compression techniques can't be used, because there is no opportunity to add the decompression code at the other end
  • You must pick a single mirror at the start, and can't switch mirrors in case of failure
  • There is no opportunity to check code certificates to ensure the software you are downloading was created by a trusted source

The installer leverages p2's inherent support for multi-threading, pack200 compression, dynamic mirror balancing, and certificate validation to address these problems.

How do I use the installer?

P2 installer wizard
  • Get the installer for your platform from the equinox download page. The installer zips are listed under the Provisioning section, once you select your version.
  • Unzip the installer anywhere on your local disk, eg., /opt/eclipse
  • Run the p2 installer executable, eg., /opt/eclipse/p2installer
  • In the install wizard, select where you want to install the software, eg., ~/eclipse
  • Select whether to do a Stand-alone or Shared install:
  • If doing a Stand-alone install, you can delete the installer directory (/opt/eclipse) when done, as your target directory (~/eclipse) will contain a full Eclipse install.
  • If doing a Shared install, all the shared Eclipse SDK plugins will be stored in a default directory, e.g. (C:\Documents and Settings\Administrator\.p2) on Windows XP.

How do I configure the installer?

The installer uses the Java system property org.eclipse.equinox.p2.installDescription to fetch the URL of the installer properties file. By default this is set to an installer website.

  • Edit the p2installer.ini file to point to a local properties file, for example ./installer.properties, like so:
 -vmargs -Dorg.eclipse.equinox.p2.installDescription=./installer.properties

Non-working Example

You can use an installer.properties file to fetch plugins into the p2.touchpoint.eclipse folder, but you cannot then install those plugins unless they contain a Product (that is, they include a eclipse executable).

The following will work to download the EMF SDK plugins, but will NOT work to install an EMF-enabled Eclipse install, as the sdk.feature.group does not include the Eclipse SDK itself.

eclipse.p2.metadata=http://download.eclipse.org/modeling/emf/updates/releases/
eclipse.p2.artifacts=http://download.eclipse.org/modeling/emf/updates/releases/
eclipse.p2.flavor=
eclipse.p2.profileName=EMF SDK
eclipse.p2.launcherName=eclipse
eclipse.p2.rootId=org.eclipse.emf.sdk.feature.group
eclipse.p2.autoStart=true

Supported installer properties

The following properties are currently supported in the install description file:

eclipse.p2.rootId
The root Installable Unit to be installed
eclipse.p2.rootVersion
The version of the root installable unit to install. If this property is omitted, the installer will select the newest available IU that matches the rootId property.
eclipse.p2.metadata
The URL of the metadata repository to install from
eclipse.p2.artifacts
The URL of the artifact repository to install from
eclipse.p2.launcherName
The name of the application launcher (e.g., eclipse.exe). This is used in conjunction with the autoStart property to launch the installed application
eclipse.p2.autoStart
A boolean property specifying if the installed application should be launched immediately after install.
eclipse.p2.profileName
A human readable name of the product being installed. This value is used when referring to the product in the installer dialog.
eclipse.p2.installLocation
The application instal location. If ommitted, the user is prompted for a location
eclipse.p2.agentLocation
The p2 agent data location directory
eclipse.p2.bundleLocation
The application bundle pool directory



Back to the top