diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id index 81b945434f..e48cb4ba94 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -7658fe75258895d82e9432317ff63b182547bcdc \ No newline at end of file +9fac2ba89faf5e6f3c870c02f5186641e6be1590 \ No newline at end of file diff --git a/cocos/gui/Android.mk b/cocos/gui/Android.mk index 197a65f3ad..31edffec85 100644 --- a/cocos/gui/Android.mk +++ b/cocos/gui/Android.mk @@ -1,7 +1,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := gui_static +LOCAL_MODULE := cocos_gui_static LOCAL_MODULE_FILENAME := libgui diff --git a/cocos/network/Android.mk b/cocos/network/Android.mk index 1e739f3d69..d2f83a52dc 100644 --- a/cocos/network/Android.mk +++ b/cocos/network/Android.mk @@ -1,7 +1,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := network_static +LOCAL_MODULE := cocos_network_static LOCAL_MODULE_FILENAME := libnetwork diff --git a/cocos/scripting/javascript/bindings/Android.mk b/cocos/scripting/javascript/bindings/Android.mk index 2aca99df10..7482cdef26 100644 --- a/cocos/scripting/javascript/bindings/Android.mk +++ b/cocos/scripting/javascript/bindings/Android.mk @@ -2,9 +2,9 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := scriptingcore-spidermonkey +LOCAL_MODULE := cocos_jsb_static -LOCAL_MODULE_FILENAME := libscriptingcore-spidermonkey +LOCAL_MODULE_FILENAME := libcocos2dxjsb LOCAL_SRC_FILES := ScriptingCore.cpp \ cocos2d_specifics.cpp \ @@ -34,18 +34,40 @@ LOCAL_EXPORT_CFLAGS := -DCOCOS2D_JAVASCRIPT LOCAL_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/../../../CocosDenshion/include \ - $(LOCAL_PATH)/../../auto-generated/js-bindings + $(LOCAL_PATH)/../../auto-generated/js-bindings \ + $(LOCAL_PATH)/../../../../extensions \ + $(LOCAL_PATH)/../../../editor-support/cocostudio LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/../../auto-generated/js-bindings + $(LOCAL_PATH)/../../auto-generated/js-bindings -LOCAL_WHOLE_STATIC_LIBRARIES := spidermonkey_static +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static +LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocosbuilder_static +LOCAL_WHOLE_STATIC_LIBRARIES += spine_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static +LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocos_localstorage_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static +LOCAL_WHOLE_STATIC_LIBRARIES += websockets_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocos_gui_static LOCAL_LDLIBS := -landroid LOCAL_LDLIBS += -llog include $(BUILD_STATIC_LIBRARY) -$(call import-module,scripting/javascript/spidermonkey-android) +$(call import-module,spidermonkey/prebuilt/android) $(call import-module,extensions) +$(call import-module,2d) +$(call import-module,extensions) +$(call import-module,editor-support/cocosbuilder) +$(call import-module,editor-support/spine) +$(call import-module,network) +$(call import-module,chipmunk) +$(call import-module,storage/local-storage) +$(call import-module,editor-support/cocostudio) +$(call import-module,websockets/prebuilt/android) +$(call import-module,gui) diff --git a/cocos/scripting/javascript/bindings/ScriptingCore.cpp b/cocos/scripting/javascript/bindings/ScriptingCore.cpp index 101005be60..c4603fc8c0 100644 --- a/cocos/scripting/javascript/bindings/ScriptingCore.cpp +++ b/cocos/scripting/javascript/bindings/ScriptingCore.cpp @@ -16,7 +16,7 @@ #include "ScriptingCore.h" #include "jsdbgapi.h" #include "cocos2d.h" -#include "LocalStorage.h" +#include "local-storage/LocalStorage.h" #include "cocos2d_specifics.hpp" #include "js_bindings_config.h" // for debug socket diff --git a/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp b/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp index 2230a4a94d..cc7b72c586 100644 --- a/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp +++ b/cocos/scripting/javascript/bindings/XMLHTTPRequest.cpp @@ -67,7 +67,7 @@ void MinXmlHttpRequest::_gotHeader(string header) { // Seems like we have the response Code! Parse it and check for it. char * pch; - std::strcpy(cstr, header.c_str()); + strcpy(cstr, header.c_str()); pch = strtok(cstr," "); while (pch != NULL) diff --git a/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id b/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id index 0204ef566e..b8cda9a498 100644 --- a/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id +++ b/cocos/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id @@ -1 +1 @@ -2641da58037c13f92ae771830a1fdf943e4964d2 \ No newline at end of file +bf994ad1fc8ac1044957d83708f7848e99ca59e6 \ No newline at end of file diff --git a/cocos/scripting/javascript/bindings/js_bindings_chipmunk_manual.cpp b/cocos/scripting/javascript/bindings/js_bindings_chipmunk_manual.cpp index 6233ae2553..14a88c87bb 100644 --- a/cocos/scripting/javascript/bindings/js_bindings_chipmunk_manual.cpp +++ b/cocos/scripting/javascript/bindings/js_bindings_chipmunk_manual.cpp @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -#include "cocos-ext.h" +#include "extensions/cocos-ext.h" #include "js_bindings_config.h" #ifdef JSB_INCLUDE_CHIPMUNK diff --git a/cocos/scripting/javascript/bindings/js_bindings_system_functions.cpp b/cocos/scripting/javascript/bindings/js_bindings_system_functions.cpp index 1cb171224b..7d1a819fc8 100644 --- a/cocos/scripting/javascript/bindings/js_bindings_system_functions.cpp +++ b/cocos/scripting/javascript/bindings/js_bindings_system_functions.cpp @@ -7,7 +7,7 @@ #include "js_bindings_config.h" //#ifdef JSB_INCLUDE_SYSTEM -#include "LocalStorage.h" +#include "local-storage/LocalStorage.h" #include "jsfriendapi.h" #include "js_bindings_config.h" diff --git a/cocos/scripting/javascript/bindings/js_bindings_system_registration.cpp b/cocos/scripting/javascript/bindings/js_bindings_system_registration.cpp index 040a49b410..bf55e188f0 100644 --- a/cocos/scripting/javascript/bindings/js_bindings_system_registration.cpp +++ b/cocos/scripting/javascript/bindings/js_bindings_system_registration.cpp @@ -24,7 +24,7 @@ #include "js_bindings_config.h" #include "js_bindings_core.h" -#include "LocalStorage.h" +#include "local-storage/LocalStorage.h" #include "cocos2d.h" // system diff --git a/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp b/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp index 7a6d8bfc46..413f941bca 100644 --- a/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp +++ b/cocos/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp @@ -6,7 +6,7 @@ // #include "jsb_cocos2dx_extension_manual.h" -#include "cocos-ext.h" +#include "extensions/cocos-ext.h" #include "ScriptingCore.h" #include "cocos2d_specifics.hpp" #include "cocostudio/CocoStudio.h" diff --git a/cocos/scripting/javascript/bindings/jsb_websocket.cpp b/cocos/scripting/javascript/bindings/jsb_websocket.cpp index 49ecf7e57e..b5083ad268 100644 --- a/cocos/scripting/javascript/bindings/jsb_websocket.cpp +++ b/cocos/scripting/javascript/bindings/jsb_websocket.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "jsb_websocket.h" #include "cocos2d.h" -#include "WebSocket.h" +#include "network/WebSocket.h" #include "spidermonkey_specifics.h" #include "ScriptingCore.h" #include "cocos2d_specifics.hpp" diff --git a/cocos/storage/local-storage/Android.mk b/cocos/storage/local-storage/Android.mk index 67db9c191b..ee9d93e36b 100644 --- a/cocos/storage/local-storage/Android.mk +++ b/cocos/storage/local-storage/Android.mk @@ -1,19 +1,24 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := localstorage_static +LOCAL_MODULE := cocos_localstorage_static LOCAL_MODULE_FILENAME := liblocalstorage -LOCAL_SRC_FILES := LocalStorage.cpp -LocalStorageAndroid.cpp \ +LOCAL_SRC_FILES := LocalStorage.cpp \ +LocalStorageAndroid.cpp -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. + LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d LOCAL_CFLAGS += -Wno-psabi LOCAL_EXPORT_CFLAGS += -Wno-psabi +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static + include $(BUILD_STATIC_LIBRARY) + +$(call import-module,2d) diff --git a/external/spidermonkey/prebuilt/android/Android.mk b/external/spidermonkey/prebuilt/android/Android.mk index 7891f4a46e..74f0e9b6a8 100644 --- a/external/spidermonkey/prebuilt/android/Android.mk +++ b/external/spidermonkey/prebuilt/android/Android.mk @@ -3,8 +3,8 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := spidermonkey_static LOCAL_MODULE_FILENAME := js_static -LOCAL_SRC_FILES := ./lib/$(TARGET_ARCH_ABI)/libjs_static.a -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include +LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libjs_static.a +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android LOCAL_CPPFLAGS := -D__STDC_LIMIT_MACROS=1 -Wno-invalid-offsetof LOCAL_EXPORT_CPPFLAGS := -D__STDC_LIMIT_MACROS=1 -Wno-invalid-offsetof include $(PREBUILT_STATIC_LIBRARY) diff --git a/external/websockets/prebuilt/android/Android.mk b/external/websockets/prebuilt/android/Android.mk index a5f14e0456..1547fc6140 100644 --- a/external/websockets/prebuilt/android/Android.mk +++ b/external/websockets/prebuilt/android/Android.mk @@ -1,7 +1,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := libwebsockets_static +LOCAL_MODULE := websockets_static LOCAL_MODULE_FILENAME := libwebsockets_static LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libwebsockets.a LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include/android diff --git a/samples/Cpp/TestCpp/Android.mk b/samples/Cpp/TestCpp/Android.mk index bd0a8e37e6..f54ac22e3b 100644 --- a/samples/Cpp/TestCpp/Android.mk +++ b/samples/Cpp/TestCpp/Android.mk @@ -148,9 +148,9 @@ LOCAL_WHOLE_STATIC_LIBRARIES += chipmunk_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static LOCAL_WHOLE_STATIC_LIBRARIES += cocosbuilder_static LOCAL_WHOLE_STATIC_LIBRARIES += spine_static -LOCAL_WHOLE_STATIC_LIBRARIES += gui_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocos_gui_static LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static -LOCAL_WHOLE_STATIC_LIBRARIES += network_static +LOCAL_WHOLE_STATIC_LIBRARIES += cocos_network_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_curl_static LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/Classes diff --git a/samples/Javascript/TestJavascript/proj.android/build_native.sh b/samples/Javascript/TestJavascript/proj.android/build_native.sh index b3f633e707..3378f4006a 100755 --- a/samples/Javascript/TestJavascript/proj.android/build_native.sh +++ b/samples/Javascript/TestJavascript/proj.android/build_native.sh @@ -76,7 +76,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" COCOS2DX_ROOT="$DIR/../../../.." APP_ROOT="$DIR/.." APP_ANDROID_ROOT="$DIR" -BINDINGS_JS_ROOT="$APP_ROOT/../../../scripting/javascript/bindings/js" +BINDINGS_JS_ROOT="$APP_ROOT/../../../cocos/scripting/javascript/script" echo echo "Paths" @@ -110,5 +110,5 @@ echo set -x "$NDK_ROOT"/ndk-build $PARALLEL_BUILD_FLAG -C "$APP_ANDROID_ROOT" $* \ - "NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt" \ + "NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos:${COCOS2DX_ROOT}/external" \ NDK_LOG=0 V=0 diff --git a/samples/Javascript/TestJavascript/proj.android/jni/Android.mk b/samples/Javascript/TestJavascript/proj.android/jni/Android.mk index 5655c291c2..89d17346d0 100644 --- a/samples/Javascript/TestJavascript/proj.android/jni/Android.mk +++ b/samples/Javascript/TestJavascript/proj.android/jni/Android.mk @@ -11,20 +11,10 @@ LOCAL_SRC_FILES := testjavascript/main.cpp \ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes -LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static -LOCAL_WHOLE_STATIC_LIBRARIES += spidermonkey_static -LOCAL_WHOLE_STATIC_LIBRARIES += scriptingcore-spidermonkey -LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dxandroid_static +LOCAL_WHOLE_STATIC_LIBRARIES := cocos_jsb_static -LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT +LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 include $(BUILD_SHARED_LIBRARY) -$(call import-module,cocos2dx) -$(call import-module,audio/android) -$(call import-module,extensions) -$(call import-module,scripting/javascript/spidermonkey-android) $(call import-module,scripting/javascript/bindings) -$(call import-module,cocos2dx/platform/android)