SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(RESDIR "${PREFIX}/res")
SET(EDJEDIR "${RESDIR}/edje")
+SET(IMAGEDIR "${RESDIR}/images")
SET(LOCALEDIR "${RESDIR}/locale")
FOREACH(flag ${pkgs_CFLAGS})
ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+#define DEFAULT_ICON IMAGEDIR"/default.png"
int _get_pkginfo_cb(pkgmgrinfo_appinfo_h app_handle, void *user_data)
{
char *appid = NULL;
if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_icon(app_handle, &icon)) {
goto ERROR;
}
- if (icon) {
+ if (icon && 0 == access(icon, F_OK)) {
pkg_info->icon= strdup(icon);
- goto_if(!pkg_info->icon, ERROR);
+ } else {
+ _D("Fail to access icon path");
+ pkg_info->icon = strdup(DEFAULT_ICON);
}
+ goto_if(!pkg_info->icon, ERROR);
if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_label(app_handle, &name)) {
goto ERROR;