Split manpage.template into separate files for different games.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2614
This commit is contained in:
Simon Howard 2013-08-10 23:32:29 +00:00
parent e33e44276d
commit b1d51276a2
8 changed files with 257 additions and 70 deletions

View file

@ -1,5 +1,12 @@
MANPAGE_GEN_FILES=manpage.template docgen default.cfg.template extra.cfg.template
MANPAGE_GEN_FILES=\
doom.template \
heretic.template \
hexen.template \
strife.template \
docgen \
default.cfg.template \
extra.cfg.template
docdir=$(prefix)/share/doc/@PACKAGE@
@ -25,7 +32,7 @@ nodist_doc_DATA=INSTALL
chocolate-doom.6: ../src $(MANPAGE_GEN_FILES)
./docgen -g doom -m manpage.template ../src ../src/doom > $@
./docgen -g doom -m doom.template ../src ../src/doom > $@
default.cfg.5: ../src default.cfg.template
./docgen -g doom -m default.cfg.template \
@ -38,7 +45,7 @@ chocolate-doom.cfg.5: ../src extra.cfg.template
chocolate-heretic.6: ../src $(MANPAGE_GEN_FILES)
./docgen -g heretic -m manpage.template ../src ../src/heretic > $@
./docgen -g heretic -m heretic.template ../src ../src/heretic > $@
heretic.cfg.5: ../src default.cfg.template
./docgen -g heretic -m default.cfg.template \
@ -51,7 +58,7 @@ chocolate-heretic.cfg.5: ../src extra.cfg.template
chocolate-hexen.6: ../src $(MANPAGE_GEN_FILES)
./docgen -g hexen -m manpage.template ../src ../src/hexen > $@
./docgen -g hexen -m hexen.template ../src ../src/hexen > $@
hexen.cfg.5: ../src default.cfg.template
./docgen -g hexen -m default.cfg.template \
@ -64,7 +71,7 @@ chocolate-hexen.cfg.5: ../src extra.cfg.template
chocolate-strife.6: ../src $(MANPAGE_GEN_FILES)
./docgen -g strife -m manpage.template ../src ../src/strife > $@
./docgen -g strife -m strife.template ../src ../src/strife > $@
strife.cfg.5: ../src default.cfg.template
./docgen -g strife -m default.cfg.template \

View file

@ -34,6 +34,8 @@ import re
import glob
import getopt
INCLUDE_STATEMENT_RE = re.compile("@include\s+(\S+)")
# Find the maximum width of a list of parameters (for plain text output)
def parameter_list_width(params):
@ -405,8 +407,13 @@ def print_template(template_file, content):
try:
for line in f:
line = line.replace("@content", content)
print(line.rstrip())
match = INCLUDE_STATEMENT_RE.search(line)
if match:
filename = match.group(1)
print_template(filename, content)
else:
line = line.replace("@content", content)
print(line.rstrip())
finally:
f.close()

40
man/doom.template Normal file
View file

