From c744b7b329f4d7e6df8ac7731bb01feef0a8f271 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Thu, 28 Jan 2016 15:16:51 +0100 Subject: [PATCH] Accept absolute icon path in tpk manifest StepTpkPatchIcons will try to look for icon in alternative location only if source path do not exist. Requires to be submitted with: - https://review.tizen.org/gerrit/#/c/58358/ Change-Id: I4b1a60a8aaab9fa0018d05b8ebbdcd79efc9aef6 --- src/common/step/step_parse_manifest.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/step/step_parse_manifest.cc b/src/common/step/step_parse_manifest.cc index fa99c7f..4c13393 100644 --- a/src/common/step/step_parse_manifest.cc +++ b/src/common/step/step_parse_manifest.cc @@ -488,11 +488,16 @@ bool StepParseManifest::FillApplicationIconPaths(application_x* app, const T& icons_info) { for (auto& application_icon : icons_info.icons()) { icon_x* icon = reinterpret_cast (calloc(1, sizeof(icon_x))); + bf::path text; + if (bf::path(application_icon.path()).is_absolute()) { + text = application_icon.path(); + } else { + text = context_->root_application_path.get() + / context_->pkgid.get() / "shared" / "res" / application_icon.path(); + } // NOTE: name is an attribute, but the xml writer uses it as text. // This must be fixed in whole app-installer modules, including wgt. // Current implementation is just for compatibility. - bf::path text = context_->root_application_path.get() - / context_->pkgid.get() / "shared" / "res" / application_icon.path(); icon->text = strdup(text.c_str()); icon->name = strdup(application_icon.path().c_str()); icon->lang = strdup(DEFAULT_LOCALE); -- 2.7.4