Fix icon copying 58/57258/6 accepted/tizen/mobile/20160122.032619 accepted/tizen/tv/20160122.032704 accepted/tizen/wearable/20160122.032714 submit/tizen/20160120.112210
authorTomasz Iwanek <t.iwanek@samsung.com>
Mon, 18 Jan 2016 09:31:48 +0000 (10:31 +0100)
committerTomasz Iwanek <t.iwanek@samsung.com>
Wed, 20 Jan 2016 09:28:50 +0000 (10:28 +0100)
Icons element are receiving full path in StepParse from now
for both wgt and tpk backend and all modes.

Steps:
 - StepCreateIcons
 - StepBackupIcons
 - StepRecoverIcons
 - StepRemoveIcons
handles icon files only outside package directory (those in: $HOME/.applications/icons/*)
Icons within application directories are copied together with whole package directory (StepCopy)
and are not managed by those steps.

To handle copying icons within package directory new steps are introduced:
 - StepWgtPatchIcons (copy to $package/shared/res/ from widget content directory)
 - StepTpkPatchIcons (copy to $package/shared/res/ if they are in different location, e.g. preload apps)

Following changes needs to be submitted together:
 - https://review.tizen.org/gerrit/57258 (wgt-backend)
 - https://review.tizen.org/gerrit/57257 (app-installers)
 - https://review.tizen.org/gerrit/57259 (tpk-backend)

Verify by:
 $ /usr/bin/tpk-backend-ut/smoke_test --gtest_filter=SmokeTest.UpdateMode_Tpk
 $ /usr/bin/tpk-backend-ut/smoke_test --gtest_filter=SmokeTest.InstallationMode_Tpk
 $ /usr/bin/tpk-backend-ut/smoke_test --gtest_filter=SmokeTest.DeltaMode_Tpk
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.InstallationMode
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.UpdateMode
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.RDSMode
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.DeltaMode
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.UpdateMode_Rollback
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.InstallationMode_Rollback

Change-Id: I8c5d3ba513bb47eed571c3363f657eacb429f82f

14 files changed:
src/hybrid/hybrid_installer.cc
src/wgt/CMakeLists.txt
src/wgt/step/step_generate_xml.cc
src/wgt/step/step_parse.cc
src/wgt/step/step_wgt_backup_icons.cc [deleted file]
src/wgt/step/step_wgt_backup_icons.h [deleted file]
src/wgt/step/step_wgt_create_icons.cc [deleted file]
src/wgt/step/step_wgt_create_icons.h [deleted file]
src/wgt/step/step_wgt_patch_icons.cc [new file with mode: 0644]
src/wgt/step/step_wgt_patch_icons.h [new file with mode: 0644]
src/wgt/step/step_wgt_recover_icons.cc [deleted file]
src/wgt/step/step_wgt_recover_icons.h [deleted file]
src/wgt/wgt_app_query_interface.cc
src/wgt/wgt_installer.cc

index c8ec5ad..d044c7e 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <tpk/step/step_create_symbolic_link.h>
 #include <tpk/step/step_parse.h>
+#include <tpk/step/step_tpk_patch_icons.h>
 
 #include "hybrid/hybrid_backend_data.h"
 #include "hybrid/step/step_encrypt_resources.h"
@@ -44,7 +45,7 @@
 #include "wgt/step/step_create_symbolic_link.h"
 #include "wgt/step/step_generate_xml.h"
 #include "wgt/step/step_remove_encryption_data.h"
-#include "wgt/step/step_wgt_create_icons.h"
+#include "wgt/step/step_wgt_patch_icons.h"
 #include "wgt/step/step_wgt_patch_storage_directories.h"
 
 namespace ci = common_installer;
@@ -70,8 +71,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<hybrid::encrypt::StepEncryptResources>();
       AddStep<ci::security::StepRollbackInstallationSecurity>();
       AddStep<ci::filesystem::StepCopy>();
+      AddStep<tpk::filesystem::StepTpkPatchIcons>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<ci::filesystem::StepCreateIcons>();
-      AddStep<wgt::filesystem::StepWgtCreateIcons>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<ci::filesystem::StepCreateStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
@@ -98,8 +100,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
       AddStep<ci::backup::StepCopyBackup>();
+      AddStep<tpk::filesystem::StepTpkPatchIcons>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<ci::filesystem::StepCreateIcons>();
-      AddStep<wgt::filesystem::StepWgtCreateIcons>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<ci::filesystem::StepCopyStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
@@ -148,8 +151,9 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr)
       AddStep<ci::backup::StepBackupManifest>();
       AddStep<ci::backup::StepBackupIcons>();
       AddStep<ci::backup::StepCopyBackup>();
+      AddStep<tpk::filesystem::StepTpkPatchIcons>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
       AddStep<ci::filesystem::StepCreateIcons>();
-      AddStep<wgt::filesystem::StepWgtCreateIcons>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<ci::filesystem::StepCopyStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
index 7f32240..b68e08b 100644 (file)
@@ -11,10 +11,8 @@ SET(SRCS
   step/step_parse_recovery.cc
   step/step_rds_parse.cc
   step/step_rds_modify.cc
-  step/step_wgt_backup_icons.cc
-  step/step_wgt_create_icons.cc
+  step/step_wgt_patch_icons.cc
   step/step_wgt_patch_storage_directories.cc
-  step/step_wgt_recover_icons.cc
   step/step_wgt_resource_directory.cc
   step/step_add_default_privileges.cc
   wgt_app_query_interface.cc
index 6be0750..b2090be 100644 (file)
@@ -132,30 +132,13 @@ common_installer::Step::Status StepGenerateXml::GenerateApplicationCommonXml(
     xmlTextWriterEndElement(writer);
   }
 
-  // icon is renamed to <appid.png>
   if (app->icon) {
     icon_x* iconx = reinterpret_cast<icon_x*>(app->icon->data);
-    bf::path app_icon = context_->pkg_path.get();
-    // TODO(t.iwanek): type should not be used here
-    if (context_->pkg_type.get() == "wgt") {
-      app_icon /= "res/wgt";
-    } else {
-      app_icon /= "shared/res";
-    }
-    app_icon /= iconx->text;
-    bf::path icon = app->appid;
-    if (app_icon.has_extension())
-      icon += app_icon.extension();
-    else
-      icon += bf::path(".png");
-
-    if (bf::exists(app_icon)) {
-      xmlTextWriterWriteFormatElement(writer, BAD_CAST "icon",
-                                          "%s", BAD_CAST icon.c_str());
-    }
+    xmlTextWriterWriteFormatElement(
+        writer, BAD_CAST "icon", "%s", BAD_CAST iconx->text);
   } else {
     // Default icon setting is role of the platform
-    LOG(DEBUG) << "Icon was not found in package";
+    LOG(DEBUG) << "Icon was not found in application";
   }
 
   for (image_x* image : GListRange<image_x*>(app->image)) {
index 392196e..bab1d10 100644 (file)
@@ -5,6 +5,8 @@
 
 #include "wgt/step/step_parse.h"
 
+#include <boost/filesystem/path.hpp>
+
 #include <common/app_installer.h>
 #include <common/installer_context.h>
 #include <common/step/step.h>
@@ -36,6 +38,8 @@
 
 #include "wgt/wgt_backend_data.h"
 
+namespace bf = boost::filesystem;
+
 namespace {
 
 const std::string kManifestVersion = "1.0.0";
@@ -108,13 +112,22 @@ bool StepParse::FillInstallationInfo(manifest_x* manifest) {
 }
 
 bool StepParse::FillIconPaths(manifest_x* manifest) {
+  std::shared_ptr<const TizenApplicationInfo> app_info =
+      std::static_pointer_cast<const TizenApplicationInfo>(
+          parser_->GetManifestData(app_keys::kTizenApplicationKey));
+  if (!app_info) {
+    LOG(ERROR) << "Application info manifest data has not been found.";
+    return false;
+  }
   std::shared_ptr<const ApplicationIconsInfo> icons_info =
       std::static_pointer_cast<const ApplicationIconsInfo>(
           parser_->GetManifestData(app_keys::kIconsKey));
   if (icons_info.get()) {
     for (auto& application_icon : icons_info->icons()) {
       icon_x* icon = reinterpret_cast<icon_x*> (calloc(1, sizeof(icon_x)));
-      icon->text = strdup(application_icon.path().c_str());
+      bf::path icon_path = context_->root_application_path.get()
+          / app_info->package() / "res" / "wgt" / application_icon.path();
+      icon->text = strdup(icon_path.c_str());
       icon->lang = strdup(DEFAULT_LOCALE);
       manifest->icon = g_list_append(manifest->icon, icon);
     }
diff --git a/src/wgt/step/step_wgt_backup_icons.cc b/src/wgt/step/step_wgt_backup_icons.cc
deleted file mode 100644 (file)
index 5544182..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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/step_wgt_backup_icons.h"
-
-#include <pkgmgr-info.h>
-#include <vector>
-
-namespace {
-const char kSharedRes[] = "shared/res";
-
-namespace bf = boost::filesystem;
-}  // namespace
-
-namespace wgt {
-namespace backup {
-
-common_installer::Step::Status StepWgtBackupIcons::process() {
-  // TODO(l.wysocki): As a temporary solution this will move icons into two
-  // destinations respectively {HOME}/.applications/icons,
-  // and {APP_ROOT}/shared/res, when some project will stop using old
-  // location ({HOME}/.applications/icons) then it can be removed from here.
-  std::vector<bf::path> paths { getIconPath(context_->uid.get()),
-                                context_->root_application_path.get()
-                                / context_->pkgid.get() / kSharedRes };
-  return MoveIcons(paths);
-}
-
-}  // namespace backup
-}  // namespace wgt
diff --git a/src/wgt/step/step_wgt_backup_icons.h b/src/wgt/step/step_wgt_backup_icons.h
deleted file mode 100644 (file)
index dc62760..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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_STEP_WGT_BACKUP_ICONS_H_
-#define WGT_STEP_STEP_WGT_BACKUP_ICONS_H_
-
-#include <common/step/step_backup_icons.h>
-#include <manifest_parser/utils/logging.h>
-
-namespace wgt {
-namespace backup {
-
-/**
- *\brief Step responsible for creating backup for icons during update and
- *       uninstallation.
- *       Used by WGT backend
- */
-class StepWgtBackupIcons : public common_installer::backup::StepBackupIcons {
- public:
-  using StepBackupIcons::StepBackupIcons;
-
-  /**
-   * \brief main logic of backuping icons
-   *
-   * \return Status::OK, if successful backup, Status::ERROR otherwise
-   */
-  Status process() override;
-
-  SCOPE_LOG_TAG(WgtBackupIcons)
-};
-
-}  // namespace backup
-}  // namespace wgt
-
-#endif  // WGT_STEP_STEP_WGT_BACKUP_ICONS_H_
diff --git a/src/wgt/step/step_wgt_create_icons.cc b/src/wgt/step/step_wgt_create_icons.cc
deleted file mode 100644 (file)
index c38f4c7..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "wgt/step/step_wgt_create_icons.h"
-
-#include <pkgmgr-info.h>
-#include <vector>
-
-#include "common/utils/glist_range.h"
-
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
-namespace {
-const char kResWgt[] = "res/wgt";
-}  // namespace
-
-namespace wgt {
-namespace filesystem {
-
-common_installer::Step::Status StepWgtCreateIcons::process() {
-  // TODO(l.wysocki): As a temporary solution this will copy icons into two
-  // destinations respectively {HOME}/.applications/icons,
-  // and {APP_ROOT}/shared/res, when some project will stop using old
-  // location ({HOME}/.applications/icons) then it can be removed from here.
-  std::vector<bf::path> paths { getIconPath(context_->uid.get()),
-                                StepCreateIcons::GetIconRoot() };
-
-  // explicit step for wgt apps to add absolute path to icon in order to
-  // store it in db
-  ci::Step::Status result = CopyIcons(paths);
-  for (application_x* app :
-      GListRange<application_x*>(context_->manifest_data.get()->application)) {
-    if (app->icon) {
-      icon_x* icon = reinterpret_cast<icon_x*>(app->icon->data);
-      bf::path icon_path = StepCreateIcons::GetIconRoot() / icon->text;
-      if (icon->text)
-        free(const_cast<char *>(icon->text));
-      icon->text = strdup(icon_path.c_str());
-    }
-  }
-  return result;
-}
-
-boost::filesystem::path StepWgtCreateIcons::GetIconRoot() const {
-  return context_->pkg_path.get() / kResWgt;
-}
-
-std::string StepWgtCreateIcons::GetAppTypeForIcons() const {
-  return "webapp";
-}
-
-}  // namespace filesystem
-}  // namespace wgt
-
diff --git a/src/wgt/step/step_wgt_create_icons.h b/src/wgt/step/step_wgt_create_icons.h
deleted file mode 100644 (file)
index a9501a3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef WGT_STEP_STEP_WGT_CREATE_ICONS_H_
-#define WGT_STEP_STEP_WGT_CREATE_ICONS_H_
-
-#include <manifest_parser/utils/logging.h>
-
-#include <common/step/step_create_icons.h>
-
-#include <string>
-
-namespace wgt {
-namespace filesystem {
-
-/**
- * \brief This step return path to widget icon
- */
-class StepWgtCreateIcons
-    : public common_installer::filesystem::StepCreateIcons {
- public:
-  using StepCreateIcons::StepCreateIcons;
-
-  Status process() override;
-
-  /**
-   * \brief Return path to widget icon
-   *
-   * \return path to widget icon
-   */
-  boost::filesystem::path GetIconRoot() const override;
-
-  /**
-   * \brief Return type of application for which icons should be created
-   *
-   * \return application type
-   */
-  std::string GetAppTypeForIcons() const override;
-
-  SCOPE_LOG_TAG(WgtCreateIcons)
-};
-
-}  // namespace filesystem
-}  // namespace wgt
-
-#endif  // WGT_STEP_STEP_WGT_CREATE_ICONS_H_
diff --git a/src/wgt/step/step_wgt_patch_icons.cc b/src/wgt/step/step_wgt_patch_icons.cc
new file mode 100644 (file)
index 0000000..45da3de
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "wgt/step/step_wgt_patch_icons.h"
+
+#include <pkgmgr-info.h>
+
+#include "common/utils/file_util.h"
+#include "common/utils/glist_range.h"
+
+namespace bf = boost::filesystem;
+namespace bs = boost::system;
+namespace ci = common_installer;
+
+namespace {
+const char kResWgt[] = "res/wgt";
+}  // namespace
+
+namespace wgt {
+namespace filesystem {
+
+common_installer::Step::Status StepWgtPatchIcons::process() {
+  bf::path common_icon_location = context_->pkg_path.get() / "shared" / "res";
+  bs::error_code error;
+  bf::create_directories(common_icon_location, error);
+  for (application_x* app :
+      GListRange<application_x*>(context_->manifest_data.get()->application)) {
+    if (strcmp(app->type, "webapp") != 0)
+      continue;
+    if (app->icon) {
+      icon_x* icon = reinterpret_cast<icon_x*>(app->icon->data);
+      bf::path icon_text(icon->text);
+      bf::path icon_path = common_icon_location / app->appid;
+      if (icon_text.has_extension())
+        icon_path += icon_text.extension();
+      else
+        icon_path += ".png";
+
+      bf::copy_file(icon->text, icon_path,
+                    bf::copy_option::overwrite_if_exists, error);
+      if (error) {
+        LOG(ERROR) << "Failed to move icon from " << icon->text << " to "
+                   << icon_path;
+        return Status::ICON_ERROR;
+      }
+      if (icon->text)
+        free(const_cast<char*>(icon->text));
+      icon->text = strdup(icon_path.c_str());
+    }
+  }
+  return Status::OK;
+}
+
+}  // namespace filesystem
+}  // namespace wgt
+
diff --git a/src/wgt/step/step_wgt_patch_icons.h b/src/wgt/step/step_wgt_patch_icons.h
new file mode 100644 (file)
index 0000000..c5eabaa
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef WGT_STEP_STEP_WGT_PATCH_ICONS_H_
+#define WGT_STEP_STEP_WGT_PATCH_ICONS_H_
+
+#include <manifest_parser/utils/logging.h>
+
+#include <common/step/step.h>
+
+#include <string>
+
+namespace wgt {
+namespace filesystem {
+
+/**
+ * @brief The StepWgtPatchIcons class
+ *        Copy widget icons to standard location of icons - shared/res/
+ *        where StepCreateIcons excepts icons to be.
+ */
+class StepWgtPatchIcons : public common_installer::Step {
+ public:
+  using Step::Step;
+
+  Status process() override;
+  Status undo() override { return Status::OK; }
+  Status clean() override { return Status::OK; }
+  Status precheck() override { return Status::OK; }
+
+  SCOPE_LOG_TAG(WgtPatchIcons)
+};
+
+}  // namespace filesystem
+}  // namespace wgt
+
+#endif  // WGT_STEP_STEP_WGT_PATCH_ICONS_H_
diff --git a/src/wgt/step/step_wgt_recover_icons.cc b/src/wgt/step/step_wgt_recover_icons.cc
deleted file mode 100644 (file)
index 995e609..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#include "wgt/step/step_wgt_recover_icons.h"
-
-#include <pkgmgr-info.h>
-
-namespace {
-const char kSharedRes[] = "shared/res";
-
-namespace bf = boost::filesystem;
-}  // namespace
-
-namespace wgt {
-namespace filesystem {
-
-std::vector<boost::filesystem::path> StepWgtRecoverIcons::GetIconsPaths() {
-  // TODO(l.wysocki): As a temporary solution this will move icons into two
-  // destinations respectively {HOME}/.applications/icons,
-  // and {APP_ROOT}/shared/res, when some project will stop using old
-  // location ({HOME}/.applications/icons) then it can be removed from here.
-  std::vector<bf::path> paths { bf::path(getIconPath(context_->uid.get())),
-                                context_->root_application_path.get()
-                                / context_->pkgid.get() / kSharedRes };
-  return paths;
-}
-
-}  // namespace filesystem
-}  // namespace wgt
-
diff --git a/src/wgt/step/step_wgt_recover_icons.h b/src/wgt/step/step_wgt_recover_icons.h
deleted file mode 100644 (file)
index 5f88113..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
-// Use of this source code is governed by an apache-2.0 license that can be
-// found in the LICENSE file.
-
-#ifndef WGT_STEP_STEP_WGT_RECOVER_ICONS_H_
-#define WGT_STEP_STEP_WGT_RECOVER_ICONS_H_
-
-#include <common/step/step_recover_icons.h>
-#include <vector>
-
-namespace wgt {
-namespace filesystem {
-
-/**
- * @brief The StepRecoverIcons class
- *        Fixes state of platform icon files in recovery mode.
- *
- * For recovery of new installation, all icons files are removed.
- * For recovery of update installation, all icons of applications of package are
- * restored to its previous locations.
- */
-class StepWgtRecoverIcons :
-    public common_installer::filesystem::StepRecoverIcons {
- public:
-  using StepRecoverIcons::StepRecoverIcons;
-
- protected:
-  virtual std::vector<boost::filesystem::path> GetIconsPaths();
-
-  SCOPE_LOG_TAG(WgtRecoverIcons)
-};
-
-}  // namespace filesystem
-}  // namespace wgt
-
-#endif  // WGT_STEP_STEP_WGT_RECOVER_ICONS_H_
index 3f42f71..0dc580d 100644 (file)
@@ -12,6 +12,7 @@
 #include <boost/system/error_code.hpp>
 
 #include <common/pkgmgr_registration.h>
