| | 1 | (See the file COMPILERS on info about the TADS compilers.) |
| | 2 | |
| | 3 | For impatient people who don't like to read through INSTALL files prior |
| | 4 | to installing software on their system: |
| | 5 | |
| | 6 | Enter the directory where you unpacked this package (for example, |
| | 7 | "cd ~/downloads/frobtads-0.10"). Type: "./configure" followed by |
| | 8 | "make", then "make install". Play TADS games: |
| | 9 | "frob ~/games/tads/arrival.gam". Get a list of command-line options: |
| | 10 | "frob --help". |
| | 11 | |
| | 12 | Or simply use a GUI tool like Kconfigure to make the above a 1-click |
| | 13 | process. |
| | 14 | |
| | 15 | If you want some more information, read through the rest of this file. |
| | 16 | |
| | 17 | You can find generic and very detailed documentation about the |
| | 18 | configuration script in the file CONFIGURE_DOC. |
| | 19 | |
| | 20 | |
| | 21 | !!!!**** IMPORTANT! ****!!!! |
| | 22 | ============================ |
| | 23 | |
| | 24 | Some versions of GCC are known to crash the T3 VM on some systems |
| | 25 | (depends on the system's CPU). If this happens to you and Tads 3 |
| | 26 | crashes when loading/compiling a TADS 3 game, then you should manually |
| | 27 | add the "-fno-strict-aliasing" switch to the CXXFLAGS variable and |
| | 28 | re-build. For example: |
| | 29 | |
| | 30 | ./configure CXXFLAGS="-O2 -pipe -fno-strict-aliasing" |
| | 31 | make clean |
| | 32 | make |
| | 33 | |
| | 34 | |
| | 35 | Requirements |
| | 36 | ============ |
| | 37 | |
| | 38 | Libraries |
| | 39 | ......... |
| | 40 | |
| | 41 | FrobTADS requires a curses compatible library along with its <curses.h> |
| | 42 | or <ncurses.h> header file (that means you have to install a curses |
| | 43 | development package, not only the runtime package). No third-party |
| | 44 | libraries other than curses are needed to build and run the |
| | 45 | interpreter. ncurses, plain old curses as well as PDCurses are |
| | 46 | supported. |
| | 47 | |
| | 48 | If no curses library is found, you can still build and use the |
| | 49 | compilers, since only the interpreter needs curses. |
| | 50 | |
| | 51 | |
| | 52 | Compiler |
| | 53 | ........ |
| | 54 | |
| | 55 | To compile the package you'll need a C and a C++ compiler. It shouldn't |
| | 56 | matter what kind of compilers are installed on the system, or how recent |
| | 57 | they are; older compilers should work just as well, as long as they can |
| | 58 | compile a reasonable subset of ANSI C (like function prototypes). |
| | 59 | *Really* old K&R-only compilers will probably not work. As for C++, the |
| | 60 | code does not use the template library, nor any other "modern" C++ |
| | 61 | features like templates and exception handling, and should therefore |
| | 62 | compile on pre-standard C++ compilers. |
| | 63 | |
| | 64 | Among the compilers known to work are GCC 2.x, GCC 3.x, GCC 4.x and |
| | 65 | Intel C/C++. |
| | 66 | |
| | 67 | |
| | 68 | The quickie |
| | 69 | =========== |
| | 70 | |
| | 71 | Compile and install: |
| | 72 | |
| | 73 | ./configure [options] |
| | 74 | make |
| | 75 | make install |
| | 76 | |
| | 77 | You are not required to build in the same directory where you unpacked |
| | 78 | the source package. For example, you can do something like this: |
| | 79 | |
| | 80 | mkdir ~/build |
| | 81 | cd ~/build |
| | 82 | ../downloads/frobtads-0.10/configure |
| | 83 | make |
| | 84 | make install |
| | 85 | |
| | 86 | Not all versions of Make support this though; check if your version of |
| | 87 | Make supports the VPATH feature (GNU Make does, by the way). |
| | 88 | |
| | 89 | Some 'configure' options (cAsE sENsiTiVe): |
| | 90 | |
| | 91 | --help Lists every supported option. |
| | 92 | --help=short Lists only FrobTADS specific options. |
| | 93 | --prefix=PATH Top-level installation directory. Default is |
| | 94 | "/usr/local". |
| | 95 | --bindir=PATH Exact installion point of the binaries. Default is |
| | 96 | "PREFIX/bin". |
| | 97 | --datadir=PATH Installation directory for the various data-files. |
| | 98 | Default is "PREFIX/share". Note that a subdirectory |
| | 99 | called "frobtads" will be created automaticly. |
| | 100 | --enable-t3debug Will build the debug version of the T3VM. This |
| | 101 | results in slower code, but is useful for people who |
| | 102 | want to make changes to the source code. This will |
| | 103 | also enable the TADS 3 test suite if you installed |
| | 104 | the TADS 3 compiler's source code. |
| | 105 | |
| | 106 | If you don't intent to hack around in the interpreter's source code, you |
| | 107 | can also specify this option: |
| | 108 | |
| | 109 | --disable-dependency-tracking |
| | 110 | |
| | 111 | This will result in a faster compile. But if you make changes to the |
| | 112 | source code, a "make" won't be able to always tell which source files |
| | 113 | changed. |
| | 114 | |
| | 115 | You may specify your own C and C++ compiler flags like so: |
| | 116 | |
| | 117 | ./configure CFLAGS="-O3 -pipe -march=pentium4" CXXFLAGS="-O3 -pipe -march=pentium4" |
| | 118 | |
| | 119 | If you used the "--enable-t3debug" configure option and the TADS 3 |
| | 120 | compiler source code is available, you can run the test suite with: |
| | 121 | |
| | 122 | make check |
| | 123 | |
| | 124 | You are *not* required to do a "make install" prior to running the test |
| | 125 | suite. |
| | 126 | |
| | 127 | Play Tads games: |
| | 128 | |
| | 129 | frob [sometadsgame] |
| | 130 | |
| | 131 | The file extension (.gam or .t3) is optional. |
| | 132 | |
| | 133 | |
| | 134 | |
| | 135 | Detailed instructions |
| | 136 | ===================== |
| | 137 | |
| | 138 | To install FrobTADS, you'll have to compile it first, and to compile it |
| | 139 | you'll have to configure it. The procedure is very easy and is |
| | 140 | described in detail below. |
| | 141 | |
| | 142 | |
| | 143 | Configuration |
| | 144 | ............. |
| | 145 | |
| | 146 | First, the package has to find out some information about your system. |
| | 147 | Then, a "makefile" has to be created, since the "make" utility is used |
| | 148 | for building FrobTADS. Both steps are accomplished by entering the |
| | 149 | following command: |
| | 150 | |
| | 151 | ./configure |
| | 152 | |
| | 153 | If you want to build the debug version of TADS 3: |
| | 154 | |
| | 155 | ./configure --enable-t3debug |
| | 156 | |
| | 157 | This will result in slower code (as it performs additional checks in |
| | 158 | this mode) and is not recommended for production builds. This will also |
| | 159 | enable the TADS 3 test suite (see below). |
| | 160 | |
| | 161 | You can specify where FrobTADS will be installed by passing arguments to |
| | 162 | 'configure'. For example, if you want the executable(s) to be installed |
| | 163 | in "/usr/bin" and the data-files in "/usr/share", you can call |
| | 164 | 'configure' like this: |
| | 165 | |
| | 166 | ./configure --prefix=/usr |
| | 167 | |
| | 168 | If you don't specify a prefix-directory, "/usr/local" will be used. |
| | 169 | |
| | 170 | You can fine-tune the installation points of the various files. For |
| | 171 | example, if you want the executable(s) to be installed in "/usr/bin", |
| | 172 | but the various data-files in "/opt", you can do: |
| | 173 | |
| | 174 | ./configure --bindir=/usr/bin --datadir=/opt |
| | 175 | |
| | 176 | Note that a subdirectory called "frobtads" will be created automaticly, |
| | 177 | so don't use "--datadir=/opt/frobtads"; just "--datadir=/opt". |
| | 178 | |
| | 179 | You can also pass compiler-flags to 'configure', and they will be passed |
| | 180 | on to the compiler. For example, to compile the C sources with |
| | 181 | "-O3 -ansi" and the C++ sources with "-O2 -ansi -fno-exceptions", call |
| | 182 | 'configure' like this: |
| | 183 | |
| | 184 | ./configure CFLAGS="-O3 -ansi" CXXFLAGS="-O2 -ansi -fno-exceptions" |
| | 185 | |
| | 186 | (Don't forget to quote the options if they contain spaces, like in the |
| | 187 | above example.) |
| | 188 | |
| | 189 | Even if the shell allows it, please don't use this: |
| | 190 | |
| | 191 | CFLAGS="-O3 -ansi" ./configure |
| | 192 | |
| | 193 | *Always* specify these variables *after* the "./configure" part. |
| | 194 | |
| | 195 | If you're using GCC, you should add -fno-exceptions to the C++ options, |
| | 196 | since FrobTADS doesn't make use of C++ exceptions. You'll save some RAM |
| | 197 | and get a smaller executable, which is a Good Thing on low-end systems. |
| | 198 | You may want to check out the GCC docs to see what optimization options |
| | 199 | are available; typing "info gcc" on the console should get you started. |
| | 200 | |
| | 201 | With GCC, if you want FrobTADS to be compiled with optimized code that |
| | 202 | is tailored to your system's CPU, use the "-march=CPU" option. Recent |
| | 203 | GCC versions allow you to use "-march=native", in which case the |
| | 204 | compiler will detect your CPU and optimize the code accordingly. For |
| | 205 | GCC versions that do not support "native", you have to specify your CPU |
| | 206 | by name. A few examples for the CPU value on PCs: |
| | 207 | |
| | 208 | i386, i486, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, |
| | 209 | pentium4, prescott, nocona (that's the 64bit P4; what, you have one?) |
| | 210 | athlon, athlon-4, athlon-xp, athlon64 |
| | 211 | |
| | 212 | For example: "-march=pentium4" of you have a Pentium4 or Celeron D. |
| | 213 | |
| | 214 | Note that older GCC versions don't support all of the above. For the |
| | 215 | full list of CPUs, type: |
| | 216 | |
| | 217 | info gcc invoking submodel |
| | 218 | |
| | 219 | To find out the GCC version you have, type |
| | 220 | |
| | 221 | gcc --version |
| | 222 | |
| | 223 | |
| | 224 | Compilation |
| | 225 | ........... |
| | 226 | |
| | 227 | Now that the makefile has been created, you can compile the package with |
| | 228 | the following command: |
| | 229 | |
| | 230 | make |
| | 231 | |
| | 232 | The compilation should finish without errors (although there might be |
| | 233 | warning messages; you can usually ignore them). If compilation aborts |
| | 234 | with an error-message, send a bug report to the maintainer (include the |
| | 235 | error-message, the name and version of your compiler, and details about |
| | 236 | your system). |
| | 237 | |
| | 238 | If you installed the source code of the TADS 3 compiler and built the |
| | 239 | debug version of TADS 3, you can run the test suite by typing: |
| | 240 | |
| | 241 | make check |
| | 242 | |
| | 243 | This will build the test programs and then run some test scripts. If |
| | 244 | not all of the tests succeed, there's something wrong. Contact the |
| | 245 | maintainer in this case. |
| | 246 | |
| | 247 | You don't need to install the package prior to running the test suite. |
| | 248 | |
| | 249 | Since running the test suite requires you to build the debug version of |
| | 250 | the T3VM, you should do a |
| | 251 | |
| | 252 | make clean |
| | 253 | |
| | 254 | to delete the debug version and then configure and compile the package |
| | 255 | again without the "--enable-t3debug" option. Installing and using the |
| | 256 | debug version for regular work is not recommended. |
| | 257 | |
| | 258 | If you want to do a sanity-check on the TADS 3 compiler, you can type: |
| | 259 | |
| | 260 | make sample |
| | 261 | |
| | 262 | This will compile the TADS 3 library sample game. It will be placed in |
| | 263 | the "samples" subdirectory of the build directory. You can run it with: |
| | 264 | |
| | 265 | ./frob ./samples/sample.t3 |
| | 266 | |
| | 267 | "make sample" does not require the debug-version of T3, so it's always a |
| | 268 | good idea to try it out before installing the package. |
| | 269 | |
| | 270 | |
| | 271 | Installation |
| | 272 | ............ |
| | 273 | |
| | 274 | To install the package, type: |
| | 275 | |
| | 276 | make install |
| | 277 | |
| | 278 | You'll probably have to login as root first, if you're installing in a |
| | 279 | directory where you don't have write-access. If you're installing |
| | 280 | everything in your own home-directory, you don't have to be root. On |
| | 281 | most systems, you can use the "sudo" command to execute the above as |
| | 282 | root: |
| | 283 | |
| | 284 | sudo make install |
| | 285 | |
| | 286 | You will be prompted to enter root's password (or your own if you're on |
| | 287 | Ubuntu). |
| | 288 | |
| | 289 | This will install FrobTADS on your system and you're ready to play all |
| | 290 | those Tads games. If you also downloaded the compiler package(s), they |
| | 291 | will be installed too, along with their data files and development |
| | 292 | libraries. |
| | 293 | |
| | 294 | If the above procedure doesn't work for you, contact the maintainer. |
| | 295 | See the README file for an email address. Or type: |
| | 296 | |
| | 297 | ./configure --help |
| | 298 | |
| | 299 | This will print the maintainer's email address as the last line. |
| | 300 | |
| | 301 | |
| | 302 | Usage |
| | 303 | ..... |
| | 304 | |
| | 305 | To play a Tads game, just pass the game's filename as an argument to |
| | 306 | 'frob', like this: |
| | 307 | |
| | 308 | frob /usr/local/games/tads/zebulon.gam |
| | 309 | |
| | 310 | The extension ".gam" (or ".t3" for Tads 3 games) is optional. Typing: |
| | 311 | |
| | 312 | frob --help |
| | 313 | |
| | 314 | will list the supported command-line options. |
| | 315 | |
| | 316 | If you also installed the compilers, look at their documentation on how |
| | 317 | to use them. For starters, take a look at the COMPILERS file. |
| | 318 | |
| | 319 | |
| | 320 | |
| | 321 | Operating systems |
| | 322 | ================= |
| | 323 | |
| | 324 | |
| | 325 | Mac OS X |
| | 326 | ........ |
| | 327 | |
| | 328 | OS X should work just like "regular" Unix. Nothing special is required |
| | 329 | to build the interpreter on OS X, and therefore the above instructions |
| | 330 | also apply for OS X. Don't forget to install the OS X curses/ncurses |
| | 331 | development package first. |
| | 332 | |
| | 333 | |
| | 334 | BeOS |
| | 335 | .... |
| | 336 | |
| | 337 | BeOS is supported and Like OS X, there should be no extra steps needed. |
| | 338 | Just make sure you have curses/ncurses installed. |
| | 339 | |
| | 340 | |
| | 341 | Microsoft Windows |
| | 342 | ................. |
| | 343 | |
| | 344 | Yes, you can compile FrobTADS even in Windows. If you're using |
| | 345 | MinGW/MSYS or cygwin, just configure and compile like in Unix. Of |
| | 346 | course, you must have a curses or ncurses library installed in a place |
| | 347 | where the compiler and linker can find it (PDCurses is known to work). |
| | 348 | |
| | 349 | Note that the TADS 3 test suite won't work in Windows, because of the |
| | 350 | difference in text line terminators. |
| | 351 | |
| | 352 | You can also cross-compile from Unix to Windows. If your |
| | 353 | cross-compiler is, for example "i586-pc-mingw32-gcc", configure with: |
| | 354 | |
| | 355 | ./configure --host=i586-pc-mingw32 |
| | 356 | |
| | 357 | and after "make" you should have your Windows *.exe files. This is in |
| | 358 | fact supported, tested and known to work. |
| | 359 | |
| | 360 | |
| | 361 | DOS |
| | 362 | ... |
| | 363 | |
| | 364 | MS-DOG and other brain damages (grin) aren't supported. A DOS |
| | 365 | interpreter for TADS games already exists, by the way. |
| | 366 | |
| | 367 | |
| | 368 | Other systems |
| | 369 | ............. |
| | 370 | |
| | 371 | No one tried yet to compile FrobTADS in systems like Amiga, Atari, OS2, |
| | 372 | etc. Or if someone did, we never heard of it. Any volunteers? |
| | 373 | |
| | 374 | Note that if you run Linux on those systems (there's a Linux for Amigas, |
| | 375 | I think), or some other Unix-like OS, then just follow the normal steps |
| | 376 | like for every other Unix system. It should build and run just fine. |
| | 377 | MorphOS on newer Amigas for example is known to work. (At least it did |
| | 378 | in the past.) |