How to build FrobTADS on Mac OS X
This is a draft version, and very much a work in progress... feedback is welcome indeed...
Introduction
This document describes how to build FrobTADS 0.12 on Mac OS X. Doing this will get you:
- a command line interpreter ("frob") for playing both TADS 2 and TADS 3 games on Mac OS X
- a command line tool ("tadsc") and the necessary support files for developing TADS 2 games on Mac OS X
- a command line tool ("t3make") and the necessary support files for developing TADS 3 games on Mac OS X
FrobTADS 0.12 covers TADS versions 2.5.11 and 3.0.16.
The home page for FrobTADS is http://www.tads.org/frobtads.htm, and a visit there is highly recommended.
Note that the resulting executables - frob, tadsc, t3make - will be platform-specific: that is, for either Intel or PowerPC Macs, depending on the kind of system you build them on. In other words, said executables will not be Universal Binaries.
Prerequisites
This document assumes you are using Mac OS X version 10.5 and Apple's XCode development tools version 3.
If you don't already have them, you'll need to download and install the XCode development tools; see http://developer.apple.com/technology/xcode.html (Note: XCode is included on a DVD with new Macs, which may save you the download.)
Building FrobTADS requires the use of OS X's command line shell ("the Terminal") - /Applications/Utilities/Terminal.app - so go and start that program up right away.
Caveats / disclaimer
This document is intended as a short-cut: an easy-to-follow, sunny-day recipe. The official/authoritative documentation for FrobTADS, however, is contained in the doc/ folder in the frobtads-0.12.tar.gz file (see below), especially the INSTALL file, and you should refer to that in case of trouble.
Preparing the directory structure
First, let's establish a suitable directory structure for building FrobTADS. This structure will be rooted in the directory build-frobtads-012 in your home directory (/Users/<username>). In subsequent commands, your home directory will refered to as ~ (a common UNIX shortcut for such, and understood by the Terminal.)
Using the Terminal, issue the following commands:
cd ~ mkdir build-frobtads-012 cd build-frobtads-012 mkdir downloads mkdir build mkdir results
~/build-frobtads-012/ should now contain the following directories:
downloads/ build/ results/
Downloading the source packages
FrobTADS comes as three separate source packages:
- http://www.tads.org/frobtads/frobtads-0.12.tar.gz
- http://www.tads.org/frobtads/frobtads-t2compiler-0.12.tar.gz
- http://www.tads.org/frobtads/frobtads-t3compiler-0.12.tar.gz
Download all these into the ~/build-frobtads-012/downloads directory.
Expanding and merging the source packages
Using the Terminal, issue the following commands to expand the FrobTADS source packages:
cd ~/build-frobtads-012/build tar -zxvf ../downloads/frobtads-0.12.tar.gz cd ~/build-frobtads-012/build/frobtads-0.12 tar -zxvf ../../downloads/frobtads-t2compiler-0.12.tar.gz tar -zxvf ../../downloads/frobtads-t3compiler-0.12.tar.gz
Check that ~/build-frobtads-012/build/frobtads-0.12 now contains:
Common.am Frob.am Makefile.am Makefile.in README acinclude.m4 aclocal.m4 bootstrap config/ * config.h.in configure configure.ac doc/ * src/ * t2compiler/ Makefile.am src/ * tads2/ * t3compiler/ Makefile.am Testsuite.am src/ * tads3/ * testscripts/ * tads2/ * tads3/ *
Preparing to build
Here we configure things for OS X, and specify that the resulting executables and support files should end up in ~/build-frobtads-012/results.
Using the Terminal, issue the following commands (note that you have to use the explicit path to your home directory in the second command):
cd ~/build-frobtads-012/build/frobtads-0.12/ aclocal ./configure --prefix=/Users/<MYUSERNAME>/build-frobtads-012/results
Check that the last command produced an response like this:
checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes [... SNIPPED...] config.status: executing depfiles commands
Building
At last, the big moment. This step typically takes several minutes...
Using the Terminal, issue the following commands:
cd ~/build-frobtads-012/build/frobtads-0.12/ make
Check that the last command produced a response like this:
make all-am [...SNIPPED...] g++ -g -O2 -o frob src/frob-frobappctx.o [...SNIPPED...] tads3/frob-vmvec.o -lncurses
Check that ~/build-frobtads-012/build/frobtads-0.12/ now contains (among many other things) these files:
frob t3make tadsc
Installing the executables and support files
Here we gather up the "net results" of all we've done - the executables and support files - into the ~/build-frobtads-012/results/ directory.
Using the Terminal, issue the following commands:
cd ~/build-frobtads-012/build/frobtads-0.12/ make install
Check that ~/build-frobtads-012/results/ now contains:
bin/ frob t3make tadsc share/ frobtads/ tads2/ *.t tads3/ doc/ * include/ *.h lib/ *.t extensions/ *.t TCommand/ * adv3/ * system.tl res/ charmap/ cmaplib.t3r
And that's it for building FrobTADS. The files in ~/build-frobtads-012/results/ are what you need for TADS game development on Mac OS X, though you'll probably want to copy them to somewhere more permanent and suitable.
Now what? How do I use this stuff?
For information on writing games with TADS 2, see http://www.tads.org/tads2.htm#docs
For information on writing games with TADS 3, see http://www.tads.org/tads3.htm#docs