2 .TH WINEMAKER 1 "Sep 2009" "@PACKAGE_STRING@" "Wine Developers Manual"
4 winemaker \- generate a build infrastructure for compiling Windows programs on Unix
8 .BR "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
12 .BR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
16 .BR "--lower-include " "| " "--nolower-include " ]\ [ " --mfc " "| " "--nomfc "
20 .BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll "
24 .BI "-D" macro "\fR[=\fIdefn\fR] ] [" "\ " "-I" "dir\fR ]\ [ " "-P" "dir\fR ] [ " "-i" "dll\fR ] [ " "-L" "dir\fR ] [ " "-l" "library "
28 .BR "--nodlls " "] [ " "--nomsvcrt " "] [ " "--interactive " "] [ " "--single-target \fIname\fR "
32 .BR "--generated-files " "] [ " "--nogenerated-files " "]
38 .IR " work_directory" " | " "project_file" " | " "workspace_file"
43 is a perl script designed to help you bootstrap the
44 process of converting your Windows sources to Winelib programs.
46 In order to do this winemaker can perform the following operations:
48 - rename your source files and directories to lowercase in the event they
49 got all uppercased during the transfer.
51 - perform Dos to Unix (CRLF to LF) conversions.
53 - scan the include statements and resource file references to replace the
54 backslashes with forward slashes.
56 - during the above step winemaker will also perform a case insensitive search
57 of the referenced file in the include path and rewrite the include statement
58 with the right case if necessary.
60 - winemaker will also check other more exotic issues like '#pragma pack'
61 usage, use of "afxres.h" in non MFC projects, and more. Whenever it
62 encounters something out of the ordinary, winemaker will warn you about it.
64 - winemaker can also scan a complete directory tree at once, guess what are
65 the executables and libraries you are trying to build, match them with
66 source files, and generate the corresponding Makefile.
68 - finally winemaker will generate a global Makefile for normal use.
70 - winemaker knows about MFC-based project and will generate customized files.
72 - winemaker can read existing project files. It supports dsp, dsw, vcproj and sln files.
77 Disables the printing of the banner.
80 Directs winemaker to perform a backup of all the source files in which it
81 makes changes. This is the default.
84 Tells winemaker not to backup modified source files.
87 Directs winemaker not to try fixing the source files (e.g. Dos to Unix
88 conversion). This prevents complaints if the files are readonly.
91 Tells winemaker to rename all files and directories to lowercase.
94 Tells winemaker to only rename files and directories that have an all
96 So "HELLO.C" would be renamed but not "World.c".
99 Tells winemaker not to rename files and directories to lower case. Note
100 that this does not prevent the renaming of a file if its extension cannot
101 be handled as is, e.g. ".Cxx". This is the default.
103 .B "--lower-include "
104 Tells winemaker that if it does not find the file corresponding to an
105 include statement (or other form of file reference for resource files),
106 then it should convert that filename to lowercase. This is the default.
108 .B "--nolower-include "
109 Tells winemaker not to modify the include statement if it cannot find the
112 .BR "--guiexe " "| " "--windows"
113 Specifies that whenever winemaker finds an executable target, or a target of
114 unknown type, it should assume that it is a graphical application.
117 .BR "--cuiexe " "| " "--console"
118 Specifies that whenever winemaker finds an executable target, or a target of
119 unknown type, it should assume that it is a console application.
122 This option tells winemaker that whenever it finds a target of unknown type,
123 i.e. for which it does not know whether it is an executable or a library,
124 it should assume it is a library.
127 Specifies that the targets are MFC based. In such a case winemaker adapts
128 the include and library paths accordingly, and links the target with the
132 Specifies that targets are not MFC-based. This option disables use of MFC libraries
133 even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it
134 to enable MFC automatically if neither --nomfc nor --mfc was specified.
136 .BI -D macro "\fR[=\fIdefn\fR]"
137 Adds the specified macro definition to the global list of macro definitions.
140 Appends the specified directory to the global include path.
143 Appends the specified directory to the global dll path.
146 Adds the Winelib library to the global list of Winelib libraries to import.
149 Appends the specified directory to the global library path.
152 Adds the specified library to the global list of libraries to link with.
155 This option tells winemaker not to use the standard set of winelib libraries
156 for imports. That is, any DLL your code uses must be explicitly passed to
157 winemaker with -i options.
158 The standard set of libraries is: odbc32.dll, odbccp32.dll, ole32.dll,
159 oleaut32.dll and winspool.drv.
162 Sets some options to tell winegcc not to compile against msvcrt.
163 Use this option if you have cpp-files that include <string>.
166 Puts winemaker in interactive mode. In this mode winemaker will ask you to
167 confirm each directory's list of targets, and then to provide directory and
168 target specific options.
170 .BR --single-target " name"
171 Specifies that there is only one target, and that it is called "name".
174 Tells winemaker to generate the Makefile. This is the default.
176 .B --nogenerated-files
177 Tells winemaker not to generate the Makefile.
180 Tells winemaker to generate a 32-bit target. This is useful on wow64 systems.
181 Without that option the default architecture is used.
185 Here is a typical winemaker use:
187 $ winemaker --lower-uppercase -DSTRICT .
189 The above tells winemaker to scan the current directory and its
190 subdirectories for source files. Whenever if finds a file or directory which
191 name is all uppercase, it should rename it to lowercase. It should then fix
192 all these source files for compilation with Winelib and generate Makefiles.
193 The '-DSTRICT' specifies that the STRICT macro must be set when compiling
194 these sources. Finally winemaker will create a Makefile.
196 The next step would be:
200 If at this point you get compilation errors (which is quite likely for a
201 reasonably sized project) then you should consult the Winelib User Guide to
202 find tips on how to resolve them.
204 For an MFC-based project you would have to run the following commands instead:
206 $ winemaker --lower-uppercase --mfc .
210 For an existing project-file you would have to run the following commands:
212 $ winemaker myproject.dsp
219 In some cases you will have to edit the Makefile or source files by yourself.
221 Assuming that the windows executable/library is available, we could
222 use winedump to determine what kind of executable it is (graphical
223 or console), which libraries it is linked with, and which functions it
224 exports (for libraries). We could then restore all these settings for the
225 corresponding Winelib target.
227 Furthermore winemaker is not very good at finding the library containing the
228 executable: it must either be in the current directory or in the
229 .IR LD_LIBRARY_PATH .
231 Winemaker does not support message files and the message compiler yet.
236 The Winelib User Guide:
238 http://www.winehq.org/docs/winelib-guide/index
244 François Gouget for CodeWeavers