Package: gearhead / 1.310-2

unixpaths Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Index: gearhead-1.300/arenascript.pp
===================================================================
--- gearhead-1.300.orig/arenascript.pp	2016-04-06 22:29:01.953334654 +0300
+++ gearhead-1.300/arenascript.pp	2016-04-06 22:30:10.602876343 +0300
@@ -37,9 +37,9 @@
 interface
 
 {$IFDEF SDLMODE}
-uses gears,locale,sdlmenus,sdl,sdlgfx;
+uses dos,gears,locale,sdlmenus,sdl,sdlgfx;
 {$ELSE}
-uses gears,locale,conmenus;
+uses dos,gears,locale,conmenus;
 {$ENDIF}
 
 const
@@ -1498,7 +1498,7 @@
 		PC := PC^.Next;
 	end;
 
-	SaveStringList( Config_Directory + FName + '.txt' , VList );
+	SaveStringList( GetEnv( 'HOME' ) + '/.gearhead/' + FName + '.txt' , VList );
     {$IFDEF SDLMODE}
     ASRD_GameBoard := GB;
     MoreText( VList, 1 , @ArenaScriptRedraw );
Index: gearhead-1.300/ui4gh.pp
===================================================================
--- gearhead-1.300.orig/ui4gh.pp	2016-04-06 22:29:01.953334654 +0300
+++ gearhead-1.300/ui4gh.pp	2016-04-06 22:29:01.945334475 +0300
@@ -343,7 +343,7 @@
 		T: Integer;
 	begin
 		{See whether or not there's a configuration file.}
-		S := FSearch(Config_File,'.');
+		S := FSearch(Config_File,GetEnv('HOME')+'/.gearhead/;/etc');
 		if S <> '' then begin
 			{ If we've found a configuration file, }
 			{ open it up and start reading. }
Index: gearhead-1.300/gears.pp
===================================================================
--- gearhead-1.300.orig/gears.pp	2016-04-06 22:29:01.953334654 +0300
+++ gearhead-1.300/gears.pp	2016-04-06 22:31:52.801168392 +0300
@@ -1273,16 +1273,17 @@
 
 initialization
 	{ Make sure we have the required data directories. }
+	ChDir( '/usr/share/games/gearhead' );
     if paramcount() > 0 then begin
         Config_Directory := IncludeTrailingPathDelimiter( paramstr(1) );
     end else begin
     {$IFDEF WINDOWS}
         Config_Directory := GetUserDir() + OS_Dir_Separator + 'gharena' + OS_Dir_Separator;
     {$ELSE}
-        Config_Directory := GetAppConfigDir(False);
+        Config_Directory := GetEnv( 'HOME' ) + '/.gearhead/';

     {$ENDIF}
     end;
-	Config_File := Config_Directory + 'gharena.cfg';
+	Config_File := Config_Directory + 'gearhead.conf';
 
 	Save_Game_DirName := 'SaveGame';
 	Save_Game_Directory := Config_Directory + Save_Game_Dirname + OS_Dir_Separator;