-->
Previous Table of Contents Next


How to Configure Wine Before Building

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

1.  Compilation configuration
2.  Runtime parameters
3.  Automatic system-specific configuration

The configure script begins with the following questions:


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

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

Initially Configuring Runtime Parameters with Configure

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


Which directory do you want to use as A:

Which directory do you want to use as C:

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 /c, then use /c. If you do not plan on using a floppy disk, do not worry if A: does not point to a valid directory.


Where is the Windows directory ’c:\windows\’

Where is the System directory ’c:\windows\system’

Where should Windows apps store temp files ’c:\windows\temp’

Which path should be used to find progs/DLL’s

’c:\windows;c:\windows\system’

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


Where is sysres.dll /usr/wine/sysres.dll’

The sysres.dll 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.


Where is COM1” CF_Com1 ’/dev/cua0’

Where is COM2” CF_Com2 ’/dev/cua1’

Where is LPT1” CF_Lpt1 ’/dev/lp0’

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.


Log messages to which file (CON = stdout) ’CON’

This defines where the system messages generated by Wine will go. Sending messages to CON sends them to stdout. 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 /dev/null. To make this the default action, use /dev/null for the log file.

Configure displays a long list of message types and poses the following question:

Exclude which messages from the log ’WM_SIZE;WM_TIMER’

If you don’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.

At this point, Configure 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:


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

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

Automatic System-specific Configuration

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

How to Build Wine

To build Wine, simply type


make

You’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 -lXext libraries for the final link to work, so install it from your CD-ROM first.

Using Wine

Using Wine can be as simple as typing wine filename. Wine can be configured and used with a number of different options—including a debugger for tracking down internal errors in Wine itself.

Specifying Configuration Parameters

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

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


[drives]

A=/a

C=/c

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


[wine]

Windows=c:\windows

System=c:\windows\system

Temp=c:\temp

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

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

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


[fonts]

system=*-helvetica

mssansserif=*-helvetica

msserif=*-times

fixedsys=*-fixed

arial=*-helvetica

helv=*-helvetica

roman=*-times

default=*-*

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


[serialports]

Com1=/dev/cua0

Com2=/dev/cua1

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


[parallelports]

Lpt1=/dev/lp0

These parameters determine the amount of logging and the destination:


[spy]

File=CON

Exclude=WM_SIZE;WM_TIMER


Previous Table of Contents Next