Bug#869630: game-data-packager: Please add support for Heroes of Might and Magic III

Simon McVittie smcv at debian.org
Tue Jul 25 07:01:45 UTC 2017


Control: tags 869630 + moreinfo

On Tue, 25 Jul 2017 at 08:23:22 +0200, Johannes Schauer wrote:
> vcmi already comes with a script which extracts the required
> (proprietary) assets from the official game CDs, GOG or the installation
> directory.  It's called vcmibuilder and currently ships with the vcmi
> package:
> 
> http://sources.debian.net/src/vcmi/0.99%2Bdfsg-2/vcmibuilder/
> 
> So since there is already code that's doing the right thing I suppose it
> would be easy to add this to g-d-p?

It should be relatively easy for *someone who owns HoMM3* to add this,
but there isn't enough information in that script for people who don't
own that game to do it. game-data-packager is careful to only package
known-good data files, so it needs the sizes and hashes of those files.

Please download core.zip, unpack the "$gog_file" to a temporary
directory (let's say "$gog_dir"), and unpack "$cd1_dir"/_setup/data1.cab
to another temporary directory (let's say "$data1_dir"). Move your
"$dest_dir" out of the way temporarily, re-run vcmibuilder to get a
clean copy of that directory, then run

    game-data-package make-template "$dest_dir" core.zip
    game-data-package make-template "$gog_file" "$gog_dir"
    game-data-package make-template "$cd1_dir/_setup/data1.cab" "$data1_dir"

to capture sizes and hashes for the known-good files, and send the
output to this bug.

If there are files in "$dest_dir" that are edited at runtime, we will
also need to know which ones (compare the clean "$dest_dir" with the one
you moved out of the way). If there are files that you know are not
strictly required (the music?) we would also like to know about those.

If there are several alternative versions of HoMM3, we will need similar
information for each one. If you have the GOG version but not the CD
version, or vice versa, then different people can submit the two sets
of sizes and hashes.

I see that script converts MP3 audio to Ogg Vorbis. Presumably the MP3s
are large enough that we do not want to insist that users keep the
original MP3s around in addition to the Ogg Vorbis. One of the things
game-data-packager supports is repackaging existing installed data files
(to refresh the packaging or apply patches), but for that to work,
presumably we would need some way for g-d-p to discover that the Ogg
Vorbis files are the ones it wants. We currently have this for audio
tracks ripped from CD but not for file-based audio, so some new code
might be needed for that.

If it is possible for vcmi to be adapted so that it can decode MP3
directly, that seems like it would be a better solution - we allow MP3
decoders in Debian now, and transcoding involves quality loss.

Finally, vcmibuilder puts the data files in ~/.local/share/vcmi, but
game-data-packager produces .deb files which need to install in /usr. If
vcmi follows the XDG Base Directory specification correctly, it should
also recognise these files in /usr/share/vcmi. Does it? (If not, you will
need to wrap a script around vcmi that symlinks them into
~/.local/share/vcmi during startup - there is a suitable script in
game-data-packager-runtime, which reads YAML files to determine what to
do. We use this for Unreal Tournament, for example.)

    S



More information about the Pkg-games-devel mailing list