WMC(1)

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

okay so first thing: this is wmc(1) from the Wine Developers Manual. Yes, the manual name is literally part of the vibe. Sit down, hydrate, and let's compile some messages together πŸ¦‹


✨ NAME ✨

wmc β€” the Wine Message Compiler. that's it, that's the name, iconic πŸ‘‘


🌸 SYNOPSIS 🌸

wmc [options] [inputfile]

πŸ’– DESCRIPTION πŸ’–

okay so wmc takes the messages living inside inputfile and compiles them into a FormatMessage[AW]-compatible format β€” which gets wrapped up all cozy in a resourcescript format. and then it hands you the data in one of two ways: as a standard .bin formatted binary file, or as inline resource data. choose your fighter 🫢

here's the tea about file arguments:

  • wmc takes only one inputfile as an argument (go peek at BUGS below, bestie, it's a whole thing 😭).
  • the inputfile normally has the extension .mc.
  • if you don't give an inputfile at all, the messages get read from standard input.
  • if the outputfile isn't specified with -o, then wmc writes the output to inputfile.{rc,h}.
  • and if there was no inputfile given at all, the outputfile is named wmc.tab.{rc,h}. slay ✨

πŸŽ€ OPTIONS πŸŽ€

  • -c β€” set the 'custom-bit' in message-code values. cute little flag, does exactly what it says πŸ’…
  • -d β€” NON-FUNCTIONAL; the idea is "use decimal values in output". yeah. it doesn't do anything. we'll get into it in BUGS πŸ™ˆ
  • -D β€” set the debug flag. this gives you a parser trace plus a lot of extra messages. genuinely a lot. prepare yourself πŸ’€
  • -h, --help β€” print an informative usage message and then exits. bye bestie πŸ‘‹
  • -H file β€” write the headerfile to file. the default is inputfile.h.
  • -i β€” inline the messagetable(s). this option skips generating all .bin files and writes all the output into the .rc file instead. this encoding is parsable with wrc(1), so it plays nice 🌈
  • --nls-dir=directory β€” specify the directory to search for the **NLS files that hold the codepage mapping tables. go find those tables 🧚
  • *-o, --output=file* β€” output to file. the default is inputfile.rc.
  • *-O, --output-format=format* β€” set the output format. the supported formats are rc (this is the default), res, and pot. pick your vibe ⭐
  • -P, --po-dir=directory β€” turn on 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, plus a LINGUAS file listing the available languages. no LINGUAS, no translations, periodt πŸ’œ
  • -u β€” assume the input file is in Unicode or UTF-8 format and skip codepage conversions. living your truth unconverted ✨
  • -v β€” show all supported codepages and languages. a little show-and-tell πŸŽ€
  • -V, --version β€” print the version and exit. (the original page says "Print version end exit" β€” we know what she meant 🫢)
  • -W, --pedantic β€” enable pedantic warnings. she will find something to be pedantic about πŸ”₯

πŸ¦‹ EXTENSIONS πŸ¦‹

so the original syntax got extended to support codepages more smoothly. normally, codepages are based on the DOS codepage from the language setting. the original syntax only lets you set the destination codepage β€” but that's simply not enough for non-DOS systems that don't use unicode source-files. it's giving "not enough πŸ₯Ί".

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

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

breakdown, bestie:

  • 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.
  • there can be multiple mappings within the definition.
  • and the definition may occur more than once. go off πŸ‘‘

πŸ’œ AUTHORS πŸ’œ

wmc was written by Bertho A. Stultiens. legend behavior, no cap 🫑


😭 BUGS 😭

  • the message compiler should be able to have multiple input files and combine them into one output file. that would let you split languages into separate files. does it? no. (see the DESCRIPTION where it takes only one inputfile β€” that's why the parenthetical is there πŸ™ˆ)
  • decimal output is completely lacking. nobody knows whether it should even be implemented, because it's a, well, non-informative format change. -d is recognized on the commandline for some form of compatibility, and that's the whole story πŸ’€
  • bugs can be reported on the Wine bug tracker. please do, they want to hear from you πŸŽ€

🌈 AVAILABILITY 🌈

wmc is part of the Wine distribution, which is available through WineHQ β€” the Wine development headquarters. that's where the girlies are 🏰


⭐ SEE ALSO ⭐


and that's the whole page, bestie πŸ’– this one's from Wine 11.20, dated October 2005 β€” vintage, honestly. mwah, go compile something iconic πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from