summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>2019-07-04 08:37:15 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2019-07-04 08:37:15 +0900
commitc5e31c0c63f96456d1f119ece721f66d5a6fb064 (patch)
tree341d6862ad31f680fd60a892a382fdf0e365d994
parent57fbf3f89f8f0dbf9f31a1221c0e7de6f891ed73 (diff)
parent3d865efe7e56ebd003a90883f73dd610294c9386 (diff)
downloadlauncher-c5e31c0c63f96456d1f119ece721f66d5a6fb064.tar.gz
launcher-c5e31c0c63f96456d1f119ece721f66d5a6fb064.tar.bz2
launcher-c5e31c0c63f96456d1f119ece721f66d5a6fb064.zip
Merge pull request #73 from dotnet/use_concatPath_for_ni_sub_dir
Change APP_NI_SUB_DIR from "/.native_image" to ".native_image"
-rw-r--r--NativeLauncher/inc/launcher_env.h2
-rw-r--r--NativeLauncher/launcher/dotnet/dotnet_launcher.cc2
-rw-r--r--NativeLauncher/tool/ni_common.cc6
3 files changed, 5 insertions, 5 deletions
diff --git a/NativeLauncher/inc/launcher_env.h b/NativeLauncher/inc/launcher_env.h
index 55f600d..d202480 100644
--- a/NativeLauncher/inc/launcher_env.h
+++ b/NativeLauncher/inc/launcher_env.h
@@ -21,6 +21,6 @@
#define ENV_FILE_PATH "/usr/share/dotnet.tizen/lib/coreclr_env.list"
#define AOT_METADATA_KEY "http://tizen.org/metadata/prefer_dotnet_aot"
#define AOT_METADATA_VALUE "true"
-#define APP_NI_SUB_DIR "/.native_image"
+#define APP_NI_SUB_DIR ".native_image"
#endif //__LAUNCHER_ENV_H_ \ No newline at end of file
diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc
index 8ad60ed..35e8e0f 100644
--- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc
+++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc
@@ -391,7 +391,7 @@ int CoreRuntime::initialize(bool standalone)
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 NIprobePath = concatPath(appBin, APP_NI_SUB_DIR) + ":" + concatPath(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 --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc
index 18f792d..1743c79 100644
--- a/NativeLauncher/tool/ni_common.cc
+++ b/NativeLauncher/tool/ni_common.cc
@@ -116,7 +116,7 @@ static std::string getAppNIPath(const std::string& niPath)
std::string prevPath = niPath.substr(0, index);
std::string fileName = niPath.substr(index, niPath.length());
- std::string niDirPath = prevPath + APP_NI_SUB_DIR;
+ std::string niDirPath = concatPath(prevPath, APP_NI_SUB_DIR);
if (!isFileExist(niDirPath)) {
if (mkdir(niDirPath.c_str(), 0755) == 0) {
@@ -449,14 +449,14 @@ ni_error_e removeNiUnderPkgRoot(const std::string& pkgId)
removeNiUnderDirs(paths, 2);
- std::string binNIDir = binDir + APP_NI_SUB_DIR;
+ std::string binNIDir = concatPath(binDir, APP_NI_SUB_DIR);
if (isFileExist(binNIDir)) {
if (rmdir(binNIDir.c_str()) != 0) {
fprintf(stderr, "Failed to remove app ni dir [%s]\n", binNIDir.c_str());
}
}
- std::string libNIDir = libDir + APP_NI_SUB_DIR;
+ std::string libNIDir = concatPath(libDir, APP_NI_SUB_DIR);
if (isFileExist(libNIDir)) {
if (rmdir(libNIDir.c_str()) != 0) {
fprintf(stderr, "Failed to remove app ni dir [%s]\n", libNIDir.c_str());