Hello people,
I was looking at wrc a little bit, and I am curious to know if we really need all these options. They just pollute the command line namespace, and add confusion. windres has none of these options, and it's doing just fine.
Let me be more explicit:
" -a n Alignment of resource (win16 only, default is 4)\n"
Do we really need this? Shouldn't this be hardcoded to some standard values?
" -A Auto register resources (only with gcc 2.7 and better)\n" " -b Create an assembly array from a binary .res file\n"
Do we still want to create the assembly output? Do we still use that?
" -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" " (win32 only; default is n[ative] which equals "
Again, shouldn't this be hardcoded to some standard value, that we expect in Wine when we read the resources?
" -c Add 'const' prefix to C constants\n"
What's this good for?
" -e Disable recognition of win32 keywords in 16bit compile\n"
Shouldn't this be on be default? Should we even support 16bit compiles anymore?
" -E Preprocess only\n"
??? What for?
" -g Add symbols to the global c namespace\n"
Is this choice useful?
" -h Also generate a .h file\n" " -H file Same as -h but written to file\n"
I would personally collapse this one into the type of output to be generated.
" -L Leave case of embedded filenames as is\n"
Shouldn't this one be on by default? Why do we need this option?
" -m Do not remap numerical resource IDs\n"
What is this one used for?
" -n Do not generate .s file\n"
Should we still generate .s files in the first place?
" -p prefix Give a prefix for the generated names\n"
Why?
" -r Create binary .res file (compile only)\n"
I would make this default behavior.
" -s Add structure with win32/16 (PE/NE) resource directory\n"
I'd guess if we need it, it should be generated, if not, just don't do it. Why do we have an option?
" -t Generate indirect loadable resource tables\n" " -T Generate only indirect loadable resources tables\n"
What are these used for?
" -w 16|32 Select win16 or win32 output (default is win32)\n"
Should we care about win16 in the first place? We clearly never going to support win16 in Winelib, so why have this option?
" -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" " (win32 only; default is n[ative] which equals "
Again, shouldn't this be hardcoded to some standard value, that we expect in Wine when we read the resources?
The CPU byte-order is needed although I dont know if it works or not. The little bit of work I have been doing on alpha is stalled atm as I dont know axp asm =). Anyway when I get compiling resources with wrc I get a error about the resource format which I assume could be fixed by using this switch if it really works. If it does I will resubmit my configure patch for alpha with a define for winebuild to do this on a alpha platform unless you want to grandfather this switch and do it some other way.
Thanks Steven
__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
"Dimitrie O. Paun" dpaun@rogers.com writes:
I was looking at wrc a little bit, and I am curious to know if we really need all these options. They just pollute the command line namespace, and add confusion. windres has none of these options, and it's doing just fine.
wrc does a lot more than windres. We don't use all the features in the Wine building process but that's not a reason for removing them.
On December 8, 2002 05:57 pm, Alexandre Julliard wrote:
wrc does a lot more than windres. We don't use all the features in the Wine building process but that's not a reason for removing them.
I know that wrc does more than windres. I was just asking if some of these options are superfluous. In particular, do we need to support win16 resources?
"Dimitrie O. Paun" dpaun@rogers.com writes:
I know that wrc does more than windres. I was just asking if some of these options are superfluous. In particular, do we need to support win16 resources?
Yes we do, some of our 16-bit dlls have resources.
On Sun, 8 Dec 2002, Dimitrie O. Paun wrote: [...]
" -L Leave case of embedded filenames as is\n"
Shouldn't this one be on by default? Why do we need this option?
I agree with that one. As it is wrc just convert the filenames to lowercase before trying to include them which is just plain wrong. In particular it causes compilation errors if the file really has a mized-case which is not that uncommon.
It should either match them in a case-insensitive way, or leave them as is, and not do ugly hacks that are about as likely to cause compilation errors as they are to avoid some.
On December 9, 2002 04:57 pm, Francois Gouget wrote:
I agree with that one. As it is wrc just convert the filenames to lowercase before trying to include them which is just plain wrong. In particular it causes compilation errors if the file really has a mized-case which is not that uncommon.
ChangeLog Remove the -L wrc option, as no automatic fudging of filenames can ever be correct.
Index: tools/wrc/parser.y =================================================================== RCS file: /var/cvs/wine/tools/wrc/parser.y,v retrieving revision 1.33 diff -u -r1.33 parser.y --- tools/wrc/parser.y 15 Aug 2002 21:57:36 -0000 1.33 +++ tools/wrc/parser.y 17 Dec 2002 05:33:45 -0000 @@ -2694,11 +2694,6 @@ *cptr = '/'; }
- /* Convert to lower case. Seems to be reasonable to do */ - for(cptr = str->str.cstr; !leave_case && *cptr; cptr++) - { - *cptr = tolower(*cptr); - } return str; }
Index: tools/wrc/wrc.c =================================================================== RCS file: /var/cvs/wine/tools/wrc/wrc.c,v retrieving revision 1.21 diff -u -r1.21 wrc.c --- tools/wrc/wrc.c 12 Dec 2002 22:23:55 -0000 1.21 +++ tools/wrc/wrc.c 17 Dec 2002 05:32:44 -0000 @@ -104,7 +104,6 @@ " -I path Set include search dir to path (multiple -I allowed)\n" " -J Do not search the standard include path\n" " -l lan Set default language to lan (default is neutral {0, 0})\n" - " -L Leave case of embedded filenames as is\n" " -m Do not remap numerical resource IDs\n" " -n Do not generate .s file\n" " -N Do not preprocess input\n" @@ -252,12 +251,6 @@ int auto_register = 0;
/* - * Set when the case of embedded filenames should not be converted - * to lower case (-L option) - */ -int leave_case = 0; - -/* * The output byte-order of resources (set with -B) */ int byteorder = WRC_BO_NATIVE; @@ -433,9 +426,6 @@ error("Language %04x is not supported",lan); currentlanguage = new_language(PRIMARYLANGID(lan), SUBLANGID(lan)); } - break; - case 'L': - leave_case = 1; break; case 'm': remap = 0; Index: tools/wrc/wrc.h =================================================================== RCS file: /var/cvs/wine/tools/wrc/wrc.h,v retrieving revision 1.24 diff -u -r1.24 wrc.h --- tools/wrc/wrc.h 31 May 2002 23:41:01 -0000 1.24 +++ tools/wrc/wrc.h 17 Dec 2002 05:32:50 -0000 @@ -64,7 +64,6 @@ extern DWORD codepage; extern int pedantic; extern int auto_register; -extern int leave_case; extern int byteorder; extern int preprocess_only; extern int no_preprocess;