From bedd62296f87f8377f6b77e83ca18a8f722e0db3 Mon Sep 17 00:00:00 2001 From: andyque Date: Thu, 7 May 2015 07:05:23 +0800 Subject: [PATCH 1/2] fix binding generator --- tools/tolua/cocos2dx_3d.ini | 2 +- tools/tolua/cocos2dx_audioengine.ini | 2 +- tools/tolua/cocos2dx_cocosbuilder.ini | 2 +- tools/tolua/cocos2dx_cocosdenshion.ini | 2 +- tools/tolua/cocos2dx_controller.ini | 2 +- tools/tolua/cocos2dx_experimental.ini | 2 +- tools/tolua/cocos2dx_experimental_video.ini | 2 +- tools/tolua/cocos2dx_experimental_webview.ini | 2 +- tools/tolua/cocos2dx_physics.ini | 2 +- tools/tolua/cocos2dx_spine.ini | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/tolua/cocos2dx_3d.ini b/tools/tolua/cocos2dx_3d.ini index 9670921a05..b23241fa2b 100644 --- a/tools/tolua/cocos2dx_3d.ini +++ b/tools/tolua/cocos2dx_3d.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID cxxgenerator_headers = diff --git a/tools/tolua/cocos2dx_audioengine.ini b/tools/tolua/cocos2dx_audioengine.ini index 717f3e62fe..d50bab7b0d 100644 --- a/tools/tolua/cocos2dx_audioengine.ini +++ b/tools/tolua/cocos2dx_audioengine.ini @@ -15,7 +15,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_cocosbuilder.ini b/tools/tolua/cocos2dx_cocosbuilder.ini index 410fdeb5a5..5b3d49d5c6 100644 --- a/tools/tolua/cocos2dx_cocosbuilder.ini +++ b/tools/tolua/cocos2dx_cocosbuilder.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_cocosdenshion.ini b/tools/tolua/cocos2dx_cocosdenshion.ini index 6e337f3b84..bbdf8117a3 100644 --- a/tools/tolua/cocos2dx_cocosdenshion.ini +++ b/tools/tolua/cocos2dx_cocosdenshion.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_controller.ini b/tools/tolua/cocos2dx_controller.ini index aed359d313..24de77361c 100644 --- a/tools/tolua/cocos2dx_controller.ini +++ b/tools/tolua/cocos2dx_controller.ini @@ -15,7 +15,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID cxxgenerator_headers = diff --git a/tools/tolua/cocos2dx_experimental.ini b/tools/tolua/cocos2dx_experimental.ini index 908f6e26c5..4c3946a5b4 100644 --- a/tools/tolua/cocos2dx_experimental.ini +++ b/tools/tolua/cocos2dx_experimental.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_experimental_video.ini b/tools/tolua/cocos2dx_experimental_video.ini index 918170b977..160429d700 100644 --- a/tools/tolua/cocos2dx_experimental_video.ini +++ b/tools/tolua/cocos2dx_experimental_video.ini @@ -15,7 +15,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_experimental_webview.ini b/tools/tolua/cocos2dx_experimental_webview.ini index 4e91348306..232322f38d 100644 --- a/tools/tolua/cocos2dx_experimental_webview.ini +++ b/tools/tolua/cocos2dx_experimental_webview.ini @@ -15,7 +15,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_physics.ini b/tools/tolua/cocos2dx_physics.ini index c5042f1dde..6a763b9d9d 100644 --- a/tools/tolua/cocos2dx_physics.ini +++ b/tools/tolua/cocos2dx_physics.ini @@ -15,7 +15,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID diff --git a/tools/tolua/cocos2dx_spine.ini b/tools/tolua/cocos2dx_spine.ini index 8520f7d06d..015d1e65b4 100644 --- a/tools/tolua/cocos2dx_spine.ini +++ b/tools/tolua/cocos2dx_spine.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android +cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external cocos_flags = -DANDROID From db950347988537f1730c44181f9c1f169907e35d Mon Sep 17 00:00:00 2001 From: andyque Date: Thu, 7 May 2015 10:37:19 +0800 Subject: [PATCH 2/2] fix android compile error --- cocos/2d/CCNode.h | 5 ----- cocos/Android.mk | 1 - cocos/audio/android/ccdandroidUtils.cpp | 3 ++- cocos/platform/android/jni/CocosPlayClient.cpp | 5 +++-- .../lua-bindings/manual/platform/android/CCLuaJavaBridge.h | 2 -- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 1b3b7a2195..5333bbb33f 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1047,11 +1047,6 @@ public: * @param glProgramState The GLProgramState for this node. */ virtual void setGLProgramState(GLProgramState *glProgramState); - - /** Returns the Material used for this Node */ - Material* getMaterial() const; - /** Sets the Material used for this Node */ - void setMaterial(Material* material); /// @} end of Shader Program diff --git a/cocos/Android.mk b/cocos/Android.mk index 7052165a5e..72efe81127 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -223,7 +223,6 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/../external/poly2tri/sweep LOCAL_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/. \ $(LOCAL_PATH)/platform \ $(LOCAL_PATH)/../external \ $(LOCAL_PATH)/../external/tinyxml2 \ diff --git a/cocos/audio/android/ccdandroidUtils.cpp b/cocos/audio/android/ccdandroidUtils.cpp index f167bbe1c6..9dbb3fe8ac 100644 --- a/cocos/audio/android/ccdandroidUtils.cpp +++ b/cocos/audio/android/ccdandroidUtils.cpp @@ -23,11 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "ccdandroidUtils.h" -#include "cocos2d.h" #include #include #include "jni/JniHelper.h" +#include "platform/CCFileUtils.h" + USING_NS_CC; diff --git a/cocos/platform/android/jni/CocosPlayClient.cpp b/cocos/platform/android/jni/CocosPlayClient.cpp index c9d934412f..13ecdf03bd 100644 --- a/cocos/platform/android/jni/CocosPlayClient.cpp +++ b/cocos/platform/android/jni/CocosPlayClient.cpp @@ -22,11 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CocosPlayClient.h" -#include "cocos2d.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include +#include +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "jni/JniHelper.h" #include "platform/CCCommon.h" +#include "platform/CCFileUtils.h" using namespace cocos2d; diff --git a/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h b/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h index 4e0b09ecbb..e7a12bf8a7 100644 --- a/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h +++ b/cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h @@ -4,7 +4,6 @@ #include #include #include -#include "cocos2d.h" using namespace std; @@ -12,7 +11,6 @@ extern "C" { #include "lua.h" } -using namespace cocos2d; #define LUAJ_ERR_OK 0 #define LUAJ_ERR_TYPE_NOT_SUPPORT (-1)