This is an automated email from the git hooks/post-receive script. detiste-guest pushed a commit to branch master in repository game-data-packager.
commit 76d26194fb44f410cee826539c57ccd08c241e4d Author: Alexandre Detiste <[email protected]> Date: Sun Oct 11 09:49:44 2015 +0200 add stubby multi-CD support (#800590) --- data/brokensword1.yaml | 1 + data/feeble-files.yaml | 1 + data/grimfandango.yaml | 1 + data/zork-inquisitor.yaml | 1 + game_data_packager/__init__.py | 36 ++++++++++++++++++++++++++++++++---- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/data/brokensword1.yaml b/data/brokensword1.yaml index 7087d2c..2bee258 100644 --- a/data/brokensword1.yaml +++ b/data/brokensword1.yaml @@ -4,6 +4,7 @@ copyright: © 1996 Revolution Software plugin: scummvm_common gameid: sword1 wiki: Broken_Sword_1 +disks: 2 # http://wiki.scummvm.org/index.php/Datafiles#Broken_Sword:_The_Shadow_of_the_Templars diff --git a/data/feeble-files.yaml b/data/feeble-files.yaml index 4ac0719..51f51e3 100644 --- a/data/feeble-files.yaml +++ b/data/feeble-files.yaml @@ -4,6 +4,7 @@ copyright: © 1997 Adventure Soft plugin: scummvm_common wiki: Feeble_Files gameid: feeble +disks: 4 help_text: | The videos from the original English version are not yet supported; diff --git a/data/grimfandango.yaml b/data/grimfandango.yaml index 44e506f..a661fcc 100644 --- a/data/grimfandango.yaml +++ b/data/grimfandango.yaml @@ -4,6 +4,7 @@ copyright: © 1998 LucasArts Entertainment Company LLC plugin: residualvm_common gameid: grim wiki: Grim_Fandango +disks: 2 # xz compression reduces the full game from 1.3GB to 1.1GB, or the demo # from 71MB to 51MB... but it takes 10 minutes to do it (on a Core i7), diff --git a/data/zork-inquisitor.yaml b/data/zork-inquisitor.yaml index e6045db..43b82a1 100644 --- a/data/zork-inquisitor.yaml +++ b/data/zork-inquisitor.yaml @@ -4,6 +4,7 @@ franchise: Zork copyright: © 1997 Activision plugin: scummvm_common wiki: "Zork:_Grand_Inquisitor" +disks: 2 help_text: | For all versions: you need to first install the package fonts-liberation. diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py index 57f5287..70c6923 100644 --- a/game_data_packager/__init__.py +++ b/game_data_packager/__init__.py @@ -191,6 +191,10 @@ class GameDataPackage(object): # CD audio stuff from YAML self.rip_cd = {} + # possible override for disks: tag at top level + # e.g.: Feeble Files had 2-CD releases too + self.disks = None + # Debian architecture(s) self.architecture = 'all' @@ -326,6 +330,9 @@ class GameData(object): # Subset of packages.values() with nonempty rip_cd self.rip_cd_packages = set() + # Number of CD the full game was sold on + self.disks = None + self.help_text = '' # Extra directories where we might find game files @@ -354,7 +361,7 @@ class GameData(object): # list: arbitrary options (e.g. -z9 -Zgz -Sfixed) self.compress_deb = True - for k in ('longname', 'copyright', 'compress_deb', 'help_text', + for k in ('longname', 'copyright', 'compress_deb', 'help_text', 'disks', 'engine', 'genre', 'missing_langs', 'franchise', 'wiki', 'wikibase', 'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wikipedia'): if k in self.data: @@ -459,19 +466,36 @@ class GameData(object): dotemu_pp, dotemu_id) def edit_help_text(self): - if len(self.packages) > 1: + if len(self.packages) > 1 or self.disks: prepend = '\npackages possible for this game:\n' help = [] + has_multi_cd = False for package in self.packages.values(): + disks = package.disks or self.disks or 1 + longname = package.longname or self.longname + if disks > 1: + has_multi_cd = True + longname += ' (%dCD)' % disks game_type = { 'demo' : 1, 'full' : 2, 'expansion' : 3}.get(package.type) help.append({ 'type' : game_type, 'year' : package.copyright or self.copyright, 'name' : package.name, - 'longname': package.longname or self.longname}) + 'longname': longname}) for h in sorted(help, key=lambda k: (k['type'], k['year'][2:6], k['name'])): prepend += " %-40s %s\n" % (h['name'],h['longname']) + if has_multi_cd and self.shortname != 'zork-inquisitor': + prepend += "\nWARNING: for multi-cd games, you'll first need to ensure that all the data\n" + prepend += " is accessible simultaneously, e.g. copy data from CD1 to CD3 in /tmp/cd{1-3}\n" + prepend += " and let CD4 *mounted* in the drive.\n\n" + prepend += " It's important to first mkdir '/tmp/cd1 /tmp/cd2 /tmp/cd3' because for some\n" + prepend += " games there are different files accross the disks with the same name that\n" + prepend += " would be overwriten.\n\n" + prepend += " If /tmp/ is on a tmpfs and you don't have something like 16GB of RAM,\n" + prepend += " you'll likely need to store the files somewhere else.\n\n" + prepend += " The game can then be packaged this way:\n" + prepend += " $ game-data-packager {game} /tmp/cd1 /tmp/cd2 /tmp/cd3 /media/cdrom0\n\n" self.help_text = prepend + '\n' + self.help_text if self.missing_langs: @@ -546,7 +570,7 @@ class GameData(object): for k in ('expansion_for', 'expansion_for_ext', 'longname', 'symlinks', 'install_to', 'install_to_docdir', 'install_contents_of', 'debian', 'description', 'rip_cd', 'architecture', 'aliases', 'better_version', 'langs', - 'copyright', 'engine', 'lang', 'component', 'section', + 'copyright', 'engine', 'lang', 'component', 'section', 'disks', 'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki'): if k in d: setattr(package, k, d[k]) @@ -562,6 +586,8 @@ class GameData(object): "install_to %s is extraneous" % package.name if 'demo_for' in d: + if package.disks is None: + package.disks = 1 if type(d['demo_for']) is str: package.demo_for.add(d['demo_for']) else: @@ -576,6 +602,8 @@ class GameData(object): package.longname = self.longname + ' (%s)' % package.lang if 'expansion_for' in d: + if package.disks is None: + package.disks = 1 assert package.name != d['expansion_for'], \ "a game can't be an expansion for itself" if 'demo_for' in d: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

