Merge branch 'tizen' of https://github.sec.samsung.net/j-h-choi/dotnet-launcher into...
authorj-h.choi <j-h.choi@samsung.com>
Tue, 11 Jun 2019 09:14:14 +0000 (18:14 +0900)
committerj-h.choi <j-h.choi@samsung.com>
Tue, 11 Jun 2019 09:14:14 +0000 (18:14 +0900)
1  2 
NativeLauncher/inc/ni_common.h
NativeLauncher/inc/utils.h
NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc
NativeLauncher/launcher/dotnet/dotnet_launcher.cc
NativeLauncher/tool/ni_common.cc
NativeLauncher/tool/nitool.cc
packaging/dotnet-launcher.spec

Simple merge
  #include <string>
  #include <vector>
  #include <functional>
+ #include <boost/filesystem.hpp>
  
 +#include <launcher_env.h>
 +
  #ifndef PATH_SEPARATOR
  #define PATH_SEPARATOR '/'
  #endif
@@@ -389,8 -392,8 +389,8 @@@ int CoreRuntime::initialize(bool standa
        std::string appRoot = std::string("/proc/self/fd/") + std::to_string(fd);
        std::string appBin = concatPath(appRoot, "bin");
        std::string appLib = concatPath(appRoot, "lib");
-       std::string probePath = appBin + ":" + appLib;
-       std::string NIprobePath = appBin + APP_NI_SUB_DIR + ":" + appLib + APP_NI_SUB_DIR;
+       std::string appTAC = concatPath(appBin, ".TAC.Release");
 -      std::string probePath = appBin + ":" + appLib + ":" + appTAC;
++      std::string NIprobePath = appBin + APP_NI_SUB_DIR + ":" + appLib + APP_NI_SUB_DIR + ":" + appTAC;
        std::string tpa = getTPA();
        std::string nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib + ":" + __nativeLibDirectory;
        std::string appName = std::string("dotnet-launcher-") + std::to_string(getpid());
@@@ -400,29 -332,30 +400,30 @@@ void createNiUnderDirs(const std::strin
        }
  }
  
- ni_error_e createNiUnderPkgRoot(const std::string& pkgName, bool enableR2R)
 -int createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R)
++ni_error_e createNiUnderPkgRoot(const std::string& pkgId, bool enableR2R)
  {
        std::string pkgRoot;
-       if (getRootPath(pkgName, pkgRoot) != NI_ERROR_NONE) {
-               fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str());
 -      if (getRootPath(pkgId, pkgRoot) < 0) {
++      if (getRootPath(pkgId, pkgRoot) != NI_ERROR_NONE) {
+               fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
 -              return -1;
 +              return NI_ERROR_INVALID_PACKAGE;
        }
  
        std::string binDir = concatPath(pkgRoot, "bin");
        std::string libDir = concatPath(pkgRoot, "lib");
-       std::string paths[] = {binDir, libDir};
+       std::string appTAC = concatPath(binDir, ".TAC.Release");
+       std::string paths[] = {binDir, libDir, appTAC};
  
-       createNiUnderDirs(paths, 2, enableR2R, true);
 -      createNiUnderDirs(paths, 3, enableR2R);
++      createNiUnderDirs(paths, 3, enableR2R, true);
  
 -      return 0;
 +      return NI_ERROR_NONE;
  }
  
- ni_error_e createNiDllUnderPkgRoot(const std::string& pkgName, const std::string& dllPath, bool enableR2R)
 -int createNiDllUnderPkgRoot(const std::string& pkgId, const std::string& dllPath, bool enableR2R)
++ni_error_e createNiDllUnderPkgRoot(const std::string& pkgId, const std::string& dllPath, bool enableR2R)
  {
        std::string pkgRoot;
-       if (getRootPath(pkgName, pkgRoot) < 0) {
-               fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str());
+       if (getRootPath(pkgId, pkgRoot) < 0) {
+               fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
 -              return -1;
 +              return NI_ERROR_INVALID_PACKAGE;
        }
  
        std::string binDir = concatPath(pkgRoot, "bin");
@@@ -469,12 -401,12 +469,12 @@@ void removeNiUnderDirs(const std::strin
                scanFilesInDir(rootPaths[i], convert, -1);
  }
  
- ni_error_e removeNiUnderPkgRoot(const std::string& pkgName)
 -int removeNiUnderPkgRoot(const std::string& pkgId)
++ni_error_e removeNiUnderPkgRoot(const std::string& pkgId)
  {
        std::string pkgRoot;
-       if (getRootPath(pkgName, pkgRoot) < 0) {
-               fprintf(stderr, "Failed to get root path from [%s]\n", pkgName.c_str());
+       if (getRootPath(pkgId, pkgRoot) < 0) {
+               fprintf(stderr, "Failed to get root path from [%s]\n", pkgId.c_str());
 -              return -1;
 +              return NI_ERROR_INVALID_PACKAGE;
        }
  
        std::string binDir = concatPath(pkgRoot, "bin");
@@@ -525,6 -443,5 +525,5 @@@ ni_error_e regenerateAppNI(bool enableR
        fprintf(stderr, "Success pkgmgrinfo_appinfo_metadata_filter_foreach\n");
  
        pkgmgrinfo_appinfo_metadata_filter_destroy(handle);
 -      return 0;
 +      return NI_ERROR_NONE;
  }
Simple merge
Simple merge