Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
Alexandre Julliard | 12a7499 | 2005-10-06 16:10:01 +0000 | [diff] [blame] | 2 | .TH WINEMAKER 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual" |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 3 | .SH NAME |
| 4 | winemaker \- generate a build infrastructure for compiling Windows programs on Unix |
| 5 | .SH SYNOPSIS |
| 6 | .B "winemaker " |
| 7 | [ |
Bill Medland | a304110 | 2001-10-02 17:47:34 +0000 | [diff] [blame] | 8 | .IR "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix " |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 9 | ] |
| 10 | .br |
| 11 | [ |
| 12 | .IR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase " |
| 13 | ] |
| 14 | .br |
| 15 | [ |
Dimitrie O. Paun | 905658c | 2004-02-27 21:24:20 +0000 | [diff] [blame] | 16 | .IR "--lower-include " "| " "--nolower-include " ] [ " "--mfc " "| " "--nomfc " |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 17 | ] |
| 18 | .br |
| 19 | [ |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 20 | .IR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--nodlls " |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 21 | ] |
| 22 | .br |
| 23 | [ |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 24 | .IR "-Dmacro[=defn] " "] [ " "-Idir " "] [ " "-Ldir " "] [ " "-idll" "] [ " "-llibrary " |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 25 | ] |
| 26 | .br |
| 27 | [ |
| 28 | .IR "--interactive " "] [ " "--single-target name " |
| 29 | ] |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 30 | .br |
| 31 | [ |
Dimitrie O. Paun | 905658c | 2004-02-27 21:24:20 +0000 | [diff] [blame] | 32 | .IR "--generated-files " "] [ " "--nogenerated-files " "] |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 33 | ] |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 34 | |
| 35 | .SH DESCRIPTION |
| 36 | .PP |
| 37 | .B winemaker |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 38 | is a perl script designed to help you bootstrap the |
Francois Gouget | 09e8daf | 2000-12-02 20:14:20 +0000 | [diff] [blame] | 39 | process of converting your Windows sources to Winelib programs. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 40 | .PP |
| 41 | In order to do this winemaker can perform the following operations: |
| 42 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 43 | - rename your source files and directories to lowercase in the event they |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 44 | got all uppercased during the transfer. |
| 45 | .PP |
| 46 | - perform Dos to Unix (CRLF to LF) conversions. |
| 47 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 48 | - scan the include statements and resource file references to replace the |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 49 | backslashes with forward slashes. |
| 50 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 51 | - during the above step winemaker will also perform a case insensitive search |
| 52 | of the referenced file in the include path and rewrite the include statement |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 53 | with the right case if necessary. |
| 54 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 55 | - winemaker will also check other more exotic issues like '#pragma pack' |
| 56 | usage, use of "afxres.h" in non MFC projects, and more. Whenever it |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 57 | encounters something out of the ordinary, winemaker will warn you about it. |
| 58 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 59 | - winemaker can also scan a complete directory tree at once, guess what are |
| 60 | the executables and libraries you are trying to build, match them with |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 61 | source files, and generate the corresponding Makefile.in files. |
| 62 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 63 | - finally winemaker will generate a global Makefile.in file calling out to all |
Francois Gouget | 09e8daf | 2000-12-02 20:14:20 +0000 | [diff] [blame] | 64 | the others, and a configure script customized for use with Winelib. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 65 | .PP |
| 66 | - winemaker knows about MFC-based project and will generate customized files. |
| 67 | .PP |
| 68 | .SH OPTIONS |
| 69 | .TP |
| 70 | .I --nobanner |
| 71 | Disables the printing of the banner. |
| 72 | .TP |
| 73 | .I --backup |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 74 | Directs winemaker to perform a backup of all the source files in which it |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 75 | makes changes. This is the default. |
| 76 | .TP |
| 77 | .I --nobackup |
| 78 | Tells winemaker not to backup modified source files. |
| 79 | .TP |
Bill Medland | a304110 | 2001-10-02 17:47:34 +0000 | [diff] [blame] | 80 | .I --nosource-fix |
| 81 | Directs winemaker not to try fixing the source files (e.g. Dos to Unix |
| 82 | conversion). This prevents complaints if the files are readonly. |
| 83 | .TP |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 84 | .I --lower-all |
| 85 | Tells winemaker to rename all files and directories to lowercase. |
| 86 | .TP |
| 87 | .I --lower-uppercase |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 88 | Tells winemaker to only rename files and directories that have an all |
| 89 | uppercase name. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 90 | So "HELLO.C" would be renamed but not "World.c". |
| 91 | .TP |
| 92 | .I --lower-none |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 93 | Tells winemaker not to rename files and directories to lower case. Note |
| 94 | that this does not prevent the renaming of a file if its extension cannot |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 95 | be handled as is, e.g. ".Cxx". This is the default. |
| 96 | .TP |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 97 | .I "--lower-include " |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 98 | Tells winemaker that if it does not find the file corresponding to an |
| 99 | include statement (or other form of file reference for resource files), |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 100 | then it should convert that filename to lowercase. This is the default. |
| 101 | .TP |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 102 | .I "--nolower-include " |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 103 | Tells winemaker not to modify the include statement if it cannot find the |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 104 | referenced file. |
| 105 | .TP |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 106 | .IR "--guiexe " "| " "--windows" |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 107 | Specifies that whenever winemaker finds an executable target, or a target of |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 108 | unknown type, it should assume that it is a graphical application. |
| 109 | This is the default. |
| 110 | .TP |
| 111 | .IR "--cuiexe " "| " "--console" |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 112 | Specifies that whenever winemaker finds an executable target, or a target of |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 113 | unknown type, it should assume that it is a console application. |
| 114 | .TP |
| 115 | .I --dll |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 116 | This option tells winemaker that whenever it finds a target of unknown type, |
| 117 | i.e. for which it does not know whether it is an executable or a library, |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 118 | it should assume it is a library. |
| 119 | .TP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 120 | .I --nodlls |
| 121 | This option tells winemaker not to use the standard set of winelib libraries |
| 122 | for imports. That is, any DLL your code uses must be explicitly passed to |
| 123 | winemaker with -i options. |
| 124 | The standard set of libraries is: advapi32.dll, comdlg32.dll, gdi32.dll, |
| 125 | kernel32.dll, odbc32.dll, ole32.dll, oleaut32.dll, shell32.dll, user32.dll, |
| 126 | winspool.drv. |
| 127 | .TP |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 128 | .I --mfc |
Dimitrie O. Paun | 905658c | 2004-02-27 21:24:20 +0000 | [diff] [blame] | 129 | Specifies that the targets are MFC based. In such a case winemaker the include |
| 130 | and library paths accordingly, and links the target with the MFC library. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 131 | .TP |
| 132 | .I --nomfc |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 133 | Specifies that targets are not MFC-based. This option disables use of MFC libraries |
| 134 | even if winemaker encounters files "stdafx.cpp" or "stdafx.h" that would cause it |
| 135 | to enable MFC automatically if neither --nomfc nor --mfc was specified. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 136 | .TP |
| 137 | .I -Dmacro[=defn] |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 138 | Adds the specified macro definition to the global list of macro definitions. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 139 | .TP |
| 140 | .I -Idir |
| 141 | Appends the specified directory to the global include path. |
| 142 | .TP |
| 143 | .I -Ldir |
| 144 | Appends the specified directory to the global library path. |
| 145 | .TP |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 146 | .I -idll |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 147 | Adds the Winelib library to the global list of Winelib libraries to import. |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 148 | .TP |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 149 | .I -llibrary |
| 150 | Adds the specified library to the global list of libraries to link with. |
| 151 | .TP |
| 152 | .I --interactive |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 153 | Puts winemaker in interactive mode. In this mode winemaker will ask you to |
| 154 | confirm each directory's list of targets, and then to provide directory and |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 155 | target specific options. |
| 156 | .TP |
| 157 | .I --single-target name |
| 158 | Specifies that there is only one target, and that it is called "name". |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 159 | .TP |
| 160 | .I --generated-files |
Dimitrie O. Paun | 905658c | 2004-02-27 21:24:20 +0000 | [diff] [blame] | 161 | Tells winemaker to generate the build the Makefile. This is the default. |
Francois Gouget | 45afff3 | 2000-11-10 22:28:33 +0000 | [diff] [blame] | 162 | .TP |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 163 | .I --nogenerated-files |
Dimitrie O. Paun | 905658c | 2004-02-27 21:24:20 +0000 | [diff] [blame] | 164 | Tells winemaker not to generate the Makefile. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 165 | |
| 166 | .SH EXAMPLES |
| 167 | .PP |
| 168 | Here is a typical winemaker use: |
| 169 | .PP |
| 170 | $ winemaker --lower-uppercase -DSTRICT |
| 171 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 172 | The above tells winemaker to scan the current directory and its |
| 173 | subdirectories for source files. Whenever if finds a file or directory which |
| 174 | name is all uppercase, it should rename it to lowercase. It should then fix |
| 175 | all these source files for compilation with Winelib and generate Makefiles. |
| 176 | The '-DSTRICT' specifies that the STRICT macro must be set when compiling |
| 177 | these sources. Finally winemaker will create a global Makefile.in and |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 178 | configure.in, and run autoconf to generate the configure script. |
| 179 | .PP |
| 180 | The next step would be: |
| 181 | .PP |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 182 | $ ./configure --with-wine=/usr/local/opt/wine |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 183 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 184 | This generates the makefiles from the Makefile.in files. The generated |
| 185 | makefiles will fetch the Winelib headers and libraries from the Wine |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 186 | installation located in /usr/local/opt/wine. |
| 187 | .PP |
| 188 | And finally: |
| 189 | .PP |
| 190 | $ make |
| 191 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 192 | If at this point you get compilation errors (which is quite likely for a |
| 193 | reasonably sized project) then you should consult the Winelib User Guide to |
Francois Gouget | 09e8daf | 2000-12-02 20:14:20 +0000 | [diff] [blame] | 194 | find tips on how to resolve them. |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 195 | .PP |
| 196 | For an MFC-based project one would have run the following commands instead: |
| 197 | .PP |
| 198 | $ winemaker --lower-uppercase --mfc |
| 199 | .br |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 200 | $ ./configure --with-wine=/usr/local/opt/wine \\ |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 201 | .br |
Francois Gouget | d48372c | 2000-11-30 20:36:18 +0000 | [diff] [blame] | 202 | --with-mfc=/usr/local/opt/mfc |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 203 | .br |
| 204 | $ make |
| 205 | .PP |
| 206 | |
| 207 | .SH TODO / BUGS |
| 208 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 209 | Winemaker should support the Visual Studio project files (.dsp for newer |
| 210 | versions and .mak for some older versions). This would allow it to be much |
| 211 | more accurate, especially for the macro, include and library path |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 212 | settings. |
| 213 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 214 | Assuming that the windows executable/library is available, we could |
| 215 | use a pedump-like tool to determine what kind of executable it is (graphical |
| 216 | or console), which libraries it is linked with, and which functions it |
| 217 | exports (for libraries). We could then restore all these settings for the |
| 218 | corresponding Winelib target. The problem is that we should have such a tool |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 219 | available under the Wine license first. |
| 220 | .PP |
Martin Wilck | 3aa9e8c | 2002-09-10 00:20:27 +0000 | [diff] [blame] | 221 | Furthermore it is not very good at finding the library containing the |
| 222 | executable: it must either be in the current directory or in the |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 223 | .IR LD_LIBRARY_PATH . |
| 224 | .PP |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 225 | Winemaker does not support message files and the message compiler yet. |
| 226 | .PP |
| 227 | |
| 228 | .SH SEE ALSO |
| 229 | .PP |
Francois Gouget | 09e8daf | 2000-12-02 20:14:20 +0000 | [diff] [blame] | 230 | The Winelib User Guide: |
Francois Gouget | 8fa0fb7 | 2000-11-06 05:41:23 +0000 | [diff] [blame] | 231 | .PP |
| 232 | http://wine.codeweavers.com/docs/winelib-user/ |
| 233 | .PP |
| 234 | .BR wine (1) |
| 235 | .PP |
| 236 | |
| 237 | .SH AUTHOR |
| 238 | Francois Gouget <fgouget@codeweavers.com> for CodeWeavers |