Compiling on Linux
Moderator: OpenTTD Developers
Re: Compiling on Linux
well, you can copy the checkout, but you have to copy all of it, including the hidden folders (.svn)
Re: Compiling on Linux
or use a DVCS like git or mercurial, openttd already offers converts for those...
and use make bundle and BUNDLE_DIR to create different binary sets with same source.
and use make bundle and BUNDLE_DIR to create different binary sets with same source.
Town Names: Portuguese Belarusian French Swiss · Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: Compiling on Linux
happened to me too and this was how i solved it: (it's not the solution, more a "work around")
and when compiling:
hope you already made it, but this way worked for me and no more desyncs
___
happy games
Code: Select all
--- src/rev.cpp.in (revision 22295)
+++ src/rev.cpp.in (working copy)
@@ -27,7 +27,7 @@
* norev000 is for non-releases that are made on systems without
* subversion or sources that are not a checkout of subversion.
*/
-const char _openttd_revision[] = "!!VERSION!!";
+const char _openttd_revision[] = "1.1.0";
Code: Select all
$ ./configure --revision=r22282
$ make
___
happy games
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Compiling on Linux
Oh dear.
please don't come and complain when the game desyncs or alike. Faking a version like this usually is not a good idea at all.
Use a checkout from our svn repository and there's no need for any acrobatics. And if it then compiles as 1.1.0 you can be reasonably sure that it should behave as such.
please don't come and complain when the game desyncs or alike. Faking a version like this usually is not a good idea at all.
Use a checkout from our svn repository and there's no need for any acrobatics. And if it then compiles as 1.1.0 you can be reasonably sure that it should behave as such.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Compiling on Linux
Why did you do that?BenTrein wrote:I need to compile two different versions - one for a non mod noob friend of mine (noob in Linux that is), and one for myself using the moderator gui. The one for the friend of mine has also a patch (colouring the city names based on the rating). So - being behind not such a fast internet connection - thought I'd save time by copy/pasting the checkout into a new folder, and compiling it there.
You got a checked-out copy, so you can revert changes locally by means of 'svn revert'.
Re: Compiling on Linux
well, usually this is the method i use:
(this is a clean try out)
Whenever used in this way and it worked (as Bentrein said too but i'm on W7) but as a "Wiki's dependent" to use MinGW maybe i'm doing something wrong and would be grateful for some enlightenment.
As i said, "it's not the solution", only the way i made things work (and i google'd a lot )
Don't worry, I'm not (and will not) complain for desync probs with a "over the knee solution"! (never happened desyncs)
Thank you in advance
(this is a clean try out)
Code: Select all
$ svn checkout svn://svn.openttd.org/tags/1.1.0
...
[...bla...bla...getting files...]
...
A 1.1.0\readme.txt
U 1.1.0
Checked out revision 22298.
Warp@Warp-PC ~/_ottd
$ cd 1.1.0
Warp@Warp-PC ~/_ottd/1.1.0
$ ./configure
checking awk... awk
detecting OS... MINGW
checking build system type... mingw32
checking host system type... mingw32
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking host windres... windres
checking host strip... strip
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 32 bits
checking static... yes
checking unicode... yes
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... not OSX, skipping
checking Allegro... not found
checking SDL... found
checking COCOA... not OSX, skipping
checking GDI video driver... found
checking dedicated... not selected
checking console application... disabled (only used when forced)
checking network... found
checking ai... found
checking translator... no
checking assert... disabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking libpng... found
checking libfreetype... found
checking libfontconfig... WIN32, skipping
checking libicu... not found
checking psp-config... not PSP, skipping
checking libtimidity... not found
checking direct-music... not found
checking sort... sort
checking endianess... AUTO
suppress language errors... no
checking stripping... strip -s
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking OSX application bundle... not OSX, skipping
checking revision... no detection
WARNING: there is no means to determine the version.
WARNING: please use a subversion, mercurial, or git checkout of OpenTTD.
WARNING: you can only join game servers that have been compiled without
WARNING: version detection.
WARNING: there is a great chance you desync.
WARNING: USE WITH CAUTION!
checking iconv... not OSX, skipping
...
[...bla...bla...]
...
Generating Makefile...
Generating lang/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
Warp@Warp-PC ~/_ottd/1.1.0
$ which svn
/usr/local/bin/svn.exe
Warp@Warp-PC ~/_ottd/1.1.0
$
As i said, "it's not the solution", only the way i made things work (and i google'd a lot )
Don't worry, I'm not (and will not) complain for desync probs with a "over the knee solution"! (never happened desyncs)
Thank you in advance
Re: Compiling on Linux
I do the exact same sequence at a 'real' Linux system, and it works for me.
I can think of two possible causes:
- The svn directories (called '.svn') are not created.
- Version detection is broken due to some utility not being available or so.
To start with the former, what happens when you doNotice the last entry '.svn' at the last column.
The revision is detected with the 'findversion.sh' script in that directory; what happens when you do
I can think of two possible causes:
- The svn directories (called '.svn') are not created.
- Version detection is broken due to some utility not being available or so.
To start with the former, what happens when you do
Code: Select all
$ cd 1.1.0
$ ls -a
. config.lib findversion.sh Makefile.bundle.in objs
.. config.log .gitignore Makefile.grf.in os
bin config.pwd .hgignore Makefile.in projects
changelog.txt configure known-bugs.txt Makefile.lang.in readme.txt
config.cache COPYING Makefile Makefile.msvc source.list
config.cache.pwd docs Makefile.am Makefile.src.in src
config.cache.source.list Doxyfile Makefile.bundle media .svn
The revision is detected with the 'findversion.sh' script in that directory; what happens when you do
Code: Select all
$ ./findversion.sh
1.1.0 22282 0 1.1.0
Re: Compiling on Linux
This is what appears to me:
Yep, something wrong with "findversion.sh", not the file but maybe some utility missing.
I'll put my eyes in some reading to figure out... or trying! (just in case, if you have some ideias... )
Thank you
Code: Select all
Warp@Warp-PC ~/_ottd/1.1.0
$ ls -a
. Doxyfile Makefile.src.in findversion.sh source.list
.. Makefile.bundle.in bin known-bugs.txt src
.gitignore Makefile.grf.in changelog.txt media
.hgignore Makefile.in config.lib os
.svn Makefile.lang.in configure projects
COPYING Makefile.msvc docs readme.txt
Warp@Warp-PC ~/_ottd/1.1.0
$ ./findversion.sh
svn: Write error: Bad file descriptor
svn: Write error: Bad file descriptor
svn: Write error: Bad file descriptor
svn: Write error: Bad file descriptor
r 0 r
I'll put my eyes in some reading to figure out... or trying! (just in case, if you have some ideias... )
Thank you
Re: Compiling on Linux
Lines 79-81 do the actual work, they run 'svn info', and do processing of that output by 'awk'.
Line 81 looks the simplest, could you try to get useful output from that line (the command being run is between both ` characters:I changed '"$AWK"' by just 'awk'. It grabs the number from the 'svn info' line "Last Changed Rev: 22282"
Line 81 looks the simplest, could you try to get useful output from that line (the command being run is between both ` characters:
Code: Select all
LC_ALL=C svn info | awk '/^Last Changed Rev:/ { print $4 }'
Re: Compiling on Linux
Success!!
Installed SVN v1.6.16 strictly following the Wiki and... done!
Since i'm in Windows 7 I noticed too that the firewall (Comodo) was blocking some svn connections (strange). Don't know if can happen in Linux too, sorry.
My apologies for the basic questions and doubts...
Thanks to all. Alberth, thank you very much
Edit:
all worked well but this lines still needed to who apply some patches (maybe nothing new - or another mistake from me - but i talk from my lack of experience )
Code: Select all
Warp@Warp-PC ~/_ottd/1.1.0
$ ./findversion.sh
1.1.0 22282 0 1.1.0
Since i'm in Windows 7 I noticed too that the firewall (Comodo) was blocking some svn connections (strange). Don't know if can happen in Linux too, sorry.
My apologies for the basic questions and doubts...
Thanks to all. Alberth, thank you very much
Edit:
all worked well but this lines still needed to who apply some patches (maybe nothing new - or another mistake from me - but i talk from my lack of experience )
Code: Select all
--- src/rev.cpp.in (revision 22298)
+++ src/rev.cpp.in (working copy)
@@ -27,7 +27,7 @@
* norev000 is for non-releases that are made on systems without
* subversion or sources that are not a checkout of subversion.
*/
-const char _openttd_revision[] = "!!VERSION!!";
+const char _openttd_revision[] = "1.1.0";
Who is online
Users browsing this forum: No registered users and 1 guest