geefr / beatsaber-linux-goodies

Mod installation scripts and other goodies to support Beat Saber on Linux
BSD 2-Clause "Simplified" License
132 stars 5 forks source link

QBeat: Setup of wine prefix failed #50

Closed NullDev closed 4 years ago

NullDev commented 4 years ago

First it errored because it ran in a 64bit wine prefix. I created a new 32bit wine prefix and updated the path with ./QBeat --config set winePrefix "~/Wine32" Then I tried to run ./QBeat --setup-wine again.

Unfortunately it errored without a useful error message:

Running wine setup script. Please be patient and choose the default option in all of the setup wizards. A status message will be printed once setup is complete
Executing: /home/shad0w/Downloads/QBeat-Beta-4/bs-linux-setup-wine.sh
Script execution failed: 
Executing mkdir -p /home/shad0w
Using winetricks 20200412-next - sha256sum: d8868a91d69dbf509d9189a3ef57d7e178c90bd597c0687eac44bf751b059184 with wine-5.0.2 and WINEARCH=win32
Executing w_do_call dotnet461
Executing mkdir -p /home/shad0w
Executing load_dotnet461 
ERROR: Failed to install .Net 4.6.1

FAILURE: Setup of wine prefix failed
geefr commented 4 years ago

Oh hey another instance of #47 that didn't take long, nice to see new users ;)

Make sure you've got the latest release (beta 4, released yesterday) then run this:

WINETRICKSURL=https://raw.githubusercontent.com/SwimmingTiger/winetricks/master/src/winetricks ./QBeat --setup-wine

Everything after should be unchanged, shouldn't need to set that once .net is setup correctly

NullDev commented 4 years ago

Thanks for the quick reply! Sorry about that duplicated issue. Sadly, doesn't seem to work anyway.

image

(click picture to enlarge)


Same error, basically.

geefr commented 4 years ago

Ah, well that's annoying but alright. Seems odd that 2 different wine issues would crop up right after one another though.

In the end all you need is a working copy of .net, that can run IPA.exe. QBeat does that by calling through to winetricks, and if winetricks works okay there's some basic logic to check if .net is installed correctly (This logic isn't the best tbh).

