## Retrieving and compiling the Developmental Version of Avida

This document will get you up and running with the developmental version of avida. Please make sure that you have setup the CVS in your account before starting. The process of setting up avida out of the CVS is slightly more complicated than retrieving it as a package, but will give you access to the most recent features and changes.

To begin, create a new sub-directory to place the avida source code in, and enter that sub-directory. Do this directly off of your home directory, you could type:

`cd ~`
`mkdir avida`
`cd avida`

Now that we have the place to put avida, we need to download it from the CVS. We have many different versions in the cvs, but you only want the most current version, which we have labeled "current".

`cvs get current`

If you are downloading from a SourceForge account, it will ask you for your password. You will then see a stream of filenames fly by you on the screen as it downloads them one at a time. When it is finished, you want to enter the directory it has created, and perhaps look at the files available:

`cd current`
`ls -sF`

You may notice that there are both a bunch of files and a few sub-directories. The CVS/ sub-directory is where the cvs keeps all of its information about what's up to date. The source/ sub-directory is where the source code is, and work/ is where you will be doing your runs. Most importantly, the doc/ sub-directory contains lots of documentations for doing Avida runs.

Your next step is to tell avida that it has just been taken out of the CVS, and that it should unpack any special files related to this. The program called "make" is used to execute a series of commands related to compiling source code. Normally it looks at the file "Makefile" for instructions, but this time we tell it to use the special file "Makefile.cvs" that tells it what to do when its removed from the CVS. The file Makefile.cvs is not included when we package avida up for other people to use.

`make -f Makefile.cvs`

This should have run quickly. Now that we have avida setup as it would be were we installing it from a package, we can use the normal utilities. First, you want to configure it for your machine. Do this by typing:

`./configure --enable-viewer`

If you don't care about compiling the ncurses (text) viewer, you can just type "./configure" by itself. The flags allow us to tell configure what it should and shouldn't setup to be compiled. For example, if we wanted to compile avida with the special debug modules turned on, we could also include "--enable-debug". For the moment, we're not going to worry about the graphical viewer (--enable-qt-viewer) since its not quite ready yet, and you would need to install extra packages on your machine. See the document on the qt-viewer for more information on that.

When we're done with the configuration, we finally compile to source code!

`make`

This will take a while; depending on the speed of the machine, it should be about 5 minutes. When it finally finishes, you should type:

`make install`

This will "install" all of the avida configuration files into the work directory, so you can do everything you need to right there. If you change a file in the work directory, CVS will *not* modify it on you then next time you do an update (nor will it assume that you want to commit the changes). If, as a developer, you do want to make permanent changes to everyone's configuration files, you need to do this in the source/support/ sub-directory.

And with that, we're done!

Try it out. Go into the work directory, and run avida:

`cd work`
`viewer`

The viewer has problems showing up properly on some systems, if it doesn't work for you, you can always just run avida in "primitive" move by typing "`primitive`" instead of "`viewer`".

Project hosted by: