static std::string getAppNIPath(const std::string& niPath)
{
+ std::string fileName;
+ std::string niDirPath;
+ std::string prevPath;
+
size_t index = niPath.find_last_of("/");
- if (index == std::string::npos) {
- fprintf(stderr, "dllPath doesnot contains path info\n");
- return "";
+ if (index != std::string::npos) {
+ prevPath = niPath.substr(0, index);
+ fileName = niPath.substr(index + 1, niPath.length());
+ } else {
+ prevPath = ".";
+ fileName = niPath;
}
- std::string prevPath = niPath.substr(0, index);
- std::string fileName = niPath.substr(index, niPath.length());
- std::string niDirPath = concatPath(prevPath, APP_NI_SUB_DIR);
+ niDirPath = concatPath(prevPath, APP_NI_SUB_DIR);
if (!isFileExist(niDirPath)) {
if (mkdir(niDirPath.c_str(), 0755) == 0) {
}
}
- return niDirPath + fileName;
+ return concatPath(niDirPath, fileName);
}
static bool niExist(const std::string& path)
std::string binDir = concatPath(pkgRoot, "bin");
std::string libDir = concatPath(pkgRoot, "lib");
- std::string paths = binDir + ":" + libDir;
+ std::string appTAC = concatPath(binDir, ".TAC.Release");
+ std::string paths = binDir + ":" + libDir + ":" + appTAC;
return crossgen(dllPath, paths, enableR2R, true);
}