For impatient people who don't like to read through INSTALL files prior to
installing software on their system:

Enter the directory where you unpacked this package. For example:

  cd ~/downloads/frobtads-1.0

Then:

  mkdir build
  cd build
  cmake ..
  cmake --build . --target install

This will build and install frobtads into /usr/local. To play TADS games:

  frob ~/games/tads/arrival.gam

Get a list of command-line options:

  frob --help

If you want some more information, read through the rest of this file.


Requirements
============

Libraries
.........

FrobTADS requires ncurses. You have to install the ncurses development package,
not only the runtime package.

If the ncurses library is not found, you can still build and use the compilers,
since only the interpreter needs ncurses.

In additon, you will need libcurl and its development files installedss. This
is needed for some of the network functionality of TADS 3.


CMake
.....

The cmake tool is used to configure and build FrobTADS. Make sure you have it
installed. Every Linux distro has it available in their package repositories.
Same for *BSD systems. On other systems, you can find downloads here:

  https://cmake.org


Compiler
........

To compile the package you'll need a C and a C++ compiler that support the
C11 and C++14 standards. GCC and Clang are known to work, but others should
work too as long as they support the respective standards.


Installation
============

Compile and install:

  cmake [options] .
  cmake --build .
  cmake --build . --target install

You are not required to build in the same directory where you unpacked the
source package. For example, you can do something like this:

  mkdir build
  cd build
  cmake [options] ..
  cmake --build .
  cmake --build . --target install

Note that on Unix systems, cmake will by default generate a Makefile and thus
you can also use "make" to build and install instead of "cmake --build":

  make
  make install

Some options you can use when calling cmake:

  -DCMAKE_INSTALL_PREFIX=<directory>

    Top-level installation directory. Default is "/usr/local".

  -DENABLE_INTERPRETER=<YES|NO> (default is YES)

    Build "frob", the command-line TADS interpreter.

  -DENABLE_T2_COMPILER=<YES|NO> (default is YES)

    Build "tadsc", the TADS 2 compiler.

  -DENABLE_T3_COMPILER=<YES|NO> (default is YES)

    Build "t3make", the TADS 3 compiler.

  -DENABLE_T3_DEBUG=<YES|NO> (default is NO)

    Will build the debug version of the T3VM. This results in slower code, but
    is useful for people who want to make changes to the source code. This will
    also enable the TADS 3 test suite.

You may specify your own C and C++ compiler flags like so:

  CFLAGS="-O3 -pipe -march=native" CXXFLAGS="-O3 -pipe -march=native" cmake .

If you used -DENABLE_T3_DEBUG=YES, you can run the test suite with:

  ctest

Or:

  make test

This will build the test programs and then run some test scripts. If not all of
the tests succeed, there's something wrong. Contact the maintainer in this
case.

If you want to do a sanity-check on the TADS 3 compiler, you can type:

  make sample

This will compile the TADS 3 library sample game. It will be placed in the
"samples" subdirectory of the build directory. You can run it with:

  ./frob ./samples/sample.t3

"make sample" does not require the debug-version of T3, so it's always a good
idea to try it out before installing the package.

To play Tads games, use frob:

  frob [sometadsgame]

The file extension (.gam or .t3) is optional.


Operating systems
=================


macOS
.....

macOS should work just like "regular" Unix. Nothing special is required to
build the interpreter on macOS, and therefore the above instructions also apply
for macOS. Don't forget to install the ncurses and libcurl development packages
first.


Microsoft Windows
.................

It is currently NOT possible to build FrobTADS on Windows with MinGW/MSYS. The
last known version to build on Windows is 1.0. It might be possible to build
using Cygwin.
