From: pius.lee Date: Mon, 10 Oct 2016 10:03:12 +0000 (+0900) Subject: Now options will be pass to managed launcher X-Git-Tag: accepted/tizen/mobile/20161215.072340~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a74953c665b4d5c177ebfaf014d2ba61f7e7906a;p=platform%2Fcore%2Fdotnet%2Flauncher.git Now options will be pass to managed launcher Commanline options will be pass to managed launcher except --standalone and assembly path. Change-Id: I2e853c23553152fb9291b4d586b50c133a5781ee --- diff --git a/NativeLauncher/src/main.cc b/NativeLauncher/src/main.cc index 97ff67c..41c0362 100644 --- a/NativeLauncher/src/main.cc +++ b/NativeLauncher/src/main.cc @@ -3,6 +3,8 @@ #include "utils.h" #include "log.h" +#include +#include #include #include @@ -16,16 +18,25 @@ int main(int argc, char *argv[]) bool standalone = false; const char* standalonePath = nullptr; + std::vector vargs; + for (i=1; i argc-1) + { + fprintf(stderr, "Assembly path must be after \"--standalone\" option\n"); + return 1; + } + i++; + standalonePath = argv[i]; } else { - if (standalonePath == nullptr) - standalonePath = argv[i]; + vargs.push_back(argv[i]); } } @@ -62,7 +73,10 @@ int main(int argc, char *argv[]) _ERR("Failed to run managed launcher"); return 1; } - if (!runtime->Launch(base.c_str(), standalonePath, argc, argv)) + + int args_len = vargs.size(); + char** args = &vargs[0]; + if (!runtime->Launch(base.c_str(), standalonePath, args_len, args)) { _ERR("Failed to launch"); return 1;