
                              Wine Documentation                               
Prev                                                                       Next
-------------------------------------------------------------------------------

Chapter 3. Installing/compiling Wine

Table of Contents
WWN #52 Feature: Replacing Windows
Installing Wine Without Windows
Dealing With FAT/VFAT Partitions
SCSI Support


How to install Wine...

WWN #52 Feature: Replacing Windows

Written by Ove Kven <ovek@winehq.com>

Installation Overview

A Windows installation consists of many different parts.

*Registry. Many keys are supposed to exist and contain meaningful data,
    even in a newly-installed Windows.
   
*Directory structure. Applications expect to find and/or install things in
    specific predetermined locations. Most of these directories are expected to
    exist. But unlike Unix directory structures, most of these locations are
    not hardcoded, and can be queried via the Windows API and the registry.
    This places additional requirements on a Wine installation.
   
*System DLLs. In Windows, these usually reside in the system (or system32)
    directories. Some Windows applications check for their existence in these
    directories before attempting to load them. While Wine is able to load its
    own internal DLLs (.so files) when the application asks for a DLL, Wine
    does not simulate the existence of nonexisting files.
   

While the users are of course free to set up everything themselves, the Wine
team will make the automated Wine installation script, tools/wineinstall, do
everything we find necessary to do; running the conventional configure && make
depend && make && make install cycle is thus not recommended, unless you know
what you're doing. At the moment, tools/wineinstall is able to create a
configuration file, install the registry, and create the directory structure
itself.

The Registry

The default registry is in the file winedefault.reg. It contains directory
paths, class IDs, and more; it must be installed before most INSTALL.EXE or
SETUP.EXE applications will work. The registry is covered in more detail in an
earlier article.

Directory Structure

Here's the fundamental layout that Windows applications and installers expect.
Without it, they seldom operate correctly.

C:                             Root directory of primary disk drive         
\                                                                              
  Windows\                     Windows directory, containing .INI files,    
                                  accessories, etc                             
             System\           Win3.x/95/98/MEdirectoryforcommonDLLs    
                                  WinNT/2000directoryforcommon16-bitDLLs  
             System32\         WinNT/2000 directory for common 32-bit DLLs  
             Start             Program launcher directory structure         
               Menu\                                                           
                      Programs Program launcher links (.LNK files) to       
                         \        applications                                 
  Program                      Application binaries (.EXE and .DLL files)   
   Files\                                                                      


Wine emulates drives by placing their virtual drive roots to user-configurable
points in the Unix filesystem, so it's your choice where C:'s root should be
(tools/wineinstall will even ask you). If you choose, say, /var/wine, as the
root of your virtual drive C, then you'd put this in your ~/.wine/config:
[Drive C]                                                                      
"Path" = "/var/wine"                                                           
"Type" = "hd"                                                                  
"Label" = "MS-DOS"                                                             
"Filesystem" = "win95"                                                         
                                                                               

With this configuration, what windows apps think of as "c:\windows\system"
would map to /var/wine/windows/system in the UNIX filesystem. Note that you
need to specify "Filesystem" = "win95", NOT "Filesystem" = "unix", to make Wine
simulate a Windows-compatible (case-insensitive) filesystem, otherwise most
apps won't work.

System DLLs

The Wine team has determined that it is necessary to create fake DLL files to
trick many applications that check for file existence to determine whether a
particular feature (such as Winsock and its TCP/IP networking) is available. If
this is a problem for you, you can create empty files in the system directory
to make the application think it's there, and Wine's built-in DLL will be
loaded when the application actually asks for it. (Unfortunately, tools/
wineinstall does not create such empty files itself.)

Applications sometimes also try to inspect the version resources from the
physical files (for example, to determine the DirectX version). Empty files
will not do in this case, it is rather necessary to install files with complete
version resources. This problem is currently being worked on. In the meantime,
you may still need to grab some real DLL files to fool these apps with.

And there are of course DLLs that wine does not currently implement very well
(or at all). If you do not have a real Windows you can steal necessary DLLs
from, you can always get some from a DLL archive such as http://solo.abac.com/
dllarchive/.
-------------------------------------------------------------------------------
Prev                                 Home                                  Next
Upgrading Wine with a                 Up                Installing Wine Without
Patch                                                                   Windows
