hexdump0815 / imagebuilder

velvet os - simple script framework to build ubuntu 22.04 lts jammy (in older versions also 20.04 lts focal) and debian 12 bookworm (in older versions also 11 bullseye) bootable usb / sd card images for some arm and intel devices - lots of prebuilt images as well
GNU General Public License v3.0
301 stars 44 forks source link

ℹ️ [GUIDE]: Getting Osu on arm64 #217

Open thenameisluk opened 3 months ago

thenameisluk commented 3 months ago

Osu

Note: this only work on devices with opengl 3.3+ or vulkan support (so no mali gpu yet) Info. you will need python-is-python3 cmake build-essential python3 libgtk2.0-dev python3-distutils python3-setuptools libsdl2-dev and probably some more

  1. Get .NET SDK 8 using apt repo or using installation script (preferred) wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh ./dotnet-install.sh --channel 8.0 Note. if dotnet doesn't seem to be present try adding export DOTNET_ROOT=$HOME/.dotnet export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools to ~/.bashrc file and loading it again source ~/.bashrc
  2. Get project ready download the latest Source Code (zip) from here unpack it and within the project run dotnet run --project osu.Desktop -c Release Note. It might take a while also for some reason there are no logs while compiling, if for a while cpu usage is low (4-15% for one of dotnet processes and 0% for the rest) try ctrl+c and type command again after compilation it should throw an error obraz this is to be expected
  3. Getting rest of the deps
    • veldrid-spirv git clone https://github.com/veldrid/veldrid-spirv --recurse-submodules then at src/libveldrid-spirv/libveldrid-spirv.cpp at line 37 replace "std::uint32_t IDs[2];" with "std::wint_t IDs[2];" ./ext/sync-shaderc.sh ./build-native.sh -release linux-x64 Note. even though it says x64, it'll build an aarch64 (arm64) .so file Note. if you want it to compile faster ctrl+c and cd build/Release/linux-x64/ and "make -j8" move veldrid-spirv/build/Release/linux-x64/libveldrid-spirv.so to osudir/osu.Desktop/bin/Release/net8.0/runtimes/linux-arm64/native/
    • libbass obraz unzip and move bass24-linux/libs/aarch64/libbass.so to osudir/osu.Desktop/bin/Release/net8.0/runtimes/linux-arm64/native/
    • bass_fx obraz unzip and move bass_fx24-linux/libs/aarch64/libbass_fx.so to osudir/osu.Desktop/bin/Release/net8.0/runtimes/linux-arm64/native/
    • bass mix obraz unzip and move bassmix24-linux/libs/aarch64/libbassmix.so to osudir/osu.Desktop/bin/Release/net8.0/runtimes/linux-arm64/native/
  4. Running osu go to osu dir and run dotnet run --project osu.Desktop -c Release again osu will start after that the full build will be at osu.Desktop/bin/Release/net8.0/ now you can basically run the executable (osu.Desktop/bin/Release/net8.0/osu\!)
  5. Have fun playing ~luk source used obraz confirmed to work on lenovo IdeaPad duet 5

_Note. you can get it working on unsupported gpu with LIBGL_ALWAYSSOFTWARE=true but it will run at like 1-10 fps Note. there were attempts to get osu running with box64 but it's really bad when it comes to performance and stability. Sidenote. i was looking into terraria with box64, it aint fast sadly, but there is a possibility to decompile it and compile (since it's written in C#) for arm64 (maybe, no promises) i am looking into, you will still need a legal copy for that i don't plan to help with piracy Sidenote. your scores won't be saved to the leaderboard since it's not an official build of osu, unless osu adds official support for arm it will only work with box64 ^

shiumano commented 2 months ago

Following this guide, I was able to run osu!lazer on Termux (proot-distro Ubuntu), and I can also use Vulkan acceleration with the freedreno driver. Well, you may think it doesn't make sense since there is an official build for Android, but you can play custom rulesets that don't work with the AOT build, export beatmaps, etc.