Compilation Instructions        

Compilation Instructions

Compiling Grit yourself is possible, although not recommended except for people with a strong programming background. Much modification can be done merely by editting Lua scripts, and this possibility should be exhausted before considering
modifying C++ code (and rebuilding). Prebuilt statically linked executables for Linux and Windows are available in SVN, and these will be kept in sync with the lua files therein.

Tools

You will need svn (nice windows interface(external link)) and mercurial (nice windows interface(external link)). These tools are fairly similar in nature.

Dependencies

A number of dependencies are required. On windows they must be dealt with manually. On Linux there is a script that can help, so scan over this information but don't act until you've read the Linux-specific information at the bottom.

Lua VM

Lua is the language used for scripting in Grit. The Lua VM has been forked and is now part of Grit svn. If you are building Grit for the first time, you should have no problem with Lua.

ICU

ICU is used for internationalised unicode text processing. It is used to replace the string library within Lua and also for some C++-side string processing. It is a free library released by IBM. It is not forked or modified in any way.

On windows we recommend you download a prebuilt ICU(external link) as compiling it yourself can be complicated. Unpack it so that you have a gritengine/dependencies/icu/ directory. In this directory is 'include' 'bin' and 'lib'.

On Linux it is better to compile it, instructions are within the Linux link at the bottom of this page.

OGRE

OGRE is a large graphics library which is used in Grit to provide GL/D3D9 interoperability as well as a wealth of high-level rendering features that are useful for shadows and scene management. OGRE is now forked in a separate mercurial repository which we will be keeping up-to-date with the official OGRE trunk.

Clone this mercurial repository, your clone should be in gritengine/dependencies/grit_ogre: http://bitbucket.org/sparkprime/grit_ogre/(external link)

Bullet

Bullet is used for collision detection and dynamics simulation (known colloquially as 'physics' to most gamers). It must be downloaded from official Bullet svn and patched using gritengine/dependencies/bullet.patch

Check out this svn repository, your checkout should be in gritengine/dependencies/bullet (rename it if it's called 'trunk'): http://bullet.googlecode.com/svn/trunk(external link)

If the patch does not apply, try updating to the revision specified in the file gritengine/dependencies/bullet_revision.txt. We may start maintaining a fork of Bullet soon (like we do with OGRE) to avoid these difficulties.

Quex

Quex is a lexer generator, it is used to help read in TCOL files. It is forked and included within Grit SVN just like Lua. You do not have to run the lexer generator when compiling Grit because the generated files are included in SVN. However, the include files in gritengine/dependencies/quex-0.34.1/include are required to build.

There is no parser generator for the TCOL files. This is because the grammar is so simple that it is preferable to use a simple hand-written recursive descent parser.

Boost

Boost is used for threading within both OGRE and Grit. It is unmodified and can be installed system-wide. If you have already installed it for some other project then you are probably all set. Otherwise, instructions for installing it are given within the links below.

Building

Now choose one from the following

Compilation Instructions (Windows)

Compilation Instructions (Linux)