Use dmg instead of 7z

This commit is contained in:
Shivani Bhardwaj 2017-05-18 18:37:16 +05:30
parent 6fcbb4eb21
commit 92ef490f63

View file

@ -58,30 +58,17 @@ class TargetOSX(Target):
'Kivy.app'), cwd=cwd) 'Kivy.app'), cwd=cwd)
else: else:
if not exists(join(cwd, 'Kivy{}.7z'.format(py_branch))): if not exists(join(cwd, 'Kivy{}.dmg'.format(py_branch))):
self.buildozer.info('Downloading kivy...') self.buildozer.info('Downloading kivy...')
check_call( check_call(
('curl', '-L', '-o', 'Kivy{}.7z'.format(py_branch), ('curl', '-L', '-o', 'Kivy{}.dmg'.format(py_branch),
'http://kivy.org/downloads/{}/Kivy-{}-osx-python{}.7z'\ 'http://kivy.org/downloads/{}/Kivy-{}-osx-python{}.dmg'\
.format(current_kivy_vers, current_kivy_vers, py_branch)), .format(current_kivy_vers, current_kivy_vers, py_branch)),
cwd=cwd) cwd=cwd)
if not exists(join(cwd, 'Keka.app')):
self.buildozer.info(
'Downloading Keka as dependency (to install Kivy)')
check_call(
('curl', '-O', 'http://www.kekaosx.com/release/Keka-1.0.8.dmg'),
cwd=cwd)
check_call(('hdiutil', 'attach', 'Keka-1.0.8.dmg'), cwd=cwd)
check_call(('cp', '-a','/Volumes/Keka/Keka.app', './Keka.app'), cwd=cwd)
check_call(('hdiutil', 'detach', '/Volumes/Keka'))
self.buildozer.info('Extracting and installing Kivy...') self.buildozer.info('Extracting and installing Kivy...')
check_call( check_call(('hdiutil', 'attach', cwd + '/Kivy{}.dmg'.format(py_branch)))
(join(cwd, 'Keka.app/Contents/MacOS/Keka'), check_call(('cp', '-a', '/Volumes/Kivy/Kivy.app', './Kivy.app'), cwd=cwd)
join(cwd, 'Kivy{}.7z').format(py_branch)), cwd=cwd)
check_call(('rm', 'Kivy{}.7z'.format(py_branch)), cwd=cwd)
check_call(('mv', 'Kivy{}.app'.format(py_branch), 'Kivy.app'),cwd=cwd)
def ensure_kivyapp(self): def ensure_kivyapp(self):
self.buildozer.info('check if Kivy.app exists in local dir') self.buildozer.info('check if Kivy.app exists in local dir')