# FreeGuide Developers: Compiling FreeGuide

## Getting the source

You can get FreeGuide's source code either by downloading a source release or by checking out from CVS.

### Downloading a source release

You can download a source release of FreeGuide from Sourceforge.

When you've downloaded either the zip or tar.gz file, unzip it, and skip to the Compiling section to compile FreeGuide.

### Checking out from CVS

To work with the very latest version of FreeGuide you'll need to check it out from CVS. Do a checkout by typing these two commands in a terminal:

`cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/freeguide-tv login`

[Press RETURN at password prompt]

`cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/freeguide-tv co freeguide-tv`

If you're one of the FreeGuide developers you can do it with a single command:

`cvs -z3 -d:ext:user_name@cvs.sourceforge.net:/cvsroot/freeguide-tv co freeguide-tv`

(Where user_name is your sourceforge user name.)

The above commands check out the default ("HEAD") branch of FreeGuide, but sometimes various other branches exist. If you need to check out a different branch, add "-r branch_name" between "co" and "freeguide-tv". For example:

`cvs -z3 -d:ext:user_name@cvs.sourceforge.net:/cvsroot/freeguide-tv co -r Stable0_8-branch freeguide-tv`

would check out the stable branches of FreeGuide based on the 0.8 release, rather than the latest code stored in HEAD.

When you've checked out the code from CVS, you need to download the latest XMLTV windows binary and source code packages from Sourceforge.

(Assuming you checked out the sources into ~/freeguide-tv/)

Place the source file xmltv-x.x.x.tar.bz2 into ~/freeguide-tv/xmltv/

Unzip the Windows binary file xmltv-x.x.x-win32.zip to a temporary file and copy the file xmltv.exe to ~/freeguide-tv/xmltv/

## Compiling

You should now be able to build the source tarballs and the Windows and Linux jars using Ant like so:

`cd ~/freeguide-tv
ant`

To build the Linux RPM, cd into freeguide-tv/src/install/linux and modify the file buildrpm to use your own home directory instead of /home/andy. Now running that file with ./buildrpm should build the entire project and create the noarch and src RPMs in freeguide-tv/installers. The RPM spec file is in freeguide-tv/src/install/linux/freeguide-tv.spec

To build the Windows installer you need NSIS from here: http://nsis.sourceforge.net/. Install NSIS v2 and right-click on the file freeguide-tv/src/install/windows/freeguide-tv.nsi. That should build the Windows EXE installer in freeguide-tv/installers.

## Help and questions

Email any questions to freeguide-tv-devel@lists.sourceforge.net and we'll do our best to answer them, and put useful answers up on this page.