Paintown
Version 3.2
Jon Rafkind
1/10/2009

Topics:
  Get Source
  Compilation
    Linux
    Windows
    Cygwin
    OSX
  Install
    Linux
  Scripting
  Requirements to build
  Thanks


* Get Source:

  If you are reading this you might already have the source. If not get it from here
  Game engine: $ svn co https://paintown.svn.sourceforge.net/svnroot/paintown/trunk

  You need the svn program, which is part of subversion - http://subversion.tigris.org/, to do this. Put the data directory inside the trunk directory, trunk/data.

  As of r1124 the data/ directory is an external resource for trunk, so you only have to check out trunk and svn will automatically get data/ for you.
  
  Data: $ svn co https://paintown.svn.sourceforge.net/svnroot/paintown/data

* Compilation:
  
  You can use scons or cmake.

  If the scons build fails because it cannot find hawknl/nl.h it may be because of this problem, http://scons.tigris.org/issues/show_bug.cgi?id=2121. Try the patch listed on that page, http://scons.tigris.org/nonav/issues/showattachment.cgi/448/bug2121_proposed_patch.  
  Upgrading to scons 1.1.0 also fixes this issue.


  * Linux

    $ scons

  * Windows
	
    To use mingw type

      $ scons env=mingw

    Otherwise

      $ scons

    Or you can use cmake

      paintown $ md b
      paintown $ cd b
      paintown/b $ cmakesetup ..
      paintown/b $ make

    The executable will end up in bin/paintown.exe

    To build a statically linked binary give the 'static' target
    $ scons static

  * Cygwin
    
    Don't use cygwin's tools. Install python/scons/mingw for regular windows and use that.
    $ export CYGWIN=1
    $ c:\progra~1\Python24\Scripts\scons

  * OSX
    $ scons

    How to build a .dmg file of paintown:
      $ scons static
      $ misc/make-osx-bundle

    This will create paintown-x-y.app/ and paintown-x-y.dmg.

   You need buildDmg.pl: http://www.objectpark.org/buildDMG.html
   I have placed the perl script in the misc directory, misc/buildDMG.pl, so just put
   that in a directory that is part of your path.

* Install:

  * Linux

  $ ./install.sh -d <data> -b <bin>

  Copy the data directory to <data> and put a script in <bin>.
  Default <data> directory is /usr/share/games/paintown
  Default <bin> directory is /usr/games

  The script will prompt you to input these directories if you do not
  give -d and/or -b.

  * Anything other than Linux
    Copy the binary and data somewhere. Otherwise use the prepackaged installers.

* Scripting

  A python engine has been added to paintown so you can script a level. See
  scripting.txt for more details.

* Requirements to build:

  You need the following things to compile Paintown:
    * gcc - http://www.gnu.org/software/gcc/
    Either * scons - http://www.scons.org
           * python - http://www.python.org
    Or
           * cmake - http://www.cmake.org
    * Allegro - 4.1 or higher. http://alleg.sf.net
    * zlib - http://www.zlib.net/
    * libpng - http://www.libpng.org/pub/png/libpng.html
    * pthreads - If you are on Unix you should have this or you can install glibc and you will get it. Windows people: http://sources.redhat.com/pthreads-win32/
    * freetype - Installed on most Unix systems along with X11. Windows people: http://gnuwin32.sourceforge.net/packages/freetype.htm.
    * Python headers. Use 'python-dev' on ubuntu.

* Thanks:
  Rain sound - by inchadney. http://freesound.iua.upf.edu/usersViewSingle.php?id=28867	
  DUMB - http://dumb.sf.net
  loadpng - http://tjaden.strangesoft.net/loadpng/
