Code style refactorting 70/124870/2
authorJongHeon Choi <j-h.choi@samsung.com>
Thu, 13 Apr 2017 00:52:52 +0000 (09:52 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Thu, 13 Apr 2017 00:56:42 +0000 (09:56 +0900)
Change-Id: I5a2eb4db8edcdfa3074212c476fecd7506d11e45

14 files changed:
NativeLauncher/CMakeLists.txt
NativeLauncher/dotnet.launcher
NativeLauncher/dotnet.loader
NativeLauncher/installer-plugin/common.cc
NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc
NativeLauncher/launcher/dotnet/dotnet_launcher.cc
NativeLauncher/launcher/dotnet/scd_launcher.cc
NativeLauncher/launcher/launcher.cc
NativeLauncher/launcher/main.cc
Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyManager.cs
Tizen.Runtime/Tizen.Runtime.snk
dotnet-launcher.manifest

index f8a1697..4107d05 100755 (executable)
@@ -4,51 +4,51 @@ PROJECT("dotnet-tools")
 MESSAGE("CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
 
 IF(DEFINED NO_TIZEN)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DNO_TIZEN")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DNO_TIZEN")
 ELSE(DEFINED NO_TIZEN)
-       INCLUDE(FindPkgConfig)
-       PKG_CHECK_MODULES(${PROJECT_NAME} REQUIRED aul pkgmgr-info pkgmgr-installer dlog ecore bundle dlog launchpad elementary glib-2.0 capi-appfw-app-control capi-appfw-service-application)
+    INCLUDE(FindPkgConfig)
+    PKG_CHECK_MODULES(${PROJECT_NAME} REQUIRED aul pkgmgr-info pkgmgr-installer dlog ecore bundle dlog launchpad elementary glib-2.0 capi-appfw-app-control capi-appfw-service-application)
 ENDIF(DEFINED NO_TIZEN)
 
 FOREACH(flag ${${PROJECT_NAME}_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
 IF(DEFINED LAUNCHER_CONFIG_PATH)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DLAUNCHER_CONFIG_PATH=${LAUNCHER_CONFIG_PATH}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DLAUNCHER_CONFIG_PATH=${LAUNCHER_CONFIG_PATH}")
 ENDIF(DEFINED LAUNCHER_CONFIG_PATH)
 
 IF(DEFINED CORECLR_LAUNCHER_ASSEMBLY_PATH)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DCORECLR_LAUNCHER_ASSEMBLY_PATH=${CORECLR_LAUNCHER_ASSEMBLY_PATH}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DCORECLR_LAUNCHER_ASSEMBLY_PATH=${CORECLR_LAUNCHER_ASSEMBLY_PATH}")
 ENDIF(DEFINED CORECLR_LAUNCHER_ASSEMBLY_PATH)
 
 IF(DEFINED DEVICE_API_DIR)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DDEVICE_API_DIR=${DEVICE_API_DIR}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DDEVICE_API_DIR=${DEVICE_API_DIR}")
 ENDIF(DEFINED DEVICE_API_DIR)
 
 IF(DEFINED RUNTIME_DIR)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DRUNTIME_DIR=${RUNTIME_DIR}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DRUNTIME_DIR=${RUNTIME_DIR}")
 ENDIF(DEFINED RUNTIME_DIR)
 
 IF(DEFINED CROSSGEN_PATH)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DCROSSGEN_PATH=${CROSSGEN_PATH}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DCROSSGEN_PATH=${CROSSGEN_PATH}")
 ENDIF(DEFINED CROSSGEN_PATH)
 
 IF(DEFINED VERSION)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DVERSION=${VERSION}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DVERSION=${VERSION}")
 ENDIF(DEFINED VERSION)
 
 IF(DEFINED NATIVE_LIB_DIR)
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DNATIVE_LIB_DIR=${NATIVE_LIB_DIR}")
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DNATIVE_LIB_DIR=${NATIVE_LIB_DIR}")
 ENDIF(DEFINED NATIVE_LIB_DIR)
 
 IF(USE_MANAGED_LAUNCHER STREQUAL "ENABLE")
-       ADD_DEFINITIONS("-DUSE_MANAGED_LAUNCHER")
+    ADD_DEFINITIONS("-DUSE_MANAGED_LAUNCHER")
 ENDIF(USE_MANAGED_LAUNCHER)
 
 OPTION(NOT_USE_FUNCTION "Remove build warning" OFF)
 IF(NOT_USE_FUNCTION)
-       ADD_DEFINITIONS("-DNOT_USE_FUNCTION")
+    ADD_DEFINITIONS("-DNOT_USE_FUNCTION")
 ENDIF(NOT_USE_FUNCTION)
 
 
@@ -71,77 +71,77 @@ INCLUDE_DIRECTORIES(inc launcher util)
 
 SET(DOTNET_LAUNCHER "dotnet-launcher")
 SET(${DOTNET_LAUNCHER}_SOURCE_FILES
-       launcher/main.cc
-       util/utils.cc
-       launcher/launcher.cc
-       launcher/dotnet/dotnet_launcher.cc
+    launcher/main.cc
+    util/utils.cc
+    launcher/launcher.cc
+    launcher/dotnet/dotnet_launcher.cc
 )
 ADD_EXECUTABLE(${DOTNET_LAUNCHER} ${${DOTNET_LAUNCHER}_SOURCE_FILES})
-SET_TARGET_PROPERTIES(${DOTNET_LAUNCHER}       PROPERTIES COMPILE_FLAGS "-fPIE")
+SET_TARGET_PROPERTIES(${DOTNET_LAUNCHER} PROPERTIES COMPILE_FLAGS "-fPIE")
 
 
 SET(SCD_LAUNCHER "scd-launcher")
 SET(${SCD_LAUNCHER}_SOURCE_FILES
-       launcher/dotnet/scd_launcher.cc
+    launcher/dotnet/scd_launcher.cc
 )
 ADD_EXECUTABLE(${SCD_LAUNCHER} ${${SCD_LAUNCHER}_SOURCE_FILES})
-SET_TARGET_PROPERTIES(${SCD_LAUNCHER}  PROPERTIES COMPILE_FLAGS "-fPIE")
+SET_TARGET_PROPERTIES(${SCD_LAUNCHER} PROPERTIES COMPILE_FLAGS "-fPIE")
 
 
 IF(NOT DEFINED NO_TIZEN)
-       TARGET_LINK_LIBRARIES(${SCD_LAUNCHER} capi-appfw-app-control dlog appcore-agent)
+    TARGET_LINK_LIBRARIES(${SCD_LAUNCHER} capi-appfw-app-control dlog appcore-agent)
 ENDIF(NOT DEFINED NO_TIZEN)
 TARGET_LINK_LIBRARIES(${SCD_LAUNCHER} ${${PROJECT_NAME}_LDFLAGS} "-pie -ldl -lpthread")
 
 
 IF(NOT DEFINED NO_TIZEN)
-       TARGET_LINK_LIBRARIES(${DOTNET_LAUNCHER} aul)
+    TARGET_LINK_LIBRARIES(${DOTNET_LAUNCHER} aul)
 ENDIF(NOT DEFINED NO_TIZEN)
 TARGET_LINK_LIBRARIES(${DOTNET_LAUNCHER} ${${PROJECT_NAME}_LDFLAGS} "-pie -ldl -lpthread")
 
 SET_TARGET_PROPERTIES(${DOTNET_LAUNCHER}
-       PROPERTIES SKIP_BUILD_RPATH TRUE
+    PROPERTIES SKIP_BUILD_RPATH TRUE
 ) # remove rpath option that is automatically generated by cmake.
 
 SET(NITOOL "nitool")
 SET(${NITOOL}_SOURCE_FILES
-       util/utils.cc
-       installer-plugin/common.cc
-       installer-plugin/nitool.cc
+    util/utils.cc
+    installer-plugin/common.cc
+    installer-plugin/nitool.cc
 )
 ADD_EXECUTABLE(${NITOOL} ${${NITOOL}_SOURCE_FILES})
-SET_TARGET_PROPERTIES(${NITOOL}        PROPERTIES COMPILE_FLAGS "-fPIE")
+SET_TARGET_PROPERTIES(${NITOOL} PROPERTIES COMPILE_FLAGS "-fPIE")
 TARGET_LINK_LIBRARIES(${NITOOL} ${${PROJECT_NAME}_LDFLAGS} "-pie")
 
 SET(INSTALLER_PLUGIN "ui-application")
 SET(${INSTALLER_PLUGIN}_SOURCE_FILES
-       util/utils.cc
-       installer-plugin/common.cc
-       installer-plugin/ui-application.cc
+    util/utils.cc
+    installer-plugin/common.cc
+    installer-plugin/ui-application.cc
 )
 ADD_LIBRARY(${INSTALLER_PLUGIN} SHARED ${${INSTALLER_PLUGIN}_SOURCE_FILES})
-SET_TARGET_PROPERTIES(${INSTALLER_PLUGIN}      PROPERTIES COMPILE_FLAGS "-fPIC")
+SET_TARGET_PROPERTIES(${INSTALLER_PLUGIN} PROPERTIES COMPILE_FLAGS "-fPIC")
 TARGET_LINK_LIBRARIES(${INSTALLER_PLUGIN} ${${PROJECT_NAME}_LDFLAGS})
 
 
 SET(PREFER_DOTNET_AOT_PLUGIN "prefer_dotnet_aot_plugin")
 SET(${PREFER_DOTNET_AOT_PLUGIN}_SOURCE_FILES
-       util/utils.cc
-       installer-plugin/common.cc
-       installer-plugin/prefer_dotnet_aot_plugin.cc
+    util/utils.cc
+    installer-plugin/common.cc
+    installer-plugin/prefer_dotnet_aot_plugin.cc
 )
 ADD_LIBRARY(${PREFER_DOTNET_AOT_PLUGIN} SHARED ${${PREFER_DOTNET_AOT_PLUGIN}_SOURCE_FILES})
-SET_TARGET_PROPERTIES(${PREFER_DOTNET_AOT_PLUGIN}      PROPERTIES COMPILE_FLAGS "-fPIC")
+SET_TARGET_PROPERTIES(${PREFER_DOTNET_AOT_PLUGIN} PROPERTIES COMPILE_FLAGS "-fPIC")
 TARGET_LINK_LIBRARIES(${PREFER_DOTNET_AOT_PLUGIN} ${${PROJECT_NAME}_LDFLAGS})
 
 
 IF(NOT DEFINED NO_TIZEN)
-       INSTALL(TARGETS ${DOTNET_LAUNCHER} DESTINATION ${BINDIR})
-        INSTALL(TARGETS ${SCD_LAUNCHER} DESTINATION ${BINDIR})
-       INSTALL(TARGETS ${NITOOL} DESTINATION ${BINDIR})
-       INSTALL(TARGETS ${INSTALLER_PLUGIN} DESTINATION ${INSTALL_PLUGIN_DIR})
-       INSTALL(TARGETS ${PREFER_DOTNET_AOT_PLUGIN} DESTINATION ${INSTALL_MDPLUGIN_DIR})
-       INSTALL(FILES dotnet.loader DESTINATION ${LOADERDIR})
-       INSTALL(FILES dotnet.launcher DESTINATION ${LOADERDIR})
-       INSTALL(FILES dotnet.debugger DESTINATION ${LOADERDIR})
+    INSTALL(TARGETS ${DOTNET_LAUNCHER} DESTINATION ${BINDIR})
+    INSTALL(TARGETS ${SCD_LAUNCHER} DESTINATION ${BINDIR})
+    INSTALL(TARGETS ${NITOOL} DESTINATION ${BINDIR})
+    INSTALL(TARGETS ${INSTALLER_PLUGIN} DESTINATION ${INSTALL_PLUGIN_DIR})
+    INSTALL(TARGETS ${PREFER_DOTNET_AOT_PLUGIN} DESTINATION ${INSTALL_MDPLUGIN_DIR})
+    INSTALL(FILES dotnet.loader DESTINATION ${LOADERDIR})
+    INSTALL(FILES dotnet.launcher DESTINATION ${LOADERDIR})
+    INSTALL(FILES dotnet.debugger DESTINATION ${LOADERDIR})
 ENDIF(NOT DEFINED NO_TIZEN)
index 846e372..7a96952 100644 (file)
@@ -1,6 +1,6 @@
 [LAUNCHER]
-NAME   dotnet-launcher
-EXE    /usr/bin/dotnet-launcher
-APP_TYPE       dotnet
-EXTRA_ARG      --standalone
+NAME         dotnet-launcher
+EXE          /usr/bin/dotnet-launcher
+APP_TYPE     dotnet
+EXTRA_ARG    --standalone
 
index 57b547d..78bb74f 100644 (file)
@@ -1,16 +1,16 @@
 [LOADER]
-NAME    dotnet-launcher
-EXE     /usr/bin/dotnet-launcher
-APP_TYPE        dotnet
-DETECTION_METHOD        TIMEOUT|DEMAND
-TIMEOUT         5000
-EXTRA_ARRAY                    preload
-EXTRA_ARRAY_VAL                /usr/lib/libappcore-efl.so.1
-EXTRA_ARRAY_VAL                /usr/lib/libappcore-common.so.1
-EXTRA_ARRAY_VAL                /usr/lib/libcapi-appfw-application.so.0
-EXTRA_ARRAY_VAL                /usr/lib/ecore_imf/modules/wayland/v-1.16/libwltextinputmodule.so
-EXTRA_ARRAY_VAL                /usr/lib/libdali-toolkit.so
-EXTRA_ARRAY_VAL                /usr/lib/libcairo.so.2
-EXTRA_ARRAY_VAL                /usr/lib/libefl-assist.so.0
-EXTRA_ARRAY_VAL                /usr/lib/libcapi-media-player.so.0
-EXTRA_ARRAY_VAL                /usr/lib/libcapi-media-camera.so.0
+NAME                   dotnet-launcher
+EXE                    /usr/bin/dotnet-launcher
+APP_TYPE               dotnet
+DETECTION_METHOD       TIMEOUT|DEMAND
+TIMEOUT                5000
+EXTRA_ARRAY            preload
+EXTRA_ARRAY_VAL        /usr/lib/libappcore-efl.so.1
+EXTRA_ARRAY_VAL        /usr/lib/libappcore-common.so.1
+EXTRA_ARRAY_VAL        /usr/lib/libcapi-appfw-application.so.0
+EXTRA_ARRAY_VAL        /usr/lib/ecore_imf/modules/wayland/v-1.16/libwltextinputmodule.so
+EXTRA_ARRAY_VAL        /usr/lib/libdali-toolkit.so
+EXTRA_ARRAY_VAL        /usr/lib/libcairo.so.2
+EXTRA_ARRAY_VAL        /usr/lib/libefl-assist.so.0
+EXTRA_ARRAY_VAL        /usr/lib/libcapi-media-player.so.0
+EXTRA_ARRAY_VAL        /usr/lib/libcapi-media-camera.so.0
index d2c9c3f..6473dc8 100644 (file)
@@ -310,8 +310,10 @@ void create_ni_under_dirs(const char* root_paths[], int count, const char* ignor
       {
         // change owner and groups for generated ni file.
         struct stat info;
-        if (!stat(path, &info)) {
-          if (chown(ni.c_str(), info.st_uid, info.st_gid) == -1) {
+        if (!stat(path, &info))
+        {
+          if (chown(ni.c_str(), info.st_uid, info.st_gid) == -1)
+          {
             _ERR("Failed to change owner and group name");
           }
         }
index f180739..a9c940b 100755 (executable)
@@ -37,30 +37,34 @@ const std::string VALUE_TRUE = "true";
 const std::string mdKey = "http://tizen.org/metadata/prefer_dotnet_aot";
 extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL (const char *pkgid, const char *appid, GList *list)
 {
-
-    GList *tag = NULL;
-    bool mdValue = false;
-    Metadata *mdInfo = NULL;
-    tag = g_list_first(list);
-    while (tag) {
-        mdInfo = (Metadata*)tag->data;
-        if(mdInfo->key == mdKey && mdInfo->value == VALUE_TRUE) {
-            _DBG("Prefer dotnet application AOT set TRUE");
-            mdValue = true;
-        }
-        tag = g_list_next(tag);
+  GList *tag = NULL;
+  bool mdValue = false;
+  Metadata *mdInfo = NULL;
+  tag = g_list_first(list);
+  while (tag)
+  {
+    mdInfo = (Metadata*)tag->data;
+    if(mdInfo->key == mdKey && mdInfo->value == VALUE_TRUE)
+    {
+      _DBG("Prefer dotnet application AOT set TRUE");
+      mdValue = true;
     }
+    tag = g_list_next(tag);
+  }
 
-    if (mdValue) {
-        if (create_ni_under_pkg_root(pkgid) != 0)
-        {
-            _ERR("Failed to get root path from [%s]", pkgid);
-            return -1;
-        } else {
-            _DBG("Complete make application to native image");
-        }
+  if (mdValue)
+  {
+    if (create_ni_under_pkg_root(pkgid) != 0)
+    {
+      _ERR("Failed to get root path from [%s]", pkgid);
+      return -1;
+    }
+    else
+    {
+      _DBG("Complete make application to native image");
     }
-    return 0;
+  }
+  return 0;
 }
 
 extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE (const char *pkgid, const char *appid, GList *list)
index 4aabf42..5f40771 100644 (file)
@@ -73,7 +73,6 @@ CoreRuntime::~CoreRuntime()
 
 int CoreRuntime::Initialize(bool standalone)
 {
-
   if (standalone)
   {
     const char *_deviceapi_directory = getenv("DeviceAPIDirectory");
index 2959b19..138d9f4 100644 (file)
@@ -49,7 +49,6 @@
 using namespace std;
 
 
-
 bool isDebugMode = false;
 char *coreclr_gdbjit[PATH_MAX];
 char *root_path;
@@ -73,12 +72,15 @@ void service_app_control(app_control_h app_control, void *data)
   char* buf[82];
   int ret = app_control_get_extra_data(app_control, "_SCD_DEBUG_", buf);
 
-  if (ret == APP_CONTROL_ERROR_NONE) {
-    if(strcmp(*buf, "1") == 0) {
+  if (ret == APP_CONTROL_ERROR_NONE)
+  {
+    if(strcmp(*buf, "1") == 0)
+    {
       isDebugMode = true;
     }
   }
-  if (isDebugMode) {
+  if (isDebugMode)
+  {
     ret = app_control_get_extra_data(app_control, "_SCD_CORECLR_GDBJIT_", coreclr_gdbjit);
   }
 
@@ -116,15 +118,15 @@ bool GetEntrypointExecutableAbsolutePath(std::string& entrypointExecutable)
   char exe[PATH_MAX];
   ssize_t res = readlink(symlinkEntrypointExecutable, exe, PATH_MAX - 1);
   if (res != -1)
-    {
-      exe[res] = '\0';
-      entrypointExecutable.assign(exe);
-      result = true;
-    }
+  {
+    exe[res] = '\0';
+    entrypointExecutable.assign(exe);
+    result = true;
+  }
   else
-    {
-      result = false;
-    }
+  {
+    result = false;
+  }
 
   return result;
 }
@@ -135,28 +137,26 @@ bool GetAbsolutePath(const char* path, std::string& absolutePath)
 
   char realPath[PATH_MAX];
   if (realpath(path, realPath) != nullptr && realPath[0] != '\0')
-    {
-      absolutePath.assign(realPath);
-      // realpath should return canonicalized path without the trailing slash
-      assert(absolutePath.back() != '/');
+  {
+    absolutePath.assign(realPath);
+    // realpath should return canonicalized path without the trailing slash
+    assert(absolutePath.back() != '/');
 
-      result = true;
-    }
+    result = true;
+  }
 
   return result;
 }
 
-
-
 bool GetDirectory(const char* absolutePath, std::string& directory)
 {
   directory.assign(absolutePath);
   size_t lastSlash = directory.rfind('/');
   if (lastSlash != std::string::npos)
-    {
-      directory.erase(lastSlash);
-      return true;
-    }
+  {
+    directory.erase(lastSlash);
+    return true;
+  }
 
   return false;
 }
@@ -166,25 +166,25 @@ bool GetClrFilesAbsolutePath(const char* currentExePath, const char* clrFilesPat
   std::string clrFilesRelativePath;
   const char* clrFilesPathLocal = clrFilesPath;
   if (clrFilesPathLocal == nullptr)
+  {
+    // There was no CLR files path specified, use the folder of the corerun/coreconsole
+    if (!GetDirectory(currentExePath, clrFilesRelativePath))
     {
-      // There was no CLR files path specified, use the folder of the corerun/coreconsole
-      if (!GetDirectory(currentExePath, clrFilesRelativePath))
-        {
-          perror("Failed to get directory from argv[0]");
-          return false;
-        }
+      perror("Failed to get directory from argv[0]");
+      return false;
+    }
 
-      clrFilesPathLocal = clrFilesRelativePath.c_str();
+    clrFilesPathLocal = clrFilesRelativePath.c_str();
 
-      // TODO: consider using an env variable (if defined) as a fall-back.
-      // The windows version of the corerun uses core_root env variable
-    }
+    // TODO: consider using an env variable (if defined) as a fall-back.
+    // The windows version of the corerun uses core_root env variable
+  }
 
   if (!GetAbsolutePath(clrFilesPathLocal, clrFilesAbsolutePath))
-    {
-      perror("Failed to convert CLR files path to absolute path");
-      return false;
-    }
+  {
+    perror("Failed to convert CLR files path to absolute path");
+    return false;
+  }
 
   return true;
 }
@@ -200,96 +200,93 @@ void AddFilesFromDirectoryToTpaList(const char* directory, std::string& tpaList)
 
   DIR* dir = opendir(directory);
   if (dir == nullptr)
-    {
-      return;
-    }
+  {
+    return;
+  }
 
   std::set<std::string> addedAssemblies;
 
   // Walk the directory for each extension separately so that we first get files with .ni.dll extension,
   // then files with .dll extension, etc.
   for (unsigned int extIndex = 0; extIndex < sizeof(tpaExtensions) / sizeof(tpaExtensions[0]); extIndex++)
-    {
-      const char* ext = tpaExtensions[extIndex];
-      int extLength = strlen(ext);
+  {
+    const char* ext = tpaExtensions[extIndex];
+    int extLength = strlen(ext);
+
+    struct dirent* entry;
 
-      struct dirent* entry;
+    // For all entries in the directory
+    while ((entry = readdir(dir)) != nullptr)
+    {
+      // We are interested in files only
+      switch (entry->d_type)
+      {
+        case DT_REG:
+          break;
 
-      // For all entries in the directory
-      while ((entry = readdir(dir)) != nullptr)
+          // Handle symlinks and file systems that do not support d_type
+        case DT_LNK:
+        case DT_UNKNOWN:
         {
-          // We are interested in files only
-          switch (entry->d_type)
+          std::string fullFilename;
+
+          fullFilename.append(directory);
+          fullFilename.append("/");
+          fullFilename.append(entry->d_name);
+
+          struct stat sb;
+            if (stat(fullFilename.c_str(), &sb) == -1)
             {
-            case DT_REG:
-              break;
-
-              // Handle symlinks and file systems that do not support d_type
-            case DT_LNK:
-            case DT_UNKNOWN:
-              {
-                std::string fullFilename;
-
-                fullFilename.append(directory);
-                fullFilename.append("/");
-                fullFilename.append(entry->d_name);
-
-                struct stat sb;
-                if (stat(fullFilename.c_str(), &sb) == -1)
-                  {
-                    continue;
-                  }
-
-                if (!S_ISREG(sb.st_mode))
-                  {
-                    continue;
-                  }
-              }
-              break;
-
-            default:
               continue;
             }
 
-          std::string filename(entry->d_name);
-
-          // Check if the extension matches the one we are looking for
-          int extPos = filename.length() - extLength;
-          if ((extPos <= 0) || (filename.compare(extPos, extLength, ext) != 0))
+            if (!S_ISREG(sb.st_mode))
             {
               continue;
             }
+          }
+          break;
 
-          std::string filenameWithoutExt(filename.substr(0, extPos));
+        default:
+          continue;
+      }
 
-          // Make sure if we have an assembly with multiple extensions present,
-          // we insert only one version of it.
-          if (addedAssemblies.find(filenameWithoutExt) == addedAssemblies.end())
-            {
-              addedAssemblies.insert(filenameWithoutExt);
+      std::string filename(entry->d_name);
 
-              tpaList.append(directory);
-              tpaList.append("/");
-              tpaList.append(filename);
-              tpaList.append(":");
-            }
-        }
+      // Check if the extension matches the one we are looking for
+      int extPos = filename.length() - extLength;
+      if ((extPos <= 0) || (filename.compare(extPos, extLength, ext) != 0))
+      {
+        continue;
+      }
+
+      std::string filenameWithoutExt(filename.substr(0, extPos));
 
-      // Rewind the directory stream to be able to iterate over it for the next extension
-      rewinddir(dir);
+      // Make sure if we have an assembly with multiple extensions present,
+      // we insert only one version of it.
+      if (addedAssemblies.find(filenameWithoutExt) == addedAssemblies.end())
+      {
+        addedAssemblies.insert(filenameWithoutExt);
+
+        tpaList.append(directory);
+        tpaList.append("/");
+        tpaList.append(filename);
+        tpaList.append(":");
+      }
     }
 
+    // Rewind the directory stream to be able to iterate over it for the next extension
+    rewinddir(dir);
+  }
+
   closedir(dir);
 }
 
-
-
-int ExecuteManagedAssembly(
-                           const char* currentExeAbsolutePath,
-                           const char* clrFilesAbsolutePath,
-                           const char* managedAssemblyAbsolutePath,
-                           int managedAssemblyArgc,
-                           const char** managedAssemblyArgv)
+int ExecuteManagedAssembly(const char* currentExeAbsolutePath,
+                                    const char* clrFilesAbsolutePath,
+                                    const char* managedAssemblyAbsolutePath,
+                                    int managedAssemblyArgc,
+                                    const char** managedAssemblyArgv)
 {
   // Indicates failure
   int exitCode = -1;
@@ -313,10 +310,10 @@ int ExecuteManagedAssembly(
   coreClrDllPath.append(coreClrDll);
 
   if (coreClrDllPath.length() >= PATH_MAX)
-    {
-      fprintf(stderr, "Absolute path to libcoreclr.so too long\n");
-      return -1;
-    }
+  {
+    fprintf(stderr, "Absolute path to libcoreclr.so too long\n");
+    return -1;
+  }
 
   // Get just the path component of the managed assembly path
   std::string appPath;
@@ -327,14 +324,14 @@ int ExecuteManagedAssembly(
   std::string nativeDllSearchDirs(appPath);
   char *coreLibraries = getenv("CORE_LIBRARIES");
   if (coreLibraries)
+  {
+    nativeDllSearchDirs.append(":");
+    nativeDllSearchDirs.append(coreLibraries);
+    if (std::strcmp(coreLibraries, clrFilesAbsolutePath) != 0)
     {
-      nativeDllSearchDirs.append(":");
-      nativeDllSearchDirs.append(coreLibraries);
-      if (std::strcmp(coreLibraries, clrFilesAbsolutePath) != 0)
-        {
-          AddFilesFromDirectoryToTpaList(coreLibraries, tpaList);
-        }
+      AddFilesFromDirectoryToTpaList(coreLibraries, tpaList);
     }
+  }
   nativeDllSearchDirs.append(":");
   nativeDllSearchDirs.append(clrFilesAbsolutePath);
 
@@ -342,123 +339,121 @@ int ExecuteManagedAssembly(
 
   void* coreclrLib = dlopen(coreClrDllPath.c_str(), RTLD_NOW | RTLD_LOCAL);
   if (coreclrLib != nullptr)
-    {
-      coreclr_initialize_ptr initializeCoreCLR = (coreclr_initialize_ptr)dlsym(coreclrLib, "coreclr_initialize");
-      coreclr_execute_assembly_ptr executeAssembly = (coreclr_execute_assembly_ptr)dlsym(coreclrLib, "coreclr_execute_assembly");
-      coreclr_shutdown_ptr shutdownCoreCLR = (coreclr_shutdown_ptr)dlsym(coreclrLib, "coreclr_shutdown");
+  {
+    coreclr_initialize_ptr initializeCoreCLR = (coreclr_initialize_ptr)dlsym(coreclrLib, "coreclr_initialize");
+    coreclr_execute_assembly_ptr executeAssembly = (coreclr_execute_assembly_ptr)dlsym(coreclrLib, "coreclr_execute_assembly");
+    coreclr_shutdown_ptr shutdownCoreCLR = (coreclr_shutdown_ptr)dlsym(coreclrLib, "coreclr_shutdown");
 
-      if (initializeCoreCLR == nullptr)
-        {
-          fprintf(stderr, "Function coreclr_initialize not found in the libcoreclr.so\n");
-        }
-      else if (executeAssembly == nullptr)
-        {
-          fprintf(stderr, "Function coreclr_execute_assembly not found in the libcoreclr.so\n");
-        }
-      else if (shutdownCoreCLR == nullptr)
-        {
-          fprintf(stderr, "Function coreclr_shutdown not found in the libcoreclr.so\n");
-        }
+    if (initializeCoreCLR == nullptr)
+    {
+      fprintf(stderr, "Function coreclr_initialize not found in the libcoreclr.so\n");
+    }
+    else if (executeAssembly == nullptr)
+    {
+      fprintf(stderr, "Function coreclr_execute_assembly not found in the libcoreclr.so\n");
+    }
+    else if (shutdownCoreCLR == nullptr)
+    {
+      fprintf(stderr, "Function coreclr_shutdown not found in the libcoreclr.so\n");
+    }
+    else
+    {
+      // Check whether we are enabling server GC (off by default)
+      const char* useServerGc = std::getenv(serverGcVar);
+      if (useServerGc == nullptr)
+      {
+        useServerGc = "0";
+      }
+
+      // CoreCLR expects strings "true" and "false" instead of "1" and "0".
+      useServerGc = std::strcmp(useServerGc, "1") == 0 ? "true" : "false";
+
+      // Allowed property names:
+      // APPBASE
+      // - The base path of the application from which the exe and other assemblies will be loaded
+      //
+      // TRUSTED_PLATFORM_ASSEMBLIES
+      // - The list of complete paths to each of the fully trusted assemblies
+      //
+      // APP_PATHS
+      // - The list of paths which will be probed by the assembly loader
+      //
+      // APP_NI_PATHS
+      // - The list of additional paths that the assembly loader will probe for ngen images
+      //
+      // NATIVE_DLL_SEARCH_DIRECTORIES
+      // - The list of paths that will be probed for native DLLs called by PInvoke
+      //
+      const char *propertyKeys[] = {
+        "TRUSTED_PLATFORM_ASSEMBLIES",
+        "APP_PATHS",
+        "APP_NI_PATHS",
+        "NATIVE_DLL_SEARCH_DIRECTORIES",
+        "System.GC.Server",
+      };
+      const char *propertyValues[] = {
+        // TRUSTED_PLATFORM_ASSEMBLIES
+        tpaList.c_str(),
+        // APP_PATHS
+        appPath.c_str(),
+        // APP_NI_PATHS
+        appPath.c_str(),
+        // NATIVE_DLL_SEARCH_DIRECTORIES
+        nativeDllSearchDirs.c_str(),
+        // System.GC.Server
+        useServerGc,
+      };
+
+      void* hostHandle;
+      unsigned int domainId;
+
+      int st = initializeCoreCLR(currentExeAbsolutePath,
+                                 "unixcorerun",
+                                 sizeof(propertyKeys) / sizeof(propertyKeys[0]),
+                                 propertyKeys,
+                                 propertyValues,
+                                 &hostHandle,
+                                 &domainId);
+
+      if (!SUCCEEDED(st))
+      {
+        fprintf(stderr, "coreclr_initialize failed - status: 0x%08x\n", st);
+        exitCode = -1;
+      }
       else
+      {
+        st = executeAssembly(hostHandle,
+                             domainId,
+                             managedAssemblyArgc,
+                             managedAssemblyArgv,
+                             managedAssemblyAbsolutePath,
+                             (unsigned int*)&exitCode);
+
+        if (!SUCCEEDED(st))
         {
-          // Check whether we are enabling server GC (off by default)
-          const char* useServerGc = std::getenv(serverGcVar);
-          if (useServerGc == nullptr)
-            {
-              useServerGc = "0";
-            }
-
-          // CoreCLR expects strings "true" and "false" instead of "1" and "0".
-          useServerGc = std::strcmp(useServerGc, "1") == 0 ? "true" : "false";
-
-          // Allowed property names:
-          // APPBASE
-          // - The base path of the application from which the exe and other assemblies will be loaded
-          //
-          // TRUSTED_PLATFORM_ASSEMBLIES
-          // - The list of complete paths to each of the fully trusted assemblies
-          //
-          // APP_PATHS
-          // - The list of paths which will be probed by the assembly loader
-          //
-          // APP_NI_PATHS
-          // - The list of additional paths that the assembly loader will probe for ngen images
-          //
-          // NATIVE_DLL_SEARCH_DIRECTORIES
-          // - The list of paths that will be probed for native DLLs called by PInvoke
-          //
-          const char *propertyKeys[] = {
-            "TRUSTED_PLATFORM_ASSEMBLIES",
-            "APP_PATHS",
-            "APP_NI_PATHS",
-            "NATIVE_DLL_SEARCH_DIRECTORIES",
-            "System.GC.Server",
-          };
-          const char *propertyValues[] = {
-            // TRUSTED_PLATFORM_ASSEMBLIES
-            tpaList.c_str(),
-            // APP_PATHS
-            appPath.c_str(),
-            // APP_NI_PATHS
-            appPath.c_str(),
-            // NATIVE_DLL_SEARCH_DIRECTORIES
-            nativeDllSearchDirs.c_str(),
-            // System.GC.Server
-            useServerGc,
-          };
-
-          void* hostHandle;
-          unsigned int domainId;
-
-          int st = initializeCoreCLR(
-                                     currentExeAbsolutePath,
-                                     "unixcorerun",
-                                     sizeof(propertyKeys) / sizeof(propertyKeys[0]),
-                                     propertyKeys,
-                                     propertyValues,
-                                     &hostHandle,
-                                     &domainId);
-
-          if (!SUCCEEDED(st))
-            {
-              fprintf(stderr, "coreclr_initialize failed - status: 0x%08x\n", st);
-              exitCode = -1;
-            }
-          else
-            {
-              st = executeAssembly(
-                                   hostHandle,
-                                   domainId,
-                                   managedAssemblyArgc,
-                                   managedAssemblyArgv,
-                                   managedAssemblyAbsolutePath,
-                                   (unsigned int*)&exitCode);
-
-              if (!SUCCEEDED(st))
-                {
-                  fprintf(stderr, "coreclr_execute_assembly failed - status: 0x%08x\n", st);
-                  exitCode = -1;
-                }
-
-              st = shutdownCoreCLR(hostHandle, domainId);
-              if (!SUCCEEDED(st))
-                {
-                  fprintf(stderr, "coreclr_shutdown failed - status: 0x%08x\n", st);
-                  exitCode = -1;
-                }
-            }
+          fprintf(stderr, "coreclr_execute_assembly failed - status: 0x%08x\n", st);
+          exitCode = -1;
         }
 
-      if (dlclose(coreclrLib) != 0)
+        st = shutdownCoreCLR(hostHandle, domainId);
+        if (!SUCCEEDED(st))
         {
-          fprintf(stderr, "Warning - dlclose failed\n");
+          fprintf(stderr, "coreclr_shutdown failed - status: 0x%08x\n", st);
+          exitCode = -1;
         }
+      }
     }
-  else
+
+    if (dlclose(coreclrLib) != 0)
     {
-      const char* error = dlerror();
-      fprintf(stderr, "dlopen failed to open the libcoreclr.so with error %s\n", error);
+      fprintf(stderr, "Warning - dlclose failed\n");
     }
+  }
+  else
+  {
+    const char* error = dlerror();
+    fprintf(stderr, "dlopen failed to open the libcoreclr.so with error %s\n", error);
+  }
 
   return exitCode;
 }
@@ -467,8 +462,7 @@ int ExecuteManagedAssembly(
 // Display the help text
 void DisplayUsage()
 {
-  fprintf(
-          stderr,
+  fprintf(stderr,
           "Runs executables on CoreCLR\n\n"
           "Usage: <program> [OPTIONS] [ARGUMENTS]\n"
           "Runs <program>.dll on CoreCLR.\n\n"
@@ -492,52 +486,52 @@ bool ParseArguments(
   *managedAssemblyArgc = 0;
 
   for (int i = 1; i < argc; i++)
+  {
+    // Check for options. Options to the Unix coreconsole are prefixed with '-_' to match the convention
+    // used in the Windows version of coreconsole.
+    if (strncmp(argv[i], "-_", 2) == 0)
     {
-      // Check for options. Options to the Unix coreconsole are prefixed with '-_' to match the convention
-      // used in the Windows version of coreconsole.
-      if (strncmp(argv[i], "-_", 2) == 0)
+      // Path to the libcoreclr.so and the managed CLR assemblies
+      if (strcmp(argv[i], "-_c") == 0)
+      {
+        i++;
+        if (i < argc)
         {
-          // Path to the libcoreclr.so and the managed CLR assemblies
-          if (strcmp(argv[i], "-_c") == 0)
-            {
-              i++;
-              if (i < argc)
-                {
-                  *clrFilesPath = argv[i];
-                }
-              else
-                {
-                  fprintf(stderr, "Option %s: missing path\n", argv[i - 1]);
-                  success = false;
-                  break;
-                }
-            }
-          else if (strcmp(argv[i], "-_h") == 0)
-            {
-              DisplayUsage();
-              success = false;
-              break;
-            }
-          else
-            {
-              fprintf(stderr, "Unknown option %s\n", argv[i]);
-              success = false;
-              break;
-            }
+          *clrFilesPath = argv[i];
         }
-      else
+        else
         {
-          // We treat everything starting from the first non-option argument as arguments
-          // to the managed assembly.
-          *managedAssemblyArgc = argc - i;
-          if (*managedAssemblyArgc != 0)
-            {
-              *managedAssemblyArgv = &argv[i];
-            }
-
+          fprintf(stderr, "Option %s: missing path\n", argv[i - 1]);
+          success = false;
           break;
         }
+      }
+      else if (strcmp(argv[i], "-_h") == 0)
+      {
+        DisplayUsage();
+        success = false;
+        break;
+      }
+      else
+      {
+        fprintf(stderr, "Unknown option %s\n", argv[i]);
+        success = false;
+        break;
+      }
+    }
+    else
+    {
+      // We treat everything starting from the first non-option argument as arguments
+      // to the managed assembly.
+      *managedAssemblyArgc = argc - i;
+      if (*managedAssemblyArgc != 0)
+      {
+        *managedAssemblyArgv = &argv[i];
+      }
+
+      break;
     }
+  }
 
   return success;
 }
@@ -550,7 +544,8 @@ int main(const int argc, const char* argv[])
 
   // This routine check whether _SCD_DEBUG_ flag is set(1) or not.
   // In second pass, this routine is skipped.
-  if (second_pass == NULL) {
+  if (second_pass == NULL)
+  {
     // run service_app routine to extract _SCD_DEBUG_
     char ad[50] = {0,};
     service_app_lifecycle_callback_s event_callback;
@@ -564,7 +559,8 @@ int main(const int argc, const char* argv[])
     vector<const char*> vargs;
     int status = 0;
 
-    if (isDebugMode) {
+    if (isDebugMode)
+    {
       dlog_print(DLOG_INFO,"dotnet","debugmode on\n");
       setenv("CORECLR_GDBJIT", *coreclr_gdbjit, 1);
 
@@ -583,37 +579,37 @@ int main(const int argc, const char* argv[])
     vargs.push_back(buf);
 
     // Pass app argument to lldb-server as it is
-    for (int i=1; i<argc; i++) {
+    for (int i=1; i<argc; i++)
+    {
       vargs.push_back(argv[i]);
     }
 
     const char** new_args = &vargs[0];
     setenv("SECONDPASS", "1", 1);
     status = execvp(new_args[0], (char *const *)new_args);
-    if (status == -1) {
+    if (status == -1)
+    {
       dlog_print(DLOG_ERROR,"dotnet","execvp error");
     }
     dlog_print(DLOG_INFO,"dotnet","something wrong errno: %d\n",errno);
   }
   /// service_app_end
 
-
-
   // Make sure we have a full path for argv[0].
   std::string argv0AbsolutePath;
   std::string entryPointExecutablePath;
 
   if (!GetEntrypointExecutableAbsolutePath(entryPointExecutablePath))
-    {
-      perror("Could not get full path to current executable");
-      return -1;
-    }
+  {
+    perror("Could not get full path to current executable");
+    return -1;
+  }
 
   if (!GetAbsolutePath(entryPointExecutablePath.c_str(), argv0AbsolutePath))
-    {
-      perror("Could not normalize full path to current executable");
-      return -1;
-    }
+  {
+    perror("Could not normalize full path to current executable");
+    return -1;
+  }
 
   // We will try to load the managed assembly with the same name as this executable
   // but with the .dll extension.
@@ -624,46 +620,44 @@ int main(const int argc, const char* argv[])
   // Check if the specified managed assembly file exists
   struct stat sb;
   if (stat(managedAssemblyAbsolutePath, &sb) == -1)
-    {
-      perror("Managed assembly not found");
-      return -1;
-    }
+  {
+    perror("Managed assembly not found");
+    return -1;
+  }
 
   // Verify that the managed assembly path points to a file
   if (!S_ISREG(sb.st_mode))
-    {
-      fprintf(stderr, "The specified managed assembly is not a file\n");
-      return -1;
-    }
+  {
+    fprintf(stderr, "The specified managed assembly is not a file\n");
+    return -1;
+  }
 
   const char* clrFilesPath;
   const char** managedAssemblyArgv;
   int managedAssemblyArgc;
 
-  if (!ParseArguments(
-                      argc,
+  if (!ParseArguments(argc,
                       argv,
                       &clrFilesPath,
                       &managedAssemblyArgc,
                       &managedAssemblyArgv
                       ))
-    {
-      // Invalid command line
-      return -1;
-    }
+  {
+    // Invalid command line
+    return -1;
+  }
 
   std::string clrFilesAbsolutePath;
   if(!GetClrFilesAbsolutePath(argv0AbsolutePath.c_str(), clrFilesPath, clrFilesAbsolutePath))
-    {
-      return -1;
-    }
+  {
+    return -1;
+  }
 
-  int exitCode = ExecuteManagedAssembly(
-                                        argv0AbsolutePath.c_str(),
-                                        clrFilesAbsolutePath.c_str(),
-                                        managedAssemblyAbsolutePath,
-                                        managedAssemblyArgc,
-                                        managedAssemblyArgv);
+  int exitCode = ExecuteManagedAssembly(argv0AbsolutePath.c_str(),
+                                         clrFilesAbsolutePath.c_str(),
+                                         managedAssemblyAbsolutePath,
+                                         managedAssemblyArgc,
+                                         managedAssemblyArgv);
 
   return exitCode;
 }
index 63fd652..d36f61f 100644 (file)
@@ -48,7 +48,12 @@ static Evas_Object *__win;
 class LaunchpadAdapterImpl : public LaunchpadAdapter
 {
   public:
-    LaunchpadAdapterImpl() : isLaunched(false) { }
+    LaunchpadAdapterImpl() :
+      callbacks(),
+      adapter(),
+      launcher(nullptr),
+      isLaunched(false)
+    { }
     void LoaderMain(int argc, char* argv[]) override;
 
     std::map<int, FdHandler> Handlers;
@@ -134,31 +139,31 @@ static void Fd_Remove(void *data, int fd)
 
 static void PreloadLibsAndWindow(bundle *extra, int type, void *user_data)
 {
-       int elm_init_cnt = 0;
+  int elm_init_cnt = 0;
   const char **so_array;
   int len = 0;
   int i;
   void *handle = NULL;
 
   // Preload native libraries
-       if (extra == NULL) {
-               _DBG("No extra data");
-               return;
-       }
+  if (extra == NULL) {
+    _DBG("No extra data");
+    return;
+  }
 
-       so_array = bundle_get_str_array(extra, "preload", &len);
+  so_array = bundle_get_str_array(extra, "preload", &len);
 
-       if (!so_array)
-               return;
+  if (!so_array)
+    return;
 
-       for (i = 0; i < len; i++) {
-               handle = dlopen(so_array[i], RTLD_NOW);
-               _DBG("preload %s# - handle : %x", so_array[i], handle);
-       }
+  for (i = 0; i < len; i++) {
+    handle = dlopen(so_array[i], RTLD_NOW);
+    _DBG("preload %s# - handle : %x", so_array[i], handle);
+  }
 
   // Precreate window
-       elm_init_cnt = elm_init(__argc, __argv);
-       _DBG("[candidate] elm init, returned: %d", elm_init_cnt);
+  elm_init_cnt = elm_init(__argc, __argv);
+  _DBG("[candidate] elm init, returned: %d", elm_init_cnt);
 
   elm_config_accel_preference_set("hw");
 
index 9bd024c..a25eaae 100644 (file)
@@ -109,8 +109,8 @@ int main(int argc, char *argv[])
     char** args = &vargs[0];
     if (runtime->Launch(appid, approot.c_str(), standalonePath, args_len, args))
     {
-        _ERR("Failed to launch");
-        return 0;
+      _ERR("Failed to launch");
+      return 0;
     }
   }
   else
index 6bf5754..c08b73f 100644 (file)
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="14.0" InitialTargets="CheckConfig" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       
-       <PropertyGroup>
-               <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-               <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-               <OutputType>library</OutputType>
-               <AssemblyName>Tizen.Runtime.Coreclr</AssemblyName>
-       </PropertyGroup>
+
+    <PropertyGroup>
+        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+        <OutputType>library</OutputType>
+        <AssemblyName>Tizen.Runtime.Coreclr</AssemblyName>
+    </PropertyGroup>
 
   <PropertyGroup>
     <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
     <NoWarn>$(NoWarn);1701;1702</NoWarn>
   </PropertyGroup>
 
-       <PropertyGroup Condition=" '$(Configuration)' == 'Debug'">
-               <DebugSymbols>true</DebugSymbols>
-               <DebugType>full</DebugType>
-               <OutputPath>bin/</OutputPath>
-               <DefineConstants>DEBUG;TRACE</DefineConstants>
-       </PropertyGroup>
+    <PropertyGroup Condition=" '$(Configuration)' == 'Debug'">
+        <DebugSymbols>true</DebugSymbols>
+        <DebugType>full</DebugType>
+        <OutputPath>bin/</OutputPath>
+        <DefineConstants>DEBUG;TRACE</DefineConstants>
+    </PropertyGroup>
 
-       <PropertyGroup Condition=" '$(Configuration)' == 'Release'">
-               <DebugType>pdbonly</DebugType>
-               <Optimize>true</Optimize>
-               <OutputPath>bin/</OutputPath>
+    <PropertyGroup Condition=" '$(Configuration)' == 'Release'">
+        <DebugType>pdbonly</DebugType>
+        <Optimize>true</Optimize>
+        <OutputPath>bin/</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
-       </PropertyGroup>
+    </PropertyGroup>
 
 <!-- Roslyn Not Support Assembly Signing yet.
-       <PropertyGroup>
-               <SignAssembly>true</SignAssembly>
-               <AssemblyOriginatorKeyFile>Tizen.Runtime.snk</AssemblyOriginatorKeyFile>
-       </PropertyGroup>
+    <PropertyGroup>
+        <SignAssembly>true</SignAssembly>
+        <AssemblyOriginatorKeyFile>Tizen.Runtime.snk</AssemblyOriginatorKeyFile>
+    </PropertyGroup>
 -->
 
-       <PropertyGroup>
-               <DefineConstants Condition=" '$(CLOG)' != '' ">$(DefineConstants);CLOG</DefineConstants>
-       </PropertyGroup>
+    <PropertyGroup>
+        <DefineConstants Condition=" '$(CLOG)' != '' ">$(DefineConstants);CLOG</DefineConstants>
+    </PropertyGroup>
 
-       <ItemGroup>
-               <Compile Include="Tizen.Runtime.Coreclr/AssemblyManager.cs" />
-               <Compile Include="Tizen.Runtime.Coreclr/AssemblyLoader.cs" />
-               <Compile Include="Tizen.Runtime/Log.cs" />
-               <Compile Include="Tizen.Runtime/DefaultConfigAttribute.cs" />
-       </ItemGroup>
+    <ItemGroup>
+        <Compile Include="Tizen.Runtime.Coreclr/AssemblyManager.cs" />
+        <Compile Include="Tizen.Runtime.Coreclr/AssemblyLoader.cs" />
+        <Compile Include="Tizen.Runtime/Log.cs" />
+        <Compile Include="Tizen.Runtime/DefaultConfigAttribute.cs" />
+    </ItemGroup>
 
-       <Target Name="CheckConfig">
-               <Message Text="MSBuildProjectDirectory = $(MSBuildProjectDirectory)"/>
-       </Target>
+    <Target Name="CheckConfig">
+        <Message Text="MSBuildProjectDirectory = $(MSBuildProjectDirectory)"/>
+    </Target>
 
   <ItemGroup>
     <None Include="Tizen.Runtime.Coreclr.project.json" />
   </ItemGroup>
 
-       <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 
   <PropertyGroup>
     <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
     <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
   </PropertyGroup>
 
-       <Target Name="BeforeCompile">
-               <ItemGroup>
-                       <AssemblyAttributes Include="DefaultConfigAttribute" Condition=" $(PreloadPath) != '' ">
-                               <_Parameter1>PreloadPath=$(PreloadPath)</_Parameter1>
-                       </AssemblyAttributes>
-               </ItemGroup>
+    <Target Name="BeforeCompile">
+        <ItemGroup>
+            <AssemblyAttributes Include="DefaultConfigAttribute" Condition=" $(PreloadPath) != '' ">
+                <_Parameter1>PreloadPath=$(PreloadPath)</_Parameter1>
+            </AssemblyAttributes>
+        </ItemGroup>
 
-               <WriteCodeFragment AssemblyAttributes="@(AssemblyAttributes)"
-                       Language="C#"
-                       OutputDirectory="$(IntermediateOutputPath)"
-                       OutputFile="Config.cs">
-                       <Output TaskParameter="OutputFile" ItemName="Compile" />
-               </WriteCodeFragment>
+        <WriteCodeFragment AssemblyAttributes="@(AssemblyAttributes)"
+            Language="C#"
+            OutputDirectory="$(IntermediateOutputPath)"
+            OutputFile="Config.cs">
+            <Output TaskParameter="OutputFile" ItemName="Compile" />
+        </WriteCodeFragment>
 
-       </Target>
+    </Target>
 </Project>
index 01fa069..ff2957d 100644 (file)
@@ -1,10 +1,10 @@
 {
-       "dependencies": {
-               "NETStandard.Library": "1.6.0",
-               "System.Runtime.Loader": "4.0.0"
-       },  
-       "frameworks": {
-               "netstandard1.5": {}
-       }
+    "dependencies": {
+        "NETStandard.Library": "1.6.0",
+        "System.Runtime.Loader": "4.0.0"
+    },
+    "frameworks": {
+        "netstandard1.5": {}
+    }
 }
 
index afd6fd4..ed3907e 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-using System;
+using System;
 using System.IO;
 using System.Reflection;
 using System.Runtime.Loader;
index 758e318..d09238f 100644 (file)
Binary files a/Tizen.Runtime/Tizen.Runtime.snk and b/Tizen.Runtime/Tizen.Runtime.snk differ
index 97e8c31..75b0fa5 100644 (file)
@@ -1,5 +1,5 @@
 <manifest>
-       <request>
-               <domain name="_"/>
-       </request>
+    <request>
+        <domain name="_"/>
+    </request>
 </manifest>