WMC(1)

πŸ“¦
version 10.0 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– WMC(1) β€” the Wine Message Compiler, bestie edition πŸ’–

okay so like, this is wmc, from the Wine Developers Manual (section 1, she's a command, she's iconic, she compiles messages, we love her). sit down, grab a boba, and let me tell you everything πŸ§‹βœ¨


🌸 NAME 🌸

wmc β€” the Wine Message Compiler. that's it, that's the name, she's a compiler for messages and she's serving πŸ’…


✨ SYNOPSIS ✨

wmc [options] [inputfile]

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically wmc takes the messages in inputfile and compiles them into the FormatMessage[AW] compatible format, all wrapped up inside a resourcescript format. it's giving compiler, it's giving resource file, it's giving everything at once, no cap.

and then she outputs the data either as a standard .bin formatted binary file, or she can generate inline resource data. two vibes, one tool πŸŽ€

wmc takes only one inputfile as an argument (peep the BUGS section for why, bestie, it's a whole thing). that inputfile normally has the extension .mc. if you don't hand her an inputfile at all, she reads the messages from standard input. and if you don't specify the output file with -o, then wmc writes the output to inputfile.{rc,h}. if there was no inputfile given in the first place, the output file gets named wmc.tab.{rc,h} instead. the way she just knows where to put things 😌


πŸ’… OPTIONS πŸ’…

  • -c β€” sets the 'custom-bit' in message-code values. custom. bit. periodt.
  • -d β€” NON-FUNCTIONAL; use decimal values in output. yeah she's not actually doing anything, she's just standing there. cute though πŸ’€
  • -D β€” sets the debug flag. this results in a parser trace and a lot of extra messages. like, a LOT. buckle up.
  • -h, --help β€” prints an informative usage message and exits. the classic. the helpful one. we stan 🫢
  • -H file β€” writes the headerfile to file. default is inputfile.h.
  • -i β€” inline messagetable(s). this option skips the generation of all .bin files and writes all output into the .rc file. this encoding is parsable with wrc(1). so if you don't want a bunch of little binary files, this is your girl ✨
  • --nls-dir=directory β€” specify the directory to search for the NLS files that contain the codepage mapping tables. gotta know where your mappings live, iykyk.
  • -o, --output=file β€” output to file. default is inputfile.rc.
  • -O, --output-format=format β€” set the output format. the supported formats are rc (which is the default, obvi), res, and pot.
  • -P, --po-dir=directory β€” enables the generation of resource translations based on po files loaded from the specified directory. that directory must follow the gettext convention, in particular it must contain one .po file for each language, and a LINGUAS file listing the available languages. no skipping steps, bestie, she checks πŸŽ€
  • -u β€” assumes that the input file is in Unicode or UTF-8 format and skips codepage conversions. just vibes, already decoded.
  • -v β€” show all supported codepages and languages. a whole little showcase, slay.
  • -V, --version β€” print version end exit. (yes, "end". that's what it says. we're not fixing it, she's perfect as she is πŸ™ˆ)
  • -W, --pedantic β€” enable pedantic warnings. she will absolutely tell you about every little thing and honestly? she's right to πŸ’…

🌈 EXTENSIONS 🌈

the original syntax got an upgrade β€” she's extended to support codepages more smoothly now. a glow-up, fr fr.

normally, codepages are based on the DOS codepage from the language setting. but the original syntax only lets you set the destination codepage. and that is simply not enough for non-DOS systems that don't use unicode source-files. the math wasn't mathing, so they fixed it.

so a new keyword Codepages was introduced, and it sets both the input and output codepages to literally anything you want, for each language. the syntax is similar to the other constructs:

Codepages '=' '(' language '=' cpin ':' cpout ... ')'

the language is the numerical language-ID, or the alias set with LanguageNames. the input codepage cpin and output codepage cpout are the numerical codepage IDs. and get this β€” there can be multiple mappings within the definition, and the definition may occur more than once. flexible queen πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

wmc was written by Bertho A. Stultiens. absolute legend behavior, thank you for your service 🫑


πŸ’€ BUGS πŸ’€

okay bestie, the tea:

  • the message compiler should be able to have multiple input files and combine them into one output file. this would enable the splitting of languages into separate files. she can't. not yet. someday πŸ™
  • decimal output is completely lacking. and they don't even know whether it should be implemented, because it's a, well, non-informative format change. it is recognized on the commandline for some form of compatibility though β€” so it's there, just, you know, cosplaying as functional πŸ’€
  • bugs can be reported on the Wine bug tracker. please do, she wants to grow 🌱

⭐ AVAILABILITY ⭐

wmc is part of the Wine distribution, which is available through WineHQ, the Wine development headquarters. go get her ✨


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, bestie!! this one's from Wine 10.0, dated October 2005 β€” vintage but still eating, we love a timeless icon πŸ’–πŸ¦‹βœ¨ periodt.