doc: Update BUILD-SYSTEM

Many of the details in this file are now obsolete. Update the
documentation to explain how things are now built (now that we have
a custom texture builder) and include details of some of the other
build scripts in subdirectories.
This commit is contained in:
Simon Howard 2014-01-17 04:33:35 +00:00
parent 71b30afa92
commit 8e74d43b5f

View file

@ -18,29 +18,30 @@ following diagram illustrates the process:
................................................................ ................................................................
buildcfg.txt textures/combined.txt buildcfg.txt lumps/textures/textures.cfg
│ │
│ ┌───┴────┐
│ │ cpp │
│ └───┬────┘
│ │
│ ┌─────────┴────────┐
│ │ build-textures │
│ └──┬────────────┬──┘
│ │ │
│ pnames.txt texture1.lmp, pnames.lmp
│ │ │
┌───┴────┐ │ │
│ cpp ├───────────┘ │
└───┬────┘ │
│ │ │ │
│ ┌─────┴────┐ ┌─────────┴──────────┐ │
│ │ cpp │ │ wadinfo─builder.py │
│ └─────┬────┘ └─────────┬──────────┘ │
│ │ │ │
│ textures/(wad)/texture1.txt wadinfo.txt │
│ │ │ │ │
│ ┌────────┴──────────┐ │ ┌───┴────┐ │
│ │ extract─pnames.py │ │ │ ├────────────────────────┘
│ └────────┬──────────┘ │
┌───┴────┐ │ │
│ cpp ├───── textures/(wad)/pnames.txt │
└───┬────┘ │
│ │
┌─────────┴──────────┐ │
│ wadinfo─builder.py │ │
└─────────┬──────────┘ │
│ │
wadinfo.txt │
│ │
┌───┴────┐ │
│ ├───────────────────────────────────┘
│ deutex │ │ deutex │
│ ├───────── all other source files (graphics, etc) │ ├───────── all other source files (graphics, etc)
└───┬────┘ └───┬────┘
@ -78,15 +79,17 @@ based on the type of output target desired:
* +DOOM1+: Build for a Doom I WAD. * +DOOM1+: Build for a Doom I WAD.
* +ULTDOOM+: Include episode four levels. * +ULTDOOM+: Include episode four levels.
=== Texture configuration file (+textures/combined.txt+) === Texture configuration file (+lumps/textures/textures.cfg+)
The texture configuration file is used to generate the +texture1.txt+ The texture configuration file is used to generate the texture lumps.
file. This is a list of textures that is used by 'deutex' to generate These are +texture1.lmp+ (texture directory), +pnames.lmp+ (list of
the +TEXTURE1+ lump that contains Doom's texture definitions. patch names) and +texture2.lmp+ (Doom I only). They are generated
by the +build-textures+ script; deutex's internal texture builder
is deliberately not used for compatibility reasons.
Similarly to the build configuration file, different textures are Similarly to the build configuration file, different textures are
included depending on the output WAD type. The file is processed by included depending on the output WAD type. The file is passed through
the +simplecpp+ script to include the appropriate textures. Command the +simplecpp+ script to include the appropriate textures. Command
line variables are defined based on the desired build settings: line variables are defined based on the desired build settings:
* +DOOM1+: Include textures that only exist in Doom I. * +DOOM1+: Include textures that only exist in Doom I.
@ -103,38 +106,25 @@ both.
The following files are generated automatically by automated scripts The following files are generated automatically by automated scripts
during the build process. during the build process.
=== +texture1.txt+ === Texture files
This file contains the texture definitions and is used by deutex to +texture1.lmp+ is a binary file that contains the texture definitions
generate the +TEXTURE1+ lump. It is generated automatically from and is built by the +build-textures+ script from
+textures/combined.txt+ as a template. +lumps/textures/textures.cfg+ as a template.
Several different +texture1.txt+ files are generated for the different +pnames.txt+ contains a list of all of the patches used in the texture
WAD files that are built: definition file (+texture1.txt+). It is generated as an output by
the +build-textures+ script.
[frame="topbot",grid="none",options="header"] Multiple sets of these files are generated with different
|================================================================== configurations for each IWAD file.
| Filename | WAD File | CPP Variables
| +textures/phase1/texture1.txt+ | +freedoom1.wad+ | DOOM1, ULTDOOM
| +textures/phase2/texture1.txt+ | +freedoom2.wad+ | DOOM1, DOOM2
| +textures/freedm/texture1.txt+ | +freedm.wad+ | FREEDM
|==================================================================
=== +pnames.txt+
This file contains a list of all of the patches used in the texture
definition file (+texture1.txt+). It is generated by the
+extract-pnames.py+ script.
Several different +pnames.txt+ files are generated for the different
WAD files that are built:
[frame="topbot",grid="none",options="header"] [frame="topbot",grid="none",options="header"]
|=============================================================== |===============================================================
| Filename | WAD File | Subdirectory | WAD File | CPP Variables
| +textures/phase1/texture1+ | +freedoom1.wad+ | +lumps/textures/phase1/+ | +freedoom1.wad+ | DOOM1, ULTDOOM
| +textures/phase2/texture1+ | +freedoom2.wad+ and resource WADs | +lumps/textures/phase2/+ | +freedoom2.wad+ | DOOM1, DOOM2
| +textures/freedm/texture1+ | +freedm.wad+ | +lumps/textures/freedm/+ | +freedm.wad+ | FREEDM
|=============================================================== |===============================================================
=== +wadinfo.txt+ === +wadinfo.txt+
@ -150,7 +140,7 @@ WAD files that are built:
|=============================================================== |===============================================================
| Filename | WAD File | CPP Variables | Filename | WAD File | CPP Variables
| +wadinfo.txt+ | Resource WAD files | DOOM2 | +wadinfo.txt+ | Resource WAD files | DOOM2
| +wadinfo_phase2.txt+ | +freedoom1.wad+ | DOOM1, ULTDOOM | +wadinfo_phase1.txt+ | +freedoom1.wad+ | DOOM1, ULTDOOM
| +wadinfo_phase2.txt+ | +freedoom2.wad+ | DOOM2 | +wadinfo_phase2.txt+ | +freedoom2.wad+ | DOOM2
| +wadinfo_freedm.txt+ | +freedm.wad+ | FREEDM | +wadinfo_freedm.txt+ | +freedm.wad+ | FREEDM
|=============================================================== |===============================================================
@ -192,12 +182,57 @@ WAD builds, the missing resources are commented out in the output file
so that they are missing from the WAD that is built. This is the so that they are missing from the WAD that is built. This is the
default behavior. default behavior.
=== +extract-pnames.py+ === +build-textures+
This script processes the texture file (+texture1.txt+) and outputs a This script processes the texture file (+texture1.txt+) and outputs
list of the names of all the required patches. This is used to the binary texture lumps +texture1.lmp+, +texture2.lmp+ and
generate a file named +pnames.txt+ that is included in the +pnames.lmp+.
+wadinfo.txt+ configuration file in a section named ``[patches]''.
Also output from the +build-textures+ script is a file named
+pnames.txt+ which is simply a text file containing the patches
listed in +pnames.lmp+. This is included in the wadinfo.txt file
so that all patches listed by the texture directory are automatically
included in the IWAD with no need for manual configuration.
=== +textgen+
Found in +graphics/text+, this script generates various graphics
files that are used in the Doom menus and intermission screen.
It reads level names from the dehacked lumps.
=== +playpal.py+
Found in +lumps/cph/misc-lumps+, this script builds the +PLAYPAL+
lump which contains the 256-color palettes used for special
effects (injured "red" flash, the green "radiation suit" effect,
etc.)
=== +colormap.py+
Found in +lumps/cph/misc-lumps+, this script builds the +COLORMAP+
lump that is used for the diminished lighting within the game.
This script is also reused to generate additional colormaps that
can be used for special effects. It has a number of command line
options that allow it to do various different colorizing and
"fog" effects.
=== +mkgenmidi+
Found in +lumps/genmidi+, this script builds the +GENMIDI+ lump used
for OPL MIDI synthesizer playback. The inputs for this script are a
collection of instrument files that are in the standard +SBI+ format
for OPL instruments. This lump is essential if you want to play using
a classic Adlib or Soundblaster card; these are emulated by several
source ports and some people still like to play using emulated OPL for
the authentic retro feel.
=== +gen-ultramid+
Found in +lumps/dmxgus+, this script builds the +DMXGUS+ lump used for
GUS MIDI playback. The GUS (Gravis UltraSound) card was a gaming sound
card popular in the '90s. As with the +GENMIDI+ lump, few people are
still using a real GUS card nowadays, but several source ports emulate
them and require this file.
== deutex == deutex
@ -233,11 +268,9 @@ around. Some of them are listed here.
+-v0 -fullsnd -rate accept+ +-v0 -fullsnd -rate accept+
* deutex does not allow the exact path to the +texture1.txt+ file to * deutex does not allow the exact path to the +texture1.txt+ file to
be specified; instead, it expects to find the file in be specified in the configuration file; this used to be a problem
+textures/texture1.txt+. To work around this, a symlink is kept at but the Freedoom's texture lumps are now built using a custom
this location that points to the actual +texture1.txt+ being used. script.
A side effect of this issue is that parallel builds with +make+ are
not possible (the +-j+ option).
* deutex requires an existing IWAD file in order to build WAD files, * deutex requires an existing IWAD file in order to build WAD files,
and includes the contents of the +TEXTURE1+ lump from the IWAD in and includes the contents of the +TEXTURE1+ lump from the IWAD in