GithubHelp home page GithubHelp logo

ominitay / shellsaber Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 1.0 258 KB

!! MAINTENANCE MODE !! ShellSaber is a mod manager written in POSIX-compliant shell script to support Beat Saber modding on Linux.

License: GNU General Public License v3.0

Shell 100.00%
beatsaber posix shell shell-script mod mod-manager hacktoberfest

shellsaber's People

Contributors

melvyn2 avatar mtfurlan avatar ominitay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mtfurlan

shellsaber's Issues

shaber ipa patch fails

Describe the bug

shaber ipa patch seems to be expecting the unity data patch and engine files to be in a different location.

Steps to reproduce the behavior:

run shaber ipa patch

Expected behavior:

should properly find the unity files its looking for

Logs:

shaber ipa patch -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: All checks passed, continuing to patch...
Beat Saber.exe,-n,-f,--relativeToPwd
DataPath: /data/fish/.local/share/Steam/steamapps/common/Beat Saber/UnityCrashHandler64_Data
EngineFile: /data/fish/.local/share/Steam/steamapps/common/Beat Saber/UnityCrashHandler64_Data/Managed/UnityEngine.CoreModule.dll
ERROR: Game does not seem to be a Unity project. Could not find the libraries to patch.

System info:

Distro: 5.4.89-1-MANJARO
Beat Saber version:1.13.2

Additional context:

I tried to go into the script and manually change where it expects those files/directories to be, but it seems like that action takes place in the IPA-Minimal binary, called on line 675:
"$ipa_native_dir/IPA-Minimal" "Beat Saber.exe" -n -f --relativeToPwd

It looks like the directory with that engine file in it is /data/fish/.local/share/Steam/steamapps/common/Beat Saber/Beat Saber_Data/ on my machine and not what it expects.

Shorthand commands

Current commands are fairly long; shorter commands would make usage easier and faster.

Better support for running from the repo

Is your feature request related to a problem? Please describe.

I don't care to install shaber to outside of the repo, because this way I can see and fetch any changes easier, and running shaber is only a thing I want to do in very specific contexts so I don't see any benefit to having it on my path.

I just spent far too long debugging mods not working, and the problem turned out to be I had the correct version in $repo/config, but not $HOME/.config/shaber/config

Describe the solution you'd like

Rename config to config.example, add config to gitignore, and put the first shaber config search path as $(dirname "$0")/config

Additional context

If you're good with this I can do a PR.

Unable to download certain mods

Describe the bug

Whenever I try to download BeatSaverDownloader, Ini Parser, or BS Utils, ShellSaber says that it's downloading the mod, then it just stops....

Steps to reproduce the behavior:

Run shaber m e BeatSaverDownloader -V
Watcn it fail

Expected behavior:

The download to work correctly

Logs:

image

System info:

Distro: Arch Linux
Beat Saber version: 1.16.4

Additional context:

Improve efficiency

Currently, doing a download of multiple mods at a time means that the script will intend to install common dependencies multiple times. This doesn't break anything, but significantly slows things down.

This does not happen when removing mods, since orphans are removed all at once together.

Perhaps it would also make sense to download a complete mod list, and sync it when updating mods, similarly to how package managers like Pacman work (albeit far simplified). This would mean that no API calls are made, apart from a single one when updating mods. This would improve speed when downloading mods and updating mods.

Combine update and download

To me it doesn't make sense to have separate update and download commands.
When I invoke shaber, I would like it to do whatever necessary to get the mods installed.
Is there some usecase I'm just completely overlooking that necessatates separated download/update?

Describe the solution you'd like

Combine update and download, or maybe just call the other one after the warning so you see

Warn: Mod 'BeatSaverDownloader' is already downloaded.
Info: Updating 'BeatSaverDownloader'

and vise versa for updating a not installed mod.

If we come to some agreement on how it should work I can do the PR if you want.

Maintenance Mode

ShellSaber is entering maintenance mode. I have taken this decision because the codebase has become cluttered, thanks to both a lack of initial planning, and the fact that this is written in shell. Technical debt has risen, and it no longer is worth anyone's time to attempt to add features to this. This means that I will no longer be adding features to this script, and will only be fixing bugs from now on. In future, I may write a new mod manager in an actual programming language. You can absolutely still continue to use ShellSaber (and I will continue to use it), but don't expect anything more than bug fixes. Thank you to everyone who contributed :)

Papercuts

Not sure if this is the same issue as #5 or a new one.

I am migrating from QBeat so maybe I did something wrong, but upon deleting things and running shaber ipa download && shaber ipa patch I ran into this and had to create Data and Libs folders.

