OpenGFX readme wrote:5 Contributing to and building of OpenGFX
========================================
The OpenGFX source is available in a Mercurial repository or as gzip'ed tarball. You can do an anonymous checkout from
http://mz.openttdcoop.org/hg/opengfx , e.g. using
hg clone
http://mz.openttdcoop.org/hg/opengfx or obtain the tarball from
http://bundles.openttdcoop.org/opengfx/releases.
Prerequisites to building OpenGFX:
- mercurial (only when not building from a tarball, available from
http://mercurial.selenic.com/wiki/Downl ... ryPackages)
- gcc (the pre-processor is needed)
- md5sum (linux, mingw) or md5 (mac)
- nforenum r2281 or better (available from
http://www.openttd.org/download-nforenum)
- grfcodec r2245 or better (available from
http://www.openttd.org/download-grfcodec)
- some gnu utils: make, cat, sed
and you might additionally want a text editor of your choice and a graphics programme suitable to handle palettes.
On Windows: we advise to get a mingw development environment, download grfcodec, nforenum and mercurial from the sources mentioned above)
For more detailed instructions see our guide at
http://dev.openttdcoop.org/projects/home/wiki and the very extensive and detailed installation instructions on the mingw wiki at
http://www.mingw.org/wiki/Getting_Started
On Linux: your system should already have most tools, you'll probably only need nforenum, grfcodec and mercurial available from the source mentioned above. For installation instructions concerning mercurial refer to the manual of your distribution.
On Mac: Install the developers tools and get grfcodec and nforenum from the source mentioned above. Mercurial is easiest insalled via macports: sudo port install mercurial
The use of mercurial is strongly encouraged as only that allows to keep track of changes.
Once all tools are installed, get a checkout of the repository and you can build OpenGFX using make. The following targets are available:
- all: builds all grfs and the obg file
- install: build and then copy OpenGFX in your OpenTTD data directory. Use Makefile.local to specify a different path
- clean: cleans all generated files
- mrproper: also cleans generated directories
- bundle_src: create a source tarball
- bundle_zip: create a zip archive of OpenGFX
- bundle_bz2: create a bzip2 archive of OpenGFX
- bundle_tar: create a tar archive of OpenGFX
Given the usual case that you modify something within OpenGFX and want to test that, a simple 'make install' should suffice and you can immediately test the changes ingame, if you selected the nightly version of OpenGFX. Given default paths, a 'make install' will overwrite a previous nightly version of OpenGFX. Mind to re-start OpenTTD as it needs to re-read the grf files.