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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
From 8cde74c80be9fdfb0e00bb00b85b5bfed0e70da7 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jan@cholasta.net>
Date: Thu, 6 Feb 2020 07:59:18 +0100
Subject: [PATCH] Fix file paths
---
source/common/platform/posix/sdl/i_main.cpp | 14 +-------------
source/core/gameconfigfile.cpp | 13 +------------
source/core/gamecontrol.cpp | 2 +-
3 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/source/common/platform/posix/sdl/i_main.cpp b/source/common/platform/posix/sdl/i_main.cpp
index 7fc179a51..fb4ce733e 100644
--- a/source/common/platform/posix/sdl/i_main.cpp
+++ b/source/common/platform/posix/sdl/i_main.cpp
@@ -129,19 +129,7 @@ int main (int argc, char **argv)
Args = new FArgs(argc, argv);
// Should we even be doing anything with progdir on Unix systems?
- char program[PATH_MAX];
- if (realpath (argv[0], program) == NULL)
- strcpy (program, argv[0]);
- char *slash = strrchr (program, '/');
- if (slash != NULL)
- {
- *(slash + 1) = '\0';
- progdir = program;
- }
- else
- {
- progdir = "./";
- }
+ progdir = "/usr/lib/raze/";
I_StartupJoysticks();
diff --git a/source/core/gameconfigfile.cpp b/source/core/gameconfigfile.cpp
index b532b2925..8ffd663b1 100644
--- a/source/core/gameconfigfile.cpp
+++ b/source/core/gameconfigfile.cpp
@@ -100,15 +100,10 @@ FGameConfigFile::FGameConfigFile ()
// Debian likes them in /usr/share/games/doom
// I assume other distributions don't do anything radically different
SetValueForKey ("Path", "/usr/share/games/jfduke3d", true);
- SetValueForKey ("Path", "/usr/local/share/games/jfduke3d", true);
SetValueForKey ("Path", "/usr/share/games/eduke32", true);
- SetValueForKey ("Path", "/usr/local/share/games/eduke32", true);
SetValueForKey ("Path", "/usr/share/games/nblood", true);
- SetValueForKey ("Path", "/usr/local/share/games/nblood", true);
SetValueForKey("Path", "/usr/share/games/jfsw", true);
- SetValueForKey("Path", "/usr/local/share/games/jfsw", true);
SetValueForKey("Path", "/usr/share/games/voidsw", true);
- SetValueForKey("Path", "/usr/local/share/games/voidsw", true);
#endif
SetValueForKey ("Path", "$STEAM", true); // also covers GOG.
@@ -130,11 +125,8 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
SetValueForKey ("Path", SHARE_DIR, true);
SetValueForKey ("Path", "/usr/share/games/jfduke3d", true);
- SetValueForKey ("Path", "/usr/local/share/games/jfduke3d", true);
SetValueForKey ("Path", "/usr/share/games/eduke32", true);
- SetValueForKey ("Path", "/usr/local/share/games/eduke32", true);
SetValueForKey ("Path", "/usr/share/games/nblood", true);
- SetValueForKey ("Path", "/usr/local/share/games/nblood", true);
#endif
}
@@ -151,10 +143,7 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey("Path", "$PROGDIR/soundfonts", true);
#else
SetValueForKey("Path", "$HOME/" GAME_DIR "/soundfonts", true);
- SetValueForKey("Path", "/usr/local/share/" GAME_DIR "/soundfonts", true);
- SetValueForKey("Path", "/usr/local/share/games/" GAME_DIR "/soundfonts", true);
- SetValueForKey("Path", "/usr/share/" GAME_DIR "/soundfonts", true);
- SetValueForKey("Path", "/usr/share/games/" GAME_DIR "/soundfonts", true);
+ SetValueForKey("Path", "/usr/share/" GAMENAMELOWERCASE "/soundfonts", true);
#endif
}
diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp
index cf89415e5..512577cf6 100644
--- a/source/core/gamecontrol.cpp
+++ b/source/core/gamecontrol.cpp
@@ -826,7 +826,7 @@ int RunGame()
FString logfile = Args->TakeValue("+logfile");
// As long as this engine is still in prerelease mode let's always write a log file.
- if (logfile.IsEmpty()) logfile.Format("%s" GAMENAMELOWERCASE ".log", M_GetDocumentsPath().GetChars());
+ if (logfile.IsEmpty()) logfile.Format("%s/" GAMENAMELOWERCASE ".log", M_GetDocumentsPath().GetChars());
if (logfile.IsNotEmpty())
{
--
2.28.0
|