blob: db283208c2c4b0f5c983596dd678860df10934da [file] [log] [blame]
Francois Gouget8fa0fb72000-11-06 05:41:23 +00001.\" -*- nroff -*-
2.TH WINEMAKER 1 "November 1, 2000" "Version 0.5.1" "Windows On Unix"
3.SH NAME
4winemaker \- generate a build infrastructure for compiling Windows programs on Unix
5.SH SYNOPSIS
6.B "winemaker "
7[
8.IR "--nobanner " "] [ " "--backup " "| " "--nobackup "
9]
10.br
11 [
12.IR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
13]
14.br
15 [
Francois Gougetd48372c2000-11-30 20:36:18 +000016.IR "--lower-include " "| " "--nolower-include "
Francois Gouget45afff32000-11-10 22:28:33 +000017]
18.br
19 [
Francois Gouget8fa0fb72000-11-06 05:41:23 +000020.IR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll "
21]
22.br
23 [
24.IR "--wrap " "| " "--nowrap " "] [ " "--mfc " "| " "--nomfc "
25]
26.br
27 [
Francois Gougetd48372c2000-11-30 20:36:18 +000028.IR "-Dmacro[=defn] " "] [ " "-Idir " "] [ " "-Ldir " "] [ " "-idll" "] [ " "-llibrary "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000029]
30.br
31 [
32.IR "--interactive " "] [ " "--single-target name "
33]
Francois Gouget45afff32000-11-10 22:28:33 +000034.br
35 [
Francois Gougetd48372c2000-11-30 20:36:18 +000036.IR "--generated-files " "] [ " "--nogenerated-files "
Francois Gouget45afff32000-11-10 22:28:33 +000037]
Francois Gouget8fa0fb72000-11-06 05:41:23 +000038
39.SH DESCRIPTION
40.PP
41.B winemaker
42is a perl script designed to help you bootstrap the
43process of converting your Windows sources to WineLib programs.
44.PP
45In 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
48got 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
53backslashes with forward slashes.
54.PP
55- during the above step winemaker will also perform a case insensitive search
56of the referenced file in the include path and rewrite the include statement
57with the right case if necessary.
58.PP
59- winemaker will also check other more exotic issues like '#pragma pack'
60usage, use of "afxres.h" in non MFC projects, and more. Whenever it
61encounters 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
64the executables and libraries you are trying to build, match them with
65source files, and generate the corresponding Makefile.in files.
66.PP
67- finally winemaker will generate a global Makefile.in file calling out to all
68the others, and a configure script customized for use with WineLib.
69.PP
70- winemaker knows about MFC-based project and will generate customized files.
71.PP
72.SH OPTIONS
73.TP
74.I --nobanner
75Disables the printing of the banner.
76.TP
77.I --backup
78Directs winemaker to perform a backup of all the source files in which it
79makes changes. This is the default.
80.TP
81.I --nobackup
82Tells winemaker not to backup modified source files.
83.TP
84.I --lower-all
85Tells winemaker to rename all files and directories to lowercase.
86.TP
87.I --lower-uppercase
88Tells winemaker to only rename files and directories that have an all
89uppercase name.
90So "HELLO.C" would be renamed but not "World.c".
91.TP
92.I --lower-none
93Tells winemaker not to rename files and directories to lower case. Note
Francois Gougetd48372c2000-11-30 20:36:18 +000094that this does not prevent the renaming of a file if its extension cannot
Francois Gouget8fa0fb72000-11-06 05:41:23 +000095be handled as is, e.g. ".Cxx". This is the default.
96.TP
Francois Gouget45afff32000-11-10 22:28:33 +000097.I "--lower-include "
98Tells winemaker that if it does not find the file corresponding to an
99include statement (or other form of file reference for resource files),
100then it should convert that filename to lowercase. This is the default.
101.TP
Francois Gougetd48372c2000-11-30 20:36:18 +0000102.I "--nolower-include "
Francois Gouget45afff32000-11-10 22:28:33 +0000103Tells winemaker not to modify the include statement if it cannot find the
104referenced file.
105.TP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000106.IR "--guiexe " "| " "--windows"
107Specifies that whenever winemaker finds an executable target, or a target of
108unknown type, it should assume that it is a graphical application.
109This is the default.
110.TP
111.IR "--cuiexe " "| " "--console"
112Specifies that whenever winemaker finds an executable target, or a target of
113unknown type, it should assume that it is a console application.
114.TP
115.I --dll
116This option tells winemaker that whenever it finds a target of unknown type,
117i.e. for which it does not know whether it is an executable or a library,
118it should assume it is a library.
119.TP
120.I --wrap
121Specifies that executable targets should be built as libraries and a small
122executable wrapper generated for them. This technique is sometimes required
123to solve initialization problems occuring on the application startup.
124.TP
125.I --nowrap
126Specifies that no wrapper should be generated for executable targets. This is
127the default.
128.TP
129.I --mfc
130Specifies that the targets are MFC based. In such a case winemaker generates a
131configure script with MFC specific options, modifies the include and
132library paths accordingly, links the target with the MFC library and
133generates wrappers for these targets that are executables.
134.TP
135.I --nomfc
136Specifies that targets are not MFC-based. This is the default.
137.TP
138.I -Dmacro[=defn]
139Adds the specified macro definition to the global list of macro definitions.
140.TP
141.I -Idir
142Appends the specified directory to the global include path.
143.TP
144.I -Ldir
145Appends the specified directory to the global library path.
146.TP
Francois Gougetd48372c2000-11-30 20:36:18 +0000147.I -idll
148Adds the Winelib library to the global list of Winelib libraries to import
149in the spec file.
150.TP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000151.I -llibrary
152Adds the specified library to the global list of libraries to link with.
153.TP
154.I --interactive
155Puts winemaker in interactive mode. In this mode winemaker will ask you to
156confirm each directory's list of targets, and then to provide directory and
157target specific options.
158.TP
159.I --single-target name
160Specifies that there is only one target, and that it is called "name".
Francois Gouget45afff32000-11-10 22:28:33 +0000161.TP
162.I --generated-files
163Tells winemaker to generate the build infrastructure files, i.e. the spec
164files, the wrapper files, the Makefile.in files, the Make.rules.in file, the
165configure.in file and the configure script. This is the default.
166.TP
Francois Gougetd48372c2000-11-30 20:36:18 +0000167.I --nogenerated-files
Francois Gouget45afff32000-11-10 22:28:33 +0000168Tells winemaker not to generate any of the above files.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000169
170.SH EXAMPLES
171.PP
172Here is a typical winemaker use:
173.PP
174$ winemaker --lower-uppercase -DSTRICT
175.PP
176The above tells winemaker to scan the current directory and its
177subdirectories for source files. Whenever if finds a file or directory which
178name is all uppercase, it should rename it to lowercase. It should then fix
179all these source files for compilation with WineLib and generate Makefiles.
180The '-DSTRICT' specifies that the STRICT macro must be set when compiling
181these sources. Finally winemaker will create a global Makefile.in and
182configure.in, and run autoconf to generate the configure script.
183.PP
184The next step would be:
185.PP
Francois Gougetd48372c2000-11-30 20:36:18 +0000186$ ./configure --with-wine=/usr/local/opt/wine
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000187.PP
188This generates the makefiles from the Makefile.in files. The generated
189makefiles will fetch the WineLib headers and libraries from the Wine
190installation located in /usr/local/opt/wine.
191.PP
192And finally:
193.PP
194$ make
195.PP
196If at this point you get compilation errors (which quite likely for a
197reasonable sized project) then you should consult the WineLib User Guide to
198find tips about how to resolve them.
199.PP
200For an MFC-based project one would have run the following commands instead:
201.PP
202$ winemaker --lower-uppercase --mfc
203.br
Francois Gougetd48372c2000-11-30 20:36:18 +0000204$ ./configure --with-wine=/usr/local/opt/wine \\
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000205.br
Francois Gougetd48372c2000-11-30 20:36:18 +0000206 --with-mfc=/usr/local/opt/mfc
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000207.br
208$ make
209.PP
210
211.SH TODO / BUGS
212.PP
213Winemaker should support the Visual Studio project files (.dsp for newer
214versions and .mak for some older versions). This would allow it to be much
215more accurate, especially for the macro, include path and library path
216settings.
217.PP
218Assuming that we have the windows executable/library available, we could
219use a pedump-like tool to determine what kind of executable it is (graphical
220or console), which libraries it is linked with, and which functions it
221exports (for libraries). We could then restore all these settings for the
222corresponding WineLib target. The problem is that we should have such a tool
223available under the Wine license first.
224.PP
225The wrapper code should be generic, i.e. you should be able to have just one
226wrapper and specify which library to load using an option.
227.PP
228Furthermore it is not very good at finding the library containing the
229executable: it must either be in the current directory or in the
230.IR LD_LIBRARY_PATH .
231.PP
232The current way we link with libraries is not very good: with link, in the
233Unix sense, with all of them, and with none in the WineLib sense. But we
234lack a good means of detecting which libraries we should link with.
235Furthermore this area will change significantly when winebuild make sit
236possible to really link in the WineLib sense (i.e. via the spec file).
237.PP
238Work remains to be done on the configure script. Especially in the area of
239detecting headers and libraries that are already in the include/library path.
240.PP
241Winemaker does not support message files and the message compiler yet.
242.PP
243
244.SH SEE ALSO
245.PP
246The WineLib User Guide:
247.PP
248http://wine.codeweavers.com/docs/winelib-user/
249.PP
250.BR wine (1)
251.PP
252
253.SH AUTHOR
254Francois Gouget <fgouget@codeweavers.com> for CodeWeavers