All Downloads are FREE. Search and download functionalities are using the official Maven repository.

doc.developer.pipeline-from-svn.html Maven / Gradle / Ivy

The newest version!




	
	

	DAISY Pipeline developer setup
	



	

DAISY Pipeline developer setup

Markus Gylling, Romain Deltour

Latest update: 2007-12-17

This document summarizes the steps needed to get and run the Daisy Pipeline code.

As such, this document is primarily intended for developers who want to run (and develop on) the latest code from the Pipeline trunk, or another branch.

The guide uses Eclipse (3.3) as the IDE of choice.

Development environment setup

Install Eclipse

Get the Eclipse IDE from Eclipse Downloads section.

Since version 3.3 (Europa) of Eclipse, there are several different versions to choose from. Pick one of these:

  • Eclipse for RCP/Plug-in Developers (recommended for the Pipeline GUI setup). This version is used in this guide.
  • Eclipse IDE for Java Developers (use this if you want the setup the Pipeline core only)
  • Eclipse Classic

Install Eclipse by extracting it to a folder of your choice.

Note: If you are behind a proxy, you need to set the proxy values in the Network Connections page in the Eclipse Preferences (Window > Preferences menu item, filter on "proxy").

Install and Configure Subversion

The Pipeline Sourceforge project uses Subversion (SVN) as the repository format.

Since Eclipse (at least at the time of writing) does not support SVN natively, a plug-in must be installed in order to communicate with the Pipeline repository. Several open source solutions are available:

Install the Subversive plug-in

Detailed installation instructions are available on the Subversive website. They are reproduced here for the sake of completeness.

  1. Start Eclipse and launch the update manager from the menu item Help > Software Updates > Find and Install...

    Software Update menu
  2. In the Install/Update wizard select Search for new features to install option and press on the Next button.

    Search for new feature to install
  3. The Install dialog shows a list of available update sites. Subversive has its own update site, so you need to add it to the list. You are provided a probability to install either from remote or local update site. Installation from remote update site is preferred, because the user just have to refer the site URL. If the user has downloaded local update site distribution as ZIP archive, he should refer it as local update site location. Click on the New Remote Site... button to add Subversive update site.

  4. On the New Update Site dialog enter the name of update site and the URL. Use following values: Subversive update site
    Click on the OK button to store update site information.

    Also you should install Subversive SVN Connectors to allow the plug-in work with Subversion. You can do the following in such a simple way:
    On the New Update Site dialog enter the name of clients' update site and the URL. Use following values: Subversive Connectors update site
    Click on the OK button to store update site information.
  5. To start features search in the list of the update sites select the newly added update sites Subversive and Subversive SVN Connectors and then press on the Finish button.

    Search for features
  6. The update manager checks update site and shows the list of available features. You can expand the tree and select features to install. Select at least the minimum required set of features:
    • SVN Team Provider - The Eclipse Team Provider for the Subversion version control system.
    • Subversive SVN Connectors - Set of SVN connectors for the Eclipse Subversive.
    • One of the actual SVN Connectors, for instance SVNKit Implementation
    Select features

    Note: if you have some dependency errors due to some prerequisites not being available, try to uncheck the problematic optional features.

  7. Accept terms of license agreement and press on the Next button.
  8. Click on the Finish button in order to start the download of selected features.
  9. Click on the Install All button in order to confirm installation of downloaded features.
  10. To apply installation changes and restart Eclipse press on the Yes button.

    Apply and restart
  11. After Eclipse restart you are able to start using Subversive.

Pipeline Core project setup

This section describes how to get and configure the DAISY Pipeline "Core", i.e. the Pipeline sans its GUI.

Checkout the project

  1. Move to the SVN Perspective (Window > Open Perspective... > SVN Repository Exploring).

    Open SVN perspective
    Open SVN perspective
  2. Create a new repository location: either via the menu File > New > Repository Location or by using the New Repository Location button in the SVN Repositories view toolbar or via the contextual menu of the view.

    New repository location
    New repository location
    New repository location
  3. In the General tab of the New Repository Location wizard set the URL field to https://daisymfc.svn.sourceforge.net/svnroot/daisymfc and then press the Finish button

    New Repository Location wizard
  4. Open the branch you want to check out (for instance choose trunk for the latest developments or tags/_version_ for a specific release) and then select the module to check out (this should be dmfc, which is by the way the former name of DAISY Pipeline).

    Note: If you just want to run the Pipeline use the latest release in the tags branch. More active (i.e. possibly unstable) development occurs in the trunk. Decidedly unstable work happens in experimental branches, so normally the trunk should be ok. If in doubt, ask your nearest Pipeline Core Team Representative™.

  5. Check out the project using the Check Out item of the contextual menu of the selected svn module.

    Checkout the project
  6. Wait for the download to complete.

