nike4613 / BeatSaber-IPA-Reloaded

A Unity mod injector built for Beat Saber.
https://nike4613.github.io/BeatSaber-IPA-Reloaded/
Other
184 stars 28 forks source link

Linux - Possibility of Native or .Net core build? #55

Closed geefr closed 3 years ago

geefr commented 4 years ago

So over in the linux world we're having some issues with Wine, making it a pain to install .net 4.6.x.

The only reason we need that is to run ipa.exe for the initial patching process, once running the game it's all under proton.

So before I go diving into the code does anyone have ideas on whether ipa could be built with .net core, or otherwise provide a wine-independent executable for Linux use? Strictly it would only be needed for the initial setup process, when loading/hooked through winhttp.dll that should all be under steam's proton install, no issues there once things are installed.

And if no ideas thanks anyway, keep up the awesome work here <3

nike4613 commented 4 years ago

It should be fairly trivial to multitarget IPA.exe for Core, as it doesn't do anything terribly strange. I want to keep the main builds as Framework because that makes it much simpler to pack and run for Windows users.

geefr commented 4 years ago

Thanks, didn't know if there was some framework only magic in place, wouldn't suggest changing it for everyone just to service Linux users, no issues around that.

I'll take a stab at it and see where I get, was thinking I'd host my own build if needed but merging back would be great if things go well. Alternative approach is to use steam's proton install instead of a local wine install, can't quite remember why that didn't work but it was tricky last i looked.

geefr commented 4 years ago

Made a little progress on this but hit issues around the dependencies. Does look possible, but might need to have a separate project/cut down build just for what I need. Packaging .net core apps is surprisingly easy, but ideally I don't want to make users install the .net runtime first. At least the deps from nuget were getting framework variants instead of core, so plenty to work out there.

geefr commented 3 years ago

Another session on this, and I think I have a way forward. To get anything to build I had to pull just the IPA.exe logic out to a separate project, couldn't resolve all the dependencies with the full project.

So the process should be some simple build/packaging on my part

I've got loads of testing to do of course, but if there's any issues around that plan just let me know.

nike4613 commented 3 years ago

That seems fine. As long as that IPA.exe behaves the same, (complete with command line options) it shouldn't matter if its Framework, Core, or Haskell.

geefr commented 3 years ago

@nike4613 Thanks for all the help on this, looks like I've got things working, and can improve things if there's issues later on.

To save you a maintenance headache (And because I had to hack things) I'll be maintaining this minimised fork: https://github.com/geefr/BSIPA-Linux

Some of the changes might be worth merging back but there's nothing functional, mainly changes to how paths are looked up to support installing an external copy of IPA, and dealing with the way single-file packaging works for .net core.

So closing this ticket, shout if there's any issues or you want to merge anything back here.

RedlineTriad commented 1 year ago

Is there any update on this? I was hoping to make bs-manager native linux compatible, but since it uses bs-ipa, it wouldn't work. I only got beatmaps working, but not mods. And now framework is being "abandonded" by Microsoft anyways.

geefr commented 1 year ago

@RedlineTriad See https://github.com/geefr/BSIPA-Linux for a linux compatible (and usable-from-library) build. Mod install process is to download as normal, but replace the ipa patching step with the linux version, you could merge the two if you liked, changes should be okay..

I'm not actively working on things but feel free to use this as reference: https://github.com/geefr/beatsaber-linux-goodies Most recent stuff I know of is this, no idea how well it works, or what implementation they did differently than mine: https://github.com/affederaffe/BeatSaberModManager