Download/Install

The easiest way to try out PIL is to download the Java-compiled implementation of PIL. To use it you need at least Java 5 or higher. The following sequence of commands show how to download and install it. This should work on any unix system (e.g. Linux, Mac).

    mkdir pil
    cd pil
    wget http://hydra.nixos.org/job/pil/pil-trunk/pilcJava/latest/download/1/pilc-java.tar.gz
    tar xvzf pilc-java.tar.gz
    export PATH=$PATH:`pwd`

To test your PIL setup:

    $ cd samples
    $ pil-java hello.pil
    [ Main | info ] Now compiling: hello.pil
    [ Main | info ] Done with hello.pil
    Hello world!
    $ pil-python hello.pil
    [ Main | info ] Now compiling: hello.pil
    [ Main | info ] Done with hello.pil
    Hello world!

You have installed PIL correctly. Make sure to add the PIL install directory to your PATH for it to work in a next session as well. Incidentally, the pil-java and pil-python convenience scripts, generate their code in the hidden .pil directory.

The native C compiled version of the PIL compiler

Builds are available from our buildfarm: http://hydra.nixos.org/jobset/pil/pil-trunk . To install PIL with Nix, do the following:

    nix-channel --add http://hydra.nixos.org/jobset/pil/pil-trunk/channel/latest
    nix-channel --update
    nix-env -i pil

or you can build from source from subversion. For building you need a recent version of Stratego/XT, Java-front and JDK 5+ and Apache Ant.

    svn co https://svn.strategoxt.org/repos/StrategoXT/pil/trunk
    ./bootstrap
    ./configure --prefix=/usr/local
    make
    make install