From ef697781a7bca4bddcb58353de0025de7ba9d164 Mon Sep 17 00:00:00 2001 From: walzer Date: Wed, 20 Feb 2013 23:15:48 +0800 Subject: [PATCH] issue #1733, unify package name to org.cocos2dx.hello* lower case on both android & ios. --- tools/project-creator/create_project.py | 5 ++++- .../creator_android/handle_project_files.py | 10 +--------- .../creator_ios/handle_project_files.py | 10 +--------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/tools/project-creator/create_project.py b/tools/project-creator/create_project.py index 8833dd6240..47481cab60 100755 --- a/tools/project-creator/create_project.py +++ b/tools/project-creator/create_project.py @@ -63,22 +63,25 @@ def checkParams(context): # fill in src_project_name and src_package_name according to "language" if ("cpp" == context["language"]): context["src_project_name"] = "HelloCpp" + context["src_package_name"] = "org.cocos2dx.hellocpp" context["src_project_path"] = os.getcwd() + "/../../template/multi-platform-cpp" print "Creating multi-platform cpp projects haven't been supported in this python script yet" sys.exit() elif ("lua" == context["language"]): context["src_project_name"] = "HelloLua" + context["src_package_name"] = "org.cocos2dx.hellolua" context["src_project_path"] = os.getcwd() + "/../../template/multi-platform-lua" print "Creating multi-platform lua projects haven't been supported in this python script yet" sys.exit() elif ("javascript" == context["language"]): context["src_project_name"] = "HelloJavascript" context["src_project_path"] = os.getcwd() + "/../../template/multi-platform-js" + context["src_package_name"] = "org.cocos2dx.hellojavascript" # decide the modules to remove # context["modules_to_remove"] = list(set(context["modules_all"]) - set(context["modules_reserved"])) -#end of checkParams(context) function +# end of checkParams(context) function # -------------- main -------------- diff --git a/tools/project-creator/creator_android/handle_project_files.py b/tools/project-creator/creator_android/handle_project_files.py index 162545325d..c92ffefe36 100755 --- a/tools/project-creator/creator_android/handle_project_files.py +++ b/tools/project-creator/creator_android/handle_project_files.py @@ -11,15 +11,7 @@ import shutil def handle_project_files(context): # determine proj_path proj_path = context["dst_project_path"] + "/proj.android/" - - # determine src_package_name & dst_package_name - if ("cpp" == context["language"]): - context["src_package_name"] = "org.cocos2dx.hellocpp" - elif ("lua" == context["language"]): - context["src_package_name"] = "org.cocos2dx.hellolua" - elif ("javascript" == context["language"]): - context["src_package_name"] = "org.cocos2dx.hellojavascript" - + # rename files and folders src_pkg = context["src_package_name"].split('.') dst_pkg = context["dst_package_name"].split('.') diff --git a/tools/project-creator/creator_ios/handle_project_files.py b/tools/project-creator/creator_ios/handle_project_files.py index ddc0271308..7040a7eb1e 100755 --- a/tools/project-creator/creator_ios/handle_project_files.py +++ b/tools/project-creator/creator_ios/handle_project_files.py @@ -11,15 +11,7 @@ import shutil def handle_project_files(context): # determine proj_path proj_path = context["dst_project_path"] + "/proj.ios/" - - # determine src_package_name & dst_package_name - if ("cpp" == context["language"]): - context["src_package_name"] = "org.cocos2d-x.HelloCpp" - elif ("lua" == context["language"]): - context["src_package_name"] = "org.cocos2d-x.HelloLua" - elif ("javascript" == context["language"]): - context["src_package_name"] = "org.cocos2d-x.HelloJavascript" - + # rename files and folders os.rename(proj_path + context["src_project_name"] + ".xcodeproj", proj_path + context["dst_project_name"] + ".xcodeproj" )