diff options
author | Inhwan Lee <ideal.lee@samsung.com> | 2017-03-19 18:28:03 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2017-03-19 18:28:03 -0700 |
commit | 0866c2acfeca0e0b73be16e661575ac7e670c485 (patch) | |
tree | aae41553251b6c6088b2f1d32e456f1fdefe3d12 /NativeLauncher/installer-plugin/common.cc | |
parent | 01e386ce1cd56eb6b061b1b2e03a4318d92a1860 (diff) | |
parent | 85937f2de4f6650255b4d42c7b13499caaa152ec (diff) | |
download | launcher-930e37493708a4e80eb0a5b762554adee3b4d555.tar.gz launcher-930e37493708a4e80eb0a5b762554adee3b4d555.tar.bz2 launcher-930e37493708a4e80eb0a5b762554adee3b4d555.zip |
Merge "find dlls in the app directory first for app NI" into tizensubmit/tizen/20170320.013057accepted/tizen/unified/20170320.065026accepted/tizen/tv/20170320.064953accepted/tizen/mobile/20170320.064937accepted/tizen/ivi/20170320.065013accepted/tizen/common/20170320.173522accepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_common
Diffstat (limited to 'NativeLauncher/installer-plugin/common.cc')
-rw-r--r-- | NativeLauncher/installer-plugin/common.cc | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/NativeLauncher/installer-plugin/common.cc b/NativeLauncher/installer-plugin/common.cc index ddeabdc..5d1306c 100644 --- a/NativeLauncher/installer-plugin/common.cc +++ b/NativeLauncher/installer-plugin/common.cc @@ -165,9 +165,25 @@ static void crossgen(const char* dll_path, const char* app_path) } else { - std::vector<std::string> tpaDir = { - RuntimeDir, DeviceAPIDir - }; + // search dlls in the application directory first, to use application dlls + // instead of system dlls when proceeding NI + std::vector<std::string> tpaDir; + if (app_path != NULL) + { + std::string path(app_path); + std::string::size_type prev_pos = 0, pos = 0; + while((pos = path.find(':', pos)) != std::string::npos) + { + std::string substring(path.substr(prev_pos, pos - prev_pos)); + tpaDir.push_back(substring); + prev_pos = ++pos; + } + std::string substring(path.substr(prev_pos, pos - prev_pos)); + tpaDir.push_back(substring); + } + tpaDir.push_back(RuntimeDir); + tpaDir.push_back(DeviceAPIDir); + std::string tpa; AssembliesInDirectory(tpaDir, tpa); @@ -273,7 +289,7 @@ void create_ni_under_dirs(const char* root_paths[], int count, const char* ignor if (app_paths.back() == ':') app_paths.pop_back(); - auto convert = [&app_paths, ignores, igcount, &cb](const char* path) + auto convert = [&app_paths, ignores, igcount, &cb](const char* path, const char* name) { for (int i=0; i<igcount; i++) { |