Merge pull request #375 from inclement/fix_p4a_call
Always pass required args to p4a in android_new
This commit is contained in:
commit
7f6a2fe864
1 changed files with 6 additions and 4 deletions
|
@ -14,20 +14,22 @@ class TargetAndroidNew(TargetAndroid):
|
|||
p4a_branch = "master"
|
||||
p4a_directory = "python-for-android-master"
|
||||
p4a_apk_cmd = "apk --bootstrap="
|
||||
extra_p4a_args = ''
|
||||
|
||||
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 ')
|
||||
self._p4a_bootstrap = self.buildozer.config.getdefault(
|
||||
'app', 'android.bootstrap', 'sdl2')
|
||||
self.p4a_apk_cmd += ('{} --color={} --storage-dir={}'.format(
|
||||
self._p4a_bootstrap, color, self._build_dir))
|
||||
self.p4a_apk_cmd += self._p4a_bootstrap
|
||||
color = 'always' if USE_COLOR else 'never'
|
||||
self.extra_p4a_args = ' --color={} --storage-dir={}'.format(
|
||||
color, self._build_dir)
|
||||
|
||||
def _p4a(self, cmd, **kwargs):
|
||||
kwargs.setdefault('cwd', self.pa_dir)
|
||||
return self.buildozer.cmd(self._p4a_cmd + cmd, **kwargs)
|
||||
return self.buildozer.cmd(self._p4a_cmd + cmd + self.extra_p4a_args, **kwargs)
|
||||
|
||||
def get_available_packages(self):
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue