Updated ReST docs, fixed some things in Swedish translation.

This commit is contained in:
Griatch 2012-02-19 10:49:59 +01:00
parent 11e61255da
commit c4f2c493d9
19 changed files with 937 additions and 745 deletions

View file

@ -4,20 +4,27 @@ Getting Started
This will help you download, install and start Evennia for the first
time.
*Note: You don't need to make anything visible to the 'net in order to
run and test out Evennia. Apart from installing and updating you don't
even need to have an internet connection. Of course you'll probably want
to put your game online once it matures enough, but until then it works
fine to develop and play around completely in the sanctity and isolation
of your local machine.*
Quick start
-----------
For you who are extremely impatient, here's the gist of getting a
vanilla Evennia install running.
#. *Get the pre-requisites (mainly Python, Django, Twisted and
Mercurial)*.
#. *Get the pre-requisites (Python, Django, Twisted and Mercurial)*.
#. *Start a command terminal/dos prompt and change directory to where
you want to have your 'evennia' folder appear*.
#. ``hg clone https://code.google.com/p/evennia/ evennia``
#. *Change directory to evennia/game*.
#. ``python manage.py``
#. ``python manage.py syncdb``
#. ``python manage.py migrate`` (only if using South)
#. ``python evennia.py -i start``
Evennia should now be running and you can connect to it by pointing a
@ -26,8 +33,8 @@ web browser to ``http://localhost:8000`` or a MUD telnet client to
Read on for more detailed instructions and configurations.
Pre-Requesites
--------------
Prerequisites
-------------
As far as operating systems go, any system with Python support should
work.
@ -44,9 +51,7 @@ Evennia:
**Python** (http://www.python.org)
- Version 2.5+. Obs- Python3.x is not supported yet.
- The default database system SQLite3 only comes as part of Python2.5
and later.
- Version 2.5+. Obs- Python3.x is not supported.
- Windows users are recommended to use ActivePython
(http://www.activestate.com/activepython/downloads)
@ -75,7 +80,7 @@ Optional packages:
**South** (http://south.aeracode.org/)
- Version 0.7+
- Optional. Used for database migrations.
- Optional, but highly recommended. Used for database migrations.
**Apache2** (http://httpd.apache.org)
@ -84,16 +89,17 @@ Optional packages:
equivalent web servers with a Python interpreter module can also be
used.
*Note: You don't need to make anything visible to the 'net in order to
run and test out Evennia. Apart from downloading/updating Evennia itself
you don't even need to have an internet connection. Of course you'll
probably want that as your game matures, but until then it works nicely
to develop and play around completely in the sanctity and isolation of
your local machine.*
Installing pre-requisites
~~~~~~~~~~~~~~~~~~~~~~~~~
**All platforms** can set up an *virtual Python environment* and install
Evennia to that. All you need pre-installed is Python. Setup is
described in detail
`here <GettingStarted#Optional:%3Ci%3EA%3C/i%3Eseparate%3Ci%3Einstallation%3C/i%3Eenvironment%3Ci%3Ewith%3C/i%3Evirtualenv.html>`_.
Windows users will probably want to go the ActivePython way instead
though (see below), there are issues with installing certain extensions
in Windows.
**Linux** package managers should usually handle all this for you.
Python itself is definitely available through all distributions. On
Debian-derived systems (such as Ubuntu) you can do something like this
@ -101,7 +107,7 @@ Debian-derived systems (such as Ubuntu) you can do something like this
::
apt-get install python python-django python-twisted mercurial
apt-get install python python-django python-twisted mercurial python-django-south
Few distros actually keep the latest updated security updates (notably
django and twisted) in their repos though. So it might be worth to use
@ -113,33 +119,43 @@ or all of these instead:
::
easy_install django twisted pil mercurial
easy_install django twisted pil mercurial south
::
pip install django twisted pil mercurial
pip install django twisted pil mercurial south
**Mac** users should be able to get most dependencies through
``easy_install`` or ``pip`` like Linux users do. There are however
reports that you might need to get the
`Xcode <https://developer.apple.com/xcode/.html>`_ development system to
install the packages that requites extension compiling. You can also
retrieve the dependencies directly and install them through their native
installers or python setups.
**Windows** users may choose to install
`ActivePython <http://www.activestate.com/activepython/downloads>`_
instead of the usual Python. If ActivePython is installed, you can use
`pypm <http://docs.activestate.com/activepython/2.6/pypm.html>`_ in the
same manner as ``easy_install``/``pip`` above. This *greatly* simplifies
getting started on Windows:
getting started on Windows since that platform is otherwise missing many
of the background developer systems that Linux users take for granted.
After installing ActivePython you may need to open a new DOS window to
make this new command available on the command line:
::
pypm install Django Twisted PIL Mercurial
pypm install Django Twisted PIL Mercurial South
Another simple alternative (for all platforms) is to set up a *virtual
Python environment* and install to that - in that case you can even
experiment with different library versions without affecting your main
system configuration. This is covered
`here <GettingStarted#Optional:%3Ci%3EA%3C/i%3Eseparate%3Ci%3Einstallation%3C/i%3Eenvironment%3Ci%3Ewith%3C/i%3Evirtualenv.html>`_.
This installs everything you need in one go.
Windows users not using ActivePython or virtual environments will have
to manually download and install the packages in turn - most have normal
Windows installers, but in some cases you'll need to know how to use the
Windows command prompt to execute some python install scripts.
to manually download and install the packages in turn (including their
own dependencies in the list above). Most have normal Windows
installers, but in some cases you'll need to know how to use the Windows
command prompt to execute python install scripts (usually it's not
harder than running ``python setup.py install`` from the downloaded
package's folder).
Step 1: Obtaining the Server
----------------------------
@ -227,7 +243,7 @@ need to do this:
This will migrate the server to the latest version. If you don't use
``South``, migrations will not be used and your server will already be
at the latest version (but your existing database might have to be
manually edited to match future server changes).
manually edited to match eventual future schema changes that we do).
Step 3: Starting and Stopping the Server
----------------------------------------
@ -244,19 +260,6 @@ starts in *interactive mode*, as a foreground process. You will see
debug/log messages directly in the terminal window instead of logging
them to a file.
Running the server in interactive mode is very useful for development
and debugging but is not recommended for production environments. For
the latter you'll want to run it as a *daemon* by skipping the ``-i``
flag:
::
python evennia.py start
This will start the server as a background process. Server messages will
be logged to a file you specify in your configuration file (default is a
file in ``game/logs``).
To stop Evennia, do:
::
@ -285,45 +288,35 @@ the ajax web client.
Welcome to Evennia! Why not try `building
something <BuildingQuickstart.html>`_ next?
Optional: Database migrations with South
========================================
Evennia supports database migrations using
`South <http://south.aeracode.org/>`_, a Django database schema
migration tool. Installing South is optional, but if it is installed,
Evennia *will* use it automatically, meaning this section comes into
play. You can install South from
`http://south.aeracode.org/. <http://south.aeracode.org/.>`_ It is also
available through the normal package distributions, easy\_install, pip,
or pypm (see above notes).
After your first run of ``migrate.py syncdb`` and whenever you see a
commit or mailing list message telling you that "the Database Schema has
changed", simply do the following from within the ``evennia/game``
directory:
::
python manage.py migrate
You should see migrations being applied, and should be left with an
updated DB schema afterwards.
Optional: A separate installation environment with virtualenv
=============================================================
Apart from installing the packages and versions as above, you can also
set up a very fast self-contained Evennia install using the
`virtualenv <http://pypi.python.org/pypi/virtualenv>`_ program.
set up a very easy self-contained Evennia install using the
`virtualenv <http://pypi.python.org/pypi/virtualenv>`_ program. If you
are unsure how to get it, just grab the ``virtualenv.py`` file from that
page and run it directly in the terminal with ``python virtualenv.py``.
Virtualenv sets aside a folder on your harddrive as a stand-alone Python
environment. It should work both on Linux and Windows. First, install
Python as normal, then get virtualenv and install it so you can run it
from the command line. This is an example for setting up Evennia in an
isolated new folder *mudenv*:
environment. It should work both on Linux/Unix and Windows. First,
install Python as normal, then get virtualenv and install it so you can
run it from the command line. This is an example for setting up Evennia
in an isolated new folder *mudenv*:
::
python virtualenv mudenv --no-site-packages
Or, if you grabbed ``virtualenv.py`` and is running it directly:
::
python virtualenv.py mudenv --no-site-packages
Followed by
::
cd mudenv
Now we should be in our new directory *mudenv*. Next we activate the
@ -331,27 +324,27 @@ virtual environment in here.
::
# for Linux:
# for Linux/Unix:
source bin/activate
# for Windows:
<path_to_this_place>\bin\activate.bat
<path_to_this_place>\Scripts\activate.bat
Next we get all the requirements with *pip*, which is included with
The virtual environment within our *mudenv* folder is now active. Next
we get all the requirements with *pip*, which is included with
virtualenv:
::
pip install django twisted pil mercurial
pip install django twisted pil mercurial south
(The difference from the normal install described earlier is that these
The difference from the normal install described earlier is that these
installed packages are *only* localized to the virtual environment, they
do not affect the normal versions of programs you run in the rest of
your system. So you could for example experiment with bleeding-edge,
unstable libraries or go back to older versions without having to worry
about messing up other things. It's also very easy to uninstall the
whole thing in one go - just delete your ``mudenv`` folder.)
whole thing in one go - just delete your ``mudenv`` folder.
You can now refer to **Step 1** above and continue on from there to
install Evennia into *mudenv*. In the future, just go into the folder
and activate it to make this separate virtual environment available to
Evennia.
and activate it before starting or working with Evennia.