-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.html
225 lines (225 loc) · 11.9 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="" utf-8""="">
<title>About the Simutrans Code</title>
</head>
<body>
<h1 id="simutrans"><a></a>Simutrans</h1>
<ul>
<li>1.0) <a href="#about">About</a>
<ul>
<li>1.1) <a href="#download-simutrans">Download Simutrans</a></li>
<li>1.2) <a href="#helpful-links">Helpful links</a></li>
</ul>
</li>
<li>2.0) <a href="#compiling-simutrans">Compiling Simutrans</a>
<ul>
<li>2.1) <a href="#getting-the-source-code">Getting the Source Code</a></li>
<li>2.2) <a href="#getting-the-libraries">Getting the libraries</a></li>
<li>2.3) <a href="#compiling">Compiling</a>
<ul>
<li>2.3.1) <a href="#compiling-with-make">Compiling with make</a></li>
<li>2.3.2) <a href="#compiling-with-microsoft-visual-studio">Compiling with MSVC</a></li>
<li>2.3.3) <a href="#compiling-with-cmake">Compiling with CMake</a></li>
</ul>
</li>
<li>2.4) <a href="#Cross-Compiling">Cross-Compiling</a></li>
</ul>
</li>
<li>3.0) <a href="#contribute">Contribute</a>
<ul>
<li>3.1) <a href="#coding">Coding</a></li>
<li>3.2) <a href="#translating">Getting the libraries</a></li>
<li>3.3) <a href="#painting">Painting</a></li>
<li>3.4) <a href="#reporting-bugs">Reporting-bugs</a></li>
</ul>
</li>
<li>4.0) <a href="#license">License</a></li>
<li>5.0) <a href="#credits">Credits</a></li>
</ul>
<h2 id="about"><a></a>1) About</h2>
<p>Simutrans is a freeware and open-source transportation simulator. Your goal is to establish a successful transport company. Transport passengers, mail and goods by rail, road, ship, and even air. Interconnect districts, cities, public buildings, industries and tourist attractions by building a transport network you always dreamed of.</p>
<h2 id="download-simutrans"><a></a>1.1) Download Simutrans</h2>
<p>You can download Simutrans from:</p>
<ul>
<li><a href="https://www.simutrans.com/en/">Simutrans Official Website</a></li>
<li><a href="https://store.steampowered.com/app/434520/Simutrans/">Steam</a></li>
<li><a href="https://pkgs.org/search/?q=simutrans">Linux package managers</a></li>
</ul>
<p>There is a "nightly" version available, but most most people should use the last "stable" release.</p>
<h2 id="helpful-links"><a></a>1.2) Helpful links</h2>
<h3 id="main-sites"><a></a>Main sites</h3>
<ul>
<li><a href="https://www.simutrans.com/">Main website</a></li>
<li><a href="https://forum.simutrans.com/">International Forum</a></li>
<li><a href="https://www.simutrans-forum.de/">German Forumurl</a></li>
<li><a href="https://forum.japanese.simutrans.com/">Japanese Forum</a></li>
</ul>
<h3 id="help"><a></a>Help</h3>
<ul>
<li><a href="https://wiki.simutrans.com/">Simutrans Wiki</a></li>
<li><a href="http://simutrans.igoreliezer.com/docs/Simutrans%20Starter%20Guide.pdf">Starter Guide (PDF)</a></li>
<li><a href="https://forum.simutrans.com/index.php/board,7.0.html">Help Center (International Forum)</a></li>
</ul>
<h3 id="additional-downloads"><a></a>Additional downloads</h3>
<ul>
<li><a href="https://www.simutrans.com/en/paksets/">Paksets</a></li>
<li><a href="https://simutrans-germany.com/wiki/wiki/en_Addons">Addons</a></li>
</ul>
<h2 id="compiling-simutrans"><a></a>2) Compiling Simutrans</h2>
<p>This is a short guide on compiling simutrans. If you want more detailed information, read the <a href="https://simutrans-germany.com/wiki/wiki/en_CompilingSimutrans">Compiling Simutrans</a> wiki page.</p>
<p>If you are on Windows, download either <a href="https://visualstudio.microsoft.com/">Microsoft Visual Studio</a> or <a href="https://www.msys2.org/">MSYS2</a>. MSVC is easy for debugging, MSYS2 is easy to set up (but it has to be done on the command line).</p>
<h3 id="getting-the-source-code"><a></a>2.1) Getting the Source Code</h3>
<p>You can download the latest version with a SVN client:</p>
<pre><code>svn checkout svn://servers.simutrans.org/simutrans/trunk
</code></pre>
<p>If you prefer to use git, there is a mirror of the svn repository available at github:</p>
<pre><code>git clone http://github.com/simutrans/simutrans.git
</code></pre>
<p>Note that the svn repository is the main repository, and the git repository is just a mirror. If you use git instead of svn, you will need to set the game version manually to join a network game.</p>
<h3 id="getting-the-libraries"><a></a>2.2) Getting the libraries</h3>
<p>This is a list of libraries used by Simutrans. Not all of them are necessary, some are optional, so pick them according to your needs. Read below about how to install them.</p>
<table>
<thead>
<tr>
<th>Library</th>
<th>Website</th>
<th>Necessary?</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>zlib</td>
<td><a href="https://zlib.net/">https://zlib.net/</a></td>
<td>Necessary</td>
<td>Basic compression support</td>
</tr>
<tr>
<td>bzip2</td>
<td><a href="https://www.bzip.org/downloads.html">https://www.bzip.org/downloads.html</a></td>
<td>Necessary</td>
<td>Alternative compression. You can pick this or zstd</td>
</tr>
<tr>
<td>libpng</td>
<td><a href="http://www.libpng.org/pub/png/">http://www.libpng.org/pub/png/</a></td>
<td>Necessary</td>
<td>Image manipulation</td>
</tr>
<tr>
<td>libSDL2</td>
<td><a href="http://www.libsdl.org/">http://www.libsdl.org/</a></td>
<td>Necessary*</td>
<td>*On Linux & Mac. Optional but recommended for Windows. Graphics back-end</td>
</tr>
<tr>
<td>libzstd</td>
<td><a href="https://github.com/facebook/zstd">https://github.com/facebook/zstd</a></td>
<td>Optional</td>
<td>Alternative compression (larger save files than bzip2, but faster)</td>
</tr>
<tr>
<td>libfreetype</td>
<td><a href="http://www.freetype.org/">http://www.freetype.org/</a></td>
<td>Necessary</td>
<td>TrueType font support</td>
</tr>
<tr>
<td>libminiupnpc</td>
<td><a href="http://miniupnp.free.fr/">http://miniupnp.free.fr/</a></td>
<td>Optional</td>
<td>Easy Server option</td>
</tr>
<tr>
<td>libfluidsynth</td>
<td><a href="https://www.fluidsynth.org/">https://www.fluidsynth.org/</a></td>
<td>Optional</td>
<td>MIDI playback recommended on Linux & temporarily on Mac</td>
</tr>
<tr>
<td>libSDL2_mixer</td>
<td><a href="http://www.libsdl.org/">http://www.libsdl.org/</a></td>
<td>Optional</td>
<td>Alternative MIDI playback and sound system</td>
</tr>
<tr>
<td>libfontconfig</td>
<td><a href="https://www.fontconfig.org/">https://www.fontconfig.org/</a></td>
<td>Optional</td>
<td>Font autodetection (Linux/Mac)</td>
</tr>
</tbody>
</table>
<p>You will also need pkgconfig (Unix) or <a href="https://github.com/Microsoft/vcpkg">vcpkg</a> (Microsoft Visual C++)</p>
<ul>
<li>MSVC: Should compile the needed libraries automatically, if VCPKG is installed. Alternative, copy install-building-libs-.bat to the vcpkg folder and run it.</li>
<li>MSYS2: Run [setup-mingw.sh] (tools/setup-mingw.sh) to get the libraries and set up the environment.</li>
<li>Ubuntu/Debian: Run [setup-debian.sh] (tools/setup-debian.sh) to get the libraries and set up the environment.</li>
<li>Linux: Use <a href="https://pkgs.org/">pkgs.org</a> to search for development libraries available in your package manager.</li>
<li>Mac: Install libraries via [Homebrew] (<a href="https://brew.sh/">https://brew.sh/</a>). Some guidance can be found in the github directory.</li>
</ul>
<h3 id="compiling"><a></a>2.3) Compiling</h3>
<p>Go to the source code directory of simutrans (simutrans/trunk if you downloaded from svn). You have three build systems to choose from: make, MSVC, and CMake. We recommend make or MSVC for debug builds, cmake for MacOS and Android.</p>
<p>Compiling will give you only the executable, you still need a Simutrans installation to run the program. You can start simutrans with <code>-use_workdir</code> to point it to an existing installation.</p>
<h4 id="compiling-with-make"><a></a>2.3.1) Compiling with make</h4>
<p>The executable will be built in build/default.</p>
<pre><code>(Linux) autoconf
(MacOS) autoreconf -ivf
./configure
make -j 4
(MacOS) make OSX/getversion
</code></pre>
<h4 id="compiling-with-microsoft-visual-studio"><a></a>2.3.2) Compiling with Microsoft Visual Studio</h4>
<p>Simutrans solution is a single solution file <a href="simutrans.sln">simutrans.sln</a> with 4 projects:</p>
<ul>
<li>Simutrans-Main: The project that holds the shared, non back-end specific, files. All the followings use Main to build the specific back-end executables.</li>
<li>Simutrans SDL2: Preferred back-end for Simutrans.</li>
<li>Simutrans GDI: Windows-only back-end.</li>
<li>Simutrans Server: Server back-end with no graphical interface.</li>
</ul>
<p>Select on of them as startup project and in the configuration manager compile it.</p>
<h4 id="compiling-with-cmake"><a></a>2.3.3) Compiling with CMake</h4>
<p>The executable will be built in build/simutrans.</p>
<h5 id="commandline-on-linuxmingwmacos"><a></a>Commandline on Linux/MinGW/MacOS ...</h5>
<pre><code>cmake -G "Insert Correct Makefiles Generator" -B build .
cmake --build build -j 4
</code></pre>
<p>See <a href="https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html">here</a> for a list of generators.</p>
<h5 id="msvc"><a></a>MSVC</h5>
<pre><code>mkdir build && cd build
cmake.exe .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE=[vcpkg-root]/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Release
</code></pre>
<h3 id="cross-compiling"><a></a>2.4) Cross-Compiling</h3>
<p>If you want to cross-compile Simutrans from Linux for Windows, see the <a href="https://simutrans-germany.com/wiki/wiki/en_Cross-Compiling_Simutrans">Cross-Compiling Simutrans</a> wiki page.</p>
<h2 id="contribute"><a></a>3) Contribute</h2>
<p>You cand find general information about contributing to Simutrans in the <a href="https://simutrans-germany.com/wiki/wiki/en_Devel_Index?structure=en_Devel_Index">Development Index</a> of the wiki.</p>
<h3 id="coding"><a></a>3.1) Coding</h3>
<ul>
<li>If you want to contribute, read the coding guidelines in simutrans/documentation/coding_styles.txt</li>
<li>You definitely should check out the <a href="https://forum.simutrans.com/index.php/board,112.0.html">Technical Documentation Sub-Forum</a> as well.</li>
<li><strong>Do not open Pull Requests</strong> in GitHub. Use the <a href="https://forum.simutrans.com/index.php/board,33.0.html">Patches & Projects</a> Sub-Forum instead.</li>
</ul>
<h3 id="translating"><a></a>3.2) Translating</h3>
<p>Simutrans is constantly updating and adding texts so we are always in need for translators:</p>
<ul>
<li>To help with translation use the <a href="https://translator.simutrans.com/">SimuTranslator</a> web tool.</li>
<li>To request a translator account use the <a href="https://forum.simutrans.com/index.php/board,47.0.html">Translation Sub-Forum</a>.</li>
</ul>
<h3 id="painting"><a></a>3.3) Painting</h3>
<p>Simutrans is always looking for artists! If you want to paint graphics for Simutrans, check:</p>
<ul>
<li>The "Creating images" section of the <a href="https://simutrans-germany.com/wiki/wiki/en_Devel_Index">Development Index</a>.</li>
<li>The <a href="https://forum.simutrans.com/index.php/board,108.0.html">General Resources and Tools</a> Sub-Forum.</li>
</ul>
<h3 id="reporting-bugs"><a></a>3.4) Reporting bugs</h3>
<p>For bug reports use the <a href="https://forum.simutrans.com/index.php/board,8.0.html">Bug Reports</a> Sub-Forum.</p>
<h2 id="license"><a></a>4) License</h2>
<p>Simutrans is licensed under the Artistic License version 1.0. The Artistic License 1.0 is an OSI-approved license which allows for use, distribution, modification, and distribution of modified versions, under the terms of the Artistic License 1.0. For the complete license text see <a href="LICENSE.txt">LICENSE.txt</a>.</p>
<p>Simutrans paksets (which are necessary to run the game) have their own license, but no one is included alongside this code.</p>
<h2 id="credits"><a></a>5) Credits</h2>
<p>Simutrans was originally written by Hansjörg Malthaner "Hajo" from 1997 until he retired from development around 2004. Since then a team of contributors (The Simutrans Team) lead by Markus Pristovsek "Prissi" is developing Simutrans.</p>
<p>A list of early contributors can be found in <a href="simutrans/thanks.txt">simutrans/thanks.txt</a></p>
</div>
</body></html>