WINEMAKER(1)

πŸ’– WINEMAKER πŸ’–

okay bestie, pull up a chair, we're doing winemaker β€” that's section 1 of the Wine Developers Manual, and it is literally the glow-up machine for your dusty Windows code. no cap. 🧚✨


✨ NAME ✨

winemaker β€” she generates a build infrastructure for compiling Windows programs on Unix. she's the friend who shows up with a label maker and a plan. πŸŽ€


🌸 SYNOPSIS 🌸

winemaker [ --nobanner ] [ --backup | --nobackup ] [ --nosource-fix ]
  [ --lower-none | --lower-all | --lower-uppercase ]
  [ --lower-include | --nolower-include ] [ --mfc | --nomfc ]
  [ --guiexe | --windows | --cuiexe | --console | --dll | --lib ]
  [ -Dmacro[=defn] ] [ -Idir ] [ -Pdir ] [ -idll ] [ -Ldir ] [ -llibrary
]
  [ --nodlls ] [ --nomsvcrt ] [ --interactive ] [ --single-target name ]
  [ --generated-files ] [ --nogenerated-files ]
  [ --wine32 ]
  work_directory | project_file | workspace_file

πŸ¦‹ DESCRIPTION πŸ¦‹

so winemaker is a perl script, and her whole job β€” her main character era, if you will β€” is helping you bootstrap the process of converting your Windows sources into Winelib programs. she's giving project manager. she's giving "I already did it while you were typing." πŸ’…

here's what she can do for you, bestie:

  • rename your source files and directories to lowercase, in the event they got all uppercased during the transfer. (we don't talk about the transfer.)
  • perform DOS to Unix (CRLF to LF) conversions.
  • scan the include statements and resource file references to replace the backslashes with forward slashes. slay.
  • during the above step, she'll also do a case insensitive search of the referenced file in the include path, and rewrite the include statement with the right case if necessary. the way she catches that 😭
  • she'll also check other more exotic issues like #pragma pack usage, use of afxres.h in non MFC projects, and more. whenever she encounters something out of the ordinary, she will warn you about it. she's not being shady, she's being helpful.
  • she can also scan a complete directory tree at once, guess what are the executables and libraries you are trying to build, match them with source files, and generate the corresponding Makefile. icon.
  • finally, she'll generate a global Makefile for normal use. periodt.
  • she knows about MFC-based projects and will generate customized files. queen behavior πŸ‘‘
  • and she can read existing project files. she supports dsp, dsw, vcproj and sln files. she's multilingual, actually. 🌈

πŸ’… OPTIONS πŸ’…

  • --nobanner β€” disables the printing of the banner. no intro, straight to business.
  • --backup β€” perform a backup of all the modified source files. this is the default, because she's responsible like that. πŸ’–
  • --nobackup β€” do not backup modified source files. living dangerously, ig. πŸ’€
  • --nosource-fix β€” do no try to fix the source files (e.g. DOS to Unix conversion). this prevents complaints if the files are readonly.
  • --lower-all β€” rename all files and directories to lowercase. everything. lowercase everything. 🌸
  • --lower-uppercase β€” only rename files and directories that have an all uppercase name. so HELLO.C would be renamed but not World.c. selective, and honestly valid.
  • --lower-none β€” do not rename files and directories to lower case. note that this does not prevent the renaming of a file if its extension cannot be handled as is, e.g. .Cxx. this is the default.
  • --lower-include β€” when the file corresponding to an include statement (or other form of file reference for resource files) cannot be found, convert that filename to lowercase. this is the default.
  • --nolower-include β€” do not modify the include statement if the referenced file cannot be found. leave it alone, she's not touching it.
  • --guiexe | --windows β€” assume a graphical application when an executable target or a target of unknown type is found. this is the default. πŸŽ€
  • --cuiexe | --console β€” assume a console application when an executable target or a target of unknown type is found.
  • --dll β€” assume a dll when a target of unknown type is found, i.e. when winemaker is unable to determine whether it is an executable, a dll, or a static library,
  • --lib β€” assume a static library when a target of unknown type is found, i.e. when winemaker is unable to determine whether it is an executable, a dll, or a static library,
  • --mfc β€” specify that the targets are MFC based. in such a case winemaker adapts the include and library paths accordingly, and links the target with the MFC library.
  • --nomfc β€” specify that targets are not MFC-based. this option disables use of MFC libraries even if winemaker encounters files stdafx.cpp or stdafx.h that would cause it to enable MFC automatically if neither --nomfc nor --mfc was specified. boundary setting, we love to see it.
  • -Dmacro[=defn] β€” add the specified macro definition to the global list of macro definitions.
  • -Idir β€” append the specified directory to the global include path.
  • -Pdir β€” append the specified directory to the global dll path.
  • -idll β€” add the Winelib library to the global list of Winelib libraries to import.
  • -Ldir β€” append the specified directory to the global library path.
  • -llibrary β€” add the specified library to the global list of libraries to link with.
  • --nodlls β€” do not use the standard set of Winelib libraries for imports. that is, any DLL your code uses must be explicitly passed with -i options. the standard set of libraries is: odbc32.dll, odbccp32.dll, ole32.dll, oleaut32.dll and winspool.drv.
  • --nomsvcrt β€” set some options to tell winegcc not to compile against msvcrt. use this option if you have cpp-files that include <string>.
  • --interactive β€” use interactive mode. in this mode winemaker will ask you to confirm the list of targets for each directory, and then to provide directory and target specific options. she will text you back, basically. 🫢
  • --single-target name β€” specify that there is only one target, called name.
  • --generated-files β€” generate the Makefile. this is the default.
  • --nogenerated-files β€” do not generate the Makefile.
  • --wine32 β€” generate a 32-bit target. this is useful on wow64 systems. without that option the default architecture is used.

🌟 EXAMPLES 🌟

here's a typical winemaker use:

$ winemaker --lower-uppercase -DSTRICT .

the above tells winemaker to scan the current directory and its subdirectories for source files. whenever if finds a file or directory which name is all uppercase, it should rename it to lowercase. it should then fix all these source files for compilation with Winelib and generate Makefiles. the -DSTRICT specifies that the STRICT macro must be set when compiling these sources. finally a Makefile will be created.

the next step would be:

$ make

if at this point you get compilation errors (which is quite likely for a reasonably sized project, no shade) then you should consult the Winelib User Guide to find tips on how to resolve them.

for an MFC-based project you would have to run the following commands instead:

$ winemaker --lower-uppercase --mfc .
$ make

for an existing project-file you would have to run the following commands:

$ winemaker myproject.dsp
$ make

😭 TODO / BUGS 😭

in some cases you will have to edit the Makefile or source files manually. it's not you, it's the codebase.

assuming that the windows executable/library is available, we could use winedump to determine what kind of executable it is (graphical or console), which libraries it is linked with, and which functions it exports (for libraries). we could then restore all these settings for the corresponding Winelib target. one day. πŸ¦‹

furthermore winemaker is not very good at finding the library containing the executable: it must either be in the current directory or in the LD_LIBRARY_PATH.

winemaker does not support message files and the message compiler yet.

bugs can be reported on the Wine bug tracker.


πŸ‘‘ AUTHORS πŸ‘‘

  • FranΓ§ois Gouget for CodeWeavers
  • Dimitrie O. Paun
  • AndrΓ© Hentschel

🌈 AVAILABILITY 🌈

winemaker 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 β€” no crumbs left. πŸ“ this was Wine 11.20, dated Jan 2012, and yeah, she's a vintage. πŸ’…βœ¨

πŸ“¦ where this page comes from