INSTALL

Environment variables

You can set the following environment variables to have additional control over Legacy behavior. None of them are required.

Install General Instructions

Install Requires:

Types of Install:

System Share Install

Games Share Install

Games Install

User Install

Linux

System Share Install

$ install_nix sys $ install_nix sys GROUP=1234 OWNER=9876 PREFIX=/opt
PREFIX = "/usr/local"
INSTALL_BIN_DIR = "$PREFIX/bin"
INSTALL_SHARE_DIR = "$PREFIX/share/games/doomlegacy"
INSTALL_WADS_DIR = "$PREFIX/share/games/doomlegacy/wads"

Games Share Install

$ install_nix sharegames $ install_nix sharegames GROUP=1234 OWNER=9876 PREFIX=/opt
PREFIX = "/usr/local"
INSTALL_BIN_DIR = "$PREFIX/games"
INSTALL_SHARE_DIR = "$PREFIX/share/games/doomlegacy"
INSTALL_WADS_DIR = "$PREFIX/share/games/doomlegacy/wads"

Games Install

$ install_nix games $ install_nix games GROUP=1234 OWNER=9876 PREFIX=/opt
PREFIX = "/usr/local"
INSTALL_BIN_DIR = "$PREFIX/games/doomlegacy"
INSTALL_WADS_DIR = "$PREFIX/games/doomlegacy/wads"

User Install

$ install_nix user $ install_nix user doomgames
INSTALL_BIN_DIR="$HOME/games/doomlegacy"

Search directories in Linux

To change, edit source file doomdef.h, and re-compile.
Other directories can be added to doomdef.h, with up to 21 search directories.
The tilde is converted to $HOME by Doom Legacy.
Where PROGDIR is the program directory, and DEFDIR is the current directory.

Search for legacy.wad:

Search order, IWAD:

Linux Install Notes

The installation location is flexible, and can be moved. The installation directory can be one that all players can use, such as /usr/local/games/doomlegacy.

To manually install, unpack the tar file contents in the installation directory. The installation directory needs to include the doomlegacy binary, and legacy.wad. The tar file will also install the Doom Legacy docs there. The installation directory can also contain an autoexec.cfg file, that can execute Doom Legacy commands upon every Doom Legacy startup.

The IWAD files should go in a separate directory that can be shared between all Doom source ports (such as /usr/local/share/games/doomwads). The list of directories will be searched for the IWAD file. This list is specified for each operating system in the doomdef.h file. Most of the directories searched are system directories, and some user directories. Wads that are specific to Doom Legacy can be put in one of the directories that is unique to Doom Legacy.

The DOOMWADDIR environment variable can be set to point to another directory, in a login script or a game starting script. This environment variable was used by some other ports to specify the Doom wads directory. The DOOMWADDIR directory will be searched before the list. The current directory, and a wads directory of the program directory are also searched before the list.

Specify the verbose flag on the command line, "-v", to see the search list, and other directories. It is shown on the console, and to stderr.

You can also make soft links in the above mentioned IWAD directory to point to the actual IWAD files. The valid IWAD file names for each games selection can be found in docs/technical/wad_selection.txt.

$ ln -s wads/idgames/doom1.wad doom1.wad $ ln -s wads/idgames/doom2.wad doom2.wad $ ln -s wads/idgames/doomu.wad doomu.wad $ ln -s wads/idgames/plutonia.wad plutonia.wad $ ln -s wads/idgames/tnt.wad tnt.wad $ ln -s wads/freedoom-iwad-0.7/doom2.wad freedoom.wad $ ln -s wads/freedoom-iwad-0.9/freedoom2.wad freedoom2.wad

Doom Legacy will use the HOME environment variable, which is usually set by your Linux login, to find your home directory. There it will make a hidden directory named .doomlegacy for storing your configuration files and saved games. If HOME is not set, Doom Legacy will try to find an alternate home directory. First it will try to find a user created "legacyhome" in the current directory. If that fails it will try to create "legacyhome" in the program directory.

This behavior can be overridden by using the -home and -config switches:

$ doomlegacy -home ~/doomstuff -game plutonia $ doomlegacy -home ~/doom -config ~/doom/plutconfig.cfg -game plutonia

PWAD and DeHackEd files can be included using the -file switch. Examples:

$ doomlegacy -game tnt $ doomlegacy -game plutonia -file pwad/pl2/PL2.WAD $ doomlegacy -iwad freedoom.wad -file new_map13.wad $ doomlegacy -file pwad/Twilight/TWILIGHT.DEH pwad/Twilight/TWILIGHT.WAD

Script files can also be used to start Doom Legacy:

#!/bin/sh cd /usr/local/games/legacy/ USER="Shotgun-wizard" DOOMWADDIR=wads doomlegacy -iwad doom2.wad -file DM8.WAD

FreeBSD, Solaris

FreeBSD Install Notes

FreeBSD, Solaris, and the other similar operating systems use the LINUX install and operating instructions.

If there is some unique code for these operating systems. Should some unique problem be discovered please notify the Doom Legacy team by way of the SourceForge DoomLegacy project bug and request system. These notes will then be updated appropriately. If a solution is also submitted the problem may even get fixed.

Windows

There may be several install batch files present, because of the various flavors of DOS and WINDOWS. Choose one that fits your system the best. Help specifics for that batch file are obtained by running it with no parameters.

The instructions here most closely follow the install for Win98. Other flavors of Windows may have more options.

System Share Install

$ install_win sys
INSTALL_DIR =  "\Program Files\doomlegacy"
INSTALL_WADS = "\doomwads"

Games Share Install

Games Share install is not available for Windows. Use Games install.