If you can setup a wine prefix as needed (It's just 'winetricks dotnet461') then QBeat should work properly. Could call the scripts directly or just throw that in a shell.

The other really useful thing would be if you could add 'set -x' to the top of bs-linux-setup-wine.sh it'll show you exactly what's happening, maybe the WINETRICKSURL variable wasn't set correctly for some reason..

NullDev commented 4 years ago

Well, I managed to do it manually by launching winetricks directly in my Wine32 prefix (the one QBeat is configured to use).

./QBeat --validate-wine now returns "seems valid". The very next step from the readme however doesn't work.

image

Am I missing something? Sorry, am kinda new to this...

geefr commented 4 years ago

Shouldn't be, can you run 'QBeat --config get' for me to check? If you've got a mismatched install version it could cause that

(Don't worry, it's not that easy to use, partly intentionally and partly due to time ;D)

NullDev commented 4 years ago

Sure thing!

bsInstall : /home/shad0w/.steam/steam/steamapps/common/Beat Saber
gameType : steam
gameVersion : 1.11.1
winePrefix : /home/shad0w/Wine32

(I used the version found in /home/shad0w/.steam/steam/steamapps/common/Beat Saber/BeatSaberVersion.txt)

Supreeeme commented 4 years ago

Set gameVersion to 1.11.0

geefr commented 4 years ago

Yeah it's that, default version should be correct in beta 4 (Though will persist from earlier versions).

(I am getting weird results from beatmods though if I query the rest api directly. Only get 4 mods back and IPA isn't even listed..)

NullDev commented 4 years ago

Thanks! It worked now. But:

image

Fml... Imma gonna experiment a bit more. Thank you all for your time! Awesome project :)

geefr commented 4 years ago

Hm that's a bit weird. QBeat will use whatever wine prefix you set, so if winetricks did actually install .net then it should work

So I'd point you back to the winetricks issues there. Happy to help out but wine/winetricks itself is a little outside my scope for now..

@Ominitay / @mtfurlan - If you're able to help here I'd greatly appreciate it, I'm thinking it has to be similar to the other issue but won't have the time to investigate myself until next weekend.

mtfurlan commented 4 years ago

When I was dealing with this, I had to completely delete the wine directory after a failed .net install, and I ignored the 64 bit warnings.

NullDev commented 4 years ago

It seems like wintricks installed .NET 4.0 instead of 4.6.1. I checked the list of windows DLL's in winetricks and 4.0 was selected. I tried to check 4.6.1 again but it said "Not compatible with 4.0". Sooooo, I nuked the whole 32bit wineprefix and tried it again. Made sure I select 4.6.1 but it's trying to install 4.0 again.

It seems like winetricks tries to install 4.6.1 and fails, then tries a version lower (4.5) which fails again and finally installs 4.0

See here:

Screenshot_20200906_203511

Notice it tries to install 4.6.1, then the line "Working around wine bug XYZ" and the next version it tries to install is lower. Until it reaches 4.0

I think ill give up for now :/

Supreeeme commented 4 years ago

Make sure you set WINETRICKSURL=https://raw.githubusercontent.com/SwimmingTiger/winetricks/master/src/winetricks if you set the prefix with QBeat. Otherwise winetricks has a bug with .NET right now, see https://github.com/Winetricks/winetricks/issues/1596

ominitay commented 4 years ago

@NLDev As the documentation says, there is currently an issue with winetricks, requiring you to use the WINETRICKSURL variable to set up dotnet4xx. You need to delete your failed prefix from before as well. There will be about 4 dotnet installers iirc that you are required to click through - this is just how the dotnet installation works. As far as I can see, you have the exact same problem as I reported, so it shouldn't be too difficult to fix.

ominitay commented 4 years ago

In the third comment, the sha256sum, is not the same as what I am getting on my system, likely indicating that it was still using the old winetricks. That is probably your issue. Also the counting down of versions in the terminal to 4.0 is normal behaviour and indicates that winetricks is doing its job.

ominitay commented 4 years ago

AHA!! The reason why the script didn't use the correct version of winetricks is that you are using zsh, but the part of the script that detects the environment variable is only bash-compatible. That's an oversight on my end. I'll make a PR to change the test to something POSIX-compliant as soon as possible.

geefr commented 4 years ago

@Ominitay But those scripts specifically ask for bash as an interpreter..Does that mean zsh is intercepting the #! and running under something that's not bash compatible?? I know zsh isn't overly common but that seems like a major flaw if it's doing that..

NullDev commented 4 years ago

No, ZSH doesn't ignore the shebang. The script are executed with bash if the shebang is provided. No matter what the default shell is.

As for the WINETRICKSURL, I tried that but the .NET 4.5 installer just hangs and does nothing. I tried to follow those instructions now (but with 4.6.1 instead of 4.7.1): https://www.reddit.com/r/wine_gaming/comments/8r6low/guide_how_to_install_net_45_on_64bit_prefixes/

To no avail sadly.

Ill completely wipe the prefix again and try WINETRICKSURL again. If that doesn't work, ill leave it be. Thanks for the help so far! Really appreciate it :)

ominitay commented 4 years ago

If it doesn't work, please send me the logs. :)

ominitay commented 4 years ago

Also yeah, I forgot the shebang :/

NullDev commented 4 years ago

I'm at the 4.5 installation now (that hanged at about 10% last time) and got this warning:

image

Can I safely skip this or is some action required?

ominitay commented 4 years ago

Safely skip it! If it hangs, just leave it. The installers do take their time. If you got this far, you are past the winetricks issue :D

NullDev commented 4 years ago

Everything worked! No errors, installed BSIPA and run --patch. Thank you all so much again for your help, and especially time! And thank you for maintaining this project in general <3

Closing this now :)

ominitay commented 4 years ago

I'm glad that you got it working. Enjoy!