winemaker.man.in 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. .TH WINEMAKER 1 "Jan 2012" "@PACKAGE_STRING@" "Wine Developers Manual"
  2. .SH NAME
  3. winemaker \- generate a build infrastructure for compiling Windows programs on Unix
  4. .SH SYNOPSIS
  5. .B "winemaker "
  6. [
  7. .BR "--nobanner " "] [ " "--backup " "| " "--nobackup " "] [ "--nosource-fix "
  8. ]
  9. .br
  10. [
  11. .BR "--lower-none " "| " "--lower-all " "| " "--lower-uppercase "
  12. ]
  13. .br
  14. [
  15. .BR "--lower-include " "| " "--nolower-include " ]\ [ " --mfc " "| " "--nomfc "
  16. ]
  17. .br
  18. [
  19. .BR "--guiexe " "| " "--windows " "| " "--cuiexe " "| " "--console " "| " "--dll " "| " "--lib "
  20. ]
  21. .br
  22. [
  23. .BI "-D" macro "\fR[=\fIdefn\fR] ] [" "\ " "-I" "dir\fR ]\ [ " "-P" "dir\fR ] [ " "-i" "dll\fR ] [ " "-L" "dir\fR ] [ " "-l" "library "
  24. ]
  25. .br
  26. [
  27. .BR "--nodlls " "] [ " "--nomsvcrt " "] [ " "--interactive " "] [ " "--single-target \fIname\fR "
  28. ]
  29. .br
  30. [
  31. .BR "--generated-files " "] [ " "--nogenerated-files " "]
  32. .br
  33. [
  34. .BR "--wine32 " "]
  35. .br
  36. .IR " work_directory" " | " "project_file" " | " "workspace_file"
  37. .SH DESCRIPTION
  38. .PP
  39. .B winemaker
  40. is a perl script designed to help you bootstrap the
  41. process of converting your Windows sources to Winelib programs.
  42. .PP
  43. In order to do this \fBwinemaker\fR can perform the following operations:
  44. .PP
  45. - rename your source files and directories to lowercase in the event they
  46. got all uppercased during the transfer.
  47. .PP
  48. - perform DOS to Unix (CRLF to LF) conversions.
  49. .PP
  50. - scan the include statements and resource file references to replace the
  51. backslashes with forward slashes.
  52. .PP
  53. - during the above step \fBwinemaker\fR will also perform a case insensitive search
  54. of the referenced file in the include path and rewrite the include statement
  55. with the right case if necessary.
  56. .PP
  57. - \fBwinemaker\fR will also check other more exotic issues like \fI#pragma pack\fR
  58. usage, use of \fIafxres.h\fR in non MFC projects, and more. Whenever it
  59. encounters something out of the ordinary, it will warn you about it.
  60. .PP
  61. - \fBwinemaker\fR can also scan a complete directory tree at once, guess what are
  62. the executables and libraries you are trying to build, match them with
  63. source files, and generate the corresponding \fIMakefile\fR.
  64. .PP
  65. - finally \fBwinemaker\fR will generate a global \fIMakefile\fR for normal use.
  66. .PP
  67. - \fBwinemaker\fR knows about MFC-based project and will generate customized files.
  68. .PP
  69. - \fBwinemaker\fR can read existing project files. It supports dsp, dsw, vcproj and sln files.
  70. .PP
  71. .SH OPTIONS
  72. .TP
  73. .B --nobanner
  74. Disable the printing of the banner.
  75. .TP
  76. .B --backup
  77. Perform a backup of all the modified source files. This is the default.
  78. .TP
  79. .B --nobackup
  80. Do not backup modified source files.
  81. .TP
  82. .B --nosource-fix
  83. Do no try to fix the source files (e.g. DOS to Unix
  84. conversion). This prevents complaints if the files are readonly.
  85. .TP
  86. .B --lower-all
  87. Rename all files and directories to lowercase.
  88. .TP
  89. .B --lower-uppercase
  90. Only rename files and directories that have an all uppercase name.
  91. So \fIHELLO.C\fR would be renamed but not \fIWorld.c\fR.
  92. .TP
  93. .B --lower-none
  94. Do not rename files and directories to lower case. Note
  95. that this does not prevent the renaming of a file if its extension cannot
  96. be handled as is, e.g. ".Cxx". This is the default.
  97. .TP
  98. .B --lower-include
  99. When the file corresponding to an include statement (or other form of file reference
  100. for resource files) cannot be found, convert that filename to lowercase. This is the default.
  101. .TP
  102. .B --nolower-include
  103. Do not modify the include statement if the referenced file cannot be found.
  104. .TP
  105. .BR "--guiexe " "| " "--windows"
  106. Assume a graphical application when an executable target or a target of
  107. unknown type is found. This is the default.
  108. .TP
  109. .BR "--cuiexe " "| " "--console"
  110. Assume a console application when an executable target or a target of
  111. unknown type is found.
  112. .TP
  113. .B --dll
  114. Assume a dll when a target of unknown type is found, i.e. when \fBwinemaker\fR is unable to
  115. determine whether it is an executable, a dll, or a static library,
  116. .TP
  117. .B --lib
  118. Assume a static library when a target of unknown type is found, i.e. when \fBwinemaker\fR is
  119. unable to determine whether it is an executable, a dll, or a static library,
  120. .TP
  121. .B --mfc
  122. Specify that the targets are MFC based. In such a case \fBwinemaker\fR adapts
  123. the include and library paths accordingly, and links the target with the
  124. MFC library.
  125. .TP
  126. .B --nomfc
  127. Specify that targets are not MFC-based. This option disables use of MFC libraries
  128. even if \fBwinemaker\fR encounters files \fIstdafx.cpp\fR or \fIstdafx.h\fR that would cause it
  129. to enable MFC automatically if neither \fB--nomfc\fR nor \fB--mfc\fR was specified.
  130. .TP
  131. .BI -D macro "\fR[\fB=\fIdefn\fR]"
  132. Add the specified macro definition to the global list of macro definitions.
  133. .TP
  134. .BI -I dir
  135. Append the specified directory to the global include path.
  136. .TP
  137. .BI -P dir
  138. Append the specified directory to the global dll path.
  139. .TP
  140. .BI -i dll
  141. Add the Winelib library to the global list of Winelib libraries to import.
  142. .TP
  143. .BI -L dir
  144. Append the specified directory to the global library path.
  145. .TP
  146. .BI -l library
  147. Add the specified library to the global list of libraries to link with.
  148. .TP
  149. .B --nodlls
  150. Do not use the standard set of Winelib libraries for imports.
  151. That is, any DLL your code uses must be explicitly passed with \fB-i\fR options.
  152. The standard set of libraries is: \fIodbc32.dll\fR, \fIodbccp32.dll\fR, \fIole32.dll\fR,
  153. \fIoleaut32.dll\fR and \fIwinspool.drv\fR.
  154. .TP
  155. .B --nomsvcrt
  156. Set some options to tell \fBwinegcc\fR not to compile against msvcrt.
  157. Use this option if you have cpp-files that include \fI<string>\fR.
  158. .TP
  159. .B --interactive
  160. Use interactive mode. In this mode \fBwinemaker\fR will ask you to
  161. confirm the list of targets for each directory, and then to provide directory and
  162. target specific options.
  163. .TP
  164. .BI --single-target " name"
  165. Specify that there is only one target, called \fIname\fR.
  166. .TP
  167. .B --generated-files
  168. Generate the \fIMakefile\fR. This is the default.
  169. .TP
  170. .B --nogenerated-files
  171. Do not generate the \fIMakefile\fR.
  172. .TP
  173. .B --wine32
  174. Generate a 32-bit target. This is useful on wow64 systems.
  175. Without that option the default architecture is used.
  176. .SH EXAMPLES
  177. .PP
  178. Here is a typical \fBwinemaker\fR use:
  179. .PP
  180. $ winemaker --lower-uppercase -DSTRICT .
  181. .PP
  182. The above tells \fBwinemaker\fR to scan the current directory and its
  183. subdirectories for source files. Whenever if finds a file or directory which
  184. name is all uppercase, it should rename it to lowercase. It should then fix
  185. all these source files for compilation with Winelib and generate \fIMakefile\fRs.
  186. The \fB-DSTRICT\fR specifies that the \fBSTRICT\fR macro must be set when compiling
  187. these sources. Finally a \fIMakefile\fR will be created.
  188. .PP
  189. The next step would be:
  190. .PP
  191. $ make
  192. .PP
  193. If at this point you get compilation errors (which is quite likely for a
  194. reasonably sized project) then you should consult the Winelib User Guide to
  195. find tips on how to resolve them.
  196. .PP
  197. For an MFC-based project you would have to run the following commands instead:
  198. .PP
  199. $ winemaker --lower-uppercase --mfc .
  200. .br
  201. $ make
  202. .PP
  203. For an existing project-file you would have to run the following commands:
  204. .PP
  205. $ winemaker myproject.dsp
  206. .br
  207. $ make
  208. .PP
  209. .SH TODO / BUGS
  210. In some cases you will have to edit the \fIMakefile\fR or source files manually.
  211. .PP
  212. Assuming that the windows executable/library is available, we could
  213. use \fBwinedump\fR to determine what kind of executable it is (graphical
  214. or console), which libraries it is linked with, and which functions it
  215. exports (for libraries). We could then restore all these settings for the
  216. corresponding Winelib target.
  217. .PP
  218. Furthermore \fBwinemaker\fR is not very good at finding the library containing the
  219. executable: it must either be in the current directory or in the
  220. .BR LD_LIBRARY_PATH .
  221. .PP
  222. \fBwinemaker\fR does not support message files and the message compiler yet.
  223. .PP
  224. Bugs can be reported on the
  225. .UR https://bugs.winehq.org
  226. .B Wine bug tracker
  227. .UE .
  228. .SH AUTHORS
  229. François Gouget for CodeWeavers
  230. .br
  231. Dimitrie O. Paun
  232. .br
  233. André Hentschel
  234. .SH AVAILABILITY
  235. .B winemaker
  236. is part of the Wine distribution, which is available through WineHQ,
  237. the
  238. .UR https://www.winehq.org/
  239. .B Wine development headquarters
  240. .UE .
  241. .SH SEE ALSO
  242. .BR wine (1),
  243. .br
  244. .UR https://www.winehq.org/help
  245. .B Wine documentation and support
  246. .UE .