This file is intented for people wishing to run Trelby using the sources,
i.e., not using a released package. This means mostly developers who want
to inspect/modify the code.

1. Requirements
===============

You will need Python 3.x and wxWidgets (3.x) and its Python bindings to
run Trelby. You also need the lxml Python library (http://lxml.de/) and
the mock library (https://pypi.python.org/pypi/mock).

To build the manual, you will also need xsltproc.

2. Preparing data files
=======================

Trelby needs special preparation for 4 of its data files. If you do not do
this, that aspect of the program will not work.

 * Name list

  $ make names.txt.gz

 * Dictionary

  $ make dict_en.dat.gz

 * Manual

  $ make manual.html

 * Manpage

  $ make trelby.1.gz

You can run "make dist", which prepares all 4 and also generates a Linux
distribution package which you can ignore.

2.5. Preparing for a Windows build - Out of date
==================================

If you want to create the Windows package, you'll need to place the
Windows redistributable runtime file vcredist_x86.exe in the trelby
directory.

Be sure to have the following installed:

 * python-2.7.2.msi
  - py2exe-0.6.9.win32-py2.7.exe
  - wxPython2.8-win32-unicode-2.8.12.1-py27.exe
  - nsis-2.46-setup.exe
  - lxml-2.3.win32-py2.7.exe
  - pycrypto exe

Install vcredist_x86.exe locally. On Win Vista/7, msvcp90.dll will not be
under windows/system32, but under windows/winsxs. Hunt this file down,
and copy it over to system32. This just causes duplication, nothing else,
but is required so nsis won't complain about a missing DLL.

Finally ensure you had run make dist in the directory on a linux machine,
so all files are in place. (and ensure vcredist_x86.exe is here as well)

Then, on Windows, to create the installer:

1) cd <trelby directory>
2) build.bat

Your freshly created Setup-Trelby-<version>.exe should be ready.


3. Running Trelby in test mode
==============================

On Linux:

 $ cd ~/trelby/
 $ bin/trelby --test

On Windows:

 $ cd \trelby
 $ python3 bin/trelby --test sample.trelby

 The file t.bat contains the last command.

4. Differences from packaged versions
=====================================

The "--test" command line argument makes Trelby differ from normal running
as follows:

 -No splash window is displayed on startup.

 -No global directory locations are used; configuration/state files
 instead go under ".trelby" in the current directory.

 -The following characters activate special behavior:

  -"å": Load "sample.trelby".

  -"¤": Call function MyCtrl.cmdTest.

  -"½": Run speed tests.

   (The above characters are in the ISO-8859-1 character set.)
