From 35b211a2fea12daec15ccf039138640e57931538 Mon Sep 17 00:00:00 2001 From: sunzhuoshi Date: Sun, 14 Dec 2014 01:05:57 +0800 Subject: [PATCH 1/3] Ignored .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 78309050..3f75f1b4 100644 --- a/.gitignore +++ b/.gitignore @@ -89,4 +89,5 @@ frameworks/cocos2d-x/build/build frameworks/runtime-src/proj.android/project.properties frameworks/cocos2d-x/cocos/platform/android/java/project.properties frameworks/cocos2d-x/cocos/scripting/lua-bindings/proj.ios_mac/build -frameworks/runtime-src/proj.ios_mac/build \ No newline at end of file +frameworks/runtime-src/proj.ios_mac/build +.gitignore From 2626ec0287b4de67814395bfd1a4b891d2bff638 Mon Sep 17 00:00:00 2001 From: sunzhuoshi Date: Sun, 14 Dec 2014 01:06:22 +0800 Subject: [PATCH 2/3] Added running issue(s) on Android --- frameworks/runtime-src/Classes/runtime/Runtime.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frameworks/runtime-src/Classes/runtime/Runtime.cpp b/frameworks/runtime-src/Classes/runtime/Runtime.cpp index 0cad7108..b753dbc3 100644 --- a/frameworks/runtime-src/Classes/runtime/Runtime.cpp +++ b/frameworks/runtime-src/Classes/runtime/Runtime.cpp @@ -1086,9 +1086,10 @@ int lua_cocos2dx_runtime_addSearchPath(lua_State* tolua_S) if (!FileUtils::getInstance()->isAbsolutePath(originPath)) #if(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) cobj->addSearchPath(g_projectPath + originPath); -#endif -#if(CC_TARGET_PLATFORM == CC_PLATFORM_IOS) +#elif(CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) cobj->addSearchPath(originPath); +#else + CCASSERT(false, "[lua_cocos2dx_runtime_addSearchPath] Unsupported platform!"); #endif return 0; } From 8f8cd0030aaf92e4db856de077ebafe8d936759f Mon Sep 17 00:00:00 2001 From: sunzhuoshi Date: Sun, 14 Dec 2014 01:22:20 +0800 Subject: [PATCH 3/3] Fixed Android building error(s) --- frameworks/runtime-src/proj.android/jni/Android.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frameworks/runtime-src/proj.android/jni/Android.mk b/frameworks/runtime-src/proj.android/jni/Android.mk index 1bf590d4..6e120998 100644 --- a/frameworks/runtime-src/proj.android/jni/Android.mk +++ b/frameworks/runtime-src/proj.android/jni/Android.mk @@ -40,6 +40,10 @@ $(LOCAL_PATH)/../../../cocos2d-x/external LOCAL_STATIC_LIBRARIES := cocos2d_lua_static +$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d-x/) +$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d-x/cocos/) +$(call import-add-path,$(LOCAL_PATH)/../../../cocos2d-x/external/) + include $(BUILD_SHARED_LIBRARY) $(call import-module,scripting/lua-bindings/proj.android)