project-navigation
Personal tools

Author Topic: Trunk - Automagic Update & Compile & Run the game.  (Read 3365 times)

fjin

  • Guest
Trunk - Automagic Update & Compile & Run the game.
« on: April 20, 2008, 01:45:57 pm »
What is easiest way of checking that there is newer version of Trunk available @ Linux

svn up, does update and only those changes, but is there good, automatic way to do compiling if there is changes.
Idea is to put those routines to script what is run when I want to play the game.


Now I have two startup scripts, one just goes to /usr/local/ and runs game,
another one blindly does svn up, compiles, and then starts game.

I have Debian Testing, and I didn't made those to .deb's in any point.


My current Trunk game startup script:


/usr/local/bin/ufo_trunk_update

Code: [Select]
#!/bin/bash
cd /usr/local/src/ufoai_trunk/trunk/
sudo svn up
sudo ./configure
sudo make -j 3
sudo make -j 3 lang
sudo make -j 3 maps
./ufo

I call this script from Gnome program launcher with this line:
gnome-terminal -e /usr/local/bin/ufo_trunk_update

This asks my user password once.



And if I don't want to do update, I have second script
Code: [Select]
#!/bin/bash
cd /usr/local/src/ufoai_trunk/trunk/
./ufo

with Gnome program launcher line:
/usr/local/bin/ufo_trunk

Offline Doctor J

  • Squad Leader
  • ****
  • Posts: 265
    • View Profile
Re: Trunk - Automagic Update & Compile & Run the game.
« Reply #1 on: April 21, 2008, 03:40:42 am »
What is easiest way of checking that there is newer version of Trunk available @ Linux

I think the easiest way to check is to not check.   ;)  It's very likely that by the time you get done compiling there has already been another update.  But you can drive yourself crazy trying to keep up with that; i recommend just doing an update when it's convenient for you, or to see if there is a fix for a specific problem you just noticed...

Offline blondandy

  • Sergeant
  • *****
  • Posts: 391
    • View Profile
Re: Trunk - Automagic Update & Compile & Run the game.
« Reply #2 on: April 21, 2008, 10:30:12 am »
changes to trunk frequently break savegames. If you are trying to play through a campaign you will find auto svn up a bad idea.

If you run this before playing and there have been a lot of map tweaks, you will find time for a meal, shower, sleep, ... before you actually get to play.