What libraries are needed for wine games. Basic Wine setup. Choose to run winecfg

Wine is a free open source implementation of the Windows API. Wine is not an operating system or computer emulator, as can be characterized, for example, programs for virtualization (VirtualBox, VmWare etc.), which is also emphasized by the decoding of its name " Wine Is Not Emulator". Wine was created to reduce the degree of dependence on the activities and position of the corporation Microsoft, expanding the scope free operating systems due to the possibility run Windows programs.

Wine is not an emulator

In fact, Wine is a set of libraries and software tools that allows run Windows programs and similar to what she uses operating system from Microsoft... Part Wine software distribution also includes programs for its configuration (), a registry editor, a package of scripts, file manager, Notepad, etc. Quantity programs for Windows who today already run with Wine is large enough and constantly growing. At the address http://appdb.winehq.org there is a specialized database with marks on the compatibility of certain programs with Wine... Among fully compatible with Wine programs many office and multimedia programs, programs for enterprises and organizations, "1C" including graphics processing programs (including some versions of Adobe Photoshop etc.). The number of supported and natively compatible with Wine games.

Since emulation of any devices and during operation Wine does not occur, the speed of work compatible with Wine programs when using it, it is usually not lower than when working directly in Windows (and often higher).

Based on, or using components, Wine at different times such projects were created as Cedega(focused on launching games, first of all), CrossOver(focused on launching application programs) etc.

Installing Wine

Wine software package is most often part of modern Linux distributions (Ubuntu, Mint, Debian, openSUSE, etc.), and to find it and installations You most likely need to contact the management the software of your distribution.

Apt-get install wine To install WINE, execute in consoles as administrator, for Debian, Ubuntu, Mint, etc. zypper install wine wine-gecko For SUSE and openSUSE Linux.

Wine setup

For start Wine customization programs, call in the console, or shortcut dialog, winecfg (use " WINEPREFIX"). Winecfg customizes the appearance of Windows programs for example, it makes it possible to change the version of a set of libraries Windows (2000, XP, 2003, Vista, ...) etc.

Winetricks - additional settings, components and programs

Winetricks is a set of scripts written by developers Wine and the community to make it easier to make changes to some of the hidden Wine settings, installations some additional system libraries ( DirecX etc.) and popular programs for Windows, including Internet Explorer ( IE), several demos games etc.. Winetricks is usually included with the Wine distribution. To launch the main dialog box Winetricks execute in console, or shortcut dialog (keyboard shortcut " Alt + F2"), the command" winetricks". You can also use commands like winetricks directx9 in the console where "directx9"- the name of the component to be installed. To view a list of the component categories offered Winetricks to install, you can call winetricks list command, and to browse the lists of the contents of the categories themselves - winetricks apps list, where "apps"- the name of the required category.

Running Windows programs in Wine

Way running programs in Wine typical for working with any file, be it an image, a text file or an executable exe file in our case: you can simply run Windows executable (* .exe) from your file manager (double click, for example), or execute in the console command like wine ~ / Downloads / program.exe. You also can run windows programs through internal pathways Wine if they are located in directories mounted as system drives when starting the required profile ("prefix") Wine(be it the standard "~ / .wine / drive_c", or any other folders, tuned in You). In this case, the DOS address format is used. programs wine C: \\ Program \ Files \\ programm.exe.

A backslash "\" is added before special characters such as the same backslash or space.

Installing Windows programs in Wine

For Windows program installation, Respectively, you will need run its installer: wine setup.exe Next, you will need to go through the standard procedure installation of programs for Windows, which most often consists in multiple pressing of the "Next" button. One of the most interesting functional features Wine lies in the possibility of using profiles, or the so-called " prefixes", to install programs - independent copies of sets of system libraries, Windows programs and settings... Standard prefix Wine, i.e. the folder into which the default profile is written is ".wine" - a hidden folder inside the user's home directory. To use a separate "prefix", You need to create a new folder for it ( to reset the profile - delete its contents) and use the export of a global variable WINEPREFIX(as part of the team launching the Windows program, for installers, incl.)... For example WINEPREFIX = "/ home / user / .wine-programm" wine setup.exe. For installed Wine programs creates shortcuts in the local user (~ / .local / share / applications /) menu desktop (Gnome, KDE, XFCE etc.) using the necessary prefixes.

