Eclipse RCP: How to download delta pack from software site in the Target Definition file?
I'm using this technique to create a target platform for my Eclipse RCP projects: http://www.modumind.com/2009/09/01/creat开发者_开发问答ing-an-eclipse-rcp-target-platform/
The RCP SDK is downloaded directly using the software site. As for the delta pack, I manually downloaded it from website, and added the directory in the target definition file, which in my opinion is tedious when I want to upgrade the delta pack version next time.
Is it possible to download the delta pack using the software site too? Or at least do it in less manual and more maintainable approach?
Thanks.
Add a main eclipse update site to the target. Take care of the version. Then from this site choose the RCP target and Equinox target features. Make sure to check "Include all environments".
Example of update site: http://download.eclipse.org/eclipse/updates/4.2
Addition
Here is the full answer to this question.
Preferred way of using the "DeltaPack"
The DeltaPack is used to get platform specific artifacts so that you can export your RCP product for multiple platforms. See the next section for more information on the DeltaPack
Adding platform specific artifacts
The preferred way of getting the platform specific artifacts is to just add them to the target platform. There is no need to look-up and download the "DeltaPack" if you follow these instructions.
- Open Window/Preferences.
- Find PDE/Target Platform
- Select your (active) target platform
- Click Edit
- Click Add
- Select "Software Site"
- Click Next
- In "Work With" type: http://download.eclipse.org/eclipse/updates/4.3 (replace 4.3 with your current version)
- Check "Eclipse RCP Target Components"
- Check "Equinox Target Components"
- Uncheck "Include required software"
- Check "Include all environments"
- Press Finish
- Press Finish
- Press OK
Open your product file and select the "Export" option. You will see that the "Export for multiple platforms" checkbox is available.
Old way of using the "DeltaPack"
What is the DeltaPack
The DeltaPack is a distribution from Eclipse that contains platform specific files for all supported platforms and widget sets. It contains:
SWT Platform Layers
Various plugins to handle connection to the native OS widgets.Various launchers (exe, cmd, etc..)
Files to launch Eclipse from the command lineOther platform specific plugins
Hooks into secure storage, native networking and native Eclipse filesystem hooks
In total there are some 70 plugins to support the complete range of supported operating systems (around a dozen).
When do you need it
You need it if you want to export your RCP application to multiple targets (a combination of OS/ARCH/WIDGETSET: e.g. linux/ppc64/gtk ). This is typically done from the product configuration file.
How to get it
You can get it from: http://download.eclipse.org/eclipse/downloads/
Click on any of the builds and look for DeltaPack. Please note that there are discussions on removing the DeltaPack and getting it the preferred way.
How to add it to your target platform
- Download the DeltaPack as described above
- Unzip it to a location .e.g. "C:\eclipse-4.4M7-delta-pack"
- Open Window/Preferences.
- Select PDE/Target Platform
- Select your (active) target platform
- Click Edit
- Click Add
- Select "Directory"
- Click Next
- In "Location" type: "C:\eclipse-4.4M7-delta-pack\eclipse"
- Press Next
- Press Finish
- Press Finish
- Press OK
Open your product file and select the "Export" option. You will see that the "Export for multiple platforms" checkbox is available.
During setting up a software site for your target, you can select 'Include all environments' (after unselecting 'Include required software'), which should make maintaining a delta pack unnecessary.
My solution for sharing delta-pack:
- Download the official delta-pack
- Convert it to update-site (or software-site as you call it)
- Place the update-site to my own server (e.g. http://example.com/my-delta-pack)
- Add the update-site to my target definition
ad 2) I use a command-line tool called Publisher. It's a part of Eclipse IDE.
Example usage:
${eclipse.home}/eclipse.exe
-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher
-metadataRepository file:/${basedir}/${target.delta}
-artifactRepository file:/${basedir}/${target.delta}" />
-source ${source.delta}
-publishArtifacts
-compress
精彩评论