Commit graph

97 commits

Author SHA1 Message Date
Mike Swanson
96e0123cd2 bash-completion: complete list of valid -gameversion parameters 2018-01-27 04:52:05 -08:00
Mike Swanson
da88012088 bash-completion: Build from actual shell script templates.
At some point, the Makefile was inerrantly modified so that it
generated manpage sources instead of shell script, making completions
very screwed up.
2018-01-27 04:49:08 -08:00
Jonathan Dowland
497514e39d better choice of substvar for chocolate-server.6 2018-01-15 19:18:52 +00:00
Jonathan Dowland
433230aa40 man: Fix simplecpp -D arguments 2018-01-15 19:10:52 +00:00
Jonathan Dowland
ccfbd4a046 bash-completion: run docgen with -z argument 2018-01-15 19:10:16 +00:00
Jonathan Dowland
69b8043958 fix typo @PACKAGE_SHORTNAME + '@' 2018-01-15 19:01:53 +00:00
Simon Howard
40811c8eaa INSTALL: Update patch file links.
The ftp.idsoftware.com server died several months back. Some context:
<https://www.doomworld.com/forum/topic/96999-rip-ftpidsoftwarecom/>

Instead, point at the mirrors found in the idgames repository, using
the gamers.org version since this is the canonical copy everything else
mirrors from. Unfortunately it's not possible to point at the Doomworld
idgames interface since the patches don't appear in the database there.
2018-01-14 23:02:52 -05:00
Jonathan Dowland
45880bd205 Implement suggestions from Fabian. Thanks! 2018-01-09 17:19:49 +00:00
Jonathan Dowland
d0aca32411 don't build chocolate-setup.6 anymore; more subs
Build chocolate-game-setup.6 directly instead of building
chocolate-setup.6 and copying it to for each game. Apply
substitutions to the template text to replace Chocolate,
chocolate etc., as well as substituting the proper default
cfg equivalent (e.g. heretic.cfg) for each game.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
32ccfe015a expand docgen/default.cfg.template substitutions
Move to a "substs" hash in docgen which contains pairs of strings
to substitute. Populate @GAME@, @GAME_UPPER@ and @CFGFILE@ based
on the game supplied via -g.

Make the corresponding substitutions in default.cfg.template. Now
all of {default,heretic,hexen,strife}.cfg.5 are correct for the
respective game.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
f515c88a96 install.template: move definitions to Makefile
Define and pass LONG_EXE_NAME and LONG_GAME_NAME within the
controlling Makefile when generating INSTALL.*, instead of
deriving their values within the template depending on whether
DOOM/HERETIC/HEXEN/STRIFE are defined.

This means we can incorporate the values from @PROGRAM_PREFIX@
and @PACKAGE_SHORTNAME@, instead of hardcoding chocolate- and
Chocolate, respectively.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
c1f553b92a further manpage substitutions and fixes
Convert chocolate-setup.6 into a template file and generate outputs
based on @PROGRAM_PREFIX@.

Add @PACKAGE_SHORTNAME@ to the list of parameters handed to docgen
and make appropriate substitutions in the manpage templates.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
e0b8a7e0a9 overhaul manpages, add parameters
This is in order to better support derivative engines.

Rework the manpages to be parameterized with @PROGRAM_PREFIX@ and
@PACKAGE_NAME@. Alter the `docgen` generator to substitute those
parameters. Supply those parameters via the autofoo Makefile.

Adjust the fixed path chocolate-server.6 to be generated from
server.template, similar to doom.template -> chocolate-doom.6.

Further work is required, not least renaming chocolate-setup.6,
but several further parameterizations.
2018-01-09 17:19:49 +00:00
Fabian Greffrath
a28f58da05 Merge branch 'master' into sdl2-branch 2017-04-24 14:46:31 +02:00
Mike Swanson
7f4e1ae124 bash-completion: Use autoconf substitutions for the chocolate name
Introduce a new PROGRAM_SPREFIX variable in configure.ac, which is
basically identical to PROGRAM_PREFIX but without the trailing hyphen.
PROGRAM_PREFIX was also redefined so that it bases its name from
PACKAGE_SHORTNAME, reducing the number of hardcoded chocolates in the
source.
2017-03-05 18:43:22 -08:00
Simon Howard
9401e974b2 docgen: Fix script.
Apparently caused by previous botched merge commit.
2017-01-30 23:00:41 -05:00
Simon Howard
c5af517b3b Merge remote-tracking branch 'origin/master' into sdl2-branch 2017-01-30 22:53:36 -05:00
Mike Swanson
765f864d84 man: make scripts Python2 compatible again.
My last commits broke functionality for Python2, but it's relatively
simple to fix.

open() becomes io.open() -- it effectively does nothing for Python3,
but for Python2 it uses a backported version of the open() call.

Python2 uses bytes and strings interchangably, but I needed to use
stdout.sys.buffer for writing arbitrary bytes data to stdout.
Conditionally call the appropriate stream depending on Python version.
2017-01-21 07:13:08 -08:00
Mike Swanson
d0c36735aa man: Make sure to add new lines in the last commit. 2017-01-19 13:03:00 -08:00
Mike Swanson
bf3747bfdd man/{docgen,simplecpp}: Force UTF-8 reading and writing regardless of locale
When encountering non-ASCII UTF-8 characters in source files (as
exists in Crispy Doom), the Python scripts would fail to work with
a UnicodeDecodeError if the locale was not a UTF-8 one (eg, the C
locale as encountered in chroot build environments).

Let's just use UTF-8 on both open() and replace print() statements with
sys.stdout.buffer.write().  This guarantees that all input and output is
UTF-8 regardless.
2017-01-19 12:48:35 -08:00
Simon Howard
166e2bca93 Merge remote-tracking branch 'origin/master' into sdl2-branch 2017-01-14 21:55:08 +00:00
Simon Howard
0d083b8565 INSTALL: Fix .lha filename extension.
LHA is the name of the tool, and .lzh is the extension used for files
of this format.
2017-01-14 21:48:45 +00:00
Zvonimir Bužanić
85b0d244c8 Update year 2016-10-20 23:03:54 +02:00
Simon Howard
490def9eb3 man: Fix build to allow out-of-tree builds.
For out-of-tree builds we must specify the full paths to source files
using $(srcdir). Do this for all the template files and clean up some
of the confusing and inconsistent usage of source dir paths already in
place.
2016-07-18 00:07:43 -04:00
Simon Howard
aca532db25 docgen: Read included templates from relative path.
When interpreting a template file that uses the @include statement, we
must read the included file from a path relative to the first template
file, rather than relative to the working directory when invoking the
script. This will allow us to do out-of-tree builds.
2016-07-18 00:02:58 -04:00
Mike Swanson
1c5973e4af Use SDL_GetPrefPath for the configuration directory.
The function requires two arguments: an organization name and an
application name.  Let’s set the organization name to an empty string.
This will not cause issues on POSIX-compliant systems, and hopefully
not on other kinds of systems too.  This just avoids an extra
directory to the configuration path.

This should pull Chocolate Doom into compliance with the XDG Base
Directory Specification, resolving #597.
2016-07-15 01:28:44 -07:00
Jonathan Dowland
ec90c9fa06 INSTALL.template: remove spare "compatible"
Edit via GitHub UI
2016-06-27 06:40:06 +01:00
Simon Howard
29a06c4e4d INSTALL: Add comment about using FreeDM.
Now that this is usable it's good to include this in the setup
instructions.
2016-06-26 18:54:05 -04:00
Simon Howard
d36dafa3fc Merge remote-tracking branch 'origin/master' into sdl2-branch 2016-06-04 19:36:32 -04:00
Jonathan Dowland
6cd7d53a27 Update INSTALL.template
Add freedm.wad to the list of IWADs that can be used for chocolate-doom.

Closes: #666.
2016-03-24 21:26:12 +00:00
Simon Howard
826d2a09fa Update Doomworld URLs.
Doomworld is now available over https: so there's no reason to link
to unencrypted http: URLs (which are just redirect anyway). Also the
idgames interface URLs have changed.
2016-02-28 14:30:31 -05:00
Simon Howard
6ad2f405b9 Refer to SDL2 versions of libraries in docs.
Helps to be accurate.
2016-02-28 14:26:25 -05:00
Rodrigo Rebello
86cb29b693 Avoid use of '$<' and '$^' in Makefile rules
Versions of make other than GNU make don't support automatic variables
in explicit rules, only in suffix (implicit) ones.

This fixes the build on FreeBSD (and possibly other BSD variants), which
was failing with errors like:

