Skip to content

Commit

Permalink
Merge pull request cocos2d#1914 from minggo/master
Browse files Browse the repository at this point in the history
fix some logical errors and compiling errors
  • Loading branch information
minggo committed Jan 28, 2013
2 parents bdf74e6 + fb51e45 commit a9b7708
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
4 changes: 3 additions & 1 deletion cocos2dx/platform/android/CCFileUtils.cpp
Expand Up @@ -23,6 +23,7 @@ THE SOFTWARE.
****************************************************************************/

#define __CC_PLATFORM_FILEUTILS_CPP__
#include <string>
#include "platform/CCFileUtilsCommon_cpp.h"
#include "support/zip_support/ZipUtils.h"
#include "platform/CCCommon.h"
Expand Down Expand Up @@ -198,7 +199,8 @@ unsigned char* CCFileUtils::getFileData(const char* pszFileName, const char* psz
if (pszFileName[0] != '/')
{
CCLOG("GETTING FILE RELATIVE DATA: %s", pszFileName);
pData = s_pZipFile->getFileData(pszFileName, pSize);
string fullPath = fullPathForFilename(pszFileName);
pData = s_pZipFile->getFileData(fullPath.c_str(), pSize);
}
else
{
Expand Down
Empty file modified samples/Lua/HelloLua/proj.android/build_native.sh 100644 → 100755
Empty file.
6 changes: 1 addition & 5 deletions samples/Lua/HelloLua/proj.android/jni/Android.mk
Expand Up @@ -7,11 +7,7 @@ LOCAL_MODULE := hellolua_shared
LOCAL_MODULE_FILENAME := libhellolua

LOCAL_SRC_FILES := hellolua/main.cpp \
../../Classes/AppDelegate.cpp \
../../../../scripting/lua/cocos2dx_support/CCLuaEngine.cpp \
../../../../scripting/lua/cocos2dx_support/Cocos2dxLuaLoader.cpp \
../../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp \
../../../../scripting/lua/cocos2dx_support/tolua_fix.c
../../Classes/AppDelegate.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

Expand Down
6 changes: 3 additions & 3 deletions samples/Lua/TestLua/proj.android/build_native.sh 100644 → 100755
Expand Up @@ -44,8 +44,8 @@ if [ -z "${COCOS2DX_ROOT+aaa}" ]; then
APP_ROOT="$DIR/.."
APP_ANDROID_ROOT="$DIR"
else
APP_ROOT="$COCOS2DX_ROOT"/samples/"$APPNAME"
APP_ANDROID_ROOT="$COCOS2DX_ROOT"/samples/"$APPNAME"/proj.android
APP_ROOT="$COCOS2DX_ROOT"/samples/Lua/"$APPNAME"
APP_ANDROID_ROOT="$COCOS2DX_ROOT"/samples/Lua/"$APPNAME"/proj.android
fi

echo "NDK_ROOT = $NDK_ROOT"
Expand All @@ -61,7 +61,7 @@ fi
mkdir "$APP_ANDROID_ROOT"/assets

# copy resources
for file in "$APP_ROOT"/../TestCpp/Resources/*
for file in "$APP_ROOT"/../../Cpp/TestCpp/Resources/*
do
if [ -d "$file" ]; then
cp -rf "$file" "$APP_ANDROID_ROOT"/assets
Expand Down
7 changes: 2 additions & 5 deletions samples/Lua/TestLua/proj.android/jni/Android.mk
Expand Up @@ -7,11 +7,8 @@ LOCAL_MODULE := testlua_shared
LOCAL_MODULE_FILENAME := libtestlua

LOCAL_SRC_FILES := testlua/main.cpp \
../../Classes/AppDelegate.cpp \
../../../../scripting/lua/cocos2dx_support/CCLuaEngine.cpp \
../../../../scripting/lua/cocos2dx_support/Cocos2dxLuaLoader.cpp \
../../../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp \
../../../../scripting/lua/cocos2dx_support/tolua_fix.c
../../Classes/AppDelegate.cpp


LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

Expand Down

0 comments on commit a9b7708

Please sign in to comment.