mirror of https://github.com/axmolengine/axmol.git
externals: using v21
This commit is contained in:
parent
4ab77acd57
commit
8fd633926f
|
@ -34,7 +34,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************"""
|
||||
|
||||
import os.path,zipfile
|
||||
import os.path
|
||||
import zipfile
|
||||
import shutil
|
||||
import sys
|
||||
import traceback
|
||||
|
@ -48,18 +49,26 @@ from sys import stdout
|
|||
from distutils.errors import DistutilsError
|
||||
from distutils.dir_util import copy_tree, remove_tree
|
||||
|
||||
|
||||
class UnrecognizedFormat:
|
||||
def __init__(self, prompt):
|
||||
self._prompt = prompt
|
||||
|
||||
def __str__(self):
|
||||
return self._prompt
|
||||
|
||||
|
||||
class CocosZipInstaller(object):
|
||||
def __init__(self, workpath, config_path, version_path, remote_version_key=None):
|
||||
self._workpath = workpath
|
||||
self._config_path = config_path
|
||||
self._version_path = version_path
|
||||
|
||||
print self._config_path
|
||||
print self._version_path
|
||||
|
||||
adfasdf()
|
||||
|
||||
data = self.load_json_file(config_path)
|
||||
|
||||
self._current_version = data["version"]
|
||||
|
@ -76,7 +85,7 @@ class CocosZipInstaller(object):
|
|||
|
||||
try:
|
||||
data = self.load_json_file(version_path)
|
||||
if remote_version_key == None:
|
||||
if remote_version_key is None:
|
||||
self._remote_version = data["version"]
|
||||
else:
|
||||
self._remote_version = data[remote_version_key]
|
||||
|
@ -192,7 +201,6 @@ class CocosZipInstaller(object):
|
|||
z.close()
|
||||
print("==> Extraction done!")
|
||||
|
||||
|
||||
def ask_to_delete_downloaded_zip_file(self):
|
||||
ret = self.get_input_value("==> Do you want to keep '%s'? So you don't have to download it later. (yes/no): " % self._filename)
|
||||
ret = ret.strip()
|
||||
|
@ -260,7 +268,7 @@ class CocosZipInstaller(object):
|
|||
if os.path.exists(self._extracted_folder_name):
|
||||
shutil.rmtree(self._extracted_folder_name)
|
||||
if os.path.isfile(self._filename):
|
||||
if remove_downloaded != None:
|
||||
if remove_downloaded is not None:
|
||||
if remove_downloaded == 'yes':
|
||||
os.remove(self._filename)
|
||||
elif self.ask_to_delete_downloaded_zip_file():
|
||||
|
@ -278,6 +286,7 @@ def _check_python_version():
|
|||
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
workpath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version":"v3-deps-20",
|
||||
"version":"v3-deps-21",
|
||||
"zip_file_size":"87419231",
|
||||
"repo_name":"cocos2d-x-3rd-party-libs-bin",
|
||||
"repo_parent":"https://github.com/cocos2d/",
|
||||
|
|
Loading…
Reference in New Issue