Wine is not a Windows emulator, just an alternative implementation of the Windows API. The program allows you to run most Windows applications on Linux, including games. So let's take a look and try to figure out what's what.

First, we will install the latest available version, at the moment it is Wine 1.6 RC4.
We open Terminal and enter:
sudo add-apt-repository ppa: ubuntu-wine / ppa
sudo apt-get update
sudo apt-get install wine

We open in Terminal settings:
winecfg

Open the tab Appearance and integration and change the paths for saving user folders to others, so that various game saves and other things are stored in a different place, and not in your home folders. You can, for example, specify a directory ~ / .wine / drive_c / docs /(this folder must first be created).


Now let's open the tab Disks and see how the entire root directory is available in Wine, which is not safe. We will not touch it for now, but in the future, when you install what you need, I recommend deleting the path to the root directory, just in case.


Next, run Winetricks through the menu or Terminal with the command:
winetricks

Now we will install the necessary libraries to run applications and games (keep the order of the list). Don't install everything at once, choose 2-3 items at a time. Please note where the item is Manual download, then you must download the installer yourself and copy it to the desired folder (wine will tell you where) to the cache ~ / .cache / winetricks / folder_name, restart winetricks and select the item again.

Install fonts, select Install a font:

  • corefonts


We put the necessary programs, choose Install a Windows DLL or component:
  • dotnet20
  • dotnet30(you need to download the file from the wine link and copy it to ~ / .cache / winetricks / dotnet30 and start again)
  • dotnet35(before installing, switch the Windows version in winecfg to Windows XP)
  • vcrun2003
  • vcrun2005
  • vcrun2008
  • vcrun2010
  • vcrun6
  • d3dx9
  • d3dx10
  • d3dx11_42
  • d3dx11_43
  • d3dxof
  • devenum
  • dinput8
  • directmusic
  • directplay
  • dxdiag
  • dxdiagn
  • winhttp
  • wininet
  • wmp9
  • wsh56js
  • xinput
  • xvid
  • vb5run
  • vb6run
  • physix
  • adobeair
  • flash


We set up the registry, select Change settings:
  • ddr = opengl
  • glsl = enabled
  • multisampling = enabled
  • mwo = enabled
  • orm = fbo
  • psm = enabled
  • rtlm = auto
  • sound = alsa
  • videomemorysize = 1024(select the memory size of your video card here)
  • vsm = hardware


The main Wine setup is complete! You can now install the Windows games and programs that you want to run on Kubuntu.
Note that not everything can work under Wine. Some programs may require additional libraries to run or work, as well as registry settings and other things, or they may not start at all due to lack of support for some function. If the program does not start, then run it through Terminal and Wine will give you an error log to help you, for example:
wine "/home/USER/.wine/drive_c/Program Files / Game / Game.exe"

Before installing a program or game, visit the Article devoted to Wine and all aspects of its use. The network is very
a lot of information, there are various setup guides and more. I AM
I will try to combine everything so that any person can achieve
maximum success, within the limits of their abilities and of course the possibilities
programs. So, let's begin.

Wine is a standalone Windows API implementation, not an emulator like most
think. It has been repeated more than once, but here it will be appropriate. This is what the project does
unique and interesting for users of various systems, opens up various
ways to implement your ideas. The uniqueness lies in the fact that using
this program can run Windows applications in Ubuntu and others
Linux systems, as well as FreeBSD and Mac OS X. True, there is
their "pitfalls". Some people think it will be easy to switch from one
systems to another, in this case we are considering Windows and Linux.

