Merge pull request #3968 from dumganhar/create-project-fix

Merge PR 3943
This commit is contained in:
James Chen 2013-10-17 20:12:25 -07:00
commit d9241526e7
2 changed files with 23 additions and 15 deletions

View File

@ -295,7 +295,7 @@
5091731717ECDF7A00D62437 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-58.png"; path = "ios/Icon-58.png"; sourceTree = "<group>"; };
5091731817ECDF7A00D62437 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-80.png"; path = "ios/Icon-80.png"; sourceTree = "<group>"; };
5091731917ECDF7A00D62437 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-100.png"; path = "ios/Icon-100.png"; sourceTree = "<group>"; };
509D4AAA17EBB24E00697056 /* Hello JavaScript Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Hello JavaScript Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; };
509D4AAA17EBB24E00697056 /* Hello JavaScript Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "Hello JavaScript Mac.app"; path = "HelloJavaScript Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; };
509D4AAB17EBB2AB00697056 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = "<group>"; };
509D4AAC17EBB2AB00697056 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = "<group>"; };
509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "ios/Default-568h@2x.png"; sourceTree = "<group>"; };
@ -320,7 +320,7 @@
509D4AE617EBB81800697056 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
509D4AE817EBB82000697056 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
509D4AEA17EBB82600697056 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
A922753D1517C094001B78AA /* Hello JavaScript iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Hello JavaScript iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
A922753D1517C094001B78AA /* Hello JavaScript iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "Hello JavaScript iOS.app"; path = "HelloJavaScript iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
A92275451517C094001B78AA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
@ -545,9 +545,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
509D4A7517EBB24E00697056 /* Hello JavaScript Mac */ = {
509D4A7517EBB24E00697056 /* HelloJavascript Mac */ = {
isa = PBXNativeTarget;
buildConfigurationList = 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "Hello JavaScript Mac" */;
buildConfigurationList = 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript Mac" */;
buildPhases = (
509D4A8017EBB24E00697056 /* Sources */,
509D4A8217EBB24E00697056 /* Frameworks */,
@ -562,14 +562,14 @@
1A676826180E9BF70076BC67 /* PBXTargetDependency */,
1A676828180E9BF70076BC67 /* PBXTargetDependency */,
);
name = "Hello JavaScript Mac";
name = "HelloJavascript Mac";
productName = HelloJavascript;
productReference = 509D4AAA17EBB24E00697056 /* Hello JavaScript Mac.app */;
productType = "com.apple.product-type.application";
};
A922753C1517C094001B78AA /* Hello JavaScript iOS */ = {
A922753C1517C094001B78AA /* HelloJavascript iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "Hello JavaScript iOS" */;
buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript iOS" */;
buildPhases = (
A92275391517C094001B78AA /* Sources */,
A922753A1517C094001B78AA /* Frameworks */,
@ -584,7 +584,7 @@
1A676835180E9C110076BC67 /* PBXTargetDependency */,
1A676837180E9C110076BC67 /* PBXTargetDependency */,
);
name = "Hello JavaScript iOS";
name = "HelloJavascript iOS";
productName = HelloJavascript;
productReference = A922753D1517C094001B78AA /* Hello JavaScript iOS.app */;
productType = "com.apple.product-type.application";
@ -620,8 +620,8 @@
);
projectRoot = "";
targets = (
A922753C1517C094001B78AA /* Hello JavaScript iOS */,
509D4A7517EBB24E00697056 /* Hello JavaScript Mac */,
A922753C1517C094001B78AA /* HelloJavascript iOS */,
509D4A7517EBB24E00697056 /* HelloJavascript Mac */,
);
};
/* End PBXProject section */
@ -1058,7 +1058,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "Hello JavaScript Mac" */ = {
509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript Mac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
509D4AA817EBB24E00697056 /* Debug */,
@ -1076,7 +1076,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "Hello JavaScript iOS" */ = {
A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A92277011517C097001B78AA /* Debug */,

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"])