Add the NI_FLAGS_EXTRA_REF flag used to create ni for app_pkg (#393) accepted/tizen/unified/20220318.132742 submit/tizen/20220318.045134
author최종헌/Common Platform Lab(SR)/삼성전자 <j-h.choi@samsung.com>
Fri, 18 Mar 2022 04:37:57 +0000 (13:37 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 18 Mar 2022 04:37:57 +0000 (13:37 +0900)
Change-Id: Iab85217a9a97341a99c5e2e6f6521648ddade074

NativeLauncher/inc/ni_common.h
NativeLauncher/tool/ni_common.cc

index 349e3dc..ca53f72 100644 (file)
 #define NI_FLAGS_REF                    0x0008
 #define NI_FLAGS_INPUT_BUBBLE           0x0010
 #define NI_FLAGS_INPUT_BUBBLE_REF       0x0020
-#define NI_FLAGS_NO_PIPELINE            0x0040
-#define NI_FLAGS_MIBC                   0x0080
-#define NI_FLAGS_PRINT_CMD              0x0100
+#define NI_FLAGS_EXTRA_REF              0x0040
+#define NI_FLAGS_NO_PIPELINE            0x0080
+#define NI_FLAGS_MIBC                   0x0100
+#define NI_FLAGS_PRINT_CMD              0x0200
 
 typedef std::function<void (std::string)> afterCreate;
 
@@ -55,6 +56,7 @@ typedef enum {
 typedef struct NIOption{
        DWORD flags;
        std::vector<std::string> refPath;
+       std::vector<std::string> extraRefPath;
        std::vector<std::string> inputBubbleRefPath;
        std::vector<std::string> mibcPath;
 } NIOption;
index 859c60a..ab93a46 100644 (file)
@@ -360,6 +360,15 @@ static void makeArgs(std::vector<const char*>& args, const std::vector<std::stri
                }
        }
 
+       if (opt->flags & NI_FLAGS_EXTRA_REF) {
+               for (const auto &erPath : opt->extraRefPath) {
+                       std::string path = getAbsolutePath(erPath);
+                       if (checkDllExistInDir(path)) {
+                               REF_VECTOR.push_back("-r:" + path + "/*.dll");
+                       }
+               }
+       }
+
        for (const auto &path : refPaths) {
                if (checkDllExistInDir(path)) {
                        REF_VECTOR.push_back("-r:" + path + "/*.dll");
@@ -878,7 +887,8 @@ ni_error_e createNIUnderPkgRoot(const std::string& pkgId, NIOption* opt)
 
        char* extraDllPaths = pluginGetExtraDllPath();
        if (extraDllPaths && extraDllPaths[0] != '\0') {
-               __pm->setExtraDllPaths(extraDllPaths);
+               opt->flags |= NI_FLAGS_EXTRA_REF;
+               splitPath(extraDllPaths, opt->extraRefPath);
        }
 
        opt->flags |= NI_FLAGS_APPNI;