﻿Compilation instructions
========================


Required tools
--------------

RECOIL is written in the Ć programming language.
Official releases include translation of RECOIL to C, so you only need a C compiler and Make utility.
For other cases (Git, Paint.NET, HTML 5 or Android) you'll need cito (http://cito.sourceforge.net).


Required libraries
------------------

For Linux and Windows builds you will need development files for libpng >=1.2.5 and zlib >=1.2.3.
In some systems they are installed by default or included in software repositories.
For other systems, including Windows, you will need to build and install these libraries from sources.
See http://www.libpng.org/pub/png/libpng.html for downloads and build instructions.


Getting officially released source code
---------------------------------------

If you want to compile an official release of RECOIL, download the source distribution
(recoil-*.tar.gz) and uncompress it to a directory of your choice.

On Unix-like systems:

    tar zxf recoil-*.tar.gz

On Windows you may use 7-Zip (http://7-zip.org).


Getting latest source code
--------------------------

Alternatively you may get the latest version from the Git repository.
To do this using a command-line Git client:

    git clone git://git.code.sf.net/p/recoil/code recoil-code

This will fetch the latest code to a new directory called recoil-code.


Building recoil2png, GNOME thumbnailer and ImageMagick coder on Unix-like systems
---------------------------------------------------------------------------------

From your shell prompt navigate to the directory which contains recoil.ci.

Review the contents of Makefile and run:

    make

To install recoil2png under PREFIX, run:

    make install-recoil2png

To install the GNOME 3 thumbnailer and recoil2png, run:

    make install-thumbnailer

Or, if you are still on GNOME 2:

    make install-gnome2-thumbnailer

After you restart your system, Nautilus windows should display thumbnails
of retro computer images.

Installation of the ImageMagick coder requires that you have complete source
distribution of ImageMagick. Current version of the ImageMagick coder has been
tested with version 6.7.4-0 of ImageMagick.

Run make specifying path to the sources:

    make install-magick MAGICK_INCLUDE_PATH=/path/to/im/sources

To verify the installation, try to open some
example files (http://recoil.sourceforge.net/examples.zip):

    display COYOTE.RIP

You can also install all components at the same time, for example:

    make install PREFIX=/opt/recoil MAGICK_INCLUDE_PATH=/src/ImageMagick-6.7.4-0


Using recoil2png
----------------

Run the program from command line to see the syntax.
Unless you specify the -o/--output option, the output filename will be
constructed from the input filename with the extension changed to png.


Building recoil2png, XnView/ImageMagick/Imagine/Windows Explorer plugins and RECOILWin on Windows
-------------------------------------------------------------------------------------------------

Download MinGW (http://www.mingw.org/) and install binutils, core compiler, w32api and MinGW Make.

From the command prompt navigate to the win32 directory and run:

    mingw32-make


Building Paint.NET plugin on Windows
------------------------------------

Install .NET Framework 3.5, Paint.NET and MinGW Make.

Make sure cito is on your PATH.

From the command prompt navigate to the win32 directory and run:

    mingw32-make RecoilPaintDotNet.dll


Building HTML 5 based viewer
----------------------------

Make sure cito is on your PATH.

From the command prompt navigate to the www directory and run:

    make


Building Android application
----------------------------

Install Android SDK (http://developer.android.com/sdk/) with an Android platform.
Edit the paths at the top of android/Makefile so that they point to your installed SDK.

Make sure cito is on your PATH.

From the command prompt navigate to the android directory and run:

    make


Building the Quick Look plugin on OS X
--------------------------------------

Install Xcode Command Line Tools.

From the command prompt navigate to the osx directory and run:

    make
