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:
TrEd for Windows requires ActivePerl. Due to its re-distribution restrictions, the tool cannot be bundled with TrEd and you have to download and install it separately from:
To finish the installation, obtain an up-to-date
windows-specific installation package from the project's
homepage. This single package contains
TrEd as well as all required Perl
modules. Unzip the installation package if necessary, run
setup.bat, and follow the
instructions in the command-shell window (you may safely
ignore the very first message which asks you about creating
/tmp
directory).
If you have the Prague Dependency Treebank 2.0™ CD-ROM, you may
start the installation directly from the CD-ROM
by clicking setup.bat in the
tools/tred/setup
directory.
The installation is completely text-based and you will mostly be confronted with only simple yes/no questions. The setup script will safely guide you through the following steps:
Checking if a suitable version ActivePerl is available on your system.
Installing all necessary Perl modules using the ActiveState's PPM packaging system.
Detecting if TrEd is already installed on your system and offering either an upgrade or a completely new installation in a directory you select.
Creating a data directory where you can place your TrEd-specific data files (this is optional).
Creating a desktop and Start Menu shortcuts for TrEd.
Although the TrEd setup program is CygWin-based, it is not recommended to run TrEd with the CygWin Perl (it is of course possible to use both TrEd+ActivePerl and CygWin separately on a single machine). The reason si firstly because this setup is not being tested and secondly because Perl/Tk for CygWin Perl requires CygWin XFree86 and according to author's opinion these don't play togheter well yet. It is therefore recommended that you install ActiveState 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).
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.2 is recommended).
TrEd further requires the following Perl modules and their dependencies:
File-Temp
File-Spec
Text-Iconv
Tie-IxHash
Tk
(for GUI)Compress-Zlib
(for printing to PDF)XML-LibXML
(for various I/O backends)XML-Simple
XML-Writer
All the above modules and their dependencies can be obtained and installed in a single step using the ./install script of the tred-dep-unix.tar.gz package as described below. The install script compiles and installs all required modules.
If you have the Prague
Dependency Treebank 2.0™ CD-ROM, you may
start the installation of these modules directly from
the CD-ROM by running ./install in
the tools/tred/packages_unix
directory. In this case you may skip steps
1. and 2.
Fetch the tred-dep-unix.tar.gz package
Unzip the package with
$ tar xzvf tred-dep-unix.tar.gz
Change to the tred-dep-unix
directory:
$ cd tred-dep-unix
If you have a root account on the machine, switch to it, e.g. by issuing
$ su root
Password:
If not, you may continue, but read carefully the following step.
Run the module installation script (you'll need a
functional C compiler, make
, etc., e.g. tools
available on most Linux/UNIX setups):
$ ./install
This scripts compiles and installs all required modules to the directory prefix where the Perl installation resides. If you'd like to use a different prefix (e.g. because you don't have root permissions on the box), use
$ ./install --prefix=directory-prefix
and ensure the environment variable settings suggested by the installation script at the end of the installation. You can review all options of the installation script with ./install --help.
The last few and steps describe the installation of TrEd itself. Start by fetching the latest TrEd distribution package tred-current.tar.gz, unpack the package it using
$ tar xzvf tred-current.tar.gz
and copy the resulting tred
directory
to a suitable locatoin on your system, e.g. with
$ cp -R tred /opt
or
$ cp -R tred /home/yourname
If you have the Prague
Dependency Treebank 2.0™ CD-ROM, you'll find the
unpacked installation package in the directory
tools/tred/tred
on the CD-ROM.
Create symlinks to tred, btred, and ntred executables from the destination directory you have chosen to some directory in your path, e.g.
$ ln -s /opt/tred
/*tred /usr/local/bin
Check your installation with:
$ tred -v
TrEd Id: tred,v 1.337 2005/04/13 18:17:08 pajas Exp
Perl: 5.008002
Platform: linux
Tk: 804.027
If you get a similar output, you have successfully installed TrEd on your system.
Unfortunatelly, another commonly used package contains an executable named tred, namely the GraphViz package by AT&T. Although we think we used the name first, we do not see much reason in arguing with them about renaming their program to something else. If you are affected by this name collision, simply rename one of the executables (either the one of TrEd of the one of GraphViz) to something else.
If the tred
executable fails to start at all, try changing the first line
(#!/usr/bin/env perl) so
that it points directly to your Perl executable.
If you find TrEd halting immediately,
complaining about not finding Tk.pm
or some
other Perl module, make sure that the installation went fluently.
You may also try to setup the environment variable PERLLIB
to point to the directory/directories where the modules
were installed.