[game-data-packager] 07/12: unreal: generate a stub Manifest.ini
Simon McVittie
smcv at debian.org
Wed Jan 6 12:46:59 UTC 2016
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 d886c3e2c83bc004b24543ba4610de8b518b45e7
Author: Simon McVittie <smcv at debian.org>
Date: Wed Jan 6 11:48:48 2016 +0000
unreal: generate a stub Manifest.ini
---
game_data_packager/games/unreal.py | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/game_data_packager/games/unreal.py b/game_data_packager/games/unreal.py
index ab15a2e..aa26f8e 100644
--- a/game_data_packager/games/unreal.py
+++ b/game_data_packager/games/unreal.py
@@ -32,6 +32,41 @@ class UnrealTask(PackagingTask):
with TemporaryUmask(0o022):
self.__convert_logo(destdir)
+ if package.name in ('unreal-gold', 'unreal-classic'):
+ with TemporaryUmask(0o022):
+ self.__add_manifest(package, destdir)
+
+ def __add_manifest(self, package, destdir):
+ # A real Manifest.ini is much larger than this, but this is
+ # enough to identify the version.
+ install_to = package.install_to.lstrip('/')
+ mkdir_p(os.path.join(destdir, install_to, 'System'))
+
+ with open(os.path.join(destdir, install_to, 'System',
+ 'Manifest.ini'), 'w') as writer:
+ if package.name == 'unreal-gold':
+ groups = ('UnrealGold', 'Unreal Gold')
+ else:
+ groups = ('Unreal',)
+
+ lines = ['[Setup]', 'MasterProduct=' + groups[0]]
+
+ for g in groups:
+ lines.append('Group=' + g)
+
+ for g in groups:
+ lines.append('')
+ lines.append('[' + g + ']')
+ lines.append('Caption=' + package.longname)
+ lines.append('Version=227i')
+ lines.append('File=System\\UnrealLinux.ini')
+
+ lines += ['', '[RefCounts]',
+ 'File:System\\UnrealLinux.ini=%d' % len(groups), '']
+
+ for line in lines:
+ writer.write(line + '\r\n')
+
def __convert_logo(self, destdir):
skaarj_logo = os.path.join(destdir, self.packaging.ASSETS, 'unreal',
'skaarj_logo.jpg')
--
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