Resource (.rc) file comparison request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    Resource (.rc) file comparison request

    Using visual c++ can get quite tedious when conflicts occur in resource files. A way to visualize the conflicts/similarties would be quite desirable.
  • kevinsikes
    Enthusiast
    • May 2005
    • 31

    #2
    Re: Resource (.rc) file comparison request

    This would be quite challenging -- more of a pattern recognition tool or resource file preprocessor than a difference viewer. For instance, just changing the Tab order of the controls in a dialog rearranges the corresponding text in the .rc file (with somewhat unpredictable line wrapping). This makes text diff tools wail, as you well know. The only solution I see is to write a resource script preprocessor that parses each resource into a meta-resource that can be compared to another meta-resource. Then, if one dialog box has the same number of controls with the same names and properties, it matches. In that case, Tab order becomes an "unimportant" difference in BC parlance. The same would hold for other types of resources such as accelerators, string table, etc. Quite an undertaking!

    There is one rule I've implemented for .RC files:
    ^FONT 8, "MS Sans Serif".*$
    This is to ignore the weight, italic, and charset attributes on the FONT line of a DIALOGEX resource (they come after the font name), since for some unknown reason they seem to come and go between developer checkins!

    Comment

    • Chris
      Team Scooter
      • Oct 2007
      • 5538

      #3
      Re: Resource (.rc) file comparison request

      A preprocessor as KevinSikes suggested is probably the best way to handle these files. I added an entry to our wish list for a good way to compare .rc files.
      Chris K Scooter Software

      Comment

      Working...