{
int i;
bool standalone = false;
- const char* standalonePath = nullptr;
+ char* standalonePath = nullptr;
+ int cmdlineSize = 0;
std::vector<char*> vargs;
return 1;
}
i++;
- standalonePath = argv[i];
+ standalonePath = strdup(argv[i]);
} else {
vargs.push_back(argv[i]);
}
+ cmdlineSize += (strlen(argv[i]) +1);
}
using tizen::runtime::LauncherInterface;
return 1;
}
+ // change cmdline from dotnet-launcher to executable path
+ memset(argv[0], '\0', cmdlineSize);
+ snprintf(argv[0], cmdlineSize, "%s", standalonePath);
+
int argsLen = vargs.size();
char** args = &vargs[0];
if (runtime->launch(appId, appRoot.c_str(), standalonePath, argsLen, args)) {
Launchpad.loaderMain(argc, argv);
}
+ if (standalonePath != nullptr) {
+ free(standalonePath);
+ }
+
runtime->dispose();
return 0;
}