From 9c3cac759ceb8c2814328dce6bdb5ec0dfe67029 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 17 Oct 2013 18:39:37 +0800 Subject: [PATCH] issue #2905:simple game and assets manager build ok on android --- cocos/scripting/javascript/bindings/Android.mk | 3 ++- samples/Cpp/AssetsManagerTest/Classes/AppDelegate.h | 2 +- .../Cpp/AssetsManagerTest/proj.android/build_native.sh | 4 ++-- .../Cpp/AssetsManagerTest/proj.android/jni/Android.mk | 10 +--------- samples/Cpp/SimpleGame/proj.android/build_native.sh | 2 +- samples/Cpp/SimpleGame/proj.android/jni/Android.mk | 6 ++---- 6 files changed, 9 insertions(+), 18 deletions(-) diff --git a/cocos/scripting/javascript/bindings/Android.mk b/cocos/scripting/javascript/bindings/Android.mk index 27a3b51306..5689684060 100644 --- a/cocos/scripting/javascript/bindings/Android.mk +++ b/cocos/scripting/javascript/bindings/Android.mk @@ -36,7 +36,8 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/../../../CocosDenshion/include \ $(LOCAL_PATH)/../../auto-generated/js-bindings \ $(LOCAL_PATH)/../../../../extensions \ - $(LOCAL_PATH)/../../../editor-support/cocostudio + $(LOCAL_PATH)/../../../editor-support/cocostudio \ + $(LOCAL_PATH)/../../../editor-support/cocosbuilder LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/../../auto-generated/js-bindings diff --git a/samples/Cpp/AssetsManagerTest/Classes/AppDelegate.h b/samples/Cpp/AssetsManagerTest/Classes/AppDelegate.h index 7fcf54741d..2a0dae6d7b 100644 --- a/samples/Cpp/AssetsManagerTest/Classes/AppDelegate.h +++ b/samples/Cpp/AssetsManagerTest/Classes/AppDelegate.h @@ -11,7 +11,7 @@ #include "CCApplication.h" #include "cocos2d.h" -#include "AssetsManager/AssetsManager.h" +#include "extensions/assets-manager/AssetsManager.h" /** @brief The cocos2d Application. diff --git a/samples/Cpp/AssetsManagerTest/proj.android/build_native.sh b/samples/Cpp/AssetsManagerTest/proj.android/build_native.sh index cfc39f5472..30549e8869 100755 --- a/samples/Cpp/AssetsManagerTest/proj.android/build_native.sh +++ b/samples/Cpp/AssetsManagerTest/proj.android/build_native.sh @@ -68,7 +68,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 "NDK_ROOT = $NDK_ROOT" echo "COCOS2DX_ROOT = $COCOS2DX_ROOT" @@ -119,5 +119,5 @@ if [[ "$buildexternalsfromsource" ]]; then else echo "Using prebuilt externals" "$NDK_ROOT"/ndk-build -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" fi diff --git a/samples/Cpp/AssetsManagerTest/proj.android/jni/Android.mk b/samples/Cpp/AssetsManagerTest/proj.android/jni/Android.mk index 42c47b9f80..78d938432f 100644 --- a/samples/Cpp/AssetsManagerTest/proj.android/jni/Android.mk +++ b/samples/Cpp/AssetsManagerTest/proj.android/jni/Android.mk @@ -11,18 +11,10 @@ LOCAL_SRC_FILES := hellocpp/main.cpp \ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes -LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_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 include $(BUILD_SHARED_LIBRARY) -$(call import-module,cocos2dx) -$(call import-module,audio/android) -$(call import-module,scripting/javascript/spidermonkey-android) $(call import-module,scripting/javascript/bindings) -$(call import-module,cocos2dx/platform/android) diff --git a/samples/Cpp/SimpleGame/proj.android/build_native.sh b/samples/Cpp/SimpleGame/proj.android/build_native.sh index 1383ae1490..8f09b2bb6b 100755 --- a/samples/Cpp/SimpleGame/proj.android/build_native.sh +++ b/samples/Cpp/SimpleGame/proj.android/build_native.sh @@ -104,4 +104,4 @@ fi echo "Building in debug" "$NDK_ROOT"/ndk-build NDK_DEBUG=1 -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" diff --git a/samples/Cpp/SimpleGame/proj.android/jni/Android.mk b/samples/Cpp/SimpleGame/proj.android/jni/Android.mk index d0fd9a4eb2..cdc6ac3234 100644 --- a/samples/Cpp/SimpleGame/proj.android/jni/Android.mk +++ b/samples/Cpp/SimpleGame/proj.android/jni/Android.mk @@ -13,11 +13,9 @@ LOCAL_SRC_FILES := hellocpp/main.cpp \ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes -LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocos2dxandroid_static cocosdenshion_static +LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static include $(BUILD_SHARED_LIBRARY) $(call import-module,audio/android) -$(call import-module,cocos2dx) -$(call import-module,extensions) -$(call import-module,cocos2dx/platform/android) +$(call import-module,2d)