From 2308e94c2f9b06154f0563ef6b874bf6bb9d26fb Mon Sep 17 00:00:00 2001 From: chuanweizhang Date: Tue, 24 Dec 2013 09:42:37 +0800 Subject: [PATCH] modify template --- template/multi-platform-cpp/CMakeLists.txt | 2 - .../multi-platform-cpp/proj.android/.cproject | 111 +++++++ .../proj.android/build_native.py | 2 +- .../proj.android/project.properties | 2 +- .../HelloCpp.xcodeproj/project.pbxproj | 70 ++--- .../proj.win32/HelloCpp.sln | 6 +- .../proj.win32/HelloCpp.vcxproj | 14 +- .../multi-platform-js/proj.android/.cproject | 109 +++++++ .../multi-platform-js/proj.android/.project | 10 + .../proj.android/build_native.py | 4 +- .../HelloJavascript.xcodeproj/project.pbxproj | 122 ++++---- .../proj.win32/HelloJavascript.sln | 18 +- .../proj.win32/HelloJavascript.vcxproj | 26 +- template/multi-platform-lua/CMakeLists.txt | 2 - .../proj.android/build_native.py | 4 +- .../HelloLua.xcodeproj/project.pbxproj | 42 +-- .../proj.win32/HelloLua.sln | 18 +- .../proj.win32/HelloLua.vcxproj | 32 +- tools/project-creator/create_project.py | 179 +---------- .../project-creator/{ => module}/__init__.py | 0 tools/project-creator/module/core.py | 278 ++++++++++++++++++ tools/project-creator/module/ui.py | 197 +++++++++++++ 22 files changed, 896 insertions(+), 352 deletions(-) create mode 100644 template/multi-platform-cpp/proj.android/.cproject create mode 100644 template/multi-platform-js/proj.android/.cproject rename tools/project-creator/{ => module}/__init__.py (100%) mode change 100755 => 100644 create mode 100644 tools/project-creator/module/core.py create mode 100644 tools/project-creator/module/ui.py diff --git a/template/multi-platform-cpp/CMakeLists.txt b/template/multi-platform-cpp/CMakeLists.txt index f94f571ef2..88299d0d83 100644 --- a/template/multi-platform-cpp/CMakeLists.txt +++ b/template/multi-platform-cpp/CMakeLists.txt @@ -52,7 +52,6 @@ include_directories( ${COCOS2D_ROOT}/cocos ${COCOS2D_ROOT}/cocos/audio/include ${COCOS2D_ROOT}/cocos/2d - ${COCOS2D_ROOT}/cocos/2d/renderer ${COCOS2D_ROOT}/cocos/2d/platform ${COCOS2D_ROOT}/cocos/2d/platform/linux ${COCOS2D_ROOT}/cocos/base @@ -61,7 +60,6 @@ include_directories( ${COCOS2D_ROOT}/cocos/math/kazmath/include ${COCOS2D_ROOT}/extensions ${COCOS2D_ROOT}/external - ${COCOS2D_ROOT}/external/edtaa3func ${COCOS2D_ROOT}/external/jpeg/include/linux ${COCOS2D_ROOT}/external/tiff/include/linux ${COCOS2D_ROOT}/external/webp/include/linux diff --git a/template/multi-platform-cpp/proj.android/.cproject b/template/multi-platform-cpp/proj.android/.cproject new file mode 100644 index 0000000000..3514d06dd2 --- /dev/null +++ b/template/multi-platform-cpp/proj.android/.cproject @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template/multi-platform-cpp/proj.android/build_native.py b/template/multi-platform-cpp/proj.android/build_native.py index e426c2c0ec..74c92aa2ee 100755 --- a/template/multi-platform-cpp/proj.android/build_native.py +++ b/template/multi-platform-cpp/proj.android/build_native.py @@ -88,7 +88,7 @@ def build(): select_toolchain_version() current_dir = os.path.dirname(os.path.realpath(__file__)) - cocos_root = os.path.join(current_dir, "../../..") + cocos_root = os.path.join(current_dir, "../cocos2d") app_android_root = current_dir copy_resources(app_android_root) diff --git a/template/multi-platform-cpp/proj.android/project.properties b/template/multi-platform-cpp/proj.android/project.properties index 16f145cfc9..870a4a196d 100644 --- a/template/multi-platform-cpp/proj.android/project.properties +++ b/template/multi-platform-cpp/proj.android/project.properties @@ -10,4 +10,4 @@ # Project target. target=android-10 -android.library.reference.1=../../../cocos/2d/platform/android/java +android.library.reference.1=../cocos2d/cocos/2d/platform/android/java diff --git a/template/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj b/template/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj index fdf23b3796..5b91461e19 100644 --- a/template/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj +++ b/template/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj @@ -243,7 +243,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../../../build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 1AC6FAE5180E9839004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; 1ACB3243164770DE00914215 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; 1AFAF8B316D35DE700DB1158 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../Classes/AppDelegate.cpp; sourceTree = ""; }; 1AFAF8B416D35DE700DB1158 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../Classes/AppDelegate.h; sourceTree = ""; }; @@ -820,8 +820,8 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/ios", - "$(SRCROOT)/../../../cocos/2d/platform/ios/Simulation", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", ); INFOPLIST_FILE = ios/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 5.0; @@ -849,8 +849,8 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/ios", - "$(SRCROOT)/../../../cocos/2d/platform/ios/Simulation", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", ); INFOPLIST_FILE = ios/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 5.0; @@ -881,8 +881,8 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/mac", - "$(SRCROOT)/../../../external/glfw3/include/mac", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", ); INFOPLIST_FILE = mac/Info.plist; LIBRARY_SEARCH_PATHS = ""; @@ -908,8 +908,8 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/mac", - "$(SRCROOT)/../../../external/glfw3/include/mac", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", ); INFOPLIST_FILE = mac/Info.plist; LIBRARY_SEARCH_PATHS = ""; @@ -927,19 +927,19 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../../..", - "$(SRCROOT)/../../../cocos", - "$(SRCROOT)/../../../cocos/base", - "$(SRCROOT)/../../../cocos/physics", - "$(SRCROOT)/../../../cocos/math/kazmath/include", - "$(SRCROOT)/../../../cocos/2d", - "$(SRCROOT)/../../../cocos/gui", - "$(SRCROOT)/../../../cocos/network", - "$(SRCROOT)/../../../cocos/audio/include", - "$(SRCROOT)/../../../cocos/editor-support", - "$(SRCROOT)/../../../extensions", - "$(SRCROOT)/../../../external", - "$(SRCROOT)/../../../external/chipmunk/include/chipmunk", + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/gui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", ); ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -955,19 +955,19 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../../..", - "$(SRCROOT)/../../../cocos", - "$(SRCROOT)/../../../cocos/base", - "$(SRCROOT)/../../../cocos/physics", - "$(SRCROOT)/../../../cocos/math/kazmath/include", - "$(SRCROOT)/../../../cocos/2d", - "$(SRCROOT)/../../../cocos/gui", - "$(SRCROOT)/../../../cocos/network", - "$(SRCROOT)/../../../cocos/audio/include", - "$(SRCROOT)/../../../cocos/editor-support", - "$(SRCROOT)/../../../extensions", - "$(SRCROOT)/../../../external", - "$(SRCROOT)/../../../external/chipmunk/include/chipmunk", + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/gui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", ); OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/template/multi-platform-cpp/proj.win32/HelloCpp.sln b/template/multi-platform-cpp/proj.win32/HelloCpp.sln index 774ee12d79..b4dca4c0f5 100644 --- a/template/multi-platform-cpp/proj.win32/HelloCpp.sln +++ b/template/multi-platform-cpp/proj.win32/HelloCpp.sln @@ -8,11 +8,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "HelloCpp.vcxpro {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\..\..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\..\..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj b/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj index f2e35df259..e29153ca14 100644 --- a/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj +++ b/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj @@ -36,13 +36,13 @@ - - + + - - + + @@ -143,14 +143,14 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" - + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} false - + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - + {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} diff --git a/template/multi-platform-js/proj.android/.cproject b/template/multi-platform-js/proj.android/.cproject new file mode 100644 index 0000000000..9ebba484ce --- /dev/null +++ b/template/multi-platform-js/proj.android/.cproject @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/template/multi-platform-js/proj.android/.project b/template/multi-platform-js/proj.android/.project index df461895c5..c65124f88e 100644 --- a/template/multi-platform-js/proj.android/.project +++ b/template/multi-platform-js/proj.android/.project @@ -20,6 +20,16 @@ + + org.eclipse.ui.externaltools.ExternalToolBuilder + full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.genmakebuilder.launch + + + com.android.ide.eclipse.adt.ApkBuilder diff --git a/template/multi-platform-js/proj.android/build_native.py b/template/multi-platform-js/proj.android/build_native.py index 4e67dd7cfb..e45ee3fa16 100755 --- a/template/multi-platform-js/proj.android/build_native.py +++ b/template/multi-platform-js/proj.android/build_native.py @@ -83,7 +83,7 @@ def copy_resources(app_android_root): copy_files(resources_dir, assets_dir) # jsb project should copy javascript files and resources(shared with cocos2d-html5) - resources_dir = os.path.join(app_android_root, "../../../cocos/scripting/javascript/script") + resources_dir = os.path.join(app_android_root, "../cocos2d/cocos/scripting/javascript/script") copy_files(resources_dir, assets_dir) def build(): @@ -92,7 +92,7 @@ def build(): select_toolchain_version() current_dir = os.path.dirname(os.path.realpath(__file__)) - cocos_root = os.path.join(current_dir, "../../..") + cocos_root = os.path.join(current_dir, "../cocos2d") app_android_root = current_dir copy_resources(app_android_root) diff --git a/template/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/template/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj index c43a50cddd..3f18ef509c 100644 --- a/template/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj +++ b/template/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj @@ -275,26 +275,26 @@ /* Begin PBXFileReference section */ 15FD5C5F183A60FE005CFF55 /* cocos2d-jsb.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = "cocos2d-jsb.js"; path = "../Resources/cocos2d-jsb.js"; sourceTree = ""; }; 15FD5C67183A6112005CFF55 /* cocos2d-jsb.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = "cocos2d-jsb.js"; path = "../Resources/cocos2d-jsb.js"; sourceTree = ""; }; - 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; - 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; - 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; - 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; - 1A6767ED180E9B160076BC67 /* debugger */ = {isa = PBXFileReference; lastKnownFileType = folder; name = debugger; path = ../../../cocos/scripting/javascript/script/debugger; sourceTree = ""; }; - 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk_constants.js; path = ../../../cocos/scripting/javascript/script/jsb_chipmunk_constants.js; sourceTree = ""; }; - 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk.js; path = ../../../cocos/scripting/javascript/script/jsb_chipmunk.js; sourceTree = ""; }; - 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_constants.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d_constants.js; sourceTree = ""; }; - 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_extension.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d_extension.js; sourceTree = ""; }; - 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d.js; path = ../../../cocos/scripting/javascript/script/jsb_cocos2d.js; sourceTree = ""; }; - 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocosbuilder.js; path = ../../../cocos/scripting/javascript/script/jsb_cocosbuilder.js; sourceTree = ""; }; - 1A6767F4180E9B160076BC67 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_debugger.js; path = ../../../cocos/scripting/javascript/script/jsb_debugger.js; sourceTree = ""; }; - 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_deprecated.js; path = ../../../cocos/scripting/javascript/script/jsb_deprecated.js; sourceTree = ""; }; - 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl_constants.js; path = ../../../cocos/scripting/javascript/script/jsb_opengl_constants.js; sourceTree = ""; }; - 1A6767F7180E9B160076BC67 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl.js; path = ../../../cocos/scripting/javascript/script/jsb_opengl.js; sourceTree = ""; }; - 1A6767F8180E9B160076BC67 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_sys.js; path = ../../../cocos/scripting/javascript/script/jsb_sys.js; sourceTree = ""; }; - 1A6767F9180E9B160076BC67 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb.js; path = ../../../cocos/scripting/javascript/script/jsb.js; sourceTree = ""; }; + 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; + 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; + 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; + 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; + 1A6767ED180E9B160076BC67 /* debugger */ = {isa = PBXFileReference; lastKnownFileType = folder; name = debugger; path = ../cocos2d/cocos/scripting/javascript/script/debugger; sourceTree = ""; }; + 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_chipmunk_constants.js; sourceTree = ""; }; + 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_chipmunk.js; sourceTree = ""; }; + 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_constants.js; sourceTree = ""; }; + 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_extension.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_extension.js; sourceTree = ""; }; + 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d.js; sourceTree = ""; }; + 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocosbuilder.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocosbuilder.js; sourceTree = ""; }; + 1A6767F4180E9B160076BC67 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_debugger.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_debugger.js; sourceTree = ""; }; + 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_deprecated.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_deprecated.js; sourceTree = ""; }; + 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_opengl_constants.js; sourceTree = ""; }; + 1A6767F7180E9B160076BC67 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_opengl.js; sourceTree = ""; }; + 1A6767F8180E9B160076BC67 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_sys.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_sys.js; sourceTree = ""; }; + 1A6767F9180E9B160076BC67 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb.js; sourceTree = ""; }; 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; - 1A96A4F2174A3432008653A9 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; - 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../../../build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 1A96A4F2174A3432008653A9 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../cocos2d/cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; + 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; 1AE4B40016D1FECD003C6D1C /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../Resources/main.js; sourceTree = ""; }; 1AE4B40116D1FECD003C6D1C /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../Resources/res; sourceTree = ""; }; 1AE4B40216D1FECD003C6D1C /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../Resources/src; sourceTree = ""; }; @@ -905,9 +905,9 @@ ); HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/mac", - "$(SRCROOT)/../../../external/spidermonkey/include/mac", - "$(SRCROOT)/../../../external/glfw3/include/mac", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", + "$(SRCROOT)/../cocos2d/external/spidermonkey/include/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", ); INFOPLIST_FILE = mac/Info.plist; LIBRARY_SEARCH_PATHS = ""; @@ -930,9 +930,9 @@ ); HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/mac", - "$(SRCROOT)/../../../external/spidermonkey/include/mac", - "$(SRCROOT)/../../../external/glfw3/include/mac", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", + "$(SRCROOT)/../cocos2d/external/spidermonkey/include/mac", + "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", ); INFOPLIST_FILE = mac/Info.plist; LIBRARY_SEARCH_PATHS = ""; @@ -960,21 +960,21 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../../..", - "$(SRCROOT)/../../../cocos", - "$(SRCROOT)/../../../cocos/base", - "$(SRCROOT)/../../../cocos/physics", - "$(SRCROOT)/../../../cocos/math/kazmath/include", - "$(SRCROOT)/../../../cocos/2d", - "$(SRCROOT)/../../../cocos/gui", - "$(SRCROOT)/../../../cocos/network", - "$(SRCROOT)/../../../cocos/audio/include", - "$(SRCROOT)/../../../cocos/editor-support", - "$(SRCROOT)/../../../cocos/scripting/javascript/bindings", - "$(SRCROOT)/../../../cocos/scripting/auto-generated/js-bindings", - "$(SRCROOT)/../../../extensions", - "$(SRCROOT)/../../../external", - "$(SRCROOT)/../../../external/chipmunk/include/chipmunk", + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/gui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/cocos/scripting/javascript/bindings", + "$(SRCROOT)/../cocos2d/cocos/scripting/auto-generated/js-bindings", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", ); IPHONEOS_DEPLOYMENT_TARGET = 5.1; ONLY_ACTIVE_ARCH = YES; @@ -997,21 +997,21 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../../..", - "$(SRCROOT)/../../../cocos", - "$(SRCROOT)/../../../cocos/base", - "$(SRCROOT)/../../../cocos/physics", - "$(SRCROOT)/../../../cocos/math/kazmath/include", - "$(SRCROOT)/../../../cocos/2d", - "$(SRCROOT)/../../../cocos/gui", - "$(SRCROOT)/../../../cocos/network", - "$(SRCROOT)/../../../cocos/audio/include", - "$(SRCROOT)/../../../cocos/editor-support", - "$(SRCROOT)/../../../cocos/scripting/javascript/bindings", - "$(SRCROOT)/../../../cocos/scripting/auto-generated/js-bindings", - "$(SRCROOT)/../../../extensions", - "$(SRCROOT)/../../../external", - "$(SRCROOT)/../../../external/chipmunk/include/chipmunk", + "$(SRCROOT)/../cocos2d", + "$(SRCROOT)/../cocos2d/cocos", + "$(SRCROOT)/../cocos2d/cocos/base", + "$(SRCROOT)/../cocos2d/cocos/physics", + "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", + "$(SRCROOT)/../cocos2d/cocos/2d", + "$(SRCROOT)/../cocos2d/cocos/gui", + "$(SRCROOT)/../cocos2d/cocos/network", + "$(SRCROOT)/../cocos2d/cocos/audio/include", + "$(SRCROOT)/../cocos2d/cocos/editor-support", + "$(SRCROOT)/../cocos2d/cocos/scripting/javascript/bindings", + "$(SRCROOT)/../cocos2d/cocos/scripting/auto-generated/js-bindings", + "$(SRCROOT)/../cocos2d/extensions", + "$(SRCROOT)/../cocos2d/external", + "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", ); IPHONEOS_DEPLOYMENT_TARGET = 5.1; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; @@ -1035,9 +1035,9 @@ ); HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/ios", - "$(SRCROOT)/../../../cocos/2d/platform/ios/Simulation", - "$(SRCROOT)/../../../external/spidermonkey/include/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", + "$(SRCROOT)/../cocos2d/external/spidermonkey/include/ios", ); INFOPLIST_FILE = ios/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 5.0; @@ -1062,9 +1062,9 @@ ); HEADER_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/../../../cocos/2d/platform/ios", - "$(SRCROOT)/../../../cocos/2d/platform/ios/Simulation", - "$(SRCROOT)/../../../external/spidermonkey/include/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", + "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", + "$(SRCROOT)/../cocos2d/external/spidermonkey/include/ios", ); INFOPLIST_FILE = ios/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 5.0; diff --git a/template/multi-platform-js/proj.win32/HelloJavascript.sln b/template/multi-platform-js/proj.win32/HelloJavascript.sln index 5880df4c17..05d76f1c83 100644 --- a/template/multi-platform-js/proj.win32/HelloJavascript.sln +++ b/template/multi-platform-js/proj.win32/HelloJavascript.sln @@ -10,16 +10,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloJavascript", "HelloJav {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\..\..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\..\..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" ProjectSection(ProjectDependencies) = postProject {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\..\..\cocos\scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\cocos2d\cocos\scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" ProjectSection(ProjectDependencies) = postProject {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} @@ -27,15 +27,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\..\..\co {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\..\..\cocos\scripting\javascript\bindings\chipmunk\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\cocos2d\cocos\scripting\javascript\bindings\chipmunk\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\..\..\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos2d\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\..\..\cocos\scripting\javascript\bindings\localstorage\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\cocos2d\cocos\scripting\javascript\bindings\localstorage\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\..\..\cocos\scripting\javascript\bindings\extension\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\cocos2d\cocos\scripting\javascript\bindings\extension\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\..\..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj b/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj index 35da6b1ee0..caf0791fc7 100644 --- a/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj +++ b/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj @@ -34,13 +34,13 @@ - - + + - - + + @@ -184,31 +184,31 @@ xcopy "$(ProjectDir)..\Resources" "$(OutDir)\HelloJavascriptRes\" /e /Y - + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - + {21070e58-eec6-4e16-8b4f-6d083df55790} - + {625f7391-9a91-48a1-8cfc-79508c822637} - + {68f5f371-bd7b-4c30-ae5b-0b08f22e0cde} - + {39379840-825a-45a0-b363-c09ffef864bd} - + {632a8f38-d0f0-4d22-86b3-d69f5e6bf63a} - + {21b2c324-891f-48ea-ad1a-5ae13de12e28} - + {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} diff --git a/template/multi-platform-lua/CMakeLists.txt b/template/multi-platform-lua/CMakeLists.txt index 8f3f930bd4..a3cf368403 100644 --- a/template/multi-platform-lua/CMakeLists.txt +++ b/template/multi-platform-lua/CMakeLists.txt @@ -55,7 +55,6 @@ include_directories( ${COCOS2D_ROOT}/cocos ${COCOS2D_ROOT}/cocos/audio/include ${COCOS2D_ROOT}/cocos/2d - ${COCOS2D_ROOT}/cocos/2d/renderer ${COCOS2D_ROOT}/cocos/2d/platform ${COCOS2D_ROOT}/cocos/2d/platform/linux ${COCOS2D_ROOT}/cocos/base @@ -64,7 +63,6 @@ include_directories( ${COCOS2D_ROOT}/cocos/math/kazmath/include ${COCOS2D_ROOT}/extensions ${COCOS2D_ROOT}/external - ${COCOS2D_ROOT}/external/edtaa3func ${COCOS2D_ROOT}/external/jpeg/include/linux ${COCOS2D_ROOT}/external/tiff/include/linux ${COCOS2D_ROOT}/external/webp/include/linux diff --git a/template/multi-platform-lua/proj.android/build_native.py b/template/multi-platform-lua/proj.android/build_native.py index c1fe04ac28..07dacc4368 100755 --- a/template/multi-platform-lua/proj.android/build_native.py +++ b/template/multi-platform-lua/proj.android/build_native.py @@ -83,7 +83,7 @@ def copy_resources(app_android_root): copy_files(resources_dir, assets_dir) # lua project should copy lua script - resources_dir = os.path.join(app_android_root, "../../../cocos/scripting/lua/script") + resources_dir = os.path.join(app_android_root, "../cocos2d/cocos/scripting/lua/script") copy_files(resources_dir, assets_dir) def build(): @@ -92,7 +92,7 @@ def build(): select_toolchain_version() current_dir = os.path.dirname(os.path.realpath(__file__)) - cocos_root = os.path.join(current_dir, "../../..") + cocos_root = os.path.join(current_dir, "../cocos2d") app_android_root = current_dir copy_resources(app_android_root) diff --git a/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index ec0d5f7366..76f9c16c73 100644 --- a/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -219,24 +219,24 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../../../build/cocos2d_libs.xcodeproj; sourceTree = ""; }; - 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = ../../../cocos/scripting/lua/script/AudioEngine.lua; sourceTree = ""; }; - 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CCBReaderLoad.lua; path = ../../../cocos/scripting/lua/script/CCBReaderLoad.lua; sourceTree = ""; }; - 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cocos2d.lua; path = ../../../cocos/scripting/lua/script/Cocos2d.lua; sourceTree = ""; }; - 15A8A4581834C6AD00142BE0 /* Cocos2dConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cocos2dConstants.lua; path = ../../../cocos/scripting/lua/script/Cocos2dConstants.lua; sourceTree = ""; }; - 15A8A4591834C6AD00142BE0 /* Deprecated.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Deprecated.lua; path = ../../../cocos/scripting/lua/script/Deprecated.lua; sourceTree = ""; }; - 15A8A45A1834C6AD00142BE0 /* DeprecatedClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedClass.lua; path = ../../../cocos/scripting/lua/script/DeprecatedClass.lua; sourceTree = ""; }; - 15A8A45B1834C6AD00142BE0 /* DeprecatedEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedEnum.lua; path = ../../../cocos/scripting/lua/script/DeprecatedEnum.lua; sourceTree = ""; }; - 15A8A45C1834C6AD00142BE0 /* DeprecatedOpenglEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedOpenglEnum.lua; path = ../../../cocos/scripting/lua/script/DeprecatedOpenglEnum.lua; sourceTree = ""; }; - 15A8A45D1834C6AD00142BE0 /* DrawPrimitives.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DrawPrimitives.lua; path = ../../../cocos/scripting/lua/script/DrawPrimitives.lua; sourceTree = ""; }; - 15A8A45E1834C6AD00142BE0 /* json.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = json.lua; path = ../../../cocos/scripting/lua/script/json.lua; sourceTree = ""; }; - 15A8A45F1834C6AD00142BE0 /* luaj.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = luaj.lua; path = ../../../cocos/scripting/lua/script/luaj.lua; sourceTree = ""; }; - 15A8A4601834C6AD00142BE0 /* luaoc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = luaoc.lua; path = ../../../cocos/scripting/lua/script/luaoc.lua; sourceTree = ""; }; - 15A8A4611834C6AD00142BE0 /* Opengl.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Opengl.lua; path = ../../../cocos/scripting/lua/script/Opengl.lua; sourceTree = ""; }; - 15A8A4621834C6AD00142BE0 /* OpenglConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OpenglConstants.lua; path = ../../../cocos/scripting/lua/script/OpenglConstants.lua; sourceTree = ""; }; - 15A8A4631834C6AD00142BE0 /* StudioConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = StudioConstants.lua; path = ../../../cocos/scripting/lua/script/StudioConstants.lua; sourceTree = ""; }; + 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; + 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = ../cocos2d/cocos/scripting/lua/script/AudioEngine.lua; sourceTree = ""; }; + 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CCBReaderLoad.lua; path = ../cocos2d/cocos/scripting/lua/script/CCBReaderLoad.lua; sourceTree = ""; }; + 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cocos2d.lua; path = ../cocos2d/cocos/scripting/lua/script/Cocos2d.lua; sourceTree = ""; }; + 15A8A4581834C6AD00142BE0 /* Cocos2dConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cocos2dConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/Cocos2dConstants.lua; sourceTree = ""; }; + 15A8A4591834C6AD00142BE0 /* Deprecated.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Deprecated.lua; path = ../cocos2d/cocos/scripting/lua/script/Deprecated.lua; sourceTree = ""; }; + 15A8A45A1834C6AD00142BE0 /* DeprecatedClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedClass.lua; path = ../cocos2d/cocos/scripting/lua/script/DeprecatedClass.lua; sourceTree = ""; }; + 15A8A45B1834C6AD00142BE0 /* DeprecatedEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedEnum.lua; path = ../cocos2d/cocos/scripting/lua/script/DeprecatedEnum.lua; sourceTree = ""; }; + 15A8A45C1834C6AD00142BE0 /* DeprecatedOpenglEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedOpenglEnum.lua; path = ../cocos2d/cocos/scripting/lua/script/DeprecatedOpenglEnum.lua; sourceTree = ""; }; + 15A8A45D1834C6AD00142BE0 /* DrawPrimitives.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DrawPrimitives.lua; path = ../cocos2d/cocos/scripting/lua/script/DrawPrimitives.lua; sourceTree = ""; }; + 15A8A45E1834C6AD00142BE0 /* json.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = json.lua; path = ../cocos2d/cocos/scripting/lua/script/json.lua; sourceTree = ""; }; + 15A8A45F1834C6AD00142BE0 /* luaj.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = luaj.lua; path = ../cocos2d/cocos/scripting/lua/script/luaj.lua; sourceTree = ""; }; + 15A8A4601834C6AD00142BE0 /* luaoc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = luaoc.lua; path = ../cocos2d/cocos/scripting/lua/script/luaoc.lua; sourceTree = ""; }; + 15A8A4611834C6AD00142BE0 /* Opengl.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Opengl.lua; path = ../cocos2d/cocos/scripting/lua/script/Opengl.lua; sourceTree = ""; }; + 15A8A4621834C6AD00142BE0 /* OpenglConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OpenglConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/OpenglConstants.lua; sourceTree = ""; }; + 15A8A4631834C6AD00142BE0 /* StudioConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = StudioConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/StudioConstants.lua; sourceTree = ""; }; 15A8A4871834C90E00142BE0 /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; - 15C1568D1683131500D239F2 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../../../cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; + 15C1568D1683131500D239F2 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../cocos2d/cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; 1AC3622316D47C5C000847F2 /* background.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = background.mp3; path = ../Resources/background.mp3; sourceTree = ""; }; 1AC3622416D47C5C000847F2 /* background.ogg */ = {isa = PBXFileReference; lastKnownFileType = file; name = background.ogg; path = ../Resources/background.ogg; sourceTree = ""; }; 1AC3622516D47C5C000847F2 /* crop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = crop.png; path = ../Resources/crop.png; sourceTree = ""; }; @@ -824,7 +824,7 @@ 10000, ); SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../cocos $(SRCROOT)/../../../cocos/base $(SRCROOT)/../../../cocos/2d $(SRCROOT)/../../../cocos/physics $(SRCROOT)/../../../cocos/math/kazmath/include $(SRCROOT)/../../../cocos/2d/platform/mac $(SRCROOT)/../../../cocos/audio/include $(SRCROOT)/../../../cocos/editor-support $(SRCROOT)/../../../cocos/gui $(SRCROOT)/../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../external $(SRCROOT)/../../../external/glfw3/include/mac $(SRCROOT)/../../../cocos/scripting/lua/bindings $(SRCROOT)/../../../external/lua/luajit/include $(SRCROOT)/../../../external/lua/tolua"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/mac $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/external/glfw3/include/mac $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; }; name = Debug; }; @@ -850,7 +850,7 @@ 10000, ); SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../cocos $(SRCROOT)/../../../cocos/base $(SRCROOT)/../../../cocos/2d $(SRCROOT)/../../../cocos/physics $(SRCROOT)/../../../cocos/math/kazmath/include $(SRCROOT)/../../../cocos/2d/platform/mac $(SRCROOT)/../../../cocos/audio/include $(SRCROOT)/../../../cocos/editor-support $(SRCROOT)/../../../cocos/gui $(SRCROOT)/../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../external $(SRCROOT)/../../../external/glfw3/include/mac $(SRCROOT)/../../../cocos/scripting/lua/bindings $(SRCROOT)/../../../external/lua/luajit/include $(SRCROOT)/../../../external/lua/tolua"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/mac $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/external/glfw3/include/mac $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; }; name = Release; }; @@ -942,7 +942,7 @@ LIBRARY_SEARCH_PATHS = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../cocos $(SRCROOT)/../../../cocos/base $(SRCROOT)/../../../cocos/2d $(SRCROOT)/../../../cocos/physics $(SRCROOT)/../../../cocos/math/kazmath/include $(SRCROOT)/../../../cocos/2d/platform/ios $(SRCROOT)/../../../cocos/audio/include $(SRCROOT)/../../../cocos/editor-support $(SRCROOT)/../../../cocos/gui $(SRCROOT)/../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../external $(SRCROOT)/../../../cocos/scripting/lua/bindings $(SRCROOT)/../../../external/lua/luajit/include $(SRCROOT)/../../../external/lua/tolua"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/ios $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; }; name = Debug; }; @@ -964,7 +964,7 @@ LIBRARY_SEARCH_PATHS = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../../cocos $(SRCROOT)/../../../cocos/base $(SRCROOT)/../../../cocos/2d $(SRCROOT)/../../../cocos/physics $(SRCROOT)/../../../cocos/math/kazmath/include $(SRCROOT)/../../../cocos/2d/platform/ios $(SRCROOT)/../../../cocos/audio/include $(SRCROOT)/../../../cocos/editor-support $(SRCROOT)/../../../cocos/gui $(SRCROOT)/../../../external/chipmunk/include/chipmunk $(SRCROOT)/../../../external $(SRCROOT)/../../../cocos/scripting/lua/bindings $(SRCROOT)/../../../external/lua/luajit/include $(SRCROOT)/../../../external/lua/tolua"; + USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/ios $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; }; name = Release; }; diff --git a/template/multi-platform-lua/proj.win32/HelloLua.sln b/template/multi-platform-lua/proj.win32/HelloLua.sln index d5769661f0..1da75a564c 100644 --- a/template/multi-platform-lua/proj.win32/HelloLua.sln +++ b/template/multi-platform-lua/proj.win32/HelloLua.sln @@ -10,28 +10,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "HelloLua.vcxpro {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\..\..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" ProjectSection(ProjectDependencies) = postProject {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\..\..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\..\..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\..\..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\..\..\cocos\scripting\lua\bindings\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\cocos2d\cocos\scripting\lua\bindings\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\..\..\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos2d\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\..\..\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos2d\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\..\..\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\..\..\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj b/template/multi-platform-lua/proj.win32/HelloLua.vcxproj index 6762f6a744..df4d1907a2 100644 --- a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj +++ b/template/multi-platform-lua/proj.win32/HelloLua.vcxproj @@ -36,13 +36,13 @@ - - + + - - + + @@ -104,13 +104,13 @@ - xcopy "$(ProjectDir)..\..\..\cocos\scripting\lua\script" "$(ProjectDir)..\Resources" /e /Y + xcopy "$(ProjectDir)..\cocos2d\cocos\scripting\lua\script" "$(ProjectDir)..\Resources" /e /Y if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\cocos2d\external\websockets\prebuilt\win32\*.*" "$(OutDir)" @@ -160,7 +160,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(OutDir)" +xcopy /Y /Q "$(ProjectDir)..\cocos2d\external\websockets\prebuilt\win32\*.*" "$(OutDir)" @@ -175,31 +175,31 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou - + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - + {811c0dab-7b96-4bd3-a154-b7572b58e4ab} - + {b57cf53f-2e49-4031-9822-047cc0e6bde2} - + {7e06e92c-537a-442b-9e4a-4761c84f8a1a} - + {df2638c0-8128-4847-867c-6eafe3dee7b5} - + {ddc3e27f-004d-4dd4-9dd3-931a013d2159} - + {21b2c324-891f-48ea-ad1a-5ae13de12e28} - + {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} diff --git a/tools/project-creator/create_project.py b/tools/project-creator/create_project.py index 640fa4e038..48eb9d0ef0 100755 --- a/tools/project-creator/create_project.py +++ b/tools/project-creator/create_project.py @@ -1,177 +1,20 @@ #!/usr/bin/python # create_project.py +#coding=utf-8 # Create cross-platform cocos2d-x project # Copyright (c) 2012 cocos2d-x.org -# Author: WangZhe +# Author: chuanwei -# define global variables -PLATFORMS = { - "cpp" : ["ios_mac", "android", "win32", "linux"], - "lua" : ["ios_mac", "android", "win32", "linux"], - "javascript" : ["ios_mac", "android", "win32"] -} - - -# begin import sys -import os, os.path -import json -import shutil +from module.ui import TkProjectDialog +from module.core import CocosProject -def checkParams(): - from optparse import OptionParser - - # set the parser to parse input params - # the correspond variable name of "-x, --xxx" is parser.xxx - parser = OptionParser(usage="Usage: %prog -p -k -l \nSample: %prog -p MyGame -k com.MyCompany.AwesomeGame -l javascript") - parser.add_option("-p", "--project", metavar="PROJECT_NAME", help="Set a project name") - parser.add_option("-k", "--package", metavar="PACKAGE_NAME", help="Set a package name for project") - parser.add_option("-l", "--language", - metavar="PROGRAMMING_NAME", - type="choice", - choices=["cpp", "lua", "javascript"], - help="Major programming language you want to use, should be [cpp | lua | javascript]") - - #parse the params - (opts, args) = parser.parse_args() - - # generate our internal params - context = {}.fromkeys(("language", "src_project_name", "src_package_name", "dst_project_name", "dst_package_name", "src_project_path", "dst_project_path", "script_dir")) - platforms_list = [] - - context["script_dir"] = os.path.abspath(os.path.dirname(__file__)) - - if opts.project: - context["dst_project_name"] = opts.project - context["dst_project_path"] = os.path.abspath(os.path.join(context["script_dir"], "..", "..", "projects", context["dst_project_name"])) - else: - parser.error("-p or --project is not specified") - - if opts.package: - context["dst_package_name"] = opts.package - else: - parser.error("-k or --package is not specified") - - if opts.language: - context["language"] = opts.language - else: - parser.error("-l or --language is not specified") - - # fill in src_project_name and src_package_name according to "language" - template_dir = os.path.abspath(os.path.join(context["script_dir"], "..", "..", "template")) - if ("cpp" == context["language"]): - context["src_project_name"] = "HelloCpp" - context["src_package_name"] = "org.cocos2dx.hellocpp" - context["src_project_path"] = os.path.join(template_dir, "multi-platform-cpp") - elif ("lua" == context["language"]): - context["src_project_name"] = "HelloLua" - context["src_package_name"] = "org.cocos2dx.hellolua" - context["src_project_path"] = os.path.join(template_dir, "multi-platform-lua") - elif ("javascript" == context["language"]): - context["src_project_name"] = "HelloJavascript" - context["src_package_name"] = "org.cocos2dx.hellojavascript" - context["src_project_path"] = os.path.join(template_dir, "multi-platform-js") - else: - print ("Your language parameter doesn\'t exist." \ - "Check correct language option\'s parameter") - sys.exit() - platforms_list = PLATFORMS.get(context["language"], []) - return context, platforms_list -# end of checkParams(context) function - -def replaceString(filepath, src_string, dst_string): - content = "" - f1 = open(filepath, "rb") - for line in f1: - strline = line.decode('utf8') - if src_string in strline: - content += strline.replace(src_string, dst_string) - else: - content += strline - f1.close() - f2 = open(filepath, "wb") - f2.write(content.encode('utf8')) - f2.close() -# end of replaceString - -def processPlatformProjects(context, platform): - # determine proj_path - proj_path = os.path.join(context["dst_project_path"], "proj." + platform) - java_package_path = "" - - # read json config file for the current platform - conf_path = os.path.join(context["script_dir"], "%s.json" % platform) - f = open(conf_path) - data = json.load(f) - - # rename package path, like "org.cocos2dx.hello" to "com.company.game". This is a special process for android - if platform == "android": - src_pkg = context["src_package_name"].split('.') - dst_pkg = context["dst_package_name"].split('.') - - 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"]) - if os.path.exists(os.path.join(proj_path, dst)): - shutil.rmtree(os.path.join(proj_path, dst)) - - # rename package_name. This should be replaced at first. Don't change this sequence - for item in data["replace_package_name"]: - tmp = item.replace("PACKAGE_PATH", java_package_path) - dst = tmp.replace("PROJECT_NAME", context["dst_project_name"]) - if os.path.exists(os.path.join(proj_path, dst)): - replaceString(os.path.join(proj_path, dst), context["src_package_name"], context["dst_package_name"]) - - # rename project_name - for item in data["replace_project_name"]: - tmp = item.replace("PACKAGE_PATH", java_package_path) - dst = tmp.replace("PROJECT_NAME", context["dst_project_name"]) - if os.path.exists(os.path.join(proj_path, dst)): - replaceString(os.path.join(proj_path, dst), context["src_project_name"], context["dst_project_name"]) - - # done! - print ("proj.%s\t\t: Done!" % platform) -# end of processPlatformProjects - -def createPlatformProjects(): - # prepare valid "context" dictionary - context, platforms_list = checkParams() - # print context, platforms_list - - # copy "lauguage"(cpp/lua/javascript) platform.proj into cocos2d-x/projects//folder - if os.path.exists(context["dst_project_path"]): - print ("Error:" + context["dst_project_path"] + " folder is already existing") - print ("Please remove the old project or choose a new PROJECT_NAME in -project parameter") - sys.exit() - else: - shutil.copytree(context["src_project_path"], context["dst_project_path"], True) - - # call process_proj from each platform's script folder - for platform in platforms_list: - processPlatformProjects(context, platform) - # exec "import %s.handle_project_files" % (platform) - # exec "%s.handle_project_files.handle_project_files(context)" % (platform) - - print ("New project has been created in this path: " + context["dst_project_path"].replace("/tools/project-creator/../..", "")) - print ("Have Fun!") - - - - - -# -------------- main -------------- -# dump argvs -# print sys.argv +# ------------ main -------------- if __name__ == '__main__': - createPlatformProjects() + if len(sys.argv)==1: + TkProjectDialog() + else: + project = CocosProject() + name, package, language, path = project.checkParams() + project.createPlatformProjects(name, package, language, path) diff --git a/tools/project-creator/__init__.py b/tools/project-creator/module/__init__.py old mode 100755 new mode 100644 similarity index 100% rename from tools/project-creator/__init__.py rename to tools/project-creator/module/__init__.py diff --git a/tools/project-creator/module/core.py b/tools/project-creator/module/core.py new file mode 100644 index 0000000000..80c01d6c57 --- /dev/null +++ b/tools/project-creator/module/core.py @@ -0,0 +1,278 @@ +#!/usr/bin/python +#coding=utf-8 +# create_project.py +# Create cross-platform cocos2d-x project +# Copyright (c) 2012 cocos2d-x.org +# Author: WangZhe +#modify:chuanwei 2013.12.23 + + +import sys +import os, os.path +import json +import shutil + +def replaceString(filepath, src_string, dst_string): + """ From file's content replace specified string + Arg: + filepath: Specify a file contains the path + src_string: old string + dst_string: new string + """ + content = "" + f1 = open(filepath, "rb") + for line in f1: + strline = line.decode('utf8') + if src_string in strline: + content += strline.replace(src_string, dst_string) + else: + content += strline + f1.close() + f2 = open(filepath, "wb") + f2.write(content.encode('utf8')) + f2.close() +#end of replaceString + +class CocosProject: + + def __init__(self): + """ + """ + self.platforms= { + "cpp" : ["ios_mac", "android", "win32", "linux"], + "lua" : ["ios_mac", "android", "win32", "linux"], + "javascript" : ["ios_mac", "android", "win32"] + } + self.context = { + "language": None, + "src_project_name": None, + "src_package_name": None, + "dst_project_name": None, + "dst_package_name": None, + "src_project_path": None, + "dst_project_path": None, + "script_dir": None + } + self.platforms_list = [] + self.cocos_root =os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..")) + self.callbackfun = None + self.totalStep =1 + self.step=0 + + def checkParams(self): + """Custom and check param list. + """ + from optparse import OptionParser + # set the parser to parse input params + # the correspond variable name of "-x, --xxx" is parser.xxx + parser = OptionParser( + usage="Usage: %prog -n -k -l -p \n\ + Sample: %prog -n MyGame -k com.MyCompany.AwesomeGame -l javascript -p c:/mycompany" + ) + parser.add_option("-n", "--name", metavar="PROJECT_NAME",help="Set a project name") + parser.add_option("-k", "--package", metavar="PACKAGE_NAME",help="Set a package name for project") + parser.add_option("-l", "--language",metavar="PROGRAMMING_NAME", + type="choice", + choices=["cpp", "lua", "javascript"], + help="Major programming language you want to use, should be [cpp | lua | javascript]") + parser.add_option("-p", "--path", metavar="PROJECT_PATH",help="Set generate project path for project") + + # parse the params + (opts, args) = parser.parse_args() + if not opts.name: + parser.error("-n or --name is not specified") + + if not opts.package: + parser.error("-k or --package is not specified") + + if not opts.language: + parser.error("-l or --language is not specified") + + if not opts.path: + parser.error("-p or --path is not specified") + + return opts.name, opts.package, opts.language, opts.path + + def createPlatformProjects(self, projectName, packageName, language, projectPath, callbackfun = None): + """ Create a plantform project. + Arg: + projectName: Project name, like this: "helloworld". + packageName: It's used for android platform,like this:"com.cocos2dx.helloworld". + language: There have three languages can be choice: [cpp | lua | javascript], like this:"javascript". + projectPath: The path of generate project. + callbackfun: It's new project callback function.There have four Params. + As follow: + def newProjectCallBack(step, totalStep, showMsg): + #step: processing step,at present + #totalStep: all the steps + #showMsg: message about the progress + pass + + """ + self.callbackfun = callbackfun + + # init our internal params + self.context["dst_project_name"] = projectName + self.context["dst_package_name"] = packageName + self.context["language"] = language + self.context["dst_project_path"] = os.path.join(projectPath,projectName) + self.context["script_dir"] = os.path.abspath(os.path.dirname(__file__)) + + # fill in src_project_name and src_package_name according to "language" + template_dir = os.path.abspath(os.path.join(self.cocos_root, "template")) + if ("cpp" == self.context["language"]): + self.context["src_project_name"] = "HelloCpp" + self.context["src_package_name"] = "org.cocos2dx.hellocpp" + self.context["src_project_path"] = os.path.join(template_dir, "multi-platform-cpp") + elif ("lua" == self.context["language"]): + self.context["src_project_name"] = "HelloLua" + self.context["src_package_name"] = "org.cocos2dx.hellolua" + self.context["src_project_path"] = os.path.join(template_dir, "multi-platform-lua") + elif ("javascript" == self.context["language"]): + self.context["src_project_name"] = "HelloJavascript" + self.context["src_package_name"] = "org.cocos2dx.hellojavascript" + self.context["src_project_path"] = os.path.join(template_dir, "multi-platform-js") + else: + print ("Your language parameter doesn\'t exist." \ + "Check correct language option\'s parameter") + return False + + # copy "lauguage"(cpp/lua/javascript) platform.proj into cocos2d-x/projects//folder + if os.path.exists(self.context["dst_project_path"]): + print ("Error:" + self.context["dst_project_path"] + " folder is already existing") + print ("Please remove the old project or choose a new PROJECT_NAME in -project parameter") + return False + else: + shutil.copytree(self.context["src_project_path"], self.context["dst_project_path"], True) + + # + dirlist = os.listdir(self.cocos_root) + if (not "cocos" in dirlist) or (not "extensions" in dirlist): + print ("The Cocos2d Engine doesn\'t exist." \ + "Check engine path, please") + return False + + # call process_proj from each platform's script folder + self.platforms_list = self.platforms.get(self.context["language"], []) + self.totalStep = len(self.platforms_list) + len(dirlist) + self.step = 0 + for platform in self.platforms_list: + self.__processPlatformProjects(platform) + + # copy cocos2d engine. + if not self.__copyCocos2dEngine(): + print "New project Failure" + if os.path.exists(self.context["dst_project_path"]): + shutil.rmtree(self.context["dst_project_path"]) + return False + + print ("\n") + print ("New project has been created in this path: " + self.context["dst_project_path"].replace("\\", "/")) + print ("Have Fun!") + return True + + def __copyCocos2dEngine(self): + """Copy cocos2d engine to dst_project_path. + Arg: + empty + """ + + ignoreList={ + "samples": None, + "docs": None, + "licenses": None, + "template": None + } + + # create "cocos2d" folder + dstPath = os.path.join(self.context["dst_project_path"],"cocos2d") + if not os.path.exists(dstPath): + os.makedirs(dstPath) + + # begin copy + print("\n") + print("begin copy engine...") + # list engine root dir. + dirlist = os.listdir(self.cocos_root) + for line in dirlist: + filepath = os.path.join(self.cocos_root,line) + showMsg = "%s\t\t\t: Done!" % line + self.step += 1 + if self.callbackfun: + self.callbackfun(self.step,self.totalStep,showMsg) + if ignoreList.has_key(line): + continue + if os.path.isdir(filepath): + shutil.copytree(filepath, os.path.join(dstPath,line), True) + print (showMsg) + else: + shutil.copyfile(filepath, os.path.join(dstPath,line)) + #print ("%s\t\t\t: Done!" % line) + return True + + def __processPlatformProjects(self, platform): + """ Process each platform project. + Arg: + platform: win32、android、ios + """ + + # determine proj_path + proj_path = os.path.join(self.context["dst_project_path"], "proj." + platform) + java_package_path = "" + + # read json config file for the current platform + conf_path = os.path.join(self.context["script_dir"], "%s.json" % platform) + f = open(conf_path) + data = json.load(f) + + # rename package path, like "org.cocos2dx.hello" to "com.company.game". This is a special process for android + if platform == "android": + src_pkg = self.context["src_package_name"].split('.') + dst_pkg = self.context["dst_package_name"].split('.') + + 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", self.context["src_project_name"]) + dst = tmp.replace("PROJECT_NAME", self.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", self.context["dst_project_name"]) + if os.path.exists(os.path.join(proj_path, dst)): + shutil.rmtree(os.path.join(proj_path, dst)) + + # rename package_name. This should be replaced at first. Don't change this sequence + for item in data["replace_package_name"]: + tmp = item.replace("PACKAGE_PATH", java_package_path) + dst = tmp.replace("PROJECT_NAME", self.context["dst_project_name"]) + if os.path.exists(os.path.join(proj_path, dst)): + replaceString(os.path.join(proj_path, dst), self.context["src_package_name"], self.context["dst_package_name"]) + + # rename project_name + for item in data["replace_project_name"]: + tmp = item.replace("PACKAGE_PATH", java_package_path) + dst = tmp.replace("PROJECT_NAME", self.context["dst_project_name"]) + if os.path.exists(os.path.join(proj_path, dst)): + replaceString(os.path.join(proj_path, dst), self.context["src_project_name"], self.context["dst_project_name"]) + + # done! + showMsg = "proj.%s\t\t: Done!" % platform + self.step += 1 + if self.callbackfun: + self.callbackfun(self.step,self.totalStep,showMsg) + print (showMsg) + # end of processPlatformProjects + +# -------------- main -------------- +# dump argvs +# print sys.argv +if __name__ == '__main__': + project = CocosProject() + name, package, language, path = project.checkParams() + project.createPlatformProjects(name, package, language, path) + diff --git a/tools/project-creator/module/ui.py b/tools/project-creator/module/ui.py new file mode 100644 index 0000000000..8ce767a1df --- /dev/null +++ b/tools/project-creator/module/ui.py @@ -0,0 +1,197 @@ +#!/usr/bin/python +#coding=utf-8 +# ui.py +# Create cross-platform cocos2d-x project +# Copyright (c) 2012 cocos2d-x.org +# Author: chuanwei + + +import platform +import os, os.path +import shutil +import threading +import Queue +import time + +from core import CocosProject + +if int(platform.python_version().split('.')[0])>=3: + from tkinter import * + from tkinter.filedialog import * + from tkinter.messagebox import * +else: + from Tkinter import * + from tkFileDialog import * + from tkMessageBox import * + + + +class ThreadedTask(threading.Thread): + def __init__(self, queue, projectName, packageName, language, projectPath): + threading.Thread.__init__(self) + self.queue = queue + self.projectName = projectName + self.packageName = packageName + self.language = language + self.projectPath = projectPath + + def run(self): + + if os.path.exists(os.path.join(self.projectPath, self.projectName)): + shutil.rmtree(os.path.join(self.projectPath, self.projectName)) + putMsg = "begin@%d@%d@%s" %(0,100,"begin create") + self.queue.put(putMsg) + project = CocosProject() + breturn=project.createPlatformProjects( + self.projectName, + self.packageName, + self.language, + self.projectPath, + self.newProjectCallBack + ) + if breturn: + putMsg = "end@%d@%d@%s" %(100,100,"create successful") + else: + putMsg = "end@%d@%d@%s" %(100,100,"create failure") + self.queue.put(putMsg) + + def newProjectCallBack(self, step, totalStep, showMsg): + putMsg = "doing@%d@%d@%s" %(step,totalStep,showMsg) + self.queue.put(putMsg) + +class TkProjectDialog(): + def __init__(self): + + #reload(sys) + #sys.setdefaultencoding('utf-8') + self.projectName = "" + self.packageName = "" + self.language = "" + + self.top = Tk() + top_width = 500 + top_height = 250 + screen_width = self.top.winfo_screenwidth() + screen_height = self.top.winfo_screenheight() + #center window on desktop + #self.top.geometry('%sx%s+%s+%s' % (top_width,top_height, int((screen_width - top_width)/2), int((screen_height - top_height)/2)) ) + #self.top.maxsize(top_width,top_height) + #self.top.minsize(top_width,top_height) + self.top.title("CocosCreateProject") + + self.frameName = Frame(self.top) + self.labName = Label(self.frameName,text="project_name:",width=15) + self.strName=StringVar() + self.strName.set("MyGame") + self.editName = Entry(self.frameName,textvariable=self.strName,width=40 ) + self.labName.pack(side = LEFT,fill = BOTH) + self.editName.pack(side = LEFT) + self.frameName.pack(padx=0,pady=10,anchor="nw") + + self.framePackage = Frame(self.top) + self.labPackage = Label(self.framePackage,text="package_name:",width=15) + self.strPackage=StringVar() + self.strPackage.set("com.MyCompany.AwesomeGame") + self.editPackage = Entry(self.framePackage,textvariable=self.strPackage,width=40 ) + self.labPackage.pack(side = LEFT) + self.editPackage.pack(side = LEFT) + self.framePackage.pack(padx=0, anchor="nw") + + self.framePath = Frame(self.top) + self.labPath = Label(self.framePath,text="project_path:",width=15) + self.editPath = Entry(self.framePath,width=40) + self.btnPath = Button(self.framePath,text="...",width=10,command = self.pathCallback) + self.labPath.pack(side = LEFT) + self.editPath.pack(side = LEFT) + self.btnPath.pack(side = RIGHT) + self.framePath.pack(padx=0,pady=10,anchor="nw") + + self.frameLanguage = Frame(self.top) + self.labLanguage = Label(self.frameLanguage,text="language:",width=15) + self.var=IntVar() + self.var.set(1) + self.checkcpp = Radiobutton(self.frameLanguage,text="cpp", variable=self.var, value=1, width=8) + self.checklua = Radiobutton(self.frameLanguage,text="lua", variable=self.var, value=2, width=8) + self.checkjs = Radiobutton(self.frameLanguage,text="javascript", variable=self.var, value=3, width=15) + self.labLanguage.pack(side = LEFT) + self.checkcpp.pack(side = LEFT) + self.checklua.pack(side = LEFT) + self.checkjs.pack(side = LEFT) + self.frameLanguage.pack(padx=0,anchor="nw") + + self.progress = Scale(self.top,state= DISABLED,length=400,from_=0,to=100,orient=HORIZONTAL) + self.progress.set(0) + self.progress.pack(padx=10,pady=0,anchor="nw") + + self.frameOperate = Frame(self.top) + self.btnCreate = Button(self.frameOperate, text="create", width=15, height =5, command = self.createBtnCallback) + self.btnCreate.pack(side = LEFT) + self.frameOperate.pack(pady=20) + + self.top.mainloop() + + def process_queue(self): + + if self.queue.empty(): + self.top.after(100, self.process_queue) + return + msg = self.queue.get(0) + msglist = msg.split("@") + if len(msglist) < 4: + return + + if msglist[0] == "begin": + pass + elif msglist[0] == "doing": + self.progress.set(0) + elif msglist[0] == "end": + showwarning("create", msglist[3]) + self.btnCreate['state'] = NORMAL + + self.progress.set(int(int(msglist[1])*100/int(msglist[2]))) + + def createBtnCallback(self): + + projectName = self.editName.get() + if projectName == "": + showwarning("warning", "project_name is empty") + return + + packageName = self.editPackage.get() + if packageName == "": + showwarning("warning", "package_name is empty") + return + + language = "cpp" + if self.var.get() == 1: + language = "cpp" + elif self.var.get() == 2: + language = "lua" + elif self.var.get() == 3: + language = "javascript" + + projectPath = self.editPath.get() + if projectPath == "": + showwarning("warning", "project_path is empty") + return + + if os.path.exists(os.path.join(projectPath, projectName)): + if not askyesno("warning", "%s had exist,do you want to recreate!" %projectName ): + return + + print("state start") + self.btnCreate['state'] = DISABLED + self.queue = Queue.Queue() + print("state end") + ThreadedTask(self.queue, projectName, packageName, language, projectPath).start() + self.top.after(100, self.process_queue) + + def pathCallback(self): + filepath = askdirectory() + if filepath: + self.editPath.delete(0, END) + self.editPath.insert(0, filepath) + #entry.insert(0,filepath) + +if __name__ =='__main__': + TkProjectDialog() \ No newline at end of file