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 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; } 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)