Difference between pages "Building Rodin Headless" and "Camille Editor"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Laurent
 
imported>Fabian
m
 
Line 1: Line 1:
{| class="wikitable" style="font-style:italic; text-align: center; font-size:120%; border: 3px dashed red;"
+
The first version of the Text Editor will be released in a few weeks, that means in second half of June and not before the Rodin release 1.0 has been published.
|-
 
! scope="col" | Do not edit!  This content has been migrated to Subversion.
 
|-
 
|([http://handbook.event-b.org Nightly Handbook Build])
 
|}
 
  
This page documents the procedure followed for building the binary packages of the Rodin platform that are distributed on SourceForge. The build is done in two steps
+
Until then we are going to release a few testing releases (beta) for interested users. You will find instructions how to install and use these beta-releases on this page.
# Fetch the sources from Subversion and make a source archive with them.
 
# Build the platform headless from this set of sources using Apache Ant.
 
  
==Pre Build Verifications==
 
  
Before building, several checks have to be made in the sources:
+
<div style="background-color:#FFFF00;">
* clean build all RodinCore plug-ins, so that generated files are regenerated using repository sources
+
'''Warning''':
* JUnit tests are OK
 
* versions of plug-ins, features and product obey [http://wiki.eclipse.org/Version_Numbering Eclipse versioning policy]
 
* API Tooling build against previous Rodin release produces no errors on any plug-in
 
* the correct Eclipse version is referenced in the p2 configuration (org.rodinp.platform/p2.inf)
 
* branding plug-ins display the correct Eclipse version (text information found in several about.properties/plugin.properties files)
 
* SVN project org.rodinp.releng is up to date, i.e. all required plug-ins are listed/processed in
 
** rodin-core.psf
 
** rodin-tests.psf
 
** customTargets.xml (copySources)
 
** export-RodinCore-src-jars.xml
 
* documentation is up to date for /org.rodinp.platform/html/root.html
 
* generated documentation matches latest wiki sources for
 
** /org.rodinp.keyboard/doc
 
* make a local test within Eclipse:
 
** update buildId and buildVersion in org.rodinp.releng/build.properties
 
** import (binary with linked content) org.eclipse.pde.build into the Eclipse workspace containing Rodin sources
 
** run "Build Rodin Product.launch": if everything went well, a directory "${workspace_loc}/../work/result" contains zipped archives for every platform, else errors are reported in the console.
 
:: in particular, even though the build corrects it by itself without complaining, there should be no version fixes (see console output, item 'fixVersions')
 
  
When everything works, any changes to the sources made during this verification process are committed to the Source Forge repository (the below-mentioned Subversion revision is that of this commit).
+
Don't use the TextEditor yet with your production models!
 +
* The TextEditor is still in heavy development
 +
* It is based on a new Rodin version which uses a changed database model and therefore is not compatible with older versions.
 +
</div>
  
==Build Parameters==
 
  
Three parameters need to be defined for each build:
+
==Installing ==
# the platform version, that is the user-visible version which is displayed in ''About Rodin Platform''.  Example of versions are <tt>1.0</tt> and <tt>1.0RC1</tt>.
+
The TextEditor relies on features of the Rodin release 1.0 which is not yet released. Therefore you will have to create a new Rodin installation. The following steps will guide you through this process:
# the Subversion revision number, which permits to know very precisely which source versions are used for the build.
 
# the full platform version used for provisioning. This version is made of three digits separated by dots. Example of full versions are <tt>1.0.0</tt> and <tt>1.1.0</tt>.
 
  
==Fetching Sources==
+
# Download a build of Rodin from our CruiseControl server:
 +
## Point your browser to [http://cruise.cs.uni-duesseldorf.de:8080/dashboard/tab/build/detail/org.rodinp.platform]
 +
## Download a zip file with a name starting with ''rodin-product'' and matching your platform. For example ''rodin-product-linux.gtk.x86.zip'' if you are working on a Linux system.
 +
# Extract the downloaded zip file.
 +
# Start Rodin from the folder where you extracted the zip file in the previous step.
 +
# Install the TextEditor:
 +
## In the menu choose ''Help'' -> ''Software Updates...''
 +
## Select the tab ''Available Software''
 +
## Click ''Add Site...''
 +
## Use the location URL: <tt>http://www.stups.uni-duesseldorf.de/update-beta/</tt>
 +
## Back in ''Available Software'' open the update site you just added
 +
## Select ''Event-B EMF Framework'' and ''Event-B TextEditor'' and click ''Install...''
 +
# Restart Rodin as suggested.
  
Sources are fetched from Subversion using the script below.  The script can be run on any Unix machine and takes the first two parameters described above (i.e., platform version and subversion revision).  For instance, to build Rodin 1.1, the script was invoked as
+
Now you are ready to use the TextEditor.
fetchSources 1.1 7661
 
  
The script itself is
 
<nowiki>#!/bin/sh
 
#
 
#  Fetch sources of the Rodin Platform from the Subversion repository on
 
#  SourceForge.
 
#
 
  
SVNROOT=http://rodin-b-sharp.svn.sourceforge.net/svnroot/rodin-b-sharp
+
==Usage ==
SVNURL=$SVNROOT/trunk/RodinCore
 
export SVNROOT SVNURL
 
 
 
fatal() {
 
    echo "$@" >&2
 
    exit 1
 
}
 
 
 
checkRevision() {
 
    if expr "$SVNREV" : '^[0-9][0-9]*$' >/dev/null; then
 
: OK
 
    else
 
fatal "Invalid SVN revision number: $SVNREV"
 
    fi
 
}
 
 
 
fetchSources() {
 
    mkdir sources || fatal "Some sources have already been checked out."
 
    cd sources
 
    fetchProject org.rodinp.releng
 
    cat org.rodinp.releng/rodin-core.psf |
 
sed -e '\,trunk/RodinCore/,!d' \
 
    -e 's,.*RodinCore/,,'  \
 
    -e 's/,.*//' |
 
while read m; do
 
    fetchProject "$m"
 
done
 
}
 
 
 
fetchProject() {
 
    m="$1"
 
    echo "Fetching $m"
 
    svn -q export -r "$SVNREV" "$SVNURL/$m" "$m"
 
}
 
 
 
 
 
[ $# -eq 2 ] || fatal "Usage: $0 <Rodin_version> <SVN_revision>"
 
VERSION="$1"
 
SVNREV="$2"
 
checkRevision
 
fetchSources
 
zip -q -r "../rodin-${VERSION}-sources.zip" *</nowiki>
 
 
 
==Installing Eclipse for Headless Build==
 
 
 
To install Eclipse for headless build, you first need to download two bundles from the Eclipse download site:
 
* <tt>eclipse-SDK-${VERSION}-${PLATFORM}.tar.gz</tt>
 
* <tt>eclipse-${VERSION}-delta-pack.zip</tt>
 
where <tt>VERSION</tt> is the version of Eclipse (e.g., <tt>3.4.2</tt>) and <tt>PLATFORM</tt> specifies the host platform for the build (e.g., <tt>linux-gtk</tt>).
 
 
 
Once downloaded, you need to extract the first archive, and then the second archive on top of the first. You now have an Eclipse installation able to build binary distribution for all platforms supported by Eclipse.
 
 
 
==Building the Platform==
 
 
 
To build the platform, you just need to run the script below after possibly modifying some of the variables at the beginning of it.  The meaning of the variables is
 
{| border="1" cellspacing="0" cellpadding="5"
 
| <tt>BUILD_ID</tt>
 
| Simple platform version (first parameter above)
 
|-
 
| <tt>SVNREV</tt>
 
| Subversion revision number with an <tt>r</tt> prepended
 
|-
 
| <tt>VERSION</tt>
 
| Full platform version used for provisioning (must contain <tt>$SVNREV</tt> as qualifier)
 
|-
 
| <tt>JAVA_HOME</tt>
 
| Absolute path to a Java Runtime Environment
 
|-
 
| <tt>BUILD_BASE</tt>
 
| Absolute path to the directory used for building. As a result of a previous step, this directory must contain a <tt>sources</tt> folder where the Rodin sources have been downloaded.
 
|-
 
| <tt>ECLIPSE_HOME</tt>
 
| Absolute path to the Eclipse installation (including the delta pack) to use for building
 
|-
 
| <tt>PDE_BUILD</tt>
 
| Absolute path to the PDE plug-in in your Eclipse installation.
 
|-
 
| <tt>BASE_OS</tt>
 
| Operating system of the host platform
 
|-
 
| <tt>BASE_WS</tt>
 
| Windowing system of the host platform
 
|-
 
| <tt>BASE_ARCH</tt>
 
| Architecture of the host platform
 
|}
 
 
 
The build script is
 
<nowiki>#!/bin/sh
 
 
 
BUILD_ID=2.0
 
SVNREV=9964
 
VERSION=$BUILD_ID.r$SVNREV
 
 
 
JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
 
 
 
BUILD_BASE=$HOME/Rodin/$BUILD_ID
 
BUILD_DIR=$BUILD_BASE/work
 
RELENG=$BUILD_BASE/sources/org.rodinp.releng
 
 
 
ECLIPSE_HOME=$HOME/eclipse-SDK-3.6.2
 
PDE_BUILD=$ECLIPSE_HOME/plugins/org.eclipse.pde.build_3.6.2.R36x_20110203
 
ANT_SCRIPT=$PDE_BUILD/scripts/productBuild/productBuild.xml
 
 
 
BASE_OS=linux
 
BASE_WS=gtk
 
BASE_ARCH=x86
 
 
 
$JAVA_HOME/bin/java \
 
    -jar $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar \
 
    -application org.eclipse.ant.core.antRunner \
 
    -buildfile $ANT_SCRIPT \
 
    -Dbuilder=$RELENG \
 
    -DbuildDirectory=$BUILD_DIR \
 
    -DpluginPath=$BUILD_DIR/plugins/org.rodinp.platform \
 
    -Dbase=$ECLIPSE_HOME \
 
    -DbaseLocation=$ECLIPSE_HOME \
 
    -Dbaseos=$BASE_OS \
 
    -Dbasews=$BASE_WS \
 
    -Dbasearch=$BASE_ARCH \
 
    -DbuildId="$BUILD_ID" \
 
    -DbuildVersion="$VERSION" \
 
    -DforceContextQualifier="r$SVNREV" \
 
    -Dconfigs="linux,gtk,x86 & win32,win32,x86 & macosx,cocoa,x86_64"</nowiki>
 
 
 
==Post Build Verifications==
 
 
 
When the build worked, the "work/result" directory contains zipped archives for all platforms.
 
For each of them, check that:
 
* "rodin" binary is an executable file (for Linux and Mac)
 
* a directory "dropins" exists at the root (under "rodin", among "features", plugins", ...)
 
* in "configuration/org.eclipse.equinox.simpleconfigurator/bundles.info", plug-in "org.eclipse.equinox.p2.reconciler.dropins" is configured with auto start mode ("true" at the end of the line)
 
 
 
Failures must be manually corrected. Final archives shall match the above requirements.
 
 
 
==Providing Sources==
 
 
 
Sources must also be provided, in both these ways:
 
* compressed source archive, as fetched through [[#Fetching Sources]]
 
* archive suitable for inclusion in a target platform (see [[Generating source bundles for inclusion in a target platform configuration]])
 
* SVN tag under ''/svnroot/rodin-b-sharp/tags/RodinCore/x.y''
 
 
 
==Last operations to perform==
 
*Ensure that the download of the uploaded version of Rodin is here by default
 
*Update the main wiki page:
 
**http://wiki.event-b.org/index.php/Main_Page
 
**The image "out now" is to be changed
 
**The link "learn more" should point to the release notes
 
**The link "download now" should point to the SF repository
 
*The 64 bits page should be updated:
 
**http://wiki.event-b.org/index.php/Rodin_64_bit
 
* A group for the new release is available on Bug and Feature Request trackers.
 
*A mail is sent on the user + announce rodin SF lists.
 
 
 
[[Category:Developer documentation]]
 
[[Category:Rodin Platform]]
 

Revision as of 10:34, 13 May 2009

The first version of the Text Editor will be released in a few weeks, that means in second half of June and not before the Rodin release 1.0 has been published.

Until then we are going to release a few testing releases (beta) for interested users. You will find instructions how to install and use these beta-releases on this page.


Warning:

Don't use the TextEditor yet with your production models!

  • The TextEditor is still in heavy development
  • It is based on a new Rodin version which uses a changed database model and therefore is not compatible with older versions.


Installing

The TextEditor relies on features of the Rodin release 1.0 which is not yet released. Therefore you will have to create a new Rodin installation. The following steps will guide you through this process:

  1. Download a build of Rodin from our CruiseControl server:
    1. Point your browser to [1]
    2. Download a zip file with a name starting with rodin-product and matching your platform. For example rodin-product-linux.gtk.x86.zip if you are working on a Linux system.
  2. Extract the downloaded zip file.
  3. Start Rodin from the folder where you extracted the zip file in the previous step.
  4. Install the TextEditor:
    1. In the menu choose Help -> Software Updates...
    2. Select the tab Available Software
    3. Click Add Site...
    4. Use the location URL: http://www.stups.uni-duesseldorf.de/update-beta/
    5. Back in Available Software open the update site you just added
    6. Select Event-B EMF Framework and Event-B TextEditor and click Install...
  5. Restart Rodin as suggested.

Now you are ready to use the TextEditor.


Usage