Games Install

$ install_win games $ INSTALL_WIN games d:
INSTALL_DIR = \games\doomlegacy
INSTALL_WADS = %INSTALL_DIR%\wads

User Install

$ install_win user $ INSTALL_WIN user my_doom_directory
INSTALL_BIN_DIR="$HOME/games/doomlegacy"

Search directories in Windows

To change, edit source file doomdef.h, and re-compile.
Other directories can be added to doomdef.h, with up to 21 search directories.
The tilde is converted to $HOME by Doom Legacy.
Where PROGDIR is the program directory, and DEFDIR is the current directory.

Search for legacy.wad:

Search order, IWAD:

Windows Install Notes

The search directories for Windows are not as extensive as other ports. If the legacy.wad and IWAD are installed within these directories it should be possible to execute Doom Legacy without having to switch to the executable first.

If there is difficulty, it may be required to move files to a known location, or edit the doomdef.h file to customize a search directory. Support files, like wads, legacy.wad, autoexec.cfg, and config.cfg, need to be found by Doom Legacy and it is not reliable to look in the current directory for these. Users commonly would lose their config file because they had not set HOME, did not know where their config went, or Doom Legacy could not find a HOME to store config and savegames.

Put your wad files in directory "\doomwads", or "\games\doomwads", or in the current directory. Doom Legacy will search all doomwaddir for the wad file. The environment variable DOOMWADDIR can be set in a batch file to specify a different wad directory. Other doom ports commonly used that environment variable to point to the doom wad directory.

A "legacy" or "doomlegacy" directory will be created in your home directory for savegames and saved config files. This depends upon determining the HOME directory at run-time. This is commonly done with a UserProfile or HOME environment variable set at user login to the operating system.

For Windows, Doom Legacy first looks for the HOME directory in the "HOME" environment variable, and then in the "UserProfile" environment variable.

If HOME (or UserProfile), is not set by system login then it should be set by the user. Set the environment variable "HOME" in a batch file, or use the -home switch when starting Doom Legacy. If HOME is not set, Doom Legacy will try to find an alternate home directory. First it will try to find a user created "legacyhome" in the current directory. If that fails it will try to create "legacyhome" in the program directory.

Overriding by using the -home and -config switches, examples:

> doomlegacy -home c:\games\doomsave -game plutonia > doomlegacy -home c:\games\doomsave -config c:\games\plutconfig.cfg -game plutonia

Use the verbose switch -v, and Doom Legacy will print to stderr the directory names that it used. On Win98 this becomes a file named stderr.txt. The use of directory names with spaces may fail.

It is difficult to start a program under windows and set command line switches. Most of the settings that the launcher supported can now be set from menus and the console. However the -game, -file, and -config must be set from command line switches.

Doomlegacy will invoke a Launcher window when it is started without switches. It will also invoke the Launcher window when the game selection results or iwad selection are invalid. The Launcher window provides input of the game switches, iwad, config, home, and doomwad directories.

Another way to start Doom Legacy is to create shortcuts. These can be executed using a mouse. Specify in the shortcut the command line, and change the starting directory to where the doomlegacy program resides.

Example shortcut for Doom Legacy with plutonia2 wad: Shortcut: dl_plut2 command: doomlegacy -game plutonia -file c:\games\pl2\PL2.WAD current directory: c:\games\legacydir

Creating a batch file with the necessary commands is also an easy way to record a combination of switches. Run the batch file to start doomlegacy with the particular game and PWAD. In the following batch file examples, legacydir, homedir, configdir, and waddir stand for directories that you specify.

DOOM2.BAT cd c:\legacydir\ doomlegacy -game doom2 DM8.BAT cd c:\legacydir\ doomlegacy -iwad waddir\doom2.wad -home c:\homedir\ -config c:\homedir\config8.cfg DM2MOD.BAT SET HOME=c:\games\home SET DOOMWADDIR=c:\games\wads cd c:\games\legacydir doomlegacy -game doom2 -file levl9.wad mod2.deh mod8.bex

DOS

The DOS install is not as capable as other ports. Because a binary download will not be available, it will have to be compiled from Doom Legacy Source.

This will require a compiler.
Development used MinGW, but Watcom, and Clang have been tested. The code does test for MS compilers, but their usage with a DOS compile is unknown. Only DOS_NATIVE compile is available.

System Share Install

System Share install is not available for DOS.

Games Share Install

Games Share install is not available for DOS. Use Games install.

Games Install

$ INSTAL games $ INSTAL games d:
INSTALL_DIR = \games\legacy
INSTALL_WADS = %INSTALL_DIR%\wads

User Install

$ INSTAL user $ INSTAL user my_doom_directory
INSTALL_DIR = \games\legacy
INSTALL_WADS = %INSTALL_DIR%\wads

Search directories in DOS

To change, edit source file doomdef.h, and re-compile.
Other directories can be added to doomdef.h, with up to 21 search directories.
The tilde is converted to $HOME by Doom Legacy.
Where PROGDIR is the program directory, and DEFDIR is the current directory.

Search for legacy.wad:

Search order, IWAD:

DOS Install Notes

Put IWAD files in some of the directories in the search list.

See the Windows install notes, as the situation is very much the same.

A "legacy" directory will be created in your specified home directory for savegames and saved config files.

Set the environment variable "HOME" in a batch file, or use the -home switch when starting Doom Legacy. If HOME is not set, Doom Legacy will try to find an alternate home directory. First it will try to find a user created "DL_HOME" in the current directory. If that fails it will try to create "DL_HOME" in the program directory.
This behavior can be overridden by using the -home and -config switches.