Workbench Project Starter Templates

TADS Workbench for Windows features a "New Project" command that generates all of the files necessary to compile and run a skeleton game. This saves the author the trouble of copying all of the boilerplate for the .t3m and .t files making up the project.

If you're creating your own library that's designed to replace Adv3, Workbench provides a way for you to plug in your own project starter templates so that Workbench users can just as easily create new projects based on your library. This section describes how to create a project template.

Template file format

When Workbench displays the New Project dialog, it offers a list of project configurations for the user to choose from. Each entry in this list comes from a project starter template file, which has the suffix .tdb-project-starter. Workbench searches for all files with this suffix in the Extensions folder, each folder in the Library Paths list, and in the Workbench library folder. (Workbench searches all subfolders of each of these folders as well.)

To create an entry for your library in the New Project dialog, then, you just need to create a template file, and include it in your library folder.

The template file contains text in a special format, with instructions for Workbench on how to create the project. The file uses a simple name/value pair format, with one item per line. An item looks like this:

name: value

The name must be at the very start of the line, with no leading spaces. If a line starts with one or more spaces, it's read as a continuation of the previous line. This allows you to break up long values over several lines if needed for readability:

name: This is a value that goes on for
  quite a while, requiring several lines
  to make it all fit neatly.

When Workbench reads the file, it joins these lines together as though the value had appeared all on the same line. Workbench replaces each line break, along with all of the leading spaces on the following line, with a single space.

Here's a list of the name elements and what they mean:

Example

Here's the template included with the standard Workbench installation for the Introductory Adv3 Web UI project type.

name: Adv3 - Introductory - Web UI
sequence: 3
desc: Create a game based on the Adv3 library for Web browser play.
  Your new project will be set up for deployment on Web servers, so
  that users can play in a browser without installing any TADS
  software.  This project starter includes a working game scenario 
  as an example to help you get started.
source: samples\startI3.t $.t
lib: adv3web.tl
sysfile: webui.tl
sysfile: tadsnet.t
define: TADS_INCLUDE_NET
define: LANGUAGE=en_us
define: MESSAGESTYLE=neu

Installation

To distribute your library, simply create a ZIP file with all of your .t, .tl, and .tdb-project-starter files. Instruct users to install your library by following these steps:

There's no extra step to install your project template. Simply include the .tdb-project-starter file in the folder containing your library's .t and .tl files. Workbench automatically searches for .tdb-project-starter files in the Extensions folder tree (including sub-folders) and all of the folders in Library Paths list.