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.
|
THE SOFTWARE.
|
||||||
****************************************************************************"""
|
****************************************************************************"""
|
||||||
|
|
||||||
import os.path,zipfile
|
import os.path
|
||||||
|
import zipfile
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -48,18 +49,26 @@ from sys import stdout
|
||||||
from distutils.errors import DistutilsError
|
from distutils.errors import DistutilsError
|
||||||
from distutils.dir_util import copy_tree, remove_tree
|
from distutils.dir_util import copy_tree, remove_tree
|
||||||
|
|
||||||
|
|
||||||
class UnrecognizedFormat:
|
class UnrecognizedFormat:
|
||||||
def __init__(self, prompt):
|
def __init__(self, prompt):
|
||||||
self._prompt = prompt
|
self._prompt = prompt
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self._prompt
|
return self._prompt
|
||||||
|
|
||||||
|
|
||||||
class CocosZipInstaller(object):
|
class CocosZipInstaller(object):
|
||||||
def __init__(self, workpath, config_path, version_path, remote_version_key=None):
|
def __init__(self, workpath, config_path, version_path, remote_version_key=None):
|
||||||
self._workpath = workpath
|
self._workpath = workpath
|
||||||
self._config_path = config_path
|
self._config_path = config_path
|
||||||
self._version_path = version_path
|
self._version_path = version_path
|
||||||
|
|
||||||
|
print self._config_path
|
||||||
|
print self._version_path
|
||||||
|
|
||||||
|
adfasdf()
|
||||||
|
|
||||||
data = self.load_json_file(config_path)
|
data = self.load_json_file(config_path)
|
||||||
|
|
||||||
self._current_version = data["version"]
|
self._current_version = data["version"]
|
||||||
|
@ -76,7 +85,7 @@ class CocosZipInstaller(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
data = self.load_json_file(version_path)
|
data = self.load_json_file(version_path)
|
||||||
if remote_version_key == None:
|
if remote_version_key is None:
|
||||||
self._remote_version = data["version"]
|
self._remote_version = data["version"]
|
||||||
else:
|
else:
|
||||||
self._remote_version = data[remote_version_key]
|
self._remote_version = data[remote_version_key]
|
||||||
|
@ -192,7 +201,6 @@ class CocosZipInstaller(object):
|
||||||
z.close()
|
z.close()
|
||||||
print("==> Extraction done!")
|
print("==> Extraction done!")
|
||||||
|
|
||||||
|
|
||||||
def ask_to_delete_downloaded_zip_file(self):
|
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 = 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()
|
ret = ret.strip()
|
||||||
|
@ -260,7 +268,7 @@ class CocosZipInstaller(object):
|
||||||
if os.path.exists(self._extracted_folder_name):
|
if os.path.exists(self._extracted_folder_name):
|
||||||
shutil.rmtree(self._extracted_folder_name)
|
shutil.rmtree(self._extracted_folder_name)
|
||||||
if os.path.isfile(self._filename):
|
if os.path.isfile(self._filename):
|
||||||
if remove_downloaded != None:
|
if remove_downloaded is not None:
|
||||||
if remove_downloaded == 'yes':
|
if remove_downloaded == 'yes':
|
||||||
os.remove(self._filename)
|
os.remove(self._filename)
|
||||||
elif self.ask_to_delete_downloaded_zip_file():
|
elif self.ask_to_delete_downloaded_zip_file():
|
||||||
|
@ -278,6 +286,7 @@ def _check_python_version():
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
workpath = os.path.dirname(os.path.realpath(__file__))
|
workpath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version":"v3-deps-20",
|
"version":"v3-deps-21",
|
||||||
"zip_file_size":"87419231",
|
"zip_file_size":"87419231",
|
||||||
"repo_name":"cocos2d-x-3rd-party-libs-bin",
|
"repo_name":"cocos2d-x-3rd-party-libs-bin",
|
||||||
"repo_parent":"https://github.com/cocos2d/",
|
"repo_parent":"https://github.com/cocos2d/",
|
||||||
|
|
Loading…
Reference in New Issue