edje - edje_cc - add no warning for unused images and use it

a test edje has lots of unused images - it's not important so silence
warnings.
This commit is contained in:
Carsten Haitzler 2021-04-16 04:09:06 +01:00
parent aef36c6e5b
commit 5b17444313
4 changed files with 20 additions and 9 deletions

View File

@ -21,6 +21,7 @@ foreach edc_file : edc_files
input : edc_file,
output : '@BASENAME@.edj',
command : edje_cc_exe + [ '-beta', '-fastcomp',
'-no-warn-unused-images',
'-sd', elm_themes_sound_include,
'-id', elm_themes_image_include,
'-id', join_paths(meson.current_source_dir()),

View File

@ -52,6 +52,7 @@ int annotate = 0;
int no_etc1 = 0;
int no_etc2 = 0;
int beta = 0;
int no_warn_unused_images = 0;
Eina_Bool namespace_verify;
unsigned int max_open_files;
@ -315,6 +316,10 @@ main(int argc, char **argv)
{
annotate = 1;
}
else if (!strcmp(argv[i], "-no-warn-unused-images"))
{
no_warn_unused_images = 1;
}
else if ((!strcmp(argv[i], "-deps")) && (i < (argc - 1)))
{
i++;

View File

@ -346,6 +346,7 @@ extern int annotate;
extern Eina_Bool current_group_inherit;
extern Eina_List *color_tree_root;
extern int beta;
extern int no_warn_unused_images;
extern int had_quote;

View File

@ -4038,9 +4038,10 @@ free_group:
if (de->entry && eina_hash_find(images_in_use, de->entry))
continue;
if (!no_warn_unused_images)
printf("Warning: Image '%s' not used\n", de->entry);
INF("Image '%s' in resource 'edje/image/%i' will not be included as it is unused.",
de->entry, de->id);
// INF("Image '%s' in resource 'edje/image/%i' will not be included as it is unused.",
// de->entry, de->id);
// so as not to write the unused images, moved last image in the
// list to unused image position and check it
@ -4069,6 +4070,8 @@ free_group:
if (set->name && eina_hash_find(images_in_use, set->name))
continue;
if (!no_warn_unused_images)
{
printf("Warning: Image set '%s' not used\n", set->name);
EINA_LIST_FOREACH(set->entries, l, set_e)
{
@ -4077,6 +4080,7 @@ free_group:
set_e->size.min.w, set_e->size.min.h,
set_e->size.max.w, set_e->size.max.h);
}
}
/* No need to redo id's - we will warn of unused images - fix in src
* Also .. this is broken and messes up id's ... so easyer - complain
* to develoepr to clean up the theme...