Skip to content

Commit 92594e0

Browse files
Add --ouya-icon command line argument to build.py
1 parent 33f10f2 commit 92594e0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/build.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def make_package(args):
197197
url_scheme = 'kivy'
198198
default_icon = 'templates/kivy-icon.png'
199199
default_presplash = 'templates/kivy-presplash.jpg'
200+
default_ouya_icon = 'templates/kivy-ouya-icon.png'
200201
# Figure out the version code, if necessary.
201202
if not args.numeric_version:
202203
for i in args.version.split('.'):
@@ -295,6 +296,9 @@ def make_package(args):
295296
# Copy over the icon and presplash files.
296297
shutil.copy(args.icon or default_icon, 'res/drawable/icon.png')
297298
shutil.copy(args.presplash or default_presplash, 'res/drawable/presplash.jpg')
299+
if not os.path.isdir('res/drawable-xhdpi'):
300+
os.mkdir('res/drawable-xhdpi')
301+
shutil.copy(args.ouya_icon or default_ouya_icon, 'res/drawable-xhdpi/ouya_icon.png')
298302

299303
# Build.
300304
try:
@@ -329,6 +333,7 @@ def make_package(args):
329333
ap.add_argument('--ignore-path', dest='ignore_path', action='append', help='Ignore path when building the app')
330334
ap.add_argument('--icon', dest='icon', help='A png file to use as the icon for the application.')
331335
ap.add_argument('--presplash', dest='presplash', help='A jpeg file to use as a screen while the application is loading.')
336+
ap.add_argument('--ouya-icon', dest='ouya_icon', help='A png file to use as the icon for the application if it is installed on an OUYA console.')
332337
ap.add_argument('--install-location', dest='install_location', default='auto', help='The default install location. Should be "auto", "preferExternal" or "internalOnly".')
333338
ap.add_argument('--compile-pyo', dest='compile_pyo', action='store_true', help='Compile all .py files to .pyo, and only distribute the compiled bytecode.')
334339
ap.add_argument('--intent-filters', dest='intent_filters', help='Add intent-filters xml rules to AndroidManifest.xml')

src/templates/kivy-ouya-icon.png

156 KB
Loading

0 commit comments

Comments
 (0)