Skip to content
Mirror of Simutrans SVN Repository
Branch: master
Clone or download
Dwachs FIX prevent posix-backend with COLOUR_DEPTH != 0
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@8745 8aca7d54-2c30-db11-9de9-000461428c89
Latest commit f262506 Mar 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
OSX
bauer FIX is_factory_at requires valid coordinates Mar 22, 2019
boden
dataobj
descriptor ADD: constrait[prev][0]=any require a vehile in front (and same for [… Mar 21, 2019
display CODE remove unused member function Mar 22, 2019
documentation translate komponente to component Aug 16, 2014
finder CODE add suggested overrides, remove redundant virtual (ceeac) Feb 22, 2019
gui
ifc
makeobj FIX makeobj Makefile Jun 3, 2018
music sound files for new mac sound support May 22, 2017
nettools Fix Makefiles May 27, 2018
network squelch warnings Mar 22, 2019
nsis Updated pakset for sh and nsis installer Mar 11, 2019
obj
player
script sqapi: ADD add_message_at for AI scripts Feb 2, 2019
simutrans CHG: The acceleration tool now also alters the acceleration in fast f… Mar 21, 2019
sound Hopefully SDL2 sound works on more machines Sep 19, 2018
squirrel
themes.src
tpl
translate_code besch -> desc Feb 2, 2017
utils
vehicle ADD name of creator to bridge, tunnel, signal, private car info window Mar 5, 2019
.desktop
.editorconfig
.gitignore
LICENSE.txt
Makefile CHG: connection info now a tab in the station dialogue instead its ow… Mar 13, 2019
Makeobj.vcproj
Nettool.vcxproj Build nettool with MSVC again Feb 12, 2018
Nettool.vcxproj.filters
Simutrans-SDL2.sln SDL2 project for MSVC Jun 26, 2018
Simutrans-SDL2.vcxproj
Simutrans.manifest
Simutrans.sln
Simutrans.vcxproj
buildOSXbundle.sh svn props Aug 9, 2018
clipboard_internal.cc
clipboard_s2.cc SDL2 clipboard support Jun 26, 2018
clipboard_w32.cc Use modern heap memory functions for Windows build clipboard function… Oct 27, 2017
common.mk
config.default.in
config.template remove opengl backend Feb 2, 2019
configure.ac Updated config May 18, 2018
convoihandle_t.h
distribute.sh FIX: autodetect if freetype has static or not Oct 11, 2018
findversion.sh
freight_list_sorter.cc squelch warnings Mar 5, 2019
freight_list_sorter.h
get_lang_files.sh
get_pak.sh Updated pakset for sh and nsis installer Mar 11, 2019
halthandle_t.h
linehandle_t.h Import version 88.07 Aug 20, 2006
macros.h
old.ico
old_blockmanager.cc
old_blockmanager.h
pathes.h FIX: do not create 'screenshots' directory, use macro, correct its sp… Jun 24, 2018
readme.txt
revision.jse
scrolltext.h
simcity.cc
simcity.h FIX prevent int overflow when calculating city center May 25, 2018
simcolor.h
simconst.h
simconvoi.cc FIX mark image dirty when convoi loads/unloads Feb 24, 2019
simconvoi.h
simdebug.cc Separated debug optmisation and text output levels Feb 19, 2017
simdebug.h FIX compiling with MSG_LEVEL>=4 was broken Aug 11, 2017
simdepot.cc ADD: (HyperSim) sorting vehicles in depot Sep 10, 2018
simdepot.h
simevent.cc
simevent.h
simfab.cc
simfab.h
simhalt.cc
simhalt.h FIX: do not move name of station, if there is alreadz a label there Mar 12, 2019
siminteraction.cc
siminteraction.h
simintr.cc
simintr.h
simio.cc
simio.h
simline.cc
simline.h Overhauled goods frame Feb 23, 2018
simlinemgmt.cc translate dataobj, fahrplan -> schedule Nov 27, 2016
simlinemgmt.h
simloadingscreen.cc
simloadingscreen.h Fix and translate comments round 2 Feb 17, 2017
simmain.cc
simmain.h Move remaining backends (SDL, X11) from C to C++. Jul 5, 2008
simmem.cc
simmem.h (ceeac) squelch some warnings Feb 9, 2019
simmenu.cc
simmenu.h
simmesg.cc
simmesg.h Move drawing functions to 16bit colour - better theme colours Mar 15, 2017
simobj.cc
simobj.h
simplan.cc FIX crashes on map creation with multithreading Jan 11, 2019
simplan.h
simres.rc
simskin.cc
simskin.h
simsound.cc SDL2 sound with free sampel rate and -mute flag for loading sounds bu… Aug 21, 2018
simsound.h translate bild -> image Nov 26, 2016
simsys.cc
simsys.h
simsys_d.cc
simsys_posix.cc
simsys_s.cc FIX propagate new window size in dedicated event member variables, Jul 15, 2018
simsys_s2.cc
simsys_w.cc Possible fix for IMEs crashing GDI build on Windows 10. Nov 15, 2018
simsys_w32_png.cc Fix and translate comments round 2 Feb 17, 2017
simsys_w32_png.h
simticker.cc
simticker.h
simtool-dialogs.h
simtool.cc
simtool.h
simtypes.h
simunits.h
simutrans.ico
simutrans.svg
simversion.h increase savegame version to be able to save windows related stuff Feb 2, 2019
simware.cc
simware.h
simworld.cc (ceeac) renovated ticker and independed of fast forward speed Mar 25, 2019
simworld.h
stormoog.ico
todo.txt
uncommon.mk
unicode.cc
unicode.h

readme.txt

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

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

To compile you will need the following libraries:
libz (http://www.zlib.net/)
libpng (http://www.libpng.org/pub/png/) for makeobj
libbz2.lib (compile from source from http://www.bzip.org/downloads.html)

The following are also recommendend, but optional
libfreetype (http://www.freetype.org/)
libminiupnpc (http://miniupnp.free.fr/)

For the recommended SDL2-support you need
libSDL2 [better than libSDL] (http://www.libsdl.org/)
libSDL_mixer (link from the same page)

The link for allegro lib is (but the allegro backend has not been 
tested for a long time):
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:
http://wiki.openttd.org/Category:Compiling_OpenTTD
A system set up for OpenTTD will also compile simutrans (except for
bzlib2, see below sections).

If you are on a MS Windows machine, download either MS VC Express or
MSYS2. MSVC is easy for debugging, MSYS2 is easy to set up (but it has to 
be done on the command line).

The packages needed for MSYS2 are
make
mingw-w64-i686-gcc
mingw-w64-i686-SDL (Only if you want an SDL build OR for sound on SDL2)
mingw-w64-i686-SDL2 (Only if you want an SDL2 build)
mingw-w64-i686-freetype (for scaleable font support)
mingw-w64-i686-miniupnpc (for easy server option)
mingw-w64-i686-libpng (for makeobj)
mingw-w64-i686-pkg-config (for makeobj)

For all other systems, it is recommended you get latest GCC 3.46 or higher
and matching zlib, libbzip2, and libpng and SDL or SDL2 libbrary. For linux
systems you may have to use tools like apt-get, yast2, yum, ...

Typical package names are (ending may be also -devel)
libsdl2-dev or libsdl1.2-dev
zlib-dev
libpng-dev
libbz2-dev
libminiupnpc-dev
libfreetype-dev
Depending on your distribution, there may be also number needed, like 
libfreetype2-dev or libminiupnpc6-dev

To built on Haiku you must use GCC4 (type "setarch x86" in the current
nightlies). To incorporate bz2lib, download make bz2lib and add them
manually (via FLAGS = -I/dwonloadeddir -L/downloadeddir). However, simutrans
has a Haikuporter package, which may built the lastest version.

A subversion will be also a good idea. You can find some of them on:
http://subversion.tigris.org/
or you some other client.

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.

The address is:
svn://servers.simutrans.org/simutrans

A commandline would look like this:
svn checkout svn://servers.simutrans.org/simutrans

If everything is set up, you can run configure inside trunk. This should 
create a config.default file with all the needed settings. Try to compile 
using make. You can manually fine edit config.default to enable other 
settings.

Typical you type into a command window:
./configure
make

The executable compiled by this is located in the directory "build/default", 
i.e. "./build/default/sim" You can start it by this
cd simutrans
../build/default/sim -use_workdir
but you will need to add at least one pak to the simutrans directory.

You can run ./distribute which will give you a zip file that contains 
everything (minus a pak) needed to run simutrans.


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

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


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

Go to simutrans/trunk.

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

I recommend to uncomment #DEBUG=1 and #OPTIMISE = 1 (i.e. removing the #),
if you build for your own use.

For allegro or libsdl you may need to define the path of the config file
(or at least on win98 an 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.


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

Download Visual Express C++ (tested for 2012 upwards)
http://www.microsoft.com/express/Downloads/

For most libraries you will easily find binaries. A quick start for some of 
them is the bundle used for OpenTTD:
https://www.openttd.org/en/download-openttd-useful/6.0

The bzip2 source tarball comes with an archive where you can easily built
your own libbz2.lib file.

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.

Nagoya, Oct 2018
You can’t perform that action at this time.