Skip to main content
Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/HowTo/Howto set up dev environment"

(Executing the make.xml)
m (Setup an Eclipse instance/installation for building)
Line 9: Line 9:
 
# download [http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/download.php?dropFile=eclipse-RCP-3.3.2-delta-pack.zip eclipse-RCP-3.3.2-delta-pack.zip] from [http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php]
 
# download [http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/download.php?dropFile=eclipse-RCP-3.3.2-delta-pack.zip eclipse-RCP-3.3.2-delta-pack.zip] from [http://archive.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php]
 
# unzip the archive and copy '''org.eclipse.equinox.executable_<version>''' from features into your features folder under your eclipse installation.
 
# unzip the archive and copy '''org.eclipse.equinox.executable_<version>''' from features into your features folder under your eclipse installation.
 +
# copy all necessary plug-ins (end with linux.x86_*.jar or win32.x86_*.jar) from plugins into your plugins folder under your eclipse installation.
 
# start that eclipse and add sole extension location to WC /SMILA.extension by:
 
# start that eclipse and add sole extension location to WC /SMILA.extension by:
 
## Menu: Help / Software Updates / Manage configuration
 
## Menu: Help / Software Updates / Manage configuration

Revision as of 05:46, 23 February 2009

Howto Build and Test Locally

Setup an Eclipse instance/installation for building

Setting up an own instance is recommended so that no extensions/features u might have installed in ur eclipse instance u use for developing interferes with the build. It probably also makes the build a little faster as the headless start of eclipse takes less time due to fewer plug-ins installed.

  1. Download an eclipse SDK, starting with at least eclipse-SDK-3.3.2-win32.zip
  2. download eclipse-RCP-3.3.2-delta-pack.zip from [1]
  3. unzip the archive and copy org.eclipse.equinox.executable_<version> from features into your features folder under your eclipse installation.
  4. copy all necessary plug-ins (end with linux.x86_*.jar or win32.x86_*.jar) from plugins into your plugins folder under your eclipse installation.
  5. start that eclipse and add sole extension location to WC /SMILA.extension by:
    1. Menu: Help / Software Updates / Manage configuration
    2. add extension location and choose the folder SMILA.extension/eclipse from smila project folder

Configuring the Build

The folder SMILA.builder contains everything needed to build SMILA and/or run all tests locally.

Whether u build from command line or from eclipse, in both cases the make.xml ant script is executed. Before execution certain properties need to be set to meet the local setup.

Setting the Target Build Platform

Independent of which way you are going to build, in both cases you must set the configs property in the build.properties file to your setup.

Windows
...
configs=win32,win32,x86 
# ... 
Linux
...
configs=linux,gtk,x86
# ... 

Note:

The default is to build for both, windows and linux platforms. However, for this to work locally the eclipse must have the corresponding plugins installed which is usually not the case if you downloaded a platform specific distribution. If platform plugins are missing you will end up on Windows with:
...
[java] D:\Program Files\eclipse33\eclipse-SDK-3.3.2-win32-smila-build\eclipse\plugins\org.eclipse.pde.build_3.3.2.v20071019\scripts\genericTargets.xml:85: Unable to find plug-in: org.eclipse.core.filesystem.linux.x86_0.0.0. Please check the error log for more details.
Setting Build Properties
Property Default Comment
buildDirectory <SMILA_HOME>/eclipse.build
eclipse.home <ECLIPSE_HOME> the location of the eclipse instance used to build smila
builder <SMILA_HOME>/SMILA.builder
eclipse.running true
pdeBuildPluginVersion 3.3.2.v20071019
equinoxLauncherPluginVersion 1.0.1.R33x_v20080118
os win32 these merely control under which platform the test will run. It must be one of the target platforms you have build.
ws win32
arch x86
test.java.home <JAVA_HOME> a java 1.5 SDK instance


For the build from eclipse u pass in these values via the command line text box in the launch config on the command line these are set in a shell script.

Executing the make.xml

all dependency graph

The default target is all. This will by default build the application and run all unit tests. The dependency graph will explain what will happen and shows the relevant targets u may call instead.


Executing make.xml from within eclipse
  1. select the SMILA.builder bundle
  2. open External Tools Dialog
  3. create a new ant build configuration or choose your configuration if exists
  4. choose the build file of this bundle, e. g. ${workspace_loc:/SMILA.builder/make.xml}
  5. insert all properties from above into the arguments input field (but adapt these to your setup) but prepend each with -D so each is passed into ant as a property, e.g.
    -DbuildDirectory=D:/eccenca/SMILA/eclipse.build
    -Declipse.home=D:/eclipse33
    -Dbuilder=D:/eccenca/SMILA/SMILA.builder
    -Declipse.running=true
    -DpdeBuildPluginVersion=3.3.2.v20071019
    -DequinoxLauncherPluginVersion=1.0.1.R33x_v20080118
    -Dos=win32 -Dws=win32 -Darch=x86
    -Dtest.java.home=D:/java/jre1.5.0_11
  6. Apply, close and run SMILA.builder with this external tool configuration

Note

To start another than the default target specify the desired target also in the argument input box.
Executing make.xml from command line

The make.bat (or .sh) is just a shell script to set the properties that are needed for the ant script. These files exist only as templates in SVN with .#~#~# appended to denote their template nature. Rename it as u see fit, but make.bat (.sh) is already in the svn:ignore to prevent it from beeing committed accidentally, so it is recommended to use that.

Steps:

  1. adjust all paths in \SMILA.builder\make.bat according to own setup
  2. execute make.bat

Note:

To execute another than the default target just pass it as an argument, like so:
make build

Howto Setup Development Environment

  • SVN location
    Until the project leaves incubation status and we are able to move all our sources to our eclipse SVN this restricted SVN repository is used for daily development:
    https://svn.brox.de/svn/eccenca/EILF/trunk
  • Eclipse
    Most use an eclipse 3.3 with various plugins according to their choice. See Howto Build and Test Locally for a most basic setup.
    An Extension location containing the EILF.extension/eclipse is mandatory
  • see also: Development Guidelines

Howto Run junit tests for OSGi bundles

  • Plugin Junit Launch config
  • write config.ini and ref it from lauch config.
    tip: use \ to brake up long lines to have better overview
  • share the launch config

For further information see: Development Guidelines

Back to the top