Module 1 - Getting Started
==========================

Start by creating a folder named ``MapFish``, this will be your working folder
for this workshop. In the rest of this document we'll assume that the 
``MapFish`` folder is located in ``C:\``, we'll refer to it as
``C:\MapFish``.

Getting workshop material
-------------------------

Get the Workshop material by checking out
http://www.mapfish.org/svn/mapfish/sandbox/camptocamp/mapfish_workshop with
Turtoise SVN.  For this open the explorer, go into ``C:\MapFish``, right-click
in the explorer window, choose ``SVN Checkout...``, enter the above URL, check
that the `Checkout directory` is ``C:\MapFish\mapfish_workshop``, and click
``OK``.

Export the ``mapfish_workshop`` folder to your Apache document root, for
example by copying it in Apache's ``htdocs`` directory. You should be able to
load http://localhost/mapfish_workshop/printing in your web browser.

Installing MapFish
------------------

To install MapFish, open a terminal command and follow these steps::

    C:\>cd C:\MapFish
    C:\MapFish>C:\Python25\python.exe mapfish_workshop\go-mapfish-framework-all.py env

This command creates a virtual Python environment named ``env`` and installs
MapFish and its dependencies into it.

Now activate the virtual environment with::

    C:\MapFish>env\Scripts\activate.bat

You command prompt should now look like this::

    <env> C:\MapFish>

To check that MapFish is correctly installed, enter::

    <env> C:\MapFish>paster create --list-templates

and check that the output is::

    Available templates:
    basic_package:   A basic setuptools-enabled package
    mapfish:         MapFish application template
    mapfish_client:  MapFish client plugin template
    paste_deploy:    A web application deployed through paste.deploy
    pylons:          Pylons application template
    pylons_minimal:  Pylons minimal application template

Installing FireFox extensions
-----------------------------

It is recommended that you use FireFox and install `Firebug
<http://getfirebug.com/>`_ [#]_. Firebug is an add-on for Firefox that allows
you to debug JavaScript in any web page. Firebug requires Firefox and cannot be
used with any other web browser. Installing the `JSONView
<https://addons.mozilla.org/en-US/firefox/addon/10869>`_ extension is also
recommented, it will be used for viewing JSON responses in FireFox.

.. [#] http://getfirebug.com/
.. [#] https://addons.mozilla.org/en-US/firefox/addon/10869
