<html>
<!-- DERIVED FILE - DO NOT EDIT -->

<head>
<title>Tools of the Trade &mdash; Setting it all up</title>
<link rel="stylesheet" href="sysman.css" type="text/css">
</head>
<body>
<div class="topbar"><img src="topbar.jpg" border=0></div>
<div class="nav">
<a class="nav" href="toc.htm">Table of Contents</a> | 
<a class="nav" href="intro.htm">Introduction</a> &gt; 
Setting it all up
<br><span class="navnp"><a class="nav" href="getting.htm"><i>Prev:</i> Getting What You Need</a> &nbsp;&nbsp;&nbsp; <a class="nav" href="tools.htm"><i>Next:</i> Tools of the Trade</a> &nbsp;&nbsp;&nbsp; </span>

</div>
<div class="main">
<h1>Setting it all up</h1>
<p>Once you've got up-to-date versions of the TADS 3 authoring system/compiler and the adv3Lite library you'll need to set things up so they all work together and you can set about creating your game. In what follows we'll assume your game is called "Heidi", since that's the name of the game we'll be creating in the next chapter. Obviously, when you come to create other games, you can substitute your own name for "Heidi" in what follows.</p>

<h2>Set-up for Windows Workbench</h2>

<p>First, before attempting to set up an individual game, open Windows Workbench, Select Tools from the Menu, then Options. Click on "Library Paths" (about three-quarters of the way down on the left-hand pane) then click on the "Add folders..." button. Navigate to the folder where you installed adv3Lite in the previous section (typically something like C:\Users\YourName\Documents\TADS 3\extensions\adv3Lite) and select it to add it to the list. This will tell Workbench where it can find the adv3Lite library; once you've done this once you shouldn't have to do it again (unless perhaps you reinstall Workbench for any reason).</p>

<p>Now, to set everything up to create a new game (which we're calling "Heidi" in preparation for the next section, although the same principles apply whatever you're calling it) carry out the following steps:</p>

<ol>
<li>Under your My Documents\TADS 3 folder create a new folder called Heidi.</li>
<li>Locate the extensions\adv3Lite\adv3Ltemplate folder and copy (don't move) its entire contents (but not the folder itself) into your newly-created Heidi folder.</li>
<li>Navigate back to the Heidi folder.</li>
<li>In the Heidi folder, rename the file <strong>adv3Ltemplate.t3m</strong> to <strong>heidi.t3m</strong>.</li>
<li>In the Heidi folder, rename the file <strong>adv3Ltemplate.tdbconfig</strong> to <strong>heidi.tdbconfig</strong>.</li>
<li>Open the file heidi.t3m in Workbench (either by double-clicking on it in Windows Explorer, or by using the File -&gt; Open Project option from the menu in Workbench).</li>
<li>Click the Go button (the little blue triangle at the left-hand end of the toolbar) in Workbench to compile and run the file to make sure everything's okay. You should then be in a position to start working on your new adv3Lite project.</li>
</ol>
<br>

<h2>Set-up for Mac OS X or Linux/Unix</h2>

<p>To set everything up to create a new game (which we're calling "Heidi" in preparation for the next section, although the same principles apply whatever you're calling it) carry out the following steps:</p>

<ol>
<li>Under the directory you've created to hold your TADS 3 source code (you might have called it TADS 3) create a new directory called Heidi.</li>
<li>Locate adv3Lite/adv3Ltemplate directory and copy (don't move) its entire contents (but not the directory itself) into your newly-created Heidi directory.</li>
<li>Navigate back to the Heidi directory.</li>
<li>In the Heidi directory, rename the file <strong>adv3Ltemplate.t3m</strong> to <strong>heidi.t3m</strong>.</li>
<li>In the Heidi directory, delete the file <strong>adv3Ltemplate.tdbconfig</strong> (if you're not using Workbench, you don't need it).</li>
<li>Now open the heidi.t3m folder in a text editor and edit it to read:<br>
<pre>
     -D LANGUAGE=english     
     -Fy obj -Fo obj
     -o heidi.t3
     -lib system
     -lib adv3Lite/adv3Lite
     -source start
</pre></li>
<li>Open a Terminal window. The Terminal program is located in Applications &gt; Utilities. You may want to make an alias for it and drag it into your Dock.</li>
<li>In the Terminal, use the cd (change directory) command to navigate to the folder where your game files are stored. For instance, you might type 'cd Documents/TADS/Heidi' and then hit Return.</li>
<li>While the Terminal is logged into this directory, you can compile your game using this command:
<pre>
     t3make -d -f heidi
</pre>
If all goes well, you should see a string of messages in the Terminal window, and a new file (heidi.t3) will appear in the MyGame directory. This is your compiled game file. If you've installed an interpreter program that can run TADS games, you'll be able to double-click the .t3 file and launch the game to test your work.<br>

Alternatively, you can run the game directly in the Terminal by typing 'frob heidi.t3' and hitting Return.</li>
<li>Instead of typing the t3make command every time you want to compile your game, you can create a .command file in your project folder and then double-click this file. Double-clicking the .command file will launch Terminal and pass the text in the .command file to Terminal.<br>

However, when you try this, the Macintosh is quite likely to object that you don't have permission to execute the .command file. There seems to be no way to fix this using the Info box (which is opened using Cmd-I). You'll have to do it from the Terminal. Navigate, as before, to the directory where your .command file is located, and type this into the Terminal:
<pre>
     chmod +x heidi.command
</pre>     
Again, substitute the name of your actual .command file. The chmod instruction with a +x flag will make the .command file executable. Now you can double-click it to compile your game, but only if Terminal is already logged into the game's directory. If no Terminal window is open, that won't be the case. To remedy this problem, add a cd line to the beginning of the .command file, so that the .command file looks something like this (substituting the name of your directory and game file):
<pre>
     cd Documents/TADS/Heidi
     t3make -d -f heidi
</pre></li>

</ol>

</div>
<hr class="navb"><div class="navb">
<i>adv3Lite Library Tutorial</i><br>
<a class="nav" href="toc.htm">Table of Contents</a> | 
<a class="nav" href="intro.htm">Tools of the Trade</a> &gt; 
GSetting it all up
<br><span class="navnp"><a class="nav" href="getting.htm"><i>Prev:</i> Getting What You Need</a> &nbsp;&nbsp;&nbsp; <a class="nav" href="tools.htm"><i>Next:</i> Tools of the Trade</a> &nbsp;&nbsp;&nbsp; </span>

</div>
</body>
</html>