support multiple dll path for plugin 70/177170/1
authorCho Woong Suk <ws77.cho@samsung.com>
Thu, 26 Apr 2018 05:22:53 +0000 (14:22 +0900)
committerCho Woong Suk <ws77.cho@samsung.com>
Thu, 26 Apr 2018 05:22:53 +0000 (14:22 +0900)
Change-Id: Ia528f3c2daab56c7b03ca4f679028545bf62ce21

NativeLauncher/inc/utils.h
NativeLauncher/launcher/dotnet/dotnet_launcher.cc
NativeLauncher/util/utils.cc

index ac3816e..18fdaa0 100644 (file)
@@ -32,6 +32,7 @@ bool isManagedAssembly(const std::string& fileName);
 bool isNativeImage(const std::string& fileName);
 std::string readSelfPath();
 std::string concatPath(const std::string& path1, const std::string& path2);
+void splitPath(const std::string& path, std::vector<std::string>& out);
 void appendPath(std::string& path1, const std::string& path2);
 std::string absolutePath(const std::string& path);
 std::string baseName(const std::string& path);
index cc511ab..10c36cd 100644 (file)
@@ -223,7 +223,7 @@ int CoreRuntime::initialize(bool standalone)
        if (pluginGetDllPath) {
                std::string pluginPath = pluginGetDllPath();
                if (!pluginPath.empty()) {
-                       searchDirectories.push_back(pluginPath);
+                       splitPath(pluginPath, searchDirectories);
                }
        }
 
index 3d14f00..4016ac5 100644 (file)
@@ -88,6 +88,16 @@ std::string concatPath(const std::string& path1, const std::string& path2)
        return path;
 }
 
+void splitPath(const std::string& path, std::vector<std::string>& out)
+{
+       std::istringstream ss(path);
+       std::string token;
+
+       while (std::getline(ss, token, ':')) {
+               out.push_back(token);
+       }
+}
+
 void appendPath(std::string& path1, const std::string& path2)
 {
        if (path1.back() == PATH_SEPARATOR) {