From: j-h.choi Date: Tue, 11 Jun 2019 09:14:14 +0000 (+0900) Subject: Merge branch 'tizen' of https://github.sec.samsung.net/j-h-choi/dotnet-launcher into... X-Git-Tag: accepted/tizen/unified/20190626.064945~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50a533c58ea8516ecc49acdab8d989892e664505;p=platform%2Fcore%2Fdotnet%2Flauncher.git Merge branch 'tizen' of https://github.sec.samsung.net/j-h-choi/dotnet-launcher into j-h-choi-tizen --- 50a533c58ea8516ecc49acdab8d989892e664505 diff --cc NativeLauncher/inc/utils.h index 79e8489,9a4aced..bb72e00 --- a/NativeLauncher/inc/utils.h +++ b/NativeLauncher/inc/utils.h @@@ -20,9 -20,8 +20,10 @@@ #include #include #include + #include +#include + #ifndef PATH_SEPARATOR #define PATH_SEPARATOR '/' #endif diff --cc NativeLauncher/launcher/dotnet/dotnet_launcher.cc index feae81d,2d10210..838a5e6 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@@ -389,8 -392,8 +389,8 @@@ int CoreRuntime::initialize(bool standa std::string appRoot = std::string("/proc/self/fd/") + std::to_string(fd); std::string appBin = concatPath(appRoot, "bin"); std::string appLib = concatPath(appRoot, "lib"); - std::string probePath = appBin + ":" + appLib; - std::string NIprobePath = appBin + APP_NI_SUB_DIR + ":" + appLib + APP_NI_SUB_DIR; + 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; std::string appName = std::string("dotnet-launcher-") + std::to_string(getpid()); diff --cc NativeLauncher/tool/ni_common.cc index 29f0b82,3811e97..d2b7ec3 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@@ -400,29 -332,30 +400,30 @@@ void createNiUnderDirs(const std::strin } } - ni_error_e createNiUnderPkgRoot(const std::string& pkgName, bool enableR2R) -int createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R) ++ni_error_e createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R) { std::string pkgRoot; - if (getRootPath(pkgName, pkgRoot) != NI_ERROR_NONE) { - fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str()); - if (getRootPath(pkgId, pkgRoot) < 0) { ++ if (getRootPath(pkgId, pkgRoot) != NI_ERROR_NONE) { + fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str()); - return -1; + return NI_ERROR_INVALID_PACKAGE; } std::string binDir = concatPath(pkgRoot, "bin"); std::string libDir = concatPath(pkgRoot, "lib"); - std::string paths[] = {binDir, libDir}; + std::string appTAC = concatPath(binDir, ".TAC.Release"); + std::string paths[] = {binDir, libDir, appTAC}; - createNiUnderDirs(paths, 2, enableR2R, true); - createNiUnderDirs(paths, 3, enableR2R); ++ createNiUnderDirs(paths, 3, enableR2R, true); - return 0; + return NI_ERROR_NONE; } - ni_error_e createNiDllUnderPkgRoot(const std::string& pkgName, const std::string& dllPath, bool enableR2R) -int createNiDllUnderPkgRoot(const std::string& pkgId, const std::string& dllPath, bool enableR2R) ++ni_error_e createNiDllUnderPkgRoot(const std::string& pkgId, const std::string& dllPath, bool enableR2R) { std::string pkgRoot; - if (getRootPath(pkgName, pkgRoot) < 0) { - fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str()); + if (getRootPath(pkgId, pkgRoot) < 0) { + fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str()); - return -1; + return NI_ERROR_INVALID_PACKAGE; } std::string binDir = concatPath(pkgRoot, "bin"); @@@ -469,12 -401,12 +469,12 @@@ void removeNiUnderDirs(const std::strin scanFilesInDir(rootPaths[i], convert, -1); } - ni_error_e removeNiUnderPkgRoot(const std::string& pkgName) -int removeNiUnderPkgRoot(const std::string& pkgId) ++ni_error_e removeNiUnderPkgRoot(const std::string& pkgId) { std::string pkgRoot; - if (getRootPath(pkgName, pkgRoot) < 0) { - fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str()); + if (getRootPath(pkgId, pkgRoot) < 0) { + fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str()); - return -1; + return NI_ERROR_INVALID_PACKAGE; } std::string binDir = concatPath(pkgRoot, "bin"); @@@ -525,6 -443,5 +525,5 @@@ ni_error_e regenerateAppNI(bool enableR fprintf(stderr, "Success pkgmgrinfo_appinfo_metadata_filter_foreach\n"); pkgmgrinfo_appinfo_metadata_filter_destroy(handle); - return 0; + return NI_ERROR_NONE; } -