std::string runtime_dir;
std::string tizenfx_dir;
std::string tizenfx_ref_dir;
- std::vector <std::string>extra_dirs;
+ std::vector<std::string> extra_dirs;
+ std::vector<std::string> plugin_dirs;
} DllPath;
static DllPath* __dllPath = nullptr;
// ":" seperated extra directories
if (!extraDir.empty()) {
splitPath(extraDir, __dllPath->extra_dirs);
- } else {
- char* extraPath = pluginGetDllPath();
- if (extraPath) {
- splitPath(extraPath, __dllPath->extra_dirs);
- }
+ }
+
+ char* pluginPath = pluginGetDllPath();
+ if (pluginPath) {
+ splitPath(pluginPath, __dllPath->plugin_dirs);
}
_INFO("Path manager initialize success");
void finalizePathManager()
{
+ _INFO("Path manager finalize called");
if (__dllPath) {
delete __dllPath;
__dllPath = NULL;
return __dllPath->tizenfx_ref_dir;
}
-std::vector <std::string> getExtraDirs()
+std::vector<std::string> getExtraDirs()
{
return __dllPath->extra_dirs;
}
+std::vector<std::string> getPluginDirs()
+{
+ return __dllPath->plugin_dirs;
+}
+
static std::string getPlatformTPA()
{
std::string platform_tpa;
cacheFile.close();
} else {
std::vector<std::string> tpaDirs = { getRuntimeDir(), getTizenFXDir(), getTizenFXRefDir() };
+ tpaDirs.insert(tpaDirs.end(), getExtraDirs().begin(), getExtraDirs().end());
addAssembliesFromDirectories(tpaDirs, platform_tpa);
}
static std::string getPluginTPA()
{
std::string plugin_tpa;
-
char* plugin_tpa_list = pluginGetTPA();
if (plugin_tpa_list) {
_INFO("plugin TPA list found. use TPA list for plugin");
plugin_tpa = plugin_tpa_list;
- } else if (!__dllPath->extra_dirs.empty()) {
- _INFO("plugin extra directory found. use plugin extra directroy for TPA");
- addAssembliesFromDirectories(__dllPath->extra_dirs, plugin_tpa);
+ } else if (!getPluginDirs().empty()) {
+ _INFO("Plugin directory found. use plugin directroy for TPA");
+ addAssembliesFromDirectories(getPluginDirs(), plugin_tpa);
}
return plugin_tpa;