#define NI_FLAGS_APPNI 0x0002
#define NI_FLAGS_COMPATIBILITY 0x0004
#define NI_FLAGS_VERBOSE 0x0008
+#define NI_FLAGS_SKIP_RO_APP 0x0010
#define NI_FLAGS_INSTRUMENT 0x1000
typedef std::function<void (std::string)> afterCreate;
" (replaces /r with /Trusted_Platform_Assemblies)\n"
" --verbose - Display verbose information\n"
" --instrument - Generate an instrumented image for profiling (enable: /Tuning)\n"
+ " --skip-ro-app - Skip re-generate NI for apps installed RO area\n"
+ " (This option works with --ni-regen-all-app only)\n"
"\n"
"Usage: dotnettool [options] [command] [arguments]\n"
"\n"
flags |= NI_FLAGS_INSTRUMENT;
} else if (!strncmp(*it, "--verbose", 9)) {
flags |= NI_FLAGS_VERBOSE;
+ } else if (!strncmp(*it, "--skip-ro-app", 13)) {
+ flags |= NI_FLAGS_SKIP_RO_APP;
} else {
args.push_back(*it);
}
return -1;
}
+ if ((*pFlags) & NI_FLAGS_SKIP_RO_APP) {
+ bool isSystem = false;
+ int ret = pkgmgrinfo_appinfo_is_system(handle, &isSystem);
+ if (ret != PMINFO_R_OK) {
+ fprintf(stderr, "Failed to check that app is System or not\n");
+ return -1;
+ }
+ if (isSystem) {
+ return 0;
+ }
+ }
+
if (removeNIUnderPkgRoot(pkgId) != NI_ERROR_NONE) {
fprintf(stderr, "Failed to remove previous dlls from [%s]\n", pkgId);
return -1;