Python 2 is very near end-of-life, and Python3-compatible changes to a
few scripts introduced compatibility problems with 2.7 again. It went
unnoticed for me since my system symlinks "python" to "python3", but
it broke the build on systems where that symlink is still python2. At
this point in time, I feel it is worth targetting modern Python and
forgetting about 2.7.
Using the black code reformatter, pass it over all our Python files.
This allows for a consistent style across the code base.
Exception: lumps/dmxgus/stats.py, for readability.
A useful vanilla-compatible trick is that it's possible to include
sprites as patches inside texture definitions. It turns out that
both Final Doom IWADs added textures which do this, and Freedoom
inherits this as a result. We shouldn't include these sprites in the
pnames.txt that gets generated for inclusion in wadinfo.txt, since
they're already defined in wadinfo.txt under [sprites] and won't
be found under patches/ anyway.
This should help as a step towards resolving #485.
The tags are shorthand for the license of each file and avoid
copying the full license text into each one (and avoids having
to manually update the dates in each one...).
A couple of scripts were not Python 3 compatible. Update smtextgen to
use print() instead of bare print, and update the texture build script
to use the correct binary mode for writing binary files.
Now that #1 is fixed, we can be certain that all patches needed for
compatibility are definitely being included in the PNAMES lists. It
therefore isn't necessary to include every patch in the patches/
directory in every WAD.
Extend the build-textures script to generate a text file containing
the list of PNAMES, and include this from the main config file. That
way, each IWAD only gets the patches it explicitly needs.
Stop using deutex's built-in texture builder and generate our own
texture lumps. This is essential for compatibility reasons: the
entries in the texture/pnames lumps must match the order of those
in the original IWADs. Failure to match ordering means that some
well-known WADs (eg. DTWID) would not work with Freedoom.
This fixes#1, and also means that Freedoom can now be built in
parallel using make's '-j' option.