commit 293b22549c00c996f3c88e00365c78a4ad980b64
Author: William Breathitt Gray <vilhelm.gray@gmail.com>
AuthorDate: Thu Jun 25 12:59:45 2020 -0400
Commit: GitHub <noreply@github.com>
CommitDate: Thu Jun 25 18:59:45 2020 +0200
Add support for /usr/share/doom IWAD search path (#1297)
* Add support for /usr/share/doom IWAD search path
Some Linux distros such as Gentoo have deprecated the /usr/share/games
directory. IWADs are typically installed under the /usr/share directory
for these distros.
* Update documentation about /usr/share/doom IWAD location
---
man/INSTALL.template | 2 ++
man/iwad_paths.man | 3 ++-
src/d_iwad.c | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/man/INSTALL.template b/man/INSTALL.template
index f04e98e6..9c9f7601 100644
--- a/man/INSTALL.template
+++ b/man/INSTALL.template
@@ -199,7 +199,9 @@ do one of the following:
* Put the file into one of the following directories:
$HOME/.local/share/games/doom
+ /usr/share/doom
/usr/share/games/doom
+ /usr/local/share/doom
/usr/local/share/games/doom
* Set the environment variable DOOMWADDIR to specify the path to a
diff --git a/man/iwad_paths.man b/man/iwad_paths.man
index 98058154..a41aba41 100644
--- a/man/iwad_paths.man
+++ b/man/iwad_paths.man
@@ -35,7 +35,8 @@ Writeable directory in the user's home directory. The path can be overridden
using the \fBXDG_DATA_HOME\fR environment variable (see the XDG Base Directory
Specification).
.TP
-\fB/usr/local/share/games/doom, /usr/share/games/doom\fR
+\fB/usr/local/share/doom, /usr/local/share/games/doom, /usr/share/doom,
+/usr/share/games/doom\fR
System-wide locations that can be accessed by all users. The path
\fB/usr/share/games/doom\fR is a standard path that is supported by most
Doom source ports. These paths can be overridden using the \fBXDG_DATA_DIRS\fR
diff --git a/src/d_iwad.c b/src/d_iwad.c
index 09853a64..e112e4f4 100644
--- a/src/d_iwad.c
+++ b/src/d_iwad.c
@@ -657,6 +657,7 @@ static void AddXdgDirs(void)
// source ports is /usr/share/games/doom - we support this through the
// XDG_DATA_DIRS mechanism, through which it can be overridden.
AddIWADPath(env, "/games/doom");
+ AddIWADPath(env, "/doom");
// The convention set by RBDOOM-3-BFG is to install Doom 3: BFG
// Edition into this directory, under which includes the Doom