Strange things when "fixing" (?) things & install target
Sven Velt
sven-airstrike at velt.de
Mon Feb 3 19:11:02 EST 2003
Hi!
I'm working on my debian package of airstrike and I found some... hmm,
let's call it bugs. Let's have a look at my patch (only relevant parts,
others are for the debian infrastructure):
,----[ config file ]-
| --- airstrike-1.0.orig/src/config.h
| +++ airstrike-1.0/src/config.h
| @@ -6,7 +6,7 @@
| /* absolute path to main config file (for now it's airstrikerc in the
| current dir)*/
| #ifndef ROOT_CONFIG_FILE
| -#define ROOT_CONFIG_FILE "airstrikerc"
| +#define ROOT_CONFIG_FILE "/etc/airstrikerc"
| #endif
| /* path to file in users $HOME */
| #ifndef USER_CONFIG_FILE
`----
This make things work as you could expect.
,----[ config file ]-
| --- airstrike-1.0.orig/airstrikerc
| +++ airstrike-1.0/airstrikerc
| @@ -4,7 +4,7 @@
|
|
| # The path where the program looks for its data files
| -datapath "data"
| +datapath "/usr/share/games/airstrike/data"
|
| #window size or fullscreen resolution
| screen.width 800
`----
Changed to the path where debian wants the data files. No problem.
But...
,----[ main game ]-
| --- airstrike-1.0.orig/src/airstrike.c
| +++ airstrike-1.0/src/airstrike.c
| @@ -74,7 +74,9 @@
| console_set_pos(9,254);
| console_load_bg(path_to_data("console-bg.png"));
| sprite_types_setup();
| - sprite_background_load("data/bg.png","data/bgmask.png");
| + // SV: We don't want hardcoded paths...
| + // sprite_background_load("data/bg.png","data/bgmask.png");
| + sprite_background_load(path_to_data("bg.png"),path_to_data("bgmask.png"));
|
| level_setup();
`----
if you add this, you will be very surprised when you wanna play. Both
planes rotate very quickly, they fall down through the ground and are
gone forever.
If I don't add this and start airstrike from a directory with
data/bg.png and data/bgmask.png in it, it works as it should.
OK, and here's my install target for the makefile. Again, these are
debian paths:
,----[ install target ]-
| --- airstrike-1.0.orig/Makefile
| +++ airstrike-1.0/Makefile
| @@ -29,3 +29,11 @@
| # packages new files listed in new-files.txt
| new:
| tar -zcvf new.tgz -T new-files.txt
| +
| +install:
| + install -d $(DESTDIR)/usr/games
| + install -m 755 airstrike $(DESTDIR)/usr/games/airstrike
| + install -d $(DESTDIR)/etc
| + install -m 644 airstrikerc $(DESTDIR)/etc/airstrikerc
| + install -d $(DESTDIR)/usr/share/games/airstrike/data
| + cp -R data/* $(DESTDIR)/usr/share/games/airstrike/data/
`----
bye
Sven
--
Meet me at: 2003-02-06 Schwabach: Stammtisch LUSC (http://lusc.de/)
2003-05-29/01 Felsberg: LugCamp 2003 (Schweiz)
*** [LUSC] Linux User Schwabach - Stammtisch: 1. & 3. Do - http://lusc.de ***
"Wie ist das passiert?" - "Keine Ahnung, hab' einfach auf 'Weiter' geklickt"
More information about the airstrike
mailing list