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.
v-1.26.0
Carsten Haitzler 2 years ago
parent aef36c6e5b
commit 5b17444313
  1. 1
      data/elementary/objects/meson.build
  2. 5
      src/bin/edje/edje_cc.c
  3. 1
      src/bin/edje/edje_cc.h
  4. 22
      src/bin/edje/edje_cc_out.c

@ -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()),

@ -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++;

@ -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;

@ -4038,9 +4038,10 @@ free_group:
if (de->entry && eina_hash_find(images_in_use, de->entry))
continue;
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);
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);
// so as not to write the unused images, moved last image in the
// list to unused image position and check it
@ -4069,13 +4070,16 @@ free_group:
if (set->name && eina_hash_find(images_in_use, set->name))
continue;
printf("Warning: Image set '%s' not used\n", set->name);
EINA_LIST_FOREACH(set->entries, l, set_e)
if (!no_warn_unused_images)
{
printf(" Contains '%s' size %ix%i -> %ix%i\n",
set_e->name,
set_e->size.min.w, set_e->size.min.h,
set_e->size.max.w, set_e->size.max.h);
printf("Warning: Image set '%s' not used\n", set->name);
EINA_LIST_FOREACH(set->entries, l, set_e)
{
printf(" Contains '%s' size %ix%i -> %ix%i\n",
set_e->name,
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

Loading…
Cancel
Save