Add android.ouya.category and android.ouya.icon.filename options to buildozer.spec

This commit is contained in:
Bob the Hamster 2013-05-15 21:34:12 -07:00
parent 4ccdf18ec3
commit f9398e487c
2 changed files with 17 additions and 0 deletions

View file

@ -73,6 +73,13 @@ fullscreen = 1
# not yet merged features. # not yet merged features.
#android.branch = master #android.branch = master
# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME
# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png
# #
# iOS specific # iOS specific
# #

View file

@ -386,6 +386,16 @@ class TargetAndroid(Target):
if icon: if icon:
build_cmd += ' --icon {}'.format(join(self.buildozer.root_dir, icon)) build_cmd += ' --icon {}'.format(join(self.buildozer.root_dir, icon))
# OUYA Console support
ouya_category = config.getdefault('app', 'android.ouya.category', '').upper()
if ouya_category:
if ouya_category not in ('GAME', 'APP'):
raise SystemError('Invalid android.ouya.category: "{}" must be one of GAME or APP'.format(ouya_category))
# add icon
build_cmd += ' --ouya-category {}'.format(ouya_category)
ouya_icon = config.getdefault('app', 'android.ouya.icon.filename', '')
build_cmd += ' --ouya-icon {}'.format(join(self.buildozer.root_dir, ouya_icon))
# add orientation # add orientation
orientation = config.getdefault('app', 'orientation', 'landscape') orientation = config.getdefault('app', 'orientation', 'landscape')
if orientation == 'all': if orientation == 'all':