2. Installation and start up instructions

2.1. Windows
2.2. Mac OS X Application
2.3. 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. Mac OS X Application

For OS X 10.7 Lion and 10.8 Mountain Lion

2.2.1. Installation of TrEd

Download the TrEd DMG image from the project's homepage. Mount the DMG file and open it. Then drag the TrEd icon over the Application folder and drop it. The application will be copied to your Application folder and you can start using TrEd. The TrEd must be copied to the Application folder as it will not work anywhere else.

Please note that, based on your security settings, you might be required to explicitly allow the first execution of the TrEd since it will be perceived by the OS as an unknown application downloaded from the web.

2.2.2. The X11 Server

TrEd requires X11 server. The OS X 10.7 Lion contains X11 server in standard installation, thus no problems should be there. The OS X 10.8 Mountain Lion does not include the server, however, the server is automatically installed when first application tries to use it. If you do not have X11 installed already, it will be installed when you start TrEd for the first time. You can also download it and install it manually (see the XQuartz project).

2.3. 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).

During the installation process of TrEd, many CPAN modules are compiled. In order to compile them successfully, one needs to have these libraries installed on his system:

  • X11 dev package
  • Xft dev package
  • lib fontconfig dev package
  • libpng12 dev package
  • zlib1g dev package
  • libxml2 dev package

On debian-based systems, these libraries can be installed by running following command:

$ sudo apt-get install libx11-dev libxft-dev libfontconfig1-dev libpng12-dev zlib1g-dev libxml2-dev

Note

For various reasons, if TrEd fails to find all the abovementioned library dependencies, it fails to run the installation into same tred-dir again. This issue will be resolved in a future release. Until then, please, delete the contents of the tred-dir you have chosen for installation after TrEd warns you about missing dependencies and then start the install_tred.bash --tred-dir script again.

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

  • Archive::Zip
  • Class::Std (for TectoMT extension)
  • Class::Inspector
  • Compress::Raw::Bzip2
  • Compress::Raw::Zlib
  • Encode::Locale
  • File::HomeDir
  • File::ShareDir
  • File::Which
  • Graph
  • Graph::ChuLiuEdmonds
  • IO::Compress
  • IO::String
  • IO::Zlib
  • JSON
  • LWP::Simple
  • LWP::UserAgent
  • Parse::RecDescent
  • PDF::API2
  • PostScript::Font
  • Readonly
  • Tie::IxHash
  • Tk
  • Tk::CodeText
  • Tk::HistEntry
  • Text::Iconv
  • Treex::PML
  • UNIVERSAL::DOES
  • URI
  • version
  • XML::CompactTree::XS
  • XML::LibXML
  • XML::LibXSLT
  • XML::NamespaceSupport
  • XML::SAX
  • XML::Writer
  • XML::XPath

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.