Fix missed 0 args on standalone
authorpius.lee <pius.lee@samsung.com>
Mon, 17 Oct 2016 10:51:57 +0000 (19:51 +0900)
committerpius.lee <pius.lee@samsung.com>
Mon, 17 Oct 2016 10:52:22 +0000 (19:52 +0900)
Add argv[0] to args on standalone.
Fix Console.WriteLine to Dlog debug print out.

Change-Id: Iffc0eed1d0c7a9a538c12f9693b68e58011bea41

NativeLauncher/src/main.cc
Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyManager.cs
Tizen.Runtime/Tizen.Runtime.Mono/AssemblyManager.cs

index 248de99..9f43bfc 100644 (file)
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
 
   std::vector<char*> vargs;
 
-  for (i=1; i<argc; i++)
+  for (i=0; i<argc; i++)
   {
     if (VersionOption.compare(argv[i]) == 0)
     {
@@ -88,9 +88,13 @@ int main(int argc, char *argv[])
     std::string approot;
     if (appid != nullptr)
     {
-      approot = std::string(aul_get_app_root_path());
+      const char* approot_path = aul_get_app_root_path();
+      if (approot_path != nullptr)
+      {
+        approot = std::string(approot_path);
+      }
     }
-    else
+    if (approot.empty())
     {
       approot = Basename(standalonePath);
     }
index ec342d5..39ff2fa 100644 (file)
@@ -86,7 +86,7 @@ namespace Tizen.Runtime.Coreclr
 
                 if (!string.IsNullOrEmpty(preloadDirectory))
                 {
-                    Console.WriteLine($"[{preloadDirectory}]");
+                    ALog.Debug($"Load from [{preloadDirectory}]");
                     DirectoryInfo d = new DirectoryInfo(preloadDirectory);
                     if (Directory.Exists(d.FullName))
                     {
index ec65ca6..9389c62 100644 (file)
@@ -112,7 +112,7 @@ namespace Tizen.Runtime.Mono
             {
                 if (!string.IsNullOrEmpty(preloadDirectory))
                 {
-                    Console.WriteLine($"[{preloadDirectory}]");
+                    ALog.Debug($"Load from [{preloadDirectory}]");
                     DirectoryInfo d = new DirectoryInfo(preloadDirectory);
                     if (Directory.Exists(d.FullName))
                     {