Merge commit 'refs/pull/3943/head' of git://github.com/cocos2d/cocos2d-x into create-project-fix

This commit is contained in:
James Chen 2013-10-18 10:40:12 +08:00
commit d6be31f74a
1 changed files with 11 additions and 3 deletions

View File

@ -6,9 +6,9 @@
# define global variables
PLATFORMS = {
"cpp" : ["ios", "android", "win32", "mac", "linux"],
"lua" : ["ios", "android", "win32", "mac", "linux"],
"javascript" : ["ios", "android", "win32", "mac"]
"cpp" : ["ios_mac", "android", "win32", "linux"],
"lua" : ["ios_mac", "android", "win32", "linux"],
"javascript" : ["ios_mac", "android", "win32"]
}
@ -111,6 +111,14 @@ def processPlatformProjects(context, platform):
java_package_path = os.path.join(*dst_pkg)
# rename files and folders
for item in data["rename"]:
tmp = item.replace("PACKAGE_PATH", java_package_path)
src = tmp.replace("PROJECT_NAME", context["src_project_name"])
dst = tmp.replace("PROJECT_NAME", context["dst_project_name"])
if os.path.exists(os.path.join(proj_path, src)):
os.rename(os.path.join(proj_path, src), os.path.join(proj_path, dst))
# remove useless files and folders
for item in data["remove"]:
dst = item.replace("PROJECT_NAME", context["dst_project_name"])