Apache OpenOffice (AOO) Bugzilla – Issue 27702
W32-mingw: windres cannot handle concatenated .res files
Last modified: 2013-08-07 15:35:14 UTC
Hi! I start a new issue for this, the main issue gets a bit crowded. > tono: I have to apologize not to have mentioned winres.exe modification. > > I made modification so that winres can process concatenated .res files (with > multiple resource headers). Microsoft tools can handle them as valid .res > files, winres cannot. > > In the meantime, the issue can be solved by modifying > solenv/inc/_?tg_(app|shl).mk. I just had a look at them. :( the W32 build heavily depends on rc.exe's ability to just add them together. IMHO it's a lot of work to change it to concatenate the .rc files. > I wonder whether is the more sophisticated solution. My first impulse was to propose to include a windres version with your patch in the OOo sources, we do that already for makedepend. But this is propably not possible due to license restrictions. vq->mh: Am I right? > Anyways I will upload the patch for winres. For easier reference: <http://www.openoffice.org/nonav/issues/showattachment.cgi/14477/resres.c.patch> vq->tono: What do yo think about a header stripper? Something that can be used instead of cat in this build and concatenates the .res files, but strips the headers of the 2..n files? vq->ause: What do you propose?
ok, looking at the patches for linking i finaly got your problem. is "winres" able to handle several "*.res" files at all? either by merging them to one object or creating several objects? there is still the "SHLnALLRES" variable which knows about the single "*.res" files.
No, the manpage says: SYNOPSIS windres [options] [input-file] [output-file] DESCRIPTION windres reads resources from an input file and copies them into an ----------------------------------------^^ output file. Either file may be in one of three formats: rc A text format read by the Resource Compiler. res A binary format generated by the Resource Compiler. coff A COFF object or executable. Only one file :( and the binutils sources in windres.c confirm that.
what does this object contain? is it possible to use more than one or are there specific symbols used so that this "resource" object has to be the opnly one?
No idea. I have only looked at main() from windres.c tono?
I suspect that creating multiple COFF resource object by running windres.exe for each .res file should be OK, but I have not confirmed yet.
Experimentaly I linked multiple .o after applying windres.exe for some .res files. The link succeeded but when I opend the built .dll as a resource file with VS.NET 2003, the resources other than those in the first .res are ignored. I think we hove to handle concatinated .res somehow. Takashi Ono
set target to 2.0, vq is there still any action on this ?
vq->mh: It works with the patch to windres that is described in the top entry of this issue. We have propably two possibilities: * Convince the binutils people to modify windres that it acts like the MS version. (I think this is possible, but it takes a while until the fix would make it into the release version). And it is Takashis patch, he propably would have to get a copyright assignment first. (I guess for binutils he would need an assignment with redhat.) * Write a small cleanres program that removes the extra headers from the *.res files. Should be fairly easy for someone that knows the .res format, basically delete that, what the windres patch ignores. In fact this issue is a developer convenience issue, it's not strictly needed, as long as you are able to rebuild windres with the patch. We should get a 680 build running with mingw, thats a higher priority.
Targeted for OO later
Closing as the problem is fixed in recent binutils distribution.
Closing the issue.