}
if (initializePluginManager("normal")) {
- fprintf(stderr, "Fail to initialize plugin manager\n");
+ fprintf(stderr, "Fail to initialize PluginManager\n");
return NI_ERROR_UNKNOWN;
}
if (initializePathManager(option->runtimeDir, option->tizenFXDir, option->extraDirs)) {
- fprintf(stderr, "Fail to initialize path manager\n");
+ fprintf(stderr, "Fail to initialize PathManager\n");
return NI_ERROR_UNKNOWN;
}
if (appPaths.back() == ':')
appPaths.pop_back();
- auto convert = [&appPaths, enableR2R, isAppNI](const std::string& path, const char* name) {
+ std::vector<std::string> tpaAssemblies;
+ splitPath(__tpa, tpaAssemblies);
+
+ auto convert = [&appPaths, enableR2R, isAppNI, tpaAssemblies](const std::string& path, const char* name) {
+ if (isAppNI) {
+ std::string assembly = path.substr(path.rfind('/') + 1);
+ bool isExist = false;
+ for (auto& tpa : tpaAssemblies) {
+ if (!strcmp(replaceAll(tpa, ".ni.dll", ".dll").c_str(), assembly.c_str())) {
+ isExist = true;
+ break;
+ }
+ }
+ if (isExist) {
+ fprintf(stderr, "%s present in the TPA list skips generation of NI file.\n", path.c_str());
+ return;
+ }
+ }
if (!crossgen(path, appPaths.c_str(), enableR2R, isAppNI)) {
waitInterval();
}
for (int i = 0; i < count; i++) {
scanFilesInDir(rootPaths[i], convert, 1);
}
+
+ tpaAssemblies.clear();
}
ni_error_e createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R)
}
return NI_ERROR_NONE;
} else {
- return crossgen(dllPath, paths, enableR2R, true);
+ std::string assembly = dllPath.substr(dllPath.rfind('/') + 1);
+ std::vector<std::string> tpaAssemblies;
+ splitPath(__tpa, tpaAssemblies);
+ bool isExist = false;
+ for (auto& tpa : tpaAssemblies) {
+ if (!strcmp(replaceAll(tpa, ".ni.dll", ".dll").c_str(), assembly.c_str())) {
+ isExist = true;
+ break;
+ }
+ }
+ tpaAssemblies.clear();
+ if (isExist) {
+ fprintf(stderr, "%s present in the TPA list skips generation of NI file.\n", dllPath.c_str());
+ return NI_ERROR_NONE;
+ } else {
+ return crossgen(dllPath, paths, enableR2R, true);
+ }
}
}