std::string appBin = concatPath(appRoot, "bin");
std::string appLib = concatPath(appRoot, "lib");
std::string appTAC = concatPath(appBin, ".TAC.Release");
+ std::string probePath = appBin + ":" + appLib + ":" + appTAC;
std::string NIprobePath = appBin + APP_NI_SUB_DIR + ":" + appLib + APP_NI_SUB_DIR + ":" + appTAC;
std::string tpa = getTPA();
std::string nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib + ":" + __nativeLibDirectory;
return NI_ERROR_NONE;
}
-static ni_error_e getRootPath(std::string pkgId, std::string& rootPath)
-{
- int ret = 0;
- char *path = 0;
-
- uid_t uid = 0;
-
- if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
- _ERR("Failed to get UID");
- return NI_ERROR_UNKNOWN;
- }
-
- pkgmgrinfo_pkginfo_h handle;
- if (uid == 0) {
- ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgId.c_str(), &handle);
- if (ret != PMINFO_R_OK)
- return NI_ERROR_UNKNOWN;
- } else {
- ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgId.c_str(), uid, &handle);
- if (ret != PMINFO_R_OK)
- return NI_ERROR_UNKNOWN;
- }
-
- ret = pkgmgrinfo_pkginfo_get_root_path(handle, &path);
- if (ret != PMINFO_R_OK) {
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
- return NI_ERROR_UNKNOWN;
- }
- rootPath = path;
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
-
- return NI_ERROR_NONE;
-}
-
// callback function of "pkgmgrinfo_appinfo_metadata_filter_foreach"
static int appAotCb(pkgmgrinfo_appinfo_h handle, void *userData)
{