Compling Wine from Binary Files

Compiling Wine from Binary Files

Tutorial Level: Intermediate

Although using YaST package manager may be a very simple and easy way to install Wine on your OpenSUSE system, sometimes different games or programs will require a patches or to have Wine compiled from scratch. Compiling Wine from binary files may sound like a long process, but it is actually quite simple. In this tutorial, we’ll patch a binary file for Wine, compile and then install Wine. If you wish only to install a clean binary file without patching it, simple skip over the patching section. Now that we know why we should compile from scratch, let’s get started.


Although compiling Wine is a few step process, it will require your OpenSUSE system to have some packages installed. These packages will do the work of preparing your binary files for the installation and installing Wine itself. There are specific packages that this installation requires, but to save time looking for each individual file and worrying about the dependencies of each, we are going to install an intire pattern through YaST. First, open YaST Software Management, and once the reopsitories load, set the grouping (below the left column) from the default, which may be Groups, to Patterns. Now scroll down in the left column to Development. There, click the Base Development pattern, and click the Install All button. Now, hit the Apply button to the right of the window, and wait for the packages to install. Once all the packages have installed, decline to install more.

Downloading and Extracting the Binary

Now that we are ready to compile the files, let’s put them on your system. The Wine website will have a link on the top right of the page of their latest release version. Click this link (which should look like Wine-1.0, only with the most recent version of the files). Now you will be directed to the download page. On this page, there should be links with the extension of .tar.bz2. Click one of the links to download the file to your system. Please remember where this file is being downloaded to. Once you have finished downloading the file, we are ready to open the package.

To open the package, open a new terminal window and login as SuperUser (su). Now, use the cd command to open the directory where you downloaded the folder. Next, we need to extract the files into a folder. To do this, type the following command into the terminal, replacing filename with the name of the file you have downloaded…

tar xvf filename

Now you should see a list of files being extracted and placed into a new folder (which will be named the same as the .tar.bz2 package, only without the extension). You can check if such a folder was created by typing dir in the terminal. This will return a list of all the files in the current directory. Now just check to see if the new folder is there.

Patching the Binary

If you want to patch the files, here is the time to do it. To do this, download the patch for Wine you wish to use. Remember where you download this file, the location is very important. Now we need to use the cp command to copy the patch into the folder you just created. To do this, run the following command, replacing /patch/location.diff and folder/location with the location of the patch you downloaded and the location of the folder you created, respectively…

cp /patch/location.diff folder/location

Note that there is only one space that seperates the location of the patch from the location of the folder. Now that the patch has been copied into the folder, we must run the patch command to initiate the patch. To do this, use the cd command to place yourself inside the new folder, and then run the following command, replacing patchname with the name of the patch you downloaded…

patch -p1 < patchname

This will now enact the patch, replacing or changing what the patch has to. This should only take a matter of moments, although may take longer if the patch is larger.

Compiling Wine

This part may take some time, but requires very little on your part. To start the compiling process, use the cd./configure command to place yourself inside the new folder you have created (if you have not already). Now, the command we need to run is…


Now you should see a long list of items being checked. Because we install the development packages earlier, you should not encounter any problems. If you do, the terminal will output an error message, most of the time giving the name of the package missing. Open software management, and search for this package and type the ./configure command again in the terminal.

Once you have completed the configuration, it is now time to run the make command. For this, we do not need to specify any location or parameters, just simply type make into the terminal window and hit the enter button; the rest the terminal will do. This part may take some time, so patiences will pay off.

Once the process is finally complete, run make install. This will install the configured binaries, and thus install Wine. This part may also take some time, but is much quicker than the previous command. Although not required, you can also run the make clean command to leave you with a clean installation, rather than having files left over from the compiling and installation steps.

To make sure everything has gone according to plan, test that Wine was installed and works properly. You can simply type wine –version to find the current version of Wine that you are running. If the version matches the one you installed, then you are good-to-go.

Keep in mind that the process of compiling is not only used for Wine, but for many open source applications and programs. That is one of the reasons we installed the entire development pattern in the beginning of the tutorial, because you will most likely see or use these programs again. It is a good idea to keep these packages installed on your system, in case you need them in the future. Always be sure to check the Wine Application Database to see if a program requires patching or other outside sources to install the program.


~ by unseenghost on 23 Jun 2008.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: