Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
86 stars 9 forks source link

Add support for `DOOMWADDIR` and `DOOMWADPATH` environment variables #542

Open Calinou opened 8 months ago

Calinou commented 8 months ago

Helion version: https://github.com/Helion-Engine/Helion/commit/73e70716f9e4309255ed80ad46f6a074516010c6

DOOMWADDIR can be used to specify a path to a folder containing IWAD files. This allows using a single set of IWADs with various source ports regardless of their binary's location, without needing to create symbolic links in every source port's folder.

This affects the IWAD selection screen, -iwad CLI argument (you can use -iwad doom2 directly without specifying a file path or extension[^1]) and -file CLI argument as well.

[^1]: Make sure to check for both .WAD and .wad due to filesystems being case-sensitive (not just on Linux, as macOS and even Windows can be configured to be case-sensitive).

DOOMWADPATH also exists as an alternative that allows specifying multiple folders (separated by : on macOS/Linux and ; on Windows). If both are defined, DOOMWADDIR is read first, then DOOMWADPATH is parsed for a list of additional WAD folders.

The DOOMWADDIR environment variable is supported in pretty much every source port out there, including GZDoom, dsda-doom, DOOM Retro, Crispy Doom and more.

DOOMWADPATH isn't supported as commonly, but DOOM Retro supports it.