Merge pull request #318 from kived/custom-kivy-ios
support using custom kivy-ios source dir
This commit is contained in:
commit
9a43b20f05
2 changed files with 17 additions and 4 deletions
|
@ -160,6 +160,9 @@ fullscreen = 1
|
|||
# iOS specific
|
||||
#
|
||||
|
||||
# (str) Path to a custom kivy-ios folder
|
||||
#ios.kivy_ios_dir = ../kivy-ios
|
||||
|
||||
# (str) Name of the certificate to use for signing the debug version
|
||||
# Get a list of available identities: buildozer ios list_identities
|
||||
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"
|
||||
|
|
|
@ -92,10 +92,20 @@ class TargetIos(Target):
|
|||
def install_platform(self):
|
||||
cmd = self.buildozer.cmd
|
||||
self.ios_dir = ios_dir = join(self.buildozer.platform_dir, 'kivy-ios')
|
||||
custom_kivy_ios = self.buildozer.config.getdefault('app', 'ios.kivy_ios_dir')
|
||||
if custom_kivy_ios:
|
||||
custom_kivy_ios = join(self.buildozer.root_dir, custom_kivy_ios)
|
||||
if not self.buildozer.file_exists(ios_dir):
|
||||
if custom_kivy_ios:
|
||||
cmd('mkdir -p "{}"'.format(ios_dir))
|
||||
cmd('cp -r "{}"/* "{}"/'.format(custom_kivy_ios, ios_dir))
|
||||
else:
|
||||
cmd('git clone https://github.com/kivy/kivy-ios',
|
||||
cwd=self.buildozer.platform_dir)
|
||||
elif self.platform_update:
|
||||
if custom_kivy_ios:
|
||||
cmd('cp -r "{}"/* "{}"/'.format(custom_kivy_ios, ios_dir))
|
||||
else:
|
||||
cmd('git clean -dxf', cwd=ios_dir)
|
||||
cmd('git pull origin master', cwd=ios_dir)
|
||||
|
||||
|
|
Loading…
Reference in a new issue