Check the project setup

The SVN checkout includes the Eclipse .project file that Eclipse uses to set classpath and 3d party library dependencies. So the project should be pretty much ready to go once the SVN dump is complete.

If you move to the Java Perspective (via the menu Window > Open Perspective > Java), the Package Explorer view should have the src and transformers directories shown as source containers (a special icon is used for these folder items). There should be a bunch of 3d party libraries in the "Referenced libraries" item.

Project in the package explorer

Running the Pipeline test suite

You can confirm that your Pipeline environment works by creating a "Run Configuration" for the built-in Pipeline test suite.

  1. Open the Run configuration dialog via the menu Run > Open Run Dialog...

  2. Create a new Java Application configuration.

  3. Name it (for instance "Pipeline Test Suite").

  4. Select org.daisy.pipeline.test.PipelineTestDriver as the main class.

  5. In the Arguments tab, add the following string as program arguments: "${project_loc}/samples ${project_loc}/scripts"

    Program Arguments: ${project_loc}/samples ${project_loc}/scripts
  6. Select Apply then Close, dont run yet.

  7. Instead, open the org.daisy.pipeline.test.PipelineTestDriver class and make sure that one test is de-commented in the getTests() method. Select for example OPSCreator1. (It will take a bit too long to run all the tests at this time.)

  8. Now run the Pipeline Test Suite (for instance via the menu Run > Run).

  9. If you are set up correctly, the Console View will report a succesful run.

Note: When you are developing a Transformer, it is recommended to do so against tests in the test suite. You are all set up for this now.

Running the Pipeline command line interface

Similarly to what you did in the test suite run above, create a "Run Configuration" for the Pipeline Command Line Interface.

  1. Open the Run configuration dialog via the menu Run > Open Run Dialog...

  2. Create a new Java Application configuration.

  3. Name it (for instance "Pipeline CLI").

  4. Select org.daisy.pipeline.ui.CommandLineUI as the main class.

  5. Set the command line arguments in the Program Argument area of the Arguments tab.

    The following program arguments runs the DTBookValidator Script against an item in the /samples/ folder: "${project_loc}/scripts/verify/DTBookValidator.taskScript" --input="${project_loc}/samples/input/dtbook/dontworrybehappy.xml"

    Note: The Arguments tab needs to be changed every time you want to run a new script or run a script against new input.

  6. Press on Run.

  7. You should get the following message in the console:
    
    [DEBUG, Pipeline Core] Loading Transformer Validator (class int_daisy_validator.ValidatorDriver)
    [DEBUG, Pipeline Core] Transformer loaded from file:/D:/workspace/pipeline/transformers/
    [STATE] Task DTBook Validator just started
    [STATE] Transformer Validator just started
    [INFO, Validator] Validating a Dtbook document.
    [DEBUG, Validator] Completed full validation of input fileset.
    [INFO, Validator] Validation completed in 0.0 seconds.
    [INFO, Validator] 0 issues were reported by validators.
    [INFO, Validator] Congratulations!
    [STATE] Transformer Validator just stopped
    [STATE] Task DTBook Validator just stopped
    
    																																																
    

Building the Pipeline Core from the Ant script

The Pipeline Core build is based on Ant. For more information on this tool, please see the Apache Ant Project.

  1. Open the Ant view using the menu Window > Show View > Ant.

    Show Ant view
  2. Add build-core.xml build file to the view using the Add Buildfiles... command on the context menu.

    Add build file
  3. Select the build-core.xml in the org.daisy.pipeine project

    Select build-core.xml
  4. Select a the all target and press the Run button.

    Run the all target
  5. Check the build log in the Console view.

    Check the build log

Pipeline GUI project setup

This section describes how to get and configure the Pipeline GUI and run it as a front end for the Pipeline Core. The following assumed you have the Pipeline Core project correctly setup (for a step-by-step guide to this state, see the previous section Pipeline Core project setup).

Checkout the project

  1. Move to the SVN Perspective (Window > Open Perspective... > SVN Repository Exploring).

  2. Create a new repository location: either via the menu File > New > Repository Location or by using the New Repository Location button in the SVN Repositories view toolbar or via the contextual menu of the view.

  3. In the General tab of the New Repository Location wizard set the URL field to https://daisymfcgui.svn.sourceforge.net/svnroot/daisymfcgui and the press Finish.

    New Repository Location wizard
  4. Open the branch you want to check out (for instance choose trunk for the latest developments or tags/_version_ for a specific release) and then select the gui module.

  5. Check out the project using the Check Out item of the contextual menu of the selected svn module.

    Check out the GUI
  6. Wait for the download to complete.

  7. Check that the project has been correctly checked out by moving back to the Java Perspective (via the menu Window > Open Perspective > Java)

    GUI project in the Java perspective

Configure the RCP environment

The Pipeline GUI project is based on the Eclipse Rich Clien Platform (aka Eclipse RCP) which is basically an application framework based on a dynamic plug-in model. Both the Pipeline Core project and the Pipeline GUI project are actually plug-ins that integrate in this platform, identified respectively as org.daisy.pipeline and org.daisy.pipeline.gui.

Before running the Pipeline GUI, you must configure the Target Platform runtime, i.e. the set of (Eclipse) plug-ins against which your org.daisy.pipeline and org.daisy.pipeline.gui plug-ins will be compiled and tested.

Note: the following instructions assume you're using Eclipse 3.5 or higher. It is possible to use previous versions but the Target Platform configuration steps are slightly different, please refer to the built-in Eclipse Help guides for more details adapted to your version of Eclipse.

  1. Fetch the zipped target platform from the subversion repository:
    http://daisymfcgui.svn.sourceforge.net/viewvc/*checkout*/daisymfcgui/trunk/target/pipeline-rcp-target.zip
    Unzip it to the place of your choice (we will later refer to this place as $TARGET_HOME).
  2. Open the Preferences dialog via the Preferences... command (available in the Window menu on Windows and Linux and on the Eclipse application menu on Mac OS X).

  3. Move to the Plug-in Development > Target Platform preference page.

  4. Select the Add... button to launch the New Target Definition wizard.

  5. Select the option "Nothing: Start with an empty target definition" and press Next.

  6. Enter the name of your target platform in the name field, for instance "Pipeline GUI".

  7. In the locations tab, use the Add... button to launch the "Add Content" wizard. Select the Directory source type, and in the next step browse for the directory where you unzipped the target platform ZIP archive (this should be $TARGET_HOME/pipeline-rcp-target), and press Finish.

  8. Finally press Finish in the "New Target Definition" wizard.

  9. Make sure the newly created target platform is selected (i.e. "Active")

    Target Platform - preference pane

Note: as Eclipse RCP is a very powerfull and dynamic component-based environment, its configuration is quite complex and can be confusing at first. For further help on the topic please see the Eclipse Plug-in Development Environment documentation, or one of the many excellent resources on the Eclipse RCP wiki.

Run the Pipeline GUI

In order to run the Pipeline GUI from this development environment, you have to create a "Run Configuration" for the RCP product.

  1. Open the Run configuration dialog via the menu Run > Open Run Dialog...

  2. Create a new Eclipse Application configuration.

  3. Name it (for instance"Pipeline GUI").

  4. In the Program to Run section of the Main tab, select the Run a product radio button and choose the product called org.daisy.pipeline.gui.product

    Run configuration - main tab
  5. Move the Plug-ins tab.

  6. Choose to "Launch with plug-ins selected below only"

  7. Deselect all the plug-ins, then select the org.daisy.pipeline.gui plug-in and press on Add Required Plug-ins.

    Run configuration - plugins tab
  8. Finally press the Run button!

Build the Pipeline GUI

The Pipeline GUI application is defined as a product including several features, each feature being composed of a set of plug-ins. In order to build the application, you first have to checkout the org.daisy.pipeline.gui feature definition from subversion, and then export the product using the plug-in development tools.

Note: The Eclipse Plug-in Development Environment build mechanism is made of a complex set of tools. For further documentation on the concepts at stake please check the Eclipse Help pages.

  1. Move to the SVN Repository Exploring perspective and checkout the features/org.daisy.pipeline.gui-feature project from the https://daisymfcgui.svn.sourceforge.net/svnroot/daisymfcgui repository location.

    Check out Pipeline feature
  2. Go back to the Java perspective to check the feature project has been correctly downloaded.

  3. Move to the SVN Repository Exploring perspective and checkout the langpack/org.daisy.pipeline.gui.nl1 language fragment project from the https://daisymfcgui.svn.sourceforge.net/svnroot/daisymfcgui repository location.

    Check out Pipeline language fragment
  4. Go back to the Java perspective to check the fragment project has been correctly downloaded.

  5. Launch the export wizard from the File > Export... menu item.

    Launch the Export Wizard
  6. Select the Plug-in Development > Eclipse Product export type.

  7. Set the product configuration to /org.daisy.pipeline.gui/pipeline.product and the root directory to DAISY Pipeline.

  8. Select the directory where you want the application to be exported.

  9. Optionally check Export for multiple platforms if you want to.

  10. Finally press Finish.

    Product Export Wizard
  11. The DAISY Pipeline GUI is now ready to be used!





© 2015 - 2025 Weber Informatics LLC | Privacy Policy