Francois Gouget fgouget@free.fr writes:
Resource ids cannot contain dashes so replace them with underscores. This makes it possible to build tests for dlls containing dashes into their names like the api-* ones.
There's no reason that resource ids can't contain dashes, and besides, winetest won't know what to do with it if you change the name.
On Fri, 20 Feb 2015, Alexandre Julliard wrote: [...]
There's no reason that resource ids can't contain dashes,
You're right, it's a bug in wrc.
The simple fix would be to add '-' to the set of allowed characters for tIDENT but in fact the resource and type ids (and probably filenames) can contain pretty much any character. That's much harder to handle in the parser however :-(
The problem is we can have things like:
--- /* A resource called '1,2,3,4' of type '5,6,7,8' */ 1,2,3,4 5,6,7,8 special-characters-must-be-quoted.exe
/* A VERSIONINFO resource called '4,3,2,1' */ 4,3,2,1 16 FILEVERSION 1,0x2,3,4 FILESUBTYPE 0x0 { BLOCK "StringFileInfo" { } }
1,2,%,4 5,$,7,( api.exe ---
So the problem is that sometimes 1,2,3,4 should be treated as a single token (tIDENT), and sometimes as 7 tokens: four numbers and three commas.
I'm not sure the lexer can distinguish between these two cases on its own. Maybe if it switches to the 'numbers please' mode when returning a FILEVERSION token (and the others like it), and also when returning an opening brace. It would then have to count the opening/closing braces (resp BEGIN/END tokens) to know when to go back to its default state. And this probably is not limited to the VERSIONINFO type of resource.
Another option would be to switch the lexer state from the grammatical parser but that's frowned upon. So if it's not necessary it would be nice to avoid it.
Interestingly, commas are not allowed in unquoted filenames: this means that at this point it treats commas as separators, just like in the file resource. However characters like '^' or '$' are allowed.
Any opening brace also seems to have an impact: '1 3,4 dummy' complains dummy does not exist, but '{ 1 3,4 dummy' complains '3' does not exist. So does '{ 1,2 3,4' so the first comma does not seem to be treated as a separator.
and besides, winetest won't know what to do with it if you change the name.
I did test and that worked... just had to use underscores.
Francois Gouget fgouget@free.fr writes:
On Fri, 20 Feb 2015, Alexandre Julliard wrote: [...]
There's no reason that resource ids can't contain dashes,
You're right, it's a bug in wrc.
The simple fix would be to add '-' to the set of allowed characters for tIDENT but in fact the resource and type ids (and probably filenames) can contain pretty much any character. That's much harder to handle in the parser however :-(
Yes, cf. bug 786.
and besides, winetest won't know what to do with it if you change the name.
I did test and that worked... just had to use underscores.
I don't see how winetest can find the dll if it's using underscores.