}
}
-ni_error_e createNiUnderPkgRoot(const std::string& pkgName, 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) != NI_ERROR_NONE) {
+ fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
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, true);
return NI_ERROR_NONE;
}
-ni_error_e createNiDllUnderPkgRoot(const std::string& pkgName, 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 NI_ERROR_INVALID_PACKAGE;
}
void removeNiUnderDirs(const std::string rootPaths[], int count)
{
auto convert = [](const std::string& path, std::string name) {
- std::string ni;
if (isNativeImage(path)) {
if (remove(path.c_str())) {
fprintf(stderr, "Failed to remove %s\n", path.c_str());
scanFilesInDir(rootPaths[i], convert, -1);
}
-ni_error_e removeNiUnderPkgRoot(const std::string& pkgName)
+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 NI_ERROR_INVALID_PACKAGE;
}
pkgmgrinfo_appinfo_metadata_filter_destroy(handle);
return NI_ERROR_NONE;
}
-