[Linux/server] compiling ottd
Moderator: OpenTTD Developers
[Linux/server] compiling ottd
hey guys,
first of all, i am from germany and i like english as long i just have to read it (; but i gotta problem making it neccesary to register. ^^
now, i rented a server last week, running with linx suse and apache, i nver worked with linux befor, and upped the source file *.bz.tgz [or something like this] extracted it by the command tar.pxz [or something liek this] and got now, the files in a dir: ../mydir/opentd-0.4.3 [or something like this ^^]
but i don't know how to compile it, i bought now a book about dedicated servers, and there's also a little tutorial for linux systems, but i don't understand how to use the 'make' command in the right way to compile ottd.
it would be nice if someone understands me, and can help ^^
thank you guys.
first of all, i am from germany and i like english as long i just have to read it (; but i gotta problem making it neccesary to register. ^^
now, i rented a server last week, running with linx suse and apache, i nver worked with linux befor, and upped the source file *.bz.tgz [or something like this] extracted it by the command tar.pxz [or something liek this] and got now, the files in a dir: ../mydir/opentd-0.4.3 [or something like this ^^]
but i don't know how to compile it, i bought now a book about dedicated servers, and there's also a little tutorial for linux systems, but i don't understand how to use the 'make' command in the right way to compile ottd.
it would be nice if someone understands me, and can help ^^
thank you guys.
1st - Download the tar.bz2 file
2nd -
Where VERSION_OF_OPENTTD is whichever version your compiliing (0.4.7, 0.4.8-RC1, etc...)
3rd -
4th -
5th -
It differs here as to whether you want a dedicated server
for yes:
for normal (needs sdl!)
6th
This should give you a binary file called "openttd", you can run it from where it is, or move it to another folder, specify that using
- may need to be root for this
This should work, though i havent tested it yet...my next trick is to make a shell script that will do it all for you
2nd -
Code: Select all
ottdversion=VERSION_OF_OPENTTD
3rd -
Code: Select all
tar -xjf openttd-$(ottdversion)
Code: Select all
cd openttd-$(ottdversion)
It differs here as to whether you want a dedicated server
for yes:
Code: Select all
./configure --dedicated
Code: Select all
./configure
Code: Select all
make
This should give you a binary file called "openttd", you can run it from where it is, or move it to another folder, specify that using
Code: Select all
ottdinstalldir=/path/to/install
Code: Select all
cp openttd data/*.* lang/*.lng $(ottdinstalldir)
This should work, though i havent tested it yet...my next trick is to make a shell script that will do it all for you

We Am De Best
Host of ThroughTheTube site
Host of ThroughTheTube site
ok, thx.
i'll try it in a few minutes.
but all in all, a shell script wouldbe wonderfull as usefull ^^
edit:
doesn't work:
-.-
i'll try it in a few minutes.
but all in all, a shell script wouldbe wonderfull as usefull ^^
edit:
Code: Select all
./configure --dedicated
Code: Select all
./configure --dedicated
-bash: ./configure no such file or directonary
You need to do that in the openttd directory.
If you have no idea about linux, you should not run a linux server (IMO). I hope you did not rent a root server.
Edit:
to compile it try "make DEDICATED=1" in the openttd directory
If you have no idea about linux, you should not run a linux server (IMO). I hope you did not rent a root server.
Edit:
to compile it try "make DEDICATED=1" in the openttd directory
Last edited by gigajum on 26 Jul 2006 17:42, edited 1 time in total.
-
- Engineer
- Posts: 5
- Joined: 26 Jul 2006 17:06
- Contact:
Well, I'm running Linux Servers in Datacenters for many years now, and I've encoutered the same problem. There is no configure script and I found none.
I did it with make DEDICATED=1 instead of ./configure --dedicated.
But now it crashes when compiling saveload.c:
Greets
I did it with make DEDICATED=1 instead of ./configure --dedicated.
But now it crashes when compiling saveload.c:
I guess I'll have to install a zlib package, but which one? Didn't found anything in the readme.smarthost:~/openttd-0.4.7# make dedicated=1
===> Compiling saveload.c
saveload.c:956:18: zlib.h: Datei oder Verzeichnis nicht gefunden
saveload.c:958: error: Syntaxfehler before "_z"
saveload.c:958: Warnung: type defaults to `int' in declaration of `_z'
...
Greets
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
Did i miss something or is ther really no linux binary out of the 0.4.7?
http://wiki.openttd.org/index.php/Compiling_on_Linux take a look here about compiling openttd under linux.
Edit: Ok only a debian package
http://wiki.openttd.org/index.php/Compiling_on_Linux take a look here about compiling openttd under linux.
Edit: Ok only a debian package

-
- Engineer
- Posts: 5
- Joined: 26 Jul 2006 17:06
- Contact:
The nightly builds exist as i386,i686 and amd64 dedicated server for linux. That's why i wonder.
And strange but true the source files on sf.net do not contain a configure file.
And strange but true the source files on sf.net do not contain a configure file.
Last edited by gigajum on 26 Jul 2006 17:23, edited 1 time in total.
-
- Engineer
- Posts: 5
- Joined: 26 Jul 2006 17:06
- Contact:
-
- Engineer
- Posts: 5
- Joined: 26 Jul 2006 17:06
- Contact:
hm well, the server is now running here. without a configure file. does it set-up anything necessary?
edit: what do you mean... "more supported"? i was playing on a 0.4.7 server recently and anything worked fine. how is client/server compatibility with different versions?
edit: what do you mean... "more supported"? i was playing on a 0.4.7 server recently and anything worked fine. how is client/server compatibility with different versions?
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
If you run it to compile a client, may be. You can set the sound, video and music driver there. To compile a server only the dedicated flag is necessary (IIRC).
Edit: more suppoted -> the nightlys get compiled as:
GUI (client)
source (bz2 - gz - zip)
source-doc (bz2 - gz - zip)
linux-amd64 (bz2 - gz)
linux-i386 (bz2 - gz)
linux-i686 (bz2 - gz)
macosx (zip)
macosx-intel (zip)
macosx-powerpc (zip)
morphos (lha)
win32 (zip)
Dedicated server (console)
linux-amd64 (bz2 - gz)
linux-i386 (bz2 - gz)
linux-i686 (bz2 - gz)
macosx (zip)
macosx-intel (zip)
macosx-powerpc (zip)
morphos (lha)
for the 0.4.7 list see sf.net
Edit: more suppoted -> the nightlys get compiled as:
GUI (client)
source (bz2 - gz - zip)
source-doc (bz2 - gz - zip)
linux-amd64 (bz2 - gz)
linux-i386 (bz2 - gz)
linux-i686 (bz2 - gz)
macosx (zip)
macosx-intel (zip)
macosx-powerpc (zip)
morphos (lha)
win32 (zip)
Dedicated server (console)
linux-amd64 (bz2 - gz)
linux-i386 (bz2 - gz)
linux-i686 (bz2 - gz)
macosx (zip)
macosx-intel (zip)
macosx-powerpc (zip)
morphos (lha)
for the 0.4.7 list see sf.net
More supported - if you have a problem in stable which is fixed in the trunk you'll be encouraged to use the trunk (or a nightly build of it).qse-koffer wrote:edit: what do you mean... "more supported"? i was playing on a 0.4.7 server recently and anything worked fine. how is client/server compatibility with different versions?
Compatibility - none. If the version doesn't match, it will refuse to connect. If you force it to match, you'll disconnect as soon as the client and the server do something different.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
The configure script is made for the compilerfarm only (the one, that crosscompiles all the nightly builds) and is not needed for people, who compile for their own computer.gigajum wrote:The point is that it looks like the nightly build are more supported then release builds like the 0.4.7 or the comming 0.4.8. That's what i wonder about. Ok the linux guys can compile the game theirself, but then not having a configure file? That's a bit too much.
OpenTTD uses no autotools, hence no reason to use configure scripts
The first time the user runs make, the makefile itself will learn what OS it is on and store some parameters in Makefile.config. Usually this is what the user wants, so simply make will do. Otherwise edit Makefile.config and type "make" again.
ok, thanks up to now for y'all help.
compilingsworks now.
but, after compiling:
*cry* why? i got now a binary file in this dir.
ok later, i need of course gnu screen, but it looks a lot
more complicated, so i'll stay connected first time to
test ottd.
compilingsworks now.
but, after compiling:
Code: Select all
someshit/myDir/openttd-0.4.7 # openttd -D
-bash: openttd: command not found
ok later, i need of course gnu screen, but it looks a lot
more complicated, so i'll stay connected first time to
test ottd.
it appears that "." is not in your path (that's generally a good idea), so you have to type
./ means that instead of searching your path for a file to execute, you will use the dir that you are in right now.
Code: Select all
./openttd -D
Who is online
Users browsing this forum: No registered users and 10 guests