#define TAC_METADATA_KEY "http://tizen.org/metadata/prefer_nuget_cache"
#define METADATA_VALUE_TRUE "true"
#define APP_NI_SUB_DIR ".native_image"
+#define APP_NI_SUB_TMP_DIR ".native_image_tmp"
#define TAC_SYMLINK_SUB_DIR ".tac_symlink"
#define TAC_SHA_256_INFO ".SHA256.info"
#define TAC_APP_LIST_DB "/opt/usr/dotnet/.TAC.App.list.db"
std::string prevPath;
prevPath = getBaseName(absDllPath);
- niDirPath = concatPath(prevPath, APP_NI_SUB_DIR);
+ niDirPath = concatPath(prevPath, APP_NI_SUB_TMP_DIR);
if (opt->flags & NI_FLAGS_APP_UNDER_RO_AREA) {
niDirPath = replaceAll(niDirPath, getBaseName(__pm->getAppRootPath()), __READ_ONLY_APP_UPDATE_DIR);
}
}
- if (ret == NI_ERROR_NONE && opt->flags & NI_FLAGS_INPUT_BUBBLE) {
- for (auto &dll : dllList) {
- std::string tmpFile;
- std::string niFile;
- if (opt->flags & NI_FLAGS_APPNI) {
- niFile = getAppNIFilePath(dll, opt);
- } else {
- niFile = getNIFilePath(dll);
- }
- tmpFile = niFile + ".tmp";
+ if (ret == NI_ERROR_NONE) {
+ if (opt->flags & NI_FLAGS_INPUT_BUBBLE) {
+ for (auto &dll : dllList) {
+ std::string tmpFile;
+ std::string niFile;
+ if (opt->flags & NI_FLAGS_APPNI) {
+ niFile = getAppNIFilePath(dll, opt);
+ } else {
+ niFile = getNIFilePath(dll);
+ }
+ tmpFile = niFile + ".tmp";
- if (exist(tmpFile)) {
- moveFile(tmpFile, niFile);
- _SOUT("Native image %s generated successfully.", niFile.c_str());
+ if (exist(tmpFile)) {
+ moveFile(tmpFile, niFile);
+ _SOUT("Native image %s generated successfully.", niFile.c_str());
+ }
+ }
+ }
+ if (opt->flags & NI_FLAGS_APPNI) {
+ for (const auto &path : paths) {
+ if (path.find("/bin") != std::string::npos) {
+ rename(concatPath(path, APP_NI_SUB_TMP_DIR).c_str(), concatPath(path, APP_NI_SUB_DIR).c_str());
+ break;
+ }
}
}
}