winemaker.man.in 8.21 KB
Newer Older
1
.\" -*- nroff -*-
2
.TH WINEMAKER 1 "Jan 2012" "@PACKAGE_STRING@" "Wine Developers Manual"
3 4 5 6 7
.SH NAME
winemaker \- generate a build infrastructure for compiling Windows programs on Unix
.SH SYNOPSIS
.B "winemaker "
[
8
.BR               "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
9 10 11
]
.br
  [
12
.BR               "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
13
]
14 15
.br
  [
16
.BR               "--lower-include " "| " "--nolower-include " ]\ [ " --mfc " "| " "--nomfc "
17
]
18 19
.br
  [
20
.BR               "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib "
21 22 23
]
.br
  [
24
.BI               "-D" macro "\fR[=\fIdefn\fR] ] [" "\ " "-I" "dir\fR ]\ [ " "-P" "dir\fR ] [ " "-i" "dll\fR ] [ " "-L" "dir\fR ] [ " "-l" "library "
25 26 27
]
.br
  [
28
.BR               "--nodlls " "] [ " "--nomsvcrt " "] [ " "--interactive " "] [ " "--single-target \fIname\fR "
29
]
30 31
.br
  [
32
.BR               "--generated-files " "] [ " "--nogenerated-files " "]
33 34 35
]
.br
  [
36
.BR               "--wine32 " "]
37
.br
38
.IR               "  work_directory" " | " "project_file" " | " "workspace_file"
39 40 41 42

.SH DESCRIPTION
.PP
.B winemaker
43
is a perl script designed to help you bootstrap the
Francois Gouget's avatar
Francois Gouget committed
44
process of converting your Windows sources to Winelib programs.
45 46 47
.PP
In order to do this winemaker can perform the following operations:
.PP
48
- rename your source files and directories to lowercase in the event they
49 50 51 52
got all uppercased during the transfer.
.PP
- perform Dos to Unix (CRLF to LF) conversions.
.PP
53
- scan the include statements and resource file references to replace the
54 55
backslashes with forward slashes.
.PP
56 57
- during the above step winemaker will also perform a case insensitive search
of the referenced file in the include path and rewrite the include statement
58 59
with the right case if necessary.
.PP
60 61
- winemaker will also check other more exotic issues like '#pragma pack'
usage, use of "afxres.h" in non MFC projects, and more. Whenever it
62 63
encounters something out of the ordinary, winemaker will warn you about it.
.PP
64 65
- winemaker can also scan a complete directory tree at once, guess what are
the executables and libraries you are trying to build, match them with
66
source files, and generate the corresponding Makefile.
67
.PP
68
- finally winemaker will generate a global Makefile for normal use.
69 70 71
.PP
- winemaker knows about MFC-based project and will generate customized files.
.PP
72
- winemaker can read existing project files. It supports dsp, dsw, vcproj and sln files.
73
.PP
74 75
.SH OPTIONS
.TP
76
.B --nobanner
77 78
Disables the printing of the banner.
.TP
79
.B --backup
80
Directs winemaker to perform a backup of all the source files in which it
81 82
makes changes. This is the default.
.TP
83
.B --nobackup
84 85
Tells winemaker not to backup modified source files.
.TP
86
.B --nosource-fix
87 88 89
Directs winemaker not to try fixing the source files (e.g. Dos to Unix
conversion). This prevents complaints if the files are readonly.
.TP
90
.B --lower-all
91 92
Tells winemaker to rename all files and directories to lowercase.
.TP
93
.B --lower-uppercase
94 95
Tells winemaker to only rename files and directories that have an all
uppercase name.
96 97
So "HELLO.C" would be renamed but not "World.c".
.TP
98
.B --lower-none
99 100
Tells winemaker not to rename files and directories to lower case. Note
that this does not prevent the renaming of a file if its extension cannot
101 102
be handled as is, e.g. ".Cxx". This is the default.
.TP
103
.B "--lower-include "
104 105
Tells winemaker that if it does not find the file corresponding to an
include statement (or other form of file reference for resource files),
106 107
then it should convert that filename to lowercase. This is the default.
.TP
108
.B "--nolower-include "
109
Tells winemaker not to modify the include statement if it cannot find the
110 111
referenced file.
.TP
112
.BR "--guiexe " "| " "--windows"
113
Specifies that whenever winemaker finds an executable target, or a target of
114 115 116
unknown type, it should assume that it is a graphical application.
This is the default.
.TP
117
.BR "--cuiexe " "| " "--console"
118
Specifies that whenever winemaker finds an executable target, or a target of
119 120
unknown type, it should assume that it is a console application.
.TP
121
.B --dll
122
This option tells winemaker that whenever it finds a target of unknown type,
123 124 125 126 127 128 129
i.e. for which it does not know whether it is an executable, a dll, or a static library,
it should assume it is a dll.
.TP
.B --lib
This option tells winemaker that whenever it finds a target of unknown type,
i.e. for which it does not know whether it is an executable, a dll, or a static library,
it should assume it is a static library.
130
.TP
131
.B --mfc
132 133 134
Specifies that the targets are MFC based. In such a case winemaker adapts
the include and library paths accordingly, and links the target with the
MFC library.
135
.TP
136
.B --nomfc
137 138 139
Specifies that targets are not MFC-based. This option disables use of MFC libraries
even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it
to enable MFC automatically if neither --nomfc nor --mfc was specified.
140
.TP
141
.BI -D macro "\fR[=\fIdefn\fR]"
142
Adds the specified macro definition to the global list of macro definitions.
143
.TP
144
.BI -I dir
145 146
Appends the specified directory to the global include path.
.TP
147
.BI -P dir
148
Appends the specified directory to the global dll path.
149
.TP
150
.BI -i dll
151
Adds the Winelib library to the global list of Winelib libraries to import.
152
.TP
153
.BI -L dir
154 155
Appends the specified directory to the global library path.
.TP
156
.BI -l library
157 158
Adds the specified library to the global list of libraries to link with.
.TP
159
.B --nodlls
160 161 162 163 164 165
This option tells winemaker not to use the standard set of winelib libraries
for imports. That is, any DLL your code uses must be explicitly passed to
winemaker with -i options.
The standard set of libraries is: odbc32.dll, odbccp32.dll, ole32.dll,
oleaut32.dll and winspool.drv.
.TP
166
.B --nomsvcrt
167 168 169
Sets some options to tell winegcc not to compile against msvcrt.
Use this option if you have cpp-files that include <string>.
.TP
170
.B --interactive
171 172
Puts winemaker in interactive mode. In this mode winemaker will ask you to
confirm each directory's list of targets, and then to provide directory and
173 174
target specific options.
.TP
175
.BR --single-target " name"
176
Specifies that there is only one target, and that it is called "name".
177
.TP
178
.B --generated-files
179
Tells winemaker to generate the Makefile. This is the default.
180
.TP
181
.B --nogenerated-files
182
Tells winemaker not to generate the Makefile.
183
.TP
184
.B --wine32
185
Tells winemaker to generate a 32-bit target. This is useful on wow64 systems.
186
Without that option the default architecture is used.
187 188 189 190 191

.SH EXAMPLES
.PP
Here is a typical winemaker use:
.PP
192
$ winemaker --lower-uppercase -DSTRICT .
193
.PP
194 195 196 197 198
The above tells winemaker to scan the current directory and its
subdirectories for source files. Whenever if finds a file or directory which
name is all uppercase, it should rename it to lowercase. It should then fix
all these source files for compilation with Winelib and generate Makefiles.
The '-DSTRICT' specifies that the STRICT macro must be set when compiling
199
these sources. Finally winemaker will create a Makefile.
200 201 202 203 204
.PP
The next step would be:
.PP
$ make
.PP
205 206
If at this point you get compilation errors (which is quite likely for a
reasonably sized project) then you should consult the Winelib User Guide to
Francois Gouget's avatar
Francois Gouget committed
207
find tips on how to resolve them.
208
.PP
209
For an MFC-based project you would have to run the following commands instead:
210
.PP
211
$ winemaker --lower-uppercase --mfc .
212
.br
213 214 215 216
$ make
.PP
For an existing project-file you would have to run the following commands:
.PP
217
$ winemaker myproject.dsp
218 219 220 221 222 223
.br
$ make
.PP

.SH TODO / BUGS
.PP
224
In some cases you will have to edit the Makefile or source files by yourself.
225
.PP
226
Assuming that the windows executable/library is available, we could
227
use winedump to determine what kind of executable it is (graphical
228 229
or console), which libraries it is linked with, and which functions it
exports (for libraries). We could then restore all these settings for the
230
corresponding Winelib target.
231
.PP
232
Furthermore winemaker is not very good at finding the library containing the
233
executable: it must either be in the current directory or in the
234 235 236 237 238 239 240
.IR LD_LIBRARY_PATH .
.PP
Winemaker does not support message files and the message compiler yet.
.PP

.SH SEE ALSO
.PP
Francois Gouget's avatar
Francois Gouget committed
241
The Winelib User Guide:
242
.PP
243
http://www.winehq.org/docs/winelib-guide/index
244 245 246 247
.PP
.BR wine (1)
.PP

248 249 250 251 252 253 254
.SH AUTHORS
François Gouget for CodeWeavers
.PP
Dimitrie O. Paun
.PP
André Hentschel
.PP