Page 1 of 1
[Linux/server] compiling ottd
Posted: 24 Jul 2006 21:36
by johnobo
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.
Posted: 24 Jul 2006 22:13
by Sacro
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
Code: Select all
cp openttd data/*.* lang/*.lng $(ottdinstalldir)
- 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

Posted: 24 Jul 2006 22:46
by Bjarni
you should be aware that it would still need the TTD files.
Another thing. Are you allowed to use as much CPU power as a server would need? It's not just a fileserver you know

Posted: 26 Jul 2006 16:37
by johnobo
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:
Code: Select all
./configure --dedicated
-bash: ./configure no such file or directonary
-.-
Posted: 26 Jul 2006 17:05
by gigajum
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
Posted: 26 Jul 2006 17:12
by qse-koffer
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:
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'
...
I guess I'll have to install a zlib package, but which one? Didn't found anything in the readme.
Greets
Posted: 26 Jul 2006 17:17
by gigajum
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

Posted: 26 Jul 2006 17:19
by qse-koffer
This was the missing package: zlib1g-dev

Thank you!
I didn't find a dedicated server binary?!
cu
qse-koffer
edit: i'm running debian, as this is the only real linux - in my opinion

Posted: 26 Jul 2006 17:22
by gigajum
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.
Posted: 26 Jul 2006 17:23
by qse-koffer
Strange but true
As I'm comming from the Windows world, I prefer to run _stable_ releases on _servers_ rather than nightly builds

Posted: 26 Jul 2006 17:28
by gigajum
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.
Posted: 26 Jul 2006 17:31
by qse-koffer
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?
Posted: 26 Jul 2006 17:35
by gigajum
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
Posted: 26 Jul 2006 19:17
by Brianetta
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?
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).
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.
Posted: 26 Jul 2006 21:57
by Bjarni
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.
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.
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.
Posted: 27 Jul 2006 17:10
by johnobo
ok, thanks up to now for y'all help.
compilingsworks now.
but, after compiling:
Code: Select all
someshit/myDir/openttd-0.4.7 # openttd -D
-bash: openttd: command not found
*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.
Posted: 27 Jul 2006 17:24
by Bjarni
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.
Posted: 27 Jul 2006 17:46
by johnobo
edit: works.