Getting and installing GNU6 | ||
GNU6 can be downloaded from sourceforge and from ftp://lagrange.la.asu.edu/pub/gnu6. After completing downloading package you can uncompress it in a directory of your choice.
gnu6v1.2.tar.gz can be uncompressed with
tar -zxvf gnu6v1.2.tar.gz
gnu6v1.2.tar.bz2 is uncompressed with
bunzip2 gnu6.v1.2.tar.bz2
tar -xvf gnu6.v1.2.tar
and
unzip gnu6v1.2.zip
will do the job for gnu6v1.2.zip.
Now you have folder gnu6 that contains the following directory structure.
Directory structure | ||
Now we need to configure scripts in gnu6v1.2/build/bin by setting environment variables
GNU6_HOME JAVACMD JAVAC
GNU6_HOME should contain the complete path for gnu6v1.2. For example, if your shell is bash then
export GNU6_HOME=your_location_of_gnu6v1.2/gnu6v1.2
will define GNU6_HOME.
JAVACMD and JAVAC should point at java-interpretor (JVM-java virtual machine) and java-compiler, respectively. For instance, in bash shell
export JAVACMD=/usr/local/java/bin/java
export JAVAC=/usr/local/java/bin/javac
will define JAVACMD and JAVAC correctly assuming that you have java installed in /usr/local/java.
In order to compile GNU6 you execute script gmk located in gnu6v1.2/build/bin (it works only in UNIX).
Compiling GNU6 | ||
To compile everything in GNU6 you use
gmk all
If you want to compile only kernel, then
gmk six
will do the job.
In order to compile utilities and moves you run
gmk util
and
gmk moves
After these steps you have GNU6 environment compiled.
Finally we need to test that our GNU6 environment is correctly configured and ready for development. Let us go to directory gnu6v1.2/projects/test and edit the definition of "prefix" in file log.xml,
prefix "your_location_of_gnu6v1.2/gnu6v1.2/projects/test"
Do not forget to update your PATH with
export PATH=$GNU6_HOME/build/bin:$PATH
Now we test mlist log.xml with
testMLIST test/log.xml
If everything was done correctly the output is the following.
testMLIST output | ||
Testing /home/sergey/devel/gnu6_1.2/projects/test/log.xml ------------------ Every day schedule ------------------ Start = 4:00:00 AM End = 11:15:00 PM ------------ Special days ------------ Special schedule for 9/22/02 --------------------------- Start = 9:00:00 AM End = 1:15:00 PM --------------------------- Holidays --------------------------- --------------------------- ************************************************************ ************************************************************ Schedule for today 1/21/03 ------------------------------- Start = 4:00:00 AM End = 11:15:00 PM ------------------------------- move 0) org.gnu6.moves.log skipOnFail = false message="Do I need to do report" ------------------------------------------------------- move 1) org.gnu6.moves.clearState skipOnFail = false ------------------------------------------------------- move 2) org.gnu6.moves.log skipOnFail = false message="Yes I need to do report" -------------------------------------------------------
The command
runMLIST test/log.xml
will run mlist log.xml. You can look at Log.log in order to see the result of mlist execution.