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 " "]
37 .IR " work_directory" " | " "project_file" " | " "workspace_file"
42 is a perl script designed to help you bootstrap the
43 process of converting your Windows sources to Winelib programs.
45 In order to do this \fBwinemaker\fR can perform the following operations:
47 - rename your source files and directories to lowercase in the event they
48 got all uppercased during the transfer.
50 - perform DOS to Unix (CRLF to LF) conversions.
52 - scan the include statements and resource file references to replace the
53 backslashes with forward slashes.
55 - during the above step \fBwinemaker\fR will also perform a case insensitive search
56 of the referenced file in the include path and rewrite the include statement
57 with the right case if necessary.
59 - \fBwinemaker\fR will also check other more exotic issues like \fI#pragma pack\fR
60 usage, use of \fIafxres.h\fR in non MFC projects, and more. Whenever it
61 encounters something out of the ordinary, it will warn you about it.
63 - \fBwinemaker\fR can also scan a complete directory tree at once, guess what are
64 the executables and libraries you are trying to build, match them with
65 source files, and generate the corresponding \fIMakefile\fR.
67 - finally \fBwinemaker\fR will generate a global \fIMakefile\fR for normal use.
69 - \fBwinemaker\fR knows about MFC-based project and will generate customized files.
71 - \fBwinemaker\fR can read existing project files. It supports dsp, dsw, vcproj and sln files.
76 Disable the printing of the banner.
79 Perform a backup of all the modified source files. This is the default.
82 Do not backup modified source files.
85 Do no try to fix the source files (e.g. DOS to Unix
86 conversion). This prevents complaints if the files are readonly.
89 Rename all files and directories to lowercase.
92 Only rename files and directories that have an all uppercase name.
93 So \fIHELLO.C\fR would be renamed but not \fIWorld.c\fR.
96 Do not rename files and directories to lower case. Note
97 that this does not prevent the renaming of a file if its extension cannot
98 be handled as is, e.g. ".Cxx". This is the default.
101 When the file corresponding to an include statement (or other form of file reference
102 for resource files) cannot be found, convert that filename to lowercase. This is the default.
105 Do not modify the include statement if the referenced file cannot be found.
107 .BR "--guiexe " "| " "--windows"
108 Assume a graphical application when an executable target or a target of
109 unknown type is found. This is the default.
111 .BR "--cuiexe " "| " "--console"
112 Assume a console application when an executable target or a target of
113 unknown type is found.
116 Assume a dll when a target of unknown type is found, i.e. when \fBwinemaker\fR is unable to
117 determine whether it is an executable, a dll, or a static library,
120 Assume a static library when a target of unknown type is found, i.e. when \fBwinemaker\fR is
121 unable to determine whether it is an executable, a dll, or a static library,
124 Specify that the targets are MFC based. In such a case \fBwinemaker\fR adapts
125 the include and library paths accordingly, and links the target with the
129 Specify that targets are not MFC-based. This option disables use of MFC libraries
130 even if \fBwinemaker\fR encounters files \fIstdafx.cpp\fR or \fIstdafx.h\fR that would cause it
131 to enable MFC automatically if neither \fB--nomfc\fR nor \fB--mfc\fR was specified.
133 .BI -D macro "\fR[\fB=\fIdefn\fR]"
134 Add the specified macro definition to the global list of macro definitions.
137 Append the specified directory to the global include path.
140 Append the specified directory to the global dll path.
143 Add the Winelib library to the global list of Winelib libraries to import.
146 Append the specified directory to the global library path.
149 Add the specified library to the global list of libraries to link with.
152 Do not use the standard set of Winelib libraries for imports.
153 That is, any DLL your code uses must be explicitly passed with \fB-i\fR options.
154 The standard set of libraries is: \fIodbc32.dll\fR, \fIodbccp32.dll\fR, \fIole32.dll\fR,
155 \fIoleaut32.dll\fR and \fIwinspool.drv\fR.
158 Set some options to tell \fBwinegcc\fR not to compile against msvcrt.
159 Use this option if you have cpp-files that include \fI<string>\fR.
162 Use interactive mode. In this mode \fBwinemaker\fR will ask you to
163 confirm the list of targets for each directory, and then to provide directory and
164 target specific options.
166 .BI --single-target " name"
167 Specify that there is only one target, called \fIname\fR.
170 Generate the \fIMakefile\fR. This is the default.
172 .B --nogenerated-files
173 Do not generate the \fIMakefile\fR.
176 Generate a 32-bit target. This is useful on wow64 systems.
177 Without that option the default architecture is used.
181 Here is a typical \fBwinemaker\fR use:
183 $ winemaker --lower-uppercase -DSTRICT .
185 The above tells \fBwinemaker\fR to scan the current directory and its
186 subdirectories for source files. Whenever if finds a file or directory which
187 name is all uppercase, it should rename it to lowercase. It should then fix
188 all these source files for compilation with Winelib and generate \fIMakefile\fRs.
189 The \fB-DSTRICT\fR specifies that the \fBSTRICT\fR macro must be set when compiling
190 these sources. Finally a \fIMakefile\fR will be created.
192 The next step would be:
196 If at this point you get compilation errors (which is quite likely for a
197 reasonably sized project) then you should consult the Winelib User Guide to
198 find tips on how to resolve them.
200 For an MFC-based project you would have to run the following commands instead:
202 $ winemaker --lower-uppercase --mfc .
206 For an existing project-file you would have to run the following commands:
208 $ winemaker myproject.dsp
214 In some cases you will have to edit the \fIMakefile\fR or source files manually.
216 Assuming that the windows executable/library is available, we could
217 use \fBwinedump\fR to determine what kind of executable it is (graphical
218 or console), which libraries it is linked with, and which functions it
219 exports (for libraries). We could then restore all these settings for the
220 corresponding Winelib target.
222 Furthermore \fBwinemaker\fR is not very good at finding the library containing the
223 executable: it must either be in the current directory or in the
224 .BR LD_LIBRARY_PATH .
226 \fBwinemaker\fR does not support message files and the message compiler yet.
228 Bugs can be reported on the
229 .UR http://bugs.winehq.org
233 François Gouget for CodeWeavers
240 is part of the Wine distribution, which is available through WineHQ,
242 .UR http://www.winehq.org/
243 .B Wine development headquarters
248 .UR http://www.winehq.org/help
249 .B Wine documentation and support