Thursday, June 25, 2009

Using the deltapack in Eclipse 3.5

Eclipse Galileo was released yesterday and I have already seen a couple of questions on the newsgroups regarding how to install the delta pack.

What's a delta pack?

For those who don't know what it is, the delta pack is a zip file provided by the Eclipse Platform and it is used for developing RCP applications for multiple platforms. The delta pack archive contains all the platform specific fragments from the Eclipse SDK. It also includes a feature "org.eclipse.equinox.executable" which contains binary launchers for all the platforms. The archive is available for download through the Eclipse Classic "Other downloads" page.

The delta pack is required if you want to do headless product builds, or to export products from the UI:

If you don't have the delta pack installed, then the option to export your product for multiple platforms will not appear in the wizard.

How to install the delta pack

Ian Bull blogged about the improved Target Platform management system as #3 in his Galileo Feature top ten list. This is the recommended method of installing the delta pack.
  1. Extract the delta pack archive into its own directory on disk.
  2. Open the Target Platform preferences (Window -> Preferences -> Plug-in Development -> Target Platform).
  3. Add a new target, or edit the active target.
  4. Add the directory where you extracted the delta pack.


Ben Vitale said...

What is the recommended way to install the delta pack for headless product builds?

For example, I'm trying to setup everything my product needs into a "baseLocation" for PDE build. Trying to use the p2 director for this. So far, I've provisioned the SDK from scratch, provisioned BIRT, and some other deps, all into one location, all using the director.

The Delta Pack does not appear in any repos that I can find. Should it not be formally provisioned? Just wget and unzip it? Certainly doable, but I wanna use p2..


Andrew Niefer said...

The director is only able to install for one platform so it can't really handle the delta pack. You should instead look at using a combination of the p2.mirror and p2.repo2runnable ant tasks which don't care about the platform.
The advantage to this is that I don't believe PDE/Build can currently reuse the metadata from an install (it will instead re-generate it), the output of repo2runnable is a repository which PDE/Build will be able to reuse metadata from.
You'll notice the difference for something like the org.eclipse.rcp feature whose metadata contributes root files to an install, but that metadata can't be recreated from the binary feature.

There is no single downloadable repos that contains everything in the deltapack. But if you don't need the full sdk, the platform-repo zip or the rcp-repo zip contain the needed fragments. They are only missing the executable feature.

The executable feature itself is in the equinox repo zip.

Alternatively you can also create your own deltapack repo from the full online repository using mirror & repo2runnable. The script that creates the actual download zip is here.

Andrew Niefer said...

See the help for details on reusing metadata. Either use the built-in repo2runnable support, or specify the transformed repo as a context repository.