Skip to content

Instantly share code, notes, and snippets.

@NelloKudo
Last active January 3, 2025 01:16
Show Gist options
  • Save NelloKudo/b6f6d48807548bd3cacd3018a1cadef5 to your computer and use it in GitHub Desktop.
Save NelloKudo/b6f6d48807548bd3cacd3018a1cadef5 to your computer and use it in GitHub Desktop.
Building wine-osu with custom patches (low-latency audio, crash fixes etc..)

Building wine-osu with custom patches (low-latency audio, crash fixes etc..)

osu-winello uses a patched version of Wine (usually referred to as wine-osu) in order to run the game, as it is a Windows' native game. What makes the wine-osu binaries shipped within it different from other Wine builds is the use of a set of patches made by the community, providing a bunch of benefits such as: low-latency audio, an actually working alt-tab behavior, crash fixes and more.

The wine-osu binaries shipped with the script are built by me using my WineBuilder script, which also provides different patchsets for different Wine versions in the osu-misc folder. The Wine source I use for creating builds is either prepared using wine-tkg or Proton-GE, but to make building easier to replicate, I also host on GitHub that Wine source at winello-wine.

You can find all of my releases (along with info about them) at WineBuilder's releases page.

For those who want to build their own binary or change some things, this is a quick guide to build yourself a binary of wine-osu! Since building is a kinda heavy task, especially for low-end computers, make sure you setup ccache correctly to avoid building again and again the same files.

That said, we can go on! 8)

Index

Method 1: PKGBUILD (Arch Linux only)

This is probably the quickest way to get yourself a wine-osu build: you can simply compile and install Wine from a PKGBUILD!

Make sure you install ccache before using them as it's needed to compile. To enable it, edit /etc/makepkg.conf and remove this -> ! before ccache in BUILDENV.

I host a PKGBUILD of the latest wine-osu used by osu-winello at WineBuilder's pkgbuilds folder and using it is as simple as any other PKGBUILD: download it, extract it and cd into its folder.

Once there, simply run:

makepkg -si

And wait for it to compile! It will simply download Wine, apply patches on top of it and then install the build at /opt/wine-osu or /opt/wine-osu-ge. To use it with your osu! launch script, just add this line in it:

export PATH=/opt/wine-osu/bin:$PATH

and you're done!

Method 2: WineBuilder (All distros)

This method works on pretty much all distros as it uses a container to build Wine. Using it is actually pretty simple:

Clone the repo, cd into it and prepare the container (it will take a while so please be patient!):

git clone https://github.com/NelloKudo/WineBuilder.git
cd WineBuilder
sudo ./create_ubuntu_bootstraps.sh

Now download your custom patches (mines are hosted here), extract them into the custompatches folder and replace the audio-revert.tar file in osu-misc with the one in your patchset.

When you're done with that, you can now edit the build_wine.sh file. There you can configure stuff like:

  • Wine version
  • Staging/Staging-TKG patches
  • Use ccache to compile or not

and bunch of other stuff! Feel free to try building old Wine versions if needed to, as long as the version matches the one named in the patchset it should work.

In order to build the same wine-osu as osu-winello, set WINE_OSU="true" and WINE_BRANCH="winello" after extracting the latest patchset (wine-osu-protonGE-9-2-pkgbuild.tar.xz) in custompatches.

Last but not least, compile with:

./build_wine.sh

You'll find your builds in the folder, the one you're meant to use is the amd64 one. To use it, extract it wherever you want and point your osu! script to it with:

export PATH=/path/to/wine/bin:$PATH

and you're done!

Method 3: wine-tkg-osu (Most distros)

If you're a fan of the TKG building system, there actually are wine-osu specific forks of it! I'll list the two which I tried and use occasionally:

They provide instructions for building in their own READMEs, make sure to use them if needed!

Credits / Help!

And that's pretty much it!

If you need help or simply want to know more, please join ThePooN's discord using this link! People there (along with me) will probably know how to help.

Last but not least, huge thanks to gonX, hwsmm, openglfreak, Mini Gaunt, spectator and way more people for all their work on patches! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment