Bug#733750: support patching hexen2 game data
Simon McVittie
smcv at debian.org
Wed Jan 24 18:59:31 UTC 2018
On Wed, 24 Jan 2018 at 17:34:52 +0000, Jonathan Dowland wrote:
> However (and I'm not sure why I didn't file it this way in the first
> place) I think it would be nice if game-data-packager could handle the
> patching of hexen2 data where necessary.
Yes, it would be nice. We basically need something resembling
/usr/share/doc/uhexen2/examples/upgrade-111.sh in the declarative
g-d-p syntax in data/hexen2.yaml: that script already includes a
download URL and how to unpack the necessary files from what was
downloaded. /usr/share/doc/uhexen2/README.Debian has md5sums, although
I'd prefer to have the complete size/md5/sha1/sha256 set (someone who
owns v1.03 media will need to tell me those, because I only have the
Steam version, which comes pre-patched).
h2patch seems to use xdelta3 patches, so we could either teach g-d-p
to run h2patch with a "build-dependency" on uhexen2, or cut out the
middle-man by teaching g-d-p to run xdelta3. If you git grep for xdelta,
which I added for UT99, it should be reasonably obvious how to add
xdelta3 support to data/hexen2.yaml and game_data_packager/build.py.
It's encoded in the YAML as though the patch was the first part of
a multi-part archive, the unpatched file was the second part, and the
patched file is what we unpack from the archive - which is a little weird,
but seems better than new syntax for deltas. So the YAML syntax should
end up something like this:
data1pk0.xd3:
unpack:
format: xdelta3
other_parts:
- data1/pak0.pak?v1.03
provides:
- data1/pak0.pak
game-data-packager already knows how to download files and extract
various common archives, so invoking xdelta3 should be the only part
that will need new Python code.
(In the general case, we can't do anything about obsolete versions of
data files apart from issue warnings; but in the case where patches exist
and can be applied without executing arbitrary game-publisher-supplied
binaries, we can certainly do that.)
smcv
More information about the Pkg-games-devel
mailing list