Build Instructions

1. Install Prerequisites

A full copy of Eclipse SDK is required to build. This must be installed in a directory called eclipse, and the full path should not contain any spaces. For example:

This directory (including the final eclipse) will be referred to as the SDK directory.

2. Setup the Target Platform

The target platform is the collection of binary plugins and features against which the source projects are built. It is an Eclipse installation (with a plugins and features directory), and so can be setup by downloading the correct zip or tarball from the Eclipse website. Like the SDK directory, the target platform must be inside a directory called eclipse. In your IDE, you should point PDE at the target platform by opening Preferences and navigating to "Plug-in Development" --> "Target Platform". Click Browse and select the eclipse directory.

Note that since we are building SDK plugins, the Target Platform will be a full SDK (eg "Eclipse Classic SDK"). Therefore we can reuse the same SDK directory that we setup in the previous step. However it can also be useful to separate these because we might want to use different Eclipse versions for each function. For example, we may want to use Eclipse 3.4 to build a 3.3-based product.

3. Create and edit user.properties

User-specific properties are supplied in the file user.properties. After checkout this file does not exist, so please copy template.user.properties to user.properties and change the following settings:

Do not check user.properties into version control: the settings inside are specific to your machine.

4. Configure the Update Site URL

The Update Site URL can be specified by setting the updateUrl property in project.properties . This will be copied into the feature.xml descriptor for each feature that is part of the build. For this to work, the update site URL setting in the feature.xml of each source feature project must be set to the following placeholder string: http://replace.with.real.url

5. Execute the Build

Execute a full build by running the pdebuild target in ANT, e.g.:

    ant pdebuild

This will generate a directory named target/tmp/eclipse which contains a plugins directory for the built plugin JARs and a features directory for the built features. If the build fails then compilation logs for each plugin can be found in target/N.Sigil/compilelogs/plugins.

6. Deploy to Update Site

After the features and plugins are built we can deploy them to an update site on the local filesystem. The update site directory must already exist with the following layout:

${updateSiteDir}/
 |--plugins/
 |--features/
 \--site.xml

And site.xml must have at least the following content:

<site>
    <category-def name="Sigil" label="Sigil">
        <description>Blah blah</description>
    </category-def>
</site>

It can also have any number of pre-existing <feature> entries as direct children of the <site> element.

Next set the updateSiteDir property in project.properties to point at the above directory. Now we can run the deploy target as follows:

    ant copy.updateSite

This will copy all of the plugin and feature JARs that were built in the previous step into the update site directory. It will also add a new entry into site.xml for each feature. Note that the update site directory will grow continually. Since the plugins and features are generated with a timestamp in their version qualifier (e.g. 1.2.3.200808091200 for version 1.2.3 built on 9 Aug 2008 at 12 o'clock GMT), Eclipse Update Manager will always select the newest version available.

NB: the deploy target will overwrite site.xml. A backup will be saved in site.xml.bak but this backup will be overwritten next time the build is run.