Debian Codegraph @

debian/patches/unixpaths

raw
1 Index: gearhead2-0.701/arenascript.pp
2 ===================================================================
3 --- gearhead2-0.701.orig/arenascript.pp 2017-12-03 18:44:27.497451223 +0200
4 +++ gearhead2-0.701/arenascript.pp 2017-12-03 18:47:18.775764750 +0200
5 @@ -36,7 +36,7 @@
6
7 interface
8
9 -uses gears,locale,
10 +uses dos,gears,locale,
11 {$IFDEF ASCII}
12 vidmenus,vidgfx;
13 {$ELSE}
14 @@ -2391,7 +2391,7 @@
15 PC := PC^.Next;
16 end;
17
18 - SaveStringList( Config_Directory + FName + '.txt' , VList );
19 + SaveStringList( GetEnv( 'HOME' ) + '/.gearhead2/' + FName + '.txt' , VList );
20 {$IFDEF ASCII}
21 MoreText( VList , 1 );
22 {$ELSE}
23 Index: gearhead2-0.701/gears.pp
24 ===================================================================
25 --- gearhead2-0.701.orig/gears.pp 2017-12-03 18:44:27.497451223 +0200
26 +++ gearhead2-0.701/gears.pp 2017-12-03 18:44:27.493451355 +0200
27 @@ -241,7 +241,7 @@
28 Default_File_Ending = '.txt';
29 Default_Search_Pattern = '*.txt';
30
31 - Design_DirName = 'design';
32 + Design_DirName = '/usr/share/games/gearhead2/design';
33 Design_Directory = Design_DirName + OS_Dir_Separator;
34 PC_Equipment_Pattern = 'PC_*.txt';
35 Series_DirName = 'series';
36 @@ -254,7 +254,7 @@
37
38 Monsters_File_Pattern = 'WMON_*.txt';
39
40 - Data_DirName = 'gamedata';
41 + Data_DirName = '/usr/share/games/gearhead2/gamedata';
42 Data_Directory = Data_DirName + OS_Dir_Separator;
43 MetaTerrain_File_Base = Data_Directory + 'meta';
44 Trait_Chatter_Base = Data_Directory + 'TC_';
45 @@ -274,13 +274,13 @@
46 RandMaps_Param_File = Data_Directory + 'randmaps.txt';
47 NPC_Chatter_File = Data_Directory + 'taunts.txt';
48
49 - Doc_DirName = 'doc';
50 + Doc_DirName = '/usr/share/games/gearhead2/doc';
51 Doc_Directory = Doc_DirName + OS_Dir_Separator;
52 Mecha_Help_File = Doc_Directory + 'man_umek.txt';
53 FieldHQ_Help_File = Doc_Directory + 'man_mecha.txt';
54 Chara_Help_File = Doc_Directory + 'man_chara.txt';
55
56 - Graphics_DirName = 'image';
57 + Graphics_DirName = '/usr/share/games/gearhead2/image';
58 Graphics_Directory = Graphics_Dirname + OS_Dir_Separator;
59
60
61 @@ -1517,18 +1517,19 @@
62
63 initialization
64 { Make sure we have the required data directories. }
65 + ChDir( '/usr/share/games/gearhead2' );
66 if paramcount() > 0 then begin
67 Config_Directory := IncludeTrailingPathDelimiter( paramstr(1) );
68 end else begin
69 {$IFDEF WINDOWS}
70 Config_Directory := GetUserDir() + OS_Dir_Separator + 'gearhead2' + OS_Dir_Separator;
71 {$ELSE}
72 - Config_Directory := GetAppConfigDir(False);
73 + Config_Directory := GetEnv( 'HOME' ) + '/.gearhead2/';
74 {$ENDIF}
75 end;
76 - Config_File := Config_Directory + 'gearhead2.cfg';
77 + Config_File := Config_Directory + 'gearhead2.conf';
78
79 - Save_Game_DirName := 'savegame';
80 + Save_Game_DirName := 'savegame2';
81 Save_Game_Directory := Config_Directory + Save_Game_Dirname + OS_Dir_Separator;
82
83 Save_Character_Base := Save_Game_Directory + 'CHA';
84 Index: gearhead2-0.701/ui4gh.pp
85 ===================================================================
86 --- gearhead2-0.701.orig/ui4gh.pp 2017-12-03 18:44:27.497451223 +0200
87 +++ gearhead2-0.701/ui4gh.pp 2017-12-03 18:44:27.493451355 +0200
88 @@ -440,7 +440,7 @@
89 T: Integer;
90 begin
91 {See whether or not there's a configuration file.}
92 - S := FSearch(Config_File,'.');
93 + S := FSearch(Config_File, GetEnv('HOME')+'/.gearhead2/;/etc');
94 if S <> '' then begin
95 { If we've found a configuration file, }
96 { open it up and start reading. }