// static bool PathService::GetSourceDir(std::string* path) { if (!GetExecutableDir(path)) return false; if (!EndsWithSeparator(*path)) path->push_back(PATH_SEPARATOR); path->append(".."); path->push_back(PATH_SEPARATOR); path->append(".."); return true; }
// static bool PathService::GetSourceDir(std::string* path) { if (!GetExecutableDir(path)) return false; if (!EndsWithSeparator(*path)) path->push_back(PATH_SEPARATOR); path->append(".."); path->push_back(PATH_SEPARATOR); #if defined(ANDROID) path->append("chromium_tests_root"); #else // Non-Android path->append(".."); #endif // defined(ANDROID) return true; }
// get resource path string GetResourcePath() { #if defined( SORT_IN_WINDOWS ) string abspath = GetExecutableDir(); #elif defined( SORT_IN_LINUX ) || defined( SORT_IN_MAC ) string abspath = ""; #endif string res_path = g_System.GetResourcePath(); if( res_path.empty() ) return abspath; // it's a relative path if( res_path[0] == '.' ) return abspath + res_path; return res_path; }
String GetExecutableDir() { return GetExecutableDir(ArgC,ArgV); }
String ResourceManager::GetExecutableDir() const { return GetExecutableDir(ArgC,ArgV); }