@ -0,0 +1,40 @@
.TH chocolate\-doom 6
.SH NAME
chocolate\-doom \- historically compatible doom engine
.SH SYNOPSIS
.B chocolate\-doom
[\fIOPTIONS\fR]
.SH DESCRIPTION
.PP
Chocolate Doom is a port of the game Doom designed to behave
as similar to the original DOS version of Doom as is possible.
.br
@content
.SH ENVIRONMENT
This section describes environment variables that control Chocolate Doom's
behavior.
@include environ.man
.SH FILES
.TP
\fB$HOME/.chocolate-doom/default.cfg\fR
The main configuration file for Chocolate Doom. See \fBdefault.cfg\fR(5).
.TP
\fB$HOME/.chocolate-doom/chocolate-doom.cfg\fR
Extra configuration values that are specific to Chocolate Doom and not
present in Vanilla Doom. See \fBchocolate-doom.cfg\fR(5).
.SH SEE ALSO
\fBchocolate-server\fR(6),
\fBchocolate-setup\fR(6)
.SH AUTHOR
Chocolate Doom is written and maintained by Simon Howard. It is based on
the LinuxDoom source code, released by Id Software.
.SH COPYRIGHT
Copyright \(co id Software Inc.
Copyright \(co 2005-8 Simon Howard.
.br
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

25
man/environ.man Normal file
View file

@ -0,0 +1,25 @@
.TP
\fBDOOMWADDIR\fR, \fBDOOMWADPATH\fR
These environment variables provide paths to search for Doom .WAD files when
looking for a game IWAD file or a PWAD file specified with the `-file' option.
\fBDOOMWADDIR\fR specifies a single path in which to look for WAD files,
while \fBDOOMWWADPATH\fR specifies a colon-separated list of paths to search.
.TP
\fBPCSOUND_DRIVER\fR
When running in PC speaker sound effect mode, this environment variable
specifies a PC speaker driver to use for sound effect playback. Valid
options are "Linux" for the Linux console mode driver, "BSD" for the
NetBSD/OpenBSD PC speaker driver, and "SDL" for SDL-based emulated PC speaker
playback (using the digital output).
.TP
\fBOPL_DRIVER\fR
When using OPL MIDI playback, this environment variable specifies an
OPL backend driver to use. Valid options are "SDL" for an SDL-based
software emulated OPL chip, "Linux" for the Linux hardware OPL driver,
and "OpenBSD" for the OpenBSD/NetBSD hardware OPL driver.
Generally speaking, a real hardware OPL chip sounds better than software
emulation; however, modern machines do not often include one. If
present, it may still require extra work to set up and elevated
security privileges to access.

44
man/heretic.template Normal file
View file

@ -0,0 +1,44 @@
.TH chocolate\-heretic 6
.SH NAME
chocolate\-heretic \- historically compatible heretic engine
.SH SYNOPSIS
.B chocolate\-heretic
[\fIOPTIONS\fR]
.SH DESCRIPTION
.PP
Chocolate Heretic is a port of the game Heretic that aims to behave
as similar to the original DOS version of Heretic as possible.
.br
@content
.SH ENVIRONMENT
This section describes environment variables that control Chocolate Heretic's
behavior.
@include environ.man
.SH FILES
.TP
\fB$HOME/.chocolate-doom/heretic.cfg\fR
The main configuration file for Chocolate Heretic. See \fBheretic.cfg\fR(5).
.TP
\fB$HOME/.chocolate-doom/chocolate-heretic.cfg\fR
Extra configuration values that are specific to Chocolate Heretic and not
present in Vanilla Heretic. See \fBchocolate-heretic.cfg\fR(5).
.SH SEE ALSO
\fBchocolate-doom\fR(6),
\fBchocolate-hexen\fR(6),
\fBchocolate-server\fR(6),
\fBchocolate-setup\fR(6)
.SH AUTHOR
Chocolate Heretic is part of the Chocolate Doom project, written and
maintained by Simon Howard. It is based on the Heretic source code,
released by Raven Software.
.SH COPYRIGHT
Copyright \(co id Software Inc.
Copyright \(co Raven Software Inc.
Copyright \(co 2005-2013 Simon Howard.
.br
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

44
man/hexen.template Normal file
View file

@ -0,0 +1,44 @@
.TH chocolate\-hexen 6
.SH NAME
chocolate\-hexen \- historically compatible hexen engine
.SH SYNOPSIS
.B chocolate\-hexen
[\fIOPTIONS\fR]
.SH DESCRIPTION
.PP
Chocolate Hexen is a port of the game Hexen that aims to behave
as similar to the original DOS version of Hexen as possible.
.br
@content
.SH ENVIRONMENT
This section describes environment variables that control Chocolate Hexen's
behavior.
@include environ.man
.SH FILES
.TP
\fB$HOME/.chocolate-doom/hexen.cfg\fR
The main configuration file for Chocolate Hexen. See \fBhexen.cfg\fR(5).
.TP
\fB$HOME/.chocolate-doom/chocolate-hexen.cfg\fR
Extra configuration values that are specific to Chocolate Hexen and not
present in Vanilla Hexen. See \fBchocolate-hexen.cfg\fR(5).
.SH SEE ALSO
\fBchocolate-doom\fR(6),
\fBchocolate-heretic\fR(6),
\fBchocolate-server\fR(6),
\fBchocolate-setup\fR(6)
.SH AUTHOR
Chocolate Hexen is part of the Chocolate Doom project, written and
maintained by Simon Howard. It is based on the Hexen source code,
released by Raven Software.
.SH COPYRIGHT
Copyright \(co id Software Inc.
Copyright \(co Raven Software Inc.
Copyright \(co 2005-2013 Simon Howard.
.br
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

View file

@ -1,63 +0,0 @@
.TH chocolate\-doom 6
.SH NAME
chocolate\-doom \- historically compatible doom engine
.SH SYNOPSIS
.B chocolate\-doom
[\fIOPTIONS\fR]
.SH DESCRIPTION
.PP
Chocolate Doom is a modern doom engine designed to behave
as similar to the original doom game as is possible.
.br
@content
.SH ENVIRONMENT
This section describes environment variables that control Chocolate Doom's
behavior.
.TP
\fBDOOMWADDIR\fR, \fBDOOMWADPATH\fR
These environment variables provide paths to search for Doom .WAD files when
looking for a game IWAD file or a PWAD file specified with the `-file' option.
\fBDOOMWADDIR\fR specifies a single path in which to look for WAD files,
while \fBDOOMWWADPATH\fR specifies a colon-separated list of paths to search.
.TP
\fBPCSOUND_DRIVER\fR
When running in PC speaker sound effect mode, this environment variable
specifies a PC speaker driver to use for sound effect playback. Valid
options are "Linux" for the Linux console mode driver, "BSD" for the
NetBSD/OpenBSD PC speaker driver, and "SDL" for SDL-based emulated PC speaker
playback (using the digital output).
.TP
\fBOPL_DRIVER\fR
When using OPL MIDI playback, this environment variable specifies an
OPL backend driver to use. Valid options are "SDL" for an SDL-based
software emulated OPL chip, "Linux" for the Linux hardware OPL driver,
and "OpenBSD" for the OpenBSD/NetBSD hardware OPL driver.
Generally speaking, a real hardware OPL chip sounds better than software
emulation; however, modern machines do not often include one. If
present, it may still require extra work to set up and elevated
security privileges to access.
.SH FILES
.TP
\fB$HOME/.chocolate-doom/default.cfg\fR
The main configuration file for Chocolate Doom. See \fBdefault.cfg\fR(5).
.TP
\fB$HOME/.chocolate-doom/chocolate-doom.cfg\fR
Extra configuration values that are specific to Chocolate Doom and not
present in Vanilla Doom. See \fBchocolate-doom.cfg\fR(5).
.SH SEE ALSO
\fBchocolate-server\fR(6),
\fBchocolate-setup\fR(6)
.SH AUTHOR
Chocolate Doom is written and maintained by Simon Howard. It is based on
the LinuxDoom source code, released by Id Software.
.SH COPYRIGHT
Copyright \(co id Software Inc.
Copyright \(co 2005-8 Simon Howard.
.br
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

83
man/strife.template Normal file
View file

@ -0,0 +1,83 @@
.TH chocolate\-strife 6
.SH NAME
chocolate\-strife \- historically compatible strife engine
.SH SYNOPSIS
.B chocolate\-strife
[\fIOPTIONS\fR]
.SH DESCRIPTION
.PP
Chocolate Strife is an accurate and complete recreation of Rogue
Entertainment's "Strife: Quest for the Sigil". It was created through
more than two years of reverse engineering effort with the blessings
of the original programmers of the game (see the section HISTORY below).
@content
.SH ENVIRONMENT
This section describes environment variables that control Chocolate Strife's
behavior.
@include environ.man
.SH FILES
.TP
\fB$HOME/.chocolate-doom/strife.cfg\fR
The main configuration file for Chocolate Strife. See \fBstrife.cfg\fR(5).
.TP
\fB$HOME/.chocolate-doom/chocolate-strife.cfg\fR
Extra configuration values that are specific to Chocolate Strife and not
present in Vanilla Strife. See \fBchocolate-strife.cfg\fR(5).
.SH SEE ALSO
\fBchocolate-strife\fR(6),
\fBchocolate-server\fR(6),
\fBchocolate-setup\fR(6)
.SH HISTORY
The source code for Strife was lost, which means, unlike the code for all the
other commercial DOOM-engine games, it cannot be released. The only access we
have to the code is the binary executable file. Reverse engineering tools
were employed to disassemble and decompile the executables, which were cross-
referenced against the Linux DOOM and DOS Heretic sources and painstakingly
combed over multiple times, instruction-by-instruction, to ensure that the
resulting Chocolate-Doom-based executable is as close as possible to the
original.
.SH LEGALITY
Reverse engineering is a protected activity so long as the original code is
not used directly in the product. Due to the vast amount of information lost
through the process of compilation, and the need to refactor large portions
of code in order to eliminate non-portable idioms or to adapt them properly to
Chocolate Doom's framework, the resulting code behaves the same, but is not
the *same* code.
In addition, James Monroe and John Carmack have both stated that they have no
objections to the project. Because they are the original authors of the code,
and neither Rogue nor their publisher, Velocity, Inc., exist any longer as
legal entities, this is effectively legal permission.
.SH BUGS
Chocolate Strife is almost, but not entirely perfect, in recreating the
behavior of Vanilla Strife. Help us by reporting any discrepancies you
might notice between this executable and the vanilla DOS program.
However, do *not* report any glitch that you can replicate in the vanilla EXE
as a bug. The point of Chocolate Strife, like Chocolate Doom before it, is to
be as bug-compatible with the original game as possible. Also be aware that
some glitches are impossible to compatibly recreate, and wherever this is the
case, Chocolate Strife has erred on the side of not crashing the program,
for example by initializing pointers to NULL rather than using them without
setting a value first.
.SH AUTHORS
Chocolate Strife is part of the Chocolate Doom project. It was reverse
engineered from the DOS versions of Strife by James Haley and Samuel
Villarreal.
Chocolate Doom was written and maintained by Simon Howard, and is based
on the LinuxDoom source code released by Id Software.
.SH COPYRIGHT
Copyright \(co id Software Inc.
Copyright \(co 2005-2013 Simon Howard, James Haley, Samuel Villarreal.
.br
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.