WRC(1)
π WRC(1) β Wine Developers Manual π
okay bestie, sit down, hydrate, because we're about to talk about wrc, the Wine Resource Compiler β straight outta the Wine Developers Manual and honestly? iconic. π
β¨ SYNOPSIS β¨
wrc [options] [inputfile...]
πΈ DESCRIPTION πΈ
So wrc takes resources from inputfile and compiles them into win16 and win32 compatible binary format. That's the whole vibe. π
Before any of the actual compiling happens, the source file gets run through a builtin ANSI-C compatible preprocessor. Peep the PREPROCESSOR section below for the tea. β
wrc takes a whole series of inputfile as arguments, like a little stack of snacks π. If you give it none? It reads from standard input. And if you didn't pick an output file with -o, then wrc writes the output to inputfile.res with .rc stripped off, or to wrc.tab.res if there was no inputfile at all. no cap.
π OPTIONS π
-D,--define=id[=val]β Define preprocessor identifier id to (optionally) the value val. Scroll down to PREPROCESSOR for more, bestie.--debug=nnβ Set debug level to nn. It's a bitmask, so you stack these bad boys up like friendship bracelets π«Ά:1=verbose,2=dump internals,4=resource parser trace,8=preprocessor messages,16=preprocessor scanner and32=preprocessor parser trace.-Eβ Preprocess only. Output goes to standard output if you didn't select anoutputfile. And the output is compatible with whatgccwould generate. slay π₯-h,--helpβ Prints a summary message and exits. the polite little exit. π-i,--input=fileβ The name of the input file. If you don't use this option,wrcjust grabs the first non-option argument as the input file name. And if there are no non-option arguments at all? It reads from standard input. β¨-I,--include-dir=pathβ Add path to the list of directories to search for includes. You can pass-Imultiple times, no limit bestie. Include files are searched in the order in which the-Ioptions were specified. The search is compatible withgcc, where'<>'quoted filenames are searched exclusively via the-Iset path, whereas'""'quoted filenames are first tried to be opened in the current directory. And resource statements with file references are located in the same way too. π-J,--input-format=formatβ Sets the input format. The valid options are'rc'or'rc16'. Setting the input to'rc16'disables the recognition of win32 keywords. important!! π-l,--language=langβ Set default language to lang. The default is the neutral language0(i.e."LANGUAGE 0, 0"). π-m16,-m32,-m64β Generate resources for 16-bit, 32-bit or 64-bit platforms respectively. And the only difference between 32-bit and 64-bit is whether the_WIN64preprocessor symbol is defined. that's it, that's the whole difference. β¨--nls-dir=dirβ Specify the directory to search for the NLS files containing the codepage mapping tables. π--nostdincβ Do not search the standard include path. Look for include files only in the directories you explicitly specified with the-Ioption. no shortcuts. π--no-use-temp-fileβ Ignored, for compatibility withwindres. π«₯-o,-fo,--output=fileβ Write output to file. Default isinputfile.reswith.rcstripped, orwrc.tab.resif input is read from standard input. πΈ-O,--output-format=formatβ Sets the output format. The supported formats arepo,pot,res, andres16. If you don't specify this option, the format defaults tores. Inpomode, if an output file name is specified it must match a known language name, likeen_US.poβ only resources for the specified language are output. If no output file name is specified, a separate.pofile is created for every language encountered in the input. multi-language moment π--pedanticβ Enable pedantic warnings. Notably, redefinition of#definestatements can be discovered with this option. the gossip detector. π--po-dir=dirβ Enable the generation of resource translations based onmofiles loaded from the specified dir. That directory must follow the gettext convention β in particular it must contain one.mofile for each language, and aLINGUASfile listing the available languages. no getting around it bestie. π-rβ Ignored, for compatibility withrc. π«₯--preprocessor=programβ Use this to specify the preprocessor to use, including any leading arguments. If not specified,wrcuses its builtin processor. And to disable preprocessing entirely, use--preprocessor=cat. π--sysroot=dirβ Prefix the standard include paths with dir. β¨--utf8,-uβ Set the default codepage of the input file to UTF-8. π-U,--undefine=idβ Undefine preprocessor identifier id. β οΈ Please note that only macros defined up to this point are undefined by this command. However, these include the special macros defined automatically bywrc. See PREPROCESSOR below, bestie.--use-temp-fileβ Ignored, for compatibility withwindres. π«₯-v,--verboseβ Turns on verbose mode (equivalent to-d 1). π£οΈ--versionβ Print version and exit. π
π§ PREPROCESSOR π§
The preprocessor is ANSI-C compatible with some of the extensions of the gcc preprocessor. periodt.
The preprocessor recognizes these directives: #include, #define (both simple and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif, #error, #warning, #line, # (both null- and line-directive), #pragma (ignored), #ident (ignored). that's the full list, don't come for me. π
The preprocessor sets by default several defines:
RC_INVOKEDβ set to1__WRC__β Major version ofwrc__WRC_MINOR__β Minor version ofwrc__WRC_PATCHLEVEL__β Patch level
Win32 compilation mode also sets _WIN32 to 1. π₯
Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also recognized and expand to their respective equivalent. iconic behavior fr fr. π¦
π LANGUAGE SUPPORT π
Language, version and characteristics can be bound to all resource types that have inline data, such as RCDATA. This is an extension to Microsoft's resource compiler, which lacks this support completely. we're just better. π
Only VERSIONINFO cannot have version and characteristics attached, but languages are propagated properly if you declare it correctly before the VERSIONINFO resource starts. π
Example:
1 RCDATA DISCARDABLE
LANGUAGE 1, 0
VERSION 312
CHARACTERISTICS 876
{
1, 2, 3, 4, 5, "and whatever more data you want"
'00 01 02 03 04 05 06 07 08'
}
π AUTHORS π
wrc was written by Bertho A. Stultiens and is a nearly complete rewrite of the first wine resource compiler (1994) by Martin von Loewis.
Additional resource types were contributed by Ulrich Czekalla and Albert den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003. Bugfixes have been contributed by many Wine developers. give them their flowers, all of them. πΈ
π BUGS π
ngl, there's some stuff to know:
- The preprocessor recognizes variable argument macros, but does not expand them correctly. π
- Error reporting should be more precise, as currently the column and line number reported are those of the next token.
- Default memory options should differ between win16 and win32.
There is no support for:
RT_DLGINCLUDE,RT_VXD,RT_PLUGPLAYandRT_HTML(unknown format)PUSHBOXcontrol is unsupported due to lack of original functionality.
Fonts are parsed and generated, but there is no support for the generation of the FONTDIR yet. The user must supply the FONTDIR resource in the source to match the FONT resources. don't forget bestie!! π
Bugs can be reported on the Wine bug tracker.
β AVAILABILITY β
wrc is part of the Wine distribution, which is available through WineHQ, the Wine development headquarters. π
π«Ά SEE ALSO π«Ά
wine(1),- Wine documentation and support.
okay and that's the whole page, bestie!! π this was Wine 11.20, dated October 2005 β yeah she's an elder icon but she still ate and left no crumbs. πβ¨ππ
π¦ where this page comes from
- fedora 44: wine-devel 11.20-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: wine-devel 11.20-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms