Typo
[linux_from_scratch_hints.git] / OLD / wine.txt
blob716a28bc379591c19726fa5af4c5d4d729e023c3
1 TITLE:          Compiling and configuring WINE
2 LFS VERSION:    any (done with 3.1)
3 AUTHOR:         Leslie Polzer <leslie.polzer@gmx.net>
5 SYNOPSIS:
6         This guide documents how to compile and install WINE on an LFS system.
8 HINT:
10 Contents
11 --------
12 1. What is WINE?
13 2. Requirements
14         2.1 Overview
15         2.2 Installation notes
16 3. Getting, configuring and compiling WINE
17 4. Postconfiguration
18 5. Running applications with WINE
19 6. Troubleshooting
20 7. References and pointers
23 1. What is WINE?
24 ----------------
25 WINE is, as stated on its website, a free implementation of Windows for
26 Unix - in other words a program that enables you to run Windows
27 applications on your Unix-Box quite comfortably.
28 WINE also comes with a library called WineLib with which you are able to
29 compile source-code using Windows system calls, but since open-source is
30 not a big issue in the Windows world (most open-source stuff there comes
31 from ported Unix apps anyway) we won't discuss it here.
33 IMPORTANT: I assume that you have a native Microsoft Windows installation on
34 a separate partition and that it is mounted.
35 I do not have any experience with a full Windows replacement and won't give
36 you instructions on how to do this, because I don't like talking or even
37 giving advice about topics I am not competent enough with.
40 2. Requirements
41 ---------------
44 2.1 Overview
45 ------------
46 - X11R6, most likely the XFree86 implementation - see the xfree86* hints.
47 - Freetype2, if you want True Type support, which I assume.
48 - OpenGL libraries and header files (that is, if you want OpenGL support!);
49         NVidia-users read nvidia_glx.txt, others install the Mesa libs:
50         http://prdownloads.sourceforge.net/mesa3d/MesaLib-4.0.4.tar.bz2?download
53 2.2 Installation notes
54 ----------------------
55 Modify the file
57         include/freetype/config/ftoption.h
59 in the Freetype2 source tree:
61 Change the line
63         #undef  TT_CONFIG_OPTION_BYTECODE_INTERPRETER
67         #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
69 and compile Freetype2 with the usual
71 ./configure --prefix=/usr/X11R6 --with-gnu-ld
72 make
73 make install
74 ldconfig
76 Be root when executing the last two commands.
79 3. Getting, configuring and compiling WINE
80 ------------------------------------------
81 Get the latest snapshot from
83         http://www.ibiblio.org/pub/Linux/ALPHA/wine/development/
85 Unpack with
87         tar xvfz Wine-xxxxxxxx.tar.gz
89 and cd to directory Wine-xxxxxxxx.
92 Now there is more than one way to do the installation.
93 You can either do configuring and compiling for yourself
94 or use tools/wineinstall. The latter method is more convenient,
95 because it automatically creates a configuration file and
96 is able to find your Windows partition (if it is mounted).
98 I will use a combination to get the best of both worlds :)
99 First, type
101 ./configure --help
103 read the available options and pick what you need.
104 Run configure again with these options and check whether
105 all you want (most notably Freetype2 and OpenGL) was found.
106 To get really sure that OpenGL support will be build, type
108         cat include/config.h | grep OPENGL
110 If the output of this command doesn't say
112         #define HAVE_OPENGL 1
114 OpenGL won't be built and there's a problem to fix!
116 NOTE: Remember to delete config.cache when re-configuring.
118 If you are content with the output of configure, enter
119 the directory tools and open the file 'wineinstall'
120 with your favorite editor. Skip the big comment block at the
121 beginning and look at the configuration defaults. You may want
122 to change 'CONFARGS' to reflect your desired configure options
123 (e.g. --enable-opengl) and 'prefix' to select the installation
124 prefix. If it is requested, I will provide sed statements and a
125 small script for this.
127 Bear with me, we're almost done:
128 Go back to the toplevel source dir, execute
130         tools/wineinstall
132 answer a few questions and get some coffee.
135 4. Postconfiguration
136 --------------------
137 Impatient people like me can go straight to step 5 and try
138 to start a simple application like Solitaire. If it doesn't
139 work or you want to know more about WINE configuration, you
140 can always return to this step.
142 Review the file ~/.wine/config with your favorite editor.
143 If you do not have this file (probably because you installed
144 WINE without wineinstall), copy
146         WINESOURCEDIR/documentation/samples/config
148 to ~/.wine/config
150 Comments in the config file are denoted with a semi-colon (;),
151 statements are terminated by a newline.
152 First section is about drives. Syntax example:
154         [Drive C]
155         "Path" = "/mnt/win"
156         "Type" = "hd"
157         "Filesystem" = "vfat"
159 You should use fstype 'vfat' for hard-disk partitions and
160 fstype 'win95' for Floppy disk and CD-ROM drives. I can't tell
161 you what type of fs you need to use with NTFS partitions, probably
162 it doesn't work with those as NTFS kernel support is still
163 considered experimental.
165 Next section is [wine] and contains essential configuration information.
166 Configuration format is like the one above:
168         "Variable" = "Value"
170 The relevant variables are:
172 windows - your Windows install directory, e.g.
173         "windows" = "C:\\win98"
175 system - your Windows system directory, e.g.
176         "system" = "C:\\win98\\system"
178 path - application search path, should be at the very least:
179         "path" = "C:\\win98\\system;C:\\win98;C:\\win98\\command"
181 temp - a directory for temporary files, most likely this:
182         "temp" = "/tmp"
185 If you want to know more about the configuration of WINE,
186 refer to reference [1].
189 5. Running applications with WINE
190 ---------------------------------
191 WINE is quite easy to use once it is installed the right way:
194 wine ping (using the path-variable)
195 wine ping.exe
196 wine c:\\win98\\ping.exe (assuming "C" is mapped to the windows partition)
197 wine /mnt/win/win98/ping.exe
199 You can pass commandline parameters like this:
201 wine ping.exe -- -t localhost
203 Use CTRL-C to interrupt as usual.
206 6. Troubleshooting
207 ------------------
208 Problem: Freetype-related files fail to compile
209 Solution: Remove _all_ old and conflicting versions of Freetype
210         (both libraries and header files).
211         Please note that XFree86 also brings a version of Freetype with
212         it. You can find its files in /usr/X11R6/lib and /usr/X11R6/include.
214 Any more questions go to leslie.polzer@gmx.net.
217 7. References and pointers
218 --------------------------
219 [1] The WINE homepage: http://www.winehq.org/
220 [2] Which applications work with WINE?
221         The Codeweavers AppDB: http://appdb.winehq.org/appbrowse.php
222 [3] The WINE FAQ: http://www.winehq.org/FAQ/
223 [4] Linux Half-Life: lhl.linuxgames.com
224 [5] Starcraft under WINE:
225         http://www.linuxgames.com/starcraft.php3
226         http://koti.mbnet.fi/~hoppq/sc-howto.html