Warn: Using default config file at '/home/c0rn3j/.local/share/shaber/default/config'. It is recommended to copy this to '/home/c0rn3j/.config/shaber/config' and modify it to your needs.
Info: Mod 'BSIPA' is up-to-date
Info: BSIPA is already enabled
Info: Downloading native Linux IPA
Info: Native Linux IPA successfully downloaded
Info: Native Linux IPA successfully enabled
Warn: Using default config file at '/home/c0rn3j/.local/share/shaber/default/config'. It is recommended to copy this to '/home/c0rn3j/.config/shaber/config' and modify it to your needs.
Info: All checks passed, continuing to patch...
Beat Saber.exe,-n,-f,--relativeToPwd
Restoring old version... 
Installing files... 
Could not load library System.IO.FileSystem.resources, Version=5.0.0.0, Culture=en-GB, PublicKeyToken=b03f5f7f11d50a3a
Could not load library System.IO.FileSystem.resources, Version=5.0.0.0, Culture=en, PublicKeyToken=b03f5f7f11d50a3a
ERROR: Oops! This should not have happened.

System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/c0rn3j/.local/share/Steam/steamapps/common/Beat Saber/IPA/Data'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
   at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
   at System.IO.DirectoryInfo.GetFiles()
   at IPA.Program.CopyAll(DirectoryInfo source, DirectoryInfo target, Boolean aggressive, BackupUnit backup, Func`3 interceptor, Boolean recurse)
   at IPA.Program.Install(PatchContext context)

Second issue I have are conflicts.
It should be logged which file is conflicting with what.
Currently I have to search my system for ScoreSaberSharp.dll and remove it. It'd be great if the conflicting path to it was provided

Error: File conflict: /home/c0rn3j/.local/share/shaber/enabled/ScoreSaberSharp/Libs/ScoreSaberSharp.dll

Cannot download IPA

Describe the bug

Cannot properly download IPA

Steps to reproduce the behavior:

❯ rm enabled/BSIPA -r
❯ shaber i dl -V
Debug: Checking dependencies
Debug: All dependencies seem okay
Info: Searching for dependencies
Debug: Getting data from API for 'BSIPA'
Info: Downloading mod 'BSIPA'
Debug: Mod '{"name":"BSIPA","version":"4.1.6","gameVersion":"1.13.4","authorId":"5ca6a5fe317fa3777c3327cb","uploadDate":"2021-03-13T03:59:36.631Z","updatedDate":"2021-03-13T05:06:56.067Z","author":{"_id":"5ca6a5fe317fa3777c3327cb","username":"DaNike","lastLogin":"2021-03-09T23:00:19.798Z"},"status":"approved","description":"A mod loader for Beat Saber. Provides a number of useful tools and utilities.","link":"https://bsmg.github.io/BeatSaber-IPA-Reloaded/index.html","category":"Core","downloads":[{"type":"universal","url":"/uploads/604c38a8fd8cd42a0cd12b8f/universal/BSIPA-4.1.6.zip","hashMd5":[{"hash":"b04800b9ff6c5375c5ea6aef078f4d09","file":"IPA.exe"},{"hash":"80318442d34fd71503d6548b2a9f5490","file":"IPA.exe.config"},{"hash":"aa156a789840ef85e6c0fd08b27a18a6","file":"IPA/Data/Managed/I18N.dll"},{"hash":"a75f9881a0e9b61ad1d02bdba0406468","file":"IPA/Data/Managed/I18N.West.dll"},{"hash":"0301b21c6f248b40e8b55d519eefc715","file":"IPA/Data/Managed/IPA.Injector.dll"},{"hash":"66fead2aef2dd6ea8fb62fcb4e1df793","file":"IPA/Data/Managed/IPA.Injector.pdb"},{"hash":"1cc46cbd7c09a82136906255830bf383","file":"IPA/Data/Managed/IPA.Loader.dll"},{"hash":"00c2860e7a5607c550882aad30e39194","file":"IPA/Data/Managed/IPA.Loader.pdb"},{"hash":"81239733ace6be5dcd86128c5cdf869e","file":"IPA/Data/Managed/IPA.Loader.xml"},{"hash":"a8f13d4df59ebbcae3d07daaeab739af","file":"IPA/Data/Managed/Microsoft.CSharp.dll"},{"hash":"57dd20601187d75a9e367b86e9bc4adf","file":"IPA/Data/Managed/Portable.System.ValueTuple.dll"},{"hash":"c739259c418dad08468a4def4c4d1486","file":"IPA/Data/Managed/System.Runtime.Serialization.dll"},{"hash":"62e3e1bc898295f839fdb64fe4c59eab","file":"IPA/Libs/0Harmony.dll"},{"hash":"6ded8fcbf5f1d9e422b327ca51625e24","file":"IPA/Libs/Ionic.Zip.dll"},{"hash":"bda5cf9930c3bb1976c7484c7f280cba","file":"IPA/Libs/Mono.Cecil.dll"},{"hash":"df8837d3efdaa1405200f529f06f36b1","file":"IPA/Libs/Mono.Cecil.Mdb.dll"},{"hash":"aeff6fb43e6604178e905465463eb546","file":"IPA/Libs/Mono.Cecil.Pdb.dll"},{"hash":"b1de908243feac14049ddeefb858ef33","file":"IPA/Libs/Mono.Cecil.Rocks.dll"},{"hash":"6815034209687816d8cf401877ec8133","file":"IPA/Libs/Newtonsoft.Json.dll"},{"hash":"7581a1faec1b5f935c2c26a4c8ef318c","file":"IPA/Libs/SemVer.dll"},{"hash":"a698f41e9f3833562a407edf1b7db66d","file":"IPA/winhttp.dll"}]}],"required":false,"dependencies":[],"_id":"604c38a8fd8cd42a0cd12b8f"}' location: none
Info: Checking integrity of mod 'BSIPA'.
Info: Mod 'BSIPA' passed integrity check.
Debug: md5sum output:
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA.exe: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA.exe.config: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/I18N.West.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Injector.pdb: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.pdb: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/IPA.Loader.xml: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Microsoft.CSharp.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/Portable.System.ValueTuple.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Data/Managed/System.Runtime.Serialization.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/0Harmony.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Ionic.Zip.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Mdb.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Pdb.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Mono.Cecil.Rocks.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/Newtonsoft.Json.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/Libs/SemVer.dll: Réussi
/home/tr4sk/.local/share/shaber/disabled/BSIPA/IPA/winhttp.dll: Réussi
Debug: /IPA
Debug: /IPA/Data
Debug: /IPA/Data/Managed
Debug: /IPA/Data/Managed/I18N.dll
Error: File conflict: /home/tr4sk/.local/share/shaber/enabled/BSIPA/IPA/Data/Managed/I18N.dll
❯ md5sum enabled/BSIPA/IPA/Data/Managed/I18N.dll
aa156a789840ef85e6c0fd08b27a18a6  enabled/BSIPA/IPA/Data/Managed/I18N.dll
❯ ls -la enabled/BSIPA/IPA/Data/Managed/
total 2236
drwxr-xr-x 2 tr4sk tr4sk   4096 21 janv. 14:39 .
drwxr-xr-x 3 tr4sk tr4sk   4096 21 janv. 14:39 ..
-rw-r--r-- 1 tr4sk tr4sk  39424 18 juil.  2019 I18N.dll
-rw-r--r-- 1 tr4sk tr4sk  72192 18 juil.  2019 I18N.West.dll
-rw-r--r-- 1 tr4sk tr4sk  27136 12 mars  21:55 IPA.Injector.dll
-rw-r--r-- 1 tr4sk tr4sk   8988 12 mars  21:55 IPA.Injector.pdb
-rw-r--r-- 1 tr4sk tr4sk 382976 12 mars  21:55 IPA.Loader.dll
-rw-r--r-- 1 tr4sk tr4sk  85204 12 mars  21:55 IPA.Loader.pdb
-rw-r--r-- 1 tr4sk tr4sk 343348 12 mars  21:55 IPA.Loader.xml
-rw-r--r-- 1 tr4sk tr4sk 342528 18 juil.  2019 Microsoft.CSharp.dll
-rw-r--r-- 1 tr4sk tr4sk  30208 29 oct.   2019 Portable.System.ValueTuple.dll
-rw-r--r-- 1 tr4sk tr4sk 933888 18 juil.  2019 System.Runtime.Serialization.dll



System info:

Distro:

❯ uname -a
Linux bluebox 5.11.9-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 24 Mar 2021 18:53:59 +0000 x86_64 GNU/Linux
❯ lsb_release -a
LSB Version:	1.4
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a

Beat Saber version:
1.12.2

Write PKGBUILD

Packages for different distros would be useful, and reduce the need for the installer script. PKGBUILDs are for Arch. Please submit feature requests for other distros, or submit pull requests if you are willing to maintain the package for your distro.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.