2. Installation and start up instructions

2.1. Windows
2.2. Linux, MacOS X, and other UNIX-like systems

On all supported platforms, TrEd requires a Perl language interpreter, the Perl-Tk module (a GUI library for Perl), and depending on the I/O _backends used also various XML related modules. Installation of all these tools differs on Unix-like and Windows platforms.

To install TrEd on your system follow the instructions specific for your platform below:

2.1. Windows

2.1.1. Step 1: installation of Strawberry Perl for Windows

TrEd for Windows requires Strawberry Perl. It can be installed separately before the installation of TrEd or during the installation of TrEd. Packages with Strawberry Perl included are also available on the TrEd's home page. These installation wizards can download and set up Strawberry Perl, if it is not already installed on the system.

Active Perl is no longer supported. If you already have Active Perl installed, you have to install Strawberry Perl and choose proper custom Perl directory during the installation (by default, Strawberry Perl executable is installed to C:\strawberry\perl\bin).

2.1.2. Step 2: installation of TrEd

Download one of the versions of TrEd installer for Windows from the project's homepage. These packages contains TrEd as well as all required Perl modules. You can choose from 3 packages -- one with Strawberry Perl included, one without Strawberry Perl and one portable version of TrEd with portable Strawberry Perl included.

The portable version can be extracted to any location on your hard drive by 7-zip. To install non-portable TrEd, just follow the instructions of the installers.

Warning

It is not recommended to run TrEd with the CygWin distribution of Perl (but you can install Strawberry Perl, even if you already have a Perl installation in CygWin). If you really must try running TrEd in CygWin, follow the instructions for setup on UNIX-like systems (but you have been warned).

2.2. Linux, MacOS X, and other UNIX-like systems

Almost every today's UNIX/Linux system contains a Perl installation, so we expect that you already have a working Perl setup (version >= 5.8.3 is required but at least 5.8.8 is recommended).

TrEd further requires at least the following Perl modules and their dependencies:

  • File-Temp
  • File-Which
  • File-Spec
  • Text-Iconv
  • Tie-IxHash
  • Tk (for GUI)
  • Compress-Zlib (for printing to PDF)
  • XML-LibXML (requires libxml2)
  • XML-Simple
  • XML-Writer
  • Archive-Zip

TrEd along with all the required Perl modules and libraries can be installed in one step using an installer script install_tred.bash, as follows:

$ wget http://ufal.mff.cuni.cz/tred/install_tred.bash
$ bash install_tred.bash --tred-dir ~/tred

This installs TrEd under ~/tred and all missing modules and libraries under ~/tred/dependencies. TrEd should be started using a wrapper script ~/tred/bin/start_tred which configures correct library paths.

The installation script offers several options that allow custom choice of installation paths and also supports installation of development versions of TrEd from SVN. Use

$ bash install_tred.bash --help

for more information.

Check your installation with:

$ ~/tred/bin/start_tred -v
TrEd 1.3587 2008-10-01 14:16:32Z
Perl: 5.008008
Platform: linux
Tk: 804.028

If you get a similar output, you have successfully installed TrEd on your system. You can add ~/tred/bin to your PATH or symlink all ~/tred/bin/start_* scripts to some directory in your PATH, e.g. ~/bin.

Note

Unfortunatelly, another commonly used package contains an executable named tred, namely the GraphViz package by AT&T. This tool requires standard input, so if you attempt to start TrEd using the command tred and it just hangs, you may be running the GraphViz tool, not the tree editor TrEd.