wrc.man.in 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. .TH WRC 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
  2. .SH NAME
  3. wrc \- Wine Resource Compiler
  4. .SH SYNOPSIS
  5. .B wrc
  6. .RI [ options ]\ [ inputfile ...]
  7. .SH DESCRIPTION
  8. .B wrc
  9. compiles resources from \fIinputfile\fR
  10. into win16 and win32 compatible binary format.
  11. .PP
  12. The source file is preprocessed with a builtin ANSI\-C compatible
  13. preprocessor before the resources are compiled. See \fBPREPROCESSOR\fR
  14. below.
  15. .PP
  16. .B wrc
  17. takes a series of \fIinputfile\fR as argument. The resources are read from
  18. standard input if no inputfile is given. If the output file is not
  19. specified with \fB-o\fR, then \fBwrc\fR will write the output to
  20. \fIinputfile.res\fR with \fI.rc\fR stripped, or to \fIwrc.tab.res\fR if
  21. no inputfile was given.
  22. .SH OPTIONS
  23. .TP
  24. .BI \-b,\ --target= cpu-manufacturer\fR[\fI\fB-\fIkernel\fR]\fB-\fIos
  25. Specify the target CPU and platform on which the generated code will
  26. be built. The target specification is in the standard autoconf format
  27. as returned by \fBconfig.sub\fR.
  28. .TP
  29. .I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR]
  30. Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
  31. See also
  32. .B PREPROCESSOR
  33. below.
  34. .TP
  35. .I \fB\-\-debug\fR=\fInn\fR
  36. Set debug level to \fInn\fR. The value is a bitmask consisting of
  37. 1=verbose, 2=dump internals, 4=resource parser trace, 8=preprocessor
  38. messages, 16=preprocessor scanner and 32=preprocessor parser trace.
  39. .TP
  40. .I \fB\-\-endianness\fR=\fIe\fR
  41. Win32 only; set output byte\-ordering, where \fIe\fR is one of n[ative],
  42. l[ittle] or b[ig]. Only resources in source-form can be reordered. Native
  43. ordering depends on the system on which \fBwrc\fR was built. You can see
  44. the native ordering by typing \fIwrc \-h\fR.
  45. .TP
  46. .I \fB\-E\fR
  47. Preprocess only. The output is written to standard output if no
  48. outputfile was selected. The output is compatible with what gcc would
  49. generate.
  50. .TP
  51. .I \fB\-h\fR, \fB\-\-help\fR
  52. Prints a summary message and exits.
  53. .TP
  54. .I \fB\-i\fR, \fB\-\-input\fR=\fIfile\fR
  55. The name of the input file. If this option is not used, then \fBwrc\fR
  56. will use the first non-option argument as the input file name. If there
  57. are no non-option arguments, then \fBwrc\fR will read from standard input.
  58. .TP
  59. .I \fB\-I\fR, \fB\-\-include\-dir\fR=\fIpath\fR
  60. Add \fIpath\fR to include search directories. \fIpath\fR may contain
  61. multiple directories, separated with ':'. It is allowed to specify
  62. \fB\-I\fR multiple times. Include files are searched in the order in
  63. which the \fB\-I\fR options were specified.
  64. .br
  65. The search is compatible with gcc, in which '<>' quoted filenames are
  66. searched exclusively via the \fB\-I\fR set path, whereas the '""' quoted
  67. filenames are first tried to be opened in the current directory. Also
  68. resource statements with file references are located in the same way.
  69. .TP
  70. .I \fB\-J\fR, \fB\-\-input\-format\fR=\fIformat\fR
  71. Sets the input format. Valid options are 'rc' or 'rc16'. Setting the
  72. input to 'rc16' disables the recognition of win32 keywords.
  73. .TP
  74. .I \fB\-l\fR, \fB\-\-language\fR=\fIlang\fR
  75. Set default language to \fIlang\fR. Default is the neutral language 0
  76. (i.e. "LANGUAGE 0, 0").
  77. .TP
  78. .B \-m16, -m32, -m64
  79. Generate resources for 16-bit, 32-bit or 64-bit platforms respectively.
  80. The only difference between 32-bit and 64-bit is whether
  81. the _WIN64 preprocessor symbol is defined.
  82. .TP
  83. .I \fB\-\-nls-dir=\fIdir\fR
  84. Specify the directory to search for the NLS files containing the
  85. codepage mapping tables.
  86. .TP
  87. .I \fB\-\-nostdinc\fR
  88. Do not search the standard include path, look for include files only
  89. in the directories explicitly specified with the \fB\-I\fR option.
  90. .TP
  91. .I \fB\-\-no\-use\-temp\-file\fR
  92. Ignored for compatibility with \fIwindres\fR.
  93. .TP
  94. .I \fB\-o\fR, \fB\-fo\fR, \fB\-\-output\fR=\fIfile\fR
  95. Write output to \fIfile\fR. Default is \fBinputfile.res\fR
  96. with \fB.rc\fR stripped or \fBwrc.tab.res\fR if input is read
  97. from standard input.
  98. .TP
  99. .I \fB\-O\fR, \fB\-\-output\-format\fR=\fIformat\fR
  100. Sets the output format. The supported formats are \fBpo\fR, \fBpot\fR,
  101. \fBres\fR, and \fBres16\fR. If this option is not specified, the
  102. format defaults to \fBres\fR.
  103. .br
  104. In \fBpo\fR mode, if an output file name is specified it must match a
  105. known language name, like \fBen_US.po\fR; only resources for the
  106. specified language are output. If no output file name is specified, a
  107. separate \fI.po\fR file is created for every language encountered in the
  108. input.
  109. .TP
  110. .I \fB\-\-pedantic\fR
  111. Enable pedantic warnings. Notably redefinition of #define statements can
  112. be discovered with this option.
  113. .TP
  114. .I \fB\-\-po-dir=\fIdir\fR
  115. Enable the generation of resource translations based on mo files
  116. loaded from the specified directory. That directory must follow the
  117. gettext convention, in particular it must contain one \fI.mo\fR file for
  118. each language, and a LINGUAS file listing the available languages.
  119. .TP
  120. .I \fB\-r\fR
  121. Ignored for compatibility with \fIrc\fR.
  122. .TP
  123. .I \fB\-\-preprocessor\fR=\fIprogram\fR
  124. This option may be used to specify the preprocessor to use, including any
  125. leading arguments. If not specified, \fBwrc\fR uses its builtin processor.
  126. To disable preprocessing, use \fB--preprocessor=cat\fR.
  127. .TP
  128. .I \fB\-\-sysroot=\fIdir\fR
  129. Prefix the standard include paths with \fIdir\fR.
  130. .TP
  131. .I \fB\-\-utf8\fR, \fB\-u\fR
  132. Set the default codepage of the input file to UTF-8.
  133. .TP
  134. .I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
  135. Undefine preprocessor identifier \fIid\fR. Please note that only macros
  136. defined up to this point are undefined by this command. However, these
  137. include the special macros defined automatically by \fIwrc\fR.
  138. See also
  139. .B PREPROCESSOR
  140. below.
  141. .TP
  142. .I \fB\-\-use\-temp\-file\fR
  143. Ignored for compatibility with \fIwindres\fR.
  144. .TP
  145. .I \fB\-v\fR, \fB\-\-verbose\fR
  146. Turns on verbose mode (equivalent to \fB-d 1\fR).
  147. .TP
  148. .I \fB\-\-version\fR
  149. Print version and exit.
  150. .SH PREPROCESSOR
  151. The preprocessor is ANSI\-C compatible with some of the extensions of
  152. the gcc preprocessor.
  153. .PP
  154. The preprocessor recognizes these directives: #include, #define (both
  155. simple and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif,
  156. #error, #warning, #line, # (both null\- and line\-directive), #pragma
  157. (ignored), #ident (ignored).
  158. .PP
  159. The preprocessor sets by default several defines:
  160. .br
  161. RC_INVOKED set to 1
  162. .br
  163. __WRC__ Major version of wrc
  164. .br
  165. __WRC_MINOR__ Minor version of wrc
  166. .br
  167. __WRC_PATCHLEVEL__ Patch level
  168. .PP
  169. Win32 compilation mode also sets _WIN32 to 1.
  170. .PP
  171. Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
  172. recognized and expand to their respective equivalent.
  173. .SH "LANGUAGE SUPPORT"
  174. Language, version and characteristics can be bound to all resource types that
  175. have inline data, such as RCDATA. This is an extension to Microsoft's resource
  176. compiler, which lacks this support completely. Only VERSIONINFO cannot have
  177. version and characteristics attached, but languages are propagated properly if
  178. you declare it correctly before the VERSIONINFO resource starts.
  179. .PP
  180. Example:
  181. .PP
  182. 1 RCDATA DISCARDABLE
  183. .br
  184. LANGUAGE 1, 0
  185. .br
  186. VERSION 312
  187. .br
  188. CHARACTERISTICS 876
  189. .br
  190. {
  191. .br
  192. 1, 2, 3, 4, 5, "and whatever more data you want"
  193. .br
  194. '00 01 02 03 04 05 06 07 08'
  195. .br
  196. }
  197. .SH AUTHORS
  198. .B wrc
  199. was written by Bertho A. Stultiens and is a nearly complete rewrite of
  200. the first wine resource compiler (1994) by Martin von Loewis.
  201. Additional resource\-types were contributed by Ulrich Czekalla and Albert
  202. den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003.
  203. Bugfixes have been contributed by many Wine developers.
  204. .SH BUGS
  205. \- The preprocessor recognizes variable argument macros, but does not
  206. expand them correctly.
  207. .br
  208. \- Error reporting should be more precise, as currently the column and
  209. line number reported are those of the next token.
  210. .br
  211. \- Default memory options should differ between win16 and win32.
  212. .PP
  213. There is no support for:
  214. .br
  215. \- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
  216. .br
  217. \- PUSHBOX control is unsupported due to lack of original functionality.
  218. .PP
  219. Fonts are parsed and generated, but there is no support for the
  220. generation of the FONTDIR yet. The user must supply the FONTDIR
  221. resource in the source to match the FONT resources.
  222. .PP
  223. Bugs can be reported on the
  224. .UR https://bugs.winehq.org
  225. .B Wine bug tracker
  226. .UE .
  227. .SH AVAILABILITY
  228. .B wrc
  229. is part of the Wine distribution, which is available through WineHQ,
  230. the
  231. .UR https://www.winehq.org/
  232. .B Wine development headquarters
  233. .UE .
  234. .SH "SEE ALSO"
  235. .BR wine (1),
  236. .br
  237. .UR https://www.winehq.org/help
  238. .B Wine documentation and support
  239. .UE .