M-Reimer / wine-lol

PKGBUILDs to package GloriousEggroll's LoL-patched wine version
163 stars 20 forks source link

How do you build this correctly? #80

Closed philipwilk closed 3 years ago

philipwilk commented 3 years ago

Hi, I'm trying to build locally from master, but I'm not getting a usable binary out the other end. As I'm using Fedora, I've used arch containers to build everything, which makes it much easier than using a vm πŸ˜…

These are the steps I've taken when building:

  1. Clone the master branch
  2. Install dependencies for glibc
  3. Built glibc
  4. Installed the custom glibc and other wine dependencies (all of them)
  5. Built wine and export it

I've taken the binaries from wine-lol*-x86_64.pkg/opt/wine-lol and put them into lutris' wine runners folder so I can select them from within lutris, but some stuff is missing compared to wine-lol-5.5-2x86+64 (shipped with the lutris install of lol). I think it has something to do with only building 32 bit stuff because wine64 is missing from wine-lol/bin, but I don't know how to fix this in the pkgbuild.

The Dockerfile I used to compile is in my fork, so anyone can try compile using it. All you need to do to compile using it is clone the master with the Dockerfile in the root directory, then build it by running docker build . -t wine-lol (this will take a while as it's actually building). Then run the image you created a moment ago with a directory mounted for it to export wine to by doing docker run -v /directory/to/export/to:/wine-exports wine-lol (this should only take a moment because it's already built) After you run those two commands, /directory/to/export/to will have a package in it with what was just built.

Edit note: Also, FORTIFY_SOURCE seems to redefine the same repos and links so many times it isn't even funny how much time it could be wasting.

philipwilk commented 3 years ago

Where are wine64 and wine64-preloader from?? Screenshot_20210824_011204

M-Reimer commented 3 years ago

At first: Fedora is no supported platform. I just completely failed to find out how this "RPM" nightmare works. At least for me this package format is the worst of all I've seen so far. So if you have any experience with this, I would really be happy if you would find a way to create some RPM build instructions to repackage the Arch package to RPM.

Next to your mistakes.

philipwilk commented 3 years ago

So I need to install wine-lol-glibc on my computer as well for this build of wine-lol to work? Wine-lol wants to be in /opt/wine-lol, so where do I put the contents of the glibc package, /opt/wine-lol/wine-lol or just /opt/wine-lol? (the folder with wine-lol-glibc in the package is just called wine-lol as well)

M-Reimer commented 3 years ago

Just exactly how the Arch packages are organized.

philipwilk commented 3 years ago

I can't find how the arch packages are organised that's why I'm asking πŸ˜… I only found wine-lol because it's referenced as /opt/wine-lol, but not glibc?

M-Reimer commented 3 years ago

/opt/wine-lol is the "unique prefix" for everything "wine-lol related".

In theory you can extract both Arch packages to "/" and you should have a working setup.

philipwilk commented 3 years ago

Ok, to get it working with lutris, I've put opt/wine-lol/. from both wine-lol and wine-lol-glibc into wine-lol in /opt/wine-lol and ~/.local/share/lutris/runners/wine/wine-lol, which lets you select it from lutris as a runner and it works fine.

I'm gonna take a look at making the build portable so putting it into the lutris wine runners folders just works, because having to put it into /opt with root/sudo feels like unecessary elevation of perms.

M-Reimer commented 3 years ago

It is needed as this is the only way to have a separate glibc. You can configure this as runner in Lutris without adding a copy of the whole wine stuff.

philipwilk commented 3 years ago

If lutris-lol manges to do it then there has got to be some way of doing it

philipwilk commented 3 years ago

Closed because I got this built in the end

M-Reimer commented 3 years ago

If lutris-lol manges to do it then there has got to be some way of doing it

They don't have to deal with a patched glibc version. That's the difference in my solution. As I don't want to change the system glibc in any way (after all that's one of the most important system libraries), I place my own one with the required patch and make wine build against it. This causes some absolute paths to my glibc binaries to be compiled into the wine binaries. So there is no way to place this to "somewhere where Lutris would like to have it". It has to be at the exact location that was configured at compile time or the wine binaries will not use the patched glibc.

But IMHO this is a small disadvantage compared to changing a system setting globally which influences all 32 bit applications and not just LoL.

M-Reimer commented 3 years ago

I forgot to mention: If you really want to spend more time into this it would be more useful if you find a way to repackage to RPM properly.