Hi Wa, GRIT generates ID numbers for all constants regardless of <if> elements or not, but skips output to the RC file for items that are in <if> elements that evaluate to false. This is done so that two different builds with different preprocessor defines (that cause different <if> sections to be included or not) get the same IDs for the same resources.
> This doesn't seem to be the same as when you guys build the .rc file > though, as the correct ID for IDR_FRAME is 10583. Why do you think this is the correct ID for IDR_FRAME? GRIT generates IDs every time it is run, and they are internally consistent but may change between invocations if the .grd file has been changed. Cheers, Jói On Aug 6, 2:34 am, Wa <[email protected]> wrote: > I'm trying to use Grit to compile the theme resource headers for > reference. But when I do so, it seems to be counting the <include>s > under <if expr="os == 'linux2'"> though it's not exporting them to the > header. For example from compile app_resources.grd: > #define IDR_MINIMIZE_H 10581 > #define IDR_MINIMIZE_P 10582 > #define IDR_FRAME 10595 > #define IDR_FRAME_INACTIVE 10596 > > That's the output, which as you can see, the increment breaks between > IDR_MINIMIZE_P and IDR_FRAME. Checking the -x verbose output, it is in > fact enumerating the inputs under the linux check there, incrementing > the ID value. > This doesn't seem to be the same as when you guys build the .rc file > though, as the correct ID for IDR_FRAME is 10583. > Is there a command line argument to Grit to step over ifs that > evaluate false that I'm missing here? I looked over the source for > Grit and your build files as best I could without knowing Python and > having never used VC++, but can't find anything related. > > If nothing else I guess I can just parse them out entirely in my > bat..though I really would rather not. --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
