}
bool all_service_app_global = true;
for (const auto& service_info : service_list->services) {
- if (service_info.type() != "global") {
+ if (service_info.type() == "ui") {
all_service_app_global = false;
break;
}
WgtBackendData* backend_data =
static_cast<WgtBackendData*>(context_->backend_data.get());
+ auto service_list = GetManifestDataForKey<const wgt::parse::ServiceList>(
+ app_keys::kTizenServiceKey);
+ if (service_list)
+ backend_data->service_list.set(*service_list);
if (check_start_file_) {
if (!ui_app_not_exists_ && !parser_->CheckValidStartFile()) {
// making backup of content data and services content data
auto content_info = GetManifestDataForKey<const wgt::parse::ContentInfo>(
app_keys::kTizenContentKey);
- auto service_list = GetManifestDataForKey<const wgt::parse::ServiceList>(
- app_keys::kTizenServiceKey);
if (content_info)
backend_data->content.set(*content_info);
- if (service_list)
- backend_data->service_list.set(*service_list);
}
context_->pkgid.set(manifest->package);
#include <pkgmgr-info.h>
#include <unistd.h>
+#include <unordered_map>
#include <boost/filesystem.hpp>
#include <boost/system/error_code.hpp>
#include <cstdio>
#include <string>
+#include "wgt/utils/wgt_backend_data.h"
+
namespace bf = boost::filesystem;
namespace bs = boost::system;
namespace {
-const char kWrtServiceBinaryPath[] = "/usr/bin/wrt-service-launcher";
+const char kWrtServiceBinaryPath[] = "/usr/bin/wrt-service";
+const char kWrtServiceLauncherBinaryPath[] = "/usr/bin/wrt-service-launcher";
const char kWebWidgetRuntimeBinaryPath[] = "/usr/bin/web-widget-runtime";
const char kWRTPath[] = "/usr/bin/wrt";
namespace filesystem {
bool StepCreateWgtSymbolicLink::CreateSymlinksForApps() {
+ std::unordered_map<std::string, std::string> service_app_type;
+ WgtBackendData* backend_data =
+ static_cast<WgtBackendData*>(context_->backend_data.get());
+ for (auto& service_info : backend_data->service_list.get().services) {
+ service_app_type[service_info.id()] = service_info.type();
+ }
+
boost::system::error_code error;
for (application_x* app :
GListRange<application_x*>(context_->manifest_data.get()->application)) {
bf::create_symlink(bf::path(kWRTPath), exec_path, error);
} else if (strcmp(app->component_type, "widgetapp") == 0) {
bf::create_symlink(kWebWidgetRuntimeBinaryPath, exec_path, error);
+ } else if (!service_app_type[app->appid].empty()) {
+ bf::create_symlink(kWrtServiceLauncherBinaryPath, exec_path, error);
} else {
bf::create_symlink(kWrtServiceBinaryPath, exec_path, error);
}