Skip to content

sazarina/simutrans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9cb5dd4 · Jan 7, 2017
Mar 30, 2013
Jan 7, 2017
Jan 7, 2017
Jan 7, 2017
Jan 7, 2017
Dec 7, 2016
Aug 16, 2014
Jan 7, 2017
Feb 12, 2016
Apr 20, 2014
Dec 22, 2015
Aug 7, 2013
Jan 7, 2017
Feb 2, 2016
Jan 7, 2017
Jan 7, 2017
Jan 7, 2017
Dec 18, 2016
Feb 9, 2015
Nov 3, 2016
May 1, 2013
Sep 16, 2014
Sep 22, 2016
Jan 7, 2017
Oct 8, 2016
Jan 7, 2017
Apr 29, 2016
Aug 3, 2012
Nov 27, 2016
Jan 8, 2015
Aug 7, 2013
Jan 3, 2016
Oct 29, 2012
Nov 27, 2016
Mar 31, 2013
Aug 7, 2013
Sep 17, 2015
Feb 8, 2015
Sep 10, 2014
Feb 12, 2016
Jul 2, 2015
Jun 21, 2007
Feb 17, 2015
Dec 21, 2014
Jan 7, 2017
Nov 24, 2013
Nov 11, 2014
Feb 2, 2016
Jun 21, 2007
Aug 20, 2006
May 27, 2014
Sep 4, 2006
Nov 27, 2016
Jan 23, 2015
Dec 16, 2011
Aug 11, 2014
Dec 10, 2013
Nov 2, 2012
Jan 7, 2017
Jan 7, 2017
Jan 5, 2015
Jun 13, 2016
Jan 7, 2017
Nov 27, 2016
Dec 9, 2012
May 27, 2014
Jan 7, 2017
Jan 7, 2017
Jan 9, 2015
Nov 20, 2016
Jan 7, 2017
Jan 7, 2017
Jan 7, 2017
Nov 20, 2016
Nov 20, 2016
Nov 24, 2013
Nov 26, 2016
Nov 26, 2016
Jun 10, 2007
Jun 10, 2007
Jan 7, 2017
Nov 27, 2016
Nov 27, 2016
Nov 27, 2016
Nov 26, 2016
Apr 26, 2013
Nov 27, 2016
Jul 5, 2008
Dec 16, 2011
Feb 5, 2012
Jan 7, 2017
Nov 26, 2016
Nov 26, 2016
Nov 26, 2016
Nov 26, 2016
Nov 26, 2016
Jan 7, 2017
Nov 14, 2015
Jan 3, 2016
Jan 7, 2017
Jan 7, 2017
Jan 3, 2015
Nov 26, 2016
Nov 20, 2016
Nov 20, 2016
Sep 23, 2016
Sep 23, 2016
Sep 25, 2016
Dec 11, 2016
Oct 11, 2016
Oct 8, 2016
May 5, 2014
May 27, 2014
Dec 9, 2015
Dec 9, 2015
Nov 26, 2016
Jan 7, 2017
Jan 7, 2017
Dec 16, 2016
Jun 13, 2014
Sep 2, 2006
Apr 29, 2016
Oct 21, 2016
Jan 7, 2017
Jan 7, 2017
Jan 7, 2017
Nov 27, 2016
Sep 25, 2006
Jan 3, 2016
Oct 15, 2011
Feb 9, 2015
Feb 9, 2015

Repository files navigation

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 up) or GCC.

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)

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:
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
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 latest GCC 3.46 or higher
and matching zlib, libbzip2, and libpng and a game library. For linux
systems you may have to use tools like apt-get or yast2.

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).

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://tron.yamagi.org/simutrans
username is "anon"!

A commandline would look like this:
svn checkout svn://tron.yamagi.org/simutrans --username=anon


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:
-------------------------------------------------------

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

In the OpenTTD wiki you will also find some useful instruction on
setting up MSVC:
http://wiki.openttd.org/Microsoft_Visual_C%2B%2B_2008_Express_Editions

You will need some libraries like zlib etc. Any version which is
compatible with VC will do. Take a look at the instructions for
compiling OpenTTD, which contains a libpng and a zlib suited for
simutrans too:
http://binaries.openttd.org/extra/openttd-useful/

The bzip2 source tarball comes with an archive where you can easily built
your own libbz2.lib file. Or use the one posted in the forum:
http://forum.simutrans.com/index.php?topic=652.msg37080#msg37080

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 2011

About

Mirror of Simutrans SVN Repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 90.6%
  • Squirrel 5.4%
  • C 1.2%
  • Awk 0.8%
  • NSIS 0.7%
  • Makefile 0.5%
  • Other 0.8%