[game-data-packager] 10/12: Add support for innoextract, as used for gog.com's Theme Hospital
Simon McVittie
smcv at debian.org
Sat Jan 24 17:56:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 3cfca5b31000666af8254cb52a173b36463f3cb9
Author: Simon McVittie <smcv at debian.org>
Date: Sat Jan 24 17:49:45 2015 +0000
Add support for innoextract, as used for gog.com's Theme Hospital
---
debian/control | 2 ++
game_data_packager/__init__.py | 11 +++++++++++
2 files changed, 13 insertions(+)
diff --git a/debian/control b/debian/control
index ba09304..0a05208 100644
--- a/debian/control
+++ b/debian/control
@@ -38,6 +38,8 @@ Suggests:
dynamite (>= 0.1.1-2),
# for wolf3d v1.2
unzip,
+# for Theme Hospital and probably other gog.com games
+ innoextract,
Architecture: all
Multi-Arch: foreign
Description: Installer for game data files
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 8b455d8..23ee8e7 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1400,6 +1400,17 @@ class GameData(object):
tmp = os.path.join(tmpdir, f)
os.utime(tmp, (orig_time, orig_time))
self.consider_file(tmp, True)
+ elif fmt == 'innoextract':
+ to_unpack = provider.unpack.get('unpack', provider.provides)
+ tmpdir = os.path.join(self.get_workdir(), 'tmp',
+ provider_name + '.d')
+ mkdir_p(tmpdir)
+ subprocess.check_call(['innoextract', '--silent',
+ '--lowercase', '-T', 'local', '-d', '.',
+ os.path.abspath(found_name)], cwd=tmpdir)
+ # for at least Theme Hospital the files we want are
+ # actually in subdirectories, so we search recursively
+ self.consider_file_or_dir(tmpdir)
elif fmt == 'unzip':
to_unpack = provider.unpack.get('unpack', provider.provides)
logger.debug('Extracting %r from %s',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list