Skip to content
Mirror of Simutrans SVN Repository
C++ C Squirrel Awk NSIS Makefile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
OSX svn props Aug 9, 2018
bauer
boden (ceeac) Refactor: kart_t into minimap_t Oct 3, 2019
dataobj
descriptor
display FIX display_blend_colors: make application of alpha consistent with t… Jun 22, 2019
documentation Finish translating komp->comp Apr 11, 2019
finder CODE add suggested overrides, remove redundant virtual (ceeac) Feb 22, 2019
gui
ifc
makeobj
music
nettools
network
nsis
obj
player FIX: correctly calculate asset value for trams Sep 15, 2019
script
simutrans Release of 121.1 Dec 1, 2019
sound
squirrel
themes.src added editorconfig Mar 21, 2019
tpl
translate_code besch -> desc Feb 2, 2017
utils FIX: (ceeac) buffer overrun Oct 9, 2019
vehicle CODE remove unused method Oct 9, 2019
.desktop
.editorconfig added editorconfig Mar 21, 2019
.gitignore ADD: scripted scenarios Aug 3, 2012
LICENSE.txt
Makefile
Simutrans-GDI.vcxproj
Simutrans-Main.vcxitems (ceeac) Refactor: kart_t into minimap_t Oct 3, 2019
Simutrans-SDL2.vcxproj
Simutrans-Server.vcxproj FIX: compile MSVC debug versions again Aug 6, 2019
Simutrans.manifest
Simutrans.sln
buildOSXbundle.sh svn props Aug 9, 2018
clipboard_internal.cc
clipboard_s2.cc SDL2 clipboard support Jun 26, 2018
clipboard_w32.cc
common.mk Using HOSTCC to allow for crosscompiling May 22, 2017
config.default.in
config.template
configure.ac Configure script MacOS support Jul 15, 2019
convoihandle_t.h Remove references to the non-existent handle_as_id_tpl. Jun 21, 2007
distribute.sh
findversion.sh
freight_list_sorter.cc squelch warnings Mar 5, 2019
freight_list_sorter.h Hacky fix to ware_t good amount overflow when viewing a stop informat… Feb 6, 2019
get_lang_files.sh get translations from current translator Mar 27, 2019
get_pak.sh Updated pakset for sh and nsis installer Mar 11, 2019
halthandle_t.h Remove references to the non-existent handle_as_id_tpl. Jun 21, 2007
linehandle_t.h
macros.h
old.ico some forgotten files added Sep 4, 2006
old_blockmanager.cc
old_blockmanager.h Translate laden_abschliessen -> finish_rd Jan 23, 2015
pathes.h
readme.txt FIX: automatically detects build directory in distribution path Oct 11, 2018
revision.jse FIX: MSVC pre-build script generate revision.h even without SVN or if… May 6, 2018
scrolltext.h Chnaged banner text again Nov 2, 2012
simcity.cc
simcity.h ADD: Up to 3x3 city buildings, all with up to 8 rotations Apr 23, 2019
simcolor.h
simconst.h FIX: 15 bit RGB 555 was broken for long Apr 11, 2017
simconvoi.cc
simconvoi.h
simdebug.cc Separated debug optmisation and text output levels Feb 19, 2017
simdebug.h
simdepot.cc CHG: new version function Jun 19, 2019
simdepot.h Minor changes to translated names/comments (from Extended) Apr 11, 2019
simevent.cc FIX propagate new window size in dedicated event member variables, Jul 15, 2018
simevent.h
simfab.cc
simfab.h FIX: factory chart stats - take 2 May 27, 2018
simhalt.cc
simhalt.h
siminteraction.cc
siminteraction.h
simintr.cc Can only convert tick to time string if world model is initialized. F… Feb 6, 2019
simintr.h
simio.cc Many files include their own filename in a comment. Often the name is… Jun 10, 2007
simio.h
simline.cc CHG: new version function Jun 19, 2019
simline.h
simlinemgmt.cc
simlinemgmt.h Minor changes to translated names/comments (from Extended) Apr 11, 2019
simloadingscreen.cc FIX propagate new window size in dedicated event member variables, Jul 15, 2018
simloadingscreen.h
simmain.cc Wating cursor when query servers Oct 28, 2019
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 Minor changes to translated names/comments (from Extended) Apr 11, 2019
simmenu.h Minor changes to translated names/comments (from Extended) Apr 11, 2019
simmesg.cc
simmesg.h Move drawing functions to 16bit colour - better theme colours Mar 15, 2017
simobj.cc Fix a crash when the schedule window is open and waypoints exist on b… Jul 5, 2019
simobj.h
simplan.cc
simplan.h
simres.rc Added highres-aware manifest (Ters) Jan 3, 2016
simskin.cc
simskin.h
simsound.cc
simsound.h translate bild -> image Nov 26, 2016
simsys.cc
simsys.h FIX propagate new window size in dedicated event member variables, Jul 15, 2018
simsys_d.cc Fix and translate comments round 2 Feb 17, 2017
simsys_posix.cc FIX prevent posix-backend with COLOUR_DEPTH != 0 Mar 31, 2019
simsys_s.cc
simsys_s2.cc
simsys_w.cc Finish translating komp->comp Apr 11, 2019
simsys_w32_png.cc Fix and translate comments round 2 Feb 17, 2017
simsys_w32_png.h cleanup: Remove obsolete C compatiblity. May 27, 2014
simticker.cc
simticker.h (ceeac) renovated ticker and independed of fast forward speed Mar 25, 2019
simtool-dialogs.h Minor changes to translated names/comments (from Extended) Apr 11, 2019
simtool.cc r8861 broke games when loading rotated maps with 2x1 factories Nov 1, 2019
simtool.h
simtypes.h
simunits.h
simutrans.ico
simutrans.svg
simversion.h
simware.cc
simware.h
simworld.cc
simworld.h FIX: fast forward also fast with midi Oct 26, 2019
stormoog.ico branch merged back to trunk Sep 25, 2006
todo.txt
uncommon.mk
unicode.cc CODE remove unused functions Mar 13, 2019
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.