#include <common/step/security/step_register_trust_anchor.h>
#include <common/step/security/step_unregister_trust_anchor.h>
-#include <tpk/step/filesystem/step_create_symbolic_link.h>
+#include <tpk/step/filesystem/step_create_tpk_symbolic_link.h>
#include <tpk/step/filesystem/step_tpk_patch_icons.h>
#include <tpk/step/filesystem/step_tpk_prepare_package_directory.h>
#include <tpk/step/filesystem/step_tpk_update_package_directory.h>
#include "wgt/step/configuration/step_set_old_signature_files_location.h"
#include "wgt/step/encryption/step_remove_encryption_data.h"
#include "wgt/step/filesystem/step_copy_preview_icons.h"
-#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h"
#include "wgt/step/filesystem/step_wgt_patch_icons.h"
#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
#include "wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h"
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<ci::security::StepPrivacyPrivilege>(
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::INSTALL);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
AddStep<hybrid::configuration::StepMergeTpkPrivileges>();
AddStep<ci::security::StepPrivilegeCompatibility>(
ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH);
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
- AddStep<tpk::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
+ AddStep<tpk::filesystem::StepCreateTpkSymbolicLink>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::security::StepRegisterTrustAnchor>(
ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE);
+++ /dev/null
-/* 2014, Copyright © Eurogiciel Coporation, APACHE-2.0, see LICENSE file */
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by a apache 2.0 license that can be
-// found in the LICENSE file.
-
-#include "wgt/step/filesystem/step_create_symbolic_link.h"
-
-#include <pkgmgr-info.h>
-#include <unistd.h>
-
-#include <boost/filesystem.hpp>
-#include <boost/system/error_code.hpp>
-#include <common/utils/file_util.h>
-#include <common/utils/glist_range.h>
-#include <cassert>
-#include <cstring>
-#include <cstdio>
-#include <string>
-
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
-
-namespace {
-
-const char kWrtServiceBinaryPath[] = "/usr/bin/wrt-service";
-const char kWebWidgetRuntimeBinaryPath[] = "/usr/bin/web-widget-runtime";
-const char kWRTPath[] = "/usr/bin/wrt";
-
-} // namespace
-
-namespace wgt {
-namespace filesystem {
-
-bool StepCreateSymbolicLink::CreateSymlinksForApps() {
- boost::system::error_code error;
- for (application_x* app :
- GListRange<application_x*>(context_->manifest_data.get()->application)) {
- // filter out non-wgt apps as this step is run for hybrid backend too
- if (strcmp("webapp", app->type) != 0)
- continue;
- // binary is a symbolic link named <appid> and is located in <pkgid>/<appid>
- bf::path exec_path = context_->GetPkgPath() / bf::path("bin");
- common_installer::CreateDir(exec_path);
-
- exec_path /= bf::path(app->appid);
- common_installer::RemoveAll(exec_path);
-
- if (strcmp(app->component_type, "uiapp") == 0) {
- bf::create_symlink(bf::path(kWRTPath), exec_path, error);
- } else if (strcmp(app->component_type, "watchapp") == 0) {
- 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 {
- bf::create_symlink(kWrtServiceBinaryPath, exec_path, error);
- }
- if (error) {
- LOG(ERROR) << "Failed to set symbolic link "
- << boost::system::system_error(error).what();
- return false;
- }
- }
- return true;
-}
-
-common_installer::Step::Status StepCreateSymbolicLink::process() {
- assert(context_->manifest_data.get());
-
- if (!CreateSymlinksForApps())
- return Status::APP_DIR_ERROR;
-
- LOG(DEBUG) << "Symlinks created successfully";
- return Status::OK;
-}
-
-common_installer::Step::Status StepCreateSymbolicLink::undo() {
- for (application_x* app :
- GListRange<application_x*>(context_->manifest_data.get()->application)) {
- bf::path exec_path = context_->GetPkgPath() / "bin" / app->appid;
- common_installer::RemoveAll(exec_path);
- }
- return Status::OK;
-}
-
-} // namespace filesystem
-} // namespace wgt
+++ /dev/null
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by a apache 2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef WGT_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
-#define WGT_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
-
-#include <boost/filesystem.hpp>
-
-#include <manifest_parser/utils/logging.h>
-
-#include <common/app_installer.h>
-#include <common/installer_context.h>
-#include <common/step/step.h>
-
-namespace wgt {
-namespace filesystem {
-
-/**
- * \brief Step that create symbolic link to application
- */
-class StepCreateSymbolicLink : public common_installer::Step {
- public:
- using Step::Step;
-
- /**
- * \brief Create symbolic link
- *
- * \return Status::ERROR when failed to create symbolic link,
- * Status::OK otherwise
- */
- Status process() override;
-
- /**
- * \brief Empty method
- *
- * \return Status::OK
- */
- Status clean() override { return Status::OK; }
-
- /**
- * \brief Delete created symbolic link
- *
- * \return Status::OK
- */
- Status undo() override;
-
- /**
- * \brief Empty method
- *
- * \return Status::OK
- */
- Status precheck() override { return Status::OK; }
-
- private:
- bool CreateSymlinksForApps();
-
- STEP_NAME(CreateSymbolicLink)
-};
-
-} // namespace filesystem
-} // namespace wgt
-
-#endif // WGT_STEP_FILESYSTEM_STEP_CREATE_SYMBOLIC_LINK_H_
--- /dev/null
+/* 2014, Copyright © Eurogiciel Coporation, APACHE-2.0, see LICENSE file */
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by a apache 2.0 license that can be
+// found in the LICENSE file.
+
+#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h"
+
+#include <pkgmgr-info.h>
+#include <unistd.h>
+
+#include <boost/filesystem.hpp>
+#include <boost/system/error_code.hpp>
+#include <common/utils/file_util.h>
+#include <common/utils/glist_range.h>
+#include <cassert>
+#include <cstring>
+#include <cstdio>
+#include <string>
+
+namespace bf = boost::filesystem;
+namespace bs = boost::system;
+
+namespace {
+
+const char kWrtServiceBinaryPath[] = "/usr/bin/wrt-service";
+const char kWebWidgetRuntimeBinaryPath[] = "/usr/bin/web-widget-runtime";
+const char kWRTPath[] = "/usr/bin/wrt";
+
+} // namespace
+
+namespace wgt {
+namespace filesystem {
+
+bool StepCreateWgtSymbolicLink::CreateSymlinksForApps() {
+ boost::system::error_code error;
+ for (application_x* app :
+ GListRange<application_x*>(context_->manifest_data.get()->application)) {
+ // filter out non-wgt apps as this step is run for hybrid backend too
+ if (strcmp("webapp", app->type) != 0)
+ continue;
+ // binary is a symbolic link named <appid> and is located in <pkgid>/<appid>
+ bf::path exec_path = context_->GetPkgPath() / bf::path("bin");
+ common_installer::CreateDir(exec_path);
+
+ exec_path /= bf::path(app->appid);
+ common_installer::RemoveAll(exec_path);
+
+ if (strcmp(app->component_type, "uiapp") == 0) {
+ bf::create_symlink(bf::path(kWRTPath), exec_path, error);
+ } else if (strcmp(app->component_type, "watchapp") == 0) {
+ 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 {
+ bf::create_symlink(kWrtServiceBinaryPath, exec_path, error);
+ }
+ if (error) {
+ LOG(ERROR) << "Failed to set symbolic link "
+ << boost::system::system_error(error).what();
+ return false;
+ }
+ }
+ return true;
+}
+
+common_installer::Step::Status StepCreateWgtSymbolicLink::precheck() {
+ if (!context_->manifest_data.get()) {
+ LOG(ERROR) << "Manifest data empty";
+ return Status::ERROR;
+ }
+
+ return Status::OK;
+}
+
+common_installer::Step::Status StepCreateWgtSymbolicLink::process() {
+ assert(context_->manifest_data.get());
+
+ if (!CreateSymlinksForApps())
+ return Status::APP_DIR_ERROR;
+
+ LOG(DEBUG) << "Symlinks created successfully";
+ return Status::OK;
+}
+
+common_installer::Step::Status StepCreateWgtSymbolicLink::undo() {
+ for (application_x* app :
+ GListRange<application_x*>(context_->manifest_data.get()->application)) {
+ bf::path exec_path = context_->GetPkgPath() / "bin" / app->appid;
+ common_installer::RemoveAll(exec_path);
+ }
+ return Status::OK;
+}
+
+} // namespace filesystem
+} // namespace wgt
--- /dev/null
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by a apache 2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
+#define WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
+
+#include <boost/filesystem.hpp>
+
+#include <manifest_parser/utils/logging.h>
+
+#include <common/app_installer.h>
+#include <common/installer_context.h>
+#include <common/step/step.h>
+
+namespace wgt {
+namespace filesystem {
+
+/**
+ * \brief Step that create symbolic link to application
+ */
+class StepCreateWgtSymbolicLink : public common_installer::Step {
+ public:
+ using Step::Step;
+
+ /**
+ * \brief Create symbolic link
+ *
+ * \return Status::ERROR when failed to create symbolic link,
+ * Status::OK otherwise
+ */
+ Status process() override;
+
+ /**
+ * \brief Empty method
+ *
+ * \return Status::OK
+ */
+ Status clean() override { return Status::OK; }
+
+ /**
+ * \brief Delete created symbolic link
+ *
+ * \return Status::OK
+ */
+ Status undo() override;
+
+ /**
+ * \brief Check weather manifest data is empty or not
+ *
+ * \return Status::OK
+ */
+ Status precheck() override;
+
+ private:
+ bool CreateSymlinksForApps();
+
+ STEP_NAME(CreateSymbolicLink)
+};
+
+} // namespace filesystem
+} // namespace wgt
+
+#endif // WGT_STEP_FILESYSTEM_STEP_CREATE_WGT_SYMBOLIC_LINK_H_
#include "wgt/step/encryption/step_encrypt_resources.h"
#include "wgt/step/encryption/step_remove_encryption_data.h"
#include "wgt/step/filesystem/step_copy_preview_icons.h"
-#include "wgt/step/filesystem/step_create_symbolic_link.h"
+#include "wgt/step/filesystem/step_create_wgt_symbolic_link.h"
#include "wgt/step/filesystem/step_wgt_patch_icons.h"
#include "wgt/step/filesystem/step_wgt_patch_storage_directories.h"
#include "wgt/step/filesystem/step_wgt_prepare_package_directory.h"
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<wgt::filesystem::StepWgtPreparePackageDirectory>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<wgt::filesystem::StepWgtUpdatePackageDirectory>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<ci::filesystem::StepCreateIcons>();
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
AddStep<ci::filesystem::StepCreateStorageDirectories>();
- AddStep<wgt::filesystem::StepCreateSymbolicLink>();
+ AddStep<wgt::filesystem::StepCreateWgtSymbolicLink>();
AddStep<wgt::filesystem::StepWgtPatchIcons>(true);
AddStep<wgt::filesystem::StepCopyPreviewIcons>();
AddStep<wgt::security::StepCheckExtensionPrivileges>();