Demo installation
=================

1. Installation
---------------

To install the demonstration, enter the command:

  .. code-block:: sh

     <NAGARE_HOME>/bin/easy_install nagare.examples

or, in Windows:

  .. code-block:: cmd

     <NAGARE_HOME>\Scripts\easy_install.exe nagare.examples

2. Developers installation
--------------------------

If you want to work with the latest demo sources, first grab the sources from
the repository:

  .. code-block:: sh

     cd <NAGARE_HOME>
     hg clone http://hg.nagare.org/examples

Second, install the demo from the sources:

  .. code-block:: sh

     cd examples
     <NAGARE_HOME>/bin/python setup.py develop

You can now work with the sources of the demo in ``<NAGARE_HOME>/examples/nagare``
and, when you want to update the sources from the repository, do:

  .. code-block:: sh

     cd <NAGARE_HOME>/examples
     hg pull
     hg update

3. Lauching the demo applications
---------------------------------

.. note::

  On windows, replace the command ``<NAGARE_HOME>/bin/nagare-admin`` by
  ``<NAGARE_HOME>\Scripts\nagare-admin.exe``

To check the installation, the command:

  .. code-block:: sh

     <NAGARE_HOME>/bin/nagare-admin serve

must display the applications installed with the demo:

  .. code-block:: sh

     Available applications:
       - admin
       - demo
       - gallery
       - portal
       - wiki

To launch the "demo" application, enter:

  .. code-block:: sh

     <NAGARE_HOME>/bin/nagare-admin serve demo

and browse to http://127.0.0.1:8080/demo.

The "wiki", "gallery" and "portal" applications need a database so the extra step
of the database creation is required before to launch them.

To launch the "wiki" application, enter the commands:

  .. code-block:: sh

     <NAGARE_HOME>/bin/nagare-admin create-db wiki
     <NAGARE_HOME>/bin/nagare-admin serve wiki

and browse to http://127.0.0.1:8080/wiki.

for the "gallery" application, enter the commands:

  .. code-block:: sh

     <NAGARE_HOME>/bin/nagare-admin create-db gallery
     <NAGARE_HOME>/bin/nagare-admin serve gallery

and browse to http://127.0.0.1:8080/gallery.

or, for the "portal" application:

  .. code-block:: sh

     <NAGARE_HOME>/bin/nagare-admin create-db portal
     <NAGARE_HOME>/bin/nagare-admin serve portal

and browse to http://127.0.0.1:8080/portal.

.. wikiname: DemoInstallation
