<commit_before>Windows dependencies:

Core

zlib
http://zlib.net/zlib125.zip

PNG
http://cdnetworks-us-1.dl.sourceforge.net/project/libpng/libpng15/1.5.2/lpng152.zip

Freetype2
http://surfnet.dl.sourceforge.net/project/freetype/freetype2/2.4.5/ft245.zip

PhysFS
http://offload1.icculus.org:9090/physfs/downloads/physfs-2.0.2.tar.gz

OpenAL
http://kcat.strangesoft.net/openal-releases/openal-soft-1.13.tar.bz2
http://connect.creativelabs.com/openal/Downloads/oalinst.zip

Ogg
Vorbis
http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.zip

Lua
http://www.lua.org/ftp/lua-5.1.4.tar.gz

glext.h & wglext.h
http://www.opengl.org/registry/#headers

Build all and install to Releases/Win/Framework/Dependencies

Modules

Box2D
http://box2d.googlecode.com/files/Box2D_v2.1.2.zip

Bullet
http://bullet.googlecode.com/files/bullet-2.78.zip

Tools

Assimp
http://sourceforge.net/projects/assimp/files/assimp-2.0/assimp--2.0.863-sdk.zip/download<commit_msg>Wrote CMake build instructions.<commit_after># Building Polycode and dependencies #

Polycode comes with hand maintained XCode and Visual Studio 2010 
projects which may be found in Build subdirectories under the Bindings,
Core, IDE, Modules, Player and Tools directories.

There is also a CMake build generator for automatically downloading and
building required 3rd party packages and Polycode itself.

This document describes the CMake build system for Polycode.

The first dependency is CMake. It can be downloaded from 
http://cmake.org/cmake/resources/software.html or installed using apt
or rpm on most Linux distributions. CMake 2.8.4 or greater is 
recommended.

## Building dependencies ##

Polycode depends on a number of third party packages that are not
included in the Polycode source tree:
 * [Lua](http://www.lua.org/)
 * [Freetype](http://www.freetype.org/)
 * [zlib](http://www.zlib.net/)
 * [libpng](http://www.libpng.org/pub/png/libpng.html)
 * [PhysicsFS](http://icculus.org/physfs/)
 * [Ogg Vorbis](http://www.vorbis.com/)
 * [OpenAL](http://www.openal.org/)
 * [SDL](http://www.libsdl.org/)
 * [Box2D](http://www.box2d.org/)
 * [Bullet Physics](http://bulletphysics.org/)
 * [Assimp](http://assimp.sourceforge.net/)

Depending on your platform, some of these dependencies will already be
installed on your system. For the rest, they can be automatically 
downloaded and compiled using the CMakeLists.txt build in the 
Dependencies directory. 

The CMake dependency build will check for the existance
of dependencies and build anything that is not already installed on your
system.

All dependenices will be installed into the Polycode source tree under
    Release/<Platform>/Framework/

Instructions describe using CMake on the command line, you
may prefer to use the CMake GUI if unfamiliar with CMake.


### Mac OS X and Xcode ###

To generate an Xcode project for building Polycode dependencies, perform
the following steps in the Polycode directory from a terminal:

    cd Dependencies
    mkdir Build
    cd Build
    cmake -G Xcode ..
    
This generates a PolycodeDependencies Xcode project in the Build 
directory. Building this project in Xcode will download, build and 
install the dependencies. Note that you need to build both Debug and
Release in Xcode.

### Windows and Visual Studio ###

To generate a Microsoft Visual Studio (any version) project for building
Polycode dependencies, perform the following steps in the Polycode 
directory from a command prompt (for VS2010):

    cd Dependencies
    mkdir Build
    cd Build
    cmake -G "Visual Studio 10" ..
    
This generates a PolycodeDependencies.sln in the Build directory. 
Building this project in Visual Studio will download, build and 
install the dependencies. Note that you need to build both Debug and
Release in Visual Studio. 

### Unix Makefiles ###

Linux users should ensure available dependencies for their platform are
installed before running the Polycode dependency build. 

On a Debian system run:
    sudo apt-get install zlib1g-dev libpng12-dev libfreetype6-dev \
    libphysfs-dev libogg-dev libvorbis-dev libopenal-dev libsdl1.2-dev \
    liblua5.1-0-dev

To generate and build Debug and Release builds with Unix Makefiles 
perform the following steps in the Polycode directory from a terminal:

    cd Dependencies
    mkdir Build
    cd Build
    mkdir Debug
    cd Debug
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../..
    make
    cd ..
    mkdir Release
    cd Release
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../..
    make
    
## Building Polycode ##

The Polycode CMake build will look for dependencies installed on the 
system and by the above dependency build step.

### Mac OS X and Xcode ###

**Note: the Mac CMake build does not compile and link yet.**

To generate an Xcode project for building Polycode, perform the
following steps in the Polycode directory from a terminal:

    mkdir Build
    cd Build
    cmake -G Xcode ..

This generates a Polycode Xcode project in the Build directory.

### Windows and Visual Studio ###

To generate a Microsoft Visual Studio project for building Polycode, 
perform the following steps in the Polycode directory from a 
command prompt:

    mkdir Build
    cd Build
    cmake -G "Visual Studio 10" ..
    
This generates a Polycode.sln in the Build directory.

### Unix Makefiles ###

To generate and build Debug and Release builds with Unix Makefiles 
perform the following steps in the Polycode directory from a terminal:

    mkdir Build
    cd Build
    mkdir Debug
    cd Debug
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../..
    make
    cd ..
    mkdir Release
    cd Release
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../..
    make

## TODO ##

It would be good to create a CMake build template for people to create
new Polycode applications with.

Fix Mac OS X compilation and linking.
{'fraction_non_alphanumeric': 0.08082354942998128, 'fraction_numerical': 0.013782542113323124, 'mean_word_length': 3.657686212361331, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6824809', 'n_tokens_mistral': 1825, 'n_tokens_neox': 1731, 'n_words': 666}