blob: fc57a3c69fae849e7c84e22de1e761aaf7eb7425 [file] [log] [blame]
Francois Gouget8fa0fb72000-11-06 05:41:23 +00001.\" -*- nroff -*-
Alexandre Julliard12a74992005-10-06 16:10:01 +00002.TH WINEMAKER 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
Francois Gouget8fa0fb72000-11-06 05:41:23 +00003.SH NAME
4winemaker \- generate a build infrastructure for compiling Windows programs on Unix
5.SH SYNOPSIS
6.B "winemaker "
7[
Bill Medlanda3041102001-10-02 17:47:34 +00008.IR "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
Francois Gouget8fa0fb72000-11-06 05:41:23 +00009]
10.br
11 [
12.IR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
13]
14.br
15 [
Dimitrie O. Paun905658c2004-02-27 21:24:20 +000016.IR "--lower-include " "| " "--nolower-include " ] [ " "--mfc " "| " "--nomfc "
Francois Gouget45afff32000-11-10 22:28:33 +000017]
18.br
19 [
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000020.IR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--nodlls "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000021]
22.br
23 [
Francois Gougetd48372c2000-11-30 20:36:18 +000024.IR "-Dmacro[=defn] " "] [ " "-Idir " "] [ " "-Ldir " "] [ " "-idll" "] [ " "-llibrary "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000025]
26.br
27 [
28.IR "--interactive " "] [ " "--single-target name "
29]
Francois Gouget45afff32000-11-10 22:28:33 +000030.br
31 [
Dimitrie O. Paun905658c2004-02-27 21:24:20 +000032.IR "--generated-files " "] [ " "--nogenerated-files " "]
Francois Gouget45afff32000-11-10 22:28:33 +000033]
Francois Gouget8fa0fb72000-11-06 05:41:23 +000034
35.SH DESCRIPTION
36.PP
37.B winemaker
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000038is a perl script designed to help you bootstrap the
Francois Gouget09e8daf2000-12-02 20:14:20 +000039process of converting your Windows sources to Winelib programs.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000040.PP
41In order to do this winemaker can perform the following operations:
42.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000043- rename your source files and directories to lowercase in the event they
Francois Gouget8fa0fb72000-11-06 05:41:23 +000044got all uppercased during the transfer.
45.PP
46- perform Dos to Unix (CRLF to LF) conversions.
47.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000048- scan the include statements and resource file references to replace the
Francois Gouget8fa0fb72000-11-06 05:41:23 +000049backslashes with forward slashes.
50.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000051- during the above step winemaker will also perform a case insensitive search
52of the referenced file in the include path and rewrite the include statement
Francois Gouget8fa0fb72000-11-06 05:41:23 +000053with the right case if necessary.
54.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000055- winemaker will also check other more exotic issues like '#pragma pack'
56usage, use of "afxres.h" in non MFC projects, and more. Whenever it
Francois Gouget8fa0fb72000-11-06 05:41:23 +000057encounters something out of the ordinary, winemaker will warn you about it.
58.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000059- winemaker can also scan a complete directory tree at once, guess what are
60the executables and libraries you are trying to build, match them with
Francois Gouget8fa0fb72000-11-06 05:41:23 +000061source files, and generate the corresponding Makefile.in files.
62.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000063- finally winemaker will generate a global Makefile.in file calling out to all
Francois Gouget09e8daf2000-12-02 20:14:20 +000064the others, and a configure script customized for use with Winelib.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000065.PP
66- winemaker knows about MFC-based project and will generate customized files.
67.PP
68.SH OPTIONS
69.TP
70.I --nobanner
71Disables the printing of the banner.
72.TP
73.I --backup
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000074Directs winemaker to perform a backup of all the source files in which it
Francois Gouget8fa0fb72000-11-06 05:41:23 +000075makes changes. This is the default.
76.TP
77.I --nobackup
78Tells winemaker not to backup modified source files.
79.TP
Bill Medlanda3041102001-10-02 17:47:34 +000080.I --nosource-fix
81Directs winemaker not to try fixing the source files (e.g. Dos to Unix
82conversion). This prevents complaints if the files are readonly.
83.TP
Francois Gouget8fa0fb72000-11-06 05:41:23 +000084.I --lower-all
85Tells winemaker to rename all files and directories to lowercase.
86.TP
87.I --lower-uppercase
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000088Tells winemaker to only rename files and directories that have an all
89uppercase name.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000090So "HELLO.C" would be renamed but not "World.c".
91.TP
92.I --lower-none
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000093Tells winemaker not to rename files and directories to lower case. Note
94that 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 "
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000098Tells winemaker that if it does not find the file corresponding to an
99include statement (or other form of file reference for resource files),
Francois Gouget45afff32000-11-10 22:28:33 +0000100then it should convert that filename to lowercase. This is the default.
101.TP
Francois Gougetd48372c2000-11-30 20:36:18 +0000102.I "--nolower-include "
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000103Tells winemaker not to modify the include statement if it cannot find the
Francois Gouget45afff32000-11-10 22:28:33 +0000104referenced file.
105.TP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000106.IR "--guiexe " "| " "--windows"
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000107Specifies that whenever winemaker finds an executable target, or a target of
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000108unknown type, it should assume that it is a graphical application.
109This is the default.
110.TP
111.IR "--cuiexe " "| " "--console"
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000112Specifies that whenever winemaker finds an executable target, or a target of
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000113unknown type, it should assume that it is a console application.
114.TP
115.I --dll
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000116This 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,
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000118it should assume it is a library.
119.TP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000120.I --nodlls
121This option tells winemaker not to use the standard set of winelib libraries
122for imports. That is, any DLL your code uses must be explicitly passed to
123winemaker with -i options.
124The standard set of libraries is: advapi32.dll, comdlg32.dll, gdi32.dll,
125kernel32.dll, odbc32.dll, ole32.dll, oleaut32.dll, shell32.dll, user32.dll,
126winspool.drv.
127.TP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000128.I --mfc
Dimitrie O. Paun905658c2004-02-27 21:24:20 +0000129Specifies that the targets are MFC based. In such a case winemaker the include
130and library paths accordingly, and links the target with the MFC library.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000131.TP
132.I --nomfc
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000133Specifies that targets are not MFC-based. This option disables use of MFC libraries
134even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it
135to enable MFC automatically if neither --nomfc nor --mfc was specified.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000136.TP
137.I -Dmacro[=defn]
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000138Adds the specified macro definition to the global list of macro definitions.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000139.TP
140.I -Idir
141Appends the specified directory to the global include path.
142.TP
143.I -Ldir
144Appends the specified directory to the global library path.
145.TP
Francois Gougetd48372c2000-11-30 20:36:18 +0000146.I -idll
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000147Adds the Winelib library to the global list of Winelib libraries to import.
Francois Gougetd48372c2000-11-30 20:36:18 +0000148.TP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000149.I -llibrary
150Adds the specified library to the global list of libraries to link with.
151.TP
152.I --interactive
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000153Puts winemaker in interactive mode. In this mode winemaker will ask you to
154confirm each directory's list of targets, and then to provide directory and
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000155target specific options.
156.TP
157.I --single-target name
158Specifies that there is only one target, and that it is called "name".
Francois Gouget45afff32000-11-10 22:28:33 +0000159.TP
160.I --generated-files
Dimitrie O. Paun905658c2004-02-27 21:24:20 +0000161Tells winemaker to generate the build the Makefile. This is the default.
Francois Gouget45afff32000-11-10 22:28:33 +0000162.TP
Francois Gougetd48372c2000-11-30 20:36:18 +0000163.I --nogenerated-files
Dimitrie O. Paun905658c2004-02-27 21:24:20 +0000164Tells winemaker not to generate the Makefile.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000165
166.SH EXAMPLES
167.PP
168Here is a typical winemaker use:
169.PP
170$ winemaker --lower-uppercase -DSTRICT
171.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000172The above tells winemaker to scan the current directory and its
173subdirectories for source files. Whenever if finds a file or directory which
174name is all uppercase, it should rename it to lowercase. It should then fix
175all these source files for compilation with Winelib and generate Makefiles.
176The '-DSTRICT' specifies that the STRICT macro must be set when compiling
177these sources. Finally winemaker will create a global Makefile.in and
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000178configure.in, and run autoconf to generate the configure script.
179.PP
180The next step would be:
181.PP
Francois Gougetd48372c2000-11-30 20:36:18 +0000182$ ./configure --with-wine=/usr/local/opt/wine
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000183.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000184This generates the makefiles from the Makefile.in files. The generated
185makefiles will fetch the Winelib headers and libraries from the Wine
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000186installation located in /usr/local/opt/wine.
187.PP
188And finally:
189.PP
190$ make
191.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000192If at this point you get compilation errors (which is quite likely for a
193reasonably sized project) then you should consult the Winelib User Guide to
Francois Gouget09e8daf2000-12-02 20:14:20 +0000194find tips on how to resolve them.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000195.PP
196For an MFC-based project one would have run the following commands instead:
197.PP
198$ winemaker --lower-uppercase --mfc
199.br
Francois Gougetd48372c2000-11-30 20:36:18 +0000200$ ./configure --with-wine=/usr/local/opt/wine \\
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000201.br
Francois Gougetd48372c2000-11-30 20:36:18 +0000202 --with-mfc=/usr/local/opt/mfc
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000203.br
204$ make
205.PP
206
207.SH TODO / BUGS
208.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000209Winemaker should support the Visual Studio project files (.dsp for newer
210versions and .mak for some older versions). This would allow it to be much
211more accurate, especially for the macro, include and library path
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000212settings.
213.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000214Assuming that the windows executable/library is available, we could
215use a pedump-like tool to determine what kind of executable it is (graphical
216or console), which libraries it is linked with, and which functions it
217exports (for libraries). We could then restore all these settings for the
218corresponding Winelib target. The problem is that we should have such a tool
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000219available under the Wine license first.
220.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000221Furthermore it is not very good at finding the library containing the
222executable: it must either be in the current directory or in the
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000223.IR LD_LIBRARY_PATH .
224.PP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000225Winemaker does not support message files and the message compiler yet.
226.PP
227
228.SH SEE ALSO
229.PP
Francois Gouget09e8daf2000-12-02 20:14:20 +0000230The Winelib User Guide:
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000231.PP
232http://wine.codeweavers.com/docs/winelib-user/
233.PP
234.BR wine (1)
235.PP
236
237.SH AUTHOR
238Francois Gouget <fgouget@codeweavers.com> for CodeWeavers