2 .TH WINEMAKER 1 "November 1, 2000" "Version 0.5.1" "Windows On Unix"
4 winemaker \- generate a build infrastructure for compiling Windows programs on Unix
8 .IR "--nobanner " "] [ " "--backup " "| " "--nobackup "
12 .IR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
16 .IR "--lower-include " "| " "--nolower-include "
20 .IR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll "
24 .IR "--wrap " "| " "--nowrap " "] [ " "--mfc " "| " "--nomfc "
28 .IR "-Dmacro[=defn] " "] [ " "-Idir " "] [ " "-Ldir " "] [ " "-idll" "] [ " "-llibrary "
32 .IR "--interactive " "] [ " "--single-target name "
36 .IR "--generated-files " "] [ " "--nogenerated-files "
42 is a perl script designed to help you bootstrap the
43 process of converting your Windows sources to WineLib programs.
45 In order to do this winemaker can perform the following operations:
47 - rename your source files and directories to lowercase in the event they
48 got all uppercased during the transfer.
50 - perform Dos to Unix (CRLF to LF) conversions.
52 - scan the include statements and resource file references to replace the
53 backslashes with forward slashes.
55 - during the above step winemaker will also perform a case insensitive search
56 of the referenced file in the include path and rewrite the include statement
57 with the right case if necessary.
59 - winemaker will also check other more exotic issues like '#pragma pack'
60 usage, use of "afxres.h" in non MFC projects, and more. Whenever it
61 encounters something out of the ordinary, winemaker will warn you about it.
63 - winemaker can also scan a complete directory tree at once, guess what are
64 the executables and libraries you are trying to build, match them with
65 source files, and generate the corresponding Makefile.in files.
67 - finally winemaker will generate a global Makefile.in file calling out to all
68 the others, and a configure script customized for use with WineLib.
70 - winemaker knows about MFC-based project and will generate customized files.
75 Disables the printing of the banner.
78 Directs winemaker to perform a backup of all the source files in which it
79 makes changes. This is the default.
82 Tells winemaker not to backup modified source files.
85 Tells winemaker to rename all files and directories to lowercase.
88 Tells winemaker to only rename files and directories that have an all
90 So "HELLO.C" would be renamed but not "World.c".
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
95 be handled as is, e.g. ".Cxx". This is the default.
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),
100 then it should convert that filename to lowercase. This is the default.
102 .I "--nolower-include "
103 Tells winemaker not to modify the include statement if it cannot find the
106 .IR "--guiexe " "| " "--windows"
107 Specifies that whenever winemaker finds an executable target, or a target of
108 unknown type, it should assume that it is a graphical application.
111 .IR "--cuiexe " "| " "--console"
112 Specifies that whenever winemaker finds an executable target, or a target of
113 unknown type, it should assume that it is a console application.
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,
118 it should assume it is a library.
121 Specifies that executable targets should be built as libraries and a small
122 executable wrapper generated for them. This technique is sometimes required
123 to solve initialization problems occuring on the application startup.
126 Specifies that no wrapper should be generated for executable targets. This is
130 Specifies that the targets are MFC based. In such a case winemaker generates a
131 configure script with MFC specific options, modifies the include and
132 library paths accordingly, links the target with the MFC library and
133 generates wrappers for these targets that are executables.
136 Specifies that targets are not MFC-based. This is the default.
139 Adds the specified macro definition to the global list of macro definitions.
142 Appends the specified directory to the global include path.
145 Appends the specified directory to the global library path.
148 Adds the Winelib library to the global list of Winelib libraries to import
152 Adds the specified library to the global list of libraries to link with.
155 Puts winemaker in interactive mode. In this mode winemaker will ask you to
156 confirm each directory's list of targets, and then to provide directory and
157 target specific options.
159 .I --single-target name
160 Specifies that there is only one target, and that it is called "name".
163 Tells winemaker to generate the build infrastructure files, i.e. the spec
164 files, the wrapper files, the Makefile.in files, the Make.rules.in file, the
165 configure.in file and the configure script. This is the default.
167 .I --nogenerated-files
168 Tells winemaker not to generate any of the above files.
172 Here is a typical winemaker use:
174 $ winemaker --lower-uppercase -DSTRICT
176 The above tells winemaker to scan the current directory and its
177 subdirectories for source files. Whenever if finds a file or directory which
178 name is all uppercase, it should rename it to lowercase. It should then fix
179 all these source files for compilation with WineLib and generate Makefiles.
180 The '-DSTRICT' specifies that the STRICT macro must be set when compiling
181 these sources. Finally winemaker will create a global Makefile.in and
182 configure.in, and run autoconf to generate the configure script.
184 The next step would be:
186 $ ./configure --with-wine=/usr/local/opt/wine
188 This generates the makefiles from the Makefile.in files. The generated
189 makefiles will fetch the WineLib headers and libraries from the Wine
190 installation located in /usr/local/opt/wine.
196 If at this point you get compilation errors (which quite likely for a
197 reasonable sized project) then you should consult the WineLib User Guide to
198 find tips about how to resolve them.
200 For an MFC-based project one would have run the following commands instead:
202 $ winemaker --lower-uppercase --mfc
204 $ ./configure --with-wine=/usr/local/opt/wine \\
206 --with-mfc=/usr/local/opt/mfc
213 Winemaker should support the Visual Studio project files (.dsp for newer
214 versions and .mak for some older versions). This would allow it to be much
215 more accurate, especially for the macro, include path and library path
218 Assuming that we have the windows executable/library available, we could
219 use a pedump-like tool to determine what kind of executable it is (graphical
220 or console), which libraries it is linked with, and which functions it
221 exports (for libraries). We could then restore all these settings for the
222 corresponding WineLib target. The problem is that we should have such a tool
223 available under the Wine license first.
225 The wrapper code should be generic, i.e. you should be able to have just one
226 wrapper and specify which library to load using an option.
228 Furthermore it is not very good at finding the library containing the
229 executable: it must either be in the current directory or in the
230 .IR LD_LIBRARY_PATH .
232 The current way we link with libraries is not very good: with link, in the
233 Unix sense, with all of them, and with none in the WineLib sense. But we
234 lack a good means of detecting which libraries we should link with.
235 Furthermore this area will change significantly when winebuild make sit
236 possible to really link in the WineLib sense (i.e. via the spec file).
238 Work remains to be done on the configure script. Especially in the area of
239 detecting headers and libraries that are already in the include/library path.
241 Winemaker does not support message files and the message compiler yet.
246 The WineLib User Guide:
248 http://wine.codeweavers.com/docs/winelib-user/
254 Francois Gouget <fgouget@codeweavers.com> for CodeWeavers