gdi32/tests: Fix a test failure on NT4.
[wine/hacks.git] / tools / winemaker.man.in
blobe8afb2d73a516e9e75db63cca7fe40f651703dd3
1 .\" -*- nroff -*-
2 .TH WINEMAKER 1 "February 2009" "@PACKAGE_STRING@" "Wine Developers Manual"
3 .SH NAME
4 winemaker \- generate a build infrastructure for compiling Windows programs on Unix
5 .SH SYNOPSIS
6 .B "winemaker "
8 .IR               "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
10 .br
11   [
12 .IR               "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
14 .br
15   [
16 .IR               "--lower-include " "| " "--nolower-include " ] [ " "--mfc " "| " "--nomfc "
18 .br
19   [
20 .IR               "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--nodlls "
22 .br
23   [
24 .IR               "-Dmacro[=defn] " "] [ " "-Idir " "] [ " "-Pdir " "] [ " "-idll" "] [ " "-Ldir " "] [ " "-llibrary "
26 .br
27   [
28 .IR               "--interactive " "] [ " "--single-target name "
30 .br
31   [
32 .IR               "--generated-files " "] [ " "--nogenerated-files " "] 
33 .br
34 .IR               "work_directory" "| " "project_file" "| " "workspace_file"
36 .SH DESCRIPTION
37 .PP
38 .B winemaker
39 is a perl script designed to help you bootstrap the
40 process of converting your Windows sources to Winelib programs.
41 .PP
42 In order to do this winemaker can perform the following operations:
43 .PP
44 - rename your source files and directories to lowercase in the event they
45 got all uppercased during the transfer.
46 .PP
47 - perform Dos to Unix (CRLF to LF) conversions.
48 .PP
49 - scan the include statements and resource file references to replace the
50 backslashes with forward slashes.
51 .PP
52 - during the above step winemaker will also perform a case insensitive search
53 of the referenced file in the include path and rewrite the include statement
54 with the right case if necessary.
55 .PP
56 - winemaker will also check other more exotic issues like '#pragma pack'
57 usage, use of "afxres.h" in non MFC projects, and more. Whenever it
58 encounters something out of the ordinary, winemaker will warn you about it.
59 .PP
60 - winemaker can also scan a complete directory tree at once, guess what are
61 the executables and libraries you are trying to build, match them with
62 source files, and generate the corresponding Makefile.in files.
63 .PP
64 - finally winemaker will generate a global Makefile for normal use.
65 .PP
66 - winemaker knows about MFC-based project and will generate customized files.
67 .PP
68 - winemaker can read existing Projectfiles. It supports dsp, dsw, vcproj and sln files.
69 .PP
70 .SH OPTIONS
71 .TP
72 .I --nobanner
73 Disables the printing of the banner.
74 .TP
75 .I --backup
76 Directs winemaker to perform a backup of all the source files in which it
77 makes changes. This is the default.
78 .TP
79 .I --nobackup
80 Tells winemaker not to backup modified source files.
81 .TP
82 .I --nosource-fix
83 Directs winemaker not to try fixing the source files (e.g. Dos to Unix
84 conversion). This prevents complaints if the files are readonly.
85 .TP
86 .I --lower-all
87 Tells winemaker to rename all files and directories to lowercase.
88 .TP
89 .I --lower-uppercase
90 Tells winemaker to only rename files and directories that have an all
91 uppercase name.
92 So "HELLO.C" would be renamed but not "World.c".
93 .TP
94 .I --lower-none
95 Tells winemaker not to 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.
98 .TP
99 .I "--lower-include "
100 Tells winemaker that if it does not find the file corresponding to an
101 include statement (or other form of file reference for resource files),
102 then it should convert that filename to lowercase. This is the default.
104 .I "--nolower-include "
105 Tells winemaker not to modify the include statement if it cannot find the
106 referenced file.
108 .IR "--guiexe " "| " "--windows"
109 Specifies that whenever winemaker finds an executable target, or a target of
110 unknown type, it should assume that it is a graphical application.
111 This is the default.
113 .IR "--cuiexe " "| " "--console"
114 Specifies that whenever winemaker finds an executable target, or a target of
115 unknown type, it should assume that it is a console application.
117 .I --dll
118 This option tells winemaker that whenever it finds a target of unknown type,
119 i.e. for which it does not know whether it is an executable or a library,
120 it should assume it is a library.
122 .I --nodlls
123 This option tells winemaker not to use the standard set of winelib libraries
124 for imports. That is, any DLL your code uses must be explicitly passed to
125 winemaker with -i options.
126 The standard set of libraries is: advapi32.dll, comdlg32.dll, gdi32.dll,
127 kernel32.dll, odbc32.dll, ole32.dll, oleaut32.dll, shell32.dll, user32.dll,
128 winspool.drv.
130 .I --mfc
131 Specifies that the targets are MFC based. In such a case winemaker the include 
132 and library paths accordingly, and links the target with the MFC library.
134 .I --nomfc
135 Specifies that targets are not MFC-based. This option disables use of MFC libraries
136 even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it
137 to enable MFC automatically if neither --nomfc nor --mfc was specified.
139 .I -Dmacro[=defn]
140 Adds the specified macro definition to the global list of macro definitions.
142 .I -Idir
143 Appends the specified directory to the global include path.
145 .I -Pdir
146 Appends the specified directory to the global dll path.
148 .I -idll
149 Adds the Winelib library to the global list of Winelib libraries to import.
151 .I -Ldir
152 Appends the specified directory to the global library path.
154 .I -llibrary
155 Adds the specified library to the global list of libraries to link with.
157 .I --interactive
158 Puts winemaker in interactive mode. In this mode winemaker will ask you to
159 confirm each directory's list of targets, and then to provide directory and
160 target specific options.
162 .I --single-target name
163 Specifies that there is only one target, and that it is called "name".
165 .I --generated-files
166 Tells winemaker to generate the build the Makefile. This is the default.
168 .I --nogenerated-files
169 Tells winemaker not to generate the Makefile.
171 .SH EXAMPLES
173 Here is a typical winemaker use:
175 $ winemaker --lower-uppercase -DSTRICT .
177 The above tells winemaker to scan the current directory and its
178 subdirectories for source files. Whenever if finds a file or directory which
179 name is all uppercase, it should rename it to lowercase. It should then fix
180 all these source files for compilation with Winelib and generate Makefiles.
181 The '-DSTRICT' specifies that the STRICT macro must be set when compiling
182 these sources. Finally winemaker will create a Makefile.
184 The next step would be:
186 $ make
188 If at this point you get compilation errors (which is quite likely for a
189 reasonably sized project) then you should consult the Winelib User Guide to
190 find tips on how to resolve them.
192 For an MFC-based project you would have to run the following commands instead:
194 $ winemaker --lower-uppercase --mfc .
196 $ make
198 For an existing project-file you would have to run the following commands:
200 $ winemaker --lower-all myproject.dsp
202 $ make
205 .SH TODO / BUGS
207 In some cases you will have to edit the Makefile or sourcefiles by yourself.
209 Assuming that the windows executable/library is available, we could
210 use a pedump-like tool to determine what kind of executable it is (graphical
211 or console), which libraries it is linked with, and which functions it
212 exports (for libraries). We could then restore all these settings for the
213 corresponding Winelib target. The problem is that we should have such a tool
214 available under the Wine license first.
216 Furthermore it is not very good at finding the library containing the
217 executable: it must either be in the current directory or in the
218 .IR LD_LIBRARY_PATH .
220 Winemaker does not support message files and the message compiler yet.
223 .SH SEE ALSO
225 The Winelib User Guide:
227 http://www.winehq.org/docs/winelib-guide/index
229 .BR wine (1)
232 .SH AUTHOR
233 Francois Gouget <fgouget@codeweavers.com> for CodeWeavers