Skip to main content
Topic: My First Compile from SVN (linux) (Read 3295 times) previous topic - next topic

My First Compile from SVN (linux)

Hello,

I grabbed the trunk from tron and managed to compile.  Here are some notes for anyone else trying to compile with Linux (Ubuntu)

Code: [Select]
sudo aptitude install libz-dev libpng-dev libsdl-dev libsdl-mixer1.2-dev liballegro-dev

I set these in config.default:

Code: [Select]
BACKEND = mixer_sdl
COLOUR_DEPTH = 16

The 8bit was breaking compile.

I had to fix two typos in the source code to compile correctly.  After that, make did its thing and left me with a binary called sim which I can copy to my ~/simutrans directory to play the game. :)

Following is my svn diff, which I like to think reflects developers slaving away on the trunk:

Code: [Select]
Index: simwerkz.cc
===================================================================
--- simwerkz.cc (revision 2686)
+++ simwerkz.cc (working copy)
@@ -2002,7 +2002,7 @@
 {
  // get a default vehikel
  vehikel_besch_t remover_besch( wt, 500, vehikel_besch_t::diesel );
- vehikel_t* test_driver = vehikelrbauer_t::baue(start, sp, NULL, &remover_besch);
+ vehikel_t* test_driver = vehikelbauer_t::baue(start, sp, NULL, &remover_besch);
  bool can_built;
  if( start != to ) {
  can_built = verbindung.calc_route(sp->get_welt(), start, to, test_driver, 0);
Index: dings/gebaeude.cc
===================================================================
--- dings/gebaeude.cc (revision 2686)
+++ dings/gebaeude.cc (working copy)
@@ -151,7 +151,7 @@
  }
  // have to rotate the tiles :(
  if (!haus_besch->can_rotate() && haus_besch->get_all_layouts() == 1) {
- if (welt->get_einstellungen()->get_rotation() & 1) == 0) {
+ if ((welt->get_einstellungen()->get_rotation() & 1) == 0) {
  // rotate 180 degree
  new_offset = koord(haus_besch->get_b() - 1 - new_offset.x, haus_besch->get_h() - 1 - new_offset.y);
  }

 

Re: My First Compile from SVN (linux)

Reply #1
And any time I want a fresh "nightly" I can:

Code: [Select]
cd ~/src/tron/simutrans/trunk
svn up
make && cp sim ~/simutrans

It looks like someone is in the middle of working on code now.  (There are some weird display issues in the factory info dialog.)  Danke! Danke!  Danke!

Re: My First Compile from SVN (linux)

Reply #2
You need "liballegro-dev" ?

But you compile for "BACKEND = mixer_sdl"?
I hope you understand my English


Re: My First Compile from SVN (linux)

Reply #4
Most likely you need allegro only if you also compile for the allegro backend. But it doesn't hurt to have both installed, SDL and Allegro.

Re: My First Compile from SVN (linux)

Reply #5
You want to know how the nightlys are compiled??? ;o)
I hope you understand my English


Re: My First Compile from SVN (linux)

Reply #7
In German:
"Herzliches Beileit Leidensgenosse"

The Script is "easy".
1) Check if SVN-Update, when yes then
2) Do SVN Update
3) new compile.default
4) Check if Compile, when not error
5) strip programm
6) READY.... ;o)

It makes only Problems, when you cross-compile ..... (for Windows/MAC)
I hope you understand my English