std::string appRoot = std::string("/proc/self/fd/") + std::to_string(fd);
std::string appBin = concatPath(appRoot, "bin");
std::string appLib = concatPath(appRoot, "lib");
- std::string probePath = appBin + ":" + appLib;
- std::string NIprobePath = appBin + APP_NI_SUB_DIR + ":" + appLib + APP_NI_SUB_DIR;
+ std::string appTAC = concatPath(appBin, ".TAC.Release");
- std::string probePath = appBin + ":" + appLib + ":" + appTAC;
++ std::string NIprobePath = appBin + APP_NI_SUB_DIR + ":" + appLib + APP_NI_SUB_DIR + ":" + appTAC;
std::string tpa = getTPA();
std::string nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib + ":" + __nativeLibDirectory;
std::string appName = std::string("dotnet-launcher-") + std::to_string(getpid());
}
}
- ni_error_e createNiUnderPkgRoot(const std::string& pkgName, bool enableR2R)
-int createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R)
++ni_error_e createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R)
{
std::string pkgRoot;
- if (getRootPath(pkgName, pkgRoot) != NI_ERROR_NONE) {
- fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str());
- if (getRootPath(pkgId, pkgRoot) < 0) {
++ if (getRootPath(pkgId, pkgRoot) != NI_ERROR_NONE) {
+ fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
- return -1;
+ return NI_ERROR_INVALID_PACKAGE;
}
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};
- createNiUnderDirs(paths, 2, enableR2R, true);
- createNiUnderDirs(paths, 3, enableR2R);
++ createNiUnderDirs(paths, 3, enableR2R, true);
- return 0;
+ return NI_ERROR_NONE;
}
- ni_error_e createNiDllUnderPkgRoot(const std::string& pkgName, const std::string& dllPath, bool enableR2R)
-int createNiDllUnderPkgRoot(const std::string& pkgId, const std::string& dllPath, bool enableR2R)
++ni_error_e createNiDllUnderPkgRoot(const std::string& pkgId, const std::string& dllPath, bool enableR2R)
{
std::string pkgRoot;
- if (getRootPath(pkgName, pkgRoot) < 0) {
- fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str());
+ if (getRootPath(pkgId, pkgRoot) < 0) {
+ fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
- return -1;
+ return NI_ERROR_INVALID_PACKAGE;
}
std::string binDir = concatPath(pkgRoot, "bin");
scanFilesInDir(rootPaths[i], convert, -1);
}
- ni_error_e removeNiUnderPkgRoot(const std::string& pkgName)
-int removeNiUnderPkgRoot(const std::string& pkgId)
++ni_error_e removeNiUnderPkgRoot(const std::string& pkgId)
{
std::string pkgRoot;
- if (getRootPath(pkgName, pkgRoot) < 0) {
- fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str());
+ if (getRootPath(pkgId, pkgRoot) < 0) {
+ fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
- return -1;
+ return NI_ERROR_INVALID_PACKAGE;
}
std::string binDir = concatPath(pkgRoot, "bin");
fprintf(stderr, "Success pkgmgrinfo_appinfo_metadata_filter_foreach\n");
pkgmgrinfo_appinfo_metadata_filter_destroy(handle);
- return 0;
+ return NI_ERROR_NONE;
}
-