Sie sind auf Seite 1von 27

This situation presents a fundamental problem for anyone who wants to run software for both Windows and Linux. A common solution to this problem is to install both operating systems on the same computer, known as "dual booting." When a Windows program is needed, the user boots the machine into Windows to run it; when a Linux program is then needed, the user then reboots the machine into Linux. This option presents great difficulty: not only must the user endure the frustration of frequent rebooting, but programs for both platforms can’t be run simultaneously. Having Windows on a system also creates an added burden: the software is expensive, requires a separate disk partition, and is unable to read most file system formats, making the sharing of data between operating systems difficult.

Different software programs are designed for different operating systems, and most won’t work on systems that they weren’t designed for. Windows programs, for example, won’t run in Linux because they contain instructions that the system can’t understand until they’re translated by the Windows environment. Linux programs, likewise, won’t run under the Windows operating system because Windows is unable to interpret all of their instructions.

Wine makes it possible to run Windows programs alongside any Unix-like operating system, particularly Linux. At its heart, Wine is an implementation of the Windows Application Programming Interface (API) library, acting as a bridge between the Windows program and Linux. Think of Wine as a compatibility layer, when a Windows program

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

1. INTRODUCTION

1.1 WINDOWS AND LINUX

1.2 WHAT IS WINE?

1

Wine is often used as a recursive acronym, standing for "Wine Is Not an Emulator". Sometimes it is also known to be used for "Windows Emulator" (An emulator duplicates (provides an emulation of) the functions of one system using a different system, so that the second system behaves like (and appears to be) the first system.). In a way, both meanings are correct, only seen from different perspectives. The first meaning says that Wine is not a virtual machine, it does not emulate a CPU, and you are not supposed to install Windows nor any Windows device drivers on top of it; rather, Wine is an implementation of the Windows API, and can be used as a library to port Windows applications to UNIX. The second meaning, obviously, is that to Windows binaries (.exe files), Wine does look like Windows, and emulates its behaviour and quirks rather closely.

Support for running Win32 (Win 95/98, NT/2000/XP), Win16 (Win 3.1) and DOS programs. Optional use of external vendor DLL files (such as those included with Windows). X11-based graphics display, allowing remote display to any X terminal, as well as a text mode console. Desktop-in-a-box or mixable windows. DirectX support for games.

tries to perform a function that Linux doesn’t normally understand, Wine will translate that program’s instruction into one supported by the system. For example, if a program asks the system to create a Windows pushbutton or text-edit field, Wine will convert that instruction into its Linux equivalent in the form of a command to the window manager using the standard X11 protocol.

Throughout the course of its development, Wine has continually grown in the features it carries and the programs it can run. A partial list of these features follows:

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

1.3 WINE FEATURES

2

Wine is an open source project, and there are accordingly many different versions of Wine for you to choose from. The standard version of Wine comes in intermittent releases (roughly twice a month), and can be downloaded over the internet in both prepackaged binary form and ready to compile source code form. Alternatively, we can install a development version of Wine by using the latest available source code from the Git repository.

Wine makes it possible to take advantage of all the UNIX strong points (stability, flexibility, remote administration) while still using the Windows applications you depend on.

UNIX has always made it possible to write powerful scripts. Wine makes it possible to call Windows applications from scripts that can also leverage the UNIX environment to its full extent.

Wine makes it economical to use thin clients: simply install Wine on a Linux server, and voila, you can access these Windows applications from any X terminal.

Wine can also be used to make existing Windows applications available on the Web by using VNC and its Java client.

Wine makes it possible to access Windows applications remotely, even if they are a few thousand miles away.

ASPI interface (SCSI) support for scanners, CD writers, and other devices. Advanced unicode and foreign language support.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

Modem, serial device support.

  • 1.4 WINE VERSIONS

  • 1.5 WINE BENEFITS

3

Wine is not small at all. WINE 1.0 have over 1.8 million lines of C code (with blank lines and comments), ~300,000 of which are tests, and ~87000 are related to Direct3D (a subset of DirectX) implementation [original research]. That's because what a UNIX program assumes to find in a system is much less that what a Windows application assumes to find (which are thousands of Windows APIs [10]).

Wine is Open Source Software, so you can extend it to suit your needs or have one of many companies do it for you.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

1.6 WINE SIZE

4

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

5

