[game-data-packager] 01/01: doom_common.py: add support for SVG icons

Alexandre Detiste detiste-guest at moszumanska.debian.org
Thu Mar 5 14:13: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 f82ad87c99abac23d8aabb9c52a140ea87ab3e26
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Thu Mar 5 15:13:10 2015 +0100

    doom_common.py: add support for SVG icons
---
 Makefile                                | 5 +++++
 data/doom-common.desktop.in             | 2 +-
 game_data_packager/games/doom_common.py | 7 +++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2ee4018..bbe5bba 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,10 @@ default: $(DIRS)
 		o=out/$${x#data/}; \
 		convert $$x $${o%.xpm}.png || exit $$?; \
 	done
+	for x in data/*.svg; do \
+		o=out/$${x#data/}; \
+		gzip -c $$x > $${o%.svg}.svgz || exit $$?; \
+	done
 
 $(DIRS):
 	mkdir -p $@
@@ -47,6 +51,7 @@ clean:
 	rm -f ./out/*.preinst.in
 	rm -f ./out/*.README.Debian.in
 	rm -f ./out/*.png
+	rm -f ./out/*.svgz
 	rm -f ./out/*.yaml
 	rm -rf game_data_packager/__pycache__
 	for d in $(DIRS); do [ ! -d "$$d" ]  || rmdir "$$d"; done
diff --git a/data/doom-common.desktop.in b/data/doom-common.desktop.in
index 09e10db..518579f 100644
--- a/data/doom-common.desktop.in
+++ b/data/doom-common.desktop.in
@@ -3,7 +3,7 @@ Name=LONG
 GenericName=First Person Shooter Game
 TryExec=ENGINE
 Exec=ENGINE -iwad /usr/share/games/doom/GAME.wad
-Icon=GAME.png
+Icon=GAME
 Terminal=false
 Type=Application
 Categories=Game
diff --git a/game_data_packager/games/doom_common.py b/game_data_packager/games/doom_common.py
index 83548c1..cca5bf7 100644
--- a/game_data_packager/games/doom_common.py
+++ b/game_data_packager/games/doom_common.py
@@ -154,6 +154,13 @@ class DoomGameData(GameData):
             else:
                 raise AssertionError('doom-common.png should have existed')
 
+            from_ = os.path.splitext(from_)[0] + '.svgz'
+            if os.path.exists(from_):
+                svgdir = os.path.join(destdir, 'usr/share/icons/hicolor/scalable/apps')
+                mkdir_p(svgdir)
+                install_data(from_,
+                    os.path.join(svgdir, '%s.svgz' % wad_base))
+
             docdir = os.path.join(destdir, 'usr/share/doc/%s' % package.name)
             mkdir_p(docdir)
 

-- 
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