fixed debug

This commit is contained in:
chuanweizhang2013 2014-05-08 16:02:55 +08:00
parent ee4b6ba2bc
commit 8f7cb74dd1
3 changed files with 576 additions and 540 deletions

File diff suppressed because it is too large Load Diff

View File

@ -724,9 +724,23 @@ static void register_runtime_override_function(lua_State* tolua_S)
lua_pop(tolua_S, 1);
}
bool initRuntime(string& execufile)
bool initRuntime(string& entryfile)
{
g_entryfile = execufile;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#ifndef _DEBUG
return false;
#endif
#elif(CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#ifdef NDEBUG
return false;
#endif
#elif(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#ifndef COCOS2D_DEBUG
return false;
#endif
#endif
g_entryfile = entryfile;
vector<string> searchPathArray;
searchPathArray=FileUtils::getInstance()->getSearchPaths();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
@ -749,6 +763,11 @@ bool initRuntime(string& execufile)
#endif
g_resourcePath=replaceAll(g_resourcePath,"\\","/");
if (g_resourcePath.at(g_resourcePath.length()-1) != '/')
{
g_resourcePath.append("/");
}
searchPathArray.insert(searchPathArray.begin(),g_resourcePath);
FileUtils::getInstance()->setSearchPaths(searchPathArray);

View File

@ -28,7 +28,7 @@ THE SOFTWARE.
#include <string>
using namespace std;
bool initRuntime(string& execufile);
bool initRuntime(string& entryfile);
bool startRuntime();
bool reloadScript(const string& modulefile);