blob: bc9d2b482d3299cf343d319ffe3b0ee7c4603de7 [file] [log] [blame]
Francois Gouget8fa0fb72000-11-06 05:41:23 +00001.\" -*- nroff -*-
André Hentscheld912d6f2009-09-12 14:37:40 +02002.TH WINEMAKER 1 "Sep 2009" "@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[
Frédéric Delanoyf99fc382010-04-25 01:55:43 +02008.BR "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
Francois Gouget8fa0fb72000-11-06 05:41:23 +00009]
10.br
11 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020012.BR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000013]
14.br
15 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020016.BR "--lower-include " "| " "--nolower-include " ]\ [ " --mfc " "| " "--nomfc "
Francois Gouget45afff32000-11-10 22:28:33 +000017]
18.br
19 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020020.BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000021]
22.br
23 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020024.BI "-D" macro "\fR[=\fIdefn\fR] ] [" "\ " "-I" "dir\fR ]\ [ " "-P" "dir\fR ] [ " "-i" "dll\fR ] [ " "-L" "dir\fR ] [ " "-l" "library "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000025]
26.br
27 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020028.BR "--nodlls " "] [ " "--nomsvcrt " "] [ " "--interactive " "] [ " "--single-target \fIname\fR "
Francois Gouget8fa0fb72000-11-06 05:41:23 +000029]
Francois Gouget45afff32000-11-10 22:28:33 +000030.br
31 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020032.BR "--generated-files " "] [ " "--nogenerated-files " "]
André Hentschel5b4b4952009-05-01 11:37:06 +020033]
34.br
35 [
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020036.BR "--wine32 " "]
André Hentschel8f74c2b2009-04-02 18:53:28 +020037.br
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020038.IR " work_directory" " | " "project_file" " | " "workspace_file"
Francois Gouget8fa0fb72000-11-06 05:41:23 +000039
40.SH DESCRIPTION
41.PP
42.B winemaker
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000043is a perl script designed to help you bootstrap the
Francois Gouget09e8daf2000-12-02 20:14:20 +000044process of converting your Windows sources to Winelib programs.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000045.PP
46In order to do this winemaker can perform the following operations:
47.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000048- rename your source files and directories to lowercase in the event they
Francois Gouget8fa0fb72000-11-06 05:41:23 +000049got all uppercased during the transfer.
50.PP
51- perform Dos to Unix (CRLF to LF) conversions.
52.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000053- scan the include statements and resource file references to replace the
Francois Gouget8fa0fb72000-11-06 05:41:23 +000054backslashes with forward slashes.
55.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000056- during the above step winemaker will also perform a case insensitive search
57of the referenced file in the include path and rewrite the include statement
Francois Gouget8fa0fb72000-11-06 05:41:23 +000058with the right case if necessary.
59.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000060- winemaker will also check other more exotic issues like '#pragma pack'
61usage, use of "afxres.h" in non MFC projects, and more. Whenever it
Francois Gouget8fa0fb72000-11-06 05:41:23 +000062encounters something out of the ordinary, winemaker will warn you about it.
63.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000064- winemaker can also scan a complete directory tree at once, guess what are
65the executables and libraries you are trying to build, match them with
André Hentschel84669a32010-04-02 18:02:53 +020066source files, and generate the corresponding Makefile.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000067.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +020068- finally winemaker will generate a global Makefile for normal use.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000069.PP
70- winemaker knows about MFC-based project and will generate customized files.
71.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +020072- winemaker can read existing Projectfiles. It supports dsp, dsw, vcproj and sln files.
73.PP
Francois Gouget8fa0fb72000-11-06 05:41:23 +000074.SH OPTIONS
75.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020076.B --nobanner
Francois Gouget8fa0fb72000-11-06 05:41:23 +000077Disables the printing of the banner.
78.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020079.B --backup
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000080Directs winemaker to perform a backup of all the source files in which it
Francois Gouget8fa0fb72000-11-06 05:41:23 +000081makes changes. This is the default.
82.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020083.B --nobackup
Francois Gouget8fa0fb72000-11-06 05:41:23 +000084Tells winemaker not to backup modified source files.
85.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020086.B --nosource-fix
Bill Medlanda3041102001-10-02 17:47:34 +000087Directs winemaker not to try fixing the source files (e.g. Dos to Unix
88conversion). This prevents complaints if the files are readonly.
89.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020090.B --lower-all
Francois Gouget8fa0fb72000-11-06 05:41:23 +000091Tells winemaker to rename all files and directories to lowercase.
92.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020093.B --lower-uppercase
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000094Tells winemaker to only rename files and directories that have an all
95uppercase name.
Francois Gouget8fa0fb72000-11-06 05:41:23 +000096So "HELLO.C" would be renamed but not "World.c".
97.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +020098.B --lower-none
Martin Wilck3aa9e8c2002-09-10 00:20:27 +000099Tells winemaker not to rename files and directories to lower case. Note
100that this does not prevent the renaming of a file if its extension cannot
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000101be handled as is, e.g. ".Cxx". This is the default.
102.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200103.B "--lower-include "
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000104Tells winemaker that if it does not find the file corresponding to an
105include statement (or other form of file reference for resource files),
Francois Gouget45afff32000-11-10 22:28:33 +0000106then it should convert that filename to lowercase. This is the default.
107.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200108.B "--nolower-include "
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000109Tells winemaker not to modify the include statement if it cannot find the
Francois Gouget45afff32000-11-10 22:28:33 +0000110referenced file.
111.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200112.BR "--guiexe " "| " "--windows"
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000113Specifies that whenever winemaker finds an executable target, or a target of
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000114unknown type, it should assume that it is a graphical application.
115This is the default.
116.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200117.BR "--cuiexe " "| " "--console"
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000118Specifies that whenever winemaker finds an executable target, or a target of
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000119unknown type, it should assume that it is a console application.
120.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200121.B --dll
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000122This option tells winemaker that whenever it finds a target of unknown type,
123i.e. for which it does not know whether it is an executable or a library,
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000124it should assume it is a library.
125.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200126.B --mfc
Dimitrie O. Paun905658c2004-02-27 21:24:20 +0000127Specifies that the targets are MFC based. In such a case winemaker the include
128and library paths accordingly, and links the target with the MFC library.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000129.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200130.B --nomfc
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000131Specifies that targets are not MFC-based. This option disables use of MFC libraries
132even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it
133to enable MFC automatically if neither --nomfc nor --mfc was specified.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000134.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200135.BI -D macro "\fR[=\fIdefn\fR]"
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000136Adds the specified macro definition to the global list of macro definitions.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000137.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200138.BI -I dir
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000139Appends the specified directory to the global include path.
140.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200141.BI -P dir
André Hentschel8f74c2b2009-04-02 18:53:28 +0200142Appends the specified directory to the global dll path.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000143.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200144.BI -i dll
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000145Adds the Winelib library to the global list of Winelib libraries to import.
Francois Gougetd48372c2000-11-30 20:36:18 +0000146.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200147.BI -L dir
André Hentschel8f74c2b2009-04-02 18:53:28 +0200148Appends the specified directory to the global library path.
149.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200150.BI -l library
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000151Adds the specified library to the global list of libraries to link with.
152.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200153.B --nodlls
André Hentscheld912d6f2009-09-12 14:37:40 +0200154This option tells winemaker not to use the standard set of winelib libraries
155for imports. That is, any DLL your code uses must be explicitly passed to
156winemaker with -i options.
157The standard set of libraries is: odbc32.dll, odbccp32.dll, ole32.dll,
158oleaut32.dll and winspool.drv.
159.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200160.B --nomsvcrt
André Hentscheld912d6f2009-09-12 14:37:40 +0200161Sets some options to tell winegcc not to compile against msvcrt.
162Use this option if you have cpp-files that include <string>.
163.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200164.B --interactive
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000165Puts winemaker in interactive mode. In this mode winemaker will ask you to
166confirm each directory's list of targets, and then to provide directory and
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000167target specific options.
168.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200169.B --single-target name
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000170Specifies that there is only one target, and that it is called "name".
Francois Gouget45afff32000-11-10 22:28:33 +0000171.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200172.B --generated-files
André Hentschel84669a32010-04-02 18:02:53 +0200173Tells winemaker to generate the Makefile. This is the default.
Francois Gouget45afff32000-11-10 22:28:33 +0000174.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200175.B --nogenerated-files
Dimitrie O. Paun905658c2004-02-27 21:24:20 +0000176Tells winemaker not to generate the Makefile.
André Hentschel5b4b4952009-05-01 11:37:06 +0200177.TP
Frédéric Delanoyf99fc382010-04-25 01:55:43 +0200178.B --wine32
André Hentschel65900b42010-04-21 20:22:13 +0200179Tells winemaker to generate a 32-bit target. This is useful on a wow64 systems.
180Without that option the default architecture is used.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000181
182.SH EXAMPLES
183.PP
184Here is a typical winemaker use:
185.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +0200186$ winemaker --lower-uppercase -DSTRICT .
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000187.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000188The above tells winemaker to scan the current directory and its
189subdirectories for source files. Whenever if finds a file or directory which
190name is all uppercase, it should rename it to lowercase. It should then fix
191all these source files for compilation with Winelib and generate Makefiles.
192The '-DSTRICT' specifies that the STRICT macro must be set when compiling
André Hentschel8f74c2b2009-04-02 18:53:28 +0200193these sources. Finally winemaker will create a Makefile.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000194.PP
195The next step would be:
196.PP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000197$ make
198.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000199If at this point you get compilation errors (which is quite likely for a
200reasonably sized project) then you should consult the Winelib User Guide to
Francois Gouget09e8daf2000-12-02 20:14:20 +0000201find tips on how to resolve them.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000202.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +0200203For an MFC-based project you would have to run the following commands instead:
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000204.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +0200205$ winemaker --lower-uppercase --mfc .
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000206.br
André Hentschel8f74c2b2009-04-02 18:53:28 +0200207$ make
208.PP
209For an existing project-file you would have to run the following commands:
210.PP
André Hentscheld912d6f2009-09-12 14:37:40 +0200211$ winemaker myproject.dsp
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000212.br
213$ make
214.PP
215
216.SH TODO / BUGS
217.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +0200218In some cases you will have to edit the Makefile or sourcefiles by yourself.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000219.PP
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000220Assuming that the windows executable/library is available, we could
André Hentschel4c9405a2009-08-16 15:33:11 +0200221use winedump to determine what kind of executable it is (graphical
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000222or console), which libraries it is linked with, and which functions it
223exports (for libraries). We could then restore all these settings for the
André Hentschel4c9405a2009-08-16 15:33:11 +0200224corresponding Winelib target.
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000225.PP
André Hentschel4c9405a2009-08-16 15:33:11 +0200226Furthermore winemaker is not very good at finding the library containing the
Martin Wilck3aa9e8c2002-09-10 00:20:27 +0000227executable: it must either be in the current directory or in the
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000228.IR LD_LIBRARY_PATH .
229.PP
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000230Winemaker does not support message files and the message compiler yet.
231.PP
232
233.SH SEE ALSO
234.PP
Francois Gouget09e8daf2000-12-02 20:14:20 +0000235The Winelib User Guide:
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000236.PP
André Hentschel8f74c2b2009-04-02 18:53:28 +0200237http://www.winehq.org/docs/winelib-guide/index
Francois Gouget8fa0fb72000-11-06 05:41:23 +0000238.PP
239.BR wine (1)
240.PP
241
André Hentscheld912d6f2009-09-12 14:37:40 +0200242.SH AUTHORS
243François Gouget for CodeWeavers
244.PP
245Dimitrie O. Paun
246.PP
247André Hentschel
248.PP