The misconception is that people think they can run out of
under Wine various software, to which they are accustomed and it is convenient for them to work in it.
How not cool just like that, nothing happens. To make our favorite software work under
Wine needs to work hard, re-read a bunch of manuals and weigh this volume
information. Of course, not exactly software will have to "puff", but you have to be ready for everything. The Wine project is developing very quickly, but before stable work it
very far. But I think that in the near future, all the main software, as well as games
will work stably on it.

Installing Wine

The first question of a person who has just switched to Linux (in our case
Ubuntu): "How will I run programs from Windows?". He starts searching for this
topic and naturally comes across Wine.
The second question is: "How to put it?" There are two ways:
official repositories or compile yourself from source. We'll consider
both variants.

Option 1: Install from the repository.

Everything is very simple here. Go to Applications // Standard // Terminal:

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

We are waiting for the installation to complete ...
Everything! Wine is installed and you can try installing games and programs.

Option 2: Compiling from source.

1.Download the sources from the official site, they are there. In my case
this is Wine 1.3.11 (http://sourceforge.net/projects/wine/files/Source/wine-1.3.11.tar.bz2/download).

Go to the directory where the source archive was unpacked:

Cd wine-1.3.11 /

OpenGL support must be enabled before compilation. If we don't
applications that need OpenGL will not work. In terminal:

Gedit tools / wineinstall

We find the line starting with CONFARGS =, and after that we enter the necessary
build parameters. In our case, the line will look like this:

CONFARGS = "- with-opengl --disable-debug --disable-trace"

We get the dependencies:

Sudo apt-get install auto-apt checkinstall
sudo auto-apt -y run ./configure

We collect:

Install by creating a package, instead of make install

Sudo checkinstall

Everything. We are waiting for the end of the installation.

There is also an intermediate option for Jedi on debian-based distributions. Briefly:

Apt-get source wine1.3
sudo apt-get build-dep

Now the most interesting thing: download the required version of wine from the official site, unpack it, and copy there the debian directory from the source directory of the original wine1.3 package. We do

And we have a * .deb package for ubuntu / debian with all the necessary patches for the distribution, almost like from the official repository, but only a new version. In addition, it can be safely removed later via apt-get.
Let's consider the pros and cons of each option.

Option 1.
Pros:
1. Everything has already been collected for us and there is no need to puff up, everything is already ready for use.

Minuses:
1. We will not be able to apply the patch, for example, to improve the performance of some toy.
2. Unstable work on some video cards.

Option 2.
Pros:
1. Ability to apply patches to improve performance
2. Stable work with unstable video card drivers.

Minuses:
1. There is no menu in the Applications, which is not convenient. You have to do everything from the console,
go to Wine settings eg.
2. The installation process is too long, depending on the power of your computer.
1. There is no menu in the Applications, which is not convenient. You have to do everything from the console, go to Wine settings, for example. "

You can add it yourself through System - Options - Main menu

I prefer the second option. Wine installed this way works
better than installed from repositories. But this is just my little IMHO.

Installing programs and games

First, we go to appdb.winehq.org Above, in the search engine we drive
the name of the game or program and see what is written there. Usually there are described
tests on various systems, recommendations for stable operation and much more.

If the program works without problems, then we install it with a pure soul.
with a simple click. If this is some kind of serious game or program without
shamanism with a tambourine is indispensable - that means you need to create a separate prefix * for
our dances. * All wine files are stored in a prefix, or also called a bottle (similar to wine / wine). There, inside this bottle, there are all the files on the C drive, the registry, individual settings, and so on.

There can be any number of such bottles.

It just might be some kind of software that behaves very capriciously under the vine and needs some kind of crutches that will interfere with the normal operation of other applications of the vine. Then we just put this software in a separate bottle (prefix) and any settings will not affect other programs.

When a vine is launched for the first time without a specified prefix, ~ / .wine is used. If the prefix does not exist, the vine will create it and fill it with the default content, it will create and fill the directories C: \ windows, C: \ Program Files, C: \ users. Plus a clean registry will be created.
Go to our home directory and create a new directory. For example. Wine2.
Then we go to the terminal and enter:

WINEPREFIX = "/ home / username / .wine2 /" winecfg

Everything. A separate prefix has been created. Various registry configurations and programs themselves are stored there.
We also install the program through the console.

WINEPREFIX = "/ home / username / .wine2 /" wine /media/DVD/setup.exe

The installation process is in progress, and most importantly in a separate prefix.
Then we run the already installed program, also from the console and watch the output.

The output may contain errors that there are no required components and libraries. V
winetricks will help us install the missing components (see below)

What does it do? This gives stable application performance in its prefix if
a lot of programs will work in one prefix, sooner or later it will get clogged
which will cause other programs to crash. Therefore, you need to use separate
prefixes, if you don't want to configure everything over and over again.

Winetricks

Winetricks will help us in setting the correct prefix.
Winetricks is a script that installs various components that
are required to run applications such as DirectX, Vcredist, and more.
How does this script work? It downloads libraries and components from
Microsoft resources. Exactly so, and not as otherwise. Why this script
do you need? This makes working with Wine very easy. Without the script, we ourselves would climb and
looking for the necessary components, and here everything is already done, you just need to tick the box
and click "Install" This script also helps to edit the registry,
enter various keys there. And besides that, winetricks has a lot of settings
and functions.

To familiarize yourself with it, simply enter in the terminal winetricks

Editing the registry

In the terminal, enter:

We are in the registry. We don't need to edit anything, we will only add.

Go to HKEY_CURRENT_USER / Software / Wine / Direct3D.

If there is no Direct3D catalog, then do not despair. I am writing this so that the reader understands
somewhere you need to edit or add.

In terminal:

Winetricks ddr = opengl orm = fbo glsl = disabled videomemorysize = 1024
(1024 change to yours)

All these parameters will appear in the registry. This can be viewed in the folder indicated above.

What does it do? It improves gaming performance, speed and gaming in general.
work better from this, but it's only for games.

PlayOnLinux

There is also PlayOnLinux. This is a separate program that uses Wine.
but there everything is more automated and configured. The program itself will download the required
Wine will install the components and create a separate prefix. But this does not mean that
everything will work perfectly. It may not work at all. So I give mine
preference for regular Wine, manual configuration and running your own brain, rather than
automated program.

Pros:
Everything is automated and we essentially don't need to do anything.
It is possible to keep multiple versions of Wine and apply them for different prefixes.
The program itself creates prefixes.

Minuses:
Everything that the program does, installs and downloads is impossible to predict.
Everything that the program does can be done by yourself, with pens, this is + to the knowledge of a person.
The Robot program will never compare to the human brain.

Mounting CD / DVD images

Windows has a utility called Daemon-Tools for this. It is very comfortable
and not a replaceable utility. A person has a question: Is there an analogue of this
miracle utilities? Answer: There are also much better Windows utilities. It is called
Cdemu. To install it, we need to enter only three commands:

Sudo add-apt-repository ppa: cdemu / ppa
sudo apt-get update
sudo apt-get install cdemu-daemon cdemu-client gcdemu

Add the applet to the panel, indicate the path to the image and enjoy life. Not any
There will be no problems and Wine will detect the image perfectly. If we do not find the applet, do not rush to reboot.
In the terminal, enter the commands:

Sudo service cdemu-daemon start

If the service does not start at system startup ("The daemon is configured not to start at system startup"), you can fix it like this:

Sudo update-rc.d cdemu-daemon enable

Launching games in a separate X server

A whole book can be devoted to this, but I settled on one method that I always use:

Go to the virtual terminal:

Ctrl + Alt + F1
login: ******
password: ******

We start manually a new copy of the X-server:

Xinit -: 2
wine path / folder / c / game / game.exe

The gain from this is not big, but personally, this is enough for me. I repeat:
There are many ways to launch in a separate x-server, and each person is free to choose for himself.

Conclusion

All these tips, the basics that every person who wants to know should know
use Wine to achieve your goals. The rest is in your hands. If
you want to reach your goal no matter what, and hope is already gone, not
never despair, because the solution may be in front of you. Sit
on two chairs is possible, but this requires desire and nerves of steel. A wish
- a thousand possibilities, not desire - a thousand reasons.

This material was written for the "First competition of Russian-language articles for OS
Ubuntu "(konkurs.ubuntu.ru)
The author of the article is Vladimir Kacharmin aka rootboot
Contacts: Skype root.boot2, email [email protected]

Wine- an application that is a layer of compatibility with Windows API using libraries Windows to ensure the performance of applications developed for the OS family Microsoft Windows in a different environment, such as Ubuntu. Using Wine, you can install and run various programs as if you were using Windows.
Wine is actively developing. Not all applications are stable enough in Wine, but Wine already used by several million users around the world.
The name of the program Wine (waɪn- between " wayne" and " vine", Rus. Wine) is a recursive acronym for the phrase " W ine I s N ot an E mulator "- rus. "Wine is not an emulator."

Installing Wine

Installing from PPA

Due to the active development of Wine, the Ubuntu repos usually contain a very old version. Therefore, it is recommended to install the latest version from the official Wine repository.

For latest versions of wine and ubuntu 64 bits

Sudo dpkg --add-architecture i386 sudo add-apt-repository ppa: wine / wine-builds && sudo apt-get update sudo apt-get install --install-recommends winehq-devel

In general, it is not recommended to fill in and configure wine yourself. Wine is not very convenient to work with. To install this or that program, you will have to climb a bunch of forums and blogs to understand which packages you need to install and which libraries to add. This is followed by a long process of troubleshooting, installing packages via winetricks and manually tweaking the registry, and so on. This is all very difficult even for experienced users, not to mention beginners. Therefore, it is recommended to download the configured wine prefix from here: http://forum.ubuntu.ru/index.php?topic=199897.0

Customization

Before using Wine to run applications, you need to run the setup program, which will create a directory in your home directory ~ / .wine with files necessary for work. To do this, either select the main menu item Applications → Wine → Configure Wine, or run the command in the terminal:

winecfg

Associating files with wine programs

To transparently run files using wine programs, we will write a small script. Let's say we need to open CAD files with Compass and zwcad.

#! / bin / bash # Determine the file extension dd = $ 1; razr = `echo $ (dd: (- 3));` ff = `echo $ (dd / \" / \ "Z :)`; ff = `echo" \ "Z:"$ ff \ "`; # Depending on the extension, run the desired program case $ razr in frw) env WINEPREFIX = "/ home /" $ USER "/.wine" wine start `echo $ ff` & ;; cdw) env WINEPREFIX = "/ home /" $ USER "/.wine" wine start "C: \\ Program Files \\ ASCON \\ KOMPAS-3D Viewer V9 \\ Bin \\ kViewer.Exe"`echo $ ff` & ;; dwg) env WINEPREFIX = "/ home /" $ USER "/.wine" wine start `echo $ ff` & ;; dxf) env WINEPREFIX = "/ home /" $ USER "/.wine" wine start "C: \\ Program Files \\ ZWCAD 2009 Eng \\ ZWCAD.exe"`echo $ ff` & ;; # Here you can add more extensions and programs esac

Let's not forget to make our script executable

chmod + x wine_cad.sh

and associate drawings with a script in the file manager.

Launching Windows applications

In order to run the application, you need to open a terminal and write in it:

wine path / to application / program.exe

If your application does not start or does not work correctly The wine website has a list of applications with descriptions, first I recommend checking it out. http://appdb.winehq.org/ - The site has a search box. If your English is bad, then use the translator http://translate.google.com/.

You can also open the folder with the application that you need to start using the file manager, then right-click on the application and select the program to run - Wine.

Wine applications that run Web pages require Gecko

Gecko Is a free web page rendering engine for the browser when working on the Internet wine. If wine does not work with the Internet and you do not run a windows exe browser, then you do not need Gecko. Normally, when launching a web page application, Wine automatically looks for Gecko in / usr / share / wine / gecko first. If Wine does not find the Gecko archive there, then it automatically downloads it from the Internet, but some applications do not like to wait for Gecko to load and freeze or crash. Gecko can be installed by running the command:

sudo apt-get install wine-gecko< версия>

where<версия>should be replaced with the version of Wine installed.

Launching via a discrete graphics card

To run through a discrete video card, you need to register in the terminal on free drivers (or write a script)

Vblank_mode = 0 DRI_PRIME = 1 wine filename.exe

vblank_mode = 0 means vertical sync (Vsync). If there is no VSync in the game settings, then you need to erase vblank_mode = 0

Save. Place in the game folder. Make it executable in properties. Place the link to the script on the desktop. Run the link instead of the game file. For even greater performance, you need to install a closed proprietary driver.

Winetricks

Winetricks Is a script for installing various components from Microsoft®, and some others. To get Winetricks in the terminal, enter:

sudo apt-get install winetricks

Winetricks contains several dozen packages of various wine libraries. For example, to install DirectX ™, enter:

Winetricks d3dx9

To view a list of all packages, enter:

Winetricks?

Also, Winetricks has a simple GUI. To run it, enter.

After you have installed the latest version of the environment for running Windows WINE programs (how to do this is written), you also need to tweak it a little so that the programs and games run normally. Sometimes you have to make your own settings for each program, but there are actions common to all programs. However, setting up WINE for the first time is not difficult at all.

Using Winetricks.

Winetricks is a script created so that you can quickly download and install various libraries necessary for the operation of some windows-programs in the wine environment.

It's easy to install. Start a terminal emulator and create a folder in your home directory for example winetricks:

Mkdir winetricks

then go to this folder and download the winetricks script from the Internet:

Cd winetricks wget http://winetricks.org/winetricks

After the script has downloaded, make it executable:

Chmod a + rwx winetricks

Finally, run winetricks:

The points:

  • Install an App - installation of various windows applications.
  • Install a benchmark - Installs a selection of several popular benchmarking software.
  • Install a game - allows you to download and install demos of some games.
  • Select the Default prefix - allows you to install various libraries and fonts.
  • Enable Silent Install - enables / disables silent installation. In silent installation mode, the installation windows are not displayed.
  • Show brolen Apps - enables / disables the display of "bad" applications (DRM protected, etc.)

Installing fonts and DLLs in Wine

The first step is to install the standard fonts required for most windows programs and games. To do this, select the item Select Default prefix

When you run this item for the first time, the menu will ask a question about your consent to collect debug information in order to improve the program:


You can safely answer no if you do not want to help in the development of the winetricks program.



Without further ado, we select the first item allfonts - this will install all available fonts, but you will need to download 132 megabytes of data from the Internet. Therefore, please be patient and have unlimited internet.


If you have not enabled Silent Install, the download and installation process will be displayed in the window:


Installing libraries is done in a similar way. Only in the previous step, you need to select Install a Windows DLL o component.

Then mark the required components and press the OK button, as in the case with fonts.


For example, this way you can install the "native" dircetx from Microsoft in the Wine environment, which is necessary for many games. Also here you can find other libraries necessary for games and applications. The need is determined on a case-by-case basis.

Sound settings in Wine

For most games and better performance, I switch the audio to use ALSA. this is done in the Wine settings (Applications \ Wine \ Wine Settings or run winecfg in the terminal). On the Audio tab, check the box in the ALSA item.

In addition, I have seen significant sound problems in applications running under wine with the PulseAudio sound server installed. By default, Ubuntu plays sound with it, so I delete it.

UPD 2016. In the latest distributions, the need to remove Pulseaudio has practically disappeared. All programs and games are working correctly.

This completes the initial setup of WINE on Ubuntu. This is just a basic set of settings that I use to run Windows games on Linux under Wine. If you have something to add, welcome to the comments.