2011-06-14 02:55:20 -04:00
|
|
|
**************************************************************************
|
|
|
|
* *
|
|
|
|
* Star Traders: A Game of Interstellar Trading *
|
2017-05-13 16:29:44 -04:00
|
|
|
* Copyright (C) 1990-2017, John Zaitseff *
|
2011-06-14 02:55:20 -04:00
|
|
|
* *
|
|
|
|
**************************************************************************
|
|
|
|
|
2011-07-25 02:31:35 -04:00
|
|
|
Star Traders is written in the C99 programming language and uses Autoconf
|
|
|
|
and Automake to handle compilation and installation. Assuming you have
|
|
|
|
the needed tools, all you should need to do is run the following commands
|
|
|
|
from the source directory:
|
|
|
|
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
The first two commands may be run as an ordinary user; the last may need
|
|
|
|
to be done as the system administrator (root).
|
|
|
|
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
=============
|
|
|
|
|
|
|
|
Star Traders requires the following components for successful compilation
|
|
|
|
and installation:
|
|
|
|
|
|
|
|
1. A working C compiler conforming to ISO/IEC 9899:1999 (also known as
|
|
|
|
C99). Any recent version of the GNU Compiler Collection (GCC) is more
|
|
|
|
than adequate.
|
|
|
|
|
|
|
|
2. An operating system ideally conforming to ISO/IEC 9945-1:2001 (POSIX)
|
|
|
|
or to the X/Open Single Unix Specification v3 or later. In short, any
|
|
|
|
modern Unix or Unix-like system like Linux almost certainly qualifies.
|
|
|
|
In actual fact, Star Traders uses the GNU Portability Library, so many
|
|
|
|
older systems may also work without modification.
|
|
|
|
|
2011-08-17 05:48:39 -04:00
|
|
|
3. A working X/Open Curses-compatible library, such as Ncurses. Ncurses
|
2011-08-28 00:40:39 -04:00
|
|
|
is preferred over system-native libraries, if present. Locales with
|
|
|
|
multibyte character sequences (such as UTF-8) require a wide-character
|
|
|
|
version of Curses, such as NcursesW, to work correctly.
|
2011-07-25 02:31:35 -04:00
|
|
|
|
2017-05-17 20:02:51 -04:00
|
|
|
4. The GNU Gettext library, version 0.19.8 or later, to allow the game to
|
2011-08-17 05:48:39 -04:00
|
|
|
use languages other than English; this is also called Native Language
|
|
|
|
Support. If you do not have this library (and do not wish to install
|
|
|
|
it), you may pass "--disable-nls" to the configure script.
|
|
|
|
|
|
|
|
5. Development libraries and header files for all of the above. On many
|
2014-06-18 23:52:46 -04:00
|
|
|
systems, these files are part of XXX-dev or XXX-devel packages.
|
2011-07-25 02:31:35 -04:00
|
|
|
|
2011-08-17 05:48:39 -04:00
|
|
|
6. The GNU Perfect Hash Function Generator, gperf. This utility program
|
2012-09-20 06:24:31 -04:00
|
|
|
may be required for parts of the GNU Portability Library.
|
2011-08-07 22:33:25 -04:00
|
|
|
|
2011-07-25 02:31:35 -04:00
|
|
|
|
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
The installation of Star Traders can be broken down into three main steps:
|
|
|
|
configuration, compilation and the installation proper.
|
|
|
|
|
|
|
|
The first step is configuring the package for your compiler and operating
|
|
|
|
system environment. As Star Traders uses Autoconf and Automake, all you
|
|
|
|
need to do in most cases is run "./configure" from the top-level directory
|
|
|
|
of the Star Traders source tree. The configure script understands all of
|
|
|
|
the usual Autoconf options; these are explained in detail in the Autoconf
|
|
|
|
manual:
|
|
|
|
|
|
|
|
http://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts
|
|
|
|
|
|
|
|
This version of the configure script understands the following additional
|
|
|
|
command line options:
|
|
|
|
|
2011-08-07 22:33:25 -04:00
|
|
|
--disable-nls Do not use Native Language Support
|
2011-07-25 02:31:35 -04:00
|
|
|
--disable-assert Turn off all debugging assert() statements
|
2011-08-17 05:48:39 -04:00
|
|
|
--with-ncurses Force the use of Ncurses over the system's Curses
|
2011-07-25 02:31:35 -04:00
|
|
|
library
|
2011-08-17 05:48:39 -04:00
|
|
|
--with-ncursesw Force the use of the NcursesW library with wide-
|
2011-07-28 07:19:33 -04:00
|
|
|
character support
|
2011-08-17 05:48:39 -04:00
|
|
|
--without-ncursesw Don't use the NcursesW library with wide-character
|
2011-07-25 02:31:35 -04:00
|
|
|
support
|
2011-08-17 05:48:39 -04:00
|
|
|
--without-ncurses Don't use the Ncurses library: use the system's
|
2011-07-28 07:19:33 -04:00
|
|
|
normal Curses library
|
2011-07-25 02:31:35 -04:00
|
|
|
|
|
|
|
By default, configure uses "/usr/local" as the top-level (prefix) install
|
|
|
|
directory. You can change this by specifying "--prefix=DIR" to use DIR
|
|
|
|
instead. For example, you can use a directory in your own home directory
|
|
|
|
by specifying something like:
|
|
|
|
|
|
|
|
./configure --prefix=$HOME/opt/trader
|
|
|
|
|
|
|
|
You may also specify certain configuration and/or compilation variables on
|
|
|
|
the command line to override choices made by configure. For example, you
|
|
|
|
can specify the compiler flags to use by passing the CFLAGS variable:
|
|
|
|
|
|
|
|
./configure CFLAGS="-g -O2 -Wall"
|
|
|
|
|
2017-05-17 20:02:51 -04:00
|
|
|
The configure script has many other options. You may obtain a list of
|
2011-07-25 02:31:35 -04:00
|
|
|
these by running:
|
|
|
|
|
|
|
|
./configure --help
|
|
|
|
|
|
|
|
You can also run configure in a separate build-only directory tree. This
|
|
|
|
feature requires GNU Make and allows you to keep the source code tree from
|
|
|
|
being modified by the compilation process. To use this option, create a
|
|
|
|
separate build directory, then run configure. For example, if you placed
|
2017-08-07 04:33:29 -04:00
|
|
|
the Star Traders source code tree in $HOME/src/trader-7.12, you could run
|
2011-07-25 02:31:35 -04:00
|
|
|
something like:
|
|
|
|
|
2017-08-07 04:33:29 -04:00
|
|
|
mkdir $HOME/build/trader-build-7.12
|
|
|
|
cd $HOME/build/trader-build-7.12
|
|
|
|
$HOME/src/trader-7.12/configure
|
2011-07-25 02:31:35 -04:00
|
|
|
|
|
|
|
Once again, the Autoconf manual describes these options (and many others):
|
|
|
|
|
|
|
|
http://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts
|
|
|
|
|
|
|
|
Once the package has been configured, you can type "make" to compile it,
|
|
|
|
then "make install" to install it. You can specify the following command
|
|
|
|
lines, amongst others:
|
|
|
|
|
|
|
|
make all
|
|
|
|
make install
|
|
|
|
make clean
|
|
|
|
make distclean
|
|
|
|
make uninstall
|
|
|
|
|
|
|
|
The command "make all" does the same thing as running "make" by itself:
|
|
|
|
compile the package source code into an executable.
|
|
|
|
|
|
|
|
Running "make install" copies the executable program and all associated
|
|
|
|
data and documentation files to those directories specified during
|
|
|
|
configuration. If any of these directories require system administrator
|
|
|
|
access privileges for writing, you will need to run "make install" as
|
|
|
|
system administrator (root).
|
|
|
|
|
|
|
|
If you like, you can specify the DESTDIR variable to copy all installation
|
|
|
|
files to a temporary location before installing them later. For example,
|
|
|
|
if the prefix directory is "/usr/local", typing:
|
|
|
|
|
|
|
|
make install DESTDIR=/tmp/trader-install
|
|
|
|
|
|
|
|
will copy the final program "trader" to /tmp/trader-install/usr/local/bin,
|
|
|
|
the manual page to /tmp/trader-install/usr/local/share/man/man6 and so on.
|
|
|
|
|
|
|
|
The "make clean" command will remove most build-generated files, such as
|
|
|
|
object files generated by the compiler, from the source code or build
|
|
|
|
directory. Running "make distclean" will do the same, but will remove the
|
|
|
|
Makefiles generated by configure as well. In other words, if you run
|
|
|
|
"make distclean", you will need to rerun "configure" if you would like to
|
|
|
|
recompile Star Traders at a later date.
|
|
|
|
|
|
|
|
Finally, "make uninstall" will remove the executable program "trader" and
|
|
|
|
associated data and documentation files from their final installation
|
|
|
|
location. This assumes, of course, that you have NOT run "make distclean"
|
|
|
|
to remove the Makefiles that know the path to which those files were
|
|
|
|
installed!
|
|
|
|
|
|
|
|
|
2016-12-12 05:31:30 -05:00
|
|
|
Git Repository
|
|
|
|
==============
|
2011-07-25 02:31:35 -04:00
|
|
|
|
2016-12-12 05:31:30 -05:00
|
|
|
You can always download the latest version of Star Traders directly from
|
|
|
|
the Git repository on the ZAP Group server:
|
2011-07-25 02:31:35 -04:00
|
|
|
|
2016-12-12 05:31:30 -05:00
|
|
|
git clone git://git.zap.org.au/data/git/trader.git
|
2011-07-25 02:31:35 -04:00
|
|
|
|
|
|
|
Released versions of Star Traders include all scripts and files needed for
|
2016-12-12 05:31:30 -05:00
|
|
|
installation. If you are cloning the source code from the Git repository,
|
|
|
|
however, you will need to update these files yourself. You will need the
|
|
|
|
following additional tools installed on your system to do so:
|
2011-07-25 02:31:35 -04:00
|
|
|
|
2017-05-17 20:02:51 -04:00
|
|
|
1. Autoconf v2.69 or later (http://www.gnu.org/software/autoconf/)
|
|
|
|
2. Automake v1.15 or later (http://www.gnu.org/software/automake/)
|
2011-07-25 02:31:35 -04:00
|
|
|
3. GNU Portability Library (http://www.gnu.org/software/gnulib/)
|
|
|
|
|
|
|
|
The GNU Portability Library may be installed by retrieving the latest
|
|
|
|
Gnulib source code from the Git repository:
|
|
|
|
|
|
|
|
git clone git://git.savannah.gnu.org/gnulib.git
|
|
|
|
|
|
|
|
Once you have these tools, change to the Star Traders source code tree and
|
|
|
|
type:
|
|
|
|
|
|
|
|
PATH=${PATH}:/path/to/gnulib-tool ./build-aux/bootstrap
|
|
|
|
|
|
|
|
where "/path/to/gnulib-tool" is, of course, the directory containing the
|
|
|
|
Gnulib "gnulib-tool" script. You should be ready to run "./configure &&
|
|
|
|
make && make install" now.
|
2014-10-02 19:51:31 -04:00
|
|
|
|
|
|
|
|
|
|
|
For Translators
|
|
|
|
===============
|
|
|
|
|
|
|
|
Thank you for even considering to translate Star Traders into your native
|
|
|
|
language! You may use either a released version of Star Traders, or an
|
2016-12-12 05:31:30 -05:00
|
|
|
unreleased one, as discussed in the Git Repository section above. In
|
|
|
|
either case, you may find the following workflow useful.
|
2014-10-02 19:51:31 -04:00
|
|
|
|
|
|
|
First, run "./build-aux/bootstrap" if needed (only for unreleased versions
|
|
|
|
of Star Traders).
|
|
|
|
|
|
|
|
Next, configure and install Star Traders into your home directory:
|
|
|
|
|
|
|
|
./configure --prefix=$HOME/opt/trader
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
If you are adding a new translation, add its GNU Gettext language code to
|
|
|
|
the file po/LINGUAS, then create the template file for that language ("zz"
|
|
|
|
is used here):
|
|
|
|
|
|
|
|
(cd po; msginit --locale=zz --width=132)
|
|
|
|
|
|
|
|
Now, modify the PO file for your language using your favourite editor or
|
|
|
|
translation tool. Please note that the generated PO file has extensive
|
|
|
|
documentation in its translator comments. If anything is unclear, please
|
|
|
|
feel free to ask the author and maintainer; contact details are available
|
|
|
|
in the README file.
|
|
|
|
|
|
|
|
To test your PO file, compile and run Star Traders (replace "zz" with your
|
|
|
|
language code, of course):
|
|
|
|
|
|
|
|
make && make -C po zz.gmo && make install
|
|
|
|
LANGUAGE=zz $HOME/opt/trader/bin/trader
|
|
|
|
|
|
|
|
The "make -C po zz.gmo" forces the rebuilding of the GMO output file; the
|
|
|
|
"LANGUAGE=zz" parameter sets the language of the messages to use.
|
|
|
|
|
|
|
|
This process of editing and testing the PO file can be done iteratively,
|
|
|
|
of course: make a change, recompile, run the program to see the changes,
|
|
|
|
repeat as needed.
|
|
|
|
|
|
|
|
Once you have finished your translation, please submit the PO file to the
|
|
|
|
Translation Project. The relevant web page for Star Traders is:
|
|
|
|
|
|
|
|
http://translationproject.org/domain/trader.html
|
|
|
|
|
|
|
|
More information for translators is available at:
|
|
|
|
|
|
|
|
http://translationproject.org/html/translators.html
|
|
|
|
|
|
|
|
To clean up your install directory, simply run:
|
|
|
|
|
|
|
|
rm -fr $HOME/opt/trader
|
|
|
|
|
|
|
|
By the way, as mentioned in the translator comments, formatting the help
|
|
|
|
text is probably the most complicated and tedious part of translating Star
|
|
|
|
Traders. The author and maintainer of this game is more than happy to
|
|
|
|
help you with this task: if you are able to provide a translation, even if
|
|
|
|
it is not formatted correctly, the maintainer will perform the necessary
|
|
|
|
adjustments for word-wrapping and justification.
|