From b202143b0d00447cd25c4f9559cdb30b4cc25bd7 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 22 Jan 2013 03:04:46 +0100 Subject: [PATCH] add icon and presplash support --- buildozer/default.spec | 6 ++++++ buildozer/targets/android.py | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/buildozer/default.spec b/buildozer/default.spec index 983d14d..bdc947e 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -28,6 +28,12 @@ version.filename = %(source.dir)s/main.py # (list) Application requirements requirements = twisted,kivy +# (str) Presplash of the application +#presplash.filename = %(source.dir)s/data/presplash.png + +# (str) Icon of the application +#icon.filename = %(source.dir)s/data/icon.png + # # Android specific # diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 61eaaf7..7038a96 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -369,6 +369,17 @@ class TargetAndroid(Target): for permission in permissions: build_cmd += ' --permission {0}'.format(permission) + # add presplash + presplash = config.getdefault('app', 'presplash.filename', '') + if presplash: + build_cmd += ' --presplash {}'.format(join(self.buildozer.app_dir, + presplash)) + + # add icon + icon = config.getdefault('app', 'icon.filename', '') + if icon: + build_cmd += ' --icon {}'.format(join(self.buildozer.app_dir, icon)) + # build only in debug right now. if self.build_mode == 'debug': build_cmd += ' debug'