Merge pull request #9892 from yinjimmy/bugfix_runtime

Fix: can not load BYTECODE Lua project
This commit is contained in:
minggo 2015-01-09 13:35:02 +08:00
commit e0625ad1db
1 changed files with 9 additions and 22 deletions

View File

@ -54,7 +54,7 @@ void AppDelegate::initGLContextAttrs()
bool AppDelegate::applicationDidFinishLaunching()
{
//
#if ((CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) && (CC_CODE_IDE_DEBUG_SUPPORT > 0))
#if ((CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) && (COCOS2D_DEBUG > 0))
_project.setDebuggerType(kCCRuntimeDebuggerCodeIDE);
#endif
@ -188,25 +188,18 @@ void StartupCall::startup()
}
updateConfigParser(project);
if (FileUtils::getInstance()->isFileExist(path))
{
updatePreviewFuncForPath(path);
updatePreviewFuncForPath(path);
// launch
if (project.getDebuggerType() == kCCRuntimeDebuggerNone)
{
_previewFunc(path);
}
else
{
// NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
initRuntime(project.getProjectDir());
startRuntime();
}
// launch
if (project.getDebuggerType() == kCCRuntimeDebuggerNone)
{
_previewFunc(path);
}
else
{
CCLOG("[ERROR]: %s is not exist.", path.c_str());
// NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
initRuntime(project.getProjectDir());
startRuntime();
}
// track start event
@ -358,12 +351,6 @@ void StartupCall::updatePreviewFuncForPath(const std::string &path)
// set loader
_previewFunc = [](const std::string &path) { CCLOG("[WARNING]: unsupport %s", path.c_str()); };
if (!FileUtils::getInstance()->isFileExist(path))
{
CCLOG("[ERROR]: %s is not exist.", path.c_str());
return ;
}
if (endWithString(path, ".lua"))
{
_launchEvent = "lua";