Add a new png file to views_examples_resources.grd

23 views Asked by At

I am learning Chromium UI by looking at the following file: ui/views/examples/views_examples/views_examples_resources.grd. When I add a new image file to it which looks like this

<?xml version="1.0" encoding="UTF-8"?>
<grit base_dir="." latest_public_release="2" current_release="3"
      output_all_resource_defines="false" source_lang_id="en" enc_check="möl">
  <outputs>
    <output filename="grit/views_examples_resources.h" type="rc_header">
      <!-- <emit emit_type='prepend'></emit> -->
    </output>
    <output filename="views_examples_resources.pak" type="data_package" lang="en" />
  </outputs>
  <release seq="3">
    <messages fallback_to_english="true">
     <message translateable="false" name="IDS_WIDGET_POPUP_BUTTON_LABEL">
        Popup widget
      </message>
      ......
    </messages>

   <!-- I added the following code -->
    <structures>
      <structure type="chrome_scaled_image" name="IDR_DOG_JPG" file="images/dog.jpg" />
    </structures>

  </release>
</grit>

I add the section <structures > but when I compile, it shows the following error message:

ValueError: Resource ids for ui/views/examples/views_examples_resources.grd needs entry for ['structures'] ninja: build stopped: subcommand failed.

What can I do to fix it?

0

There are 0 answers