15

I need to use two different Windows applications, one works well with Wine 1.4 but not on Wine 1.5 and the other application works well with the later version but not with the former.

Is there a way to have both versions of Wine installed, specifying which application should run with which Wine version?

BuZZ-dEE
  • 14,223
To Do
  • 15,502

3 Answers3

13

PlayOnLinuxInstall PlayOnLinux

You can use PlayOnLinux to install applications which run on different versions of wine. PlayOnLinux provides an option of installing some libraries as well along with installation of a program.

To mange different versions of wine, go to Tools > Manage Wine Versions

Wine_Versions

If you want to add your custom compiled version of Wine to this list, create new wine "version" in ~/.PlayOnLinux/wine/linux-amd64 or linux-x86 and copy your custom installation there.

While installing an application you have an option of installing it a new virtual drive, in which you can install a different version of wine.

Virtual_Drive

PlayOnLinux

ignite
  • 8,936
  • could you elaborate more? this issue is very important and your answer needs more attention - but first has to be detailed. i have not tried it myself, but: http://ubuntu.igameilive.com/2010/02/how-to-use-multiple-versions-of-wine-in.html –  Feb 19 '13 at 23:47
5

See the FAQ of wine here telling you that.

You have to scroll to

2.6 Can I install more than one Wine version on my system?

Fixing environment variables you'll be able to get it.

Philippe Gachoud
  • 5,900
  • 3
  • 43
  • 50
1

I use several scripts but basically do this:
go to:
https://dl.winehq.org/wine-builds/ubuntu/
then further to
https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-i386/
and
https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-amd64/

download ex.:

wine-staging_4.21_bionic_amd64.deb
wine-staging_4.21_bionic_i386.deb
wine-staging-amd64_4.21_bionic_amd64.deb
wine-staging-i386_4.21_bionic_i386.deb

(can be staging or stable) On the page search type ex.: 4.21
now skip all packages containing: wine-devel-, winehq- (but you can also download -dbg and -dev), as the above ones.

You can use the script at the end instead of doing these steps manually:

copy them all to a folder named ex.: wine4.21-bionic (if it was stable could be instead wine4.21stable-bionic)

Extract them all using the filemanager (is easier, I use nemo). Expand all the 4 folders to see simultaneously all the data.tar.xz, select all these 4 and do "extract here" (will be on the sub-folder).

Now rename 2 of the 4 folders at wine4.21-bionic/ to (just keep their ending folder name):
amd64
i386

Copy the subfolders opt and usr from the remaining folders (the extracted but not renamed ones), and paste into the renamed folders (you must opt to merge the folders now).

Cleanup/Trash everything else that is not needed.

In nemo there is open as root context menu option. So I use it to move that folder and apply root permissions to top folder and all enclosed files.

Before being able to run it:

you will need these environment set after that, (I keep them at a top folder: /WineVersions/) ex.:

export PATH="$PATH:/WineVersions/wine4.21-bionic/amd64/opt/wine-staging/bin:/WineVersions/wine4.21-bionic/i386/opt/wine-staging/bin"

export LD_LIBRARY_PATH=":/WineVersions/wine4.21-bionic/amd64/opt/wine-staging/lib:/WineVersions/wine4.21-bionic/i386/opt/wine-staging/lib:/usr/lib/x86_64-linux-gnu"

(this /usr/lib/x86_64-linux-gnu may not be necessary above (try w/o it first?), but I use it anyway)

now you should be able to ex.: wine64 explorer (after you create and env set a WINEPREFIX of course :))


If you prefer, you can use this helper script to extract and prepare the contents of the downloaded .deb packages winePrepare.sh.

#!/bin/bash

set -eu

grep "[#]help" $0

: ${strWorkPath:="/WineVersions/NEW_DOWNLOADS"} #help you can change this. This is a main/workfolder work flow, so you need at least a 2 depth folder, on the example the main is WineVersions and the workfolder is NEW_DOWNLOADS. Place the downloaded packages at the strWorkPath. if [[ ! -d "$strWorkPath" ]];then echo "create this folder and chown it to your normal user (not root): $strWorkPath (but /WineVersions should be owner root)" exit 1 fi cd "$strWorkPath";pwd

strType="$1" #help stable or staging strVersion="$2" #help ex.: 4.1 or 7.0~rc6 strDistro="$3" #help ex.: bionic or focal-1

astrFiles=( #amd64

"wine-${strType}${strVersion}~${strDistro}_amd64.deb" "wine-${strType}${strVersion}_${strDistro}_amd64.deb"

"wine-${strType}-dbg_${strVersion}~${strDistro}amd64.deb" "wine-${strType}-dbg${strVersion}_${strDistro}_amd64.deb"

"wine-${strType}-amd64_${strVersion}~${strDistro}amd64.deb" "wine-${strType}-amd64${strVersion}_${strDistro}_amd64.deb"

"wine-${strType}-dev_${strVersion}~${strDistro}amd64.deb" "wine-${strType}-dev${strVersion}_${strDistro}_amd64.deb"

#i386

"wine-${strType}${strVersion}~${strDistro}_i386.deb" "wine-${strType}${strVersion}_${strDistro}_i386.deb"

"wine-${strType}-dbg_${strVersion}~${strDistro}i386.deb" "wine-${strType}-dbg${strVersion}_${strDistro}_i386.deb"

"wine-${strType}-i386_${strVersion}~${strDistro}i386.deb" "wine-${strType}-i386${strVersion}_${strDistro}_i386.deb"

"wine-${strType}-dev_${strVersion}~${strDistro}i386.deb" "wine-${strType}-dev${strVersion}_${strDistro}_i386.deb" )

strPath="wine${strVersion}${strType}-${strDistro}" mkdir -vp "$strPath" strPath="$(realpath "$strPath")" ls -ld "$strPath"

for strFile in "${astrFiles[@]}";do cd "$strPath" pwd if ls -l "../$strFile";then echo

mv -v "../$strFile" ./

if [[ "$strFile" =~ .*amd64.* ]];then
  mkdir -vp amd64
  cd amd64
else
  mkdir -vp i386
  cd i386
fi

ar x "../$strFile"
xz -d data.tar.xz
tar -xf data.tar

trash -v data.tar control.tar.xz debian-binary

else echo "a file with that name was not found, trying next one" fi done

echo "#now run these commands:" echo "(sudo chown -vR root:root $strPath; sudo mv -v "basename "$strPath"/" ../; cd ..;pwd; sudo ln -vsfT basename "$strPath" $strType)" # this will chown to root the new wine files, move the folder to main path, symlink that folder to strtype

  • Nice answer! Just a reminder: the folders to be renamed are the "small" ones: wine-staging_4.21_bionic_amd64 and wine-staging_4.21_bionic_i386 – Henrique de Sousa Dec 23 '21 at 12:07
  • 1
    btw, i386 wont work on ubuntu 20.04 (unable to satisfy dependencies), so you may want to try a schroot i386, I got a answer for this somewhere... I will see if I drop my scripts here later too to easify these steps. – Aquarius Power Dec 31 '21 at 05:42
  • 1
    @HenriquedeSousa I added the helper script, in case you have not created yours yet :) – Aquarius Power Jan 04 '22 at 01:45
  • 1
    for 32bits (only 32bits not dual) try this https://askubuntu.com/a/1275742/46437 , so you will be able to run 32bits only on that schroot – Aquarius Power Jan 18 '22 at 04:05