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

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

.SH EXAMPLES
.PP
180
Here is a typical \fBwinemaker\fR use:
181
.PP
182
$ winemaker --lower-uppercase -DSTRICT .
183
.PP
184
The above tells \fBwinemaker\fR to scan the current directory and its
185 186
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
187 188 189
all these source files for compilation with Winelib and generate \fIMakefile\fRs.
The \fB-DSTRICT\fR specifies that the \fBSTRICT\fR macro must be set when compiling
these sources. Finally a \fIMakefile\fR will be created.
190 191 192 193 194
.PP
The next step would be:
.PP
$ make
.PP
195 196
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
197
find tips on how to resolve them.
198
.PP
199
For an MFC-based project you would have to run the following commands instead:
200
.PP
201
$ winemaker --lower-uppercase --mfc .
202
.br
203 204 205 206
$ make
.PP
For an existing project-file you would have to run the following commands:
.PP
207
$ winemaker myproject.dsp
208 209 210 211 212
.br
$ make
.PP

.SH TODO / BUGS
213
In some cases you will have to edit the \fIMakefile\fR or source files manually.
214
.PP
215
Assuming that the windows executable/library is available, we could
216
use \fBwinedump\fR to determine what kind of executable it is (graphical
217 218
or console), which libraries it is linked with, and which functions it
exports (for libraries). We could then restore all these settings for the
219
corresponding Winelib target.
220
.PP
221
Furthermore \fBwinemaker\fR is not very good at finding the library containing the
222
executable: it must either be in the current directory or in the
223
.BR LD_LIBRARY_PATH .
224
.PP
225
\fBwinemaker\fR does not support message files and the message compiler yet.
226
.PP
227
Bugs can be reported on the
228
.UR https://bugs.winehq.org
229 230
.B Wine bug tracker
.UE .
231 232
.SH AUTHORS
François Gouget for CodeWeavers
233
.br
234
Dimitrie O. Paun
235
.br
236
André Hentschel
237 238 239 240
.SH AVAILABILITY
.B winemaker
is part of the Wine distribution, which is available through WineHQ,
the
241
.UR https://www.winehq.org/
242 243 244 245 246
.B Wine development headquarters
.UE .
.SH SEE ALSO
.BR wine (1),
.br
247
.UR https://www.winehq.org/help
248 249
.B Wine documentation and support
.UE .