Skip to content
afla edited this page Oct 25, 2016 · 7 revisions

Note: /home/alex/reconfigurator is an example base folder. Feel free to place your files wherever you like.

1. Prerequisites

1.1. Install the prerequisites: Git, the Java Development Kit and Bison (for XTC).

    $ apt-get install git default-jdk bison

2. Eclipse

2.1. Download, extract and launch Eclipse IDE for Java and DSL Developers. This version of Eclipse has support for Xtend. Also add a workspace folder.

    $ cd /home/alex/reconfigurator
    $ wget -O eclipse-dsl-neon-1a-linux-gtk-x86_64.tar.gz "http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/1a/eclipse-dsl-neon-1a-linux-gtk-x86_64.tar.gz&r=1"
    $ tar -xf eclipse-dsl-neon-1a-linux-gtk-x86_64.tar.gz
    $ mkdir workspace
    $ eclipse/eclipse &

2.2. Set the /home/alex/reconfigurator/workspace as the default workspace.

3. C-Reconfigurator

3.1. Download the C-Reconfigurator source.

    $ cd /home/alex/reconfigurator
    $ mkdir c-reconfigurator
    $ git clone https://github.com/models-team/c-reconfigurator.git c-reconfigurator

3.2. Launch or go to Eclipse.

    $ eclipse/eclipse &

3.3. Create a new Java Project.

  1. Press Shift+Alt+N and select Java Project.
  2. Write reconfigurator into the "Project name" textbox.
  3. Click the "Finish" button.

3.4. Convert to Xtext project.

  1. Right-click the reconfigurator project, select the "Configure" menu and click the "Convert to Xtext Project" button.
  2. Right-click the reconfigurator project, select the "Build path" menu and click the "Add Libraries" button.
  3. Select "Xtend Library", click the "Next" button, click the "Finish" button.

3.5. Set up the source folder.

  1. Expand the reconfigurator project.
  2. Right-click on the src folder and click the "Delete" button. Then click the "OK" button to confirm.
  3. Right-click the reconfigurator project, select the "Build Path" menu and click the "Link Source" button.
  4. Write /home/alex/reconfigurator/c-reconfigurator/src into the "Linked folder location" textbox.
  5. Write src into the "Folder name" textbox.
  6. Click the "Finish" button.
  7. Let Eclipse build the project.

3.6. Add required jars.

  1. Right-click the reconfigurator project, select the "Build Path" menu and click the "Add External Archives" button.
  2. In the pop up navigate to /home/alex/reconfigurator/c-reconfigurator/libs.
  3. Select all files and click the "OK" button.
  4. Let Eclipse build the project.

4. XTC

4.1. Download the XTC source. It is important that the folder in which the repository is clones is named xtc.

    $ cd /home/alex/reconfigurator
    $ mkdir xtc
    $ git clone https://github.com/models-team/xtc.git xtc

4.2. Update the paths in the /home/alex/reconfigurator/xtc/setup.sh file.

    JAVA_DEV_ROOT=/home/alex/reconfigurator/xtc
     CLASSPATH=$JAVA_DEV_ROOT/classes:$JAVA_DEV_ROOT/bin/junit.jar:$JAVA_DEV_ROOT/bin/javabdd.jar:$JAVA_DEV_ROOT/bin/org.sat4j.core.jar
    JAVA_HOME=/usr/bin
    PATH_SEP=:
    export JAVA_DEV_ROOT CLASSPATH JAVA_HOME PATH_SEP

4.3. Configure and build the project.

    $ cd xtc
    $ source setup.sh
    $ make configure
    $ make jars

4.4. Right click the reconfigurator project in Eclipse, select the "Build path" menu and click the "Configure Build Path" button. Replace the external JAR /home/alex/reconfigurator/c-reconfigurator/libs/xtc.jar with the newly created /home/alex/reconfigurator/xtc/bin/xtc.jar.

4.5. Also

Clone this wiki locally