Fix mibc option for crossgen2 (#401)
author이형주/Common Platform Lab(SR)/삼성전자 <leee.lee@samsung.com>
Tue, 19 Apr 2022 22:52:20 +0000 (07:52 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Tue, 19 Apr 2022 22:52:20 +0000 (07:52 +0900)
`--ibc-dir $(directory path)` to `--mibc $(file path)`

Co-authored-by: 조웅석/Common Platform Lab(SR)/삼성전자 <ws77.cho@samsung.com>
NativeLauncher/tool/dotnettool.cc

index 79334a5..3c15704 100644 (file)
@@ -55,7 +55,7 @@ void DisplayUsage() {
                "                                   (this option should be run as root)\n"
                "\n"
                "Options:\n"
-               "       --ibc-dir                 - Specify a directory containing IBC files\n"
+               "       --mibc                    - Specify Mibc files. Sepatated with ':'.\n"
                "       --verbose                 - Display verbose information\n"
                "       --inputbubble             - Use inputbubble\n"
                "       --inputbubbleref          - Path of references for inputbubble (used with --inputbubble option)\n"
@@ -78,8 +78,8 @@ void DisplayUsage() {
                "   # dotnettool --ni-pkg org.tizen.FormsGallery\n"
                "4. Regenerate native images for all installed .net packages\n"
                "   # dotnettool --ni-regen-all-app\n"
-               "5. Create native image for dll based on the IBC data\n"
-               "   # dotnettool --ibc-dir /tmp/ibcdata/ --ni-dll /usr/bin/Tizen.Runtime.dll\n"
+               "5. Create native image for dll based on the Mibc data\n"
+               "   # dotnettool --mibc /tmp/ibcdata/in.mibc --ni-dll /usr/bin/Tizen.Runtime.dll\n"
                "6. Remove profile for package\n"
                "   # dotnettool --rm-app-profile org.tizen.FormsGallery\n"
                "\n");
@@ -124,10 +124,10 @@ int main(int argc, char* argv[])
                        opt->flags |= NI_FLAGS_PRINT_CMD;
                } else if (arg == "--skip-ro-app") {
                        opt->flags |= NI_FLAGS_SKIP_RO_APP;
-               } else if (arg == "--ibc-dir") {
+               } else if (arg == "--mibc") {
                        ++i;
                        if (i >= argc) {
-                               _SOUT("Directory path containing IBC files should be followed for --ibc-dir option");
+                               _SOUT("File path containing Mibc files should be followed for --mibc option");
                                DisplayUsage();
                                return 0;
                        }
@@ -137,8 +137,8 @@ int main(int argc, char* argv[])
                        std::vector<std::string> paths;
                        splitPath(std::string(argv[i]), paths);
                        for (const auto &path : paths) {
-                               if (!isDirectory(path)) {
-                                       _SERR("mibc path is missing or not exist");
+                               if (!isFile(path) || isDirectory(path)) {
+                                       _SERR("Mibc file path is missing or does not exist");
                                        return -1;
                                }
                                opt->mibcPath.push_back(path);