Wednesday, May 25, 2011

Installing Wine in Linux Mint 11 [Reference Page]

Introduction to Wine

Wine is a compatibility layer that allows your system to run Windows binaries that allows the binaries to call Windows APIs that are implemented in DLLs.

Wine is not entirely an emulator like VirtualBox in a couple of ways.  First, you do not need to install any of the Windows operating systems to run a program that requires a particular Windows API.  You can achieve this effect without owning a copy of Windows.  Second, an emulator slows the system down by emulating an entirely new operating system for the processes to go through.  By taking just the libraries of Windows and the speed of a Linux system, you can sometimes gain speed over running a program in Windows.

It should be said that Wine has to convert Direct3D games to OpenGL for them to run properly in Linux.  This can cause a performance hit of varying degrees for games that are not available in OpenGL.  Now, games that have an OpenGL setting are more likely to be able to outperform Windows due to the fact that Wine does not have to use processes converting the Direct3D to OpenGL before you see it.

Installing the Latest Version of Wine

To install the latest version of Wine in Linux Mint 11 enter the three commands below in terminal:

sudo apt-add-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.3

Configuring Wine and Winetricks

Under All Applications -> Wine you will have two applications installed that will help you configure Wine to run Windows executables.  The first is called "Configure Wine" that allows you to specify the operating system to emulate, which DLLs to have installed (ex. Direct3D 9), shader and audio options.

The next application will let you automatically install some applications, games, and benchmark tools.  It also is capable of downloading and installing required programs (wine prefix -> Install a...)  such as DirectX and Visual C++

What Programs Run in Wine?  (And How Well)

While Wine is constantly being improved, there are many factors that will determine how well your application runs in Wine.  A 32- or 64-bit operating system or version of a software can both cause problems or work better than the other.  Also the distribution of Linux that you're running can have an effect on the your application due to the libraries available.  For example, Gentoo may run application A and not B, but Linux Mint may work in the opposite manner.  This is why there is a searchable database located at WineHQ where people contribute their bug reports, installation instructions, and provide a grade to the applications.  The grading system is as follows (from worst to best): garbage, bronze, silver, gold, and platinum.

Installing an Application Using Wine

[Simple Version] It has become very easy to install an application using Wine using the graphical interface of Linux Mint 11.  Once you have downloaded your .exe file, all you have to do is right click on it and select "Open With Wine Windows Program Loader."  This will start the process of installing the application like you would normally in Windows into the default wine prefix.  All programs in the default wine prefix share wine settings, such as installed DLLs and their settings.

[Advanced Version]  To install a program into a "bottle" and give your application a different configuration file you need can install and run an installer, set up wine, and run the actual program by following these 3 commands:

env WINEPREFIX="/home/name/.wine-program" wine install.exe
env WINEPREFIX="/home/name/.wine-program" winecfg
env WINEPREFIX="/home/name/.wine-program" wine /home/user/.wine/dosdevices/c:/location/to/.exe

For the name, you should use the username on your account and for the program, you can set it to anything and use it for multiple installations. Below is a sample image showing two different ways you could set your programs up. The left two are games, right two are applications. This is just an example though, you could combine them in any manner that you want or not at all.

*** BUG INFORMATION *** When you install a program with Wine, you will get an application installed in the MintMenu that will error out.  There is a work around where you can put a small gnome menu icon on your tray (or use a launch shortcut from your desktop) to launch all of your programs that have been installed through Wine.  To add a Gnome Menu, right click on a blank spot on your task bar and click "Add to Panel" and then add "Main Menu" to your task bar.  Click on it, and you will find your applications installed in Wine -> Programs.

No comments:

Post a Comment