WRC(1)
π WRC(1) β the Wine Resource Compiler, bestie edition π
okay so this is wrc from the Wine Developers Manual, and it's genuinely one of my faves. sit down, hydrate, let's get into it π«Ά
β¨ NAME β¨
wrc β the Wine Resource Compiler. that's it, that's the girl. π
πΈ SYNOPSIS πΈ
wrc [options] [inputfile...]
π¦ DESCRIPTION π¦
so what does she DO? wrc compiles resources from inputfile into win16 and win32 compatible binary format. iconic behavior honestly.
the source file gets preprocessed with a builtin ANSI-C compatible preprocessor before the resources are compiled. (go look at PREPROCESSOR below, i gotchu.)
wrc takes a series of inputfile as argument. if you give her no inputfile at all, she reads the resources from standard input. and if you don't pick an output file with -o, she writes the output to inputfile.res with .rc stripped, or to wrc.tab.res if no inputfile was given. no cap.
π OPTIONS π
-b,--target=cpu-manufacturer[-kernel]-osβ specify the target CPU and platform the generated code is gonna be built on. the target spec is in the standard autoconf format, like whatconfig.subreturns. β¨-D,--define=id[=val]β define preprocessor identifier id to (optionally) the value val. see also PREPROCESSOR below.--debug=nnβ set debug level to nn. the value is a bitmask, and it's giving very much "pick your chaos":1= verbose2= dump internals4= resource parser trace8= preprocessor messages16= preprocessor scanner32= preprocessor parser trace
--endianness=eβ Win32 only; sets the output byte-ordering, where e is one ofn[ative],l[ittle]orb[ig]. only resources in source-form can be reordered. native ordering depends on the systemwrcwas built on. you can peep the native ordering by typingwrc -h. π§-Eβ preprocess only. output goes to standard output if no outputfile was selected. the output is compatible with whatgccwould generate.-h,--helpβ prints a summary message and exits. the polite queen.-i,--input=fileβ the name of the input file. if you don't use this option,wrcuses the first non-option argument as the input file name. and if there are no non-option arguments at all? she reads from standard input. π-I,--include-dir=pathβ add path to the include search directories. path can contain multiple directories, separated with:. you're allowed to specify-Imultiple times. include files are searched in the order the-Ioptions were specified. the search is compatible withgcc, where<>quoted filenames are searched exclusively via the-Iset path, whereas the""quoted filenames are first tried to be opened in the current directory. also, resource statements with file references are located in the same way. π-J,--input-format=formatβ sets the input format. valid options arercorrc16. setting the input torc16disables the recognition of win32 keywords. β οΈ-l,--language=langβ set default language to lang. 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. the only difference between 32-bit and 64-bit is whether the_WIN64preprocessor symbol is defined. π--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 explicitly specified with the-Ioption.--no-use-temp-fileβ ignored for compatibility withwindres. yeah she's just standing there, ignore her π-o,-fo,--output=fileβ write output to file. default is inputfile.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 this option isn't specified, 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. π--pedanticβ enable pedantic warnings. notably, redefinition of#definestatements can be discovered with this option. π--po-dir=dirβ enable the generation of resource translations based onmofiles loaded from the specified directory. that directory must follow the gettext convention β in particular it must contain one.mofile for each language, and aLINGUASfile listing the available languages.-rβ ignored for compatibility withrc. another one just vibing π--preprocessor=programβ this option may be used to specify the preprocessor to use, including any leading arguments. if not specified,wrcuses its builtin processor. to disable preprocessing, 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 also PREPROCESSOR below.--use-temp-fileβ ignored for compatibility withwindres. (the third one. she's also just standing there.)-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. she's well-read, okay?
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).
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. π«
π 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. 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. we love a collaborative moment fr fr π«Ά
π BUGS π
- 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.
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.
and that's the whole page bestie, you ate it up π this was Wine 6.0, October 2005 β go compile something cute, mwah πβ¨
π¦ where this page comes from
- ubuntu jammy: wine64-development-tools 6.0+repack-1ubuntu1 Β· 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