Document [WinMM] drivers options.
[wine] / documentation / running.sgml
1   <chapter id="running">
2     <title>Running Wine</title>
3
4     <para>
5       Written by &name-john-sheets; <email>&email-john-sheets;</email>
6     </para>
7     <para>
8       Extended by &name-mike-hearn; <email>&email-mike-hearn;</email>
9     </para>
10
11     <sect1 id="basic-usage">
12       <title>Basic usage: applications and control panel applets</title>
13       <para>
14         Assuming you are using a fake windows installation, you install
15         applications into Wine in the same way you would in Windows:
16         by running the installer. You can just accept the defaults
17         for where to install, most installers will default to "C:\Program Files",
18         which is fine. If the application installer requests it, you may find that
19         Wine creates icons on your desktop and in your app menu. If that happens, you
20         can start the app by clicking on them.
21       </para>
22
23       <para>
24         The standard way to uninstall things is for the application to provide an
25         uninstaller, usually registered with the "Add/Remove Programs" control panel
26         applet. Unfortunately as of the time of writing, Wine doesn't provide an
27         Add/Remove control panel applet, so you'll have to run the uninstall manually, either
28         from the menu or from the command line.
29       </para>
30
31       <para>
32         Some programs install associated control panel applets, examples of this would be
33         Internet Explorer and QuickTime. You can access the Wine control panel by running:
34       </para>
35
36       <screen>
37          <prompt>$</prompt> <userinput>wine control</userinput>
38       </screen>
39
40       <para>
41         which will open a window with the installed control panel applets in it, as in Windows.
42       </para>
43
44       <para>
45         If the application doesn't install menu or desktop items, you'll need to run the app
46         from the command line. Remembering where you installed to, something like:
47       </para>
48
49       <screen>
50          <prompt>$</prompt> <userinput>wine "c:\program files\appname\appname.exe"</userinput>
51       </screen>
52
53       <para>
54         will probably do the trick. The path isn't case sensitive, but remember to include the double quotes.
55         Some programs don't always use obvious naming for their directories and EXE files, so you might have
56         to look inside the program files directory to see what it put where
57       </para>
58     </sect1>
59     
60     <sect1 id="running-wine">
61       <title>How to run Wine</title>
62       <para>
63         Wine is a very complicated piece of software with many ways to
64         adjust how it runs.  With very few exceptions, you can
65         activate the same set of features through the <link
66         linkend="configuring">configuration file </link> as you can
67         with command-line parameters.  In this chapter, we'll briefly
68         discuss these parameters, and match them up with their
69         corresponding configuration variables.
70       </para>
71
72       <para>
73         You can invoke the <command>wine --help</command> command to
74         get a listing of all Wine's command-line parameters:
75       </para>
76       <para>
77         <screen>
78 Usage: ./wine [options] program_name [arguments]
79
80 Options:
81    --debugmsg name  Turn debugging-messages on or off
82    --dll name       Enable or disable built-in DLLs
83    --help,-h        Show this help message
84    --version,-v     Display the Wine version
85         </screen>
86       </para>
87
88       <para>
89         You can specify as many options as you want, if any.
90         Typically, you will want to have your configuration file set
91         up with a sensible set of defaults; in this case, you can run
92         <command>wine</command> without explicitly listing any
93         options.  In rare cases, you might want to override certain
94         parameters on the command line.
95       </para>
96       <para>
97         After the options, you should put the name of the file you
98         want <command>wine</command> to execute.  If the executable is
99         in the <parameter>Path</parameter> parameter in the
100         configuration file, you can simply give the executable file
101         name.  However, if the executable is not in
102         <parameter>Path</parameter>, you must give the full path to
103         the executable (in Windows format, not UNIX format!).  For
104         example, given a <parameter>Path</parameter> of the following:
105       </para>
106       <screen>
107 [wine]
108 "Path"="c:\\windows;c:\\windows\\system;e:\\;e:\\test;f:\\"
109       </screen>
110       <para>
111         You could run the file
112         <filename>c:\windows\system\foo.exe</filename> with:
113       </para>
114       <screen>
115 <prompt>$</prompt> <userinput>wine foo.exe</userinput>
116       </screen>
117       <para>
118         However, you would have to run the file
119         <filename>c:\myapps\foo.exe</filename> with this command:
120       </para>
121       <screen>
122 <prompt>$</prompt> <userinput>wine c:\\myapps\\foo.exe</userinput>
123       </screen>
124       <para>
125       (note the backslash-escaped "\" !)
126       </para>
127
128       <para>
129         If you want to run a console program (aka a CUI executable), use
130         <command>wineconsole</command> instead of <command>wine</command>
131         to start it. It will display the program in a separate Window
132         (this requires X11 to be run). If you don't, you'll still be able
133         to run your program directly in the Unix console where you started it,
134         but with very limited capacities (so your program might work,
135         but your mileage may vary). This shall be improved in the future.
136       </para>
137     </sect1>
138
139     <sect1 id="command-line-options">
140       <title>Command-Line Options</title>
141
142       <sect2 id="config-parameter">
143         <title>--debugmsg [channels]</title>
144         <para>
145           Wine isn't perfect, and many Windows applications still
146           don't run without bugs under Wine (but then, a lot of programs
147           don't run without bugs under native Windows either!).  To
148           make it easier for people to track down the causes behind
149           each bug, Wine provides a number of <firstterm>debug
150           channels</firstterm> that you can tap into.
151         </para>
152         <para>
153           Each debug channel, when activated, will trigger logging
154           messages to be displayed to the console where you invoked
155           <command>wine</command>.  From there you can redirect the
156           messages to a file and examine it at your leisure.  But be
157           forewarned!  Some debug channels can generate incredible
158           volumes of log messages.  Among the most prolific offenders
159           are <parameter>relay</parameter> which spits out a log
160           message every time a win32 function is called,
161           <parameter>win</parameter> which tracks windows message
162           passing, and of course <parameter>all</parameter> which is
163           an alias for every single debug channel that exists.  For a
164           complex application, your debug logs can easily top 1 MB and
165           higher.  A <parameter>relay</parameter> trace can often
166           generate more than 10 MB of log messages, depending on how
167           long you run the application.  (As described in the
168           <link linkend = "config-debug-etc">Debug</link>
169           section of configuring wine you can 
170           modify what the <parameter>relay</parameter> trace reports).
171           Logging does slow down Wine
172           quite a bit, so don't use <parameter>--debugmsg</parameter>
173           unless you really do want log files.
174         </para>
175         <para>
176           Within each debug channel, you can further specify a
177           <firstterm>message class</firstterm>, to filter out the
178           different severities of errors.  The four message classes
179           are:
180           <simplelist type="inline">
181             <member><parameter>trace</parameter></member>
182             <member><parameter>fixme</parameter></member>
183             <member><parameter>warn</parameter></member>
184             <member><parameter>err</parameter></member>
185           </simplelist>.
186         </para>
187         <para>
188           To turn on a debug channel, use the form
189           <parameter>class+channel</parameter>.  To turn it off, use
190           <parameter>class-channel</parameter>.  To list more than one
191           channel in the same <parameter>--debugmsg</parameter>
192           option, separate them with commas.  For example, to request
193           <parameter>warn</parameter> class messages in the
194           <parameter>heap</parameter> debug channel, you could invoke
195           <command>wine</command> like this:
196         </para>
197         <screen>
198 <prompt>$</prompt> <userinput>wine --debugmsg warn+heap <replaceable>program_name</replaceable></userinput>
199         </screen>
200         <para>
201           If you leave off the message class, <command>wine</command>
202           will display messages from all four classes for that channel:
203         </para>
204         <screen>
205 <prompt>$</prompt> <userinput>wine --debugmsg +heap <replaceable>program_name</replaceable></userinput>
206         </screen>
207         <para>
208           If you wanted to see log messages for everything except the
209           relay channel, you might do something like this:
210         </para>
211         <screen>
212 <prompt>$</prompt> <userinput>wine --debugmsg +all,-relay <replaceable>program_name</replaceable></userinput>
213         </screen>
214         <para>
215           Here is a master list of all the debug channels and classes
216           in Wine.  More channels will be added to (or subtracted
217           from) later versions.
218         </para>
219
220                 <table frame="none"><title>Debug Channels</title>
221                 <tgroup cols=5 align="left">
222                 <tbody>
223 <row><entry>
224 all</><entry>accel</><entry>advapi</><entry>animate</><entry>aspi</>
225 </row><row><entry>
226 atom</><entry>avifile</><entry> bitblt</><entry> bitmap</><entry> caret</>
227 </row><row><entry>
228 cdrom</><entry>class</><entry> clipboard</><entry> clipping</><entry>combo</>
229 </row><row><entry>
230 comboex</><entry> comm</><entry>commctrl</><entry>commdlg</><entry> console</>
231 </row><row><entry>
232 crtdll</><entry>cursor</><entry>datetime</><entry>dc</><entry> ddeml</>
233 </row><row><entry>
234 ddraw</><entry> debug</><entry> debugstr</><entry>delayhlp</><entry>dialog</>
235 </row><row><entry>
236 dinput</><entry>dll</><entry> dosfs</><entry>dosmem</><entry>dplay</>
237 </row><row><entry>
238 driver</><entry>dsound</><entry>edit</><entry>elfdll</><entry>enhmetafile</>
239 </row><row><entry>
240 event</><entry>exec</><entry>file</><entry>fixup</><entry>font</>
241 </row><row><entry>
242 gdi</><entry> global</><entry>graphics</><entry> header</><entry>heap</>
243 </row><row><entry>
244 hook</><entry>hotkey</><entry>icmp</><entry>icon</><entry>imagehlp</>
245 </row><row><entry>
246 imagelist</><entry> imm</><entry>int</><entry>int10</><entry>int16</>
247 </row><row><entry>
248 int17</><entry>int19</><entry>int21</><entry>int31</><entry> io</>
249 </row><row><entry>
250 ipaddress</><entry>joystick</><entry>key</><entry>keyboard</><entry>loaddll</>
251 </row><row><entry>
252 ldt</><entry>listbox</><entry>listview</><entry>local</><entry>mci</>
253 </row><row><entry>
254 mcianim</><entry>mciavi</><entry>mcicda</><entry>mcimidi</><entry>mciwave</>
255 </row><row><entry>
256 mdi</><entry>menu</><entry>message</><entry>metafile</><entry>midi</>
257 </row><row><entry>
258 mmaux</><entry>mmio</><entry>mmsys</><entry>mmtime</><entry>module</>
259 </row><row><entry>
260 monthcal</><entry>mpr</><entry>msacm</><entry>msg</><entry>msvideo</>
261 </row><row><entry>
262 nativefont</><entry>nonclient</><entry>ntdll</><entry>odbc</><entry>ole</>
263 </row><row><entry>
264 opengl</><entry>pager</><entry>palette</><entry>pidl</><entry>print</>
265 </row><row><entry>
266 process</><entry>profile</><entry>progress</><entry>prop</><entry>propsheet</>
267 </row><row><entry>
268 psapi</><entry>psdrv</><entry>ras</><entry>rebar</><entry>reg</>
269 </row><row><entry>
270 region</><entry>relay</><entry>resource</><entry>richedit</><entry>scroll</>
271 </row><row><entry>
272 segment</><entry>seh</><entry>selector</><entry>sendmsg</><entry>server</>
273 </row><row><entry>
274 setupapi</><entry>setupx</><entry>shell</><entry>snoop</><entry>sound</>
275 </row><row><entry>
276 static</><entry>statusbar</><entry>storage</><entry>stress</><entry>string</>
277 </row><row><entry>
278 syscolor</><entry>system</><entry>tab</><entry>tape</><entry>tapi</>
279 </row><row><entry>
280 task</><entry>text</><entry>thread</><entry>thunk</><entry>timer</>
281 </row><row><entry>
282 toolbar</><entry>toolhelp</><entry>tooltips</><entry>trackbar</><entry>treeview</>
283 </row><row><entry>
284 ttydrv</><entry>tweak</><entry>typelib</><entry>updown</><entry>ver</>
285 </row><row><entry>
286 virtual</><entry>vxd</><entry>wave</><entry>win</><entry>win16drv</>
287 </row><row><entry>
288 win32</><entry>winedbg</><entry>wing</><entry>wininet</><entry>winsock</>
289 </row><row><entry>
290 winspool</><entry>wnet</><entry>x11</>
291 </row>
292                 </tbody>
293                 </tgroup>
294                 </table>
295
296         <para>
297           For more details about debug channels, check out the
298           <ulink url="http://wine.codeweavers.com/docs/wine-devel/">
299             The Wine Developer's Guide</ulink>.
300         </para>
301       </sect2>
302
303       <sect2>
304         <title>--dll</title>
305         <para>
306           Specifies whether to load the builtin or the native (if
307           available) version of a DLL.
308           Example:
309           <screen>
310 <prompt>$</prompt> <userinput>wine --dll setupx=n foo.exe</userinput>
311           </screen>
312           See the <link linkend="dll-config">DLL chapter</link> for more details.
313         </para>
314       </sect2>
315
316       <sect2>
317         <title>--help</title>
318         <para>
319           Shows a small command line help page.
320         </para>
321       </sect2>
322
323       <sect2>
324         <title>--version</title>
325         <para>
326           Shows the Wine version string. Useful to verify your installation.
327         </para>
328       </sect2>
329     </sect1>
330
331     <sect1 id="environment-variables">
332       <title>Setting Windows/DOS environment variables</title>
333       <para>
334         Your program might require some environment variable to be set
335         properly in order to run successfully.
336         In this case you need to set this environment variable in the
337         Linux shell, since Wine will pass on the entire shell environment
338         variable settings to the Windows environment variable space.
339         Example for the bash shell (other shells may have a different syntax
340         !):
341         <screen>
342           export MYENVIRONMENTVAR=myenvironmentvarsetting
343         </screen>
344         This will make sure your Windows program can access the
345         MYENVIRONMENTVAR environment variable once you start your program
346         using Wine.
347         If you want to have MYENVIRONMENTVAR set permanently, then you can
348         place the setting into /etc/profile, or also ~/.bashrc in the case of
349         bash.
350       </para>
351       <para>
352         Note however that there is an exception to the rule:
353         If you want to change the PATH environment variable, then of
354         course you can't modify it that way, since this will alter the
355         Unix PATH environment setting. Instead, you should set the
356         WINEPATH environment variable. An alternative way to
357         indicate the content of the DOS PATH environment variable would
358         be to change the "path" setting in the wine config file's <link
359         linkend="config-wine">[wine]</link> section.
360       </para>
361         
362     </sect1>
363
364   </chapter>
365
366 <!-- Keep this comment at the end of the file
367 Local variables:
368 mode: sgml
369 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")
370 End:
371 -->