Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow selection of bootstrap for android_new #342

Merged
merged 1 commit into from
May 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ fullscreen = 1
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (str) Bootstrap to use for android builds (android_new only)
# android.bootstrap = sdl2

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

Expand Down
7 changes: 5 additions & 2 deletions buildozer/targets/android_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ class TargetAndroidNew(TargetAndroid):
targetname = 'android_new'
p4a_branch = "master"
p4a_directory = "python-for-android-master"
p4a_apk_cmd = "apk --bootstrap=sdl2"
p4a_apk_cmd = "apk --bootstrap="

def __init__(self, buildozer):
super(TargetAndroidNew, self).__init__(buildozer)
self._build_dir = join(self.buildozer.platform_dir, 'build')
color = 'always' if USE_COLOR else 'never'
self._p4a_cmd = ('python -m pythonforandroid.toolchain --color={} '
'--storage-dir={} ').format(color, self._build_dir)
self._p4a_bootstrap = self.buildozer.config.getdefault(
'app', 'android.bootstrap', 'sdl2')
self.p4a_apk_cmd += self._p4a_bootstrap

def _p4a(self, cmd, **kwargs):
kwargs.setdefault('cwd', self.pa_dir)
Expand Down Expand Up @@ -52,7 +55,7 @@ def compile_platform(self):
options.append("--copy-libs")
available_modules = self._p4a(
"create --dist_name={} --bootstrap={} --requirements={} --arch armeabi-v7a {}".format(
dist_name, "sdl2", requirements, " ".join(options)),
dist_name, self._p4a_bootstrap, requirements, " ".join(options)),
get_stdout=True)[0]

def _update_libraries_references(self, dist_dir):
Expand Down