+#include <common/recovery_file.h>
 #include <common/request.h>
 #include <common/utils/file_util.h>
 
@@ -88,6 +89,13 @@ std::string GetPkgIdFromPath(const std::string& path) {
   return pkg_id;
 }
 
+std::string ReadPkgidFromRecovery(const std::string& recovery_path) {
+  std::unique_ptr<ci::recovery::RecoveryFile> recovery_file =
+      ci::recovery::RecoveryFile::OpenRecoveryFileForPath(recovery_path);
+  recovery_file->Detach();
+  return recovery_file->pkgid();
+}
+
 }  // namespace
 
 namespace wgt {
@@ -104,10 +112,12 @@ bool WgtAppQueryInterface::IsAppInstalledByArgv(int argc, char** argv) {
 
 bool WgtAppQueryInterface::IsHybridApplication(int argc, char** argv) {
   std::string arg = GetInstallationRequestInfo(argc, argv);
+  if (arg.find("apps_rw/recovery-") != std::string::npos)
+    arg = ReadPkgidFromRecovery(arg);
   if (ci::IsPackageInstalled(arg, ci::GetRequestMode())) {
     bf::path package_directory(ci::GetRootAppPath());
-    if (bf::exists(package_directory / kTizenManifestLocation) &&
-        bf::exists(package_directory / kHybridConfigLocation))
+    if (bf::exists(package_directory / arg / kTizenManifestLocation) &&
+        bf::exists(package_directory / arg / kHybridConfigLocation))
       return true;
   } else {
     bool tizen_manifest_found = false;
index 54e4bf0..c4d5ca9 100644 (file)
@@ -8,7 +8,9 @@
 
 #include <common/pkgmgr_interface.h>
 #include <common/step/step_configure.h>
+#include <common/step/step_backup_icons.h>
 #include <common/step/step_backup_manifest.h>
+#include <common/step/step_create_icons.h>
 #include <common/step/step_create_storage_directories.h>
 #include <common/step/step_copy.h>
 #include <common/step/step_copy_backup.h>
@@ -22,6 +24,7 @@
 #include <common/step/step_register_app.h>
 #include <common/step/step_recover_application.h>
 #include <common/step/step_recover_files.h>
+#include <common/step/step_recover_icons.h>
 #include <common/step/step_recover_manifest.h>
 #include <common/step/step_recover_security.h>
 #include <common/step/step_recover_storage_directories.h>
 #include "wgt/step/step_rds_modify.h"
 #include "wgt/step/step_rds_parse.h"
 #include "wgt/step/step_remove_encryption_data.h"
-#include "wgt/step/step_wgt_backup_icons.h"
-#include "wgt/step/step_wgt_create_icons.h"
+#include "wgt/step/step_wgt_patch_icons.h"
 #include "wgt/step/step_wgt_patch_storage_directories.h"
-#include "wgt/step/step_wgt_recover_icons.h"
 #include "wgt/step/step_wgt_resource_directory.h"
 
 namespace ci = common_installer;
@@ -82,7 +83,8 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
       AddStep<ci::filesystem::StepCreateStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
-      AddStep<wgt::filesystem::StepWgtCreateIcons>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
+      AddStep<ci::filesystem::StepCreateIcons>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
       AddStep<ci::pkgmgr::StepRegisterApplication>();
       AddStep<ci::security::StepRegisterSecurity>();
@@ -101,12 +103,13 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::backup::StepOldManifest>();
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
-      AddStep<wgt::backup::StepWgtBackupIcons>();
+      AddStep<ci::backup::StepBackupIcons>();
       AddStep<ci::backup::StepCopyBackup>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
-      AddStep<ci::filesystem::StepCopyStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
-      AddStep<wgt::filesystem::StepWgtCreateIcons>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
+      AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<ci::filesystem::StepCopyStorageDirectories>();
       AddStep<ci::security::StepUpdateSecurity>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
       AddStep<ci::pkgmgr::StepUpdateApplication>();
@@ -151,12 +154,13 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<ci::backup::StepOldManifest>();
       AddStep<ci::pkgmgr::StepKillApps>();
       AddStep<ci::backup::StepBackupManifest>();
-      AddStep<wgt::backup::StepWgtBackupIcons>();
+      AddStep<ci::backup::StepBackupIcons>();
       AddStep<ci::backup::StepCopyBackup>();
       AddStep<wgt::filesystem::StepWgtPatchStorageDirectories>();
-      AddStep<ci::filesystem::StepCopyStorageDirectories>();
       AddStep<wgt::filesystem::StepCreateSymbolicLink>();
-      AddStep<wgt::filesystem::StepWgtCreateIcons>();
+      AddStep<wgt::filesystem::StepWgtPatchIcons>();
+      AddStep<ci::filesystem::StepCreateIcons>();
+      AddStep<ci::filesystem::StepCopyStorageDirectories>();
       AddStep<ci::security::StepUpdateSecurity>();
       AddStep<wgt::pkgmgr::StepGenerateXml>();
       AddStep<ci::pkgmgr::StepUpdateApplication>();
@@ -168,7 +172,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr)
       AddStep<wgt::parse::StepParseRecovery>();
       AddStep<ci::pkgmgr::StepRecoverApplication>();
       AddStep<ci::filesystem::StepRemoveTemporaryDirectory>();
-      AddStep<wgt::filesystem::StepWgtRecoverIcons>();
+      AddStep<ci::filesystem::StepRecoverIcons>();
       AddStep<ci::filesystem::StepRecoverManifest>();
       AddStep<ci::filesystem::StepRecoverStorageDirectories>();
       AddStep<ci::filesystem::StepRecoverFiles>();