This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Windres gives parsing errors when resource names begin with underscores


On 20 April 2007 14:15, Nick Clifton wrote:

> Hi Millenomi,
> 
>> I was using a mingw cross-compiler to develop a game for Windows that
>> would target XP and Vista (among other platforms, thanks to SDL).
>> Vista requires, for games to appear in the Game Explorer window, that
>> a resource is included in the .exe file, among other things. The
>> resource must be named __GDF_XML (and be of the user type DATA), but
>> windres complains (parse error on line:...) when compiling a .rc file such
>> as: 
>> 
>> __GDF_XML DATA MyVistaGameDefinitionFile.xml
> 
>  > Can it be changed so that this works?
> 
> Possibly.  Would you like to try out this (untested) patch and see if it
> works for you ?

  I tried that when Millenomi first posted, and for some reason it didn't work
at all.  I must have been testing wrong though, because I just tried again and
it works fine (below).  Nick, I recommend you check the patch in.




/usr/build/obj-binutils/binutils $ cat sample.rc

__GDF_XML DATA MyVistaGameDefinitionFile.xml

/usr/build/obj-binutils/binutils $ cat MyVistaGameDefinitionFile.xml
here is some data
/usr/build/obj-binutils/binutils $ ./windres.exe -i sample.rc -o sample.res
/usr/build/obj-binutils/binutils $ od -c sample.res
0000000  \0  \0  \0  \0      \0  \0  \0 377 377  \0  \0 377 377  \0  \0
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040 023  \0  \0  \0   8  \0  \0  \0   D  \0   A  \0   T  \0   A  \0
0000060  \0  \0   _  \0   _  \0   G  \0   D  \0   F  \0   _  \0   X  \0
0000100   M  \0   L  \0  \0  \0  \0  \0  \0  \0  \0  \0   0 020  \t 004
0000120  \0  \0  \0  \0  \0  \0  \0  \0   h   e   r   e       i   s
0000140   s   o   m   e       d   a   t   a  \r  \n  \0  \0  \0
0000156
/usr/build/obj-binutils/binutils $ ./windres.exe -i sample.res -o
regenerated.rc
/usr/build/obj-binutils/binutils $ cat regenerated.rc
// Time stamp: 1177075718

// Type: "DATA"
// Time stamp: 1177075718

// Name: "__GDF_XML"
// Time stamp: 1177075718
LANGUAGE 9, 1

__GDF_XML DATA MOVEABLE PURE DISCARDABLE
BEGIN
  1701995880L,  // here
  544434464L,   //  is
  1701670771L,  // some
  1952539680L,  //  dat
  3425,
  "\012"
END
/usr/build/obj-binutils/binutils $


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]