User Tools

Site Tools


server:compiling_the_server:config_h

This is an old revision of the document!


Table of Contents

Config.h

The file config.h is to be found in the include directory of the server source.

It contains many variables, that can be manually adjusted.

Note: The file autoconf.h contains all the variable defines, that were found or passed to the ./configure script.

TMPDIR

When configuring the server with a –prefix=/path variable, the TMPDIR still uses the definitions of the config.h file.

This is a bit unfortunate, because it prevents to run the server on multiple instances,
since the temporary map names would all be shared in the fixed location at /tmp for Linux.

If it is planned to add a –prefix to configure, then before running make it is probably useful
to adjust the TMPDIR variable to match –prefix .

Example: ./configure –prefix=/usr/games/crossfire-1.70.0
should then make TMPDIR look as #define TMPDIR “/usr/games/crossfire-1.70.0/tmp”

After make && make install then this TMPDIR needs to be manually created with the proper permissions.

mkdir  /usr/games/crossfire-1.70.0/tmp

FIXME Proper permissions for TMPDIR

LOGFILE

As it is with the variable TMPDIR , the LOGFILE variable is fixed set in config.h .

Despite the fact, that LOCALDIR would use the –prefix parameter in {prefix}/var ,
the LOGFILE variable does not use {prefix} :-( .

On Linux the LOGFILE variable is by default set to #define LOGFILE “/var/log/crossfire/logfile” ;
Which then may need to create the /var/log/crossfire directory manually ( with proper permissions ) .

If it is planned to add a –prefix to configure, then before running make it is probably useful
to adjust the LOGFILE variable to match –prefix .

Example: ./configure –prefix=/usr/games/crossfire-1.70.0
should then make LOGFILE look as #define LOGFILE “/usr/games/crossfire-1.70.0/var/log/crossfire-server-1.70.0.log”

FIXME Proper permissions for LOGFILE

mapsize

The server has two pre-defined maximum mapsize values to send to the client : MAP_CLIENT_X and MAP_CLIENT_Y .
It is unfortunately not possible to set those in the etc/crossfire/settings file.

#define MAP_CLIENT_X    25
#define MAP_CLIENT_Y    25

Since the client supports a maximum of 31, it might be advised to set these two values to 31 also,
especially for local servers just consuming loop back (inerface lo) bandwidth.

server/compiling_the_server/config_h.1524138900.txt.gz · Last modified: 2018/04/19 06:55 by karl