942-945.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 206 行

HTML
206
字号
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:The Wine Project</TITLE>

<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0672313723//-->

<!--TITLE=Linux Unleashed, Third Edition//-->

<!--AUTHOR=Tim Parker//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Sams//-->

<!--CHAPTER=59//-->

<!--PAGES=942-945//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="939-942.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="945-948.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">How to Configure Wine Before Building</FONT></H4>

<P>Wine must be configured before being built. The <TT>Configure</TT> utility prompts the user for the necessary information and automatically builds the appropriate configuration files. There are three major steps to configuring Wine:</P>

<DL>

<DD><B>1.</B>&nbsp;&nbsp;Compilation configuration

<DD><B>2.</B>&nbsp;&nbsp;Runtime parameters

<DD><B>3.</B>&nbsp;&nbsp;Automatic system-specific configuration

</DL>

<P>The configure script begins with the following questions:

</P>

<!-- CODE SNIP //-->

<PRE>

Build Wine as emulator or library (E/L) [E]?

Short filenames (Y/N) [N]?

Use the XPM library (Y/N) [N]?

Language [En/De/No] ?

Global configfile name /usr/local/etc/wine.conf

</PRE>

<!-- END CODE SNIP //-->

<P>It is safe to press Enter and accept the defaults for these questions. These parameters are added to a global configuration file, <TT>autoconf.h</TT>. If parameter changes are necessary, re-run <TT>Configure</TT>. To avoid errors, do not attempt to edit this file.</P>

<P><FONT SIZE="+1"><B>Initially Configuring Runtime Parameters with Configure</B></FONT></P>

<P>The questions in this section relate to lines in the global configuration file <TT>/usr/local/etc/wine.conf</TT>. Following each question is an explanation of its meaning.</P>

<!-- CODE SNIP //-->

<PRE>

Which directory do you want to use as A:

Which directory do you want to use as C:

</PRE>

<!-- END CODE SNIP //-->

<P>Answer these questions with the Linux directory where the MS-DOS A: and C: drive are mounted. If your disk partition on which MS-Windows is mounted is <TT>/c</TT>, then use <TT>/c</TT>. If you do not plan on using a floppy disk, do not worry if A: does not point to a valid directory.</P>

<!-- CODE SNIP //-->

<PRE>

Where is the Windows directory &#146;c:\windows\&#146;

Where is the System directory &#146;c:\windows\system&#146;

Where should Windows apps store temp files &#146;c:\windows\temp&#146;

Which path should be used to find progs/DLL&#146;s

&#146;c:\windows;c:\windows\system&#146;

</PRE>

<!-- END CODE SNIP //-->

<P>These directories should match where MS-Windows is installed on your MS-DOS partition. Because the default MS-Windows installation is in <TT>c:\windows</TT>, the default answers are usually sufficient.</P>

<!-- CODE SNIP //-->

<PRE>

Where is sysres.dll /usr/wine/sysres.dll&#146;

</PRE>

<!-- END CODE SNIP //-->

<P>The <TT>sysres.dll</TT> is a DLL that contains Wine-specific resources. These resources include bitmaps and dialog boxes for things like the About Wine menu item. The default value is sufficient here as well.</P>

<!-- CODE SNIP //-->

<PRE>

Where is COM1&#148; CF_Com1 &#146;/dev/cua0&#146;

Where is COM2&#148; CF_Com2 &#146;/dev/cua1&#146;

Where is LPT1&#148; CF_Lpt1 &#146;/dev/lp0&#146;

</PRE>

<!-- END CODE SNIP //-->

<P>As with DOSemu, the communication and printer ports under Wine can be configured as any similar port under Linux. For simplicity, it is best to map the COM and LPT ports to the same ones that appear under native MS-DOS.

</P>

<!-- CODE SNIP //-->

<PRE>

Log messages to which file (CON = stdout) &#146;CON&#146;

</PRE>

<!-- END CODE SNIP //-->

<P>This defines where the system messages generated by Wine will go. Sending messages to <TT>CON</TT> sends them to <TT>stdout</TT>. This is the most useful place because these messages can easily be redirected elsewhere. By default, Wine generates a lot of informational messages, which slows things down a bit. A casual user will probably want to redirect these messages to <TT>/dev/null</TT>. To make this the default action, use <TT>/dev/null</TT> for the log file.</P>

<TT>Configure</TT> displays a long list of message types and poses the following question:

<!-- CODE SNIP //-->

<PRE>

Exclude which messages from the log &#146;WM_SIZE;WM_TIMER&#146;

</PRE>

<!-- END CODE SNIP //-->

<P>If you don&#146;t care about any status messages from Wine, leave this as the default. Individual error messages can be turned on or off as well as redirected from the command line.

</P>

<P>At this point, <TT>Configure</TT> displays the global configuration file based on your responses to the questions. You will be asked if you want to edit the file using your default editor:</P>

<!-- CODE SNIP //-->

<PRE>

Do you want to edit it using vi (Y/N) [N]?

</PRE>

<!-- END CODE SNIP //-->

<P>You can always edit this file later with your favorite text editor, so it is safe to answer no to this question.

</P>

<P><FONT SIZE="+1"><B>Automatic System-specific Configuration</B></FONT></P>

<P>After the <TT>wine.conf</TT> file has been successfully built, the <TT>Configure</TT> utility proceeds to make changes to the source tree via the <TT>xmkmf</TT>. <TT>Xmkmf</TT> is a utility that creates <TT>makefiles</TT> for X Window and creates a <TT>Makefile</TT> from an <TT>Imakefile</TT> while taking into account the peculiarities of different X Window installations across UNIX-like platforms.</P>

<H4 ALIGN="LEFT"><A NAME="Heading8"></A><FONT COLOR="#000077">How to Build Wine</FONT></H4>

<P>To build Wine, simply type

</P>

<!-- CODE SNIP //-->

<PRE>

make

</PRE>

<!-- END CODE SNIP //-->

<P>You&#146;re done with the hard part of configuring Wine. However, building Wine seems like the longest part. To build Wine from scratch takes approximately eight minutes on a 90 MHz Pentium. You will also need the <TT>-lXext</TT> libraries for the final link to work, so install it from your CD-ROM first.</P>

<H3><A NAME="Heading9"></A><FONT COLOR="#000077">Using Wine</FONT></H3>

<P>Using Wine can be as simple as typing <TT>wine <I>filename</I></TT>. Wine can be configured and used with a number of different options&#151;including a debugger for tracking down internal errors in Wine itself.</P>

<H4 ALIGN="LEFT"><A NAME="Heading10"></A><FONT COLOR="#000077">Specifying Configuration Parameters</FONT></H4>

<P>Wine&#146;s global configuration file is typically <TT>/usr/local/etc/wine.conf</TT>. The configuration parameters match mostly with the above questions and are organized in the format of MS-Windows <TT>.ini</TT> files. A sample file follows, with some comments on the usage of each section.</P>

<P>The following statements map MS-DOS drive letters to the matching subdirectory under Linux:</P>

<!-- CODE SNIP //-->

<PRE>

[drives]

A=/a

C=/c

</PRE>

<!-- END CODE SNIP //-->

<P>These parameters tell Wine where to find Windows- and Wine-specific DLLs and directories:

</P>

<!-- CODE SNIP //-->

<PRE>

[wine]

Windows=c:\windows

System=c:\windows\system

Temp=c:\temp

Path=c:\windows;c:\windows\system

SystemResources=/users/wine/wine950122/sysres.dll

</PRE>

<!-- END CODE SNIP //-->

<P>The following section applies to the mapping of MS-Windows fonts to X font (note that the <TT>*</TT> is used for wildcard matching of X fonts):</P>

<!-- CODE //-->

<PRE>

[fonts]

system=*-helvetica

mssansserif=*-helvetica

msserif=*-times

fixedsys=*-fixed

arial=*-helvetica

helv=*-helvetica

roman=*-times

default=*-*

</PRE>

<!-- END CODE //-->

<P>The following section maps serial ports available under Wine with corresponding Linux serial port identifiers:

</P>

<!-- CODE SNIP //-->

<PRE>

[serialports]

Com1=/dev/cua0

Com2=/dev/cua1

</PRE>

<!-- END CODE SNIP //-->

<P>The following section maps printer ports available under Wine with the corresponding printer port under Linux:

</P>

<!-- CODE SNIP //-->

<PRE>

[parallelports]

Lpt1=/dev/lp0

</PRE>

<!-- END CODE SNIP //-->

<P>These parameters determine the amount of logging and the destination:

</P>

<!-- CODE SNIP //-->

<PRE>

[spy]

File=CON

Exclude=WM_SIZE;WM_TIMER

</PRE>

<!-- END CODE SNIP //-->

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="939-942.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="945-948.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?