1

I have Wine installed with a ppa on my system and I do not want to change it.

What I want to do is to apply a patch to (This one) and use it in Playonlinux.

I know I can use custom Wine versions in playonlinux, a nice person long time ago send me a patched Wine that I placed in playonlinux wine folder and it used to work.

So can some one help me with this ??

Thank you in advanced

2

I'm not sure what you really want to do (use your PPA'd wine in POL? build wine from source for POL?) but here's what I did to patch a beta wine (1.7 at the time of writing) for testing with POL.

Notes:

  • I'm using wine instead of wine1.7 because it maps to the newest wine so it will work when the beta is 1.8
  • I'm building on an amd64 architecture, which means I'm doing it the hard way. I'm assuming most people now are on amd64, so you should be fine. If you are on i386, then life is simpler for you, but unfortunately this guide will not cover you well. Either figure it out on your own or ping me and I'll see how I can help.

Instructions

  1. Install the ubuntu dev tools: sudo apt-get install ubuntu-dev-tools
  2. Add the Wine beta PPA to ubuntu as explained here: sudo apt-add-repository -sy ppa:ubuntu-wine/ppa && sudo apt-get update (the -s flag is needed to enable source download)
  3. Download and patch wine as explained here:

    1. Install build dependencies: sudo apt-add-repository -y ppa:ubuntu-wine/ppa
    2. Download source to a build directory: mkdir -p ~/src/wine-patches; cd ~/src/wine-patches; apt-get source wine
    3. patch your source: cd wine*-*; patch -p1 < your.patch

      (you may need to massage your patch a bit to fit)

  4. commit your changes to the package: dpkg-source --commit

    This will ask you for your patch name (just type something that makes sense) then open an editor with a lot of template text followed by the text of your patch. make sure to edit the Description field and remove all the boiler plate comments, then save.

  5. build the deb: dpkg-buildpackage
  6. wait... go get a cup of coffee... wait some more... go see a show on tv... wait even more... until it is done.
  7. get back to the root of the build tree, where dpkg put our deb files: cd ..
  8. Now, because we are on amd64, we just got some amd64 deb files, and we also need the i386 deb files (that's how wine on amd64 works, as it has to load 32-bit windows binaries). So we'll need to cross-build the i386 binaries (if you are on a i386 already, then you can skip this step):

    1. Load some variables: source /etc/lsb-release (I use it so I won't have to know the env code name)
    2. Create the pbuilder environment for i386: pbuilder-dist $DISTRIB_CODENAME i386 create
    3. Build wine again with pbuilder: pbuilder-dist $DISTRIB_CODENAME i386 build wine*.dsc --buildresult .
    4. Wait some more... you know the drill.
  9. Now the next bit is a bit hacky, because dpkg built us some deb files that are meant to be installed to the root of a FSH-compliant Linux system and thus have everything inside a /usr directory, which the PlayOnLinux type install does not need, so we'll need to extract the deb files into a structure that makes sense to POL:

    1. create a temporary working area: mkdir root
    2. extract the deb files: for deb in *.deb; do dpkg -x $deb root; done (this will extract the dev and dbg package as well. I don't care, but if you do - write your own command :-p ).
    3. The above command creates lots of files in root/usr which we will need to move to the new POL wine tree, but first we'd need to create a base directory: mkdir -p ~/.PlayOnLinux/wine/linux-x86/<version>-<your-patch-name> (I'm installing into the wine 32 bit directory, because I'm only interested in using 32 bit under POL. its possible to install to amd64 if you've built on an amd64).
    4. Move some files around: mv root/usr/{bin,share} <your-pol-wine-dir>
    5. Move the correct lib directory: mv root/usr/lib/i386-linux-gnu <your-pol-wine-dir>/lib

That's it - your new wine version should be listed in PlayOnLinux's UI and you should be able to use it. This set of instructions are for the beta releases, which tend to be a bit unstable at times - so YMMV. If it doesn't look good, try to repeat the process with a stable version, such as wine1.6.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.