Friday, December 4, 2009

HOWTO: Install Multiple Wine Versions on One System

Wine Technology advances at a rapid rate, in the last month we have seen two updates to Wine (1.1.33 & 1.1.34). Many of us like to stay using the latest and greatest Wine software - with good reason each new version typically fixes issues and improves performance - however on occasion a new Wine release will suffer from some regressions that cause some applications to stop working properly. The solution to this? Quite simple: revert your Wine install back to the previous version so your application can still work properly for you.

This is fantastic if you are only using Wine to run a single program - however in the case you are running two or more programs under Wine it is not unheard of for each of the different programs you are running to perform better under different Wine versions (or with different patches). The solution to this issue is simple: install multiple versions of Wine on the same system and run each program with the version that it behaves best under.

Step 1 - Setup:
Download the source code tar.bz2 file for the additional Wine version you wish to install from Source Forge. Extract the contents of the tar.bz2 file to your preferred directory

Then we want to install all of the build dependencies we will need to compile Wine from source. On Ubuntu we can do this by running the following command in terminal sudo apt-get build-dep wine (You should check here for information on getting the Wine build dependencies on other distributions.)

Step 2 - Compiling Wine:
Open your favorite terminal and change directory to the location of your extracted Wine source. (If you wanted to apply a patch to your Wine source now is the time). Once you are ready we are going to configure and compile your Wine source. To do so we use the following command in terminal ./configure --prefix=/usr/local/bin/wine-someversion && make depend && make

At this point go make yourself a sandwich, watch some television, or better yet go read some other wonderful articles written by yours truly. (Seriously configuring & compiling Wine takes a fair bit of time depending on your hardware)

Step 3 - Installing Wine & Clean Up:
Alright, now that you have a full stomach we can install our newly compiled Wine code and setup the last few things we need. Install Wine with the following command sudo make install

Lastly we need to create our new wine, regedit, and winecfg commands. To create the wine-someversion command we use a symlink as such:

sudo ln -s /usr/local/bin/wine-someversion/bin/wine /usr/bin/wine-someversion
sudo ln -s /usr/local/bin/wine-someversion/bin/wine /usr/local/bin/wine-someversion/bin/wine-someversion

To setup up winecfg-someversion and regedit-someversion you have to do the following:
  1. Open your favorite text editor as super user (example: gksudo gedit)
  2. Enter the following as the only line: /usr/local/bin/wine-someversion/bin/winecfg
  3. Save the file to /usr/bin/winecfg-someversion
  4. Make the file executable with the following command: sudo chmod +x /usr/bin/winecfg-someversion
  5. Repeat the above four steps only replace winecfg with regedit

You can now use your different Wine install by running the Wine command with its following version number. In the attached image you can see I have my default Wine command (currently 1.1.33) and then I also have 1.1.32 installed which I access by running wine-1.1.32

You can install as many different Wine versions as you like in this manner. This way you can feel safe in installing a new Wine version and not have to worry about breaking support for your favorite Windows based application.

~Jeff Hoogland


  1. What about WINESERVER,WINELOADER,WINEDLLPATH variables? I think these shoud be set to.

    For example:
    $cat wine-1.1.33

    export WINEVERPATH="path to wine-1.1.33 instalation"
    export WINESERVER="$WINEVERPATH/bin/wineserver"
    export WINELOADER="$WINEVERPATH/bin/wine"
    "$WINEVERPATH/bin/wine" "$@"

  2. Good tutorial! if you want something like cedega our crossover that alows yoto manage wine versions for diferent aplications you should realy try play on linux.


  3. PlayOnLinux does all this automagically, hidden beneath a GUI, including scripts for the required tweaking to make some specific programs work.
    Similar to the commercial apps like Crossover etc, but Free.

  4. But some of us like to do this by hand or for example to have custom patched versions of Wine on our system(s).

  5. Thank you for this, embarrassingly my first install of another version of wine was as wine-someversion :">

  6. instead of going to the trouble of opening a gksudo gedit -- instead you can alter this line to do the same thing. just change the names.

    echo "/usr/local/bin/wine-SOMEVERSION/bin/winecfg-SOMEVERSION" | sudo tee /usr/bin/winecfg-SOMEVERSION

    (just to be clear, that is a | Pipe character, --Shift+BACK-Slash-- and we must run sudo tee with the file name and path u want the file called.)

    this replaces steps 1-3 above

    (faq, what the cmd TEE does is just print the output of any command to a file.. very useful. can save entire directory lists, any command which has verbose output involved.
    -- and remember, in THIS case, where we need to save the file with root ownership, the sudo must go on the TEE cmd, not the ECHO cmd!)

  7. Get the following when I try to compile wine:

    ./configure --prefix=/usr/local/bin/wine-0.9.47 && make depend && make
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc -m32
    checking for C compiler default output file name...
    configure: error: C compiler cannot create executables
    See `config.log' for more details.

    1. No matter, I am able to do what I need to without the older version of Wine

  8. Hi there,
    thank you very much for this article, it works fine on Ubuntu EasyPeasy 1.6. :-)

    I have written a script containing everything you described. It depends on Vim and I use Ubuntu.

    cd /usr/src/wine-1.5.10 && ./configure --prefix=/usr/local/bin/wine-1.5.10 && make depend && make && sudo make install && sudo ln -s /usr/local/bin/wine-1.5.10/bin/wine /usr/bin/wine-1.5.10 && sudo ln -s /usr/local/bin/wine-1.5.10/bin/wine /usr/local/bin/wine-1.5.10/bin/wine-1.5.10 && sudo vim +"normal i/usr/local/bin/wine-1.5.10/bin/winecfg" +"wq /usr/bin/winecfg-1.5.10" && sudo vim +"normal i/usr/local/bin/wine-1.5.10/bin/regedit" +"wq /usr/bin/regedit-1.5.10"

  9. Hi Jeff i have installed wine 1.5.3 from compile file is success, and i create symlink with ln -s /usr/share/wine-1.5.3/bin/wine /usr/bin/wine-1.5.3, if i type wine-1.5.3 --version that show the version but if i type wine-1.5.3 setup.exe form my application that show /usr/share/wine-1.5.3/bin/wine-1.5.3: could not open
    , What's worng with my wine ? please help. thankx