cp  chocolate-doom-setup
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... target_directory
*** Error code 64

Stop.
2015-12-30 11:36:28 -02:00
Fabian Greffrath
cb4848b8da bash-completion: allow multiple files with the same extensions
passed to the same switch, e.g. -file a.wad b.wad.

Also, fix the -setmen typo.
2015-10-30 08:53:37 +01:00
Fabian Greffrath
278cd34b3e bash-completion: fix syntax error
_filedir expects a regex as an argument, not a lose list of file extensions
2015-10-30 08:25:21 +01:00
Mike Swanson
c3e5879502 bash-completion: Detect the appropriate directory for installation 2015-10-27 09:30:24 -07:00
Fabian Greffrath
ad37a8ff33 Bash-Completion: First attempt at programatically creating the parameters list 2015-10-26 18:44:30 +01:00
Fabian Greffrath
d9738a5372 man: add a bash-completion scriptlet
Only one for all four games and only static for the time being.

In the long term, we should modify the docgen script to emit the
possible valid command line parameters and their additional options
and thus create separate bash-completion scriptlets for all four
games.
2015-10-18 11:48:57 +02:00
Simon Howard
7d51bb2262 man: Add documentation for IWAD search paths.
We now search in a bunch of different directories in order to find
IWAD files to use to play with, and the logic is a bit complicated.
Add some hopefully friendly documentation to explain where people
can put their IWAD files to play with.

Part of #597.
2015-08-23 16:12:54 -04:00
Fabian Greffrath
4ee95eb27f man: fix the very last hyphen used as minus sign 2015-05-01 13:54:36 +02:00
Fabian Greffrath
d5fe304162 man: fix one last hyphen used as minus sign 2015-05-01 13:50:45 +02:00
Mike Swanson
ad027ef6db man: Use \- to denote dashes. Fixes #512 2015-03-25 16:06:11 -07:00
Fabian Greffrath
80bf45c902 man: fix typo in manual generation
There was a slash separator missing

Thanks sneakernets for the bug report!

Fixes #498
2014-12-29 14:25:31 +01:00
Dave Murphy
d66659c606 allow building in subdirectory or outside source directory 2014-12-26 15:40:46 +00:00
Mike Swanson
c4332b7691 Ignore some more autogenerated files 2014-06-12 18:13:37 -07:00
Fabian Greffrath
9fcbb2be4e Follow up for "fix man/Makefile for forks" 2014-04-22 13:09:00 +02:00
Simon Howard
a80aa343a5 Simplify INSTALL.template music notes.
Now that there is more extensive documentation in README.Music, remove
some of the details from the INSTALL files and just include a
reference to it.
2014-04-05 15:08:59 -04:00
Fabian Greffrath
60309a7b15 Fix man/Makefile for forks
The chocolate-{server,serup}.6 manpages are static and not auto-generated, so they do not get renamed when the @PROGRAM_PREFIX@ variable changes. This breaks the Make rules for forks, which will have to create their own server and setup manpages anyway. This reverts part of commit 08ad5553 by myself which introduced the issue.

Fixes https://github.com/fabiangreffrath/crispy-doom/issues/2
2014-04-05 14:42:05 +02:00
Fabian Greffrath
b8dfaffcb5 Revert the more controversial changes in my previous pull request.
Add back  to binaries that are built and installed as _SCRIPTS targets.
Copy instead of symbolic linking, the files are needed as binary copies anyway to allow for separate packaging of the game engines.
2014-02-03 06:34:27 +01:00
Fabian Greffrath
08ad5553fd Some improvements to the build system
1) Instead of copying chocolate-setup into chocolate-{doom,heretic,hexen,strife}-setup,
   respectively, check in configure for symbolic linking and use that if available
   (falls back to "cp -pR" if not).
2) Add $(icons_DATA) to CLEANFILES so they get removed in clean phase; they are
   generated from doom-png and setup.png, respectively.
3) Consistently use @PROGRAM_PREFIX@ instead of the hard-coded "chocolate-" in
   the rules for the man pages.
4) Generate one man page for each setup program by symbolic linking of
   chocolate-setup.6 (see 1), add them to the list of installed man pages and
   to CLEANFILES.
5) Remove the redundant $(EXEEXT) suffix from the setup binaries (they were missing
   for execgames_PROGRAMS, anyway)
2014-01-20 11:00:53 +01:00