Exemple #1
0
 def start(self):
     dest = self.config.toolchain_prefix
     ndk_zip = self.NDK_ZIP % (self.config.platform, self.config.arch)
     zip_file = os.path.join(dest, ndk_zip)
     try:
         os.makedirs(dest)
     except:
         pass
     shell.download("%s/%s" % (self.NDK_BASE_URL, ndk_zip), zip_file)
     if not os.path.exists(os.path.join(dest, "ndk-build")):
         try:
             shell.call('unzip %s' % ndk_zip, dest)
             shell.call('mv android-ndk-%s/* .' % self.NDK_VERSION, dest)
         except Exception as ex:
             raise FatalError(_("Error installing Android NDK: %s") % (ex))
Exemple #2
0
 def start(self):
     dest = self.config.toolchain_prefix
     ndk_tar = self.NDK_TAR % (self.config.platform, self.config.arch)
     tar = os.path.join(dest, ndk_tar)
     try:
         os.makedirs(dest)
     except:
         pass
     shell.download("%s/%s" % (self.NDK_BASE_URL, ndk_tar), tar)
     if not os.path.exists(os.path.join(dest, "README.TXT")):
         try:
             shell.call('chmod +x ./%s' % ndk_tar, dest)
             shell.call('./%s' % ndk_tar, dest)
             shell.call('mv android-ndk-%s/* .' % (self.NDK_VERSION), dest)
         except Exception, ex:
             raise FatalError(_("Error installing Android NDK: %s") % (ex))