ardba / proton_aoe2de_mpfix

Small script containing Multiplayer fix for AOE2
GNU General Public License v3.0
106 stars 17 forks source link

Script fails to find library in mounted disk #15

Open feliciov opened 1 year ago

feliciov commented 1 year ago

I had some trouble using your script on my machine. It may be caused by having multiple disks and libraries in each one of then. Probably it has something to do with how I mounted those disks, but I'm not sure.

Anyway, this is the best resource I could find on this proton issue and, after fiddling a little and running bits of it manually I made it work. Writing this to anyone that happens to fall in the same pits I did. It does work. Thanks.

sashokbg commented 10 months ago

Hi @feliciov please provide some more information. Where is your steam installed, what are your mounts etc.

There was recently a PR merged that looks through all libraries in all places: https://github.com/ardba/proton_aoe2de_mpfix/pull/10/files

I too have a separate mount for my ~/Games directory that is a separate SSD and it works ok on my end

feliciov commented 10 months ago

Hello @sashokbg. Unfortunatelly I cannot give you my precise setup because I'm kinda of a distro hopper and that setup is already gone.

I remember that my secondary drive were mounted at /mnt/disk2 and that I fiddled with /etc/fstab to make it mount on startup. Other than that, I can only say I was running Ubuntu 22.04. Anything else is gone into the oblivion.

I'll try to make it run on my new setup, using NixOS and, if I run in the same issue, I'll surely let you know. Sorry I cannot give you any more details.

sashokbg commented 10 months ago

Sounds like the same setup as me. Ok write a comment here if the issue comes again :)

feliciov commented 10 months ago

I gave it a test yesterday, now running on a NixOS machine. I made it work with a little fiddling, but the original script (run.sh) fails because, as I have it setup, NixOS doesn't have /bin/bash. It does have /bin/sh and It did work when I changed this one detail. You might consider changing it to improve compatibility with a couple of extra distros. I'm not sure how many it would break, so I'd be carefull.

sashokbg commented 10 months ago

Using /bin/sh means script has to be made POSIX compliant. This might have big impacts. In our case /bin/sh probably points to fish sh or zsh.

feliciov commented 10 months ago

You're right, mine points to zsh.

My use case is solved, but I'm just trying to be useful here: I couldn't find any shell specific code with my smoll brain, so I've ran it through shellcheck. All it seems to complain is about double-quoting some vars to avoid potential globbing and word splitting. 5 or 6 line changes involving just that.

Of course I'm being quite simplistic here, but this seems like a nice use-case for CI done with Github Actions. I mean, just run a linter (only one I know of is shellcheck) and scream to the dev if he's cutting corners with any shell specific syntax. I might be able to put in a couple of hours in the next few weeks - remembering how to do it - and submitting a pull request, if you're open to reviewing it.

sashokbg commented 10 months ago

I would try chat gpt to see if it can translate it well to POSIX :)