From 790be0decccb6f2d7e1071979447e3222222231e Mon Sep 17 00:00:00 2001 From: samuele3 Date: Mon, 4 Nov 2013 14:43:22 +0800 Subject: [PATCH] issue #3037:Modify vs2012 config --- extensions/assets-manager/AssetsManager.h | 2 +- .../Classes/lua_assetsmanager_test_sample.cpp | 14 ++------------ .../Lua/TestLua/proj.win32/TestLua.win32.vcxproj | 8 +++++--- .../proj.win32/TestLua.win32.vcxproj.filters | 6 ++++++ 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/extensions/assets-manager/AssetsManager.h b/extensions/assets-manager/AssetsManager.h index 80f0ae5d81..f3e413f4bd 100644 --- a/extensions/assets-manager/AssetsManager.h +++ b/extensions/assets-manager/AssetsManager.h @@ -145,7 +145,7 @@ public: * @js NA * @lua NA */ - AssetsManagerDelegateProtocol* getDelegate() { return _delegate ;} + AssetsManagerDelegateProtocol* getDelegate() const { return _delegate ;} /** @brief Sets connection time out in seconds */ diff --git a/samples/Lua/TestLua/Classes/lua_assetsmanager_test_sample.cpp b/samples/Lua/TestLua/Classes/lua_assetsmanager_test_sample.cpp index e3d6377f0b..7f0135f06e 100644 --- a/samples/Lua/TestLua/Classes/lua_assetsmanager_test_sample.cpp +++ b/samples/Lua/TestLua/Classes/lua_assetsmanager_test_sample.cpp @@ -26,10 +26,7 @@ static int lua_cocos2dx_createDownloadDir(lua_State* L) return 0; int argc = lua_gettop(L); -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - + if (0 == argc) { std::string pathToSave = FileUtils::getInstance()->getWritablePath(); @@ -50,18 +47,11 @@ static int lua_cocos2dx_createDownloadDir(lua_State* L) } #endif tolua_pushstring(L, pathToSave.c_str()); - CCLOG("the path to save is %s",pathToSave.c_str()); return 1; } CCLOG("'createDownloadDir' function wrong number of arguments: %d, was expecting %d\n", argc, 0); return 0; - -#if COCOS2D_DEBUG >= 1 -tolua_lerror: - tolua_error(L,"#ferror in function 'createDownloadDir'.",&tolua_err); - return 0; -#endif } static int lua_cocos2dx_deleteDownloadDir(lua_State* L) @@ -126,7 +116,7 @@ static int lua_cocos2dx_addSearchPath(lua_State* L) goto tolua_lerror; #endif std::string pathToSave = tolua_tostring(L, 1, ""); - bool before = tolua_toboolean(L, 2, 0); + bool before = (bool)tolua_toboolean(L, 2, 0); std::vector searchPaths = FileUtils::getInstance()->getSearchPaths(); if (before) { diff --git a/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj b/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj index f70904ac2f..b95a8da2f8 100644 --- a/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj +++ b/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj @@ -66,7 +66,7 @@ - $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\auto-generated\lua-bindings;$(EngineRoot)cocos\scripting\lua\bindings;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) + $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\auto-generated\lua-bindings;$(EngineRoot)cocos\scripting\lua\bindings;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) Level3 @@ -115,7 +115,7 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\\win32\*.*" "$(OutDir)" - $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\auto-generated\lua-bindings;$(EngineRoot)cocos\scripting\lua\bindings;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;%(AdditionalIncludeDirectories) + $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\auto-generated\lua-bindings;$(EngineRoot)cocos\scripting\lua\bindings;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) Level3 @@ -131,7 +131,7 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\\win32\*.*" "$(OutDir)"Windows MachineX86 $(OutDir);%(AdditionalLibraryDirectories) - lua51.lib;websockets.lib;%(AdditionalDependencies) + libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies) true @@ -163,10 +163,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\websockets\prebuilt\win32\*.*" "$ + + diff --git a/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj.filters b/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj.filters index 7517b68f2b..12f4b9ee7c 100644 --- a/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj.filters +++ b/samples/Lua/TestLua/proj.win32/TestLua.win32.vcxproj.filters @@ -15,6 +15,9 @@ win32 + + Classes + @@ -23,5 +26,8 @@ win32 + + Classes + \ No newline at end of file