Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Mirror of Simutrans SVN Repository
C++ C Other

This branch is 6 commits ahead, 4803 commits behind aburch:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bauer
besch
boden
dataobj
dings
documentation
gui
ifc
makeobj
music
player
simutrans
sound
sucher
tpl
utils
vehicle
.gitignore
Makefile
Simutrans.sln
Simutrans.vcproj
common.mk
config.template
convoihandle_t.h
distribute.sh
font.cc
font.h
freight_list_sorter.cc
freight_list_sorter.h
halthandle_t.h
linehandle_t.h
macros.h
old.ico
old_blockmanager.cc
old_blockmanager.h
pathes.h
readme.txt
scrolltext.h
simcity.cc
simcity.h
simcolor.h
simconst.h
simconvoi.cc
simconvoi.h
simdebug.cc
simdebug.h
simdepot.cc
simdepot.h
simdings.cc
simdings.h
simevent.cc
simevent.h
simfab.cc
simfab.h
simgraph.h
simgraph16.cc
simgraph8.cc
simhalt.cc
simhalt.h
simimg.h
simintr.cc
simintr.h
simio.cc
simio.h
simline.cc
simline.h
simlinemgmt.cc
simlinemgmt.h
simmain.cc
simmain.h
simmem.cc
simmem.h
simmenu.cc
simmenu.h
simmesg.cc
simmesg.h
simplan.cc
simplan.h
simres.rc
simskin.cc
simskin.h
simsound.cc
simsound.h
simsys.h
simsys_d.cc
simsys_s.cc
simsys_w16.cc
simsys_w32_png.c
simsys_w8.cc
simsys_x8.cc
simticker.cc
simticker.h
simtools.cc
simtools.h
simtypes.h
simutrans.ico
simversion.h
simview.cc
simview.h
simware.cc
simware.h
simwerkz.cc
simwerkz.h
simwin.cc
simwin.h
simworld.cc
simworld.h
stormoog.ico
text_pixel.c
todo.txt
unicode.cc
unicode.h

readme.txt

How to compile
--------------

Congratulations, you checked out the simutrans source. To compile it,
you have two options, either using Microsoft Visual C++ Express (which
is free in Version 7.0) or GCC.

To compile you will need the following libraries:
libz (http://www.zlib.net/)
libpng (http://www.libpng.org/pub/png/) for makeobj

For the recommended SDL-support you need
libSDL (http://www.libsdl.org/)
libSDL_mixer (link from the same page)

The link for allegro lib is:
http://www.talula.demon.co.uk/allegro/
or
http://alleg.sourceforge.net/index.de.html

To make life easier, you can follow the instructions to compile OpenTTD.
A system set up for OpenTTD will also compile simutrans without problems.

If you are on a MS Windows machine, download either MS VC Express or
MingW. The latter is easier to use as part of the DEV-C++ IDE, which
makes the installation of additional libraries like libz and libsdl and so
on very easy. However, to compile the command line is easier.

For all other systems, it is recommended you get the latest GCC and
matching zlib, and libpng and a game library. For unix system you may
have to use tools like apt-get or yast.

Check out the latest source from the SVN or check out a certain revision.
I recommend always to use the latest source, since it does not make any
sense to work with buggy code.


IMPORTANT:
----------

If you want to contribute, read the coding guidelines in
sim/documentation/coding_styles.txt


The following instructions are for GCC systems:
-----------------------------------------------

Go to Simutrans/sim.

Then copy the file sim/config.template to sim/config.default and edit the
file. You need to specify:
- frontend (gdi, allegro, sdl)
- color depth (usually 16)
- system (you should know it)

I recommend to uncomment #DEBUG=1 and #OPTIMISE = 1 (i.e. removing the #).

For allegro or libsdl you may need to define the path of the config file
(or at least on win98 and empty path).

Finally type make. If you want a smaller program and do not care about error
messages, you can comment out #DEBUG=1 and run strip sim resp. strip sim.exe
after compile and linking.

For users on window systems:
To debug, I recommend to run drmingw -i once in a shell. You will get a
caller history in case of an error. gdb does not really work well and is a
pain to use with the text interface.


The following instructions are for MS Visual C Express:
-------------------------------------------------------

For MS VC Express you have to hunt the matching zlib. Any version
which is compatible with VC will do. Take a look at the instructions for
compiling OpenTTD, which contains a libpng and a libz suited for
simutrans too:
http://wiki.openttd.org/index.php/MicrosoftVisualCExpress

You can compile without zlib, just make sure you disabled support for
compressed savegames in your simuconf.tab. But you will not able to
load compressed savegames then.

For debugging, you have to set the correct working directory, i.e. the
directory where the pak/ folders are located and use the -use_workdir
command line option.

Berlin, Mai 2007
Something went wrong with that request. Please try again.