static std::string VersionOption("--version");
static std::string StandaloneOption("--standalone");
-static std::string NativeOption("--native");
int main(int argc, char *argv[])
{
int i;
bool standalone = false;
const char* standalonePath = nullptr;
- bool nativeOnly = false;
std::vector<char*> vargs;
i++;
standalonePath = argv[i];
}
- else if (NativeOption.compare(argv[i]) == 0)
- {
- nativeOnly = true;
- }
else
{
vargs.push_back(argv[i]);
}
}
- if (!standalone && nativeOnly)
- {
- fprintf(stderr, "\"--native\" option must be use with \"--standalone\"\n");
- return 1;
- }
-
using tizen::runtime::LauncherInterface;
using tizen::runtime::Launchpad;
using tizen::runtime::AppInfo;
return 1;
}
- if (!nativeOnly && runtime->RunManagedLauncher() != 0)
- {
- _ERR("Failed to run managed launcher");
- return 1;
- }
-
int args_len = vargs.size();
char** args = &vargs[0];
- if (runtime->Launch(approot.c_str(), standalonePath, args_len, args))
+ if (runtime->Launch(appid, approot.c_str(), standalonePath, args_len, args))
{
_ERR("Failed to launch");
return 0;
}
else
{
- auto idle_task = [](void *data) -> Eina_Bool
- {
- LauncherInterface* runtime = static_cast<LauncherInterface*>(data);
- if (runtime->RunManagedLauncher() != 0)
- {
- _ERR("Failed to run managed launcher");
- }
- return ECORE_CALLBACK_CANCEL;
- };
- ecore_idler_add(idle_task, runtime.get());
+ _DBG("Success to initialized");
}
};
// The launchpad pass the name of exe file to the first argument.
// For the C# spec, we have to skip this first argument.
- if (runtime->Launch(info.root.c_str(), info.path.c_str(), argc-1, argv+1))
+ if (runtime->Launch(info.id.c_str(), info.root.c_str(), info.path.c_str(), argc-1, argv+1))
{
_ERR("Failed to launch");
}