1 .TH WINEMAKER 1 "Jan 2012" "@PACKAGE_STRING@" "Wine Developers Manual"
3 winemaker \- generate a build infrastructure for compiling Windows programs on Unix
7 .BR "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
11 .BR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
15 .BR "--lower-include " "| " "--nolower-include " ]\ [ " --mfc " "| " "--nomfc "
19 .BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib "
23 .BI "-D" macro "\fR[=\fIdefn\fR] ] [" "\ " "-I" "dir\fR ]\ [ " "-P" "dir\fR ] [ " "-i" "dll\fR ] [ " "-L" "dir\fR ] [ " "-l" "library "
27 .BR "--nodlls " "] [ " "--nomsvcrt " "] [ " "--interactive " "] [ " "--single-target \fIname\fR "
31 .BR "--generated-files " "] [ " "--nogenerated-files " "]
36 .IR " work_directory" " | " "project_file" " | " "workspace_file"
41 is a perl script designed to help you bootstrap the
42 process of converting your Windows sources to Winelib programs.
44 In order to do this \fBwinemaker\fR can perform the following operations:
46 - rename your source files and directories to lowercase in the event they
47 got all uppercased during the transfer.
49 - perform DOS to Unix (CRLF to LF) conversions.
51 - scan the include statements and resource file references to replace the
52 backslashes with forward slashes.
54 - during the above step \fBwinemaker\fR will also perform a case insensitive search
55 of the referenced file in the include path and rewrite the include statement
56 with the right case if necessary.
58 - \fBwinemaker\fR will also check other more exotic issues like \fI#pragma pack\fR
59 usage, use of \fIafxres.h\fR in non MFC projects, and more. Whenever it
60 encounters something out of the ordinary, it will warn you about it.
62 - \fBwinemaker\fR can also scan a complete directory tree at once, guess what are
63 the executables and libraries you are trying to build, match them with
64 source files, and generate the corresponding \fIMakefile\fR.
66 - finally \fBwinemaker\fR will generate a global \fIMakefile\fR for normal use.
68 - \fBwinemaker\fR knows about MFC-based project and will generate customized files.
70 - \fBwinemaker\fR can read existing project files. It supports dsp, dsw, vcproj and sln files.
75 Disable the printing of the banner.
78 Perform a backup of all the modified source files. This is the default.
81 Do not backup modified source files.
84 Do no try to fix the source files (e.g. DOS to Unix
85 conversion). This prevents complaints if the files are readonly.
88 Rename all files and directories to lowercase.
91 Only rename files and directories that have an all uppercase name.
92 So \fIHELLO.C\fR would be renamed but not \fIWorld.c\fR.
95 Do not rename files and directories to lower case. Note
96 that this does not prevent the renaming of a file if its extension cannot
97 be handled as is, e.g. ".Cxx". This is the default.
100 When the file corresponding to an include statement (or other form of file reference
101 for resource files) cannot be found, convert that filename to lowercase. This is the default.
104 Do not modify the include statement if the referenced file cannot be found.
106 .BR "--guiexe " "| " "--windows"
107 Assume a graphical application when an executable target or a target of
108 unknown type is found. This is the default.
110 .BR "--cuiexe " "| " "--console"
111 Assume a console application when an executable target or a target of
112 unknown type is found.
115 Assume a dll when a target of unknown type is found, i.e. when \fBwinemaker\fR is unable to
116 determine whether it is an executable, a dll, or a static library,
119 Assume a static library when a target of unknown type is found, i.e. when \fBwinemaker\fR is
120 unable to determine whether it is an executable, a dll, or a static library,
123 Specify that the targets are MFC based. In such a case \fBwinemaker\fR adapts
124 the include and library paths accordingly, and links the target with the
128 Specify that targets are not MFC-based. This option disables use of MFC libraries
129 even if \fBwinemaker\fR encounters files \fIstdafx.cpp\fR or \fIstdafx.h\fR that would cause it
130 to enable MFC automatically if neither \fB--nomfc\fR nor \fB--mfc\fR was specified.
132 .BI -D macro "\fR[\fB=\fIdefn\fR]"
133 Add the specified macro definition to the global list of macro definitions.
136 Append the specified directory to the global include path.
139 Append the specified directory to the global dll path.
142 Add the Winelib library to the global list of Winelib libraries to import.
145 Append the specified directory to the global library path.
148 Add the specified library to the global list of libraries to link with.
151 Do not use the standard set of Winelib libraries for imports.
152 That is, any DLL your code uses must be explicitly passed with \fB-i\fR options.
153 The standard set of libraries is: \fIodbc32.dll\fR, \fIodbccp32.dll\fR, \fIole32.dll\fR,
154 \fIoleaut32.dll\fR and \fIwinspool.drv\fR.
157 Set some options to tell \fBwinegcc\fR not to compile against msvcrt.
158 Use this option if you have cpp-files that include \fI<string>\fR.
161 Use interactive mode. In this mode \fBwinemaker\fR will ask you to
162 confirm the list of targets for each directory, and then to provide directory and
163 target specific options.
165 .BI --single-target " name"
166 Specify that there is only one target, called \fIname\fR.
169 Generate the \fIMakefile\fR. This is the default.
171 .B --nogenerated-files
172 Do not generate the \fIMakefile\fR.
175 Generate a 32-bit target. This is useful on wow64 systems.
176 Without that option the default architecture is used.
180 Here is a typical \fBwinemaker\fR use:
182 $ winemaker --lower-uppercase -DSTRICT .
184 The above tells \fBwinemaker\fR to scan the current directory and its
185 subdirectories for source files. Whenever if finds a file or directory which
186 name is all uppercase, it should rename it to lowercase. It should then fix
187 all these source files for compilation with Winelib and generate \fIMakefile\fRs.
188 The \fB-DSTRICT\fR specifies that the \fBSTRICT\fR macro must be set when compiling
189 these sources. Finally a \fIMakefile\fR will be created.
191 The next step would be:
195 If at this point you get compilation errors (which is quite likely for a
196 reasonably sized project) then you should consult the Winelib User Guide to
197 find tips on how to resolve them.
199 For an MFC-based project you would have to run the following commands instead:
201 $ winemaker --lower-uppercase --mfc .
205 For an existing project-file you would have to run the following commands:
207 $ winemaker myproject.dsp
213 In some cases you will have to edit the \fIMakefile\fR or source files manually.
215 Assuming that the windows executable/library is available, we could
216 use \fBwinedump\fR to determine what kind of executable it is (graphical
217 or console), which libraries it is linked with, and which functions it
218 exports (for libraries). We could then restore all these settings for the
219 corresponding Winelib target.
221 Furthermore \fBwinemaker\fR is not very good at finding the library containing the
222 executable: it must either be in the current directory or in the
223 .BR LD_LIBRARY_PATH .
225 \fBwinemaker\fR does not support message files and the message compiler yet.
227 Bugs can be reported on the
228 .UR https://bugs.winehq.org
232 François Gouget for CodeWeavers
239 is part of the Wine distribution, which is available through WineHQ,
241 .UR https://www.winehq.org/
242 .B Wine development headquarters
247 .UR https://www.winehq.org/help
248 .B Wine documentation and support