app_icon += ".png";
bf::path icon_backup = app_icon;
icon_backup += ".bck";
- icons_.emplace_back(app_icon, icon_backup);
+ if (bf::exists(app_icon))
+ icons_.emplace_back(app_icon, icon_backup);
}
// backup
fs::path app_icon = fs::path(context_->pkg_path.get())
/ fs::path(app->appid)
/ fs::path(app->icon->name);
- if (fs::exists(app_icon))
+ if (fs::exists(app_icon)) {
fs::copy_file(app_icon, icon_path_ /= icon,
fs::copy_option::overwrite_if_exists);
+ xmlTextWriterWriteFormatElement(writer, BAD_CAST "icon",
+ "%s", BAD_CAST icon.c_str());
+ }
} else {
//Default icon setting is role of the platform
LOG(DEBUG) << "Icon was not found in package";
}
- xmlTextWriterWriteFormatElement(writer, BAD_CAST "icon",
- "%s", BAD_CAST icon.c_str());
-
for (appcontrol_x* appc = app->appcontrol; appc != nullptr;
appc = appc->next) {
xmlTextWriterStartElement(writer, BAD_CAST "app-control");
manifest->uiapplication->appid = strdup(app_info->id().c_str());
manifest->uiapplication->type = strdup("webapp");
- if (manifest->icon)
- manifest->uiapplication->icon->name = strdup(manifest->icon->name);
+ if (manifest->icon) {
+ icon_x* icon = nullptr;
+ LISTHEAD(manifest->icon, icon);
+ manifest->uiapplication->icon->name = strdup(icon->name);
+ }
manifest->uiapplication->next = nullptr;
manifest->package = strdup(app_info->package().c_str());