Installing STonX
Contents of this document:
Required Software
In order to compile STonX, you need the following software:
- GNU-C version 2.4.5 or higher (2.6.3 is recommended, I haven't tried 2.7.0)
- A BSD-compatible "make", GNU-Make seems to work best (required f.ex. on Irix)
- X libraries (static, if possible), X11R5 or higher
- A TOS image file (tos.img) of version 2.06
Configuring STonX
Running configure
STonX comes with a configure script, which is generated from the
file configure.in using the Autoconf package.
For most systems,
./configure
will suffice to configure STonX. This will create a Makefile from
Makefile.in and create a link named config.h to one of
the header files in the config/ subdirectory.
For some systems, there are specific header files in the config/
directory, for others, generic.h will be chosen, which should
work on all systems. If a specific header file was chosen for your system,
but it doesn't work, you can always try to use the generic configuration file
by making a link manually.
More options
The file options.h contains a few constants which can be changed
in order to customize STonX for your needs. At the moment, only 3 of them
are important for non-developers:
- SMALL
- If this is set to 1, STonX will use less memory and emulate an ST with only
4MB RAM. This is not only useful for systems with less memory than 16-24MB, but
necessary for some linkers which cannot handle 16MB BSS-Segments (like some
versions of the GNU Linker for Linux).
- XBUFFER
- This is a switch for the manual buffering of the X function calls. If this
is set to 0 (default = 1), the VDI window will not be restored during expose
events, e.g. when you move an overlapping window. This should only be changed
if the buffering doesn't work properly (I've only added this a few days ago).
- BLITTER
- Switch the blitter emulation on and off. This shouldn't need to be changed,
since the blitter code seems very stable.
Compiling STonX
To compile STonX, simply type "make" after configuring. This will first compile
the stonx binary, then it will try to extract the system fonts from
the tos.img file (which you must copy to the STonX directory) and
create fonts in .pcf format usable for the X server. This is done
by the makefonts.sh script in the data/ subdirectory. This
script will also try to install the fonts in-place, which might fail if you
use an X-Terminal. (See The VDI driver for X for more information).
When the compilation is finished, you can run STonX from the build directory.
Problems
This section contains suggestions for some problems that might occur (or are
known to occur and not yet fixed) during the installation of STonX.
- "make" complains about "if syntax"
- Solution: use GNU Make.
- Linking fails with an obscure error message
- Solution: try setting SMALL to 1 in options.h. Do not
use the GNU Linker (if possible).
- I get a strange error message just after the fonts were generated
- You can't install fonts in-place. Read the section on the VDI driver to find out how to fix this.
- When I use the VDI driver, the background is black and the foreground is
white or red
- This is a known problem, and it's because of my bad X programming. If you
can fix it, you're welcome to do it and I'd really appreciate it!
- Irix 5.X stops during compilation with some obscure error message
- Try using -O2 instead of -O3 (Makefile variable OPT), apparently gcc passes this option
on to the assembler, which gets confused.
Marinos "nino" Yannikos, nino@mips.complang.tuwien.ac.at