| 1 |
=========================================================================== |
| 2 |
--------------------------------------------------------------------------- |
| 3 |
| READ THIS FILE ALL THE WAY THROUGH BEFORE ATTEMPTING TO INSTALL FROTZ | |
| 4 |
--------------------------------------------------------------------------- |
| 5 |
=========================================================================== |
| 6 |
|
| 7 |
Frotz was originally written specifically for MS/PC DOS. When it was |
| 8 |
ported to Unix, it was done mainly with Linux in mind. Since then, |
| 9 |
Frotz has been written with an aim to compile and run smoothly on as |
| 10 |
many platforms as possible. |
| 11 |
|
| 12 |
The source is rather generic C code and runs well on pretty much all |
| 13 |
current Unixen. These are the only three things needed to compile and |
| 14 |
run Frotz: |
| 15 |
* Some variant of Unix with an ANSI C compiler (gcc works fine) |
| 16 |
* GNU Make |
| 17 |
* A reasonably good SYSV derived curses library (ncurses is best) |
| 18 |
|
| 19 |
For Unicode support by way of UTF-8, libncursesw is required. Unicode |
| 20 |
support can be disabled in the Makefile by commenting out this line: |
| 21 |
USE_UTF8 ?= yes |
| 22 |
|
| 23 |
For sound support, a few more things are necessary: |
| 24 |
* libao (1.1.0 or higher) |
| 25 |
* libmodplug (0.8.8.4 or higher) |
| 26 |
* libsamplerate (0.1.8 or higher) |
| 27 |
* libsndfile (1.0.25 or higher) |
| 28 |
* libvorbis (1.3.2 or higher) |
| 29 |
Earlier versions of these libraries might work, but are untested. |
| 30 |
|
| 31 |
If you don't want to build Frotz with audio support, simply do "make |
| 32 |
nosound" or comment out the "SOUND" line from the Makefile. |
| 33 |
|
| 34 |
For NetBSD, you must install the libao-sun plugin for libao. |
| 35 |
|
| 36 |
Linux uses ncurses, so you're safe there. The version of curses that |
| 37 |
comes with NetBSD 1.6.x and later is good too. Earlier versions lacked |
| 38 |
certain features needed by Frotz. I don't know about the other *BSD |
| 39 |
curses. Of the current BSDs, only NetBSD still uses the old BSD curses |
| 40 |
library. All the others, including macOS, now use ncurses. |
| 41 |
|
| 42 |
A constant problem with macOS is the built-in ncurses. Even on the |
| 43 |
latest releases of macOS; ncurses is very old and seems to identify |
| 44 |
itself incorrectly. For this reason, it is highly recommended that |
| 45 |
ncurses from Homebrew be installed before compiling Frotz. See |
| 46 |
"Apple-specific installation issues" below. |
| 47 |
|
| 48 |
For older systems, especially ones not Linux or [Net|Free|Open]BSD... |
| 49 |
You can download ncurses from https://www.gnu.org/software/ncurses/ or |
| 50 |
ftp://ftp.gnu/org/gnu/ncurses/ and compile it yourself. If you must use |
| 51 |
the vendor-supplied curses library, see the platform-specific info |
| 52 |
below. If your system provides a means to install ncurses, that's |
| 53 |
usually the best approach. |
| 54 |
|
| 55 |
GCC 10 introduced a switch in what is acceptable for declaring global |
| 56 |
variables. A brief discussion of this is at |
| 57 |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678. Before GCC 10, the |
| 58 |
default was changed from -fcommon to -fno-common. CLANG also did this, |
| 59 |
though I'm not clear when the change was made. This means that commits |
| 60 |
done before version 2.51 will fail unless you add "CFLAGS+=-fcommom" to |
| 61 |
the make command line. For instance, "make CFLAGS+=-fcommon dumb". |
| 62 |
|
| 63 |
When building Frotz under any form of Unix, GNU Make is required. |
| 64 |
|
| 65 |
|
| 66 |
======================= |
| 67 |
Installing a package || |
| 68 |
======================= |
| 69 |
|
| 70 |
You have many choices available to you if you don't want to install |
| 71 |
Frotz by compiling it yourself. All of the commonly-encountered |
| 72 |
distributions of Linux include Frotz in their packaging systems. The |
| 73 |
BSDs do so including FreeBSD, NetBSD, and OpenBSD. |
| 74 |
|
| 75 |
For Macintosh, I recommend using Brew. With a single script, this |
| 76 |
packaging system can be installed into a macOS system whereupon it can |
| 77 |
be used to install Frotz. See https://brew.sh/ for more information. |
| 78 |
|
| 79 |
Frotz can also be installed as a container using Docker. See |
| 80 |
https://github.com/newtmitch/frotz-docker and |
| 81 |
https://hub.docker.com/r/newtmitch/frotz |
| 82 |
|
| 83 |
|
| 84 |
============= |
| 85 |
Dumb Frotz || |
| 86 |
============= |
| 87 |
|
| 88 |
Frotz can be compiled without curses, leaving you with a dumb-mode |
| 89 |
interface with no dependencies whatsoever besides a functioning C |
| 90 |
library. This interface is provided for having fun on extremely old |
| 91 |
computers and for those who find it useful for web-based front-ends, |
| 92 |
bots, and whatever else you can think up. Read the DUMB file for more |
| 93 |
information. |
| 94 |
|
| 95 |
Unless the machine on which you're trying to build Dumb Frotz is missing |
| 96 |
some vital functions, no editing of the Makefile should be necessary. |
| 97 |
See the "Missing functions" section below if there is trouble. |
| 98 |
|
| 99 |
|
| 100 |
============ |
| 101 |
SDL Frotz || |
| 102 |
============ |
| 103 |
|
| 104 |
SDL Frotz (aka sfrotz) started off as a port of Frotz 2.32. After |
| 105 |
languishing for several years, it is now incorporated into the Unix |
| 106 |
Frotz codebase as a one of the available interfaces. With SDL Frotz, |
| 107 |
full support for V6 games is provided. |
| 108 |
|
| 109 |
Prerequisite packages for sfrotz: |
| 110 |
Debian nomenclature: |
| 111 |
libsdl2-dev libsdl2-mixer-dev libfreetype6-dev libpng-dev libjpeg-dev zlib1g-dev |
| 112 |
macOS Homebrew nomenclature: |
| 113 |
pkg-config sdl2 sdl2_mixer freetype libpng jpeg zlib |
| 114 |
NetBSD nomenclature: |
| 115 |
SDL2 SDL2_mixer freetype png jpeg zlib |
| 116 |
OpenBSD nomenclature: |
| 117 |
sdl2 sdl2-mixer freetype png jpeg zlib |
| 118 |
FreeBSD nomenclature: |
| 119 |
sdl2 sdl2-mixer freetype2 png ??? ??? |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
* libsdl2-dev (2.0.9 or higher) |
| 124 |
* libsdl2-mixer-dev (2.0.4 or higher) |
| 125 |
* libfreetype6-dev (2.6.x or higher) |
| 126 |
* libpng-dev (1.6.x or higher) |
| 127 |
* libjpeg-dev (1.5.x or higher) |
| 128 |
* zlib1g-dev (1.2.x or higher) |
| 129 |
Earlier versions of these libraries might work, but are untested. |
| 130 |
|
| 131 |
|
| 132 |
============ |
| 133 |
X11 Frotz || |
| 134 |
============ |
| 135 |
|
| 136 |
X11 Frotz (aka xfrotz) was created by Daniel Schepler from around 1998 to |
| 137 |
2000 based in Frotz 2.32. Like SDL Frotz, it languished for several years. |
| 138 |
It does have rudimentary audio support for playback of Infocom's original |
| 139 |
.snd audio file format and no Blorb support. It also supports rune |
| 140 |
characters in Beyond Zork through .pcf fonts. This interface is not yet |
| 141 |
ready. On startup, the screen has a tendency to be black. Saves and |
| 142 |
restores also don't work -- doing so causes a segfault. |
| 143 |
|
| 144 |
Prerequisite packages for xfrotz |
| 145 |
Debian nomenclature): |
| 146 |
libx11-dev libxt-dev libpng-dev libjpeg-dev zlib1g-dev |
| 147 |
|
| 148 |
|
| 149 |
================ |
| 150 |
Prerequisites || |
| 151 |
================ |
| 152 |
|
| 153 |
Prerequisite packages for xfrotz: |
| 154 |
* libx11 (1.6.7 or higher) |
| 155 |
* libxt (1.1.5 or higher) |
| 156 |
|
| 157 |
Prerequisite packages for sfrotz (macOS Homebrew nomenclature): |
| 158 |
* pkg-config (0.29 or higher) |
| 159 |
* sdl2 (2.0.9 or higher) |
| 160 |
* sdl2_mixer (2.0.4 or higher) |
| 161 |
* freetype (2.6.x or higher) |
| 162 |
* libpng (1.6.x or higher) |
| 163 |
* jpeg (1.5.x or higher) |
| 164 |
* zlib (1.2.x or higher) |
| 165 |
|
| 166 |
Prerequisite packages for sfrotz (NetBSD nomenclature): |
| 167 |
* SDL2 (2.0.9 or higher) |
| 168 |
* SDL2_mixer (2.0.4 or higher) |
| 169 |
* freetype (2.6.x or higher) |
| 170 |
* png (1.6.x or higher) |
| 171 |
* jpeg (1.5.x or higher) |
| 172 |
* zlib (1.2.x or higher) |
| 173 |
|
| 174 |
Prerequisite packages for sfrotz (OpenBSD nomenclature): |
| 175 |
* sdl2 (2.0.9 or higher) |
| 176 |
* sdl2-mixer (2.0.4 or higher) |
| 177 |
* freetype (2.6.x or higher) |
| 178 |
* png (1.6.x or higher) |
| 179 |
* jpeg (1.5.x or higher) |
| 180 |
* zlib (1.2.x or higher) |
| 181 |
|
| 182 |
Earlier versions of these libraries might work, but are untested. |
| 183 |
|
| 184 |
|
| 185 |
======================= |
| 186 |
Editing the Makefile || |
| 187 |
======================= |
| 188 |
|
| 189 |
You should take a look at the Makefile. Read the comments. It's pretty |
| 190 |
self-explanatory. This is where you define your compiler, where Frotz |
| 191 |
will be installed, what libraries you're using, if you want sound |
| 192 |
support, and so on. |
| 193 |
|
| 194 |
If this is too much for you, try using your operating systems's |
| 195 |
packaging scheme (or Homebrew https://brew.sh/ for macOS) to install |
| 196 |
Frotz for you. If the latest version of Frotz isn't there, ask the |
| 197 |
package maintainer to update it. |
| 198 |
|
| 199 |
|
| 200 |
================================= |
| 201 |
Compiling and installing Frotz || |
| 202 |
================================= |
| 203 |
|
| 204 |
After checking over and editing the Makefile, type "make" and Frotz will |
| 205 |
be compiled. If this doesn't work, chances are you have an older flavor |
| 206 |
of Unix. Check the second section of the Makefile. That's where you'll |
| 207 |
find options for older flavors of Unix. Are you using plain old curses |
| 208 |
or ncurses. On modern systems, the regular curses library is actually |
| 209 |
ncurses except for NetBSD. For older systems, this isn't always true. |
| 210 |
Figure out where the necessary header files and libraries live and edit |
| 211 |
the Makefile accordingly. |
| 212 |
|
| 213 |
Once the compile is complete, make sure you have the correct permissions |
| 214 |
to write where you want Frotz installed, then type "make install". To |
| 215 |
uninstall Frotz, type "make uninstall". |
| 216 |
|
| 217 |
If you don't have permission to install Frotz, you can just put the |
| 218 |
resulting executable somewhere like $HOME/bin and add that directory to |
| 219 |
your $PATH. |
| 220 |
|
| 221 |
For compiling, installing, and uninstalling Frotz using the dumb or SDL |
| 222 |
interfaces, type "make dumb" or "make sdl". You will get an executable |
| 223 |
file named "dfrotz" for Dumb Frotz and "sfrotz" for SDL Frotz. To |
| 224 |
install these, type "make install_dumb" or "make install_sdl". To |
| 225 |
uninstall these, type "make uninstall_dumb" or "make uninstall_sdl". |
| 226 |
Substituting "dfrotz" for "dumb" and "sfrotz" for "sdl" will also work. |
| 227 |
|
| 228 |
For compiling, installing, and uninstalling dumb frotz, use "make dumb", |
| 229 |
"make install_dumb", and "make uninstall_dumb". The process is exactly |
| 230 |
the same as above except you won't be depending on any external |
| 231 |
libraries; not even curses. |
| 232 |
|
| 233 |
To build dfrotz, frotz, and sfrotz; you can type "make all" and then |
| 234 |
"make install_all" to install them all. |
| 235 |
|
| 236 |
|
| 237 |
===================================== |
| 238 |
Apple-specific installation issues || |
| 239 |
===================================== |
| 240 |
|
| 241 |
To start with, you need to make sure development tools are installed. |
| 242 |
Apple provides the "Xcode" package from the Mac App Store. |
| 243 |
|
| 244 |
As of 2022, the version of ncurses that Apple puts in macOS predates |
| 245 |
6.0, which was released in 2015. Among other things, this version lacks |
| 246 |
support for italic text. If you want Frotz to be able to produce italic |
| 247 |
text, you should install the latest version of ncurses, preferably |
| 248 |
through Homebrew (https://brew.sh/). |
| 249 |
|
| 250 |
Start with installing its support scripts by typing this command in a |
| 251 |
terminal window: |
| 252 |
|
| 253 |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| 254 |
|
| 255 |
This will download and install Homebrew's support software. |
| 256 |
|
| 257 |
Then install ncurses like this: |
| 258 |
|
| 259 |
brew install ncurses |
| 260 |
|
| 261 |
Now Frotz should compile just fine with this command: |
| 262 |
|
| 263 |
make nosound |
| 264 |
|
| 265 |
This tells the build process to not bother with sound support. |
| 266 |
|
| 267 |
For sound support, some additional libraries are needed: libao, |
| 268 |
libmodplug, libsamplerate, libsndfile, and libvorbis. Install these |
| 269 |
like this: |
| 270 |
|
| 271 |
brew install libao libmodplug libsamplerate libsndfile libvorbis |
| 272 |
|
| 273 |
Now Frotz should compile just fine with this command: |
| 274 |
|
| 275 |
make |
| 276 |
|
| 277 |
If you want graphics support through SDL, you'll need some more |
| 278 |
libraries, which may or may not already be present on your Mac. To |
| 279 |
install them from Homebrew, do this: |
| 280 |
|
| 281 |
brew install sdl2 sdl2-mixer freetype libpng jpeg zlib |
| 282 |
|
| 283 |
Now Frotz you should get SDL Frotz using the command: |
| 284 |
|
| 285 |
make sdl |
| 286 |
|
| 287 |
If you insist on using Apple's own install of ncurses, you can |
| 288 |
pass CURSES_CONFIG and ITALIC arguments like this. |
| 289 |
|
| 290 |
make CURSES_CONFIG=ncurses5.4-config ITALIC= nosound |
| 291 |
|
| 292 |
This is because the built-in ncurses doesn't support italic |
| 293 |
text, even though its reported version suggests it does. |
| 294 |
|
| 295 |
|
| 296 |
======================================== |
| 297 |
Installing and playing games on Frotz || |
| 298 |
======================================== |
| 299 |
|
| 300 |
If you've unfamiliar with Infocom-style text adventures, you should |
| 301 |
probably stop here and read the file HOW_TO_PLAY. Then come back and |
| 302 |
continue. |
| 303 |
|
| 304 |
Now that you have Frotz installed, you'll probably want to play some of |
| 305 |
those ultra-nifty text adventures on it. These games come in files |
| 306 |
which are compiled programs that run on the Z-machine, which |
| 307 |
interpreters like Frotz emulate. The best-stocked archive of freeware |
| 308 |
games for use on Z-machine interpreters is the Interactive Fiction |
| 309 |
Archive at http://www.ifarchive.org. There are several mirrors of the |
| 310 |
archive all over the world listed there. |
| 311 |
|
| 312 |
Here are direct URLs to the zcode directories: |
| 313 |
|
| 314 |
http://ifarchive.org/indexes/if-archive/games/zcode/ |
| 315 |
ftp://ftp.ifarchive.org/if-archive/games/zcode |
| 316 |
|
| 317 |
|
| 318 |
Here is the scheme I use for organizing my Zcode games: |
| 319 |
|
| 320 |
/usr/local/share/zcode This contains games written after the |
| 321 |
demise of Infocom. Most are freeware. |
| 322 |
|
| 323 |
/home/dave/.zcode I sometimes put games here too. |
| 324 |
|
| 325 |
/usr/local/share/zcode/infocom This is where I keep my collection of |
| 326 |
genuine Infocom games. |
| 327 |
|
| 328 |
/usr/local/share/zcode/infocom/sound Soundfiles from "Lurking Horror" |
| 329 |
and "Sherlock" go here. |
| 330 |
|
| 331 |
/usr/local/share/zcode/infocom/graphics Graphics files from Zork 0, |
| 332 |
Arthur, Shogun, and Journey go here. |
| 333 |
|
| 334 |
I add this command to my .profile file: |
| 335 |
export ZCODE_PATH="/usr/local/share/zcode: \ |
| 336 |
/usr/local/share/zcode/infocom:$HOME/.zcode |
| 337 |
|
| 338 |
Now, when I want to play Zork I, I will type "frotz zork1.dat" at the |
| 339 |
command prompt. Then I will then be told I am standing in an open field |
| 340 |
west of a white house which has a boarded front door. |
| 341 |
|
| 342 |
You can also just give a path to the game file. |
| 343 |
|
| 344 |
When you save your game, all save files are put in the current directory |
| 345 |
unless you specify a full path. Please name your saves intelligently. |
| 346 |
|
| 347 |
If a game uses sound or graphics, they will be packaged into a Blorb |
| 348 |
file. This file may or may not also contain a zcode game file. Blorb |
| 349 |
files containing the game file are supposed to follow the name pattern |
| 350 |
of "game.zblorb" or "game.zbl". For a Blorb file that does not contain |
| 351 |
a game file at all, the usual pattern is "game.blorb" or "game.blb". If |
| 352 |
you tell Frotz to load a .zblorb file, it will look for and load a zcode |
| 353 |
file within and then load whatever other resources it needs from that |
| 354 |
Blorb file. If the Blorb file is separate from the zcode file, then |
| 355 |
Frotz takes a few extra steps to load. Suppose we have "game.z5". Frotz |
| 356 |
will look in the same directory as the zcode file for "game.blb" or |
| 357 |
"game.blorb". If such a file is found, great. If not, Frotz will |
| 358 |
continue on without. For graphical games, not loading graphics can |
| 359 |
cause the game to be unplayable. |
| 360 |
|
| 361 |
You'll probably want to make use of Frotz's new config file functionality. |
| 362 |
The options in the config file mirror the command line options and free |
| 363 |
you from having to remember to add something like "-Z0" to get rid of |
| 364 |
complaints about buggy zcode or if you want to always play with white text |
| 365 |
on black at a Linux console (instead of white on blue). Sample config |
| 366 |
files are included here as "frotz.conf-big" (which lists all possible |
| 367 |
options) and "frotz.conf-small" (a shortened one listing the more |
| 368 |
commonly-used options). The Makefile defines where Frotz will look for |
| 369 |
the frotz.conf file. By default, this is /usr/local/etc and can be |
| 370 |
changed at compile time if you like. This file will be read if Frotz |
| 371 |
notices you don't have a config file of your own in "$HOME/.frotzrc". |
| 372 |
|
| 373 |
|
| 374 |
==================== |
| 375 |
Missing functions || |
| 376 |
==================== |
| 377 |
|
| 378 |
Frotz makes use of some functions that might not be available on some |
| 379 |
very old systems. Frotz has its own versions of these function if |
| 380 |
that's the case. Currently these are as follows: |
| 381 |
strrchr() |
| 382 |
memmove() |
| 383 |
strdup() |
| 384 |
strndup() |
| 385 |
basename() |
| 386 |
Read the Makefile starting at the "Potentially Missing Functions" |
| 387 |
section and edit according to the directions. |
| 388 |
|
| 389 |
|
| 390 |
=========================== |
| 391 |
Platform-specific issues || |
| 392 |
=========================== |
| 393 |
|
| 394 |
Unicode character support: |
| 395 |
Currently, only libncursesw is known to fully provide Unicode support by |
| 396 |
way of UTF-8 character encoding. At the moment, it's not clear if BSD |
| 397 |
curses does the job all the way. |
| 398 |
|
| 399 |
Linux: No apparent problems. |
| 400 |
|
| 401 |
[Net|Open|Free]BSD: If you have NetBSD 1.6.x or later, you can use the |
| 402 |
supplied BSD curses. Otherwise you must have ncurses. |
| 403 |
|
| 404 |
Digital UNIX: No apparent problems. Sound is probably not available. |
| 405 |
|
| 406 |
Tru64 Unix: Rebadged Digital Unix. Sound is probably not available. |
| 407 |
|
| 408 |
Irix: The vendor-supplied curses library is broken as well as all |
| 409 |
versions of ncurses supplied on SGI's freeware CDs and in SGI's freeware |
| 410 |
archive. You MUST compile and install at least ncurses 5.0 from source. |
| 411 |
Versions of ncurses older than 5.0 are also broken on Irix. |
| 412 |
|
| 413 |
macOS 10 and later: Install the "Xcode" package from the Mac App Store. |
| 414 |
The supplied version of ncurses predates 6.0, so italics will not be |
| 415 |
supported. See "Apple-specific installation issues" above. |
| 416 |
|
| 417 |
Solaris: Some versions of curses on Solaris have trouble with color |
| 418 |
support. At least the one in Solaris 2.6 works okay. If compiled with |
| 419 |
the -02 option on an UltraSPARC using gcc 2.8.1, you may get lots of weird |
| 420 |
segfaults. The problem seems UltraSPARC related and it's not clear if this |
| 421 |
problem crosses flavor boundaries (ie, if UltraLinux or NetBSD on |
| 422 |
UltraSparc have this problem too). Because version 2.8.x of gcc had lots |
| 423 |
of strange problems, gcc might be to blame. I don't have sufficient |
| 424 |
access to test this theory, so if you're able to enlighten me on this, |
| 425 |
please do so. |
| 426 |
|
| 427 |
SunOS: Uncomment the "MEMMOVE_DEF..." line in the Makefile before |
| 428 |
compiling. Since I don't have access to a SunOS machine, Frotz on SunOS |
| 429 |
is untested. |
| 430 |
|
| 431 |
Other flavors of Unix: Getting Unix Frotz to compile and run seems to |
| 432 |
focus mostly on making sure make(1) can find the proper curses library. |
| 433 |
It's probably a good idea to install ncurses anyway. |
| 434 |
|
| 435 |
Now go on and have fun! |