String CRhodesAppBase::resolveDBFilesPath(const String& strFilePath) { if ( String_startsWith(strFilePath, getRhoRootPath()) ) return strFilePath; return CFilePath::join(getRhoRootPath(), strFilePath); }
bool ParseCommandLine(LPCTSTR lpCmdLine, HRESULT* pnRetCode ) throw( ) { m_nRestarting = 1; TCHAR szTokens[] = _T("-/"); LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens); getRhoRootPath(); while (lpszToken != NULL) { if (WordCmpI(lpszToken, _T("Restarting"))==0) { m_nRestarting = 10; } #if defined(OS_WINDOWS) else if (wcsncmp(lpszToken, _T("approot"),7)==0) { char* token = wce_wctomb(lpszToken); //parseToken will allocate extra byte at the end of the returned token value char* path = parseToken( token, strlen(token) ); if (path) { int len = strlen(path); if (!(path[len]=='\\' || path[len]=='/')) { path[len] = '\\'; path[len+1] = 0; } m_strRootPath = path; free(path); } free(token); } #endif lpszToken = FindOneOf(lpszToken, szTokens); } return __super::ParseCommandLine(lpCmdLine, pnRetCode); }
String CRhodesAppBase::getDBFileRoot() { #ifndef RHODES_EMULATOR String strDbFileRoot = rho_native_rhodbpath();//getRhoRootPath(); #else String strDbFileRoot = getRhoRootPath() + RHO_EMULATOR_DIR; #endif return strDbFileRoot; }
String CRhodesAppBase::resolveDBFilesPath(const String& strFilePath) { #ifndef RHODES_EMULATOR String strDbFileRoot = rho_native_rhodbpath();//getRhoRootPath(); #else String strDbFileRoot = getRhoRootPath() + RHO_EMULATOR_DIR; #endif if ( strFilePath.length() == 0 || String_startsWith(strFilePath, strDbFileRoot) || String_startsWith(strFilePath, "file://")) return strFilePath; return CFilePath::join(strDbFileRoot, strFilePath); }
void CRhodesAppBase::initAppUrls() { m_strBlobsDirPath = getRhoRootPath() + "db/db-files"; m_strDBDirPath = getRhoRootPath() + "db"; }