-type="tag";name="ui-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so"
-type="tag";name="service-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so"
-type="tag";name="widget-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so"
-type="tag";name="watch-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so"
+type="tag";name="ui-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so";vitalness="true"
+type="tag";name="service-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so";vitalness="true"
+type="tag";name="widget-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so";vitalness="true"
+type="tag";name="watch-application";path="/etc/package-manager/parserlib/libdotnet_apptype_plugin.so";vitalness="true"
type="metadata";name="http://tizen.org/metadata/prefer_nuget_cache";path="/etc/package-manager/parserlib/metadata/libprefer_nuget_cache_plugin.so"
type="metadata";name="http://tizen.org/metadata/prefer_dotnet_aot";path="/etc/package-manager/parserlib/metadata/libprefer_dotnet_aot_plugin.so"
#define APP_NI_SUB_DIR ".native_image"
#define APP_NI_SUB_TMP_DIR ".native_image_tmp"
#define TAC_SYMLINK_SUB_DIR ".tac_symlink"
+#define RES_MOUNT_SUB_DIR ".res_mount"
#define TAC_SHA_256_INFO ".SHA256.info"
#define TAC_APP_LIST_DB ".TAC.App.list.db"
#define TAC_APP_LIST_RESTORE_DB ".TAC.App.list.restore.db"
*/
const std::string& getAppRootPath();
+ /**
+ * @brief Get the path of .res_mount of application
+ * @return .res_mount path
+ */
+ const std::string& getAppResMountPath();
+
/**
* @brief Get the path of .tac_symlink of application
* @return .tac_symlink path
std::string appNIPaths;
std::string appCLRPaths;
std::string nativeDllSearchingPaths;
+ std::string appResMountPath;
std::string appTacPath;
std::string extraDllPaths;
int rootFD;
checkInternetPrivilegeAndDisableIPv6(pkgId, rootPath);
+ if (hasResControl(pkgId)) {
+ std::string binPath = concatPath(rootPath, "bin");
+ std::string resMountPath = concatPath(binPath, RES_MOUNT_SUB_DIR);
+ if (exist(resMountPath)) {
+ return 0;
+ }
+
+ // Create a .res_mount folder 3 times to prevent malfunctions in app execution.
+ // If folder creation still fails, the app installation is processed to fail.
+ for (int i = 1; i <= 4; i++) {
+ if (i == 4) {
+ _ERR("The .res_mount folder could not be created despite 3 attempts. Stop installing the [%s]", pkgId);
+ return -1;
+ }
+ if (createDir(resMountPath)) {
+ return 0;
+ }
+ _INFO("Retry %d. Cannot create directory [%s]", i, resMountPath.c_str());
+ }
+ }
+
return 0;
}
extern "C" int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr doc, const char* pkgId)
std::string appNIBinPath = concatPath(concatPath(appNIRootPath, "bin"), APP_NI_SUB_DIR);
std::string appNILibPath = concatPath(concatPath(appNIRootPath, "lib"), APP_NI_SUB_DIR);
+ appResMountPath = concatPath(appBinPath, RES_MOUNT_SUB_DIR);
appTacPath = concatPath(appBinPath, TAC_SYMLINK_SUB_DIR);
appPaths = appRootPath + ":" + appBinPath + ":" + appLibPath + ":" + appTacPath;
appNIPaths = appNIBinPath + ":" + appNILibPath + ":" + appTacPath;
- appCLRPaths = appNIPaths + ":" + appPaths;
+ appCLRPaths = appResMountPath + ":" + appNIPaths + ":" + appPaths;
if (!extraDllPaths.empty()) {
appPaths = appPaths + ":" + extraDllPaths;
updateAppRelatedPath(appRootPath, appNIRootPath);
// Set native library searching path
- nativeDllSearchingPaths = runtimePath + ":" + __NATIVE_LIB_DIR + ":" +
+ nativeDllSearchingPaths = runtimePath + ":" + __NATIVE_LIB_DIR + ":" + concatPath(appRootPath, RES_MOUNT_SUB_DIR) + ":" +
concatPath(appRootPath, "bin") + ":" + concatPath(appRootPath, "lib") + ":" +
getExtraNativeLibDirs(appRootPath);
return appNIPaths;
}
+// return res mount path
+const std::string& PathManager::getAppResMountPath()
+{
+ return appResMountPath;
+}
+
// return ni dll and dll searching paths for app
const std::string& PathManager::getAppCLRPaths()
{