[game-data-packager] 02/02: z_code: merge in last bits from z_code.desktop.in
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Sun Oct 18 06:48:45 UTC 2015
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 7cc4784f3b65bc2931ac249709ec4d732d370a85
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sun Oct 18 08:48:11 2015 +0200
z_code: merge in last bits from z_code.desktop.in
---
data/z_code.desktop.in | 9 ---------
game_data_packager/games/z_code.py | 9 ++++++---
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/data/z_code.desktop.in b/data/z_code.desktop.in
deleted file mode 100644
index c6da56c..0000000
--- a/data/z_code.desktop.in
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=LONG
-GenericName=Adventure Game
-TryExec=frotz
-Exec=frotz /PATH
-Icon=utilities-terminal
-Terminal=true
-Type=Application
-Categories=Game
diff --git a/game_data_packager/games/z_code.py b/game_data_packager/games/z_code.py
index 4a6556d..ca1458b 100644
--- a/game_data_packager/games/z_code.py
+++ b/game_data_packager/games/z_code.py
@@ -48,12 +48,13 @@ class ZCodeTask(PackagingTask):
with TemporaryUmask(0o022):
appdir = os.path.join(destdir, 'usr/share/applications')
mkdir_p(appdir)
- from_ = os.path.join(DATADIR, 'z_code.desktop.in')
desktop = configparser.RawConfigParser()
desktop.optionxform = lambda option: option
- desktop.read(from_, encoding='utf-8')
-
+ desktop['Desktop Entry'] = {}
entry = desktop['Desktop Entry']
+ entry['Type'] = 'Application'
+ entry['Categories'] = 'Game'
+ entry['GenericName'] = self.game.genre + ' Game'
entry['Name'] = package.longname or self.game.longname
if (PACKAGE_CACHE.is_installed('frotz') and
not PACKAGE_CACHE.is_installed('gargoyle-free')):
@@ -69,6 +70,8 @@ class ZCodeTask(PackagingTask):
pixdir = os.path.join(destdir, 'usr/share/pixmaps')
if os.path.exists(os.path.join(pixdir, '%s.png' % self.game.shortname)):
entry['Icon'] = self.game.shortname
+ else:
+ entry['Icon'] = 'utilities-terminal'
if package.aliases:
entry['Keywords'] = ';'.join(package.aliases)
--
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