By far the easiest method for installing Wine is to use a prepackaged version of Wine. These packages contain ready-to-run Wine binary files specifically compiled for your distribution, and they are tested regularly by the packagers for both functionality and completeness. Packages are the recommended method for installing Wine. It is available at the WineHQ downloads page (http://www.winehq.org/site/download), and these are always the latest packages available. Being popular, Wine packages can also be found elsewhere in official distribution repositories. These can, however, sometimes be out of date, depending on the distribution. Packages are easily upgradable as well, and many distributions can upgrade Wine seamlessly with a few clicks. Building our own installable binary package from a source package is also possible.

Sometimes the Wine packages don’t fit our needs exactly. Perhaps they’re not available for our architecture or distribution, or perhaps we want to build wine using our own compiler optimizations or with some options disabled or perhaps we need to modify a specific part of the source code before compilation. Being an open source project, we are free to do all of these things with Wine’s source code, which is provided with every Wine release. This method of installation can be done by downloading a Wine source archive and compiling from the command line. Getting Wine source archives is simple. Every release, a source package in

Dept.of Computer Science CAS, Calicut

2. WINE INSTALLATION METHODS

Seminar Report ’09 WINE

  • 2.2 INSTALLATION FROM A SOURCE ARCHIVE

  • 2.1 INSTALLATION FROM A PACKAGE

6

If we wish to help develop Wine yourself, we can download the very latest source code from Git repository. Instructions for downloading from the Wine Git repository are available at http://www.winehq.org/site/git (http://www.winehq.org/site/git). The source code on the Git repository is largely untested and may not even compile properly. It is, however, the best way to test out how Wine will work in the next version, and if we’re modifying source code it’s best to get the latest copy. The Git repository is also useful for application maintainers interested in testing if an application will still work right for the next release, or if a recent patch actually improves things.

Compressed tar.bz2 format is provided at the WineHQ downloads page (http://www.winehq.org/site/download). Compiling and installing Wine from source is slightly more difficult than using a package.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

2.3 INSTALLATION FROM A GIT TREE

7

Wine works on a huge amount of different Linux distributions, as well other Unix-like systems such as Solaris and FreeBSD, each with their own specific way of installing and managing packages. Fortunately, however, the same general ideas apply to all of them, and installing Wine should be no more difficult than installing any other software, no matter what distribution you use. Uninstalling Wine packages is simple as well, and in modern Linux distributions are usually done through the same easy interface as package installation.

Installing a package on a fresh system is remarkably straightforward. Simply download and install the package using whatever utility your distribution provides. There is usually no need to explicitly remove old packages before installing, as modern Linux distributions should upgrade and replace them automatically. If we installed Wine from source code, however, you should remove it before installing a Wine package.

Dept.of Computer Science CAS, Calicut

3. INSTALLING WINE FROM A PACKAGE

Seminar Report ’09 WINE

  • 3.1 INSTALLING A FRESH PACKAGE

  • 3.2 DIFFERENT DISTRIBUTIONS

8

Wine makes use of many open source libraries during its operation. While Wine is not strictly dependent on these libraries and will compile without most of them, much of Wine’s functionality is improved by having them available at compile time. In the past, many user problems were caused by people not having the necessary development libraries when they built Wine from source; because of this reason and others, we highly recommend installing via binary packages or by building source packages which can automatically satisfy their build dependencies. If you wish to install build dependencies by hand, there are several ways to see if you’re missing some useful development libraries. The most straightforward approach is to watch the configure program’s output before you compile Wine and see if anything important is missing; if it is, simply install what’s missing and rerun configure before compiling.

Likewise, some applications require specific libraries in order to run. Wine reproduces the Windows system libraries (so-called native DLL’s) with completely custom versions designed to function exactly the same way but without requiring licenses from Microsoft.

Before installing Wine from source, make sure you uninstall any Wine binary packages you may have on your system. Installing from source requires use of the terminal window as well as a full copy of the Wine source code.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

4. INSTALLATION FROM SOURCE

4.1 GETTING THE BUILD DEPENDENCIES

4.2 LIBRARY SETTINGS

9

Wine has many known deficiencies in its built-in versions, but in many instances the functionality is sufficient. Using only built-in DLL’s ensures that your system is Microsoft-free. However, Wine has the ability to load native Windows DLL’s.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

10

Dept.of Computer Science CAS, Calicut Seminar Report ’09 WINE 5.1 WINDOWS NT ARCHITECTURE 5. ARCHITECTURE 11

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

5.1 WINDOWS NT ARCHITECTURE

5. ARCHITECTURE

11

Wine implementation is closer to the Windows NT architecture. Dept.of Computer Science CAS, Calicut Seminar Report

Wine implementation is closer to the Windows NT architecture.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

5.2 WINE ARCHITECTURE

12

Wine must at least completely replace the "Big Three" DLL (KERNEL/KERNEL32, GDI/GDI32, and USER/USER32), which all other DLLs are layered on top of. But since Wine is (for various reasons) leaning towards the NT way of implementing things, the NTDLL is another core DLL to be implemented in Wine, and many KERNEL32 and ADVAPI32 features will be implemented through the NTDLL.

The Wine server provides the backbone for the implementation of the core DLLs. It mainly implements inter-process synchronization and object sharing. It can be seen, from a functional point of view, as a NT kernel (even if the APIs and protocols used between Wine’s DLL and the Wine server are Wine specific).

All DLLs provided by Wine try to stick as much as possible to the exported APIs from the Windows platforms.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

13

Information about wine.

Wine can be downloaded from here.

Provides help.

Provides development reports.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

Wine homepage can be found at:

6. WINE HQ

It gives:

14

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

7. COMMAND LINE

7.1 OPTIONS

15

Dept.of Computer Science CAS, Calicut Seminar Report ’09 WINE 7. COMMAND LINE 7.1 OPTIONS 15
Command line can be used for installing wine (alternatively used). $sudo apt-get install wine  wine

Command line can be used for installing wine (alternatively used). $sudo apt-get install wine

wine --help

Shows a small command line help page.

wine --version

Shows the Wine version string. Useful to verify your installation. Command line options are entered in the terminal.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

7.2 INSTALLING FROM TERMINAL

16

Simply enter the following in the terminal window :- $sudo apt-get uninstall wine Dept.of Computer Science

Simply enter the following in the terminal window :- $sudo apt-get uninstall wine

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

7.3 UNINSTALLING FROM TERMINAL

17

Rather than installing an entirely new operating system on your machine, we can instead run a virtual machine at the software level and install a different operating system on it. Thus, we could run a Linux system and at the same time run Windows along with your application in a virtual machine simultaneously on the same hardware. Virtual machines allow us to install and run not only different versions of Windows on the same hardware, but also other operating systems, including ReactOS. There are several different virtual machine offerings out there, and some are also able to emulate x86 hardware on different platforms. The open source Bochs (http://bochs.sourceforge.net/) and QEMU (http://www.qemu.org/) can run both Windows

Probably the most obvious method of getting a Windows application to run is to simply run it on Windows. However, security, license cost, backward-compatibility, and machine efficiency issues can make this a difficult proposition, which is why Wine is so useful in the first place. Another alternative is to use ReactOS (http://www.reactos.com), which is a fully open source alternative to Windows. ReactOS shares code heavily with the Wine project, but rather than running Windows applications on top of Linux they are instead run on top of the ReactOS kernel. ReactOS also offers compatibility with Windows driver files, allowing the use of hardware without functional Linux drivers.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

8. ALTERNATIVES TO WINE

8.1 ANOTHER OPERATING SYSTEM

8.2 VIRTUAL MACHINES

18

and ReactOS virtually. Other, commercial virtual machine offerings include Vmware (http://www.vmware.com/) and Microsoft’s Virtual PC (http://www.microsoft.com/windows/virtualpc/). There are significant drawbacks to using virtual machines, however. Unlike Wine, such programs are emulators, so here is an inevitable speed decrease which can be quite substantial. Furthermore, running an application inside a virtual machine prevents fully integrating the application within the current environment. We won’t, for example, be able to have windows system tray icons or program shortcuts sitting alongside our desktop Linux ones, since instead the Windows applications must reside completely within the virtual machine.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

19

An error occurred while trying to open an .exe file before installing Wine software. Dept.of Computer

An error occurred while trying to open an .exe file before installing Wine software.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

9. SCREEN SHOTS ON WINE

20

Dept.of Computer Science CAS, Calicut Wine installation through a package by clicking on it. Seminar Report

Dept.of Computer Science CAS, Calicut

Wine installation through a package by clicking on it.

Seminar Report ’09 WINE

21

After Wine installation. Now there is a new place for Wine under the ‘Applications’ menu. Dept.of

After Wine installation. Now there is a new place for Wine under the ‘Applications’ menu.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

22

Installation of VLC media player in Ubuntu using Wine software. Dept.of Computer Science CAS, Calicut Seminar

Installation of VLC media player in Ubuntu using Wine software.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

23

VLC media player working in Ubuntu (Linux) environment due to Wine. Dept.of Computer Science CAS, Calicut

VLC media player working in Ubuntu (Linux) environment due to Wine.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

24

Uninstalling of software’s that were installed using Wine also can be done. Dept.of Computer Science CAS,

Uninstalling of software’s that were installed using Wine also can be done.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

25

Wine is not complete, because it faces up with problems like catching up with more recent Windows systems. For example (not saying this have actually happened) when they completely supported Windows 95 applications, they were struck by XP, and then the XP SP1 and Windows 2000 (there are many editions in middle). Wine development is indeed much slower than the real development pace of the real Windows (thousands of organized developers vs. hundreds of random contributers-700 have contributed to Wine).

Hope that Wine will overcome all its disadvantages and result in an all- round development of Linux systems.

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

10. CONCLUSION

26

Dept.of Computer Science CAS, Calicut

Seminar Report ’09 WINE

11. BIBLIOGRAPHY

27