mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14295 from xiaofeng11/v3_xf
Fix CodeIDE can not start js project with simulator
This commit is contained in:
commit
0dabb4cfb7
|
@ -118,6 +118,7 @@ static void glfwDropFunc(GLFWwindow *window, int count, const char **files)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
_project.setProjectDir([path cStringUsingEncoding:NSUTF8StringEncoding]);
|
||||||
_entryPath = [path cStringUsingEncoding:NSUTF8StringEncoding];
|
_entryPath = [path cStringUsingEncoding:NSUTF8StringEncoding];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,13 +215,6 @@ static void glfwDropFunc(GLFWwindow *window, int count, const char **files)
|
||||||
solutionDir[i] = '/';
|
solutionDir[i] = '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int nPos = -1;
|
|
||||||
if (solutionDir[solutionDir.length() - 1] == '/')
|
|
||||||
nPos = solutionDir.rfind('/', solutionDir.length() - 2);
|
|
||||||
else
|
|
||||||
nPos = solutionDir.rfind('/');
|
|
||||||
if (nPos > 0)
|
|
||||||
solutionDir = solutionDir.substr(0, nPos + 1);
|
|
||||||
FileUtils::getInstance()->setDefaultResourceRootPath(solutionDir);
|
FileUtils::getInstance()->setDefaultResourceRootPath(solutionDir);
|
||||||
FileUtils::getInstance()->addSearchPath(solutionDir);
|
FileUtils::getInstance()->addSearchPath(solutionDir);
|
||||||
FileUtils::getInstance()->addSearchPath(tmpConfig.getProjectDir());
|
FileUtils::getInstance()->addSearchPath(tmpConfig.getProjectDir());
|
||||||
|
|
Loading…
Reference in New Issue