= Building Development Environment - Your 12 step guide to writing code! =

shnl327@cse

Note that for most of this stuff you should just install packages appropriate for your linux distro. The instructions here are for installing from source; mostly only needed if you use redhat.

Most files mentioned here can be downloaded from simpson (192.168.0.206) under /home/willu/install. Download these files and folders:

=== Java stuff ===
 * j2sdk-1_4_2_06-linux-i586.rpm
 * Jama-1.0.1.jar
 * jogl-linux

=== OS, SDK for the dogs ===
 * OPEN_R_SDK-1.1.5-r3.tar.gz (you should get the newest one from http://www.openr.org/)

=== Python libs. You should get packages for these for your system ===
 * Python-2.4.tgz
 * pychecker-0.8.14.tar.gz
 * numarray-0.9.tar.gz
 * python-profiler

=== QT Libraries - again; get packages for your system ===
 * qt-x11-free-3.3.3.tar.gz
 * sip-4.1.1.tar.gz
 * PyQt-x11-gpl-3.13.tar.gz

=== OpenSSL is only needed for subversion. You should find svn packages for your system ===
 * openssl-0.9.7e.tar.gz
 * subversion-1.1.1.tar.gz < get the newest of this on cse mirror http://mirror.cse.unsw.edu.au/pub/debian/pool/main/s/subversion/

=== MIPS version of gcc, binutils. Some distros provide this stuff, most don't. ===
 * cross_dev_tools/*
 - if you have to download use cse mirror:
http://mirror.cse.unsw.edu.au/pub/gnu/binutils/binutils-2.14.tar.gz
http://mirror.cse.unsw.edu.au/pub/gnu/gcc/gcc-3.3.2.tar.gz


1. Install Java SDK
Install the RPM with:
{{{rpm -Uvh j2sdk-1_4_2_06-linux-i586.rpm}}}

2. Install Jama and jogl
Copy Jama.jar and the contents of jogl-linux into your JRE's lib/ext folder, which may be {{{/usr/java/j2sdk1.4.2_06/jre/lib/ext}}} if you used the default Java installation settings

3. Install OPEN-R
Copy OPEN_R_SDK-1.1.5-r3.tar.gz to {{{/usr/local}}} then untar it with:
{{{tar -zxvf OPEN_R_SDK-1.1.5-r3.tar.gz}}}
This untars the file to a folder OPEN_R_SDK, and thats all there is to installing the SDK.

4. Install MIPS cross development tools
There is a shell script called build-devtools in the cross development folder. Execute it and the script will install the development tools to the OPEN-R directory automatically

5. Install OpenSSL
OpenSSL is really only needed here for SVN (next one), and OpenSSL might already be installed on your machine, but if it isn't you can install it by untaring it with {{{tar -zxvf openssl-0.9.7e.tar.gz}}}, then install it with:
{{{
./config
make
make test
make install
}}}

6. Install SVN
SVN is a version control software like CVS and its used to access the Robocup repository. Since we use HTTPS, OpenSSL needs to be installed for SVN to work with HTTPS properly (hence the previous step), othwerwise you'll get an error like "Unrecognised URL Scheme" when you try to connect to a HTTPS site. Untar the SVN source using {{{tar -zxvf subversion-1.1.1.tar.gz}}} then install using:
{{{
./configure --with-ssl
make
make install
}}}

7. Install QT
Untar qt-x11-free-3.3.3.tar.gz to {{{/usr/local/qt}}} (copy the tar.gz file to /usr/local, untar it with tar -zxvf and mv the folder to qt). As per the QT installation instructions some paths need to be added to your .profile:
{{{
QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/doc/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

export QTDIR PATH MANPATH LD_LIBRARY_PATH
}}}
Now either login again or source your .profile to get those new variables loaded. Now to finish the installation:
{{{
./configure
make
make install
}}}

8. Install Python
The sip and pyqt packages here require Python 2.3 or above (from memory), and default installations of !RedHat install Python 2.2. So install Python 2.4 if you don't have it:
{{{
tar -zxvf Python-2.4.tgz
./configure
make
make install
}}}
Check that Python 2.4 is installed by running python on the command line. One of the first lines you get should be something like this:
{{{
Python 2.4 (!#1, Dec 13 2004, 09:32:09)
}}}
As far as I know 2.2 isn't overwritten but it coexists with 2.4.

9. Install SIP
"SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries"
Untar the tar.gz file. Install using:
{{{
python configure.py
make
make install
}}}
If Python wasn't installed properly SIP will complain about the versio of Python being wrong.

10. Install PyQT
"PyQt is a set of Python bindings for the Qt toolkit." ie, lets you make QT GUIs in Python
Untar the tar.gz file. Install using:
{{{
python configure.py
make
make install
}}}
Try run "designer" - a drop and drop QT GUI designing program

11. Install PyChecker
Python is a interpreted language - so you won't know theres a bug until you get there...pychecker can check your code before you run it. Untar the tar.gz file, and once you're in the pychecker directory installing using python pychecker/checker.py

12. Install numarray
This is a numerical package for Python. Untar and go into the directory and install with python setup.py install --gencode


Everything you need to run the Robocup code should now be installed.


=== A final note on Python version conflicts ===
To make sure that things installed for Python were actually done for Python 2.4 and not 2.2, start Python 2.4 in the command line and try:
{{{
from qt import *
}}}
If QT was installed properly for 2.4 there should be no errors. If it wasn't you'll get some sort of error with the line:
!ImportError: No module named qt

You should also check numarray as well.
{{{
from numarray import *
}}}
If it is not installed properly you will get:
!ImportError: No module named numarray

There is also a test routine explained in Doc/INSTALL.txt in the numarray tar file.

Try run the SimpleRoboCommander Python code - if you get an !ImportError: No module named qt, you should change the code's #! line to use Python 2.4 and not 2.2.

 
=== Building the base station ===
{{{
cd base7/work
make ( --> make client , make configuration , make RoboCommander)
}}}
=== Building the Python CPlaneClient ===
{{{
cd base7/work/SimpleRoboCommander/CPlaneClient
qmake *.pro ( need qt )
make
}}}
=== Building Python base station ===

At the moment, no need to make anything :)