bool GetJREPathFromBase(char* path, size_t pathSize, const char* basePath, const char* arch) { bool found = false; if (basePath != NULL) { //if (GetApplicationHome(path, pathSize)) { char jrePath[MAXPATHLEN]; // Is basePath a JRE path? STRCPY_T(jrePath, MAXPATHLEN, basePath); if (CheckIfJREPath(jrePath, arch)) { STRCPY_T(path, pathSize, basePath); found = true; } // Is basePath/jre a JRE path? STRCAT_T(jrePath, MAXPATHLEN, "\\jre"); if (CheckIfJREPath(jrePath, arch)) { STRCPY_T(path, pathSize, jrePath); found = true; } } return found; }
bool GetJREPathFromBase(char* path, size_t pathSize, const char* basePath, const char* arch) { char jrePath[MAXPATHLEN]; bool found = false; if (basePath != NULL) { // Is basePath a JRE path? STRCPYS(jrePath, MAXPATHLEN, basePath); if (CheckIfJREPath(jrePath, arch)) { STRCPYS(path, pathSize, basePath); found = true; } // Is basePath/jre a JRE path? STRCATS(jrePath, MAXPATHLEN, "/jre"); if (CheckIfJREPath(jrePath, arch)) { STRCPYS(path, pathSize, jrePath); found = true; } } return found; }