winecfg: Free result in error nodes (Coverity).
[wine/multimedia.git] / tools / winemaker.man.in
blob7abffccc52199aba95235ebd095f774671265e9b
1 .TH WINEMAKER 1 "Jan 2012" "@PACKAGE_STRING@" "Wine Developers Manual"
2 .SH NAME
3 winemaker \- generate a build infrastructure for compiling Windows programs on Unix
4 .SH SYNOPSIS
5 .B "winemaker "
7 .BR               "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
9 .br
10   [
11 .BR               "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
13 .br
14   [
15 .BR               "--lower-include " "| " "--nolower-include " ]\ [ " --mfc " "| " "--nomfc "
17 .br
18   [
19 .BR               "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib "
21 .br
22   [
23 .BI               "-D" macro "\fR[=\fIdefn\fR] ] [" "\ " "-I" "dir\fR ]\ [ " "-P" "dir\fR ] [ " "-i" "dll\fR ] [ " "-L" "dir\fR ] [ " "-l" "library "
25 .br
26   [
27 .BR               "--nodlls " "] [ " "--nomsvcrt " "] [ " "--interactive " "] [ " "--single-target \fIname\fR "
29 .br
30   [
31 .BR               "--generated-files " "] [ " "--nogenerated-files " "]
33 .br
34   [
35 .BR               "--wine32 " "]
36 .br
37 .IR               "  work_directory" " | " "project_file" " | " "workspace_file"
39 .SH DESCRIPTION
40 .PP
41 .B winemaker
42 is a perl script designed to help you bootstrap the
43 process of converting your Windows sources to Winelib programs.
44 .PP
45 In order to do this winemaker can perform the following operations:
46 .PP
47 - rename your source files and directories to lowercase in the event they
48 got all uppercased during the transfer.
49 .PP
50 - perform DOS to Unix (CRLF to LF) conversions.
51 .PP
52 - scan the include statements and resource file references to replace the
53 backslashes with forward slashes.
54 .PP
55 - during the above step winemaker 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.
58 .PP
59 - winemaker will also check other more exotic issues like '#pragma pack'
60 usage, use of "afxres.h" in non MFC projects, and more. Whenever it
61 encounters something out of the ordinary, winemaker will warn you about it.
62 .PP
63 - winemaker 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 Makefile.
66 .PP
67 - finally winemaker will generate a global Makefile for normal use.
68 .PP
69 - winemaker knows about MFC-based project and will generate customized files.
70 .PP
71 - winemaker can read existing project files. It supports dsp, dsw, vcproj and sln files.
72 .PP
73 .SH OPTIONS
74 .TP
75 .B --nobanner
76 Disables the printing of the banner.
77 .TP
78 .B --backup
79 Directs winemaker to perform a backup of all the source files in which it
80 makes changes. This is the default.
81 .TP
82 .B --nobackup
83 Tells winemaker not to backup modified source files.
84 .TP
85 .B --nosource-fix
86 Directs winemaker not to try fixing the source files (e.g. DOS to Unix
87 conversion). This prevents complaints if the files are readonly.
88 .TP
89 .B --lower-all
90 Tells winemaker to rename all files and directories to lowercase.
91 .TP
92 .B --lower-uppercase
93 Tells winemaker to only rename files and directories that have an all
94 uppercase name.
95 So "HELLO.C" would be renamed but not "World.c".
96 .TP
97 .B --lower-none
98 Tells winemaker not to rename files and directories to lower case. Note
99 that this does not prevent the renaming of a file if its extension cannot
100 be handled as is, e.g. ".Cxx". This is the default.
102 .B "--lower-include "
103 Tells winemaker that if it does not find the file corresponding to an
104 include statement (or other form of file reference for resource files),
105 then it should convert that filename to lowercase. This is the default.
107 .B "--nolower-include "
108 Tells winemaker not to modify the include statement if it cannot find the
109 referenced file.
111 .BR "--guiexe " "| " "--windows"
112 Specifies that whenever winemaker finds an executable target, or a target of
113 unknown type, it should assume that it is a graphical application.
114 This is the default.
116 .BR "--cuiexe " "| " "--console"
117 Specifies that whenever winemaker finds an executable target, or a target of
118 unknown type, it should assume that it is a console application.
120 .B --dll
121 This option tells winemaker that whenever it finds a target of unknown type,
122 i.e. for which it does not know whether it is an executable, a dll, or a static library,
123 it should assume it is a dll.
125 .B --lib
126 This option tells winemaker that whenever it finds a target of unknown type,
127 i.e. for which it does not know whether it is an executable, a dll, or a static library,
128 it should assume it is a static library.
130 .B --mfc
131 Specifies that the targets are MFC based. In such a case winemaker adapts
132 the include and library paths accordingly, and links the target with the
133 MFC library.
135 .B --nomfc
136 Specifies that targets are not MFC-based. This option disables use of MFC libraries
137 even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it
138 to enable MFC automatically if neither \fB--nomfc\fR nor \fB--mfc\fR was specified.
140 .BI -D macro "\fR[=\fIdefn\fR]"
141 Adds the specified macro definition to the global list of macro definitions.
143 .BI -I dir
144 Appends the specified directory to the global include path.
146 .BI -P dir
147 Appends the specified directory to the global dll path.
149 .BI -i dll
150 Adds the Winelib library to the global list of Winelib libraries to import.
152 .BI -L dir
153 Appends the specified directory to the global library path.
155 .BI -l library
156 Adds the specified library to the global list of libraries to link with.
158 .B --nodlls
159 This option tells winemaker not to use the standard set of winelib libraries
160 for imports. That is, any DLL your code uses must be explicitly passed to
161 winemaker with \fB-i\fR options.
162 The standard set of libraries is: odbc32.dll, odbccp32.dll, ole32.dll,
163 oleaut32.dll and winspool.drv.
165 .B --nomsvcrt
166 Sets some options to tell winegcc not to compile against msvcrt.
167 Use this option if you have cpp-files that include <string>.
169 .B --interactive
170 Puts winemaker in interactive mode. In this mode winemaker will ask you to
171 confirm each directory's list of targets, and then to provide directory and
172 target specific options.
174 .BI --single-target " name"
175 Specifies that there is only one target, called \fIname\fR.
177 .B --generated-files
178 Tells winemaker to generate the Makefile. This is the default.
180 .B --nogenerated-files
181 Tells winemaker not to generate the Makefile.
183 .B --wine32
184 Tells winemaker to generate a 32-bit target. This is useful on wow64 systems.
185 Without that option the default architecture is used.
187 .SH EXAMPLES
189 Here is a typical winemaker use:
191 $ winemaker --lower-uppercase -DSTRICT .
193 The above tells winemaker to scan the current directory and its
194 subdirectories for source files. Whenever if finds a file or directory which
195 name is all uppercase, it should rename it to lowercase. It should then fix
196 all these source files for compilation with Winelib and generate Makefiles.
197 The '-DSTRICT' specifies that the STRICT macro must be set when compiling
198 these sources. Finally winemaker will create a Makefile.
200 The next step would be:
202 $ make
204 If at this point you get compilation errors (which is quite likely for a
205 reasonably sized project) then you should consult the Winelib User Guide to
206 find tips on how to resolve them.
208 For an MFC-based project you would have to run the following commands instead:
210 $ winemaker --lower-uppercase --mfc .
212 $ make
214 For an existing project-file you would have to run the following commands:
216 $ winemaker myproject.dsp
218 $ make
221 .SH TODO / BUGS
222 In some cases you will have to edit the Makefile or source files by yourself.
224 Assuming that the windows executable/library is available, we could
225 use winedump to determine what kind of executable it is (graphical
226 or console), which libraries it is linked with, and which functions it
227 exports (for libraries). We could then restore all these settings for the
228 corresponding Winelib target.
230 Furthermore winemaker is not very good at finding the library containing the
231 executable: it must either be in the current directory or in the
232 .IR LD_LIBRARY_PATH .
234 Winemaker does not support message files and the message compiler yet.
236 Bugs can be reported on the
237 .UR http://bugs.winehq.org
238 .B Wine bug tracker
239 .UE .
240 .SH AUTHORS
241 François Gouget for CodeWeavers
243 Dimitrie O. Paun
245 André Hentschel
246 .SH AVAILABILITY
247 .B winemaker
248 is part of the Wine distribution, which is available through WineHQ,
250 .UR http://www.winehq.org/
251 .B Wine development headquarters
252 .UE .
253 .SH SEE ALSO
254 .BR wine (1),
256 .UR http://www.winehq.org/help
257 .B Wine documentation and support
258 .UE .