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?
- Get the installer for your platform from the equinox download page.
- Unzip the installer anywhere on your local disk
- Run the "p2installer" executable
- In the install wizard, select where you want to install the software
- When finished, you can delete the installer
How does the installer work?
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:
If you look at sdk-installer.properties in a Web browser, you will see:
eclipse.p2.rootId=org.eclipse.sdk.ide eclipse.p2.metadata=http://download.eclipse.org/eclipse/updates/3.4milestones/ eclipse.p2.artifacts=http://download.eclipse.org/eclipse/updates/3.4milestones/ ... 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.
While installing (eg., from
~/p2installer/eclipse/p2installer), plugins, features, and metadata will be downloaded and stored in
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:
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:
- The root Installable Unit to be installed
- 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.
- The URL of the metadata repository to install from
- The URL of the artifact repository to install from
- The name of the application launcher (e.g., eclipse.exe). This is used in conjunction with the autoStart property to launch the installed application
- A boolean property specifying if the installed application should be launched immediately after install.
- The id of the p2 profile to install the application into
- The application instal location. If ommitted, the user is prompted for a location
- The p2 agent data location directory
- The application bundle pool directory